ETH Price: $2,283.24 (+8.21%)
 

Overview

Max Total Supply

111,155 SPOS

Holders

32

Transfers

-
0

Market

Price

$0.00 @ 0.000000 ETH

Onchain Market Cap

-

Circulating Supply Market Cap

-

Other Info

Token Contract (WITH 0 Decimals)

Loading...
Loading
Loading...
Loading
Loading...
Loading

Click here to update the token information / general information

Contract Source Code Verified (Exact Match)

Contract Name:
DraggableShares

Compiler Version
v0.8.12+commit.f00d7308

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, None license
/**
* 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.0;

import "../recovery/ERC20Recoverable.sol";
import "../draggable/ERC20Draggable.sol";
import "../ERC20/ERC20PermitLight.sol";

/**
 * @title CompanyName AG Shares SHA
 * @author Luzius Meisser, [email protected]
 *
 * This is an ERC-20 token representing share tokens of CompanyName AG that are bound to
 * a shareholder agreement that can be found at the URL defined in the constant 'terms'.
 */
contract DraggableShares is ERC20Draggable, ERC20Recoverable, ERC20PermitLight {

    string public terms;

    constructor(
        string memory _terms,
        IERC20 _wrappedToken,
        uint256 _quorumBps,
        uint256 _votePeriodSeconds,
        IRecoveryHub _recoveryHub,
        IOfferFactory _offerFactory,
        address _oracle
    )
        ERC20Draggable(_wrappedToken, _quorumBps, _votePeriodSeconds, _offerFactory, _oracle)
        ERC20Recoverable(_recoveryHub)
        ERC20PermitLight() 
    {
        terms = _terms; // to update the terms, migrate to a new contract. That way it is ensured that the terms can only be updated when the quorom agrees.
        _recoveryHub.setRecoverable(false);
    }

    function transfer(address to, uint256 value) virtual override(ERC20Flaggable, ERC20Recoverable, IERC20) public returns (bool) {
        return super.transfer(to, value);
    }

    /**
     * Let the oracle act as deleter of invalid claims. In earlier versions, this was referring to the claim deleter
     * of the wrapped token. But that stops working after a successful acquisition as the acquisition currency most
     * likely does not have a claim deleter.
     */
    function getClaimDeleter() public view override returns (address) {
        return oracle;
    }

    function getCollateralRate(IERC20 collateralType) public view override returns (uint256) {
        uint256 rate = super.getCollateralRate(collateralType);
        if (rate > 0) {
            return rate;
        } else {
            // as long as it is binding, the conversion rate is 1:1
            uint256 factor = isBinding() ? 1 : unwrapConversionFactor;
            if (address(collateralType) == address(wrapped)) {
                // allow wrapped token as collateral
                return factor;
            } else {
                // If the wrapped contract allows for a specific collateral, we should too.
                // If the wrapped contract is not IRecoverable, we will fail here, but would fail anyway.
                return IRecoverable(address(wrapped)).getCollateralRate(collateralType) * factor;
            }
        }
    }

    function _beforeTokenTransfer(address from, address to, uint256 amount) virtual override(ERC20Flaggable, ERC20Draggable) internal {
        super._beforeTokenTransfer(from, to, amount);
    }

}

// SPDX-License-Identifier: MIT
// Copied and adjusted from OpenZeppelin
// Adjustments:
// - modifications to support ERC-677
// - removed unnecessary require statements
// - removed GSN Context
// - upgraded to 0.8 to drop SafeMath
// - let name() and symbol() be implemented by subclass
// - infinite allowance support, with 2^255 and above considered infinite
// - use upper 32 bits of balance for flags
// - add a global settings variable

pragma solidity ^0.8.0;

import "./IERC20.sol";
import "./IERC677Receiver.sol";

/**
 * @dev Implementation of the `IERC20` interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using `_mint`.
 * For a generic mechanism see `ERC20Mintable`.
 *
 * *For a detailed writeup see our guide [How to implement supply
 * mechanisms](https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226).*
 *
 * We have followed general OpenZeppelin guidelines: functions revert instead
 * of returning `false` on failure. This behavior is nonetheless conventional
 * and does not conflict with the expectations of ERC20 applications.
 *
 * Additionally, an `Approval` event is emitted on calls to `transferFrom`.
 * This allows applications to reconstruct the allowance for all accounts just
 * by listening to said events. Other implementations of the EIP may not emit
 * these events, as it isn't required by the specification.
 *
 * Finally, the non-standard `decreaseAllowance` and `increaseAllowance`
 * functions have been added to mitigate the well-known issues around setting
 * allowances. See `IERC20.approve`.
 */

abstract contract ERC20Flaggable is IERC20 {

    // as Documented in /doc/infiniteallowance.md
    // 0x8000000000000000000000000000000000000000000000000000000000000000
    uint256 constant private INFINITE_ALLOWANCE = 2**255;

    uint256 private constant FLAGGING_MASK = 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000;

    // Documentation of flags used by subclasses:
    // NOTE: flags denote the bit number that is being used and must be smaller than 32
    // ERC20Draggable: uint8 private constant FLAG_INDEX_VOTED = 1;
    // ERC20Recoverable: uint8 private constant FLAG_INDEX_CLAIM_PRESENT = 10;
    // ERCAllowlistable: uint8 private constant FLAG_INDEX_ALLOWLIST = 20;
    // ERCAllowlistable: uint8 private constant FLAG_INDEX_FORBIDDEN = 21;
    // ERCAllowlistable: uint8 private constant FLAG_INDEX_POWERLIST = 22;

    mapping (address => uint256) private _balances; // upper 32 bits reserved for flags

    mapping (address => mapping (address => uint256)) private _allowances;

    uint256 private _totalSupply;

    uint8 public override decimals;

    event NameChanged(string name, string symbol);

    constructor(uint8 _decimals) {
        decimals = _decimals;
    }

    /**
     * @dev See `IERC20.totalSupply`.
     */
    function totalSupply() public view override returns (uint256) {
        return _totalSupply;
    }

    /**
     * @dev See `IERC20.balanceOf`.
     */
    function balanceOf(address account) public view override returns (uint256) {
        return uint224 (_balances [account]);
    }

    function hasFlag(address account, uint8 number) external view returns (bool) {
        return hasFlagInternal(account, number);
    }

    function setFlag(address account, uint8 index, bool value) internal {
        uint256 flagMask = 1 << (index + 224);
        uint256 balance = _balances [account];
        if ((balance & flagMask == flagMask) != value) {
            _balances [account] = balance ^ flagMask;
        }
    }

    function hasFlagInternal(address account, uint8 number) internal view returns (bool) {
        uint256 flag = 0x1 << (number + 224);
        return _balances[account] & flag == flag;
    }

    /**
     * @dev See `IERC20.transfer`.
     *
     * Requirements:
     *
     * - `recipient` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
        _transfer(msg.sender, recipient, amount);
        return true;
    }

    /**
     * @dev See `IERC20.allowance`.
     */
    function allowance(address owner, address spender) external view override returns (uint256) {
        return _allowances[owner][spender];
    }

    /**
     * @dev See `IERC20.approve`.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 value) external override returns (bool) {
        _approve(msg.sender, spender, value);
        return true;
    }

    /**
     * @dev See `IERC20.transferFrom`.
     *
     * Emits an `Approval` event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of `ERC20`;
     *
     * Requirements:
     * - `sender` and `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `value`.
     * - the caller must have allowance for `sender`'s tokens of at least
     * `amount`.
     */
    function transferFrom(address sender, address recipient, uint256 amount) external override returns (bool) {
        _transfer(sender, recipient, amount);
        uint256 currentAllowance = _allowances[sender][msg.sender];
        if (currentAllowance < INFINITE_ALLOWANCE){
            // Only decrease the allowance if it was not set to 'infinite'
            // Documented in /doc/infiniteallowance.md
            _allowances[sender][msg.sender] = currentAllowance - amount;
        }
        return true;
    }

    /**
     * @dev Moves tokens `amount` from `sender` to `recipient`.
     *
     * This is internal function is equivalent to `transfer`, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a `Transfer` event.
     *
     * Requirements:
     *
     * - `sender` cannot be the zero address.
     * - `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     */
    function _transfer(address sender, address recipient, uint256 amount) internal virtual {
        _beforeTokenTransfer(sender, recipient, amount);
        decreaseBalance(sender, amount);
        increaseBalance(recipient, amount);
        emit Transfer(sender, recipient, amount);
    }

    // ERC-677 functionality, can be useful for swapping and wrapping tokens
    function transferAndCall(address recipient, uint amount, bytes calldata data) external virtual returns (bool) {
        return transfer (recipient, amount) 
            && IERC677Receiver (recipient).onTokenTransfer (msg.sender, amount, data);
    }

    /** @dev Creates `amount` tokens and assigns them to `account`, increasing
     * the total supply.
     *
     * Emits a `Transfer` event with `from` set to the zero address.
     *
     * Requirements
     *
     * - `to` cannot be the zero address.
     */
    function _mint(address recipient, uint256 amount) internal virtual {
        _beforeTokenTransfer(address(0), recipient, amount);
        _totalSupply += amount;
        increaseBalance(recipient, amount);
        emit Transfer(address(0), recipient, amount);
    }

    function increaseBalance(address recipient, uint256 amount) private {
        require(recipient != address(0x0), "0x0"); // use burn instead
        uint256 oldBalance = _balances[recipient];
        uint256 newBalance = oldBalance + amount;
        require(oldBalance & FLAGGING_MASK == newBalance & FLAGGING_MASK, "overflow");
        _balances[recipient] = newBalance;
    }

     /**
     * @dev Destroys `amount` tokens from `account`, reducing the
     * total supply.
     *
     * Emits a `Transfer` event with `to` set to the zero address.
     *
     * Requirements
     *
     * - `account` cannot be the zero address.
     * - `account` must have at least `amount` tokens.
     */
    function _burn(address account, uint256 amount) internal virtual {
        _beforeTokenTransfer(account, address(0), amount);

        _totalSupply -= amount;
        decreaseBalance(account, amount);
        emit Transfer(account, address(0), amount);
    }

    function decreaseBalance(address sender, uint256 amount) private {
        uint256 oldBalance = _balances[sender];
        uint256 newBalance = oldBalance - amount;
        require(oldBalance & FLAGGING_MASK == newBalance & FLAGGING_MASK, "underflow");
        _balances[sender] = newBalance;
    }

    /**
     * @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens.
     *
     * This is internal function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an `Approval` event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     */
    function _approve(address owner, address spender, uint256 value) internal {
        _allowances[owner][spender] = value;
        emit Approval(owner, spender, value);
    }

    /**
     * @dev Hook that is called before any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * will be to transferred to `to`.
     * - when `from` is zero, `amount` tokens will be minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
     // solhint-disable-next-line no-empty-blocks
    function _beforeTokenTransfer(address from, address to, uint256 amount) virtual internal {
        // intentionally left blank
    }

}

File 3 of 14 : ERC20PermitLight.sol
// SPDX-License-Identifier: MIT
// Copied from https://github.com/transmissions11/solmate/blob/main/src/tokens/ERC20.sol
// and modified it.

pragma solidity ^0.8.0;

import "./ERC20Flaggable.sol";
import "./IERC20Permit.sol";

abstract contract ERC20PermitLight is ERC20Flaggable, IERC20Permit {
   
   /*//////////////////////////////////////////////////////////////
                            EIP-2612 STORAGE
    //////////////////////////////////////////////////////////////*/

    mapping(address => uint256) public override nonces;

  /*//////////////////////////////////////////////////////////////
                             EIP-2612 LOGIC
    //////////////////////////////////////////////////////////////*/

    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) public override {
        require(deadline >= block.timestamp, "PERMIT_DEADLINE_EXPIRED");

        unchecked { // unchecked to save a little gas with the nonce increment...
            address recoveredAddress = ecrecover(
                keccak256(
                    abi.encodePacked(
                        "\x19\x01",
                        DOMAIN_SEPARATOR(),
                        keccak256(
                            abi.encode(
                                // keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)"),
                                bytes32(0x6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9),
                                owner,
                                spender,
                                value,
                                nonces[owner]++,
                                deadline
                            )
                        )
                    )
                ),
                v,
                r,
                s
            );

            require(recoveredAddress != address(0) && recoveredAddress == owner, "INVALID_SIGNER");
            _approve(recoveredAddress, spender, value);
        }
    }

    function DOMAIN_SEPARATOR() public view override returns (bytes32) {
        return
            keccak256(
                abi.encode(
                    //keccak256("EIP712Domain(uint256 chainId,address verifyingContract)");
                    bytes32(0x47e79534a245952e8b16893a336b85a3d9ea9fa8c573f3d803afb92a79469218),
                    block.chainid,
                    address(this)
                )
            );
    }

}

/**
* SPDX-License-Identifier: MIT
*
* Copyright (c) 2016-2019 zOS Global Limited
*
*/
pragma solidity ^0.8.0;

/**
 * @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);

}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)
// Copied from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/extensions/draft-IERC20Permit.sol

pragma solidity ^0.8.0;

import "./IERC20.sol";

/**
 * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 */
interface IERC20Permit is IERC20 {
    /**
     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
     * given ``owner``'s signed approval.
     *
     * IMPORTANT: The same issues {IERC20-approve} has related to transaction
     * ordering also apply here.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `deadline` must be a timestamp in the future.
     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
     * over the EIP712-formatted function arguments.
     * - the signature must use ``owner``'s current nonce (see {nonces}).
     *
     * For more information on the signature format, see the
     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
     * section].
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    /**
     * @dev Returns the current nonce for `owner`. This value must be
     * included whenever a signature is generated for {permit}.
     *
     * Every successful call to {permit} increases ``owner``'s nonce by one. This
     * prevents a signature from being used multiple times.
     */
    function nonces(address owner) external view returns (uint256);

    /**
     * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
     */
    // solhint-disable-next-line func-name-mixedcase
    function DOMAIN_SEPARATOR() external view returns (bytes32);
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

// Given that development on ERC 677 has stalled, we should consider supporting EIP 1363: https://eips.ethereum.org/EIPS/eip-1363
interface IERC677Receiver {
    
    function onTokenTransfer(address from, uint256 amount, bytes calldata data) external returns (bool);

}

/**
 * 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.0;

/**
 * @title ERC-20 tokens subject to a drag-along agreement
 * @author Luzius Meisser, [email protected]
 *
 * This is an ERC-20 token that is bound to a shareholder or other agreement that contains
 * a drag-along clause. The smart contract can help enforce this drag-along clause in case
 * an acquirer makes an offer using the provided functionality. If a large enough quorum of
 * token holders agree, the remaining token holders can be automatically "dragged along" or
 * squeezed out. For shares non-tokenized shares, the contract relies on an external Oracle
 * to provide the votes of those.
 *
 * Subclasses should provide a link to a human-readable form of the agreement.
 */

import "./IDraggable.sol";
import "../ERC20/ERC20Flaggable.sol";
import "../ERC20/IERC20.sol";
import "../ERC20/IERC677Receiver.sol";
import "./IOffer.sol";
import "./IOfferFactory.sol";
import "../shares/IShares.sol";

abstract contract ERC20Draggable is IERC677Receiver, IDraggable, ERC20Flaggable {
    
	// If flag is not present, one can be sure that the address did not vote. If the 
	// flag is present, the address might have voted and one needs to check with the
	// current offer (if any) when transferring tokens.
	uint8 private constant FLAG_VOTE_HINT = 1;

	IERC20 public override wrapped; // The wrapped contract
	IOfferFactory public immutable factory;

	// If the wrapped tokens got replaced in an acquisition, unwrapping might yield many currency tokens
	uint256 public unwrapConversionFactor = 0;

	// The current acquisition attempt, if any. See initiateAcquisition to see the requirements to make a public offer.
	IOffer public override offer;

	uint256 private constant QUORUM_MULTIPLIER = 10000;

	uint256 public immutable quorum; // BPS (out of 10'000)
	uint256 public immutable votePeriod; // In seconds

	address public override oracle;

	event MigrationSucceeded(address newContractAddress, uint256 yesVotes, uint256 oracleVotes, uint256 totalVotingPower);
	event ChangeOracle(address oracle);

    /**
	 * Note that the Brokerbot only supports tokens that revert on failure and where transfer never returns false.
     */
	constructor(
		IERC20 _wrappedToken,
		uint256 _quorum,
		uint256 _votePeriod,
		IOfferFactory _offerFactory,
		address _oracle
	) 
		ERC20Flaggable(0)
	{
		wrapped = _wrappedToken;
		quorum = _quorum;
		votePeriod = _votePeriod;
		factory = _offerFactory;
		oracle = _oracle;
	}

	function onTokenTransfer(
		address from, 
		uint256 amount, 
		bytes calldata
	) external override returns (bool) {
		require(msg.sender == address(wrapped), "sender");
		_mint(from, amount);
		return true;
	}

	/** Wraps additional tokens, thereby creating more ERC20Draggable tokens. */
	function wrap(address shareholder, uint256 amount) external {
		require(wrapped.transferFrom(msg.sender, address(this), amount), "transfer");
		_mint(shareholder, amount);
	}

	/**
	 * Indicates that the token holders are bound to the token terms and that:
	 * - Conversion back to the wrapped token (unwrap) is not allowed
	 * - A drag-along can be performed by making an according offer
	 * - They can be migrated to a new version of this contract in accordance with the terms
	 */
	function isBinding() public view returns (bool) {
		return unwrapConversionFactor == 0;
	}

    /**
	 * Current recommended naming convention is to add the postfix "SHA" to the plain shares
	 * in order to indicate that this token represents shares bound to a shareholder agreement.
	 */
	function name() public view override returns (string memory) {
		string memory wrappedName = wrapped.name();
		if (isBinding()) {
			return string(abi.encodePacked(wrappedName, " SHA"));
		} else {
			return string(abi.encodePacked(wrappedName, " (Wrapped)"));
		}
	}

	function symbol() public view override returns (string memory) {
		// ticker should be less dynamic than name
		return string(abi.encodePacked(wrapped.symbol(), "S"));
	}

	/**
	 * Deactivates the drag-along mechanism and enables the unwrap function.
	 */
	function deactivate(uint256 factor) internal {
		require(factor >= 1, "factor");
		unwrapConversionFactor = factor;
		emit NameChanged(name(), symbol());
	}

	/** Decrease the number of drag-along tokens. The user gets back their shares in return */
	function unwrap(uint256 amount) external override{
		require(!isBinding(), "factor");
		unwrap(msg.sender, amount, unwrapConversionFactor);
	}

	function unwrap(address owner, uint256 amount, uint256 factor) internal {
		_burn(owner, amount);
		require(wrapped.transfer(owner, amount * factor), "transfer");
	}

	/**
	 * Burns both the token itself as well as the wrapped token!
	 * If you want to get out of the shareholder agreement, use unwrap after it has been
	 * deactivated by a majority vote or acquisition.
	 *
	 * Burning only works if wrapped token supports burning. Also, the exact meaning of this
	 * operation might depend on the circumstances. Burning and reussing the wrapped token
	 * does not free the sender from the legal obligations of the shareholder agreement.
	 */
	function burn(uint256 amount) external {
		_burn(msg.sender, amount);
		IShares(address(wrapped)).burn (isBinding() ? amount : amount * unwrapConversionFactor);
	}

	function makeAcquisitionOffer(
		bytes32 salt, 
		uint256 pricePerShare, 
		IERC20 currency
	) external payable {
		require(isBinding(), "factor");
		IOffer newOffer = factory.create{value: msg.value}(
			salt, msg.sender, pricePerShare, currency, quorum, votePeriod);

		if (offerExists()) {
			offer.makeCompetingOffer(newOffer);
		}
		offer = newOffer;
	}

	function drag(address buyer, IERC20 currency) external override offerOnly {
		unwrap(buyer, balanceOf(buyer), 1);
		replaceWrapped(currency, buyer);
	}

	function notifyOfferEnded() external override offerOnly {
		offer = IOffer(address(0));
	}

	function replaceWrapped(IERC20 newWrapped, address oldWrappedDestination) internal {
		require(isBinding(), "factor");
		// Free all old wrapped tokens we have
		require(wrapped.transfer(oldWrappedDestination, wrapped.balanceOf(address(this))), "transfer");
		// Count the new wrapped tokens
		wrapped = newWrapped;
		deactivate(newWrapped.balanceOf(address(this)) / totalSupply());
	}

	function setOracle(address newOracle) external {
		require(msg.sender == oracle, "not oracle");
		oracle = newOracle;
		emit ChangeOracle(oracle);
	}

	function migrateWithExternalApproval(address successor, uint256 additionalVotes) external {
		require(msg.sender == oracle, "not oracle");
		// Additional votes cannot be higher than the votes not represented by these tokens.
		// The assumption here is that more shareholders are bound to the shareholder agreement
		// that this contract helps enforce and a vote among all parties is necessary to change
		// it, with an oracle counting and reporting the votes of the others.
		require(totalSupply() + additionalVotes <= totalVotingTokens(), "votes");
		migrate(successor, additionalVotes);
	}

	function migrate() external {
		migrate(msg.sender, 0);
	}

	function migrate(address successor, uint256 additionalVotes) internal {
		uint256 yesVotes = additionalVotes + balanceOf(successor);
		uint256 totalVotes = totalVotingTokens();
		require(yesVotes <= totalVotes, "votes");
		require(!offerExists(), "no offer"); // if you have the quorum, you can cancel the offer first if necessary
		require(yesVotes * QUORUM_MULTIPLIER >= totalVotes * quorum, "quorum");
		replaceWrapped(IERC20(successor), successor);
		emit MigrationSucceeded(successor, yesVotes, additionalVotes, totalVotes);
	}

	function votingPower(address voter) external view override returns (uint256) {
		return balanceOf(voter);
	}

	function totalVotingTokens() public view override returns (uint256) {
		return IShares(address(wrapped)).totalShares();
	}

	function hasVoted(address voter) internal view returns (bool) {
		return hasFlagInternal(voter, FLAG_VOTE_HINT);
	}

	function notifyVoted(address voter) external override offerOnly {
		setFlag(voter, FLAG_VOTE_HINT, true);
	}

	modifier offerOnly(){
		require(msg.sender == address(offer), "sender");
		_;
	}

	function _beforeTokenTransfer(address from, address to,	uint256 amount) internal virtual override {
		if (hasVoted(from) || hasVoted(to)) {
			if (offerExists()) {
				offer.notifyMoved(from, to, amount);
			} else {
				setFlag(from, FLAG_VOTE_HINT, false);
				setFlag(to, FLAG_VOTE_HINT, false);
			}
		}
		super._beforeTokenTransfer(from, to, amount);
	}

	function offerExists() internal view returns (bool) {
		return address(offer) != address(0);
	}
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "../ERC20/IERC20.sol";
import "./IOffer.sol";
interface IDraggable {
    
    function wrapped() external view returns (IERC20);
    function unwrap(uint256 amount) external;
    function offer() external view returns (IOffer);
    function oracle() external view returns (address);
    function drag(address buyer, IERC20 currency) external;
    function notifyOfferEnded() external;
    function votingPower(address voter) external returns (uint256);
    function totalVotingTokens() external view returns (uint256);
    function notifyVoted(address voter) external;

}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "../ERC20/IERC20.sol";

interface IOffer {
	function makeCompetingOffer(IOffer newOffer) external;

	// if there is a token transfer while an offer is open, the votes get transfered too
	function notifyMoved(address from, address to, uint256 value) external;

	function currency() external view returns (IERC20);

	function price() external view returns (uint256);

	function isWellFunded() external view returns (bool);

	function voteYes() external;

	function voteNo() external;
}

File 10 of 14 : IOfferFactory.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "../ERC20/IERC20.sol";
import "./IOffer.sol";

interface IOfferFactory {

	function create(
		bytes32 salt, address buyer, uint256 pricePerShare,	IERC20 currency,	uint256 quorum,	uint256 votePeriod
	) external payable returns (IOffer);
}

/**
* 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.0;

import "../ERC20/ERC20Flaggable.sol";
import "./IRecoveryHub.sol";
import "./IRecoverable.sol";

/**
 * @title Recoverable
 * In case of tokens that represent real-world assets such as shares of a company, one needs a way
 * to handle lost private keys. With physical certificates, courts can declare share certificates as
 * invalid so the company can issue replacements. Here, we want a solution that does not depend on
 * third parties to resolve such cases. Instead, when someone has lost a private key, he can use the
 * declareLost function on the recovery hub to post a deposit and claim that the shares assigned to a
 * specific address are lost.
 * If an attacker trying to claim shares belonging to someone else, they risk losing the deposit
 * as it can be claimed at anytime by the rightful owner.
 * Furthermore, if "getClaimDeleter" is defined in the subclass, the returned address is allowed to
 * delete claims, returning the collateral. This can help to prevent obvious cases of abuse of the claim
 * function, e.g. cases of front-running.
 * Most functionality is implemented in a shared RecoveryHub.
 */
abstract contract ERC20Recoverable is ERC20Flaggable, IRecoverable {

    uint8 private constant FLAG_CLAIM_PRESENT = 10;

    // ERC-20 token that can be used as collateral or 0x0 if disabled
    IERC20 public customCollateralAddress;
    // Rate the custom collateral currency is multiplied to be valued like one share.
    uint256 public customCollateralRate;

    uint256 constant CLAIM_PERIOD = 180 days;

    IRecoveryHub public override immutable recovery;

    constructor(IRecoveryHub recoveryHub){
        recovery = recoveryHub;
    }

    /**
     * Returns the collateral rate for the given collateral type and 0 if that type
     * of collateral is not accepted. By default, only the token itself is accepted at
     * a rate of 1:1.
     *
     * Subclasses should override this method if they want to add additional types of
     * collateral.
     */
    function getCollateralRate(IERC20 collateralType) public override virtual view returns (uint256) {
        if (address(collateralType) == address(this)) {
            return 1;
        } else if (collateralType == customCollateralAddress) {
            return customCollateralRate;
        } else {
            return 0;
        }
    }

    function claimPeriod() external pure override returns (uint256){
        return CLAIM_PERIOD;
    }

    /**
     * Allows subclasses to set a custom collateral besides the token itself.
     * The collateral must be an ERC-20 token that returns true on successful transfers and
     * throws an exception or returns false on failure.
     * Also, do not forget to multiply the rate in accordance with the number of decimals of the collateral.
     * For example, rate should be 7*10**18 for 7 units of a collateral with 18 decimals.
     */
    function _setCustomClaimCollateral(IERC20 collateral, uint256 rate) internal {
        customCollateralAddress = collateral;
        if (address(customCollateralAddress) == address(0)) {
            customCollateralRate = 0; // disabled
        } else {
            require(rate > 0, "zero");
            customCollateralRate = rate;
        }
    }

    function getClaimDeleter() virtual public view returns (address);

    function transfer(address recipient, uint256 amount) override(ERC20Flaggable, IERC20) virtual public returns (bool) {
        require(super.transfer(recipient, amount), "transfer");
        if (hasFlagInternal(msg.sender, FLAG_CLAIM_PRESENT)){
            recovery.clearClaimFromToken(msg.sender);
        }
        return true;
    }

    function notifyClaimMade(address target) external override {
        require(msg.sender == address(recovery), "not recovery");
        setFlag(target, FLAG_CLAIM_PRESENT, true);
    }

    function notifyClaimDeleted(address target) external override {
        require(msg.sender == address(recovery), "not recovery");
        setFlag(target, FLAG_CLAIM_PRESENT, false);
    }

    function deleteClaim(address lostAddress) external {
        require(msg.sender == getClaimDeleter(), "not claim deleter");
        recovery.deleteClaim(lostAddress);
    }

    function recover(address oldAddress, address newAddress) external override {
        require(msg.sender == address(recovery), "not recovery");
        _transfer(oldAddress, newAddress, balanceOf(oldAddress));
    }

}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "../ERC20/IERC20.sol";
import "./IRecoveryHub.sol";

interface IRecoverable is IERC20{

    // returns the recovery hub
    function recovery() external view returns (IRecoveryHub);

    function claimPeriod() external view returns (uint256);
    
    function notifyClaimMade(address target) external;

    function notifyClaimDeleted(address target) external;

    function getCollateralRate(IERC20 collateral) external view returns(uint256);

    function recover(address oldAddress, address newAddress) external;

}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "./IRecoverable.sol";

interface IRecoveryHub {

    function setRecoverable(bool flag) external;
    
    // deletes claim and transfers collateral back to claimer
    function deleteClaim(address target) external;

    // clears claim and transfers collateral to holder
    function clearClaimFromToken(address holder) external;

    function clearClaimFromUser(IRecoverable token) external;

}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface IShares {
	function burn(uint256) external;

	function totalShares() external view returns (uint256);
}

Settings
{
  "evmVersion": "london",
  "libraries": {},
  "metadata": {
    "bytecodeHash": "ipfs",
    "useLiteralContent": true
  },
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "remappings": [],
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"string","name":"_terms","type":"string"},{"internalType":"contract IERC20","name":"_wrappedToken","type":"address"},{"internalType":"uint256","name":"_quorumBps","type":"uint256"},{"internalType":"uint256","name":"_votePeriodSeconds","type":"uint256"},{"internalType":"contract IRecoveryHub","name":"_recoveryHub","type":"address"},{"internalType":"contract IOfferFactory","name":"_offerFactory","type":"address"},{"internalType":"address","name":"_oracle","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oracle","type":"address"}],"name":"ChangeOracle","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newContractAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"yesVotes","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"oracleVotes","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"totalVotingPower","type":"uint256"}],"name":"MigrationSucceeded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"name","type":"string"},{"indexed":false,"internalType":"string","name":"symbol","type":"string"}],"name":"NameChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimPeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"customCollateralAddress","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"customCollateralRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"lostAddress","type":"address"}],"name":"deleteClaim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"buyer","type":"address"},{"internalType":"contract IERC20","name":"currency","type":"address"}],"name":"drag","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"factory","outputs":[{"internalType":"contract IOfferFactory","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getClaimDeleter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"collateralType","type":"address"}],"name":"getCollateralRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint8","name":"number","type":"uint8"}],"name":"hasFlag","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isBinding","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"uint256","name":"pricePerShare","type":"uint256"},{"internalType":"contract IERC20","name":"currency","type":"address"}],"name":"makeAcquisitionOffer","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"migrate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"successor","type":"address"},{"internalType":"uint256","name":"additionalVotes","type":"uint256"}],"name":"migrateWithExternalApproval","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"notifyClaimDeleted","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"notifyClaimMade","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"notifyOfferEnded","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"voter","type":"address"}],"name":"notifyVoted","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"offer","outputs":[{"internalType":"contract IOffer","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onTokenTransfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"oracle","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"permit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"quorum","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"oldAddress","type":"address"},{"internalType":"address","name":"newAddress","type":"address"}],"name":"recover","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"recovery","outputs":[{"internalType":"contract IRecoveryHub","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOracle","type":"address"}],"name":"setOracle","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"terms","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalVotingTokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"transferAndCall","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"unwrap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unwrapConversionFactor","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"votePeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"voter","type":"address"}],"name":"votingPower","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"shareholder","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"wrap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"wrapped","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

61010060405260006004553480156200001757600080fd5b5060405162002ab938038062002ab98339810160408190526200003a91620001e2565b600380546001600160a81b0319166101006001600160a01b03898116919091029190911790915560a086905260c0859052828116608052600680546001600160a01b031916838316179055831660e05286516200009f90600a9060208a019062000109565b50604051636427ed9760e01b8152600060048201526001600160a01b03841690636427ed9790602401600060405180830381600087803b158015620000e357600080fd5b505af1158015620000f8573d6000803e3d6000fd5b50505050505050505050506200035b565b82805462000117906200031e565b90600052602060002090601f0160209004810192826200013b576000855562000186565b82601f106200015657805160ff191683800117855562000186565b8280016001018555821562000186579182015b828111156200018657825182559160200191906001019062000169565b506200019492915062000198565b5090565b5b8082111562000194576000815560010162000199565b634e487b7160e01b600052604160045260246000fd5b80516001600160a01b0381168114620001dd57600080fd5b919050565b600080600080600080600060e0888a031215620001fe57600080fd5b87516001600160401b03808211156200021657600080fd5b818a0191508a601f8301126200022b57600080fd5b815181811115620002405762000240620001af565b604051601f8201601f19908116603f011681019083821181831017156200026b576200026b620001af565b81604052828152602093508d848487010111156200028857600080fd5b600091505b82821015620002ac57848201840151818301850152908301906200028d565b82821115620002be5760008484830101525b9a50620002d09150508a8201620001c5565b975050506040880151945060608801519350620002f060808901620001c5565b92506200030060a08901620001c5565b91506200031060c08901620001c5565b905092959891949750929550565b600181811c908216806200033357607f821691505b602082108114156200035557634e487b7160e01b600052602260045260246000fd5b50919050565b60805160a05160c05160e0516126e5620003d4600039600081816107f301528181610b8001528181610dab0152818161115e015281816116100152611ab801526000818161065d015261149f0152600081816103600152818161147901526117b401526000818161073101526114c801526126e56000f3fe60806040526004361061027d5760003560e01c80637dc0d1d01161014f578063c07473f6116100c1578063dd62ed3e1161007a578063dd62ed3e1461079b578063ddceafa9146107e1578063de0e9a3e14610815578063e5b824ec14610835578063f5c0b95f14610855578063fcb79a7e1461087557600080fd5b8063c07473f6146106df578063c18172c4146106ff578063c45a01551461071f578063d502562514610753578063d505accf14610768578063dcc7d4ad1461078857600080fd5b80639e4b5745116101135780639e4b574514610615578063a4c0ed361461062b578063a78135871461064b578063a9059cbb1461067f578063bf376c7a1461069f578063c028df06146106bf57600080fd5b80637dc0d1d0146105885780637dc2cd98146105a85780637ecebe00146105be5780638fd3ab80146105eb57806395d89b411461060057600080fd5b806332a7ae95116101f357806350e70d48116101ac57806350e70d48146104cd57806360918117146104f2578063648bf7741461050857806370a082311461052857806377e071ad146105485780637adbf9731461056857600080fd5b806332a7ae951461042357806332bc320b146104435780633644e515146104585780634000aea01461046d57806342966c681461048d57806345c8a62b146104ad57600080fd5b80631703a018116102455780631703a0181461034e57806318160ddd14610382578063198453541461039757806323b872dd146103b95780632a0a4ed5146103d9578063313ce567146103f757600080fd5b806306fdde03146102825780630832e470146102ad578063095ea7b3146102d15780630a81b2de146103015780630c6f0e5d14610316575b600080fd5b34801561028e57600080fd5b50610297610895565b6040516102a491906120ca565b60405180910390f35b3480156102b957600080fd5b506102c360045481565b6040519081526020016102a4565b3480156102dd57600080fd5b506102f16102ec3660046120f2565b61095c565b60405190151581526020016102a4565b34801561030d57600080fd5b506102c3610972565b34801561032257600080fd5b50600754610336906001600160a01b031681565b6040516001600160a01b0390911681526020016102a4565b34801561035a57600080fd5b506102c37f000000000000000000000000000000000000000000000000000000000000000081565b34801561038e57600080fd5b506002546102c3565b3480156103a357600080fd5b506103b76103b23660046120f2565b6109f0565b005b3480156103c557600080fd5b506102f16103d436600461211e565b610a9c565b3480156103e557600080fd5b506006546001600160a01b0316610336565b34801561040357600080fd5b506003546104119060ff1681565b60405160ff90911681526020016102a4565b34801561042f57600080fd5b506103b761043e36600461215f565b610b13565b34801561044f57600080fd5b506103b7610be0565b34801561046457600080fd5b506102c3610c1c565b34801561047957600080fd5b506102f161048836600461217c565b610c75565b34801561049957600080fd5b506103b76104a8366004612205565b610d06565b3480156104b957600080fd5b506103b76104c836600461215f565b610d67565b3480156104d957600080fd5b506003546103369061010090046001600160a01b031681565b3480156104fe57600080fd5b506102c360085481565b34801561051457600080fd5b506103b761052336600461221e565b610da0565b34801561053457600080fd5b506102c361054336600461215f565b610dfb565b34801561055457600080fd5b506102c361056336600461215f565b610e1f565b34801561057457600080fd5b506103b761058336600461215f565b610f04565b34801561059457600080fd5b50600654610336906001600160a01b031681565b3480156105b457600080fd5b5062ed4e006102c3565b3480156105ca57600080fd5b506102c36105d936600461215f565b60096020526000908152604090205481565b3480156105f757600080fd5b506103b7610fa0565b34801561060c57600080fd5b50610297610fad565b34801561062157600080fd5b50600454156102f1565b34801561063757600080fd5b506102f161064636600461217c565b61104e565b34801561065757600080fd5b506102c37f000000000000000000000000000000000000000000000000000000000000000081565b34801561068b57600080fd5b506102f161069a3660046120f2565b61108a565b3480156106ab57600080fd5b506103b76106ba3660046120f2565b61109d565b3480156106cb57600080fd5b50600554610336906001600160a01b031681565b3480156106eb57600080fd5b506102c36106fa36600461215f565b611142565b34801561070b57600080fd5b506103b761071a36600461215f565b611153565b34801561072b57600080fd5b506103367f000000000000000000000000000000000000000000000000000000000000000081565b34801561075f57600080fd5b506102976111a8565b34801561077457600080fd5b506103b7610783366004612268565b611236565b6103b76107963660046122d6565b611426565b3480156107a757600080fd5b506102c36107b636600461221e565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b3480156107ed57600080fd5b506103367f000000000000000000000000000000000000000000000000000000000000000081565b34801561082157600080fd5b506103b7610830366004612205565b6115d9565b34801561084157600080fd5b506103b761085036600461215f565b611605565b34801561086157600080fd5b506102f161087036600461230f565b61165a565b34801561088157600080fd5b506103b761089036600461221e565b611666565b60606000600360019054906101000a90046001600160a01b03166001600160a01b03166306fdde036040518163ffffffff1660e01b8152600401600060405180830381865afa1580156108ec573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610914919081019061235a565b90506109206004541590565b1561094b57806040516020016109369190612407565b60405160208183030381529060405291505090565b80604051602001610936919061242f565b60006109693384846116ae565b50600192915050565b6000600360019054906101000a90046001600160a01b03166001600160a01b0316633a98ef396040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109eb919061245d565b905090565b6006546001600160a01b03163314610a3c5760405162461bcd60e51b815260206004820152600a6024820152696e6f74206f7261636c6560b01b60448201526064015b60405180910390fd5b610a44610972565b81610a4e60025490565b610a58919061248c565b1115610a8e5760405162461bcd60e51b8152602060048201526005602482015264766f74657360d81b6044820152606401610a33565b610a988282611710565b5050565b6000610aa984848461187d565b6001600160a01b0384166000908152600160209081526040808320338452909152902054600160ff1b811015610b0857610ae383826124a4565b6001600160a01b03861660009081526001602090815260408083203384529091529020555b506001949350505050565b6006546001600160a01b03163314610b615760405162461bcd60e51b81526020600482015260116024820152703737ba1031b630b4b6903232b632ba32b960791b6044820152606401610a33565b6040516332a7ae9560e01b81526001600160a01b0382811660048301527f000000000000000000000000000000000000000000000000000000000000000016906332a7ae95906024015b600060405180830381600087803b158015610bc557600080fd5b505af1158015610bd9573d6000803e3d6000fd5b5050505050565b6005546001600160a01b03163314610c0a5760405162461bcd60e51b8152600401610a33906124bb565b600580546001600160a01b0319169055565b604080517f47e79534a245952e8b16893a336b85a3d9ea9fa8c573f3d803afb92a794692186020820152469181019190915230606082015260009060800160405160208183030381529060405280519060200120905090565b6000610c81858561108a565b8015610cfd5750604051635260769b60e11b81526001600160a01b0386169063a4c0ed3690610cba9033908890889088906004016124db565b6020604051808303816000875af1158015610cd9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cfd9190612523565b95945050505050565b610d1033826118e1565b6003546001600160a01b03610100909104166342966c68610d316004541590565b610d4757600454610d429084612545565b610d49565b825b6040518263ffffffff1660e01b8152600401610bab91815260200190565b6005546001600160a01b03163314610d915760405162461bcd60e51b8152600401610a33906124bb565b610d9d81600180611955565b50565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610de85760405162461bcd60e51b8152600401610a3390612564565b610a988282610df685610dfb565b61187d565b6001600160a01b03166000908152602081905260409020546001600160e01b031690565b600080610e2b836119b9565b90508015610e395792915050565b6000610e456004541590565b610e5157600454610e54565b60015b6003549091506001600160a01b03858116610100909204161415610e79579392505050565b6003546040516377e071ad60e01b81526001600160a01b0386811660048301528392610100900416906377e071ad90602401602060405180830381865afa158015610ec8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eec919061245d565b610ef69190612545565b949350505050565b50919050565b6006546001600160a01b03163314610f4b5760405162461bcd60e51b815260206004820152600a6024820152696e6f74206f7261636c6560b01b6044820152606401610a33565b600680546001600160a01b0319166001600160a01b0383169081179091556040519081527fc3977c9522c218453912bcab15964a7788968fbf3fe4d4e2965252c9f07055de906020015b60405180910390a150565b610fab336000611710565b565b6060600360019054906101000a90046001600160a01b03166001600160a01b03166395d89b416040518163ffffffff1660e01b8152600401600060405180830381865afa158015611002573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261102a919081019061235a565b60405160200161103a919061258a565b604051602081830303815290604052905090565b60035460009061010090046001600160a01b031633146110805760405162461bcd60e51b8152600401610a33906124bb565b610b0885856119ff565b60006110968383611a6b565b9392505050565b6003546040516323b872dd60e01b8152336004820152306024820152604481018390526101009091046001600160a01b0316906323b872dd906064016020604051808303816000875af11580156110f8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061111c9190612523565b6111385760405162461bcd60e51b8152600401610a33906125af565b610a9882826119ff565b600061114d82610dfb565b92915050565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461119b5760405162461bcd60e51b8152600401610a3390612564565b610d9d81600a6001611955565b600a80546111b5906125d1565b80601f01602080910402602001604051908101604052809291908181526020018280546111e1906125d1565b801561122e5780601f106112035761010080835404028352916020019161122e565b820191906000526020600020905b81548152906001019060200180831161121157829003601f168201915b505050505081565b428410156112865760405162461bcd60e51b815260206004820152601760248201527f5045524d49545f444541444c494e455f455850495245440000000000000000006044820152606401610a33565b60006001611292610c1c565b6001600160a01b038a811660008181526009602090815260409182902080546001810190915582517f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98184015280840194909452938d166060840152608083018c905260a083019390935260c08083018b90528151808403909101815260e08301909152805192019190912061190160f01b6101008301526101028201929092526101228101919091526101420160408051601f198184030181528282528051602091820120600084529083018083525260ff871690820152606081018590526080810184905260a0016020604051602081039080840390855afa15801561139e573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116158015906113d45750876001600160a01b0316816001600160a01b0316145b6114115760405162461bcd60e51b815260206004820152600e60248201526d24a72b20a624a22fa9a4a3a722a960911b6044820152606401610a33565b61141c8188886116ae565b5050505050505050565b600454156114465760405162461bcd60e51b8152600401610a3390612606565b604051634dc5e43160e01b815260048101849052336024820152604481018390526001600160a01b0382811660648301527f000000000000000000000000000000000000000000000000000000000000000060848301527f000000000000000000000000000000000000000000000000000000000000000060a48301526000917f000000000000000000000000000000000000000000000000000000000000000090911690634dc5e43190349060c40160206040518083038185885af1158015611514573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906115399190612626565b905061154f6005546001600160a01b0316151590565b156115b457600554604051637b64620f60e11b81526001600160a01b0383811660048301529091169063f6c8c41e90602401600060405180830381600087803b15801561159b57600080fd5b505af11580156115af573d6000803e3d6000fd5b505050505b600580546001600160a01b0319166001600160a01b0392909216919091179055505050565b6004546115f85760405162461bcd60e51b8152600401610a3390612606565b610d9d3382600454611b25565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461164d5760405162461bcd60e51b8152600401610a3390612564565b610d9d81600a6000611955565b60006110968383611be0565b6005546001600160a01b031633146116905760405162461bcd60e51b8152600401610a33906124bb565b6116a48261169d84610dfb565b6001611b25565b610a988183611c20565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b600061171b83610dfb565b611725908361248c565b90506000611731610972565b90508082111561176b5760405162461bcd60e51b8152602060048201526005602482015264766f74657360d81b6044820152606401610a33565b6005546001600160a01b0316156117af5760405162461bcd60e51b815260206004820152600860248201526737379037b33332b960c11b6044820152606401610a33565b6117d97f000000000000000000000000000000000000000000000000000000000000000082612545565b6117e561271084612545565b101561181c5760405162461bcd60e51b815260206004820152600660248201526571756f72756d60d01b6044820152606401610a33565b6118268485611c20565b604080516001600160a01b038616815260208101849052908101849052606081018290527f85e5711a70a7d2bae18e1232af474d82c98600b0e62fe079a28208520b58568e9060800160405180910390a150505050565b611888838383611de3565b6118928382611dee565b61189c8282611e84565b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405161170391815260200190565b6118ed82600083611de3565b80600260008282546118ff91906124a4565b9091555061190f90508282611dee565b6040518181526000906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906020015b60405180910390a35050565b60006119628360e0612643565b6001600160a01b038516600090815260208190526040902054600160ff929092169190911b9150808216821483151514610bd9576001600160a01b0394909416600090815260208190526040902093189092555050565b60006001600160a01b0382163014156119d457506001919050565b6007546001600160a01b03838116911614156119f257505060085490565b506000919050565b919050565b611a0b60008383611de3565b8060026000828254611a1d919061248c565b90915550611a2d90508282611e84565b6040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90602001611949565b6000611a778383611f34565b611a935760405162461bcd60e51b8152600401610a33906125af565b611a9e33600a611be0565b15610969576040516304d301a360e41b81523360048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690634d301a3090602401600060405180830381600087803b158015611b0457600080fd5b505af1158015611b18573d6000803e3d6000fd5b5050505050600192915050565b611b2f83836118e1565b60035461010090046001600160a01b031663a9059cbb84611b508486612545565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015611b9b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bbf9190612523565b611bdb5760405162461bcd60e51b8152600401610a33906125af565b505050565b600080611bee8360e0612643565b6001600160a01b038516600090815260208190526040902054600160ff929092169190911b9081161491505092915050565b60045415611c405760405162461bcd60e51b8152600401610a3390612606565b6003546040516370a0823160e01b81523060048201526101009091046001600160a01b03169063a9059cbb90839083906370a0823190602401602060405180830381865afa158015611c96573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cba919061245d565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015611d05573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d299190612523565b611d455760405162461bcd60e51b8152600401610a33906125af565b60038054610100600160a81b0319166101006001600160a01b03851602179055600254610a98906040516370a0823160e01b81523060048201526001600160a01b038516906370a0823190602401602060405180830381865afa158015611db0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611dd4919061245d565b611dde9190612668565b611f41565b611bdb838383611fa6565b6001600160a01b03821660009081526020819052604081205490611e1283836124a4565b90506001600160e01b031981166001600160e01b0319831614611e635760405162461bcd60e51b8152602060048201526009602482015268756e646572666c6f7760b81b6044820152606401610a33565b6001600160a01b039093166000908152602081905260409020929092555050565b6001600160a01b038216611ec05760405162461bcd60e51b815260206004820152600360248201526203078360ec1b6044820152606401610a33565b6001600160a01b03821660009081526020819052604081205490611ee4838361248c565b90506001600160e01b031981166001600160e01b0319831614611e635760405162461bcd60e51b81526020600482015260086024820152676f766572666c6f7760c01b6044820152606401610a33565b600061096933848461187d565b6001811015611f625760405162461bcd60e51b8152600401610a3390612606565b60048190557f6c20b91d1723b78732eba64ff11ebd7966a6e4af568a00fa4f6b72c20f58b02a611f90610895565b611f98610fad565b604051610f9592919061268a565b611faf83612061565b80611fbe5750611fbe82612061565b15611bdb576005546001600160a01b0316156120475760055460405163e1a1810f60e01b81526001600160a01b0385811660048301528481166024830152604482018490529091169063e1a1810f90606401600060405180830381600087803b15801561202a57600080fd5b505af115801561203e573d6000803e3d6000fd5b50505050505050565b6120548360016000611955565b611bdb8260016000611955565b600061114d826001611be0565b60005b83811015612089578181015183820152602001612071565b83811115612098576000848401525b50505050565b600081518084526120b681602086016020860161206e565b601f01601f19169290920160200192915050565b602081526000611096602083018461209e565b6001600160a01b0381168114610d9d57600080fd5b6000806040838503121561210557600080fd5b8235612110816120dd565b946020939093013593505050565b60008060006060848603121561213357600080fd5b833561213e816120dd565b9250602084013561214e816120dd565b929592945050506040919091013590565b60006020828403121561217157600080fd5b8135611096816120dd565b6000806000806060858703121561219257600080fd5b843561219d816120dd565b935060208501359250604085013567ffffffffffffffff808211156121c157600080fd5b818701915087601f8301126121d557600080fd5b8135818111156121e457600080fd5b8860208285010111156121f657600080fd5b95989497505060200194505050565b60006020828403121561221757600080fd5b5035919050565b6000806040838503121561223157600080fd5b823561223c816120dd565b9150602083013561224c816120dd565b809150509250929050565b803560ff811681146119fa57600080fd5b600080600080600080600060e0888a03121561228357600080fd5b873561228e816120dd565b9650602088013561229e816120dd565b955060408801359450606088013593506122ba60808901612257565b925060a0880135915060c0880135905092959891949750929550565b6000806000606084860312156122eb57600080fd5b83359250602084013591506040840135612304816120dd565b809150509250925092565b6000806040838503121561232257600080fd5b823561232d816120dd565b915061233b60208401612257565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b60006020828403121561236c57600080fd5b815167ffffffffffffffff8082111561238457600080fd5b818401915084601f83011261239857600080fd5b8151818111156123aa576123aa612344565b604051601f8201601f19908116603f011681019083821181831017156123d2576123d2612344565b816040528281528760208487010111156123eb57600080fd5b6123fc83602083016020880161206e565b979650505050505050565b6000825161241981846020870161206e565b632053484160e01b920191825250600401919050565b6000825161244181846020870161206e565b692028577261707065642960b01b920191825250600a01919050565b60006020828403121561246f57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b6000821982111561249f5761249f612476565b500190565b6000828210156124b6576124b6612476565b500390565b60208082526006908201526539b2b73232b960d11b604082015260600190565b6001600160a01b0385168152602081018490526060604082018190528101829052818360808301376000818301608090810191909152601f909201601f191601019392505050565b60006020828403121561253557600080fd5b8151801515811461109657600080fd5b600081600019048311821515161561255f5761255f612476565b500290565b6020808252600c908201526b6e6f74207265636f7665727960a01b604082015260600190565b6000825161259c81846020870161206e565b605360f81b920191825250600101919050565b6020808252600890820152673a3930b739b332b960c11b604082015260600190565b600181811c908216806125e557607f821691505b60208210811415610efe57634e487b7160e01b600052602260045260246000fd5b6020808252600690820152653330b1ba37b960d11b604082015260600190565b60006020828403121561263857600080fd5b8151611096816120dd565b600060ff821660ff84168060ff0382111561266057612660612476565b019392505050565b60008261268557634e487b7160e01b600052601260045260246000fd5b500490565b60408152600061269d604083018561209e565b8281036020840152610cfd818561209e56fea2646970667358221220b2881ae9ff941bbe82da4ac1ed423c42c9b8ada1dd4374e1f0758a9366b7fbf364736f6c634300080c003300000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000de9b911a2c3984ba956ae2415a3e938aac840e130000000000000000000000000000000000000000000000000000000000001d4c00000000000000000000000000000000000000000000000000000000004f1a00000000000000000000000000f00b91839ff7a6ac6dddac7e73d2f222c19a9ec30000000000000000000000006c4028d7fd82f29cd97a47e7342f02ca529c553100000000000000000000000042ad6513979694794947475f82eb5e3d74d0c4cd000000000000000000000000000000000000000000000000000000000000003168747470733a2f2f7777772e73706f72747370617261646973652e63682f706167652f63726f7764696e76657374696e67000000000000000000000000000000

Deployed Bytecode

0x60806040526004361061027d5760003560e01c80637dc0d1d01161014f578063c07473f6116100c1578063dd62ed3e1161007a578063dd62ed3e1461079b578063ddceafa9146107e1578063de0e9a3e14610815578063e5b824ec14610835578063f5c0b95f14610855578063fcb79a7e1461087557600080fd5b8063c07473f6146106df578063c18172c4146106ff578063c45a01551461071f578063d502562514610753578063d505accf14610768578063dcc7d4ad1461078857600080fd5b80639e4b5745116101135780639e4b574514610615578063a4c0ed361461062b578063a78135871461064b578063a9059cbb1461067f578063bf376c7a1461069f578063c028df06146106bf57600080fd5b80637dc0d1d0146105885780637dc2cd98146105a85780637ecebe00146105be5780638fd3ab80146105eb57806395d89b411461060057600080fd5b806332a7ae95116101f357806350e70d48116101ac57806350e70d48146104cd57806360918117146104f2578063648bf7741461050857806370a082311461052857806377e071ad146105485780637adbf9731461056857600080fd5b806332a7ae951461042357806332bc320b146104435780633644e515146104585780634000aea01461046d57806342966c681461048d57806345c8a62b146104ad57600080fd5b80631703a018116102455780631703a0181461034e57806318160ddd14610382578063198453541461039757806323b872dd146103b95780632a0a4ed5146103d9578063313ce567146103f757600080fd5b806306fdde03146102825780630832e470146102ad578063095ea7b3146102d15780630a81b2de146103015780630c6f0e5d14610316575b600080fd5b34801561028e57600080fd5b50610297610895565b6040516102a491906120ca565b60405180910390f35b3480156102b957600080fd5b506102c360045481565b6040519081526020016102a4565b3480156102dd57600080fd5b506102f16102ec3660046120f2565b61095c565b60405190151581526020016102a4565b34801561030d57600080fd5b506102c3610972565b34801561032257600080fd5b50600754610336906001600160a01b031681565b6040516001600160a01b0390911681526020016102a4565b34801561035a57600080fd5b506102c37f0000000000000000000000000000000000000000000000000000000000001d4c81565b34801561038e57600080fd5b506002546102c3565b3480156103a357600080fd5b506103b76103b23660046120f2565b6109f0565b005b3480156103c557600080fd5b506102f16103d436600461211e565b610a9c565b3480156103e557600080fd5b506006546001600160a01b0316610336565b34801561040357600080fd5b506003546104119060ff1681565b60405160ff90911681526020016102a4565b34801561042f57600080fd5b506103b761043e36600461215f565b610b13565b34801561044f57600080fd5b506103b7610be0565b34801561046457600080fd5b506102c3610c1c565b34801561047957600080fd5b506102f161048836600461217c565b610c75565b34801561049957600080fd5b506103b76104a8366004612205565b610d06565b3480156104b957600080fd5b506103b76104c836600461215f565b610d67565b3480156104d957600080fd5b506003546103369061010090046001600160a01b031681565b3480156104fe57600080fd5b506102c360085481565b34801561051457600080fd5b506103b761052336600461221e565b610da0565b34801561053457600080fd5b506102c361054336600461215f565b610dfb565b34801561055457600080fd5b506102c361056336600461215f565b610e1f565b34801561057457600080fd5b506103b761058336600461215f565b610f04565b34801561059457600080fd5b50600654610336906001600160a01b031681565b3480156105b457600080fd5b5062ed4e006102c3565b3480156105ca57600080fd5b506102c36105d936600461215f565b60096020526000908152604090205481565b3480156105f757600080fd5b506103b7610fa0565b34801561060c57600080fd5b50610297610fad565b34801561062157600080fd5b50600454156102f1565b34801561063757600080fd5b506102f161064636600461217c565b61104e565b34801561065757600080fd5b506102c37f00000000000000000000000000000000000000000000000000000000004f1a0081565b34801561068b57600080fd5b506102f161069a3660046120f2565b61108a565b3480156106ab57600080fd5b506103b76106ba3660046120f2565b61109d565b3480156106cb57600080fd5b50600554610336906001600160a01b031681565b3480156106eb57600080fd5b506102c36106fa36600461215f565b611142565b34801561070b57600080fd5b506103b761071a36600461215f565b611153565b34801561072b57600080fd5b506103367f0000000000000000000000006c4028d7fd82f29cd97a47e7342f02ca529c553181565b34801561075f57600080fd5b506102976111a8565b34801561077457600080fd5b506103b7610783366004612268565b611236565b6103b76107963660046122d6565b611426565b3480156107a757600080fd5b506102c36107b636600461221e565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b3480156107ed57600080fd5b506103367f000000000000000000000000f00b91839ff7a6ac6dddac7e73d2f222c19a9ec381565b34801561082157600080fd5b506103b7610830366004612205565b6115d9565b34801561084157600080fd5b506103b761085036600461215f565b611605565b34801561086157600080fd5b506102f161087036600461230f565b61165a565b34801561088157600080fd5b506103b761089036600461221e565b611666565b60606000600360019054906101000a90046001600160a01b03166001600160a01b03166306fdde036040518163ffffffff1660e01b8152600401600060405180830381865afa1580156108ec573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610914919081019061235a565b90506109206004541590565b1561094b57806040516020016109369190612407565b60405160208183030381529060405291505090565b80604051602001610936919061242f565b60006109693384846116ae565b50600192915050565b6000600360019054906101000a90046001600160a01b03166001600160a01b0316633a98ef396040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109eb919061245d565b905090565b6006546001600160a01b03163314610a3c5760405162461bcd60e51b815260206004820152600a6024820152696e6f74206f7261636c6560b01b60448201526064015b60405180910390fd5b610a44610972565b81610a4e60025490565b610a58919061248c565b1115610a8e5760405162461bcd60e51b8152602060048201526005602482015264766f74657360d81b6044820152606401610a33565b610a988282611710565b5050565b6000610aa984848461187d565b6001600160a01b0384166000908152600160209081526040808320338452909152902054600160ff1b811015610b0857610ae383826124a4565b6001600160a01b03861660009081526001602090815260408083203384529091529020555b506001949350505050565b6006546001600160a01b03163314610b615760405162461bcd60e51b81526020600482015260116024820152703737ba1031b630b4b6903232b632ba32b960791b6044820152606401610a33565b6040516332a7ae9560e01b81526001600160a01b0382811660048301527f000000000000000000000000f00b91839ff7a6ac6dddac7e73d2f222c19a9ec316906332a7ae95906024015b600060405180830381600087803b158015610bc557600080fd5b505af1158015610bd9573d6000803e3d6000fd5b5050505050565b6005546001600160a01b03163314610c0a5760405162461bcd60e51b8152600401610a33906124bb565b600580546001600160a01b0319169055565b604080517f47e79534a245952e8b16893a336b85a3d9ea9fa8c573f3d803afb92a794692186020820152469181019190915230606082015260009060800160405160208183030381529060405280519060200120905090565b6000610c81858561108a565b8015610cfd5750604051635260769b60e11b81526001600160a01b0386169063a4c0ed3690610cba9033908890889088906004016124db565b6020604051808303816000875af1158015610cd9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cfd9190612523565b95945050505050565b610d1033826118e1565b6003546001600160a01b03610100909104166342966c68610d316004541590565b610d4757600454610d429084612545565b610d49565b825b6040518263ffffffff1660e01b8152600401610bab91815260200190565b6005546001600160a01b03163314610d915760405162461bcd60e51b8152600401610a33906124bb565b610d9d81600180611955565b50565b336001600160a01b037f000000000000000000000000f00b91839ff7a6ac6dddac7e73d2f222c19a9ec31614610de85760405162461bcd60e51b8152600401610a3390612564565b610a988282610df685610dfb565b61187d565b6001600160a01b03166000908152602081905260409020546001600160e01b031690565b600080610e2b836119b9565b90508015610e395792915050565b6000610e456004541590565b610e5157600454610e54565b60015b6003549091506001600160a01b03858116610100909204161415610e79579392505050565b6003546040516377e071ad60e01b81526001600160a01b0386811660048301528392610100900416906377e071ad90602401602060405180830381865afa158015610ec8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eec919061245d565b610ef69190612545565b949350505050565b50919050565b6006546001600160a01b03163314610f4b5760405162461bcd60e51b815260206004820152600a6024820152696e6f74206f7261636c6560b01b6044820152606401610a33565b600680546001600160a01b0319166001600160a01b0383169081179091556040519081527fc3977c9522c218453912bcab15964a7788968fbf3fe4d4e2965252c9f07055de906020015b60405180910390a150565b610fab336000611710565b565b6060600360019054906101000a90046001600160a01b03166001600160a01b03166395d89b416040518163ffffffff1660e01b8152600401600060405180830381865afa158015611002573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261102a919081019061235a565b60405160200161103a919061258a565b604051602081830303815290604052905090565b60035460009061010090046001600160a01b031633146110805760405162461bcd60e51b8152600401610a33906124bb565b610b0885856119ff565b60006110968383611a6b565b9392505050565b6003546040516323b872dd60e01b8152336004820152306024820152604481018390526101009091046001600160a01b0316906323b872dd906064016020604051808303816000875af11580156110f8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061111c9190612523565b6111385760405162461bcd60e51b8152600401610a33906125af565b610a9882826119ff565b600061114d82610dfb565b92915050565b336001600160a01b037f000000000000000000000000f00b91839ff7a6ac6dddac7e73d2f222c19a9ec3161461119b5760405162461bcd60e51b8152600401610a3390612564565b610d9d81600a6001611955565b600a80546111b5906125d1565b80601f01602080910402602001604051908101604052809291908181526020018280546111e1906125d1565b801561122e5780601f106112035761010080835404028352916020019161122e565b820191906000526020600020905b81548152906001019060200180831161121157829003601f168201915b505050505081565b428410156112865760405162461bcd60e51b815260206004820152601760248201527f5045524d49545f444541444c494e455f455850495245440000000000000000006044820152606401610a33565b60006001611292610c1c565b6001600160a01b038a811660008181526009602090815260409182902080546001810190915582517f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98184015280840194909452938d166060840152608083018c905260a083019390935260c08083018b90528151808403909101815260e08301909152805192019190912061190160f01b6101008301526101028201929092526101228101919091526101420160408051601f198184030181528282528051602091820120600084529083018083525260ff871690820152606081018590526080810184905260a0016020604051602081039080840390855afa15801561139e573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116158015906113d45750876001600160a01b0316816001600160a01b0316145b6114115760405162461bcd60e51b815260206004820152600e60248201526d24a72b20a624a22fa9a4a3a722a960911b6044820152606401610a33565b61141c8188886116ae565b5050505050505050565b600454156114465760405162461bcd60e51b8152600401610a3390612606565b604051634dc5e43160e01b815260048101849052336024820152604481018390526001600160a01b0382811660648301527f0000000000000000000000000000000000000000000000000000000000001d4c60848301527f00000000000000000000000000000000000000000000000000000000004f1a0060a48301526000917f0000000000000000000000006c4028d7fd82f29cd97a47e7342f02ca529c553190911690634dc5e43190349060c40160206040518083038185885af1158015611514573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906115399190612626565b905061154f6005546001600160a01b0316151590565b156115b457600554604051637b64620f60e11b81526001600160a01b0383811660048301529091169063f6c8c41e90602401600060405180830381600087803b15801561159b57600080fd5b505af11580156115af573d6000803e3d6000fd5b505050505b600580546001600160a01b0319166001600160a01b0392909216919091179055505050565b6004546115f85760405162461bcd60e51b8152600401610a3390612606565b610d9d3382600454611b25565b336001600160a01b037f000000000000000000000000f00b91839ff7a6ac6dddac7e73d2f222c19a9ec3161461164d5760405162461bcd60e51b8152600401610a3390612564565b610d9d81600a6000611955565b60006110968383611be0565b6005546001600160a01b031633146116905760405162461bcd60e51b8152600401610a33906124bb565b6116a48261169d84610dfb565b6001611b25565b610a988183611c20565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b600061171b83610dfb565b611725908361248c565b90506000611731610972565b90508082111561176b5760405162461bcd60e51b8152602060048201526005602482015264766f74657360d81b6044820152606401610a33565b6005546001600160a01b0316156117af5760405162461bcd60e51b815260206004820152600860248201526737379037b33332b960c11b6044820152606401610a33565b6117d97f0000000000000000000000000000000000000000000000000000000000001d4c82612545565b6117e561271084612545565b101561181c5760405162461bcd60e51b815260206004820152600660248201526571756f72756d60d01b6044820152606401610a33565b6118268485611c20565b604080516001600160a01b038616815260208101849052908101849052606081018290527f85e5711a70a7d2bae18e1232af474d82c98600b0e62fe079a28208520b58568e9060800160405180910390a150505050565b611888838383611de3565b6118928382611dee565b61189c8282611e84565b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405161170391815260200190565b6118ed82600083611de3565b80600260008282546118ff91906124a4565b9091555061190f90508282611dee565b6040518181526000906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906020015b60405180910390a35050565b60006119628360e0612643565b6001600160a01b038516600090815260208190526040902054600160ff929092169190911b9150808216821483151514610bd9576001600160a01b0394909416600090815260208190526040902093189092555050565b60006001600160a01b0382163014156119d457506001919050565b6007546001600160a01b03838116911614156119f257505060085490565b506000919050565b919050565b611a0b60008383611de3565b8060026000828254611a1d919061248c565b90915550611a2d90508282611e84565b6040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90602001611949565b6000611a778383611f34565b611a935760405162461bcd60e51b8152600401610a33906125af565b611a9e33600a611be0565b15610969576040516304d301a360e41b81523360048201527f000000000000000000000000f00b91839ff7a6ac6dddac7e73d2f222c19a9ec36001600160a01b031690634d301a3090602401600060405180830381600087803b158015611b0457600080fd5b505af1158015611b18573d6000803e3d6000fd5b5050505050600192915050565b611b2f83836118e1565b60035461010090046001600160a01b031663a9059cbb84611b508486612545565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015611b9b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bbf9190612523565b611bdb5760405162461bcd60e51b8152600401610a33906125af565b505050565b600080611bee8360e0612643565b6001600160a01b038516600090815260208190526040902054600160ff929092169190911b9081161491505092915050565b60045415611c405760405162461bcd60e51b8152600401610a3390612606565b6003546040516370a0823160e01b81523060048201526101009091046001600160a01b03169063a9059cbb90839083906370a0823190602401602060405180830381865afa158015611c96573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cba919061245d565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015611d05573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d299190612523565b611d455760405162461bcd60e51b8152600401610a33906125af565b60038054610100600160a81b0319166101006001600160a01b03851602179055600254610a98906040516370a0823160e01b81523060048201526001600160a01b038516906370a0823190602401602060405180830381865afa158015611db0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611dd4919061245d565b611dde9190612668565b611f41565b611bdb838383611fa6565b6001600160a01b03821660009081526020819052604081205490611e1283836124a4565b90506001600160e01b031981166001600160e01b0319831614611e635760405162461bcd60e51b8152602060048201526009602482015268756e646572666c6f7760b81b6044820152606401610a33565b6001600160a01b039093166000908152602081905260409020929092555050565b6001600160a01b038216611ec05760405162461bcd60e51b815260206004820152600360248201526203078360ec1b6044820152606401610a33565b6001600160a01b03821660009081526020819052604081205490611ee4838361248c565b90506001600160e01b031981166001600160e01b0319831614611e635760405162461bcd60e51b81526020600482015260086024820152676f766572666c6f7760c01b6044820152606401610a33565b600061096933848461187d565b6001811015611f625760405162461bcd60e51b8152600401610a3390612606565b60048190557f6c20b91d1723b78732eba64ff11ebd7966a6e4af568a00fa4f6b72c20f58b02a611f90610895565b611f98610fad565b604051610f9592919061268a565b611faf83612061565b80611fbe5750611fbe82612061565b15611bdb576005546001600160a01b0316156120475760055460405163e1a1810f60e01b81526001600160a01b0385811660048301528481166024830152604482018490529091169063e1a1810f90606401600060405180830381600087803b15801561202a57600080fd5b505af115801561203e573d6000803e3d6000fd5b50505050505050565b6120548360016000611955565b611bdb8260016000611955565b600061114d826001611be0565b60005b83811015612089578181015183820152602001612071565b83811115612098576000848401525b50505050565b600081518084526120b681602086016020860161206e565b601f01601f19169290920160200192915050565b602081526000611096602083018461209e565b6001600160a01b0381168114610d9d57600080fd5b6000806040838503121561210557600080fd5b8235612110816120dd565b946020939093013593505050565b60008060006060848603121561213357600080fd5b833561213e816120dd565b9250602084013561214e816120dd565b929592945050506040919091013590565b60006020828403121561217157600080fd5b8135611096816120dd565b6000806000806060858703121561219257600080fd5b843561219d816120dd565b935060208501359250604085013567ffffffffffffffff808211156121c157600080fd5b818701915087601f8301126121d557600080fd5b8135818111156121e457600080fd5b8860208285010111156121f657600080fd5b95989497505060200194505050565b60006020828403121561221757600080fd5b5035919050565b6000806040838503121561223157600080fd5b823561223c816120dd565b9150602083013561224c816120dd565b809150509250929050565b803560ff811681146119fa57600080fd5b600080600080600080600060e0888a03121561228357600080fd5b873561228e816120dd565b9650602088013561229e816120dd565b955060408801359450606088013593506122ba60808901612257565b925060a0880135915060c0880135905092959891949750929550565b6000806000606084860312156122eb57600080fd5b83359250602084013591506040840135612304816120dd565b809150509250925092565b6000806040838503121561232257600080fd5b823561232d816120dd565b915061233b60208401612257565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b60006020828403121561236c57600080fd5b815167ffffffffffffffff8082111561238457600080fd5b818401915084601f83011261239857600080fd5b8151818111156123aa576123aa612344565b604051601f8201601f19908116603f011681019083821181831017156123d2576123d2612344565b816040528281528760208487010111156123eb57600080fd5b6123fc83602083016020880161206e565b979650505050505050565b6000825161241981846020870161206e565b632053484160e01b920191825250600401919050565b6000825161244181846020870161206e565b692028577261707065642960b01b920191825250600a01919050565b60006020828403121561246f57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b6000821982111561249f5761249f612476565b500190565b6000828210156124b6576124b6612476565b500390565b60208082526006908201526539b2b73232b960d11b604082015260600190565b6001600160a01b0385168152602081018490526060604082018190528101829052818360808301376000818301608090810191909152601f909201601f191601019392505050565b60006020828403121561253557600080fd5b8151801515811461109657600080fd5b600081600019048311821515161561255f5761255f612476565b500290565b6020808252600c908201526b6e6f74207265636f7665727960a01b604082015260600190565b6000825161259c81846020870161206e565b605360f81b920191825250600101919050565b6020808252600890820152673a3930b739b332b960c11b604082015260600190565b600181811c908216806125e557607f821691505b60208210811415610efe57634e487b7160e01b600052602260045260246000fd5b6020808252600690820152653330b1ba37b960d11b604082015260600190565b60006020828403121561263857600080fd5b8151611096816120dd565b600060ff821660ff84168060ff0382111561266057612660612476565b019392505050565b60008261268557634e487b7160e01b600052601260045260246000fd5b500490565b60408152600061269d604083018561209e565b8281036020840152610cfd818561209e56fea2646970667358221220b2881ae9ff941bbe82da4ac1ed423c42c9b8ada1dd4374e1f0758a9366b7fbf364736f6c634300080c0033

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

00000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000de9b911a2c3984ba956ae2415a3e938aac840e130000000000000000000000000000000000000000000000000000000000001d4c00000000000000000000000000000000000000000000000000000000004f1a00000000000000000000000000f00b91839ff7a6ac6dddac7e73d2f222c19a9ec30000000000000000000000006c4028d7fd82f29cd97a47e7342f02ca529c553100000000000000000000000042ad6513979694794947475f82eb5e3d74d0c4cd000000000000000000000000000000000000000000000000000000000000003168747470733a2f2f7777772e73706f72747370617261646973652e63682f706167652f63726f7764696e76657374696e67000000000000000000000000000000

-----Decoded View---------------
Arg [0] : _terms (string): https://www.sportsparadise.ch/page/crowdinvesting
Arg [1] : _wrappedToken (address): 0xDe9b911A2C3984bA956ae2415A3E938aaC840e13
Arg [2] : _quorumBps (uint256): 7500
Arg [3] : _votePeriodSeconds (uint256): 5184000
Arg [4] : _recoveryHub (address): 0xf00B91839fF7A6AC6DddAC7e73D2F222C19A9Ec3
Arg [5] : _offerFactory (address): 0x6c4028d7Fd82f29cD97A47E7342F02Ca529c5531
Arg [6] : _oracle (address): 0x42AD6513979694794947475f82eB5E3D74d0C4cD

-----Encoded View---------------
10 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000000000000000000000000000e0
Arg [1] : 000000000000000000000000de9b911a2c3984ba956ae2415a3e938aac840e13
Arg [2] : 0000000000000000000000000000000000000000000000000000000000001d4c
Arg [3] : 00000000000000000000000000000000000000000000000000000000004f1a00
Arg [4] : 000000000000000000000000f00b91839ff7a6ac6dddac7e73d2f222c19a9ec3
Arg [5] : 0000000000000000000000006c4028d7fd82f29cd97a47e7342f02ca529c5531
Arg [6] : 00000000000000000000000042ad6513979694794947475f82eb5e3d74d0c4cd
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000031
Arg [8] : 68747470733a2f2f7777772e73706f72747370617261646973652e63682f7061
Arg [9] : 67652f63726f7764696e76657374696e67000000000000000000000000000000


Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.