ETH Price: $3,086.98 (+0.82%)
Gas: 5 Gwei

Contract

0xCc4Fa8D650bb137515272f12276E259537E53242
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Value
Execute Meta Tx107353472020-08-26 9:48:161413 days ago1598435296IN
0xCc4Fa8D6...537E53242
0 ETH0.0106968857.7
Execute Meta Tx107352502020-08-26 9:28:061413 days ago1598434086IN
0xCc4Fa8D6...537E53242
0 ETH0.0103445255.7993448
Execute Meta Tx107330832020-08-26 1:30:031414 days ago1598405403IN
0xCc4Fa8D6...537E53242
0 ETH0.0098085264.9661688
Execute Meta Tx107210812020-08-24 5:01:551416 days ago1598245315IN
0xCc4Fa8D6...537E53242
0 ETH0.0110121166.6
Execute Meta Tx107207592020-08-24 3:50:271416 days ago1598241027IN
0xCc4Fa8D6...537E53242
0 ETH0.0109926964.40000029
Execute Meta Tx107200552020-08-24 1:10:251416 days ago1598231425IN
0xCc4Fa8D6...537E53242
0 ETH0.0079399560.4492902
Execute Meta Tx107200552020-08-24 1:10:251416 days ago1598231425IN
0xCc4Fa8D6...537E53242
0 ETH0.0091265760.4492902
Execute Meta Tx107136162020-08-23 1:29:411417 days ago1598146181IN
0xCc4Fa8D6...537E53242
0 ETH0.0109936872.81600029
Execute Meta Tx107029522020-08-21 10:10:071418 days ago1598004607IN
0xCc4Fa8D6...537E53242
0 ETH0.02859308195.36000059
Execute Meta Tx107029522020-08-21 10:10:071418 days ago1598004607IN
0xCc4Fa8D6...537E53242
0 ETH0.02949193195.36000059
Execute Meta Tx107005122020-08-21 1:00:541419 days ago1597971654IN
0xCc4Fa8D6...537E53242
0 ETH0.0147436297.68
Execute Meta Tx106956472020-08-20 7:16:191420 days ago1597907779IN
0xCc4Fa8D6...537E53242
0 ETH0.0097887372.20000026
Execute Meta Tx106956162020-08-20 7:10:341420 days ago1597907434IN
0xCc4Fa8D6...537E53242
0 ETH0.0124340684.71282335
Execute Meta Tx106956162020-08-20 7:10:341420 days ago1597907434IN
0xCc4Fa8D6...537E53242
0 ETH0.0103770476.55282308
Execute Meta Tx106947062020-08-20 3:46:221420 days ago1597895182IN
0xCc4Fa8D6...537E53242
0 ETH0.0199189897.14542464
Execute Meta Tx106876722020-08-19 1:51:331421 days ago1597801893IN
0xCc4Fa8D6...537E53242
0 ETH0.01187618101
Execute Meta Tx106876622020-08-19 1:50:001421 days ago1597801800IN
0xCc4Fa8D6...537E53242
0 ETH0.01582081104.8
Execute Meta Tx106833282020-08-18 10:07:401421 days ago1597745260IN
0xCc4Fa8D6...537E53242
0 ETH0.02042679108.00000029
Execute Meta Tx106830812020-08-18 9:10:461421 days ago1597741846IN
0xCc4Fa8D6...537E53242
0 ETH0.0184908792.28091164
Execute Meta Tx106818482020-08-18 4:36:311422 days ago1597725391IN
0xCc4Fa8D6...537E53242
0 ETH0.0142801294.59420032
Execute Meta Tx106701632020-08-16 8:53:321424 days ago1597568012IN
0xCc4Fa8D6...537E53242
0 ETH0.0123802782
Execute Meta Tx106591322020-08-14 16:07:241425 days ago1597421244IN
0xCc4Fa8D6...537E53242
0 ETH0.01510365100.0493958
Execute Meta Tx106526282020-08-13 16:15:321426 days ago1597335332IN
0xCc4Fa8D6...537E53242
0 ETH0.02436801161.40000022
Execute Meta Tx106522442020-08-13 14:46:201426 days ago1597329980IN
0xCc4Fa8D6...537E53242
0 ETH0.0231869185.62
Execute Meta Tx106480902020-08-12 23:24:041427 days ago1597274644IN
0xCc4Fa8D6...537E53242
0 ETH0.03488785231.10357142
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
QuotaTransfers

Compiler Version
v0.6.6+commit.6c089d02

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, None license

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2020-06-13
*/

/*

  Copyright 2017 Loopring Project Ltd (Loopring Foundation).

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
*/
pragma solidity ^0.6.6;
pragma experimental ABIEncoderV2;

/**
 * ENS Registry interface.
 */
interface ENSRegistry {
    // Logged when the owner of a node assigns a new owner to a subnode.
    event NewOwner(bytes32 indexed node, bytes32 indexed label, address owner);

    // Logged when the owner of a node transfers ownership to a new account.
    event Transfer(bytes32 indexed node, address owner);

    // Logged when the resolver for a node changes.
    event NewResolver(bytes32 indexed node, address resolver);

    // Logged when the TTL of a node changes
    event NewTTL(bytes32 indexed node, uint64 ttl);

    function setSubnodeOwner(bytes32 node, bytes32 label, address owner) external;
    function setResolver(bytes32 node, address resolver) external;
    function setOwner(bytes32 node, address owner) external;
    function setTTL(bytes32 node, uint64 ttl) external;
    function owner(bytes32 node) external view returns (address);
    function resolver(bytes32 node) external view returns (address);
    function ttl(bytes32 node) external view returns (uint64);
}


/**
 * ENS Resolver interface.
 */
abstract contract ENSResolver {
    function addr(bytes32 _node) public view virtual returns (address);
    function setAddr(bytes32 _node, address _addr) public virtual;
    function name(bytes32 _node) public view virtual returns (string memory);
    function setName(bytes32 _node, string memory _name) public virtual;
}

/**
 * ENS Reverse Registrar interface.
 */
abstract contract ENSReverseRegistrar {
    function claim(address _owner) public virtual returns (bytes32 _node);
    function claimWithResolver(address _owner, address _resolver) public virtual returns (bytes32);
    function setName(string memory _name) public virtual returns (bytes32);
    function node(address _addr) public view virtual returns (bytes32);
}
/*

  Copyright 2017 Loopring Project Ltd (Loopring Foundation).

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
*/



/// @title Wallet
/// @dev Base contract for smart wallets.
///      Sub-contracts must NOT use non-default constructor to initialize
///      wallet states, instead, `init` shall be used. This is to enable
///      proxies to be deployed in front of the real wallet contract for
///      saving gas.
///
/// @author Daniel Wang - <[email protected]>
///
/// The design of this contract is inspired by Argent's contract codebase:
/// https://github.com/argentlabs/argent-contracts
interface Wallet
{
    function owner() external view returns (address);

    /// @dev Set a new owner.
    function setOwner(address newOwner) external;

    /// @dev Set up this wallet by assigning an original owner and a
    ///      list of initial modules. For each module, its `init` method
    ///      will be called with `address(this)` as the parameter.
    ///
    ///      Note that calling this method more than once will throw.
    ///
    /// @param _controller The Controller instance.
    /// @param _owner The owner of this wallet, must not be address(0).
    /// @param _boostrapModule The bootstrap module.
    function setup(address _controller, address _owner, address _boostrapModule) external;

    /// @dev Adds a new module. The `init` method of the module
    ///      will be called with `address(this)` as the parameter.
    ///      This method must throw if the module has already been added.
    /// @param _module The module's address.
    function addModule(address _module) external;

    /// @dev Removes an existing module. This method must throw if the module
    ///      has NOT been added or the module is the wallet's only module.
    /// @param _module The module's address.
    function removeModule(address _module) external;

    /// @dev Checks if a module has been added to this wallet.
    /// @param _module The module to check.
    /// @return True if the module exists; False otherwise.
    function hasModule(address _module) external view returns (bool);

    /// @dev Binds a method from the given module to this
    ///      wallet so the method can be invoked using this wallet's default
    ///      function.
    ///      Note that this method must throw when the given module has
    ///      not been added to this wallet.
    /// @param _method The method's 4-byte selector.
    /// @param _module The module's address. Use address(0) to unbind the method.
    function bindMethod(bytes4 _method, address _module) external;

    /// @dev Returns the module the given method has been bound to.
    /// @param _method The method's 4-byte selector.
    /// @return _module The address of the bound module. If no binding exists,
    ///                 returns address(0) instead.
    function boundMethodModule(bytes4 _method) external view returns (address _module);

    /// @dev Performs generic transactions. Any module that has been added to this
    ///      wallet can use this method to transact on any third-party contract with
    ///      msg.sender as this wallet itself.
    ///
    ///      This method will emit `Transacted` event if it doesn't throw.
    ///
    ///      Note: this method must ONLY allow invocations from a module that has
    ///      been added to this wallet. The wallet owner shall NOT be permitted
    ///      to call this method directly.
    ///
    /// @param mode The transaction mode, 1 for CALL, 2 for DELEGATECALL.
    /// @param to The desitination address.
    /// @param value The amount of Ether to transfer.
    /// @param data The data to send over using `to.call{value: value}(data)`
    /// @return returnData The transaction's return value.
    function transact(
        uint8    mode,
        address  to,
        uint     value,
        bytes    calldata data
        )
        external
        returns (bytes memory returnData);
}
/*

  Copyright 2017 Loopring Project Ltd (Loopring Foundation).

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
*/



/// @title Ownable
/// @author Brecht Devos - <[email protected]>
/// @dev The Ownable contract has an owner address, and provides basic
///      authorization control functions, this simplifies the implementation of
///      "user permissions".
contract Ownable
{
    address public owner;

    event OwnershipTransferred(
        address indexed previousOwner,
        address indexed newOwner
    );

    /// @dev The Ownable constructor sets the original `owner` of the contract
    ///      to the sender.
    constructor()
        public
    {
        owner = msg.sender;
    }

    /// @dev Throws if called by any account other than the owner.
    modifier onlyOwner()
    {
        require(msg.sender == owner, "UNAUTHORIZED");
        _;
    }

    /// @dev Allows the current owner to transfer control of the contract to a
    ///      new owner.
    /// @param newOwner The address to transfer ownership to.
    function transferOwnership(
        address newOwner
        )
        public
        virtual
        onlyOwner
    {
        require(newOwner != address(0), "ZERO_ADDRESS");
        emit OwnershipTransferred(owner, newOwner);
        owner = newOwner;
    }

    function renounceOwnership()
        public
        onlyOwner
    {
        emit OwnershipTransferred(owner, address(0));
        owner = address(0);
    }
}

// Taken from Argent's code base - https://github.com/argentlabs/argent-contracts/blob/develop/contracts/ens/ENSConsumer.sol
// with few modifications.





/**
 * @title ENSConsumer
 * @dev Helper contract to resolve ENS names.
 * @author Julien Niset - <[email protected]>
 */
contract ENSConsumer {

    using strings for *;

    // namehash('addr.reverse')
    bytes32 constant public ADDR_REVERSE_NODE = 0x91d1777781884d03a6757a803996e38de2a42967fb37eeaca72729271025a9e2;

    // the address of the ENS registry
    address ensRegistry;

    /**
    * @dev No address should be provided when deploying on Mainnet to avoid storage cost. The
    * contract will use the hardcoded value.
    */
    constructor(address _ensRegistry) public {
        ensRegistry = _ensRegistry;
    }

    /**
    * @dev Resolves an ENS name to an address.
    * @param _node The namehash of the ENS name.
    */
    function resolveEns(bytes32 _node) public view returns (address) {
        address resolver = getENSRegistry().resolver(_node);
        return ENSResolver(resolver).addr(_node);
    }

    /**
    * @dev Gets the official ENS registry.
    */
    function getENSRegistry() public view returns (ENSRegistry) {
        return ENSRegistry(ensRegistry);
    }

    /**
    * @dev Gets the official ENS reverse registrar.
    */
    function getENSReverseRegistrar() public view returns (ENSReverseRegistrar) {
        return ENSReverseRegistrar(getENSRegistry().owner(ADDR_REVERSE_NODE));
    }
}
/*

  Copyright 2017 Loopring Project Ltd (Loopring Foundation).

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
*/



/// @title AddressSet
/// @author Daniel Wang - <[email protected]>
contract AddressSet
{
    struct Set
    {
        address[] addresses;
        mapping (address => uint) positions;
        uint count;
    }
    mapping (bytes32 => Set) private sets;

    function addAddressToSet(
        bytes32 key,
        address addr,
        bool maintainList
        ) internal
    {
        Set storage set = sets[key];
        require(set.positions[addr] == 0, "ALREADY_IN_SET");

        if (maintainList) {
            require(set.addresses.length == set.count, "PREVIOUSLY_NOT_MAINTAILED");
            set.addresses.push(addr);
        } else {
            require(set.addresses.length == 0, "MUST_MAINTAIN");
        }

        set.count += 1;
        set.positions[addr] = set.count;
    }

    function removeAddressFromSet(
        bytes32 key,
        address addr
        )
        internal
    {
        Set storage set = sets[key];
        uint pos = set.positions[addr];
        require(pos != 0, "NOT_IN_SET");

        delete set.positions[addr];
        set.count -= 1;

        if (set.addresses.length > 0) {
            address lastAddr = set.addresses[set.count];
            if (lastAddr != addr) {
                set.addresses[pos - 1] = lastAddr;
                set.positions[lastAddr] = pos;
            }
            set.addresses.pop();
        }
    }

    function removeSet(bytes32 key)
        internal
    {
        delete sets[key];
    }

    function isAddressInSet(
        bytes32 key,
        address addr
        )
        internal
        view
        returns (bool)
    {
        return sets[key].positions[addr] != 0;
    }

    function numAddressesInSet(bytes32 key)
        internal
        view
        returns (uint)
    {
        Set storage set = sets[key];
        return set.count;
    }

    function addressesInSet(bytes32 key)
        internal
        view
        returns (address[] memory)
    {
        Set storage set = sets[key];
        require(set.count == set.addresses.length, "NOT_MAINTAINED");
        return sets[key].addresses;
    }
}/*

  Copyright 2017 Loopring Project Ltd (Loopring Foundation).

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
*/



/// @title ERC20 Token Interface
/// @dev see https://github.com/ethereum/EIPs/issues/20
/// @author Daniel Wang - <[email protected]>
abstract contract ERC20
{
    function totalSupply()
        public
        view
        virtual
        returns (uint);

    function balanceOf(
        address who
        )
        public
        view
        virtual
        returns (uint);

    function allowance(
        address owner,
        address spender
        )
        public
        view
        virtual
        returns (uint);

    function transfer(
        address to,
        uint value
        )
        public
        virtual
        returns (bool);

    function transferFrom(
        address from,
        address to,
        uint    value
        )
        public
        virtual
        returns (bool);

    function approve(
        address spender,
        uint    value
        )
        public
        virtual
        returns (bool);
}
// Copied from https://eips.ethereum.org/EIPS/eip-1271.



abstract contract ERC1271 {

    // bytes4(keccak256("isValidSignature(bytes,bytes)")
    bytes4 constant internal MAGICVALUE = 0x20c13b0b;

    /**
     * @dev Should return whether the signature provided is valid for the provided data
     * @param _data Arbitrary length data signed on the behalf of address(this)
     * @param _signature Signature byte array associated with _data
     *
     * MUST return the bytes4 magic value 0x20c13b0b when function passes.
     * MUST NOT modify state (using STATICCALL for solc < 0.5, view modifier for solc > 0.5)
     * MUST allow external calls
     */
    function isValidSignature(
        bytes memory _data,
        bytes memory _signature)
        public
        view
        virtual
        returns (bytes4 magicValue);
}//Mainly taken from https://github.com/GNSPS/solidity-bytes-utils/blob/master/contracts/BytesLib.sol


library BytesUtil {
    function concat(
        bytes memory _preBytes,
        bytes memory _postBytes
    )
        internal
        pure
        returns (bytes memory)
    {
        bytes memory tempBytes;

        assembly {
            // Get a location of some free memory and store it in tempBytes as
            // Solidity does for memory variables.
            tempBytes := mload(0x40)

            // Store the length of the first bytes array at the beginning of
            // the memory for tempBytes.
            let length := mload(_preBytes)
            mstore(tempBytes, length)

            // Maintain a memory counter for the current write location in the
            // temp bytes array by adding the 32 bytes for the array length to
            // the starting location.
            let mc := add(tempBytes, 0x20)
            // Stop copying when the memory counter reaches the length of the
            // first bytes array.
            let end := add(mc, length)

            for {
                // Initialize a copy counter to the start of the _preBytes data,
                // 32 bytes into its memory.
                let cc := add(_preBytes, 0x20)
            } lt(mc, end) {
                // Increase both counters by 32 bytes each iteration.
                mc := add(mc, 0x20)
                cc := add(cc, 0x20)
            } {
                // Write the _preBytes data into the tempBytes memory 32 bytes
                // at a time.
                mstore(mc, mload(cc))
            }

            // Add the length of _postBytes to the current length of tempBytes
            // and store it as the new length in the first 32 bytes of the
            // tempBytes memory.
            length := mload(_postBytes)
            mstore(tempBytes, add(length, mload(tempBytes)))

            // Move the memory counter back from a multiple of 0x20 to the
            // actual end of the _preBytes data.
            mc := end
            // Stop copying when the memory counter reaches the new combined
            // length of the arrays.
            end := add(mc, length)

            for {
                let cc := add(_postBytes, 0x20)
            } lt(mc, end) {
                mc := add(mc, 0x20)
                cc := add(cc, 0x20)
            } {
                mstore(mc, mload(cc))
            }

            // Update the free-memory pointer by padding our last write location
            // to 32 bytes: add 31 bytes to the end of tempBytes to move to the
            // next 32 byte block, then round down to the nearest multiple of
            // 32. If the sum of the length of the two arrays is zero then add
            // one before rounding down to leave a blank 32 bytes (the length block with 0).
            mstore(0x40, and(
              add(add(end, iszero(add(length, mload(_preBytes)))), 31),
              not(31) // Round down to the nearest 32 bytes.
            ))
        }

        return tempBytes;
    }

    function concatStorage(bytes storage _preBytes, bytes memory _postBytes) internal {
        assembly {
            // Read the first 32 bytes of _preBytes storage, which is the length
            // of the array. (We don't need to use the offset into the slot
            // because arrays use the entire slot.)
            let fslot := sload(_preBytes_slot)
            // Arrays of 31 bytes or less have an even value in their slot,
            // while longer arrays have an odd value. The actual length is
            // the slot divided by two for odd values, and the lowest order
            // byte divided by two for even values.
            // If the slot is even, bitwise and the slot with 255 and divide by
            // two to get the length. If the slot is odd, bitwise and the slot
            // with -1 and divide by two.
            let slength := div(and(fslot, sub(mul(0x100, iszero(and(fslot, 1))), 1)), 2)
            let mlength := mload(_postBytes)
            let newlength := add(slength, mlength)
            // slength can contain both the length and contents of the array
            // if length < 32 bytes so let's prepare for that
            // v. http://solidity.readthedocs.io/en/latest/miscellaneous.html#layout-of-state-variables-in-storage
            switch add(lt(slength, 32), lt(newlength, 32))
            case 2 {
                // Since the new array still fits in the slot, we just need to
                // update the contents of the slot.
                // uint256(bytes_storage) = uint256(bytes_storage) + uint256(bytes_memory) + new_length
                sstore(
                    _preBytes_slot,
                    // all the modifications to the slot are inside this
                    // next block
                    add(
                        // we can just add to the slot contents because the
                        // bytes we want to change are the LSBs
                        fslot,
                        add(
                            mul(
                                div(
                                    // load the bytes from memory
                                    mload(add(_postBytes, 0x20)),
                                    // zero all bytes to the right
                                    exp(0x100, sub(32, mlength))
                                ),
                                // and now shift left the number of bytes to
                                // leave space for the length in the slot
                                exp(0x100, sub(32, newlength))
                            ),
                            // increase length by the double of the memory
                            // bytes length
                            mul(mlength, 2)
                        )
                    )
                )
            }
            case 1 {
                // The stored value fits in the slot, but the combined value
                // will exceed it.
                // get the keccak hash to get the contents of the array
                mstore(0x0, _preBytes_slot)
                let sc := add(keccak256(0x0, 0x20), div(slength, 32))

                // save new length
                sstore(_preBytes_slot, add(mul(newlength, 2), 1))

                // The contents of the _postBytes array start 32 bytes into
                // the structure. Our first read should obtain the `submod`
                // bytes that can fit into the unused space in the last word
                // of the stored array. To get this, we read 32 bytes starting
                // from `submod`, so the data we read overlaps with the array
                // contents by `submod` bytes. Masking the lowest-order
                // `submod` bytes allows us to add that value directly to the
                // stored value.

                let submod := sub(32, slength)
                let mc := add(_postBytes, submod)
                let end := add(_postBytes, mlength)
                let mask := sub(exp(0x100, submod), 1)

                sstore(
                    sc,
                    add(
                        and(
                            fslot,
                            0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00
                        ),
                        and(mload(mc), mask)
                    )
                )

                for {
                    mc := add(mc, 0x20)
                    sc := add(sc, 1)
                } lt(mc, end) {
                    sc := add(sc, 1)
                    mc := add(mc, 0x20)
                } {
                    sstore(sc, mload(mc))
                }

                mask := exp(0x100, sub(mc, end))

                sstore(sc, mul(div(mload(mc), mask), mask))
            }
            default {
                // get the keccak hash to get the contents of the array
                mstore(0x0, _preBytes_slot)
                // Start copying to the last used word of the stored array.
                let sc := add(keccak256(0x0, 0x20), div(slength, 32))

                // save new length
                sstore(_preBytes_slot, add(mul(newlength, 2), 1))

                // Copy over the first `submod` bytes of the new data as in
                // case 1 above.
                let slengthmod := mod(slength, 32)
                let mlengthmod := mod(mlength, 32)
                let submod := sub(32, slengthmod)
                let mc := add(_postBytes, submod)
                let end := add(_postBytes, mlength)
                let mask := sub(exp(0x100, submod), 1)

                sstore(sc, add(sload(sc), and(mload(mc), mask)))

                for {
                    sc := add(sc, 1)
                    mc := add(mc, 0x20)
                } lt(mc, end) {
                    sc := add(sc, 1)
                    mc := add(mc, 0x20)
                } {
                    sstore(sc, mload(mc))
                }

                mask := exp(0x100, sub(mc, end))

                sstore(sc, mul(div(mload(mc), mask), mask))
            }
        }
    }

    function slice(
        bytes memory _bytes,
        uint _start,
        uint _length
    )
        internal
        pure
        returns (bytes memory)
    {
        require(_bytes.length >= (_start + _length));

        bytes memory tempBytes;

        assembly {
            switch iszero(_length)
            case 0 {
                // Get a location of some free memory and store it in tempBytes as
                // Solidity does for memory variables.
                tempBytes := mload(0x40)

                // The first word of the slice result is potentially a partial
                // word read from the original array. To read it, we calculate
                // the length of that partial word and start copying that many
                // bytes into the array. The first word we copy will start with
                // data we don't care about, but the last `lengthmod` bytes will
                // land at the beginning of the contents of the new array. When
                // we're done copying, we overwrite the full first word with
                // the actual length of the slice.
                let lengthmod := and(_length, 31)

                // The multiplication in the next line is necessary
                // because when slicing multiples of 32 bytes (lengthmod == 0)
                // the following copy loop was copying the origin's length
                // and then ending prematurely not copying everything it should.
                let mc := add(add(tempBytes, lengthmod), mul(0x20, iszero(lengthmod)))
                let end := add(mc, _length)

                for {
                    // The multiplication in the next line has the same exact purpose
                    // as the one above.
                    let cc := add(add(add(_bytes, lengthmod), mul(0x20, iszero(lengthmod))), _start)
                } lt(mc, end) {
                    mc := add(mc, 0x20)
                    cc := add(cc, 0x20)
                } {
                    mstore(mc, mload(cc))
                }

                mstore(tempBytes, _length)

                //update free-memory pointer
                //allocating the array padded to 32 bytes like the compiler does now
                mstore(0x40, and(add(mc, 31), not(31)))
            }
            //if we want a zero-length slice let's just return a zero-length array
            default {
                tempBytes := mload(0x40)

                mstore(0x40, add(tempBytes, 0x20))
            }
        }

        return tempBytes;
    }

    function toAddress(bytes memory _bytes, uint _start) internal  pure returns (address) {
        require(_bytes.length >= (_start + 20));
        address tempAddress;

        assembly {
            tempAddress := div(mload(add(add(_bytes, 0x20), _start)), 0x1000000000000000000000000)
        }

        return tempAddress;
    }

    function toUint8(bytes memory _bytes, uint _start) internal  pure returns (uint8) {
        require(_bytes.length >= (_start + 1));
        uint8 tempUint;

        assembly {
            tempUint := mload(add(add(_bytes, 0x1), _start))
        }

        return tempUint;
    }

    function toUint16(bytes memory _bytes, uint _start) internal  pure returns (uint16) {
        require(_bytes.length >= (_start + 2));
        uint16 tempUint;

        assembly {
            tempUint := mload(add(add(_bytes, 0x2), _start))
        }

        return tempUint;
    }

    function toUint32(bytes memory _bytes, uint _start) internal  pure returns (uint32) {
        require(_bytes.length >= (_start + 4));
        uint32 tempUint;

        assembly {
            tempUint := mload(add(add(_bytes, 0x4), _start))
        }

        return tempUint;
    }

    function toUint64(bytes memory _bytes, uint _start) internal  pure returns (uint64) {
        require(_bytes.length >= (_start + 8));
        uint64 tempUint;

        assembly {
            tempUint := mload(add(add(_bytes, 0x8), _start))
        }

        return tempUint;
    }

    function toUint96(bytes memory _bytes, uint _start) internal  pure returns (uint96) {
        require(_bytes.length >= (_start + 12));
        uint96 tempUint;

        assembly {
            tempUint := mload(add(add(_bytes, 0xc), _start))
        }

        return tempUint;
    }

    function toUint128(bytes memory _bytes, uint _start) internal  pure returns (uint128) {
        require(_bytes.length >= (_start + 16));
        uint128 tempUint;

        assembly {
            tempUint := mload(add(add(_bytes, 0x10), _start))
        }

        return tempUint;
    }

    function toUint(bytes memory _bytes, uint _start) internal  pure returns (uint256) {
        require(_bytes.length >= (_start + 32));
        uint256 tempUint;

        assembly {
            tempUint := mload(add(add(_bytes, 0x20), _start))
        }

        return tempUint;
    }

    function toBytes4(bytes memory _bytes, uint _start) internal  pure returns (bytes4) {
        require(_bytes.length >= (_start + 4));
        bytes4 tempBytes4;

        assembly {
            tempBytes4 := mload(add(add(_bytes, 0x20), _start))
        }

        return tempBytes4;
    }

    function toBytes32(bytes memory _bytes, uint _start) internal  pure returns (bytes32) {
        require(_bytes.length >= (_start + 32));
        bytes32 tempBytes32;

        assembly {
            tempBytes32 := mload(add(add(_bytes, 0x20), _start))
        }

        return tempBytes32;
    }

    function equal(bytes memory _preBytes, bytes memory _postBytes) internal pure returns (bool) {
        bool success = true;

        assembly {
            let length := mload(_preBytes)

            // if lengths don't match the arrays are not equal
            switch eq(length, mload(_postBytes))
            case 1 {
                // cb is a circuit breaker in the for loop since there's
                //  no said feature for inline assembly loops
                // cb = 1 - don't breaker
                // cb = 0 - break
                let cb := 1

                let mc := add(_preBytes, 0x20)
                let end := add(mc, length)

                for {
                    let cc := add(_postBytes, 0x20)
                // the next line is the loop condition:
                // while(uint(mc < end) + cb == 2)
                } eq(add(lt(mc, end), cb), 2) {
                    mc := add(mc, 0x20)
                    cc := add(cc, 0x20)
                } {
                    // if any of these checks fails then arrays are not equal
                    if iszero(eq(mload(mc), mload(cc))) {
                        // unsuccess:
                        success := 0
                        cb := 0
                    }
                }
            }
            default {
                // unsuccess:
                success := 0
            }
        }

        return success;
    }

    function equalStorage(
        bytes storage _preBytes,
        bytes memory _postBytes
    )
        internal
        view
        returns (bool)
    {
        bool success = true;

        assembly {
            // we know _preBytes_offset is 0
            let fslot := sload(_preBytes_slot)
            // Decode the length of the stored array like in concatStorage().
            let slength := div(and(fslot, sub(mul(0x100, iszero(and(fslot, 1))), 1)), 2)
            let mlength := mload(_postBytes)

            // if lengths don't match the arrays are not equal
            switch eq(slength, mlength)
            case 1 {
                // slength can contain both the length and contents of the array
                // if length < 32 bytes so let's prepare for that
                // v. http://solidity.readthedocs.io/en/latest/miscellaneous.html#layout-of-state-variables-in-storage
                if iszero(iszero(slength)) {
                    switch lt(slength, 32)
                    case 1 {
                        // blank the last byte which is the length
                        fslot := mul(div(fslot, 0x100), 0x100)

                        if iszero(eq(fslot, mload(add(_postBytes, 0x20)))) {
                            // unsuccess:
                            success := 0
                        }
                    }
                    default {
                        // cb is a circuit breaker in the for loop since there's
                        //  no said feature for inline assembly loops
                        // cb = 1 - don't breaker
                        // cb = 0 - break
                        let cb := 1

                        // get the keccak hash to get the contents of the array
                        mstore(0x0, _preBytes_slot)
                        let sc := keccak256(0x0, 0x20)

                        let mc := add(_postBytes, 0x20)
                        let end := add(mc, mlength)

                        // the next line is the loop condition:
                        // while(uint(mc < end) + cb == 2)
                        for {} eq(add(lt(mc, end), cb), 2) {
                            sc := add(sc, 1)
                            mc := add(mc, 0x20)
                        } {
                            if iszero(eq(sload(sc), mload(mc))) {
                                // unsuccess:
                                success := 0
                                cb := 0
                            }
                        }
                    }
                }
            }
            default {
                // unsuccess:
                success := 0
            }
        }

        return success;
    }
}
/*

  Copyright 2017 Loopring Project Ltd (Loopring Foundation).

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
*/



/// @title Utility Functions for uint
/// @author Daniel Wang - <[email protected]>
library MathUint
{
    function mul(
        uint a,
        uint b
        )
        internal
        pure
        returns (uint c)
    {
        c = a * b;
        require(a == 0 || c / a == b, "MUL_OVERFLOW");
    }

    function sub(
        uint a,
        uint b
        )
        internal
        pure
        returns (uint)
    {
        require(b <= a, "SUB_UNDERFLOW");
        return a - b;
    }

    function add(
        uint a,
        uint b
        )
        internal
        pure
        returns (uint c)
    {
        c = a + b;
        require(c >= a, "ADD_OVERFLOW");
    }
}
/*

  Copyright 2017 Loopring Project Ltd (Loopring Foundation).

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
*/



/// @title Utility Functions for addresses
/// @author Daniel Wang - <[email protected]>
/// @author Brecht Devos - <[email protected]>
library AddressUtil
{
    using AddressUtil for *;

    function isContract(
        address addr
        )
        internal
        view
        returns (bool)
    {
        uint32 size;
        assembly { size := extcodesize(addr) }
        return (size > 0);
    }

    function toPayable(
        address addr
        )
        internal
        pure
        returns (address payable)
    {
        return address(uint160(addr));
    }

    // Works like address.send but with a customizable gas limit
    // Make sure your code is safe for reentrancy when using this function!
    function sendETH(
        address to,
        uint    amount,
        uint    gasLimit
        )
        internal
        returns (bool success)
    {
        if (amount == 0) {
            return true;
        }
        address payable recipient = to.toPayable();
        /* solium-disable-next-line */
        (success, ) = recipient.call{value: amount, gas: gasLimit}("");
    }

    // Works like address.transfer but with a customizable gas limit
    // Make sure your code is safe for reentrancy when using this function!
    function sendETHAndVerify(
        address to,
        uint    amount,
        uint    gasLimit
        )
        internal
        returns (bool success)
    {
        success = to.sendETH(amount, gasLimit);
        require(success, "TRANSFER_FAILURE");
    }
}
/*

  Copyright 2017 Loopring Project Ltd (Loopring Foundation).

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
*/





/// @title DataStore
/// @dev Modules share states by accessing the same storage instance.
///      Using ModuleStorage will achieve better module decoupling.
///
/// @author Daniel Wang - <[email protected]>
///
/// The design of this contract is inspired by Argent's contract codebase:
/// https://github.com/argentlabs/argent-contracts
contract DataStore
{
  modifier onlyWalletModule(address wallet)
    {
        require(Wallet(wallet).hasModule(msg.sender), "UNAUTHORIZED");
        _;
    }
}/*

  Copyright 2017 Loopring Project Ltd (Loopring Foundation).

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
*/




/*

  Copyright 2017 Loopring Project Ltd (Loopring Foundation).

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
*/



library Data
{
    struct Guardian
    {
        address  addr;
        uint     group;
        uint     validSince;
        uint     validUntil;
    }
}



/// @title SecurityStore
///
/// @author Daniel Wang - <[email protected]>
///
/// The design of this contract is inspired by Argent's contract codebase:
/// https://github.com/argentlabs/argent-contracts
contract SecurityStore is DataStore
{
    struct Wallet
    {
        address    inheritor;
        uint128    lastActive; // the latest timestamp the owner is considered to be active
        uint128    lock;
        address    lockedBy;   // the module that locked the wallet.

        Data.Guardian[]            guardians;
        mapping (address => uint)  guardianIdx;
    }

    mapping (address => Wallet) public wallets;

    constructor() public DataStore() {}

    function isGuardian(
        address wallet,
        address addr
        )
        public
        view
        returns (bool)
    {
        Data.Guardian memory guardian = getGuardian(wallet, addr);
        return guardian.addr != address(0) && isGuardianActive(guardian);
    }

    function isGuardianOrPendingAddition(
        address wallet,
        address addr
        )
        public
        view
        returns (bool)
    {
        Data.Guardian memory guardian = getGuardian(wallet, addr);
        return guardian.addr != address(0) && (isGuardianActive(guardian) || isGuardianPendingAddition(guardian));
    }

    function getGuardian(
        address wallet,
        address guardianAddr
        )
        public
        view
        returns (Data.Guardian memory)
    {
        uint index = wallets[wallet].guardianIdx[guardianAddr];
        if (index > 0) {
            return wallets[wallet].guardians[index-1];
        }
    }

    // @dev Returns active guardians.
    function guardians(address wallet)
        public
        view
        returns (Data.Guardian[] memory _guardians)
    {
        Wallet storage w = wallets[wallet];
        _guardians = new Data.Guardian[](w.guardians.length);
        uint index = 0;
        for (uint i = 0; i < w.guardians.length; i++) {
            Data.Guardian memory g = w.guardians[i];
            if (isGuardianActive(g)) {
                _guardians[index] = g;
                index ++;
            }
        }
        assembly { mstore(_guardians, index) }
    }

    // @dev Returns the number of active guardians.
    function numGuardians(address wallet)
        public
        view
        returns (uint count)
    {
        Wallet storage w = wallets[wallet];
        for (uint i = 0; i < w.guardians.length; i++) {
            if (isGuardianActive(w.guardians[i])) {
                count ++;
            }
        }
    }

    // @dev Returns guardians who are either active or pending addition.
    function guardiansWithPending(address wallet)
        public
        view
        returns (Data.Guardian[] memory _guardians)
    {
        Wallet storage w = wallets[wallet];
        _guardians = new Data.Guardian[](w.guardians.length);
        uint index = 0;
        for (uint i = 0; i < w.guardians.length; i++) {
            Data.Guardian memory g = w.guardians[i];
            if (isGuardianActive(g) || isGuardianPendingAddition(g)) {
                _guardians[index] = g;
                index ++;
            }
        }
        assembly { mstore(_guardians, index) }
    }

    // @dev Returns the number of guardians who are active or pending addition.
    function numGuardiansWithPending(address wallet)
        public
        view
        returns (uint count)
    {
        Wallet storage w = wallets[wallet];
        for (uint i = 0; i < w.guardians.length; i++) {
            Data.Guardian memory g = w.guardians[i];
            if (isGuardianActive(g) || isGuardianPendingAddition(g)) {
                count ++;
            }
        }
    }

    function addGuardian(
        address wallet,
        address guardianAddr,
        uint    group,
        uint    validSince
        )
        public
        onlyWalletModule(wallet)
    {
        cleanRemovedGuardians(wallet);

        require(guardianAddr != address(0), "ZERO_ADDRESS");
        Wallet storage w = wallets[wallet];

        uint pos = w.guardianIdx[guardianAddr];
        require(pos == 0, "GUARDIAN_EXISTS");

        // Add the new guardian
        Data.Guardian memory g = Data.Guardian(guardianAddr, group, validSince, 0);
        w.guardians.push(g);
        w.guardianIdx[guardianAddr] = w.guardians.length;
    }

    function cancelGuardianAddition(
        address wallet,
        address guardianAddr
        )
        public
        onlyWalletModule(wallet)
    {
        cleanRemovedGuardians(wallet);

        Wallet storage w = wallets[wallet];
        uint idx = w.guardianIdx[guardianAddr];
        require(idx > 0, "GUARDIAN_NOT_EXISTS");
        require(
            isGuardianPendingAddition(w.guardians[idx - 1]),
            "NOT_PENDING_ADDITION"
        );

        Data.Guardian memory lastGuardian = w.guardians[w.guardians.length - 1];
        if (guardianAddr != lastGuardian.addr) {
            w.guardians[idx - 1] = lastGuardian;
            w.guardianIdx[lastGuardian.addr] = idx;
        }
        w.guardians.pop();
        delete w.guardianIdx[guardianAddr];
    }

    function removeGuardian(
        address wallet,
        address guardianAddr,
        uint    validUntil
        )
        public
        onlyWalletModule(wallet)
    {
        cleanRemovedGuardians(wallet);

        Wallet storage w = wallets[wallet];
        uint idx = w.guardianIdx[guardianAddr];
        require(idx > 0, "GUARDIAN_NOT_EXISTS");

        w.guardians[idx - 1].validUntil = validUntil;
    }

    function removeAllGuardians(address wallet)
        public
        onlyWalletModule(wallet)
    {
         Wallet storage w = wallets[wallet];
         for (uint i = 0; i < w.guardians.length; i++) {
            delete w.guardianIdx[w.guardians[i].addr];
         }
         delete w.guardians;
    }

    function cancelGuardianRemoval(
        address wallet,
        address guardianAddr
        )
        public
        onlyWalletModule(wallet)
    {
        cleanRemovedGuardians(wallet);

        Wallet storage w = wallets[wallet];
        uint idx = w.guardianIdx[guardianAddr];
        require(idx > 0, "GUARDIAN_NOT_EXISTS");

        require(
            isGuardianPendingRemoval(w.guardians[idx - 1]),
            "NOT_PENDING_REMOVAL"
         );

        w.guardians[idx - 1].validUntil = 0;
    }

    function getLock(address wallet)
        public
        view
        returns (uint _lock, address _module)
    {
        _lock = uint(wallets[wallet].lock);
        _module = wallets[wallet].lockedBy;
    }

    function setLock(
        address wallet,
        uint    lock
        )
        public
        onlyWalletModule(wallet)
    {
        require(lock == 0 || lock > now, "INVALID_LOCK_TIME");
        uint128 _lock = uint128(lock);
        require(uint(_lock) == lock, "LOCK_TOO_LARGE");

        wallets[wallet].lock = _lock;
        wallets[wallet].lockedBy = msg.sender;
    }

    function touchLastActive(address wallet)
        public
        onlyWalletModule(wallet)
    {
        wallets[wallet].lastActive = uint128(now);
    }

    function inheritor(address wallet)
        public
        view
        returns (
            address who,
            uint    lastActive
        )
    {
        who = wallets[wallet].inheritor;
        lastActive = uint(wallets[wallet].lastActive);
    }

    function setInheritor(address wallet, address who)
        public
        onlyWalletModule(wallet)
    {
        wallets[wallet].inheritor = who;
        wallets[wallet].lastActive = uint128(now);
    }

    function cleanRemovedGuardians(address wallet)
        private
    {
        Wallet storage w = wallets[wallet];

        for (int i = int(w.guardians.length) - 1; i >= 0; i--) {
            Data.Guardian memory g = w.guardians[uint(i)];
            if (isGuardianExpired(g)) {
                Data.Guardian memory lastGuardian = w.guardians[w.guardians.length - 1];

                if (g.addr != lastGuardian.addr) {
                    w.guardians[uint(i)] = lastGuardian;
                    w.guardianIdx[lastGuardian.addr] = uint(i) + 1;
                }
                w.guardians.pop();
                delete w.guardianIdx[g.addr];
            }
        }
    }

    function isGuardianActive(Data.Guardian memory guardian)
        private
        view
        returns (bool)
    {
        return guardian.validSince > 0 && guardian.validSince <= now &&
            !isGuardianExpired(guardian);
    }

    function isGuardianPendingAddition(Data.Guardian memory guardian)
        private
        view
        returns (bool)
    {
        return guardian.validSince > now;
    }

    function isGuardianPendingRemoval(Data.Guardian memory guardian)
        private
        view
        returns (bool)
    {
        return guardian.validUntil > now;
    }

    function isGuardianExpired(Data.Guardian memory guardian)
        private
        view
        returns (bool)
    {
        return guardian.validUntil > 0 &&
            guardian.validUntil <= now;
    }

}
/*

  Copyright 2017 Loopring Project Ltd (Loopring Foundation).

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
*/



/// @title PriceOracle
abstract contract PriceOracle
{
    // @dev Return's the token's value in ETH
    function tokenValue(address token, uint amount)
        public
        view
        virtual
        returns (uint value);
}/*

  Copyright 2017 Loopring Project Ltd (Loopring Foundation).

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
*/


/*

  Copyright 2017 Loopring Project Ltd (Loopring Foundation).

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
*/



/// @title ModuleRegistry
/// @dev A registry for modules.
///
/// @author Daniel Wang - <[email protected]>
interface ModuleRegistry
{
    function registerModule(address module) external;
    function deregisterModule(address module) external;
    function isModuleRegistered(address module) external view returns (bool);
    function modules() external view returns (address[] memory _modules);
    function numOfModules() external view returns (uint);
}

/*

  Copyright 2017 Loopring Project Ltd (Loopring Foundation).

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
*/



/// @title WalletRegistry
/// @dev A registry for wallets.
/// @author Daniel Wang - <[email protected]>
interface WalletRegistry
{
    function registerWallet(address wallet) external;
    function isWalletRegistered(address addr) external view returns (bool);
    function numOfWallets() external view returns (uint);
}


/*

  Copyright 2017 Loopring Project Ltd (Loopring Foundation).

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
*/



/// @title Claimable
/// @author Brecht Devos - <[email protected]>
/// @dev Extension for the Ownable contract, where the ownership needs
///      to be claimed. This allows the new owner to accept the transfer.
contract Claimable is Ownable
{
    address public pendingOwner;

    /// @dev Modifier throws if called by any account other than the pendingOwner.
    modifier onlyPendingOwner() {
        require(msg.sender == pendingOwner, "UNAUTHORIZED");
        _;
    }

    /// @dev Allows the current owner to set the pendingOwner address.
    /// @param newOwner The address to transfer ownership to.
    function transferOwnership(
        address newOwner
        )
        public
        override
        onlyOwner
    {
        require(newOwner != address(0) && newOwner != owner, "INVALID_ADDRESS");
        pendingOwner = newOwner;
    }

    /// @dev Allows the pendingOwner address to finalize the transfer.
    function claimOwnership()
        public
        onlyPendingOwner
    {
        emit OwnershipTransferred(owner, pendingOwner);
        owner = pendingOwner;
        pendingOwner = address(0);
    }
}






/// @title QuotaStore
/// @dev This store maintains daily spending quota for each wallet.
///      A rolling daily limit is used.
contract QuotaStore is DataStore
{
    using MathUint for uint;

    uint public defaultQuota;

    struct Quota
    {
        uint    currentQuota; // 0 indicates default
        uint    pendingQuota;
        uint64  pendingUntil;
        uint64  spentTimestamp;
        uint    spentAmount;
    }

    mapping (address => Quota) public quotas;

    event QuotaScheduled(
        address indexed wallet,
        uint            pendingQuota,
        uint64          pendingUntil
    );

    constructor(uint _defaultQuota)
        public
        DataStore()
    {
        defaultQuota = _defaultQuota;
    }

    function changeQuota(
        address wallet,
        uint    newQuota,
        uint    effectiveTime
        )
        public
        onlyWalletModule(wallet)
    {
        quotas[wallet].currentQuota = currentQuota(wallet);
        quotas[wallet].pendingQuota = newQuota;
        quotas[wallet].pendingUntil = uint64(effectiveTime);

        emit QuotaScheduled(
            wallet,
            newQuota,
            quotas[wallet].pendingUntil
        );
    }

    function checkAndAddToSpent(
        address wallet,
        uint    amount
        )
        public
        onlyWalletModule(wallet)
    {
        require(hasEnoughQuota(wallet, amount), "QUOTA_EXCEEDED");
        addToSpent(wallet, amount);
    }

    function addToSpent(
        address wallet,
        uint    amount
        )
        public
        onlyWalletModule(wallet)
    {
        Quota storage q = quotas[wallet];
        q.spentAmount = spentQuota(wallet).add(amount);
        q.spentTimestamp = uint64(now);
    }

    function currentQuota(address wallet)
        public
        view
        returns (uint)
    {
        Quota storage q = quotas[wallet];
        uint value = q.pendingUntil <= now ?
            q.pendingQuota : q.currentQuota;

        return value == 0 ? defaultQuota : value;
    }

    function pendingQuota(address wallet)
        public
        view
        returns (
            uint _pendingQuota,
            uint _pendingUntil
        )
    {
        Quota storage q = quotas[wallet];
        if (q.pendingUntil > 0 && q.pendingUntil > now) {
            _pendingQuota = q.pendingQuota > 0 ? q.pendingQuota : defaultQuota;
            _pendingUntil = q.pendingUntil;
        }
    }

    function spentQuota(address wallet)
        public
        view
        returns (uint)
    {
        Quota storage q = quotas[wallet];
        uint timeSinceLastSpent = now.sub(q.spentTimestamp);
        if (timeSinceLastSpent < 1 days) {
            return q.spentAmount.sub(q.spentAmount.mul(timeSinceLastSpent) / 1 days);
        } else {
            return 0;
        }
    }

    function availableQuota(address wallet)
        public
        view
        returns (uint)
    {
        uint quota = currentQuota(wallet);
        uint spent = spentQuota(wallet);
        return quota > spent ? quota - spent : 0;
    }

    function hasEnoughQuota(
        address wallet,
        uint    requiredAmount
        )
        public
        view
        returns (bool)
    {
        return availableQuota(wallet) >= requiredAmount;
    }
}


/*

  Copyright 2017 Loopring Project Ltd (Loopring Foundation).

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
*/


/*

  Copyright 2017 Loopring Project Ltd (Loopring Foundation).

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
*/






contract OwnerManagable is Claimable, AddressSet
{
    bytes32 internal constant MANAGER = keccak256("__MANAGED__");

    event ManagerAdded  (address indexed manager);
    event ManagerRemoved(address indexed manager);

    modifier onlyManager
    {
        require(isManager(msg.sender), "NOT_MANAGER");
        _;
    }

    modifier onlyOwnerOrManager
    {
        require(msg.sender == owner || isManager(msg.sender), "NOT_OWNER_OR_MANAGER");
        _;
    }

    constructor() public Claimable() {}

    /// @dev Gets the managers.
    /// @return The list of managers.
    function managers()
        public
        view
        returns (address[] memory)
    {
        return addressesInSet(MANAGER);
    }

    /// @dev Gets the number of managers.
    /// @return The numer of managers.
    function numManagers()
        public
        view
        returns (uint)
    {
        return numAddressesInSet(MANAGER);
    }

    /// @dev Checks if an address is a manger.
    /// @param addr The address to check.
    /// @return True if the address is a manager, False otherwise.
    function isManager(address addr)
        public
        view
        returns (bool)
    {
        return isAddressInSet(MANAGER, addr);
    }

    /// @dev Adds a new manager.
    /// @param manager The new address to add.
    function addManager(address manager)
        public
        onlyOwner
    {
        addManagerInternal(manager);
    }

    /// @dev Removes a manager.
    /// @param manager The manager to remove.
    function removeManager(address manager)
        public
        onlyOwner
    {
        removeAddressFromSet(MANAGER, manager);
        emit ManagerRemoved(manager);
    }

    function addManagerInternal(address manager)
        internal
    {
        addAddressToSet(MANAGER, manager, true);
        emit ManagerAdded(manager);
    }
}




/// @title DappAddressStore
/// @dev This store maintains global whitelist dapps.
contract DappAddressStore is DataStore, OwnerManagable
{
    bytes32 internal constant DAPPS = keccak256("__DAPPS__");

    event Whitelisted(
        address indexed addr,
        bool            whitelisted
    );

    constructor() public DataStore() {}

    function addDapp(address addr)
        public
        onlyManager
    {
        addAddressToSet(DAPPS, addr, true);
        emit Whitelisted(addr, true);
    }

    function removeDapp(address addr)
        public
        onlyManager
    {
        removeAddressFromSet(DAPPS, addr);
        emit Whitelisted(addr, false);
    }

    function dapps()
        public
        view
        returns (
            address[] memory addresses
        )
    {
        return addressesInSet(DAPPS);
    }

    function isDapp(
        address addr
        )
        public
        view
        returns (bool)
    {
        return isAddressInSet(DAPPS, addr);
    }

    function numDapps()
        public
        view
        returns (uint)
    {
        return numAddressesInSet(DAPPS);
    }
}

/*

  Copyright 2017 Loopring Project Ltd (Loopring Foundation).

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
*/







/// @title WhitelistStore
/// @dev This store maintains a wallet's whitelisted addresses.
contract WhitelistStore is DataStore, AddressSet
{
    // wallet => whitelisted_addr => effective_since
    mapping(address => mapping(address => uint)) public effectiveTimeMap;

    event Whitelisted(
        address indexed wallet,
        address indexed addr,
        bool            whitelisted,
        uint            effectiveTime
    );

    constructor() public DataStore() {}

    function addToWhitelist(
        address wallet,
        address addr,
        uint    effectiveTime
        )
        public
        onlyWalletModule(wallet)
    {
        addAddressToSet(walletKey(wallet), addr, true);
        uint effective = effectiveTime >= now ? effectiveTime : now;
        effectiveTimeMap[wallet][addr] = effective;
        emit Whitelisted(wallet, addr, true, effective);
    }

    function removeFromWhitelist(
        address wallet,
        address addr
        )
        public
        onlyWalletModule(wallet)
    {
        removeAddressFromSet(walletKey(wallet), addr);
        delete effectiveTimeMap[wallet][addr];
        emit Whitelisted(wallet, addr, false, 0);
    }

    function whitelist(address wallet)
        public
        view
        returns (
            address[] memory addresses,
            uint[]    memory effectiveTimes
        )
    {
        addresses = addressesInSet(walletKey(wallet));
        effectiveTimes = new uint[](addresses.length);
        for (uint i = 0; i < addresses.length; i++) {
            effectiveTimes[i] = effectiveTimeMap[wallet][addresses[i]];
        }
    }

    function isWhitelisted(
        address wallet,
        address addr
        )
        public
        view
        returns (
            bool isWhitelistedAndEffective,
            uint effectiveTime
        )
    {
        effectiveTime = effectiveTimeMap[wallet][addr];
        isWhitelistedAndEffective = effectiveTime > 0 && effectiveTime <= now;
    }

    function whitelistSize(address wallet)
        public
        view
        returns (uint)
    {
        return numAddressesInSet(walletKey(wallet));
    }

    function walletKey(address addr)
        public
        pure
        returns (bytes32)
    {
        return keccak256(abi.encodePacked("__WHITELIST__", addr));
    }
}




/*

  Copyright 2017 Loopring Project Ltd (Loopring Foundation).

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
*/


// Taken from Argent's code base - https://github.com/argentlabs/argent-contracts/blob/develop/contracts/ens/ArgentENSManager.sol
// with few modifications.


/*
 * @title String & slice utility library for Solidity contracts.
 * @author Nick Johnson <[email protected]>
 *
 * @dev Functionality in this library is largely implemented using an
 *      abstraction called a 'slice'. A slice represents a part of a string -
 *      anything from the entire string to a single character, or even no
 *      characters at all (a 0-length slice). Since a slice only has to specify
 *      an offset and a length, copying and manipulating slices is a lot less
 *      expensive than copying and manipulating the strings they reference.
 *
 *      To further reduce gas costs, most functions on slice that need to return
 *      a slice modify the original one instead of allocating a new one; for
 *      instance, `s.split(".")` will return the text up to the first '.',
 *      modifying s to only contain the remainder of the string after the '.'.
 *      In situations where you do not want to modify the original slice, you
 *      can make a copy first with `.copy()`, for example:
 *      `s.copy().split(".")`. Try and avoid using this idiom in loops; since
 *      Solidity has no memory management, it will result in allocating many
 *      short-lived slices that are later discarded.
 *
 *      Functions that return two slices come in two versions: a non-allocating
 *      version that takes the second slice as an argument, modifying it in
 *      place, and an allocating version that allocates and returns the second
 *      slice; see `nextRune` for example.
 *
 *      Functions that have to copy string data will return strings rather than
 *      slices; these can be cast back to slices for further processing if
 *      required.
 *
 *      For convenience, some functions are provided with non-modifying
 *      variants that create a new slice and return both; for instance,
 *      `s.splitNew('.')` leaves s unmodified, and returns two values
 *      corresponding to the left and right parts of the string.
 */



/* solium-disable */
library strings {
    struct slice {
        uint _len;
        uint _ptr;
    }

    function memcpy(uint dest, uint src, uint len) private pure {
        // Copy word-length chunks while possible
        for(; len >= 32; len -= 32) {
            assembly {
                mstore(dest, mload(src))
            }
            dest += 32;
            src += 32;
        }

        // Copy remaining bytes
        uint mask = 256 ** (32 - len) - 1;
        assembly {
            let srcpart := and(mload(src), not(mask))
            let destpart := and(mload(dest), mask)
            mstore(dest, or(destpart, srcpart))
        }
    }

    /*
     * @dev Returns a slice containing the entire string.
     * @param self The string to make a slice from.
     * @return A newly allocated slice containing the entire string.
     */
    function toSlice(string memory self) internal pure returns (slice memory) {
        uint ptr;
        assembly {
            ptr := add(self, 0x20)
        }
        return slice(bytes(self).length, ptr);
    }

    /*
     * @dev Returns the length of a null-terminated bytes32 string.
     * @param self The value to find the length of.
     * @return The length of the string, from 0 to 32.
     */
    function len(bytes32 self) internal pure returns (uint) {
        uint ret;
        if (self == 0)
            return 0;
        if (uint256(self) & 0xffffffffffffffffffffffffffffffff == 0) {
            ret += 16;
            self = bytes32(uint(self) / 0x100000000000000000000000000000000);
        }
        if (uint256(self) & 0xffffffffffffffff == 0) {
            ret += 8;
            self = bytes32(uint(self) / 0x10000000000000000);
        }
        if (uint256(self) & 0xffffffff == 0) {
            ret += 4;
            self = bytes32(uint(self) / 0x100000000);
        }
        if (uint256(self) & 0xffff == 0) {
            ret += 2;
            self = bytes32(uint(self) / 0x10000);
        }
        if (uint256(self) & 0xff == 0) {
            ret += 1;
        }
        return 32 - ret;
    }

    /*
     * @dev Returns a slice containing the entire bytes32, interpreted as a
     *      null-terminated utf-8 string.
     * @param self The bytes32 value to convert to a slice.
     * @return A new slice containing the value of the input argument up to the
     *         first null.
     */
    function toSliceB32(bytes32 self) internal pure returns (slice memory ret) {
        // Allocate space for `self` in memory, copy it there, and point ret at it
        assembly {
            let ptr := mload(0x40)
            mstore(0x40, add(ptr, 0x20))
            mstore(ptr, self)
            mstore(add(ret, 0x20), ptr)
        }
        ret._len = len(self);
    }

    /*
     * @dev Returns a new slice containing the same data as the current slice.
     * @param self The slice to copy.
     * @return A new slice containing the same data as `self`.
     */
    function copy(slice memory self) internal pure returns (slice memory) {
        return slice(self._len, self._ptr);
    }

    /*
     * @dev Copies a slice to a new string.
     * @param self The slice to copy.
     * @return A newly allocated string containing the slice's text.
     */
    function toString(slice memory self) internal pure returns (string memory) {
        string memory ret = new string(self._len);
        uint retptr;
        assembly { retptr := add(ret, 32) }

        memcpy(retptr, self._ptr, self._len);
        return ret;
    }

    /*
     * @dev Returns the length in runes of the slice. Note that this operation
     *      takes time proportional to the length of the slice; avoid using it
     *      in loops, and call `slice.empty()` if you only need to know whether
     *      the slice is empty or not.
     * @param self The slice to operate on.
     * @return The length of the slice in runes.
     */
    function len(slice memory self) internal pure returns (uint l) {
        // Starting at ptr-31 means the LSB will be the byte we care about
        uint ptr = self._ptr - 31;
        uint end = ptr + self._len;
        for (l = 0; ptr < end; l++) {
            uint8 b;
            assembly { b := and(mload(ptr), 0xFF) }
            if (b < 0x80) {
                ptr += 1;
            } else if(b < 0xE0) {
                ptr += 2;
            } else if(b < 0xF0) {
                ptr += 3;
            } else if(b < 0xF8) {
                ptr += 4;
            } else if(b < 0xFC) {
                ptr += 5;
            } else {
                ptr += 6;
            }
        }
    }

    /*
     * @dev Returns true if the slice is empty (has a length of 0).
     * @param self The slice to operate on.
     * @return True if the slice is empty, False otherwise.
     */
    function empty(slice memory self) internal pure returns (bool) {
        return self._len == 0;
    }

    /*
     * @dev Returns a positive number if `other` comes lexicographically after
     *      `self`, a negative number if it comes before, or zero if the
     *      contents of the two slices are equal. Comparison is done per-rune,
     *      on unicode codepoints.
     * @param self The first slice to compare.
     * @param other The second slice to compare.
     * @return The result of the comparison.
     */
    function compare(slice memory self, slice memory other) internal pure returns (int) {
        uint shortest = self._len;
        if (other._len < self._len)
            shortest = other._len;

        uint selfptr = self._ptr;
        uint otherptr = other._ptr;
        for (uint idx = 0; idx < shortest; idx += 32) {
            uint a;
            uint b;
            assembly {
                a := mload(selfptr)
                b := mload(otherptr)
            }
            if (a != b) {
                // Mask out irrelevant bytes and check again
                uint256 mask = uint256(-1); // 0xffff...
                if(shortest < 32) {
                  mask = ~(2 ** (8 * (32 - shortest + idx)) - 1);
                }
                uint256 diff = (a & mask) - (b & mask);
                if (diff != 0)
                    return int(diff);
            }
            selfptr += 32;
            otherptr += 32;
        }
        return int(self._len) - int(other._len);
    }

    /*
     * @dev Returns true if the two slices contain the same text.
     * @param self The first slice to compare.
     * @param self The second slice to compare.
     * @return True if the slices are equal, false otherwise.
     */
    function equals(slice memory self, slice memory other) internal pure returns (bool) {
        return compare(self, other) == 0;
    }

    /*
     * @dev Extracts the first rune in the slice into `rune`, advancing the
     *      slice to point to the next rune and returning `self`.
     * @param self The slice to operate on.
     * @param rune The slice that will contain the first rune.
     * @return `rune`.
     */
    function nextRune(slice memory self, slice memory rune) internal pure returns (slice memory) {
        rune._ptr = self._ptr;

        if (self._len == 0) {
            rune._len = 0;
            return rune;
        }

        uint l;
        uint b;
        // Load the first byte of the rune into the LSBs of b
        assembly { b := and(mload(sub(mload(add(self, 32)), 31)), 0xFF) }
        if (b < 0x80) {
            l = 1;
        } else if(b < 0xE0) {
            l = 2;
        } else if(b < 0xF0) {
            l = 3;
        } else {
            l = 4;
        }

        // Check for truncated codepoints
        if (l > self._len) {
            rune._len = self._len;
            self._ptr += self._len;
            self._len = 0;
            return rune;
        }

        self._ptr += l;
        self._len -= l;
        rune._len = l;
        return rune;
    }

    /*
     * @dev Returns the first rune in the slice, advancing the slice to point
     *      to the next rune.
     * @param self The slice to operate on.
     * @return A slice containing only the first rune from `self`.
     */
    function nextRune(slice memory self) internal pure returns (slice memory ret) {
        nextRune(self, ret);
    }

    /*
     * @dev Returns the number of the first codepoint in the slice.
     * @param self The slice to operate on.
     * @return The number of the first codepoint in the slice.
     */
    function ord(slice memory self) internal pure returns (uint ret) {
        if (self._len == 0) {
            return 0;
        }

        uint word;
        uint length;
        uint divisor = 2 ** 248;

        // Load the rune into the MSBs of b
        assembly { word:= mload(mload(add(self, 32))) }
        uint b = word / divisor;
        if (b < 0x80) {
            ret = b;
            length = 1;
        } else if(b < 0xE0) {
            ret = b & 0x1F;
            length = 2;
        } else if(b < 0xF0) {
            ret = b & 0x0F;
            length = 3;
        } else {
            ret = b & 0x07;
            length = 4;
        }

        // Check for truncated codepoints
        if (length > self._len) {
            return 0;
        }

        for (uint i = 1; i < length; i++) {
            divisor = divisor / 256;
            b = (word / divisor) & 0xFF;
            if (b & 0xC0 != 0x80) {
                // Invalid UTF-8 sequence
                return 0;
            }
            ret = (ret * 64) | (b & 0x3F);
        }

        return ret;
    }

    /*
     * @dev Returns the keccak-256 hash of the slice.
     * @param self The slice to hash.
     * @return The hash of the slice.
     */
    function keccak(slice memory self) internal pure returns (bytes32 ret) {
        assembly {
            ret := keccak256(mload(add(self, 32)), mload(self))
        }
    }

    /*
     * @dev Returns true if `self` starts with `needle`.
     * @param self The slice to operate on.
     * @param needle The slice to search for.
     * @return True if the slice starts with the provided text, false otherwise.
     */
    function startsWith(slice memory self, slice memory needle) internal pure returns (bool) {
        if (self._len < needle._len) {
            return false;
        }

        if (self._ptr == needle._ptr) {
            return true;
        }

        bool equal;
        assembly {
            let length := mload(needle)
            let selfptr := mload(add(self, 0x20))
            let needleptr := mload(add(needle, 0x20))
            equal := eq(keccak256(selfptr, length), keccak256(needleptr, length))
        }
        return equal;
    }

    /*
     * @dev If `self` starts with `needle`, `needle` is removed from the
     *      beginning of `self`. Otherwise, `self` is unmodified.
     * @param self The slice to operate on.
     * @param needle The slice to search for.
     * @return `self`
     */
    function beyond(slice memory self, slice memory needle) internal pure returns (slice memory) {
        if (self._len < needle._len) {
            return self;
        }

        bool equal = true;
        if (self._ptr != needle._ptr) {
            assembly {
                let length := mload(needle)
                let selfptr := mload(add(self, 0x20))
                let needleptr := mload(add(needle, 0x20))
                equal := eq(keccak256(selfptr, length), keccak256(needleptr, length))
            }
        }

        if (equal) {
            self._len -= needle._len;
            self._ptr += needle._len;
        }

        return self;
    }

    /*
     * @dev Returns true if the slice ends with `needle`.
     * @param self The slice to operate on.
     * @param needle The slice to search for.
     * @return True if the slice starts with the provided text, false otherwise.
     */
    function endsWith(slice memory self, slice memory needle) internal pure returns (bool) {
        if (self._len < needle._len) {
            return false;
        }

        uint selfptr = self._ptr + self._len - needle._len;

        if (selfptr == needle._ptr) {
            return true;
        }

        bool equal;
        assembly {
            let length := mload(needle)
            let needleptr := mload(add(needle, 0x20))
            equal := eq(keccak256(selfptr, length), keccak256(needleptr, length))
        }

        return equal;
    }

    /*
     * @dev If `self` ends with `needle`, `needle` is removed from the
     *      end of `self`. Otherwise, `self` is unmodified.
     * @param self The slice to operate on.
     * @param needle The slice to search for.
     * @return `self`
     */
    function until(slice memory self, slice memory needle) internal pure returns (slice memory) {
        if (self._len < needle._len) {
            return self;
        }

        uint selfptr = self._ptr + self._len - needle._len;
        bool equal = true;
        if (selfptr != needle._ptr) {
            assembly {
                let length := mload(needle)
                let needleptr := mload(add(needle, 0x20))
                equal := eq(keccak256(selfptr, length), keccak256(needleptr, length))
            }
        }

        if (equal) {
            self._len -= needle._len;
        }

        return self;
    }

    // Returns the memory address of the first byte of the first occurrence of
    // `needle` in `self`, or the first byte after `self` if not found.
    function findPtr(uint selflen, uint selfptr, uint needlelen, uint needleptr) private pure returns (uint) {
        uint ptr = selfptr;
        uint idx;

        if (needlelen <= selflen) {
            if (needlelen <= 32) {
                bytes32 mask = bytes32(~(2 ** (8 * (32 - needlelen)) - 1));

                bytes32 needledata;
                assembly { needledata := and(mload(needleptr), mask) }

                uint end = selfptr + selflen - needlelen;
                bytes32 ptrdata;
                assembly { ptrdata := and(mload(ptr), mask) }

                while (ptrdata != needledata) {
                    if (ptr >= end)
                        return selfptr + selflen;
                    ptr++;
                    assembly { ptrdata := and(mload(ptr), mask) }
                }
                return ptr;
            } else {
                // For long needles, use hashing
                bytes32 hash;
                assembly { hash := keccak256(needleptr, needlelen) }

                for (idx = 0; idx <= selflen - needlelen; idx++) {
                    bytes32 testHash;
                    assembly { testHash := keccak256(ptr, needlelen) }
                    if (hash == testHash)
                        return ptr;
                    ptr += 1;
                }
            }
        }
        return selfptr + selflen;
    }

    // Returns the memory address of the first byte after the last occurrence of
    // `needle` in `self`, or the address of `self` if not found.
    function rfindPtr(uint selflen, uint selfptr, uint needlelen, uint needleptr) private pure returns (uint) {
        uint ptr;

        if (needlelen <= selflen) {
            if (needlelen <= 32) {
                bytes32 mask = bytes32(~(2 ** (8 * (32 - needlelen)) - 1));

                bytes32 needledata;
                assembly { needledata := and(mload(needleptr), mask) }

                ptr = selfptr + selflen - needlelen;
                bytes32 ptrdata;
                assembly { ptrdata := and(mload(ptr), mask) }

                while (ptrdata != needledata) {
                    if (ptr <= selfptr)
                        return selfptr;
                    ptr--;
                    assembly { ptrdata := and(mload(ptr), mask) }
                }
                return ptr + needlelen;
            } else {
                // For long needles, use hashing
                bytes32 hash;
                assembly { hash := keccak256(needleptr, needlelen) }
                ptr = selfptr + (selflen - needlelen);
                while (ptr >= selfptr) {
                    bytes32 testHash;
                    assembly { testHash := keccak256(ptr, needlelen) }
                    if (hash == testHash)
                        return ptr + needlelen;
                    ptr -= 1;
                }
            }
        }
        return selfptr;
    }

    /*
     * @dev Modifies `self` to contain everything from the first occurrence of
     *      `needle` to the end of the slice. `self` is set to the empty slice
     *      if `needle` is not found.
     * @param self The slice to search and modify.
     * @param needle The text to search for.
     * @return `self`.
     */
    function find(slice memory self, slice memory needle) internal pure returns (slice memory) {
        uint ptr = findPtr(self._len, self._ptr, needle._len, needle._ptr);
        self._len -= ptr - self._ptr;
        self._ptr = ptr;
        return self;
    }

    /*
     * @dev Modifies `self` to contain the part of the string from the start of
     *      `self` to the end of the first occurrence of `needle`. If `needle`
     *      is not found, `self` is set to the empty slice.
     * @param self The slice to search and modify.
     * @param needle The text to search for.
     * @return `self`.
     */
    function rfind(slice memory self, slice memory needle) internal pure returns (slice memory) {
        uint ptr = rfindPtr(self._len, self._ptr, needle._len, needle._ptr);
        self._len = ptr - self._ptr;
        return self;
    }

    /*
     * @dev Splits the slice, setting `self` to everything after the first
     *      occurrence of `needle`, and `token` to everything before it. If
     *      `needle` does not occur in `self`, `self` is set to the empty slice,
     *      and `token` is set to the entirety of `self`.
     * @param self The slice to split.
     * @param needle The text to search for in `self`.
     * @param token An output parameter to which the first token is written.
     * @return `token`.
     */
    function split(slice memory self, slice memory needle, slice memory token) internal pure returns (slice memory) {
        uint ptr = findPtr(self._len, self._ptr, needle._len, needle._ptr);
        token._ptr = self._ptr;
        token._len = ptr - self._ptr;
        if (ptr == self._ptr + self._len) {
            // Not found
            self._len = 0;
        } else {
            self._len -= token._len + needle._len;
            self._ptr = ptr + needle._len;
        }
        return token;
    }

    /*
     * @dev Splits the slice, setting `self` to everything after the first
     *      occurrence of `needle`, and returning everything before it. If
     *      `needle` does not occur in `self`, `self` is set to the empty slice,
     *      and the entirety of `self` is returned.
     * @param self The slice to split.
     * @param needle The text to search for in `self`.
     * @return The part of `self` up to the first occurrence of `delim`.
     */
    function split(slice memory self, slice memory needle) internal pure returns (slice memory token) {
        split(self, needle, token);
    }

    /*
     * @dev Splits the slice, setting `self` to everything before the last
     *      occurrence of `needle`, and `token` to everything after it. If
     *      `needle` does not occur in `self`, `self` is set to the empty slice,
     *      and `token` is set to the entirety of `self`.
     * @param self The slice to split.
     * @param needle The text to search for in `self`.
     * @param token An output parameter to which the first token is written.
     * @return `token`.
     */
    function rsplit(slice memory self, slice memory needle, slice memory token) internal pure returns (slice memory) {
        uint ptr = rfindPtr(self._len, self._ptr, needle._len, needle._ptr);
        token._ptr = ptr;
        token._len = self._len - (ptr - self._ptr);
        if (ptr == self._ptr) {
            // Not found
            self._len = 0;
        } else {
            self._len -= token._len + needle._len;
        }
        return token;
    }

    /*
     * @dev Splits the slice, setting `self` to everything before the last
     *      occurrence of `needle`, and returning everything after it. If
     *      `needle` does not occur in `self`, `self` is set to the empty slice,
     *      and the entirety of `self` is returned.
     * @param self The slice to split.
     * @param needle The text to search for in `self`.
     * @return The part of `self` after the last occurrence of `delim`.
     */
    function rsplit(slice memory self, slice memory needle) internal pure returns (slice memory token) {
        rsplit(self, needle, token);
    }

    /*
     * @dev Counts the number of nonoverlapping occurrences of `needle` in `self`.
     * @param self The slice to search.
     * @param needle The text to search for in `self`.
     * @return The number of occurrences of `needle` found in `self`.
     */
    function count(slice memory self, slice memory needle) internal pure returns (uint cnt) {
        uint ptr = findPtr(self._len, self._ptr, needle._len, needle._ptr) + needle._len;
        while (ptr <= self._ptr + self._len) {
            cnt++;
            ptr = findPtr(self._len - (ptr - self._ptr), ptr, needle._len, needle._ptr) + needle._len;
        }
    }

    /*
     * @dev Returns True if `self` contains `needle`.
     * @param self The slice to search.
     * @param needle The text to search for in `self`.
     * @return True if `needle` is found in `self`, false otherwise.
     */
    function contains(slice memory self, slice memory needle) internal pure returns (bool) {
        return rfindPtr(self._len, self._ptr, needle._len, needle._ptr) != self._ptr;
    }

    /*
     * @dev Returns a newly allocated string containing the concatenation of
     *      `self` and `other`.
     * @param self The first slice to concatenate.
     * @param other The second slice to concatenate.
     * @return The concatenation of the two strings.
     */
    function concat(slice memory self, slice memory other) internal pure returns (string memory) {
        string memory ret = new string(self._len + other._len);
        uint retptr;
        assembly { retptr := add(ret, 32) }
        memcpy(retptr, self._ptr, self._len);
        memcpy(retptr + self._len, other._ptr, other._len);
        return ret;
    }

    /*
     * @dev Joins an array of slices, using `self` as a delimiter, returning a
     *      newly allocated string.
     * @param self The delimiter to use.
     * @param parts A list of slices to join.
     * @return A newly allocated string containing all the slices in `parts`,
     *         joined with `self`.
     */
    function join(slice memory self, slice[] memory parts) internal pure returns (string memory) {
        if (parts.length == 0)
            return "";

        uint length = self._len * (parts.length - 1);
        for(uint i = 0; i < parts.length; i++)
            length += parts[i]._len;

        string memory ret = new string(length);
        uint retptr;
        assembly { retptr := add(ret, 32) }

        for(uint i = 0; i < parts.length; i++) {
            memcpy(retptr, parts[i]._ptr, parts[i]._len);
            retptr += parts[i]._len;
            if (i < parts.length - 1) {
                memcpy(retptr, self._ptr, self._len);
                retptr += self._len;
            }
        }

        return ret;
    }
}






/**
 * @dev Interface for an ENS Mananger.
 */
interface IENSManager {
    function changeRootnodeOwner(address _newOwner) external;

    function isAvailable(bytes32 _subnode) external view returns(bool);

    function resolveName(address _owner) external view returns (string memory);

    function register(
        address _owner,
        string  calldata _label,
        bytes   calldata _approval
    ) external;
}

/**
 * @title BaseENSManager
 * @dev Implementation of an ENS manager that orchestrates the complete
 * registration of subdomains for a single root (e.g. argent.eth).
 * The contract defines a manager role who is the only role that can trigger the registration of
 * a new subdomain.
 * @author Julien Niset - <[email protected]>
 */
contract BaseENSManager is IENSManager, OwnerManagable, ENSConsumer {

    using strings for *;
    using BytesUtil     for bytes;
    using MathUint      for uint;

    // The managed root name
    string public rootName;
    // The managed root node
    bytes32 public rootNode;
    // The address of the ENS resolver
    address public ensResolver;

    // *************** Events *************************** //

    event RootnodeOwnerChange(bytes32 indexed _rootnode, address indexed _newOwner);
    event ENSResolverChanged(address addr);
    event Registered(address indexed _owner, string _ens);
    event Unregistered(string _ens);

    // *************** Constructor ********************** //

    /**
     * @dev Constructor that sets the ENS root name and root node to manage.
     * @param _rootName The root name (e.g. argentx.eth).
     * @param _rootNode The node of the root name (e.g. namehash(argentx.eth)).
     */
    constructor(string memory _rootName, bytes32 _rootNode, address _ensRegistry, address _ensResolver)
        ENSConsumer(_ensRegistry)
        public {
        rootName = _rootName;
        rootNode = _rootNode;
        ensResolver = _ensResolver;
    }

    // *************** External Functions ********************* //

    /**
     * @dev This function must be called when the ENS Manager contract is replaced
     * and the address of the new Manager should be provided.
     * @param _newOwner The address of the new ENS manager that will manage the root node.
     */
    function changeRootnodeOwner(address _newOwner) external override onlyOwner {
        getENSRegistry().setOwner(rootNode, _newOwner);
        emit RootnodeOwnerChange(rootNode, _newOwner);
    }

    /**
     * @dev Lets the owner change the address of the ENS resolver contract.
     * @param _ensResolver The address of the ENS resolver contract.
     */
    function changeENSResolver(address _ensResolver) external onlyOwner {
        require(_ensResolver != address(0), "WF: address cannot be null");
        ensResolver = _ensResolver;
        emit ENSResolverChanged(_ensResolver);
    }

    /**
    * @dev Lets the manager assign an ENS subdomain of the root node to a target address.
    * Registers both the forward and reverse ENS.
    * @param _owner The owner of the subdomain.
    * @param _label The subdomain label.
    * @param _approval The signature of _owner and _label by a manager.
    */
    function register(
        address _owner,
        string  calldata _label,
        bytes   calldata _approval
        )
        external
        override
        onlyManager
    {
        verifyApproval(_owner, _label, _approval);

        bytes32 labelNode = keccak256(abi.encodePacked(_label));
        bytes32 node = keccak256(abi.encodePacked(rootNode, labelNode));
        address currentOwner = getENSRegistry().owner(node);
        require(currentOwner == address(0), "AEM: _label is alrealdy owned");

        // Forward ENS
        getENSRegistry().setSubnodeOwner(rootNode, labelNode, address(this));
        getENSRegistry().setResolver(node, ensResolver);
        getENSRegistry().setOwner(node, _owner);
        ENSResolver(ensResolver).setAddr(node, _owner);

        // Reverse ENS
        strings.slice[] memory parts = new strings.slice[](2);
        parts[0] = _label.toSlice();
        parts[1] = rootName.toSlice();
        string memory name = ".".toSlice().join(parts);
        bytes32 reverseNode = getENSReverseRegistrar().node(_owner);
        ENSResolver(ensResolver).setName(reverseNode, name);

        emit Registered(_owner, name);
    }

    // *************** Public Functions ********************* //

    /**
    * @dev Resolves an address to an ENS name
    * @param _owner The ENS owner address
    */
    function resolveName(address _owner) public view override returns (string memory) {
        bytes32 reverseNode = getENSReverseRegistrar().node(_owner);
        return ENSResolver(ensResolver).name(reverseNode);
    }

    /**
     * @dev Returns true is a given subnode is available.
     * @param _subnode The target subnode.
     * @return true if the subnode is available.
     */
    function isAvailable(bytes32 _subnode) public view override returns (bool) {
        bytes32 node = keccak256(abi.encodePacked(rootNode, _subnode));
        address currentOwner = getENSRegistry().owner(node);
        if(currentOwner == address(0)) {
            return true;
        }
        return false;
    }

    function verifyApproval(
        address _owner,
        string  memory _label,
        bytes   memory _approval
        )
        internal
        view
    {
        if (numManagers() == 1) {
            return;
        }

        bytes32 messageHash = keccak256(
            abi.encodePacked(
                _owner,
                _label
            )
        );

        bytes32 hash = keccak256(
            abi.encodePacked(
                "\x19Ethereum Signed Message:\n32",
                messageHash
            )
        );

        address signer = SignatureUtil.recoverECDSASigner(hash, _approval);
        require(isManager(signer), "UNAUTHORIZED");
    }

}


/// @title WalletENSManager
/// @dev An ENS manager to interactive with ENS module.
///
/// @author Daniel Wang - <[email protected]>
///
/// The design of this contract is inspired by Argent's contract codebase:
/// https://github.com/argentlabs/argent-contracts
contract WalletENSManager is BaseENSManager {

    constructor(
        string memory _rootName,
        bytes32       _rootNode,
        address       _ensRegistry,
        address       _ensResolver
        )
        public
        BaseENSManager(
            _rootName,
            _rootNode,
            _ensRegistry,
            _ensResolver
        )
    {
    }

}


/// @title Controller
///
/// @author Daniel Wang - <[email protected]>
contract Controller
{
    // The address to which all colletable tokens/ether in modules will
    // be sent to.
    address public collectTo;
    uint    public defaultLockPeriod;

    ModuleRegistry          public moduleRegistry;
    WalletRegistry          public walletRegistry;

    QuotaStore              public quotaStore;
    SecurityStore           public securityStore;
    DappAddressStore        public dappAddressStore;
    WhitelistStore          public whitelistStore;

    PriceOracle             public priceOracle;
    WalletENSManager        public ensManager;
}
/*

  Copyright 2017 Loopring Project Ltd (Loopring Foundation).

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
*/



/*

  Copyright 2017 Loopring Project Ltd (Loopring Foundation).

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
*/









/*

  Copyright 2017 Loopring Project Ltd (Loopring Foundation).

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
*/



/*

  Copyright 2017 Loopring Project Ltd (Loopring Foundation).

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
*/



/*

  Copyright 2017 Loopring Project Ltd (Loopring Foundation).

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
*/




/*

  Copyright 2017 Loopring Project Ltd (Loopring Foundation).

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

  Unless _requirement by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
*/



library EIP712
{
    struct Domain {
        string  name;
        string  version;
        address verifyingContract;
    }

    bytes32 constant internal EIP712_DOMAIN_TYPEHASH = keccak256(
        "EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"
    );

    string constant internal EIP191_HEADER = "\x19\x01";

    function hash(Domain memory domain)
        internal
        pure
        returns (bytes32)
    {
        uint _chainid;
        assembly { _chainid := chainid() }

        return keccak256(
            abi.encode(
                EIP712_DOMAIN_TYPEHASH,
                keccak256(bytes(domain.name)),
                keccak256(bytes(domain.version)),
                _chainid,
                domain.verifyingContract
            )
        );
    }

    function hashPacked(
        bytes32 domainHash,
        bytes32 dataHash
        )
        internal
        pure
        returns (bytes32)
    {
        return keccak256(
            abi.encodePacked(
                EIP191_HEADER,
                domainHash,
                dataHash
            )
        );
    }
}


/*

  Copyright 2017 Loopring Project Ltd (Loopring Foundation).

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
*/










/// @title SignatureUtil
/// @author Daniel Wang - <[email protected]>
/// @dev This method supports multihash standard. Each signature's first byte indicates
///      the signature's type, the second byte indicates the signature's length, therefore,
///      each signature will have 2 extra bytes prefix. Mulitple signatures are concatenated
///      together.
library SignatureUtil
{
    using BytesUtil     for bytes;
    using MathUint      for uint;

    enum SignatureType {
        ILLEGAL,
        INVALID,
        EIP_712,
        ETH_SIGN,
        WALLET
    }

    bytes4 constant private ERC1271_MAGICVALUE = 0x20c13b0b;

    function verifySignatures(
        bytes32   signHash,
        address[] memory signers,
        bytes[]   memory signatures
        )
        internal
        view
        returns (bool)
    {
        require(signers.length == signatures.length, "BAD_SIGNATURE_DATA");
        address lastSigner;
        for (uint i = 0; i < signers.length; i++) {
            require(signers[i] > lastSigner, "INVALID_SIGNERS_ORDER");
            lastSigner = signers[i];
            if (!verifySignature(signHash, signers[i], signatures[i])) {
                return false;
            }
        }
        return true;
    }

    function verifySignature(
        bytes32 signHash,
        address signer,
        bytes   memory signature
        )
        internal
        view
        returns (bool)
    {
        uint signatureTypeOffset = signature.length.sub(1);
        SignatureType signatureType = SignatureType(signature.toUint8(signatureTypeOffset));

        bytes memory stripped = signature.slice(0, signatureTypeOffset);

        if (signatureType == SignatureType.WALLET) {
            return verifyERC1271Signature(signHash, signer, stripped);
        } else if (signatureType == SignatureType.EIP_712) {
            return recoverECDSASigner(signHash, stripped) == signer;
        } else if (signatureType == SignatureType.ETH_SIGN) {
            bytes32 hash = keccak256(
                abi.encodePacked("\x19Ethereum Signed Message:\n32", signHash)
            );
            return recoverECDSASigner(hash, stripped) == signer;
        } else {
            return false;
        }
    }

    function verifyERC1271Signature(
        bytes32 signHash,
        address signer,
        bytes   memory signature
        )
        private
        view
        returns(bool)
    {
        bytes memory callData = abi.encodeWithSelector(
            ERC1271(0).isValidSignature.selector,
            abi.encode(signHash),
            signature
        );
        (bool success, bytes memory result) = signer.staticcall(callData);
        return (
            success &&
            result.length == 32 &&
            result.toBytes4(0) == ERC1271_MAGICVALUE
        );
    }

    function recoverECDSASigner(
        bytes32      signHash,
        bytes memory signature
        )
        internal
        pure
        returns (address)
    {
        if (signature.length != 65) {
            return address(0);
        }

        bytes32 r;
        bytes32 s;
        uint8   v;
        // we jump 32 (0x20) as the first slot of bytes contains the length
        // we jump 65 (0x41) per signature
        // for v we load 32 bytes ending with v (the first 31 come from s) then apply a mask
        assembly {
            r := mload(add(signature, 0x20))
            s := mload(add(signature, 0x40))
            v := and(mload(add(signature, 0x41)), 0xff)
        }
        // See https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/cryptography/ECDSA.sol
        if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {
            return address(0);
        }
        if (v == 27 || v == 28) {
            return ecrecover(signHash, v, r, s);
        } else {
            return address(0);
        }
    }
}








/*

  Copyright 2017 Loopring Project Ltd (Loopring Foundation).

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
*/



/*

  Copyright 2017 Loopring Project Ltd (Loopring Foundation).

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
*/



/// @title ReentrancyGuard
/// @author Brecht Devos - <[email protected]>
/// @dev Exposes a modifier that guards a function against reentrancy
///      Changing the value of the same storage value multiple times in a transaction
///      is cheap (starting from Istanbul) so there is no need to minimize
///      the number of times the value is changed
contract ReentrancyGuard
{
    //The default value must be 0 in order to work behind a proxy.
    uint private _guardValue;

    modifier nonReentrant()
    {
        require(_guardValue == 0, "REENTRANCY");
        _guardValue = 1;
        _;
        _guardValue = 0;
    }
}



/*

  Copyright 2017 Loopring Project Ltd (Loopring Foundation).

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
*/







/// @title Module
/// @dev Base contract for all smart wallet modules.
///
/// @author Daniel Wang - <[email protected]>
///
/// The design of this contract is inspired by Argent's contract codebase:
/// https://github.com/argentlabs/argent-contracts
interface Module
{
    /// @dev Activates the module for the given wallet (msg.sender) after the module is added.
    ///      Warning: this method shall ONLY be callable by a wallet.
    function activate() external;

    /// @dev Deactivates the module for the given wallet (msg.sender) before the module is removed.
    ///      Warning: this method shall ONLY be callable by a wallet.
    function deactivate() external;
}



/// @title BaseModule
/// @dev This contract implements some common functions that are likely
///      be useful for all modules.
///
/// @author Daniel Wang - <[email protected]>
///
/// The design of this contract is inspired by Argent's contract codebase:
/// https://github.com/argentlabs/argent-contracts
contract BaseModule is ReentrancyGuard, Module
{
    event Activated   (address indexed wallet);
    event Deactivated (address indexed wallet);

    modifier onlyFromWallet(address wallet) virtual
    {
        require(msg.sender == wallet, "NOT_FROM_WALLET");
        _;
    }

    modifier onlyFromMetaTx() virtual {
        require(msg.sender == address(this), "NOT_FROM_META_TX");
        _;
    }

    modifier onlyFromWalletOwner(address wallet) virtual {
        require(msg.sender == Wallet(wallet).owner(), "NOT_FROM_WALLET_OWNER");
        _;
    }

    modifier onlyFromMetaTxOrWalletOwner(address wallet) virtual {
        require(
            msg.sender == address(this) || msg.sender == Wallet(wallet).owner(),
            "NOT_FROM_METATX_OR_WALLET_OWNER");
        _;
    }

    modifier onlyFromMetaTxOrOwner(address owner) virtual {
        require(
            msg.sender == address(this) || msg.sender == owner,
            "NOT_FROM_METATX_OR_OWNER");
        _;
    }

    modifier onlyWalletOwner(address wallet, address addr) virtual {
        require(Wallet(wallet).owner() == addr, "NOT_WALLET_OWNER");
        _;
    }

    modifier notWalletOwner(address wallet, address addr) virtual {
        require(Wallet(wallet).owner() != addr, "IS_WALLET_OWNER");
        _;
    }

    function addModule(
        address wallet,
        address module
        )
        external
        nonReentrant
        onlyFromMetaTxOrWalletOwner(wallet)
    {
        Wallet(wallet).addModule(module);
    }

    /// @dev This method will cause an re-entry to the same module contract.
    function activate()
        external
        override
        virtual
    {
        address wallet = msg.sender;
        bindMethods(wallet);
        emit Activated(wallet);
    }

    /// @dev This method will cause an re-entry to the same module contract.
    function deactivate()
        external
        override
        virtual
    {
        address wallet = msg.sender;
        unbindMethods(wallet);
        emit Deactivated(wallet);
    }

    ///.@dev Gets the list of methods for binding to wallets.
    ///      Sub-contracts should override this method to provide methods for
    ///      wallet binding.
    /// @return methods A list of method selectors for binding to the wallet
    ///         when this module is activated for the wallet.
    function bindableMethods()
        public
        pure
        virtual
        returns (bytes4[] memory methods)
    {
    }

    // ===== internal & private methods =====

    /// @dev Binds all methods to the given wallet.
    function bindMethods(address wallet)
        internal
    {
        Wallet w = Wallet(wallet);
        bytes4[] memory methods = bindableMethods();
        for (uint i = 0; i < methods.length; i++) {
            w.bindMethod(methods[i], address(this));
        }
    }

    /// @dev Unbinds all methods from the given wallet.
    function unbindMethods(address wallet)
        internal
    {
        Wallet w = Wallet(wallet);
        bytes4[] memory methods = bindableMethods();
        for (uint i = 0; i < methods.length; i++) {
            w.bindMethod(methods[i], address(0));
        }
    }

    function transactCall(
        address wallet,
        address to,
        uint    value,
        bytes   memory data
        )
        internal
        returns (bytes memory)
    {
        return Wallet(wallet).transact(uint8(1), to, value, data);
    }

    // Special case for transactCall to support transfers on "bad" ERC20 tokens
    function transactTokenTransfer(
        address wallet,
        address token,
        address to,
        uint    amount
        )
        internal
        returns (bool success)
    {
        bytes memory txData = abi.encodeWithSelector(
            ERC20(0).transfer.selector,
            to,
            amount
        );
        bytes memory returnData = transactCall(wallet, token, 0, txData);
        // `transactCall` will revert if the call was unsuccessful.
        // The only extra check we have to do is verify if the return value (if there is any) is correct.
        if (returnData.length > 0) {
            success = abi.decode(returnData, (bool));
        } else {
            // If there is no return value then a failure would have resulted in a revert
            success = true;
        }
    }

    // Special case for transactCall to support approvals on "bad" ERC20 tokens
    function transactTokenApprove(
        address wallet,
        address token,
        address spender,
        uint    amount
        )
        internal
        returns (bool success)
    {
        bytes memory txData = abi.encodeWithSelector(
            ERC20(0).approve.selector,
            spender,
            amount
        );
        bytes memory returnData = transactCall(wallet, token, 0, txData);
        // `transactCall` will revert if the call was unsuccessful.
        // The only extra check we have to do is verify if the return value (if there is any) is correct.
        if (returnData.length > 0) {
            success = abi.decode(returnData, (bool));
        } else {
            // If there is no return value then a failure would have resulted in a revert
            success = true;
        }
    }

    function transactDelegateCall(
        address wallet,
        address to,
        uint    value,
        bytes   memory data
        )
        internal
        returns (bytes memory)
    {
        return Wallet(wallet).transact(uint8(2), to, value, data);
    }

    function transactStaticCall(
        address wallet,
        address to,
        bytes   memory data
        )
        internal
        returns (bytes memory)
    {
        return Wallet(wallet).transact(uint8(3), to, 0, data);
    }
}



/// @title MetaTxModule
/// @dev This is the base module for supporting meta-transactions.
///      A MetaTxModule will only relay transactions on itself, and the methods
///      relayed must as the target wallet address as its first argument, unless
///      the `extractWalletAddress` is overridden.
///
/// @author Daniel Wang - <[email protected]>
///
/// The design of this contract is inspired by Argent's contract codebase:
/// https://github.com/argentlabs/argent-contracts

abstract contract MetaTxModule is BaseModule
{
    using MathUint      for uint;
    using AddressUtil   for address;
    using SignatureUtil for bytes32;
    using BytesUtil     for bytes;

    struct WalletState
    {
        uint nonce;
        mapping (bytes32 => bool) metaTxHash;
    }

    struct GasSettings
    {
        address token;
        uint    price;
        uint    limit;
        uint    overhead;
        address recipient;
    }

    struct MetaTransaction
    {
        address wallet;
        address module;
        uint    value;
        bytes   data;
        uint    nonce;
        uint    validUntil;
        address gasToken;
        uint    gasPrice;
        uint    gasLimit;
        uint    gasOverhead;
        address feeRecipient;
    }

    bytes32 constant public METATRANSACTION_TYPEHASH = keccak256(
        "MetaTransaction(address wallet,address module,uint256 value,bytes data,uint256 nonce,uint256 validUntil,address gasToken,uint256 gasPrice,uint256 gasLimit,uint256 gasOverhead,address feeRecipient)"
    );

    bytes32    public DOMAIN_SEPARATOR;
    Controller public controller;

    mapping (address => WalletState) public wallets;

    event MetaTxExecuted(
        address indexed transactor,
        address indexed wallet,
        uint    nonce,
        bytes32 metaTxHash,
        uint    gasUsed,
        bool    success,
        bytes   returnData
    );

    modifier onlyFromMetaTx override
    {
        require(msg.sender == address(this), "NOT_FROM_THIS_MODULE");
        _;
    }

    constructor(Controller _controller)
        public
        BaseModule()
    {
        DOMAIN_SEPARATOR = EIP712.hash(EIP712.Domain("Loopring Wallet MetaTxModule", "1.0", address(this)));
        controller = _controller;
    }

    function quotaStore()
        internal
        view
        virtual
        returns (address)
    {
        return address(0);
    }

    function isWalletOwnerOrGuardian(address wallet, address addr)
        internal
        view
        returns (bool)
    {
        return Wallet(wallet).owner() == addr ||
            controller.securityStore().isGuardian(wallet, addr);
    }

    function isWalletOwnerOrGuardian(address wallet, address[] memory addrs)
        internal
        view
        returns (bool)
    {
        if (addrs.length == 0) return false;

        for (uint i = 0; i < addrs.length; i++) {
            if (!isWalletOwnerOrGuardian(wallet, addrs[i])) {
                return false;
            }
        }
        return true;
    }

    /// @dev Execute a signed meta transaction.
    ///      This method can be called by any relayer without restriction. The relayer
    ///      will pay for transaction gas in Ether and charge the wallet Ether or other
    ///      ERC20 tokens as fee. If gasPrice is set to 0, then the relayer won't charge
    ///      the wallet any fee.
    ///
    ///      Important! This function needs to be safe against re-entrancy by using
    ///      the 'Checks Effects Interactions' pattern! We do not use `nonReentrant`
    ///      because this function is used to call into the same contract.
    ///
    /// @param data The raw transaction to be performed on this module.
    /// @param nonce The nonce of this meta transaction. When nonce is 0, this module will
    ///              make sure the transaction's metaTxHash is unique; otherwise, the module
    ///              requires the nonce is greater than the last nonce used by the same
    ///              wallet, but not by more than `block.number * 2^128`.
    /// @param validUntil The expiry timestamp
    /// @param gasSetting A list that contains `gasToken` address, `gasPrice`, `gasLimit`,
    ///                   `gasOverhead` and `feeRecipient`. To pay fee in Ether, use address(0) as gasToken.
    ///                   To receive reimbursement at `msg.sender`, use address(0) as feeRecipient.
    /// @param signatures The signatures of the signers.
    /// @param signers The signers needed for the transaction.
    function executeMetaTx(
        bytes     memory data,
        uint      nonce,
        uint      validUntil,
        uint[5]   memory gasSetting, // [gasToken address][gasPrice][gasLimit][gasOverhead][feeRecipient]
        bytes[]   memory signatures,
        address[] memory signers
        )
        public
        payable
    {
        require(validUntil >= now, "EXPIRED");

        GasSettings memory gasSettings = GasSettings(
            address(gasSetting[0]),
            gasSetting[1],
            gasSetting[2],
            gasSetting[3],
            address(gasSetting[4])
        );
        require(gasSettings.limit > 0, "INVALID_GAS_LIMIT");

        address wallet = extractWalletAddress(data);
        bytes32 metaTxHash = EIP712.hashPacked(
            DOMAIN_SEPARATOR,
            hash(
                MetaTransaction(
                    wallet,
                    address(this),
                    msg.value,
                    data,
                    nonce,
                    validUntil,
                    gasSettings.token,
                    gasSettings.price,
                    gasSettings.limit,
                    gasSettings.overhead,
                    gasSettings.recipient
                )
            )
        );

        // Get the signers necessary for this meta transaction.
        require(checkSigners(wallet, data, signers), "METATX_UNAUTHORIZED");
        require(metaTxHash.verifySignatures(signers, signatures), "INVALID_SIGNATURES");

        // Mark the transaction as used before doing the call to guard against re-entrancy
        // (the only exploit possible here is that the transaction can be executed multiple times).
        saveExecutedMetaTx(wallet, nonce, metaTxHash);

        // Deposit msg.value to the wallet so it can be used from the wallet
        if (msg.value > 0) {
            wallet.sendETHAndVerify(msg.value, gasleft());
        }

        require(gasleft() >= (gasSettings.limit.mul(64) / 63).add(60000), "INSUFFICIENT_GAS");
        uint gasUsed = gasleft();
        // solium-disable-next-line security/no-call-value
        (bool success, bytes memory returnData) = address(this).call{gas: gasSettings.limit}(data);
        gasUsed = gasUsed - gasleft();
        // The gas amount measured could be a little bit higher because of the extra costs to do the call itself
        gasUsed = gasUsed < gasSettings.limit ? gasUsed : gasSettings.limit;

        emit MetaTxExecuted(msg.sender, wallet, nonce, metaTxHash, gasUsed, success, returnData);

        if (gasSettings.price != 0) {
            reimburseGasFee(wallet, gasSettings, gasUsed);
        }
    }

    /// @dev Returns the last nonce used by a wallet.
    /// @param wallet The wallet's address.
    /// @return Last nonce used.
    function lastNonce(address wallet)
        public
        view
        returns (uint)
    {
        return wallets[wallet].nonce;
    }

    /// @dev Collects tokens and ether owned by this module to a controlled address.
    /// @param tokens The list of tokens and ether to collect.
    function collectTokens(address[] calldata tokens)
        external
        nonReentrant
    {
        address to = controller.collectTo();

        for (uint i = 0; i < tokens.length; i++) {
            address token = tokens[i];
            if (token == address(0)) {
                uint amount = address(this).balance;
                to.sendETHAndVerify(amount, gasleft());
            } else {
                uint amount = ERC20(token).balanceOf(address(this));
                if (amount > 0) {
                    // Do not check the return value to support "bad" ERC20 tokens
                    ERC20(token).transfer(to, amount);
                }
            }
        }
    }

    // ---- internal functions -----

    /// @dev Validate the list of signers for the given meta transaction.
    ///      Additional validation of the signers can also be done inside this function.
    /// @param wallet The wallet address.
    /// @param method The method selector.
    /// @param data The call data.
    /// @param signers The list of addresses which have signed the meta transaction
    /// @return True if the list of signers are as expected, else False
    function verifySigners(
        address   wallet,
        bytes4    method,
        bytes     memory data,
        address[] memory signers
        )
        internal
        view
        virtual
        returns (bool);

    /// @dev Check if the specified signer is the only signer
    function isOnlySigner(address signer, address[] memory signers)
        internal
        pure
        virtual
        returns (bool)
    {
        return (signers.length == 1 && signers[0] == signer);
    }

    /// @dev For all relayed method, the first parameter must be the wallet address.
    function extractWalletAddress(bytes memory data)
        internal
        view
        virtual
        returns (address wallet)
    {
        wallet = extractAddressFromCallData(data, 0);
    }

    /// @dev Returns the address stored in the call data
    ///      at the specified function parameter index.
    ///      Example: function bar(uint value, address signer, bytes data);
    ///               To extact `signer` use parameterIdx := 1
    function extractAddressFromCallData(
        bytes memory data,
        uint  parameterIdx
        )
        internal
        pure
        returns (address addr)
    {
        addr = data.toAddress(4 + 32 * parameterIdx + 12);
    }

    /// @dev Returns a read-only array with the addresses stored in the call data
    ///      at the specified function parameter index.
    ///      Example: function bar(address[] signers, uint value);
    ///               To extact `signers` use parameterIdx := 0
    ///      Example: function foo(address wallet, address[] signers, address[] contracts);
    ///               To extact `signers` use parameterIdx := 1
    ///               To extact `contracts` use parameterIdx := 2
    function extractAddressesFromCallData(
        bytes memory data,
        uint  parameterIdx
        )
        internal
        pure
        returns (address[] memory addresses)
    {
        // Find the offset of the function parameter in the call data
        uint dataOffset = data.toUint(4 + 32 * parameterIdx);
        // Make sure enough bytes are in data to store the complete array
        uint length = data.toUint(4 + dataOffset);
        require(data.length >= 4 + dataOffset + 32 * (1 + length), "INVALID_DATA");
        // Extract the signers by copying the pointer at the beginning of the array
        // An extra offset of 36 is applied: 32(length) + 4(sig)
        assembly { addresses := add(data, add(36, dataOffset)) }
    }

    function hash(MetaTransaction memory _tx)
        internal
        pure
        returns (bytes32)
    {
        return keccak256(
            abi.encode(
                METATRANSACTION_TYPEHASH,
                _tx.wallet,
                _tx.module,
                _tx.value,
                keccak256(_tx.data),
                _tx.nonce,
                _tx.validUntil,
                _tx.gasToken,
                _tx.gasPrice,
                _tx.gasLimit,
                _tx.gasOverhead,
                _tx.feeRecipient
            )
        );
    }

    function extractMethod(bytes memory data)
        internal
        pure
        returns (bytes4 method)
    {
        return data.toBytes4(0);
    }

    function reimburseGasFee(
        address     wallet,
        GasSettings memory gasSettings,
        uint        gasUsed
        )
        private
    {
        uint gasCost = gasUsed.add(gasSettings.overhead).mul(gasSettings.price);
        updateQuota(wallet, gasSettings.token, gasCost);

        address feeRecipient = (gasSettings.recipient == address(0)) ? msg.sender : gasSettings.recipient;
        if (gasSettings.token == address(0)) {
            transactCall(wallet, feeRecipient, gasCost, "");
        } else {
            require(
                transactTokenTransfer(wallet, gasSettings.token, feeRecipient, gasCost),
                "TRANSFER_FAILED"
            );
        }
    }

    // ---- private functions -----

    function checkSigners(
        address   wallet,
        bytes     memory data,
        address[] memory signers
        )
        private
        view
        returns (bool)
    {
        bytes4 method = extractMethod(data);
        if (method == this.addModule.selector) {
            return isOnlySigner(Wallet(wallet).owner(), signers);
        } else {
            return verifySigners(wallet, method, data, signers);
        }
    }

    /// @dev Save the meta-transaction to history.
    ///      This method must throw if the transaction is not unique or the nonce is invalid.
    /// @param wallet The target wallet.
    /// @param nonce The nonce
    /// @param metaTxHash The signed hash of the transaction
    function saveExecutedMetaTx(
        address wallet,
        uint    nonce,
        bytes32 metaTxHash
        )
        private
    {
        if (nonce == 0) {
            require(!wallets[wallet].metaTxHash[metaTxHash], "INVALID_HASH");
            wallets[wallet].metaTxHash[metaTxHash] = true;
        } else {
            require(nonce > wallets[wallet].nonce, "NONCE_TOO_SMALL");
            require((nonce >> 128) <= (block.number), "NONCE_TOO_LARGE");
            wallets[wallet].nonce = nonce;
        }
    }

    function updateQuota(
        address wallet,
        address token,
        uint    amount
        )
        internal
    {
        if (amount > 0 && quotaStore() != address(0)) {
            uint value = controller.priceOracle().tokenValue(token, amount);
            QuotaStore(quotaStore()).checkAndAddToSpent(wallet, value);
        }
    }

    function tryToUpdateQuota(
        address wallet,
        address token,
        uint    amount
        )
        internal
        returns (bool)
    {
        if (quotaStore() != address(0)) {
            uint value = controller.priceOracle().tokenValue(token, amount);
            try QuotaStore(quotaStore()).checkAndAddToSpent(wallet, value) {
                return true;
            } catch Error(string memory /*reason*/) {
                return false;
            }
        } else {
            return true;
        }
    }
}



/*

  Copyright 2017 Loopring Project Ltd (Loopring Foundation).

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
*/






/// @title GuardianUtils
/// @author Brecht Devos - <[email protected]>
library GuardianUtils
{
    uint constant public MAX_NUM_GROUPS = 16;

    enum SigRequirement
    {
        OwnerNotAllowed,
        OwnerAllowed,
        OwnerRequired
    }

    function requireMajority(
        SecurityStore   securityStore,
        address         wallet,
        address[]       memory signers,
        SigRequirement  requirement
        )
        internal
        view
        returns (bool)
    {
        // We always need at least one signer
        if (signers.length == 0) {
            return false;
        }

        // Calculate total group sizes
        Data.Guardian[] memory allGuardians = securityStore.guardians(wallet);
        uint[MAX_NUM_GROUPS] memory total = countGuardians(allGuardians);

        // Calculate how many signers are in each group
        bool walletOwnerSigned = false;
        Data.Guardian[] memory signingGuardians = new Data.Guardian[](signers.length);
        address walletOwner = Wallet(wallet).owner();
        uint numGuardians = 0;
        address lastSigner;
        for (uint i = 0; i < signers.length; i++) {
            // Check for duplicates
            require(signers[i] > lastSigner, "INVALID_SIGNERS_ORDER");
            lastSigner = signers[i];

            if (signers[i] == walletOwner) {
                walletOwnerSigned = true;
            } else {
                require(securityStore.isGuardian(wallet, signers[i]), "SIGNER_NOT_GUARDIAN");
                signingGuardians[numGuardians++] = securityStore.getGuardian(wallet, signers[i]);
            }
        }

        // Check owner requirements
        if (requirement == SigRequirement.OwnerRequired) {
            require(walletOwnerSigned, "WALLET_OWNER_SIGNATURE_REQUIRED");
        } else if (requirement == SigRequirement.OwnerNotAllowed) {
            require(!walletOwnerSigned, "WALLET_OWNER_SIGNATURE_NOT_ALLOWED");
        }

        // Update the signingGuardians array with the actual number of guardians that have signed
        // (could be 1 less than the length if the owner signed as well)
        assembly { mstore(signingGuardians, numGuardians) }
        uint[MAX_NUM_GROUPS] memory signed = countGuardians(signingGuardians);

        // Count the number of votes
        uint totalNumVotes = 0;
        uint numVotes = 0;
        if (requirement != SigRequirement.OwnerNotAllowed) {
            totalNumVotes += 1;
            numVotes += walletOwnerSigned ? 1 : 0;
        }
        if (total[0] > 0) {
            // Group 0: No grouping
            totalNumVotes += total[0];
            numVotes += signed[0];
        }
        for (uint i = 1; i < MAX_NUM_GROUPS; i++) {
            if (total[i] > 0) {
                totalNumVotes += 1;
                if (i < 6) {
                    // Groups [1, 5]: Single guardian needed per group
                    numVotes += signed[i] > 0 ? 1 : 0;
                } else if (i < 11) {
                    // Groups [6, 10]: Half the guardians needed per group
                    numVotes += hasHalf(signed[i], total[i]) ? 1 : 0;
                } else {
                    // Groups [11, 15]: A majority of guardians needed per group
                    numVotes += hasMajority(signed[i], total[i]) ? 1 : 0;
                }
            }
        }

        // We need a majority of votes
        require(hasMajority(numVotes, totalNumVotes), "NOT_ENOUGH_SIGNERS");

        return true;
    }

    function hasHalf(
        uint count,
        uint total
        )
        internal
        pure
        returns (bool)
    {
        return (count >= (total + 1) / 2);
    }

    function hasMajority(
        uint count,
        uint total
        )
        internal
        pure
        returns (bool)
    {
        return (count >= (total / 2) + 1);
    }

    function countGuardians(
        Data.Guardian[] memory guardians
        )
        internal
        pure
        returns (uint[MAX_NUM_GROUPS] memory total)
    {
        for (uint i = 0; i < guardians.length; i++) {
            total[guardians[i].group]++;
        }
    }
}



/// @title SecurityStore
///
/// @author Daniel Wang - <[email protected]>
///
/// The design of this contract is inspired by Argent's contract codebase:
/// https://github.com/argentlabs/argent-contracts
abstract contract SecurityModule is MetaTxModule
{
    // The minimal number of guardians for recovery and locking.
    uint constant public MIN_ACTIVE_GUARDIANS = 2;

    event WalletLock(
        address indexed wallet,
        uint            lock
    );

    constructor(Controller _controller)
        public
        MetaTxModule(_controller)
    {
    }

    // overriding
    modifier onlyFromWalletOwner(address wallet) override {
        require(
            msg.sender == Wallet(wallet).owner(),
            "NOT_FROM_WALLET_OWNER"
        );
        controller.securityStore().touchLastActive(wallet);
        _;
    }

    // overridding
    modifier onlyFromMetaTxOrWalletOwner(address wallet) override {
        require(
            msg.sender == Wallet(wallet).owner() ||
            msg.sender == address(this),
            "NOT_FROM_METATX_OR_WALLET_OWNER"
        );
        controller.securityStore().touchLastActive(wallet);
        _;
    }

    modifier onlyWhenWalletLocked(address wallet)
    {
        require(isWalletLocked(wallet), "NOT_LOCKED");
        _;
    }

    modifier onlyWhenWalletUnlocked(address wallet)
    {
        require(!isWalletLocked(wallet), "LOCKED");
        _;
    }

    modifier onlyWalletGuardian(address wallet, address guardian)
    {
        require(controller.securityStore().isGuardian(wallet, guardian), "NOT_GUARDIAN");
        _;
    }

    modifier notWalletGuardian(address wallet, address guardian)
    {
        require(!controller.securityStore().isGuardian(wallet, guardian), "IS_GUARDIAN");
        _;
    }

    modifier onlyFromMetaTxOr(address guardian)
    {
        require(
            msg.sender == address(this) || msg.sender == guardian,
            "UNAUTHORIZED"
        );
        _;
    }

    modifier onlyHaveEnoughGuardians(address wallet)
    {
        require(
            controller.securityStore().numGuardians(wallet) >= MIN_ACTIVE_GUARDIANS,
            "NO_ENOUGH_ACTIVE_GUARDIANS"
        );
        _;
    }

    // ----- internal methods -----

    function quotaStore()
        internal
        view
        override
        returns (address)
    {
        return address(controller.quotaStore());
    }

    function lockWallet(address wallet)
        internal
    {
        lockWallet(wallet, controller.defaultLockPeriod());
    }

    function lockWallet(address wallet, uint _lockPeriod)
        internal
        onlyWhenWalletUnlocked(wallet)
    {
        // cannot lock the wallet twice by different modules.
        require(_lockPeriod > 0, "ZERO_VALUE");
        uint lock = now + _lockPeriod;
        controller.securityStore().setLock(wallet, lock);
        emit WalletLock(wallet, lock);
    }

    function unlockWallet(address wallet, bool forceUnlock)
        internal
    {
        (uint _lock, address _lockedBy) = controller.securityStore().getLock(wallet);
        if (_lock > now) {
            require(forceUnlock || _lockedBy == address(this), "UNABLE_TO_UNLOCK");
            controller.securityStore().setLock(wallet, 0);
            emit WalletLock(wallet, 0);
        }
    }

    function getWalletLock(address wallet)
        internal
        view
        returns (uint _lock, address _lockedBy)
    {
        return controller.securityStore().getLock(wallet);
    }

    function isWalletLocked(address wallet)
        internal
        view
        returns (bool)
    {
        (uint _lock,) = controller.securityStore().getLock(wallet);
        return _lock > now;
    }
}



/// @title TransferModule
abstract contract TransferModule is SecurityModule
{
    event Transfered(
        address indexed wallet,
        address indexed token,
        address indexed to,
        uint            amount,
        bytes           logdata
    );
    event Approved(
        address indexed wallet,
        address indexed token,
        address         spender,
        uint            amount
    );
    event ContractCalled(
        address indexed wallet,
        address indexed to,
        uint            value,
        bytes           data
    );

    constructor(Controller _controller)
        public
        SecurityModule(_controller)
    {
    }

    function transferInternal(
        address wallet,
        address token,
        address to,
        uint    amount,
        bytes   memory logdata
        )
        internal
    {
        if (token == address(0)) {
            transactCall(wallet, to, amount, "");
        } else {
            require(
                transactTokenTransfer(wallet, token, to, amount),
                "TRANSFER_FAILED"
            );
        }
        emit Transfered(wallet, token, to, amount, logdata);
    }

    function approveInternal(
        address wallet,
        address token,
        address spender,
        uint    amount
        )
        internal
        returns (uint additionalAllowance)
    {
        require(token != address(0), "UNSUPPORTED");

        // Current allowance
        uint allowance = ERC20(token).allowance(wallet, spender);

        if (amount != allowance) {
            // First reset the approved amount if needed
            bytes memory txData;
            if (allowance > 0) {
                require(
                    transactTokenApprove(wallet, token, spender, 0),
                    "APPROVAL_FAILED"
                );
            }

            // Now approve the requested amount
            require(
                transactTokenApprove(wallet, token, spender, amount),
                "APPROVAL_FAILED"
            );
        }

        // If we increased the allowance, calculate by how much
        if (amount > allowance) {
            additionalAllowance = amount.sub(allowance);
        }
        emit Approved(wallet, token, spender, amount);
    }

    function callContractInternal(
        address wallet,
        address to,
        uint    value,
        bytes   memory txData
        )
        internal
        virtual
        returns (bytes memory returnData)
    {
        // Calls from the wallet to itself are deemed special
        // (e.g. this is used for updating the wallet implementation)
        // We also disallow calls to module functions directly
        // (e.g. this is used for some special wallet <-> module interaction)
        require(wallet != to && !Wallet(wallet).hasModule(to), "CALL_DISALLOWED");
        returnData = transactCall(wallet, to, value, txData);
        emit ContractCalled(wallet, to, value, txData);
    }
}


/// @title QuotaTransfers
contract QuotaTransfers is TransferModule
{
    uint public delayPeriod;

    constructor(
        Controller  _controller,
        uint       _delayPeriod
        )
        public
        TransferModule(_controller)
    {
        require(_delayPeriod > 0, "INVALID_DELAY");
        delayPeriod = _delayPeriod;
    }

    function changeDailyQuota(
        address wallet,
        uint    newQuota
        )
        external
        nonReentrant
        onlyWhenWalletUnlocked(wallet)
        onlyFromMetaTxOrWalletOwner(wallet)
    {
        controller.quotaStore().changeQuota(wallet, newQuota, now.add(delayPeriod));
    }

    function changeDailyQuotaImmediately(
        address            wallet,
        uint               newQuota
        )
        external
        nonReentrant
        onlyWhenWalletUnlocked(wallet)
        onlyFromMetaTx
    {
        controller.quotaStore().changeQuota(wallet, newQuota, now);
    }

    function transferToken(
        address        wallet,
        address        token,
        address        to,
        uint           amount,
        bytes calldata logdata
        )
        external
        nonReentrant
        onlyWhenWalletUnlocked(wallet)
        onlyFromMetaTxOrWalletOwner(wallet)
    {
        (bool whitelisted,) = controller.whitelistStore().isWhitelisted(wallet, to);
        if (!whitelisted) {
            updateQuota(wallet, token, amount);
        }

        transferInternal(wallet, token, to, amount, logdata);
    }

    function callContract(
        address            wallet,
        address            to,
        uint               value,
        bytes     calldata data
        )
        external
        nonReentrant
        onlyWhenWalletUnlocked(wallet)
        onlyFromMetaTxOrWalletOwner(wallet)
        returns (bytes memory returnData)
    {
        (bool whitelisted,) = controller.whitelistStore().isWhitelisted(wallet, to);
        if (!whitelisted) {
            updateQuota(wallet, address(0), value);
        }

        return callContractInternal(wallet, to, value, data);
    }

    function approveToken(
        address            wallet,
        address            token,
        address            to,
        uint               amount
        )
        external
        nonReentrant
        onlyWhenWalletUnlocked(wallet)
        onlyFromMetaTxOrWalletOwner(wallet)
    {
        uint additionalAllowance = approveInternal(wallet, token, to, amount);
        (bool whitelisted,) = controller.whitelistStore().isWhitelisted(wallet, to);

        if (!whitelisted) {
            updateQuota(wallet, token, additionalAllowance);
        }
    }

    function approveThenCallContract(
        address            wallet,
        address            token,
        address            to,
        uint               amount,
        uint               value,
        bytes     calldata data
        )
        external
        nonReentrant
        onlyWhenWalletUnlocked(wallet)
        onlyFromMetaTxOrWalletOwner(wallet)
        returns (bytes memory returnData)
    {
        uint additionalAllowance = approveInternal(wallet, token, to, amount);
        (bool whitelisted,) = controller.whitelistStore().isWhitelisted(wallet, to);

        if (!whitelisted) {
            updateQuota(wallet, token, additionalAllowance);
            updateQuota(wallet, address(0), value);
        }

        return callContractInternal(wallet, to, value, data);
    }

    function getDailyQuota(address wallet)
        public
        view
        returns (
            uint total,
            uint spent,
            uint available
        )
    {
        total = controller.quotaStore().currentQuota(wallet);
        spent = controller.quotaStore().spentQuota(wallet);
        available = controller.quotaStore().availableQuota(wallet);
    }

    function callContractInternal(
        address wallet,
        address to,
        uint    value,
        bytes   memory txData
        )
        internal
        override
        returns (bytes memory returnData)
    {
        // Disallow general calls to token contracts (for tokens that have price data
        // so the quota is actually used).
        require(controller.priceOracle().tokenValue(to, 1e18) == 0, "CALL_DISALLOWED");
        return super.callContractInternal(wallet, to, value, txData);
    }

    function verifySigners(
        address   wallet,
        bytes4    method,
        bytes     memory /*data*/,
        address[] memory signers
        )
        internal
        view
        override
        returns (bool)
    {
        if (
            method == this.transferToken.selector ||
            method == this.approveToken.selector ||
            method == this.callContract.selector ||
            method == this.approveThenCallContract.selector ||
            method == this.changeDailyQuota.selector
            ) {
            return isOnlySigner(Wallet(wallet).owner(), signers);
        } else if (method == this.changeDailyQuotaImmediately.selector) {
            return GuardianUtils.requireMajority(
                controller.securityStore(),
                wallet,
                signers,
                GuardianUtils.SigRequirement.OwnerRequired
            );
        } else {
            revert("INVALID_METHOD");
        }

    }

}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract Controller","name":"_controller","type":"address"},{"internalType":"uint256","name":"_delayPeriod","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"wallet","type":"address"}],"name":"Activated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"wallet","type":"address"},{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Approved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"wallet","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"data","type":"bytes"}],"name":"ContractCalled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"wallet","type":"address"}],"name":"Deactivated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"transactor","type":"address"},{"indexed":true,"internalType":"address","name":"wallet","type":"address"},{"indexed":false,"internalType":"uint256","name":"nonce","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"metaTxHash","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"gasUsed","type":"uint256"},{"indexed":false,"internalType":"bool","name":"success","type":"bool"},{"indexed":false,"internalType":"bytes","name":"returnData","type":"bytes"}],"name":"MetaTxExecuted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"wallet","type":"address"},{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"logdata","type":"bytes"}],"name":"Transfered","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"wallet","type":"address"},{"indexed":false,"internalType":"uint256","name":"lock","type":"uint256"}],"name":"WalletLock","type":"event"},{"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"METATRANSACTION_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MIN_ACTIVE_GUARDIANS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"activate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"wallet","type":"address"},{"internalType":"address","name":"module","type":"address"}],"name":"addModule","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"wallet","type":"address"},{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"approveThenCallContract","outputs":[{"internalType":"bytes","name":"returnData","type":"bytes"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"wallet","type":"address"},{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approveToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"bindableMethods","outputs":[{"internalType":"bytes4[]","name":"methods","type":"bytes4[]"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"wallet","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"callContract","outputs":[{"internalType":"bytes","name":"returnData","type":"bytes"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"wallet","type":"address"},{"internalType":"uint256","name":"newQuota","type":"uint256"}],"name":"changeDailyQuota","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"wallet","type":"address"},{"internalType":"uint256","name":"newQuota","type":"uint256"}],"name":"changeDailyQuotaImmediately","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"tokens","type":"address[]"}],"name":"collectTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"controller","outputs":[{"internalType":"contract Controller","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"deactivate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"delayPeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint256","name":"validUntil","type":"uint256"},{"internalType":"uint256[5]","name":"gasSetting","type":"uint256[5]"},{"internalType":"bytes[]","name":"signatures","type":"bytes[]"},{"internalType":"address[]","name":"signers","type":"address[]"}],"name":"executeMetaTx","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"wallet","type":"address"}],"name":"getDailyQuota","outputs":[{"internalType":"uint256","name":"total","type":"uint256"},{"internalType":"uint256","name":"spent","type":"uint256"},{"internalType":"uint256","name":"available","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"wallet","type":"address"}],"name":"lastNonce","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"wallet","type":"address"},{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"logdata","type":"bytes"}],"name":"transferToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"wallets","outputs":[{"internalType":"uint256","name":"nonce","type":"uint256"}],"stateMutability":"view","type":"function"}]

60806040523480156200001157600080fd5b5060405162004fee38038062004fee833981016040819052620000349162000186565b818080620000c060405180606001604052806040518060400160405280601c81526020017f4c6f6f7072696e672057616c6c6574204d65746154784d6f64756c65000000008152508152602001604051806040016040528060038152602001620312e360ec1b8152508152602001306001600160a01b03168152506200011960201b62004c2c1760201c565b600155600280546001600160a01b039092166001600160a01b03199092169190911790555050806200010f5760405162461bcd60e51b8152600401620001069062000256565b60405180910390fd5b600455506200027d565b60405160009046906200012c90620001c0565b6040518091039020836000015180519060200120846020015180519060200120838660400151604051602001620001689594939291906200022a565b60405160208183030381529060405280519060200120915050919050565b6000806040838503121562000199578182fd5b82516001600160a01b0381168114620001b0578283fd5b6020939093015192949293505050565b7f454950373132446f6d61696e28737472696e67206e616d652c737472696e672081527f76657273696f6e2c75696e7432353620636861696e49642c6164647265737320602082015271766572696679696e67436f6e74726163742960701b604082015260520190565b9485526020850193909352604084019190915260608301526001600160a01b0316608082015260a00190565b6020808252600d908201526c494e56414c49445f44454c415960981b604082015260600190565b614d61806200028d6000396000f3fe60806040526004361061011f5760003560e01c806388666d81116100a0578063c0fd43b411610064578063c0fd43b4146102dc578063d3963a25146102fc578063e321531b1461031c578063f77c47911461034b578063fd6ac3091461036d5761011f565b806388666d811461024557806389b08f111461026557806390502c2e14610285578063afa3363d146102a5578063b1c94d94146102c75761011f565b80632df546f4116100e75780632df546f4146101ae5780633644e515146101ce57806351b42b00146101e35780635a1db8c4146101f857806375529de8146102185761011f565b80630ab9ad33146101245780630f15f4c01461013957806312ef080d1461014e57806313d53dcf1461016e5780632d621c5114610199575b600080fd5b6101376101323660046141ff565b61038d565b005b34801561014557600080fd5b5061013761069f565b34801561015a57600080fd5b50610137610169366004613e2f565b6106e0565b34801561017a57600080fd5b506101836109f0565b6040516101909190614581565b60405180910390f35b3480156101a557600080fd5b506101836109f5565b3480156101ba57600080fd5b506101376101c9366004613e7f565b610a0c565b3480156101da57600080fd5b50610183610d50565b3480156101ef57600080fd5b50610137610d56565b34801561020457600080fd5b50610137610213366004613df7565b610d97565b34801561022457600080fd5b50610238610233366004613f02565b610fb5565b604051610190919061462d565b34801561025157600080fd5b50610137610260366004614000565b61131d565b34801561027157600080fd5b50610183610280366004613dbf565b6115ef565b34801561029157600080fd5b506101376102a036600461402b565b611601565b3480156102b157600080fd5b506102ba611827565b604051610190919061453f565b3480156102d357600080fd5b5061018361182c565b3480156102e857600080fd5b506101836102f7366004613dbf565b611832565b34801561030857600080fd5b50610137610317366004614000565b61184d565b34801561032857600080fd5b5061033c610337366004613dbf565b61196d565b60405161019093929190614b2d565b34801561035757600080fd5b50610360611c81565b60405161019091906144d7565b34801561037957600080fd5b50610238610388366004613f8f565b611c90565b428410156103b65760405162461bcd60e51b81526004016103ad90614996565b60405180910390fd5b6103be613b7a565b506040805160a08101825284516001600160a01b03908116825260208087015190830152858301519282018390526060808701519083015260808087015190911690820152906104205760405162461bcd60e51b81526004016103ad9061472c565b600061042b88611fda565b905060006104c66001546104c1604051806101600160405280866001600160a01b03168152602001306001600160a01b031681526020013481526020018d81526020018c81526020018b815260200187600001516001600160a01b0316815260200187602001518152602001876040015181526020018760600151815260200187608001516001600160a01b0316815250611fed565b61207c565b90506104d3828a866120cb565b6104ef5760405162461bcd60e51b81526004016103ad906148ec565b61050081858763ffffffff61218716565b61051c5760405162461bcd60e51b81526004016103ad90614a49565b610527828983612265565b341561054b57610549345a6001600160a01b038516919063ffffffff61236616565b505b61057f61ea60603f61056b604087604001516123a190919063ffffffff16565b8161057257fe5b049063ffffffff6123d516565b5a101561059e5760405162461bcd60e51b81526004016103ad906149f9565b60005a905060006060306001600160a01b031686604001518d6040516105c4919061436f565b60006040518083038160008787f1925050503d8060008114610602576040519150601f19603f3d011682016040523d82523d6000602084013e610607565b606091505b50915091505a60408701519303928310610625578560400151610627565b825b9250846001600160a01b0316336001600160a01b03167f4d3367ceeab65bf3b68cc4658d780a0f6e4101b2475aa8b6658c2df7851e12bb8d87878787604051610674959493929190614ae7565b60405180910390a3602086015115610691576106918587856123f8565b505050505050505050505050565b336106a9816124be565b6040516001600160a01b038216907f0cc43938d137e7efade6a531f663e78c1fc75257b0d65ffda2fdaf70cb49cdf990600090a250565b600054156107005760405162461bcd60e51b81526004016103ad90614665565b60016000558361070f8161255c565b1561072c5760405162461bcd60e51b81526004016103ad90614a75565b84806001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561076657600080fd5b505afa15801561077a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061079e9190613ddb565b6001600160a01b0316336001600160a01b031614806107bc57503330145b6107d85760405162461bcd60e51b81526004016103ad906148b5565b600260009054906101000a90046001600160a01b03166001600160a01b031663d51b3a1b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561082657600080fd5b505afa15801561083a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061085e9190613ddb565b6001600160a01b031663d36e3517826040518263ffffffff1660e01b815260040161088991906144d7565b600060405180830381600087803b1580156108a357600080fd5b505af11580156108b7573d6000803e3d6000fd5b5050505060006108c987878787612669565b90506000600260009054906101000a90046001600160a01b03166001600160a01b03166337423d5e6040518163ffffffff1660e01b815260040160206040518083038186803b15801561091b57600080fd5b505afa15801561092f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109539190613ddb565b6001600160a01b031663b6b3527289886040518363ffffffff1660e01b81526004016109809291906144eb565b604080518083038186803b15801561099757600080fd5b505afa1580156109ab573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109cf9190614158565b509050806109e2576109e28888846127e7565b505060008055505050505050565b600281565b604051610a01906143e3565b604051809103902081565b60005415610a2c5760405162461bcd60e51b81526004016103ad90614665565b600160005585610a3b8161255c565b15610a585760405162461bcd60e51b81526004016103ad90614a75565b86806001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b158015610a9257600080fd5b505afa158015610aa6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aca9190613ddb565b6001600160a01b0316336001600160a01b03161480610ae857503330145b610b045760405162461bcd60e51b81526004016103ad906148b5565b600260009054906101000a90046001600160a01b03166001600160a01b031663d51b3a1b6040518163ffffffff1660e01b815260040160206040518083038186803b158015610b5257600080fd5b505afa158015610b66573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b8a9190613ddb565b6001600160a01b031663d36e3517826040518263ffffffff1660e01b8152600401610bb591906144d7565b600060405180830381600087803b158015610bcf57600080fd5b505af1158015610be3573d6000803e3d6000fd5b505050506000600260009054906101000a90046001600160a01b03166001600160a01b03166337423d5e6040518163ffffffff1660e01b815260040160206040518083038186803b158015610c3757600080fd5b505afa158015610c4b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c6f9190613ddb565b6001600160a01b031663b6b352728a896040518363ffffffff1660e01b8152600401610c9c9291906144eb565b604080518083038186803b158015610cb357600080fd5b505afa158015610cc7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ceb9190614158565b50905080610cfe57610cfe8989886127e7565b610d418989898989898080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061297692505050565b50506000805550505050505050565b60015481565b33610d6081612a2b565b6040516001600160a01b038216907f749cb6b4c510bc468cf6b9c2086d6f0a54d6b18e25d37bf3200e68eab0880c0090600090a250565b60005415610db75760405162461bcd60e51b81526004016103ad90614665565b600160008190555081806001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b158015610df957600080fd5b505afa158015610e0d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e319190613ddb565b6001600160a01b0316336001600160a01b03161480610e4f57503330145b610e6b5760405162461bcd60e51b81526004016103ad906148b5565b600260009054906101000a90046001600160a01b03166001600160a01b031663d51b3a1b6040518163ffffffff1660e01b815260040160206040518083038186803b158015610eb957600080fd5b505afa158015610ecd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ef19190613ddb565b6001600160a01b031663d36e3517826040518263ffffffff1660e01b8152600401610f1c91906144d7565b600060405180830381600087803b158015610f3657600080fd5b505af1158015610f4a573d6000803e3d6000fd5b5050604051631ed86f1960e01b81526001600160a01b0386169250631ed86f199150610f7a9085906004016144d7565b600060405180830381600087803b158015610f9457600080fd5b505af1158015610fa8573d6000803e3d6000fd5b5050600080555050505050565b6060600054600014610fd95760405162461bcd60e51b81526004016103ad90614665565b600160005587610fe88161255c565b156110055760405162461bcd60e51b81526004016103ad90614a75565b88806001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561103f57600080fd5b505afa158015611053573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110779190613ddb565b6001600160a01b0316336001600160a01b0316148061109557503330145b6110b15760405162461bcd60e51b81526004016103ad906148b5565b600260009054906101000a90046001600160a01b03166001600160a01b031663d51b3a1b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156110ff57600080fd5b505afa158015611113573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111379190613ddb565b6001600160a01b031663d36e3517826040518263ffffffff1660e01b815260040161116291906144d7565b600060405180830381600087803b15801561117c57600080fd5b505af1158015611190573d6000803e3d6000fd5b5050505060006111a28b8b8b8b612669565b90506000600260009054906101000a90046001600160a01b03166001600160a01b03166337423d5e6040518163ffffffff1660e01b815260040160206040518083038186803b1580156111f457600080fd5b505afa158015611208573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061122c9190613ddb565b6001600160a01b031663b6b352728d8c6040518363ffffffff1660e01b81526004016112599291906144eb565b604080518083038186803b15801561127057600080fd5b505afa158015611284573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112a89190614158565b509050806112c7576112bb8c8c846127e7565b6112c78c60008a6127e7565b6113098c8b8a8a8a8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612ac492505050565b600080559c9b505050505050505050505050565b6000541561133d5760405162461bcd60e51b81526004016103ad90614665565b60016000558161134c8161255c565b156113695760405162461bcd60e51b81526004016103ad90614a75565b82806001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156113a357600080fd5b505afa1580156113b7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113db9190613ddb565b6001600160a01b0316336001600160a01b031614806113f957503330145b6114155760405162461bcd60e51b81526004016103ad906148b5565b600260009054906101000a90046001600160a01b03166001600160a01b031663d51b3a1b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561146357600080fd5b505afa158015611477573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061149b9190613ddb565b6001600160a01b031663d36e3517826040518263ffffffff1660e01b81526004016114c691906144d7565b600060405180830381600087803b1580156114e057600080fd5b505af11580156114f4573d6000803e3d6000fd5b50505050600260009054906101000a90046001600160a01b03166001600160a01b031663d9d104846040518163ffffffff1660e01b815260040160206040518083038186803b15801561154657600080fd5b505afa15801561155a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061157e9190613ddb565b6001600160a01b031663054e378285856115a3600454426123d590919063ffffffff16565b6040518463ffffffff1660e01b81526004016115c19392919061451e565b600060405180830381600087803b1580156115db57600080fd5b505af11580156109e2573d6000803e3d6000fd5b60036020526000908152604090205481565b600054156116215760405162461bcd60e51b81526004016103ad90614665565b60016000908155600254604080516306a32ffd60e01b815290516001600160a01b03909216916306a32ffd91600480820192602092909190829003018186803b15801561166d57600080fd5b505afa158015611681573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116a59190613ddb565b905060005b8281101561181d5760008484838181106116c057fe5b90506020020160208101906116d59190613dbf565b90506001600160a01b0381166117095747611702815a6001600160a01b038716919063ffffffff61236616565b5050611814565b6040516370a0823160e01b81526000906001600160a01b038316906370a08231906117389030906004016144d7565b60206040518083038186803b15801561175057600080fd5b505afa158015611764573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117889190614307565b905080156118125760405163a9059cbb60e01b81526001600160a01b0383169063a9059cbb906117be9087908590600401614505565b602060405180830381600087803b1580156117d857600080fd5b505af11580156117ec573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118109190614138565b505b505b506001016116aa565b5050600080555050565b606090565b60045481565b6001600160a01b031660009081526003602052604090205490565b6000541561186d5760405162461bcd60e51b81526004016103ad90614665565b60016000558161187c8161255c565b156118995760405162461bcd60e51b81526004016103ad90614a75565b3330146118b85760405162461bcd60e51b81526004016103ad90614942565b600260009054906101000a90046001600160a01b03166001600160a01b031663d9d104846040518163ffffffff1660e01b815260040160206040518083038186803b15801561190657600080fd5b505afa15801561191a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061193e9190613ddb565b6001600160a01b031663054e37828484426040518463ffffffff1660e01b8152600401610f7a9392919061451e565b6000806000600260009054906101000a90046001600160a01b03166001600160a01b031663d9d104846040518163ffffffff1660e01b815260040160206040518083038186803b1580156119c057600080fd5b505afa1580156119d4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119f89190613ddb565b6001600160a01b031663b0f191dc856040518263ffffffff1660e01b8152600401611a2391906144d7565b60206040518083038186803b158015611a3b57600080fd5b505afa158015611a4f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a739190614307565b9250600260009054906101000a90046001600160a01b03166001600160a01b031663d9d104846040518163ffffffff1660e01b815260040160206040518083038186803b158015611ac357600080fd5b505afa158015611ad7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611afb9190613ddb565b6001600160a01b031663564d3ca7856040518263ffffffff1660e01b8152600401611b2691906144d7565b60206040518083038186803b158015611b3e57600080fd5b505afa158015611b52573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b769190614307565b9150600260009054906101000a90046001600160a01b03166001600160a01b031663d9d104846040518163ffffffff1660e01b815260040160206040518083038186803b158015611bc657600080fd5b505afa158015611bda573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bfe9190613ddb565b6001600160a01b031663a6ba0127856040518263ffffffff1660e01b8152600401611c2991906144d7565b60206040518083038186803b158015611c4157600080fd5b505afa158015611c55573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c799190614307565b929491935050565b6002546001600160a01b031681565b6060600054600014611cb45760405162461bcd60e51b81526004016103ad90614665565b600160005585611cc38161255c565b15611ce05760405162461bcd60e51b81526004016103ad90614a75565b86806001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b158015611d1a57600080fd5b505afa158015611d2e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d529190613ddb565b6001600160a01b0316336001600160a01b03161480611d7057503330145b611d8c5760405162461bcd60e51b81526004016103ad906148b5565b600260009054906101000a90046001600160a01b03166001600160a01b031663d51b3a1b6040518163ffffffff1660e01b815260040160206040518083038186803b158015611dda57600080fd5b505afa158015611dee573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e129190613ddb565b6001600160a01b031663d36e3517826040518263ffffffff1660e01b8152600401611e3d91906144d7565b600060405180830381600087803b158015611e5757600080fd5b505af1158015611e6b573d6000803e3d6000fd5b505050506000600260009054906101000a90046001600160a01b03166001600160a01b03166337423d5e6040518163ffffffff1660e01b815260040160206040518083038186803b158015611ebf57600080fd5b505afa158015611ed3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ef79190613ddb565b6001600160a01b031663b6b352728a8a6040518363ffffffff1660e01b8152600401611f249291906144eb565b604080518083038186803b158015611f3b57600080fd5b505afa158015611f4f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f739190614158565b50905080611f8757611f87896000896127e7565b611fc989898989898080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612ac492505050565b600080559998505050505050505050565b6000611fe7826000612bfa565b92915050565b6000604051611ffb906143e3565b604051809103902082600001518360200151846040015185606001518051906020012086608001518760a001518860c001518960e001518a61010001518b61012001518c610140015160405160200161205f9c9b9a9998979695949392919061458a565b604051602081830303815290604052805190602001209050919050565b600060405180604001604052806002815260200161190160f01b81525083836040516020016120ad9392919061438b565b60405160208183030381529060405280519060200120905092915050565b6000806120d784612c12565b90506001600160e01b031981166316876e3160e21b14156121745761216c856001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561212e57600080fd5b505afa158015612142573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121669190613ddb565b84612c24565b915050612180565b61216c85828686612c63565b9392505050565b600081518351146121aa5760405162461bcd60e51b81526004016103ad90614757565b6000805b845181101561225957816001600160a01b03168582815181106121cd57fe5b60200260200101516001600160a01b0316116121fb5760405162461bcd60e51b81526004016103ad90614834565b84818151811061220757fe5b602002602001015191506122428686838151811061222157fe5b602002602001015186848151811061223557fe5b6020026020010151612e23565b61225157600092505050612180565b6001016121ae565b50600195945050505050565b816122ea576001600160a01b038316600090815260036020908152604080832084845260010190915290205460ff16156122b15760405162461bcd60e51b81526004016103ad90614a23565b6001600160a01b03831660009081526003602090815260408083208484526001908101909252909120805460ff19169091179055612361565b6001600160a01b03831660009081526003602052604090205482116123215760405162461bcd60e51b81526004016103ad906147e4565b43608083901c11156123455760405162461bcd60e51b81526004016103ad90614863565b6001600160a01b03831660009081526003602052604090208290555b505050565b60006123826001600160a01b038516848463ffffffff612f4e16565b9050806121805760405162461bcd60e51b81526004016103ad906147ba565b8181028215806123b95750818382816123b657fe5b04145b611fe75760405162461bcd60e51b81526004016103ad90614ac1565b81810182811015611fe75760405162461bcd60e51b81526004016103ad90614970565b600061242583602001516124198560600151856123d590919063ffffffff16565b9063ffffffff6123a116565b9050612436848460000151836127e7565b60808301516000906001600160a01b031615612456578360800151612458565b335b84519091506001600160a01b031661248b5761248585828460405180602001604052806000815250612fdb565b506124b7565b61249b8585600001518385613067565b6124b75760405162461bcd60e51b81526004016103ad9061488c565b5050505050565b8060606124c9611827565b905060005b815181101561255657826001600160a01b031663b149206e8383815181106124f257fe5b6020026020010151306040518363ffffffff1660e01b815260040161251892919061460a565b600060405180830381600087803b15801561253257600080fd5b505af1158015612546573d6000803e3d6000fd5b5050600190920191506124ce9050565b50505050565b600080600260009054906101000a90046001600160a01b03166001600160a01b031663d51b3a1b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156125ad57600080fd5b505afa1580156125c1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125e59190613ddb565b6001600160a01b0316636b9db4e6846040518263ffffffff1660e01b815260040161261091906144d7565b604080518083038186803b15801561262757600080fd5b505afa15801561263b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061265f919061431f565b5042109392505050565b60006001600160a01b0384166126915760405162461bcd60e51b81526004016103ad90614689565b604051636eb1769f60e11b81526000906001600160a01b0386169063dd62ed3e906126c290899088906004016144eb565b60206040518083038186803b1580156126da57600080fd5b505afa1580156126ee573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127129190614307565b9050808314612776576060811561274c5761273087878760006130fd565b61274c5760405162461bcd60e51b81526004016103ad90614919565b612758878787876130fd565b6127745760405162461bcd60e51b81526004016103ad90614919565b505b808311156127915761278e838263ffffffff61311c16565b91505b846001600160a01b0316866001600160a01b03167f8d924fb660ea5dc99861c06d5104285681bb68ef281ebe73b6245e399a1ce2ff86866040516127d6929190614505565b60405180910390a350949350505050565b600081118015612808575060006127fc613144565b6001600160a01b031614155b156123615760025460408051632630c12f60e01b815290516000926001600160a01b031691632630c12f916004808301926020929190829003018186803b15801561285257600080fd5b505afa158015612866573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061288a9190613ddb565b6001600160a01b031663f182178384846040518363ffffffff1660e01b81526004016128b7929190614505565b60206040518083038186803b1580156128cf57600080fd5b505afa1580156128e3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129079190614307565b9050612911613144565b6001600160a01b031663c976bd9a85836040518363ffffffff1660e01b815260040161293e929190614505565b600060405180830381600087803b15801561295857600080fd5b505af115801561296c573d6000803e3d6000fd5b5050505050505050565b6001600160a01b0384166129a55761299f85848460405180602001604052806000815250612fdb565b506129cd565b6129b185858585613067565b6129cd5760405162461bcd60e51b81526004016103ad9061488c565b826001600160a01b0316846001600160a01b0316866001600160a01b03167fc88755fe083d57a3909c60ab246eef52835769b920f0a49045b2b1058afda7128585604051612a1c929190614b14565b60405180910390a45050505050565b806060612a36611827565b905060005b815181101561255657826001600160a01b031663b149206e838381518110612a5f57fe5b602002602001015160006040518363ffffffff1660e01b8152600401612a8692919061460a565b600060405180830381600087803b158015612aa057600080fd5b505af1158015612ab4573d6000803e3d6000fd5b505060019092019150612a3b9050565b60025460408051632630c12f60e01b815290516060926001600160a01b031691632630c12f916004808301926020929190829003018186803b158015612b0957600080fd5b505afa158015612b1d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b419190613ddb565b6001600160a01b031663f182178385670de0b6b3a76400006040518363ffffffff1660e01b8152600401612b76929190614505565b60206040518083038186803b158015612b8e57600080fd5b505afa158015612ba2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612bc69190614307565b15612be35760405162461bcd60e51b81526004016103ad906146ae565b612bef858585856131c6565b90505b949350505050565b6000612180836010602085020163ffffffff6132e216565b6000611fe7828263ffffffff61330516565b6000815160011480156121805750826001600160a01b031682600081518110612c4957fe5b60200260200101516001600160a01b031614905092915050565b60006001600160e01b03198416630b7d51bd60e21b1480612c9457506001600160e01b031984166312ef080d60e01b145b80612caf57506001600160e01b0319841663fd6ac30960e01b145b80612cca57506001600160e01b03198416630eaa53bd60e31b145b80612ce557506001600160e01b031984166388666d8160e01b145b15612d6b57612d64856001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b158015612d2657600080fd5b505afa158015612d3a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d5e9190613ddb565b83612c24565b9050612bf2565b6001600160e01b0319841663d3963a2560e01b1415612e0b576002546040805163d51b3a1b60e01b81529051612d64926001600160a01b03169163d51b3a1b916004808301926020929190829003018186803b158015612dca57600080fd5b505afa158015612dde573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e029190613ddb565b86846002613321565b60405162461bcd60e51b81526004016103ad906146d7565b600080612e3b6001845161311c90919063ffffffff16565b90506000612e4f848363ffffffff61388116565b60ff166004811115612e5d57fe5b90506060612e738560008563ffffffff61389d16565b90506004826004811115612e8357fe5b1415612e9e57612e9487878361391d565b9350505050612180565b6002826004811115612eac57fe5b1415612eda57856001600160a01b0316612ec68883613a34565b6001600160a01b0316149350505050612180565b6003826004811115612ee857fe5b1415612f4257600087604051602001612f0191906143b2565b604051602081830303815290604052805190602001209050866001600160a01b0316612f2d8284613a34565b6001600160a01b031614945050505050612180565b60009350505050612180565b600082612f5d57506001612180565b6000612f71856001600160a01b0316613b0c565b9050806001600160a01b0316848490604051612f8c90613b0c565b600060405180830381858888f193505050503d8060008114612fca576040519150601f19603f3d011682016040523d82523d6000602084013e612fcf565b606091505b50909695505050505050565b604051631c48add360e21b81526060906001600160a01b03861690637122b74c9061301190600190889088908890600401614b43565b600060405180830381600087803b15801561302b57600080fd5b505af115801561303f573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052612bef9190810190614189565b6000606063a9059cbb60e01b8484604051602401613086929190614505565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152905060606130c98787600085612fdb565b8051909150156130ee57808060200190518101906130e79190614138565b92506130f3565b600192505b5050949350505050565b6000606063095ea7b360e01b8484604051602401613086929190614505565b60008282111561313e5760405162461bcd60e51b81526004016103ad9061480d565b50900390565b60025460408051633674412160e21b815290516000926001600160a01b03169163d9d10484916004808301926020929190829003018186803b15801561318957600080fd5b505afa15801561319d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906131c19190613ddb565b905090565b6060836001600160a01b0316856001600160a01b03161415801561326357506040516363d972cb60e11b81526001600160a01b0386169063c7b2e596906132119087906004016144d7565b60206040518083038186803b15801561322957600080fd5b505afa15801561323d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906132619190614138565b155b61327f5760405162461bcd60e51b81526004016103ad906146ae565b61328b85858585612fdb565b9050836001600160a01b0316856001600160a01b03167f7d533d6faad77168a7f3e416e981e7d4f7b02844ddbbbdd26807b66a5002eb8e85856040516132d2929190614b14565b60405180910390a3949350505050565b600081601401835110156132f557600080fd5b500160200151600160601b900490565b6000816004018351101561331857600080fd5b50016020015190565b600082516000141561333557506000612bf2565b604051630319d8a560e11b81526060906001600160a01b03871690630633b14a906133649088906004016144d7565b60006040518083038186803b15801561337c57600080fd5b505afa158015613390573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526133b89190810190614097565b90506133c2613bbb565b6133cb82613b0f565b905060008090506060865167ffffffffffffffff811180156133ec57600080fd5b5060405190808252806020026020018201604052801561342657816020015b613413613bda565b81526020019060019003908161340b5790505b5090506000886001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561346457600080fd5b505afa158015613478573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061349c9190613ddb565b9050600080805b8a5181101561369f57816001600160a01b03168b82815181106134c257fe5b60200260200101516001600160a01b0316116134f05760405162461bcd60e51b81526004016103ad90614834565b8a81815181106134fc57fe5b60200260200101519150836001600160a01b03168b828151811061351c57fe5b60200260200101516001600160a01b0316141561353c5760019550613697565b8c6001600160a01b031663d4ee97348d8d848151811061355857fe5b60200260200101516040518363ffffffff1660e01b815260040161357d9291906144eb565b60206040518083038186803b15801561359557600080fd5b505afa1580156135a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906135cd9190614138565b6135e95760405162461bcd60e51b81526004016103ad906146ff565b8c6001600160a01b031663da34a8508d8d848151811061360557fe5b60200260200101516040518363ffffffff1660e01b815260040161362a9291906144eb565b60806040518083038186803b15801561364257600080fd5b505afa158015613656573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061367a91906142ec565b855160018501948791811061368b57fe5b60200260200101819052505b6001016134a3565b5060028960028111156136ae57fe5b14156136d657846136d15760405162461bcd60e51b81526004016103ad90614783565b613708565b60008960028111156136e457fe5b14156137085784156137085760405162461bcd60e51b81526004016103ad906149b7565b818452613713613bbb565b61371c85613b0f565b9050600080808c600281111561372e57fe5b1461374d5760018201915087613745576000613748565b60015b60ff16015b88511561375d5788518351920191015b60015b60108110156138455760008a826010811061377757fe5b6020020151111561383d5760018301925060068110156137bf57600084826010811061379f57fe5b6020020151116137b05760006137b3565b60015b60ff168201915061383d565b600b8110156137fd576137f28482601081106137d757fe5b60200201518b83601081106137e857fe5b6020020151613b60565b6137b05760006137b3565b61382784826010811061380c57fe5b60200201518b836010811061381d57fe5b6020020151613b6e565b613832576000613835565b60015b60ff16820191505b600101613760565b506138508183613b6e565b61386c5760405162461bcd60e51b81526004016103ad90614a95565b5060019e9d5050505050505050505050505050565b6000816001018351101561389457600080fd5b50016001015190565b6060818301845110156138af57600080fd5b6060821580156138ca57604051915060208201604052613914565b6040519150601f8416801560200281840101858101878315602002848b0101015b818310156139035780518352602092830192016138eb565b5050858452601f01601f1916604052505b50949350505050565b600060606320c13b0b60e01b8560405160200161393a9190614581565b60408051601f1981840301815290829052613959918690602401614640565b604051602081830303815290604052906001600160e01b0319166020820180516001600160e01b038381831617835250505050905060006060856001600160a01b0316836040516139aa919061436f565b600060405180830381855afa9150503d80600081146139e5576040519150601f19603f3d011682016040523d82523d6000602084013e6139ea565b606091505b50915091508180156139fd575080516020145b8015613a2957506320c13b0b60e01b613a1d82600063ffffffff61330516565b6001600160e01b031916145b979650505050505050565b60008151604114613a4757506000611fe7565b60208201516040830151604184015160ff167f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0821115613a8d5760009350505050611fe7565b8060ff16601b1480613aa257508060ff16601c145b15613b005760018682858560405160008152602001604052604051613aca94939291906145ec565b6020604051602081039080840390855afa158015613aec573d6000803e3d6000fd5b505050602060405103519350505050611fe7565b60009350505050611fe7565b90565b613b17613bbb565b60005b8251811015613b5a5781838281518110613b3057fe5b60200260200101516020015160108110613b4657fe5b602002018051600190810190915201613b1a565b50919050565b600260019190910104111590565b60029004600101111590565b6040518060a0016040528060006001600160a01b0316815260200160008152602001600081526020016000815260200160006001600160a01b031681525090565b6040518061020001604052806010906020820280368337509192915050565b604051806080016040528060006001600160a01b031681526020016000815260200160008152602001600081525090565b600082601f830112613c1b578081fd5b8135613c2e613c2982614ba4565b614b7d565b818152915060208083019084810181840286018201871015613c4f57600080fd5b60005b84811015613c77578135613c6581614c14565b84529282019290820190600101613c52565b505050505092915050565b600082601f830112613c92578081fd5b8135613ca0613c2982614ba4565b818152915060208083019084810160005b84811015613c7757613cc8888484358a0101613d21565b84529282019290820190600101613cb1565b60008083601f840112613ceb578182fd5b50813567ffffffffffffffff811115613d02578182fd5b602083019150836020828501011115613d1a57600080fd5b9250929050565b600082601f830112613d31578081fd5b8135613d3f613c2982614bc4565b9150808252836020828501011115613d5657600080fd5b8060208401602084013760009082016020015292915050565b600060808284031215613d80578081fd5b613d8a6080614b7d565b90508151613d9781614c14565b8082525060208201516020820152604082015160408201526060820151606082015292915050565b600060208284031215613dd0578081fd5b813561218081614c14565b600060208284031215613dec578081fd5b815161218081614c14565b60008060408385031215613e09578081fd5b8235613e1481614c14565b91506020830135613e2481614c14565b809150509250929050565b60008060008060808587031215613e44578182fd5b8435613e4f81614c14565b93506020850135613e5f81614c14565b92506040850135613e6f81614c14565b9396929550929360600135925050565b60008060008060008060a08789031215613e97578182fd5b8635613ea281614c14565b95506020870135613eb281614c14565b94506040870135613ec281614c14565b935060608701359250608087013567ffffffffffffffff811115613ee4578283fd5b613ef089828a01613cda565b979a9699509497509295939492505050565b600080600080600080600060c0888a031215613f1c578485fd5b8735613f2781614c14565b96506020880135613f3781614c14565b95506040880135613f4781614c14565b9450606088013593506080880135925060a088013567ffffffffffffffff811115613f70578182fd5b613f7c8a828b01613cda565b989b979a50959850939692959293505050565b600080600080600060808688031215613fa6578283fd5b8535613fb181614c14565b94506020860135613fc181614c14565b935060408601359250606086013567ffffffffffffffff811115613fe3578182fd5b613fef88828901613cda565b969995985093965092949392505050565b60008060408385031215614012578182fd5b823561401d81614c14565b946020939093013593505050565b6000806020838503121561403d578182fd5b823567ffffffffffffffff80821115614054578384fd5b81850186601f820112614065578485fd5b8035925081831115614075578485fd5b8660208085028301011115614088578485fd5b60200196919550909350505050565b600060208083850312156140a9578182fd5b825167ffffffffffffffff8111156140bf578283fd5b80840185601f8201126140d0578384fd5b805191506140e0613c2983614ba4565b828152838101908285016080808602850187018a10156140fe578788fd5b8794505b8585101561412a576141148a83613d6f565b8452600194909401939286019290810190614102565b509098975050505050505050565b600060208284031215614149578081fd5b81518015158114612180578182fd5b6000806040838503121561416a578182fd5b82518015158114614179578283fd5b6020939093015192949293505050565b60006020828403121561419a578081fd5b815167ffffffffffffffff8111156141b0578182fd5b80830184601f8201126141c1578283fd5b805191506141d1613c2983614bc4565b8281528560208484010111156141e5578384fd5b6141f6836020830160208501614be8565b95945050505050565b6000806000806000806101408789031215614218578384fd5b863567ffffffffffffffff8082111561422f578586fd5b61423b8a838b01613d21565b9750602091508189013596506040890135955089607f8a011261425c578384fd5b61426660a0614b7d565b8060608b016101008c018d81111561427c578788fd5b875b600581101561429b5782358552938601939186019160010161427e565b509197505035925050808211156142b0578384fd5b6142bc8a838b01613c82565b93506101208901359150808211156142d2578283fd5b506142df89828a01613c0b565b9150509295509295509295565b6000608082840312156142fd578081fd5b6121808383613d6f565b600060208284031215614318578081fd5b5051919050565b60008060408385031215614331578182fd5b825191506020830151613e2481614c14565b6000815180845261435b816020860160208601614be8565b601f01601f19169290920160200192915050565b60008251614381818460208701614be8565b9190910192915050565b6000845161439d818460208901614be8565b91909101928352506020820152604001919050565b7f19457468657265756d205369676e6564204d6573736167653a0a3332000000008152601c810191909152603c0190565b7f4d6574615472616e73616374696f6e28616464726573732077616c6c65742c6181527f646472657373206d6f64756c652c75696e743235362076616c75652c6279746560208201527f7320646174612c75696e74323536206e6f6e63652c75696e743235362076616c60408201527f6964556e74696c2c6164647265737320676173546f6b656e2c75696e7432353660608201527f2067617350726963652c75696e74323536206761734c696d69742c75696e743260808201527f3536206761734f766572686561642c616464726573732066656552656369706960a082015263656e742960e01b60c082015260c40190565b6001600160a01b0391909116815260200190565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b03929092168252602082015260400190565b6001600160a01b039390931683526020830191909152604082015260600190565b6020808252825182820181905260009190848201906040850190845b81811015612fcf5783516001600160e01b0319168352928401929184019160010161455b565b90815260200190565b9b8c526001600160a01b039a8b1660208d0152988a1660408c015260608b019790975260808a019590955260a089019390935260c0880191909152851660e0870152610100860152610120850152610140840152166101608201526101800190565b93845260ff9290921660208401526040830152606082015260800190565b6001600160e01b03199290921682526001600160a01b0316602082015260400190565b6000602082526121806020830184614343565b6000604082526146536040830185614343565b82810360208401526141f68185614343565b6020808252600a90820152695245454e5452414e435960b01b604082015260600190565b6020808252600b908201526a155394d5541413d495115160aa1b604082015260600190565b6020808252600f908201526e10d0531317d11254d0531313d5d151608a1b604082015260600190565b6020808252600e908201526d1253959053125117d351551213d160921b604082015260600190565b60208082526013908201527229a4a3a722a92fa727aa2fa3aaa0a92224a0a760691b604082015260600190565b6020808252601190820152701253959053125117d1d054d7d312535255607a1b604082015260600190565b6020808252601290820152714241445f5349474e41545552455f4441544160701b604082015260600190565b6020808252601f908201527f57414c4c45545f4f574e45525f5349474e41545552455f524551554952454400604082015260600190565b60208082526010908201526f5452414e534645525f4641494c55524560801b604082015260600190565b6020808252600f908201526e1393d390d157d513d3d7d4d3505313608a1b604082015260600190565b6020808252600d908201526c5355425f554e444552464c4f5760981b604082015260600190565b60208082526015908201527424a72b20a624a22fa9a4a3a722a929afa7a92222a960591b604082015260600190565b6020808252600f908201526e4e4f4e43455f544f4f5f4c4152474560881b604082015260600190565b6020808252600f908201526e1514905394d1915497d19052531151608a1b604082015260600190565b6020808252601f908201527f4e4f545f46524f4d5f4d45544154585f4f525f57414c4c45545f4f574e455200604082015260600190565b60208082526013908201527213515510551617d5539055551213d492569151606a1b604082015260600190565b6020808252600f908201526e1054141493d5905317d19052531151608a1b604082015260600190565b6020808252601490820152734e4f545f46524f4d5f544849535f4d4f44554c4560601b604082015260600190565b6020808252600c908201526b4144445f4f564552464c4f5760a01b604082015260600190565b6020808252600790820152661156141254915160ca1b604082015260600190565b60208082526022908201527f57414c4c45545f4f574e45525f5349474e41545552455f4e4f545f414c4c4f57604082015261115160f21b606082015260800190565b60208082526010908201526f494e53554646494349454e545f47415360801b604082015260600190565b6020808252600c908201526b0929cac82989288be9082a6960a31b604082015260600190565b602080825260129082015271494e56414c49445f5349474e41545552455360701b604082015260600190565b6020808252600690820152651313d0d2d15160d21b604082015260600190565b6020808252601290820152714e4f545f454e4f5547485f5349474e45525360701b604082015260600190565b6020808252600c908201526b4d554c5f4f564552464c4f5760a01b604082015260600190565b6000868252856020830152846040830152831515606083015260a06080830152613a2960a0830184614343565b600083825260406020830152612bf26040830184614343565b9283526020830191909152604082015260600190565b600060ff8616825260018060a01b038516602083015283604083015260806060830152614b736080830184614343565b9695505050505050565b60405181810167ffffffffffffffff81118282101715614b9c57600080fd5b604052919050565b600067ffffffffffffffff821115614bba578081fd5b5060209081020190565b600067ffffffffffffffff821115614bda578081fd5b50601f01601f191660200190565b60005b83811015614c03578181015183820152602001614beb565b838111156125565750506000910152565b6001600160a01b0381168114614c2957600080fd5b50565b6040516000904690614c3d90614c95565b6040518091039020836000015180519060200120846020015180519060200120838660400151604051602001614c77959493929190614cff565b60405160208183030381529060405280519060200120915050919050565b7f454950373132446f6d61696e28737472696e67206e616d652c737472696e672081527f76657273696f6e2c75696e7432353620636861696e49642c6164647265737320602082015271766572696679696e67436f6e74726163742960701b604082015260520190565b9485526020850193909352604084019190915260608301526001600160a01b0316608082015260a0019056fea2646970667358221220837fa8fb97bd3d5d51d11b101d16005de3c51965e3d371dc8ffc69919f5a663764736f6c63430006060033000000000000000000000000728348a947b808483365bf24f5f7886f0a9786bf0000000000000000000000000000000000000000000000000000000000015180

Deployed Bytecode

0x60806040526004361061011f5760003560e01c806388666d81116100a0578063c0fd43b411610064578063c0fd43b4146102dc578063d3963a25146102fc578063e321531b1461031c578063f77c47911461034b578063fd6ac3091461036d5761011f565b806388666d811461024557806389b08f111461026557806390502c2e14610285578063afa3363d146102a5578063b1c94d94146102c75761011f565b80632df546f4116100e75780632df546f4146101ae5780633644e515146101ce57806351b42b00146101e35780635a1db8c4146101f857806375529de8146102185761011f565b80630ab9ad33146101245780630f15f4c01461013957806312ef080d1461014e57806313d53dcf1461016e5780632d621c5114610199575b600080fd5b6101376101323660046141ff565b61038d565b005b34801561014557600080fd5b5061013761069f565b34801561015a57600080fd5b50610137610169366004613e2f565b6106e0565b34801561017a57600080fd5b506101836109f0565b6040516101909190614581565b60405180910390f35b3480156101a557600080fd5b506101836109f5565b3480156101ba57600080fd5b506101376101c9366004613e7f565b610a0c565b3480156101da57600080fd5b50610183610d50565b3480156101ef57600080fd5b50610137610d56565b34801561020457600080fd5b50610137610213366004613df7565b610d97565b34801561022457600080fd5b50610238610233366004613f02565b610fb5565b604051610190919061462d565b34801561025157600080fd5b50610137610260366004614000565b61131d565b34801561027157600080fd5b50610183610280366004613dbf565b6115ef565b34801561029157600080fd5b506101376102a036600461402b565b611601565b3480156102b157600080fd5b506102ba611827565b604051610190919061453f565b3480156102d357600080fd5b5061018361182c565b3480156102e857600080fd5b506101836102f7366004613dbf565b611832565b34801561030857600080fd5b50610137610317366004614000565b61184d565b34801561032857600080fd5b5061033c610337366004613dbf565b61196d565b60405161019093929190614b2d565b34801561035757600080fd5b50610360611c81565b60405161019091906144d7565b34801561037957600080fd5b50610238610388366004613f8f565b611c90565b428410156103b65760405162461bcd60e51b81526004016103ad90614996565b60405180910390fd5b6103be613b7a565b506040805160a08101825284516001600160a01b03908116825260208087015190830152858301519282018390526060808701519083015260808087015190911690820152906104205760405162461bcd60e51b81526004016103ad9061472c565b600061042b88611fda565b905060006104c66001546104c1604051806101600160405280866001600160a01b03168152602001306001600160a01b031681526020013481526020018d81526020018c81526020018b815260200187600001516001600160a01b0316815260200187602001518152602001876040015181526020018760600151815260200187608001516001600160a01b0316815250611fed565b61207c565b90506104d3828a866120cb565b6104ef5760405162461bcd60e51b81526004016103ad906148ec565b61050081858763ffffffff61218716565b61051c5760405162461bcd60e51b81526004016103ad90614a49565b610527828983612265565b341561054b57610549345a6001600160a01b038516919063ffffffff61236616565b505b61057f61ea60603f61056b604087604001516123a190919063ffffffff16565b8161057257fe5b049063ffffffff6123d516565b5a101561059e5760405162461bcd60e51b81526004016103ad906149f9565b60005a905060006060306001600160a01b031686604001518d6040516105c4919061436f565b60006040518083038160008787f1925050503d8060008114610602576040519150601f19603f3d011682016040523d82523d6000602084013e610607565b606091505b50915091505a60408701519303928310610625578560400151610627565b825b9250846001600160a01b0316336001600160a01b03167f4d3367ceeab65bf3b68cc4658d780a0f6e4101b2475aa8b6658c2df7851e12bb8d87878787604051610674959493929190614ae7565b60405180910390a3602086015115610691576106918587856123f8565b505050505050505050505050565b336106a9816124be565b6040516001600160a01b038216907f0cc43938d137e7efade6a531f663e78c1fc75257b0d65ffda2fdaf70cb49cdf990600090a250565b600054156107005760405162461bcd60e51b81526004016103ad90614665565b60016000558361070f8161255c565b1561072c5760405162461bcd60e51b81526004016103ad90614a75565b84806001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561076657600080fd5b505afa15801561077a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061079e9190613ddb565b6001600160a01b0316336001600160a01b031614806107bc57503330145b6107d85760405162461bcd60e51b81526004016103ad906148b5565b600260009054906101000a90046001600160a01b03166001600160a01b031663d51b3a1b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561082657600080fd5b505afa15801561083a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061085e9190613ddb565b6001600160a01b031663d36e3517826040518263ffffffff1660e01b815260040161088991906144d7565b600060405180830381600087803b1580156108a357600080fd5b505af11580156108b7573d6000803e3d6000fd5b5050505060006108c987878787612669565b90506000600260009054906101000a90046001600160a01b03166001600160a01b03166337423d5e6040518163ffffffff1660e01b815260040160206040518083038186803b15801561091b57600080fd5b505afa15801561092f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109539190613ddb565b6001600160a01b031663b6b3527289886040518363ffffffff1660e01b81526004016109809291906144eb565b604080518083038186803b15801561099757600080fd5b505afa1580156109ab573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109cf9190614158565b509050806109e2576109e28888846127e7565b505060008055505050505050565b600281565b604051610a01906143e3565b604051809103902081565b60005415610a2c5760405162461bcd60e51b81526004016103ad90614665565b600160005585610a3b8161255c565b15610a585760405162461bcd60e51b81526004016103ad90614a75565b86806001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b158015610a9257600080fd5b505afa158015610aa6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aca9190613ddb565b6001600160a01b0316336001600160a01b03161480610ae857503330145b610b045760405162461bcd60e51b81526004016103ad906148b5565b600260009054906101000a90046001600160a01b03166001600160a01b031663d51b3a1b6040518163ffffffff1660e01b815260040160206040518083038186803b158015610b5257600080fd5b505afa158015610b66573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b8a9190613ddb565b6001600160a01b031663d36e3517826040518263ffffffff1660e01b8152600401610bb591906144d7565b600060405180830381600087803b158015610bcf57600080fd5b505af1158015610be3573d6000803e3d6000fd5b505050506000600260009054906101000a90046001600160a01b03166001600160a01b03166337423d5e6040518163ffffffff1660e01b815260040160206040518083038186803b158015610c3757600080fd5b505afa158015610c4b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c6f9190613ddb565b6001600160a01b031663b6b352728a896040518363ffffffff1660e01b8152600401610c9c9291906144eb565b604080518083038186803b158015610cb357600080fd5b505afa158015610cc7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ceb9190614158565b50905080610cfe57610cfe8989886127e7565b610d418989898989898080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061297692505050565b50506000805550505050505050565b60015481565b33610d6081612a2b565b6040516001600160a01b038216907f749cb6b4c510bc468cf6b9c2086d6f0a54d6b18e25d37bf3200e68eab0880c0090600090a250565b60005415610db75760405162461bcd60e51b81526004016103ad90614665565b600160008190555081806001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b158015610df957600080fd5b505afa158015610e0d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e319190613ddb565b6001600160a01b0316336001600160a01b03161480610e4f57503330145b610e6b5760405162461bcd60e51b81526004016103ad906148b5565b600260009054906101000a90046001600160a01b03166001600160a01b031663d51b3a1b6040518163ffffffff1660e01b815260040160206040518083038186803b158015610eb957600080fd5b505afa158015610ecd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ef19190613ddb565b6001600160a01b031663d36e3517826040518263ffffffff1660e01b8152600401610f1c91906144d7565b600060405180830381600087803b158015610f3657600080fd5b505af1158015610f4a573d6000803e3d6000fd5b5050604051631ed86f1960e01b81526001600160a01b0386169250631ed86f199150610f7a9085906004016144d7565b600060405180830381600087803b158015610f9457600080fd5b505af1158015610fa8573d6000803e3d6000fd5b5050600080555050505050565b6060600054600014610fd95760405162461bcd60e51b81526004016103ad90614665565b600160005587610fe88161255c565b156110055760405162461bcd60e51b81526004016103ad90614a75565b88806001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561103f57600080fd5b505afa158015611053573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110779190613ddb565b6001600160a01b0316336001600160a01b0316148061109557503330145b6110b15760405162461bcd60e51b81526004016103ad906148b5565b600260009054906101000a90046001600160a01b03166001600160a01b031663d51b3a1b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156110ff57600080fd5b505afa158015611113573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111379190613ddb565b6001600160a01b031663d36e3517826040518263ffffffff1660e01b815260040161116291906144d7565b600060405180830381600087803b15801561117c57600080fd5b505af1158015611190573d6000803e3d6000fd5b5050505060006111a28b8b8b8b612669565b90506000600260009054906101000a90046001600160a01b03166001600160a01b03166337423d5e6040518163ffffffff1660e01b815260040160206040518083038186803b1580156111f457600080fd5b505afa158015611208573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061122c9190613ddb565b6001600160a01b031663b6b352728d8c6040518363ffffffff1660e01b81526004016112599291906144eb565b604080518083038186803b15801561127057600080fd5b505afa158015611284573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112a89190614158565b509050806112c7576112bb8c8c846127e7565b6112c78c60008a6127e7565b6113098c8b8a8a8a8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612ac492505050565b600080559c9b505050505050505050505050565b6000541561133d5760405162461bcd60e51b81526004016103ad90614665565b60016000558161134c8161255c565b156113695760405162461bcd60e51b81526004016103ad90614a75565b82806001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156113a357600080fd5b505afa1580156113b7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113db9190613ddb565b6001600160a01b0316336001600160a01b031614806113f957503330145b6114155760405162461bcd60e51b81526004016103ad906148b5565b600260009054906101000a90046001600160a01b03166001600160a01b031663d51b3a1b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561146357600080fd5b505afa158015611477573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061149b9190613ddb565b6001600160a01b031663d36e3517826040518263ffffffff1660e01b81526004016114c691906144d7565b600060405180830381600087803b1580156114e057600080fd5b505af11580156114f4573d6000803e3d6000fd5b50505050600260009054906101000a90046001600160a01b03166001600160a01b031663d9d104846040518163ffffffff1660e01b815260040160206040518083038186803b15801561154657600080fd5b505afa15801561155a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061157e9190613ddb565b6001600160a01b031663054e378285856115a3600454426123d590919063ffffffff16565b6040518463ffffffff1660e01b81526004016115c19392919061451e565b600060405180830381600087803b1580156115db57600080fd5b505af11580156109e2573d6000803e3d6000fd5b60036020526000908152604090205481565b600054156116215760405162461bcd60e51b81526004016103ad90614665565b60016000908155600254604080516306a32ffd60e01b815290516001600160a01b03909216916306a32ffd91600480820192602092909190829003018186803b15801561166d57600080fd5b505afa158015611681573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116a59190613ddb565b905060005b8281101561181d5760008484838181106116c057fe5b90506020020160208101906116d59190613dbf565b90506001600160a01b0381166117095747611702815a6001600160a01b038716919063ffffffff61236616565b5050611814565b6040516370a0823160e01b81526000906001600160a01b038316906370a08231906117389030906004016144d7565b60206040518083038186803b15801561175057600080fd5b505afa158015611764573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117889190614307565b905080156118125760405163a9059cbb60e01b81526001600160a01b0383169063a9059cbb906117be9087908590600401614505565b602060405180830381600087803b1580156117d857600080fd5b505af11580156117ec573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118109190614138565b505b505b506001016116aa565b5050600080555050565b606090565b60045481565b6001600160a01b031660009081526003602052604090205490565b6000541561186d5760405162461bcd60e51b81526004016103ad90614665565b60016000558161187c8161255c565b156118995760405162461bcd60e51b81526004016103ad90614a75565b3330146118b85760405162461bcd60e51b81526004016103ad90614942565b600260009054906101000a90046001600160a01b03166001600160a01b031663d9d104846040518163ffffffff1660e01b815260040160206040518083038186803b15801561190657600080fd5b505afa15801561191a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061193e9190613ddb565b6001600160a01b031663054e37828484426040518463ffffffff1660e01b8152600401610f7a9392919061451e565b6000806000600260009054906101000a90046001600160a01b03166001600160a01b031663d9d104846040518163ffffffff1660e01b815260040160206040518083038186803b1580156119c057600080fd5b505afa1580156119d4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119f89190613ddb565b6001600160a01b031663b0f191dc856040518263ffffffff1660e01b8152600401611a2391906144d7565b60206040518083038186803b158015611a3b57600080fd5b505afa158015611a4f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a739190614307565b9250600260009054906101000a90046001600160a01b03166001600160a01b031663d9d104846040518163ffffffff1660e01b815260040160206040518083038186803b158015611ac357600080fd5b505afa158015611ad7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611afb9190613ddb565b6001600160a01b031663564d3ca7856040518263ffffffff1660e01b8152600401611b2691906144d7565b60206040518083038186803b158015611b3e57600080fd5b505afa158015611b52573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b769190614307565b9150600260009054906101000a90046001600160a01b03166001600160a01b031663d9d104846040518163ffffffff1660e01b815260040160206040518083038186803b158015611bc657600080fd5b505afa158015611bda573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bfe9190613ddb565b6001600160a01b031663a6ba0127856040518263ffffffff1660e01b8152600401611c2991906144d7565b60206040518083038186803b158015611c4157600080fd5b505afa158015611c55573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c799190614307565b929491935050565b6002546001600160a01b031681565b6060600054600014611cb45760405162461bcd60e51b81526004016103ad90614665565b600160005585611cc38161255c565b15611ce05760405162461bcd60e51b81526004016103ad90614a75565b86806001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b158015611d1a57600080fd5b505afa158015611d2e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d529190613ddb565b6001600160a01b0316336001600160a01b03161480611d7057503330145b611d8c5760405162461bcd60e51b81526004016103ad906148b5565b600260009054906101000a90046001600160a01b03166001600160a01b031663d51b3a1b6040518163ffffffff1660e01b815260040160206040518083038186803b158015611dda57600080fd5b505afa158015611dee573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e129190613ddb565b6001600160a01b031663d36e3517826040518263ffffffff1660e01b8152600401611e3d91906144d7565b600060405180830381600087803b158015611e5757600080fd5b505af1158015611e6b573d6000803e3d6000fd5b505050506000600260009054906101000a90046001600160a01b03166001600160a01b03166337423d5e6040518163ffffffff1660e01b815260040160206040518083038186803b158015611ebf57600080fd5b505afa158015611ed3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ef79190613ddb565b6001600160a01b031663b6b352728a8a6040518363ffffffff1660e01b8152600401611f249291906144eb565b604080518083038186803b158015611f3b57600080fd5b505afa158015611f4f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f739190614158565b50905080611f8757611f87896000896127e7565b611fc989898989898080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612ac492505050565b600080559998505050505050505050565b6000611fe7826000612bfa565b92915050565b6000604051611ffb906143e3565b604051809103902082600001518360200151846040015185606001518051906020012086608001518760a001518860c001518960e001518a61010001518b61012001518c610140015160405160200161205f9c9b9a9998979695949392919061458a565b604051602081830303815290604052805190602001209050919050565b600060405180604001604052806002815260200161190160f01b81525083836040516020016120ad9392919061438b565b60405160208183030381529060405280519060200120905092915050565b6000806120d784612c12565b90506001600160e01b031981166316876e3160e21b14156121745761216c856001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561212e57600080fd5b505afa158015612142573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121669190613ddb565b84612c24565b915050612180565b61216c85828686612c63565b9392505050565b600081518351146121aa5760405162461bcd60e51b81526004016103ad90614757565b6000805b845181101561225957816001600160a01b03168582815181106121cd57fe5b60200260200101516001600160a01b0316116121fb5760405162461bcd60e51b81526004016103ad90614834565b84818151811061220757fe5b602002602001015191506122428686838151811061222157fe5b602002602001015186848151811061223557fe5b6020026020010151612e23565b61225157600092505050612180565b6001016121ae565b50600195945050505050565b816122ea576001600160a01b038316600090815260036020908152604080832084845260010190915290205460ff16156122b15760405162461bcd60e51b81526004016103ad90614a23565b6001600160a01b03831660009081526003602090815260408083208484526001908101909252909120805460ff19169091179055612361565b6001600160a01b03831660009081526003602052604090205482116123215760405162461bcd60e51b81526004016103ad906147e4565b43608083901c11156123455760405162461bcd60e51b81526004016103ad90614863565b6001600160a01b03831660009081526003602052604090208290555b505050565b60006123826001600160a01b038516848463ffffffff612f4e16565b9050806121805760405162461bcd60e51b81526004016103ad906147ba565b8181028215806123b95750818382816123b657fe5b04145b611fe75760405162461bcd60e51b81526004016103ad90614ac1565b81810182811015611fe75760405162461bcd60e51b81526004016103ad90614970565b600061242583602001516124198560600151856123d590919063ffffffff16565b9063ffffffff6123a116565b9050612436848460000151836127e7565b60808301516000906001600160a01b031615612456578360800151612458565b335b84519091506001600160a01b031661248b5761248585828460405180602001604052806000815250612fdb565b506124b7565b61249b8585600001518385613067565b6124b75760405162461bcd60e51b81526004016103ad9061488c565b5050505050565b8060606124c9611827565b905060005b815181101561255657826001600160a01b031663b149206e8383815181106124f257fe5b6020026020010151306040518363ffffffff1660e01b815260040161251892919061460a565b600060405180830381600087803b15801561253257600080fd5b505af1158015612546573d6000803e3d6000fd5b5050600190920191506124ce9050565b50505050565b600080600260009054906101000a90046001600160a01b03166001600160a01b031663d51b3a1b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156125ad57600080fd5b505afa1580156125c1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125e59190613ddb565b6001600160a01b0316636b9db4e6846040518263ffffffff1660e01b815260040161261091906144d7565b604080518083038186803b15801561262757600080fd5b505afa15801561263b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061265f919061431f565b5042109392505050565b60006001600160a01b0384166126915760405162461bcd60e51b81526004016103ad90614689565b604051636eb1769f60e11b81526000906001600160a01b0386169063dd62ed3e906126c290899088906004016144eb565b60206040518083038186803b1580156126da57600080fd5b505afa1580156126ee573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127129190614307565b9050808314612776576060811561274c5761273087878760006130fd565b61274c5760405162461bcd60e51b81526004016103ad90614919565b612758878787876130fd565b6127745760405162461bcd60e51b81526004016103ad90614919565b505b808311156127915761278e838263ffffffff61311c16565b91505b846001600160a01b0316866001600160a01b03167f8d924fb660ea5dc99861c06d5104285681bb68ef281ebe73b6245e399a1ce2ff86866040516127d6929190614505565b60405180910390a350949350505050565b600081118015612808575060006127fc613144565b6001600160a01b031614155b156123615760025460408051632630c12f60e01b815290516000926001600160a01b031691632630c12f916004808301926020929190829003018186803b15801561285257600080fd5b505afa158015612866573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061288a9190613ddb565b6001600160a01b031663f182178384846040518363ffffffff1660e01b81526004016128b7929190614505565b60206040518083038186803b1580156128cf57600080fd5b505afa1580156128e3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129079190614307565b9050612911613144565b6001600160a01b031663c976bd9a85836040518363ffffffff1660e01b815260040161293e929190614505565b600060405180830381600087803b15801561295857600080fd5b505af115801561296c573d6000803e3d6000fd5b5050505050505050565b6001600160a01b0384166129a55761299f85848460405180602001604052806000815250612fdb565b506129cd565b6129b185858585613067565b6129cd5760405162461bcd60e51b81526004016103ad9061488c565b826001600160a01b0316846001600160a01b0316866001600160a01b03167fc88755fe083d57a3909c60ab246eef52835769b920f0a49045b2b1058afda7128585604051612a1c929190614b14565b60405180910390a45050505050565b806060612a36611827565b905060005b815181101561255657826001600160a01b031663b149206e838381518110612a5f57fe5b602002602001015160006040518363ffffffff1660e01b8152600401612a8692919061460a565b600060405180830381600087803b158015612aa057600080fd5b505af1158015612ab4573d6000803e3d6000fd5b505060019092019150612a3b9050565b60025460408051632630c12f60e01b815290516060926001600160a01b031691632630c12f916004808301926020929190829003018186803b158015612b0957600080fd5b505afa158015612b1d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b419190613ddb565b6001600160a01b031663f182178385670de0b6b3a76400006040518363ffffffff1660e01b8152600401612b76929190614505565b60206040518083038186803b158015612b8e57600080fd5b505afa158015612ba2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612bc69190614307565b15612be35760405162461bcd60e51b81526004016103ad906146ae565b612bef858585856131c6565b90505b949350505050565b6000612180836010602085020163ffffffff6132e216565b6000611fe7828263ffffffff61330516565b6000815160011480156121805750826001600160a01b031682600081518110612c4957fe5b60200260200101516001600160a01b031614905092915050565b60006001600160e01b03198416630b7d51bd60e21b1480612c9457506001600160e01b031984166312ef080d60e01b145b80612caf57506001600160e01b0319841663fd6ac30960e01b145b80612cca57506001600160e01b03198416630eaa53bd60e31b145b80612ce557506001600160e01b031984166388666d8160e01b145b15612d6b57612d64856001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b158015612d2657600080fd5b505afa158015612d3a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d5e9190613ddb565b83612c24565b9050612bf2565b6001600160e01b0319841663d3963a2560e01b1415612e0b576002546040805163d51b3a1b60e01b81529051612d64926001600160a01b03169163d51b3a1b916004808301926020929190829003018186803b158015612dca57600080fd5b505afa158015612dde573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e029190613ddb565b86846002613321565b60405162461bcd60e51b81526004016103ad906146d7565b600080612e3b6001845161311c90919063ffffffff16565b90506000612e4f848363ffffffff61388116565b60ff166004811115612e5d57fe5b90506060612e738560008563ffffffff61389d16565b90506004826004811115612e8357fe5b1415612e9e57612e9487878361391d565b9350505050612180565b6002826004811115612eac57fe5b1415612eda57856001600160a01b0316612ec68883613a34565b6001600160a01b0316149350505050612180565b6003826004811115612ee857fe5b1415612f4257600087604051602001612f0191906143b2565b604051602081830303815290604052805190602001209050866001600160a01b0316612f2d8284613a34565b6001600160a01b031614945050505050612180565b60009350505050612180565b600082612f5d57506001612180565b6000612f71856001600160a01b0316613b0c565b9050806001600160a01b0316848490604051612f8c90613b0c565b600060405180830381858888f193505050503d8060008114612fca576040519150601f19603f3d011682016040523d82523d6000602084013e612fcf565b606091505b50909695505050505050565b604051631c48add360e21b81526060906001600160a01b03861690637122b74c9061301190600190889088908890600401614b43565b600060405180830381600087803b15801561302b57600080fd5b505af115801561303f573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052612bef9190810190614189565b6000606063a9059cbb60e01b8484604051602401613086929190614505565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152905060606130c98787600085612fdb565b8051909150156130ee57808060200190518101906130e79190614138565b92506130f3565b600192505b5050949350505050565b6000606063095ea7b360e01b8484604051602401613086929190614505565b60008282111561313e5760405162461bcd60e51b81526004016103ad9061480d565b50900390565b60025460408051633674412160e21b815290516000926001600160a01b03169163d9d10484916004808301926020929190829003018186803b15801561318957600080fd5b505afa15801561319d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906131c19190613ddb565b905090565b6060836001600160a01b0316856001600160a01b03161415801561326357506040516363d972cb60e11b81526001600160a01b0386169063c7b2e596906132119087906004016144d7565b60206040518083038186803b15801561322957600080fd5b505afa15801561323d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906132619190614138565b155b61327f5760405162461bcd60e51b81526004016103ad906146ae565b61328b85858585612fdb565b9050836001600160a01b0316856001600160a01b03167f7d533d6faad77168a7f3e416e981e7d4f7b02844ddbbbdd26807b66a5002eb8e85856040516132d2929190614b14565b60405180910390a3949350505050565b600081601401835110156132f557600080fd5b500160200151600160601b900490565b6000816004018351101561331857600080fd5b50016020015190565b600082516000141561333557506000612bf2565b604051630319d8a560e11b81526060906001600160a01b03871690630633b14a906133649088906004016144d7565b60006040518083038186803b15801561337c57600080fd5b505afa158015613390573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526133b89190810190614097565b90506133c2613bbb565b6133cb82613b0f565b905060008090506060865167ffffffffffffffff811180156133ec57600080fd5b5060405190808252806020026020018201604052801561342657816020015b613413613bda565b81526020019060019003908161340b5790505b5090506000886001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561346457600080fd5b505afa158015613478573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061349c9190613ddb565b9050600080805b8a5181101561369f57816001600160a01b03168b82815181106134c257fe5b60200260200101516001600160a01b0316116134f05760405162461bcd60e51b81526004016103ad90614834565b8a81815181106134fc57fe5b60200260200101519150836001600160a01b03168b828151811061351c57fe5b60200260200101516001600160a01b0316141561353c5760019550613697565b8c6001600160a01b031663d4ee97348d8d848151811061355857fe5b60200260200101516040518363ffffffff1660e01b815260040161357d9291906144eb565b60206040518083038186803b15801561359557600080fd5b505afa1580156135a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906135cd9190614138565b6135e95760405162461bcd60e51b81526004016103ad906146ff565b8c6001600160a01b031663da34a8508d8d848151811061360557fe5b60200260200101516040518363ffffffff1660e01b815260040161362a9291906144eb565b60806040518083038186803b15801561364257600080fd5b505afa158015613656573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061367a91906142ec565b855160018501948791811061368b57fe5b60200260200101819052505b6001016134a3565b5060028960028111156136ae57fe5b14156136d657846136d15760405162461bcd60e51b81526004016103ad90614783565b613708565b60008960028111156136e457fe5b14156137085784156137085760405162461bcd60e51b81526004016103ad906149b7565b818452613713613bbb565b61371c85613b0f565b9050600080808c600281111561372e57fe5b1461374d5760018201915087613745576000613748565b60015b60ff16015b88511561375d5788518351920191015b60015b60108110156138455760008a826010811061377757fe5b6020020151111561383d5760018301925060068110156137bf57600084826010811061379f57fe5b6020020151116137b05760006137b3565b60015b60ff168201915061383d565b600b8110156137fd576137f28482601081106137d757fe5b60200201518b83601081106137e857fe5b6020020151613b60565b6137b05760006137b3565b61382784826010811061380c57fe5b60200201518b836010811061381d57fe5b6020020151613b6e565b613832576000613835565b60015b60ff16820191505b600101613760565b506138508183613b6e565b61386c5760405162461bcd60e51b81526004016103ad90614a95565b5060019e9d5050505050505050505050505050565b6000816001018351101561389457600080fd5b50016001015190565b6060818301845110156138af57600080fd5b6060821580156138ca57604051915060208201604052613914565b6040519150601f8416801560200281840101858101878315602002848b0101015b818310156139035780518352602092830192016138eb565b5050858452601f01601f1916604052505b50949350505050565b600060606320c13b0b60e01b8560405160200161393a9190614581565b60408051601f1981840301815290829052613959918690602401614640565b604051602081830303815290604052906001600160e01b0319166020820180516001600160e01b038381831617835250505050905060006060856001600160a01b0316836040516139aa919061436f565b600060405180830381855afa9150503d80600081146139e5576040519150601f19603f3d011682016040523d82523d6000602084013e6139ea565b606091505b50915091508180156139fd575080516020145b8015613a2957506320c13b0b60e01b613a1d82600063ffffffff61330516565b6001600160e01b031916145b979650505050505050565b60008151604114613a4757506000611fe7565b60208201516040830151604184015160ff167f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0821115613a8d5760009350505050611fe7565b8060ff16601b1480613aa257508060ff16601c145b15613b005760018682858560405160008152602001604052604051613aca94939291906145ec565b6020604051602081039080840390855afa158015613aec573d6000803e3d6000fd5b505050602060405103519350505050611fe7565b60009350505050611fe7565b90565b613b17613bbb565b60005b8251811015613b5a5781838281518110613b3057fe5b60200260200101516020015160108110613b4657fe5b602002018051600190810190915201613b1a565b50919050565b600260019190910104111590565b60029004600101111590565b6040518060a0016040528060006001600160a01b0316815260200160008152602001600081526020016000815260200160006001600160a01b031681525090565b6040518061020001604052806010906020820280368337509192915050565b604051806080016040528060006001600160a01b031681526020016000815260200160008152602001600081525090565b600082601f830112613c1b578081fd5b8135613c2e613c2982614ba4565b614b7d565b818152915060208083019084810181840286018201871015613c4f57600080fd5b60005b84811015613c77578135613c6581614c14565b84529282019290820190600101613c52565b505050505092915050565b600082601f830112613c92578081fd5b8135613ca0613c2982614ba4565b818152915060208083019084810160005b84811015613c7757613cc8888484358a0101613d21565b84529282019290820190600101613cb1565b60008083601f840112613ceb578182fd5b50813567ffffffffffffffff811115613d02578182fd5b602083019150836020828501011115613d1a57600080fd5b9250929050565b600082601f830112613d31578081fd5b8135613d3f613c2982614bc4565b9150808252836020828501011115613d5657600080fd5b8060208401602084013760009082016020015292915050565b600060808284031215613d80578081fd5b613d8a6080614b7d565b90508151613d9781614c14565b8082525060208201516020820152604082015160408201526060820151606082015292915050565b600060208284031215613dd0578081fd5b813561218081614c14565b600060208284031215613dec578081fd5b815161218081614c14565b60008060408385031215613e09578081fd5b8235613e1481614c14565b91506020830135613e2481614c14565b809150509250929050565b60008060008060808587031215613e44578182fd5b8435613e4f81614c14565b93506020850135613e5f81614c14565b92506040850135613e6f81614c14565b9396929550929360600135925050565b60008060008060008060a08789031215613e97578182fd5b8635613ea281614c14565b95506020870135613eb281614c14565b94506040870135613ec281614c14565b935060608701359250608087013567ffffffffffffffff811115613ee4578283fd5b613ef089828a01613cda565b979a9699509497509295939492505050565b600080600080600080600060c0888a031215613f1c578485fd5b8735613f2781614c14565b96506020880135613f3781614c14565b95506040880135613f4781614c14565b9450606088013593506080880135925060a088013567ffffffffffffffff811115613f70578182fd5b613f7c8a828b01613cda565b989b979a50959850939692959293505050565b600080600080600060808688031215613fa6578283fd5b8535613fb181614c14565b94506020860135613fc181614c14565b935060408601359250606086013567ffffffffffffffff811115613fe3578182fd5b613fef88828901613cda565b969995985093965092949392505050565b60008060408385031215614012578182fd5b823561401d81614c14565b946020939093013593505050565b6000806020838503121561403d578182fd5b823567ffffffffffffffff80821115614054578384fd5b81850186601f820112614065578485fd5b8035925081831115614075578485fd5b8660208085028301011115614088578485fd5b60200196919550909350505050565b600060208083850312156140a9578182fd5b825167ffffffffffffffff8111156140bf578283fd5b80840185601f8201126140d0578384fd5b805191506140e0613c2983614ba4565b828152838101908285016080808602850187018a10156140fe578788fd5b8794505b8585101561412a576141148a83613d6f565b8452600194909401939286019290810190614102565b509098975050505050505050565b600060208284031215614149578081fd5b81518015158114612180578182fd5b6000806040838503121561416a578182fd5b82518015158114614179578283fd5b6020939093015192949293505050565b60006020828403121561419a578081fd5b815167ffffffffffffffff8111156141b0578182fd5b80830184601f8201126141c1578283fd5b805191506141d1613c2983614bc4565b8281528560208484010111156141e5578384fd5b6141f6836020830160208501614be8565b95945050505050565b6000806000806000806101408789031215614218578384fd5b863567ffffffffffffffff8082111561422f578586fd5b61423b8a838b01613d21565b9750602091508189013596506040890135955089607f8a011261425c578384fd5b61426660a0614b7d565b8060608b016101008c018d81111561427c578788fd5b875b600581101561429b5782358552938601939186019160010161427e565b509197505035925050808211156142b0578384fd5b6142bc8a838b01613c82565b93506101208901359150808211156142d2578283fd5b506142df89828a01613c0b565b9150509295509295509295565b6000608082840312156142fd578081fd5b6121808383613d6f565b600060208284031215614318578081fd5b5051919050565b60008060408385031215614331578182fd5b825191506020830151613e2481614c14565b6000815180845261435b816020860160208601614be8565b601f01601f19169290920160200192915050565b60008251614381818460208701614be8565b9190910192915050565b6000845161439d818460208901614be8565b91909101928352506020820152604001919050565b7f19457468657265756d205369676e6564204d6573736167653a0a3332000000008152601c810191909152603c0190565b7f4d6574615472616e73616374696f6e28616464726573732077616c6c65742c6181527f646472657373206d6f64756c652c75696e743235362076616c75652c6279746560208201527f7320646174612c75696e74323536206e6f6e63652c75696e743235362076616c60408201527f6964556e74696c2c6164647265737320676173546f6b656e2c75696e7432353660608201527f2067617350726963652c75696e74323536206761734c696d69742c75696e743260808201527f3536206761734f766572686561642c616464726573732066656552656369706960a082015263656e742960e01b60c082015260c40190565b6001600160a01b0391909116815260200190565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b03929092168252602082015260400190565b6001600160a01b039390931683526020830191909152604082015260600190565b6020808252825182820181905260009190848201906040850190845b81811015612fcf5783516001600160e01b0319168352928401929184019160010161455b565b90815260200190565b9b8c526001600160a01b039a8b1660208d0152988a1660408c015260608b019790975260808a019590955260a089019390935260c0880191909152851660e0870152610100860152610120850152610140840152166101608201526101800190565b93845260ff9290921660208401526040830152606082015260800190565b6001600160e01b03199290921682526001600160a01b0316602082015260400190565b6000602082526121806020830184614343565b6000604082526146536040830185614343565b82810360208401526141f68185614343565b6020808252600a90820152695245454e5452414e435960b01b604082015260600190565b6020808252600b908201526a155394d5541413d495115160aa1b604082015260600190565b6020808252600f908201526e10d0531317d11254d0531313d5d151608a1b604082015260600190565b6020808252600e908201526d1253959053125117d351551213d160921b604082015260600190565b60208082526013908201527229a4a3a722a92fa727aa2fa3aaa0a92224a0a760691b604082015260600190565b6020808252601190820152701253959053125117d1d054d7d312535255607a1b604082015260600190565b6020808252601290820152714241445f5349474e41545552455f4441544160701b604082015260600190565b6020808252601f908201527f57414c4c45545f4f574e45525f5349474e41545552455f524551554952454400604082015260600190565b60208082526010908201526f5452414e534645525f4641494c55524560801b604082015260600190565b6020808252600f908201526e1393d390d157d513d3d7d4d3505313608a1b604082015260600190565b6020808252600d908201526c5355425f554e444552464c4f5760981b604082015260600190565b60208082526015908201527424a72b20a624a22fa9a4a3a722a929afa7a92222a960591b604082015260600190565b6020808252600f908201526e4e4f4e43455f544f4f5f4c4152474560881b604082015260600190565b6020808252600f908201526e1514905394d1915497d19052531151608a1b604082015260600190565b6020808252601f908201527f4e4f545f46524f4d5f4d45544154585f4f525f57414c4c45545f4f574e455200604082015260600190565b60208082526013908201527213515510551617d5539055551213d492569151606a1b604082015260600190565b6020808252600f908201526e1054141493d5905317d19052531151608a1b604082015260600190565b6020808252601490820152734e4f545f46524f4d5f544849535f4d4f44554c4560601b604082015260600190565b6020808252600c908201526b4144445f4f564552464c4f5760a01b604082015260600190565b6020808252600790820152661156141254915160ca1b604082015260600190565b60208082526022908201527f57414c4c45545f4f574e45525f5349474e41545552455f4e4f545f414c4c4f57604082015261115160f21b606082015260800190565b60208082526010908201526f494e53554646494349454e545f47415360801b604082015260600190565b6020808252600c908201526b0929cac82989288be9082a6960a31b604082015260600190565b602080825260129082015271494e56414c49445f5349474e41545552455360701b604082015260600190565b6020808252600690820152651313d0d2d15160d21b604082015260600190565b6020808252601290820152714e4f545f454e4f5547485f5349474e45525360701b604082015260600190565b6020808252600c908201526b4d554c5f4f564552464c4f5760a01b604082015260600190565b6000868252856020830152846040830152831515606083015260a06080830152613a2960a0830184614343565b600083825260406020830152612bf26040830184614343565b9283526020830191909152604082015260600190565b600060ff8616825260018060a01b038516602083015283604083015260806060830152614b736080830184614343565b9695505050505050565b60405181810167ffffffffffffffff81118282101715614b9c57600080fd5b604052919050565b600067ffffffffffffffff821115614bba578081fd5b5060209081020190565b600067ffffffffffffffff821115614bda578081fd5b50601f01601f191660200190565b60005b83811015614c03578181015183820152602001614beb565b838111156125565750506000910152565b6001600160a01b0381168114614c2957600080fd5b50565b6040516000904690614c3d90614c95565b6040518091039020836000015180519060200120846020015180519060200120838660400151604051602001614c77959493929190614cff565b60405160208183030381529060405280519060200120915050919050565b7f454950373132446f6d61696e28737472696e67206e616d652c737472696e672081527f76657273696f6e2c75696e7432353620636861696e49642c6164647265737320602082015271766572696679696e67436f6e74726163742960701b604082015260520190565b9485526020850193909352604084019190915260608301526001600160a01b0316608082015260a0019056fea2646970667358221220837fa8fb97bd3d5d51d11b101d16005de3c51965e3d371dc8ffc69919f5a663764736f6c63430006060033

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

000000000000000000000000728348a947b808483365bf24f5f7886f0a9786bf0000000000000000000000000000000000000000000000000000000000015180

-----Decoded View---------------
Arg [0] : _controller (address): 0x728348A947B808483365Bf24F5f7886f0a9786Bf
Arg [1] : _delayPeriod (uint256): 86400

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000728348a947b808483365bf24f5f7886f0a9786bf
Arg [1] : 0000000000000000000000000000000000000000000000000000000000015180


Deployed Bytecode Sourcemap

147871:5490:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;12:1:-1;9;2:12;125320:2717:0;;;;;;;;;:::i;:::-;;116351:187;;5:9:-1;2:2;;;27:1;24;17:12;2:2;116351:187:0;;;:::i;150024:580::-;;5:9:-1;2:2;;;27:1;24;17:12;2:2;-1:-1;150024:580:0;;;;;;;;:::i;141232:45::-;;5:9:-1;2:2;;;27:1;24;17:12;2:2;141232:45:0;;;:::i;:::-;;;;;;;;;;;;;;;;121979:276;;5:9:-1;2:2;;;27:1;24;17:12;2:2;121979:276:0;;;:::i;148845:568::-;;5:9:-1;2:2;;;27:1;24;17:12;2:2;-1:-1;148845:568:0;;;;;;;;:::i;122264:34::-;;5:9:-1;2:2;;;27:1;24;17:12;2:2;122264:34:0;;;:::i;116624:193::-;;5:9:-1;2:2;;;27:1;24;17:12;2:2;116624:193:0;;;:::i;116044:221::-;;5:9:-1;2:2;;;27:1;24;17:12;2:2;-1:-1;116044:221:0;;;;;;;;:::i;150612:821::-;;5:9:-1;2:2;;;27:1;24;17:12;2:2;-1:-1;150612:821:0;;;;;;;;:::i;:::-;;;;;;;;148208:313;;5:9:-1;2:2;;;27:1;24;17:12;2:2;-1:-1;148208:313:0;;;;;;;;:::i;122342:47::-;;5:9:-1;2:2;;;27:1;24;17:12;2:2;-1:-1;122342:47:0;;;;;;;;:::i;128478:706::-;;5:9:-1;2:2;;;27:1;24;17:12;2:2;-1:-1;128478:706:0;;;;;;;;:::i;117138:130::-;;5:9:-1;2:2;;;27:1;24;17:12;2:2;117138:130:0;;;:::i;:::-;;;;;;;;147921:23;;5:9:-1;2:2;;;27:1;24;17:12;2:2;147921:23:0;;;:::i;128179:141::-;;5:9:-1;2:2;;;27:1;24;17:12;2:2;-1:-1;128179:141:0;;;;;;;;:::i;148529:308::-;;5:9:-1;2:2;;;27:1;24;17:12;2:2;-1:-1;148529:308:0;;;;;;;;:::i;151441:383::-;;5:9:-1;2:2;;;27:1;24;17:12;2:2;-1:-1;151441:383:0;;;;;;;;:::i;:::-;;;;;;;;;;122305:28;;5:9:-1;2:2;;;27:1;24;17:12;2:2;122305:28:0;;;:::i;:::-;;;;;;;;149421:595;;5:9:-1;2:2;;;27:1;24;17:12;2:2;-1:-1;149421:595:0;;;;;;;;:::i;125320:2717::-;125694:3;125680:10;:17;;125672:37;;;;-1:-1:-1;;;125672:37:0;;;;;;;;;;;;;;;;;125722:30;;:::i;:::-;-1:-1:-1;125755:180:0;;;;;;;;125789:13;;-1:-1:-1;;;;;125755:180:0;;;;;125789:13;125818;;;;125755:180;;;;125846:13;;;;125755:180;;;;;;;125874:13;;;;125755:180;;;;;125910:13;;;;125755:180;;;;;;;;125946:51;;;;-1:-1:-1;;;125946:51:0;;;;;;;;;126010:14;126027:26;126048:4;126027:20;:26::i;:::-;126010:43;;126064:18;126085:538;126117:16;;126148:464;126171:426;;;;;;;;126209:6;-1:-1:-1;;;;;126171:426:0;;;;;126246:4;-1:-1:-1;;;;;126171:426:0;;;;;126274:9;126171:426;;;;126306:4;126171:426;;;;126333:5;126171:426;;;;126361:10;126171:426;;;;126394:11;:17;;;-1:-1:-1;;;;;126171:426:0;;;;;126434:11;:17;;;126171:426;;;;126474:11;:17;;;126171:426;;;;126514:11;:20;;;126171:426;;;;126557:11;:21;;;-1:-1:-1;;;;;126171:426:0;;;;126148:4;:464::i;:::-;126085:17;:538::i;:::-;126064:559;;126709:35;126722:6;126730:4;126736:7;126709:12;:35::i;:::-;126701:67;;;;-1:-1:-1;;;126701:67:0;;;;;;;;;126787:48;:10;126815:7;126824:10;126787:48;:27;:48;:::i;:::-;126779:79;;;;-1:-1:-1;;;126779:79:0;;;;;;;;;127064:45;127083:6;127091:5;127098:10;127064:18;:45::i;:::-;127204:9;:13;127200:91;;127234:45;127258:9;127269;-1:-1:-1;;;;;127234:23:0;;;:45;;:23;:45;:::i;:::-;;127200:91;127324:43;127361:5;127353:2;127325:25;127347:2;127325:11;:17;;;:21;;:25;;;;:::i;:::-;:30;;;;;;;127324:43;:36;:43;:::i;:::-;127311:9;:56;;127303:85;;;;-1:-1:-1;;;127303:85:0;;;;;;;;;127399:12;127414:9;127399:24;;127495:12;127509:23;127544:4;-1:-1:-1;;;;;127536:18:0;127560:11;:17;;;127579:4;127536:48;;;;;;;;;;;;;;;;;;;;;;;;12:1:-1;19;14:27;;;;67:4;61:11;56:16;;134:4;130:9;123:4;105:16;101:27;97:43;94:1;90:51;84:4;77:65;157:16;154:1;147:27;211:16;208:1;201:4;198:1;194:12;179:49;5:228;;14:27;32:4;27:9;;5:228;;127494:90:0;;;;127615:9;127769:17;;;;127605:19;;;127759:27;;:57;;127799:11;:17;;;127759:57;;;127789:7;127759:57;127749:67;;127861:6;-1:-1:-1;;;;;127834:83:0;127849:10;-1:-1:-1;;;;;127834:83:0;;127869:5;127876:10;127888:7;127897;127906:10;127834:83;;;;;;;;;;;;;;;;;;;127934:17;;;;:22;127930:100;;127973:45;127989:6;127997:11;128010:7;127973:15;:45::i;:::-;125320:2717;;;;;;;;;;;;:::o;116351:187::-;116457:10;116478:19;116457:10;116478:11;:19::i;:::-;116513:17;;-1:-1:-1;;;;;116513:17:0;;;;;;;;116351:187;:::o;150024:580::-;112919:11;;:16;112911:39;;;;-1:-1:-1;;;112911:39:0;;;;;;;;;112975:1;112961:11;:15;150268:6;142321:22:::1;150268:6:::0;142321:14:::1;:22::i;:::-;142320:23;142312:42;;;;-1:-1:-1::0;;;142312:42:0::1;;;;;;;;;150313:6:::2;141906;-1:-1:-1::0;;;;;141899:20:0::2;;:22;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24::::0;17:12:::2;2:2;141899:22:0;;;;8:9:-1;5:2;;;45:16;42:1;39::::0;24:38:::2;77:16;74:1;67:27;5:2;141899:22:0;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;141899:22:0;;;;;;;;;-1:-1:-1::0;;;;;141885:36:0::2;:10;-1:-1:-1::0;;;;;141885:36:0::2;;:80;;;-1:-1:-1::0;141938:10:0::2;141960:4;141938:27;141885:80;141863:161;;;;-1:-1:-1::0;;;141863:161:0::2;;;;;;;;;142035:10;;;;;;;;;-1:-1:-1::0;;;;;142035:10:0::2;-1:-1:-1::0;;;;;142035:24:0::2;;:26;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24::::0;17:12:::2;2:2;142035:26:0;;;;8:9:-1;5:2;;;45:16;42:1;39::::0;24:38:::2;77:16;74:1;67:27;5:2;142035:26:0;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;142035:26:0;;;;;;;;;-1:-1:-1::0;;;;;142035:42:0::2;;142078:6;142035:50;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24::::0;17:12:::2;2:2;142035:50:0;;;;8:9:-1;5:2;;;45:16;42:1;39::::0;24:38:::2;77:16;74:1;67:27;5:2;142035:50:0;;;;150337:24:::3;150364:42;150380:6;150388:5;150395:2;150399:6;150364:15;:42::i;:::-;150337:69;;150418:16;150439:10;;;;;;;;;-1:-1:-1::0;;;;;150439:10:0::3;-1:-1:-1::0;;;;;150439:25:0::3;;:27;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24::::0;17:12:::3;2:2;150439:27:0;;;;8:9:-1;5:2;;;45:16;42:1;39::::0;24:38:::3;77:16;74:1;67:27;5:2;150439:27:0;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;150439:27:0;;;;;;;;;-1:-1:-1::0;;;;;150439:41:0::3;;150481:6;150489:2;150439:53;;;;;;;;;;;;;;;;;;;::::0;::::3;;;;;;;;;5:9:-1;2:2;;;27:1;24::::0;17:12:::3;2:2;150439:53:0;;;;8:9:-1;5:2;;;45:16;42:1;39::::0;24:38:::3;77:16;74:1;67:27;5:2;150439:53:0;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;150439:53:0;;;;;;;;;150417:75;;;150510:11;150505:92;;150538:47;150550:6;150558:5;150565:19;150538:11;:47::i;:::-;-1:-1:-1::0;;113013:1:0;112999:15;;-1:-1:-1;;;;;;150024:580:0:o;141232:45::-;141276:1;141232:45;:::o;121979:276::-;122030:225;;;;;;;;;;;;;;121979:276;:::o;148845:568::-;112919:11;;:16;112911:39;;;;-1:-1:-1;;;112911:39:0;;;;;;;;;112975:1;112961:11;:15;149107:6;142321:22:::1;149107:6:::0;142321:14:::1;:22::i;:::-;142320:23;142312:42;;;;-1:-1:-1::0;;;142312:42:0::1;;;;;;;;;149152:6:::2;141906;-1:-1:-1::0;;;;;141899:20:0::2;;:22;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24::::0;17:12:::2;2:2;141899:22:0;;;;8:9:-1;5:2;;;45:16;42:1;39::::0;24:38:::2;77:16;74:1;67:27;5:2;141899:22:0;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;141899:22:0;;;;;;;;;-1:-1:-1::0;;;;;141885:36:0::2;:10;-1:-1:-1::0;;;;;141885:36:0::2;;:80;;;-1:-1:-1::0;141938:10:0::2;141960:4;141938:27;141885:80;141863:161;;;;-1:-1:-1::0;;;141863:161:0::2;;;;;;;;;142035:10;;;;;;;;;-1:-1:-1::0;;;;;142035:10:0::2;-1:-1:-1::0;;;;;142035:24:0::2;;:26;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24::::0;17:12:::2;2:2;142035:26:0;;;;8:9:-1;5:2;;;45:16;42:1;39::::0;24:38:::2;77:16;74:1;67:27;5:2;142035:26:0;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;142035:26:0;;;;;;;;;-1:-1:-1::0;;;;;142035:42:0::2;;142078:6;142035:50;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24::::0;17:12:::2;2:2;142035:50:0;;;;8:9:-1;5:2;;;45:16;42:1;39::::0;24:38:::2;77:16;74:1;67:27;5:2;142035:50:0;;;;149177:16:::3;149198:10;;;;;;;;;-1:-1:-1::0;;;;;149198:10:0::3;-1:-1:-1::0;;;;;149198:25:0::3;;:27;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24::::0;17:12:::3;2:2;149198:27:0;;;;8:9:-1;5:2;;;45:16;42:1;39::::0;24:38:::3;77:16;74:1;67:27;5:2;149198:27:0;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;149198:27:0;;;;;;;;;-1:-1:-1::0;;;;;149198:41:0::3;;149240:6;149248:2;149198:53;;;;;;;;;;;;;;;;;;;::::0;::::3;;;;;;;;;5:9:-1;2:2;;;27:1;24::::0;17:12:::3;2:2;149198:53:0;;;;8:9:-1;5:2;;;45:16;42:1;39::::0;24:38:::3;77:16;74:1;67:27;5:2;149198:53:0;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;149198:53:0;;;;;;;;;149176:75;;;149267:11;149262:79;;149295:34;149307:6;149315:5;149322:6;149295:11;:34::i;:::-;149353:52;149370:6;149378:5;149385:2;149389:6;149397:7;;149353:52;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16:::0;::::3;74:27:::0;;;;-1:-1;149353:16:0::3;::::0;-1:-1:-1;;;149353:52:0:i:3;:::-;-1:-1:-1::0;;113013:1:0;112999:15;;-1:-1:-1;;;;;;;148845:568:0:o;122264:34::-;;;;:::o;116624:193::-;116732:10;116753:21;116732:10;116753:13;:21::i;:::-;116790:19;;-1:-1:-1;;;;;116790:19:0;;;;;;;;116624:193;:::o;116044:221::-;112919:11;;:16;112911:39;;;;-1:-1:-1;;;112911:39:0;;;;;;;;;112975:1;112961:11;:15;;;;116201:6:::1;141906;-1:-1:-1::0;;;;;141899:20:0::1;;:22;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24::::0;17:12:::1;2:2;141899:22:0;;;;8:9:-1;5:2;;;45:16;42:1;39::::0;24:38:::1;77:16;74:1;67:27;5:2;141899:22:0;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;141899:22:0;;;;;;;;;-1:-1:-1::0;;;;;141885:36:0::1;:10;-1:-1:-1::0;;;;;141885:36:0::1;;:80;;;-1:-1:-1::0;141938:10:0::1;141960:4;141938:27;141885:80;141863:161;;;;-1:-1:-1::0;;;141863:161:0::1;;;;;;;;;142035:10;;;;;;;;;-1:-1:-1::0;;;;;142035:10:0::1;-1:-1:-1::0;;;;;142035:24:0::1;;:26;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24::::0;17:12:::1;2:2;142035:26:0;;;;8:9:-1;5:2;;;45:16;42:1;39::::0;24:38:::1;77:16;74:1;67:27;5:2;142035:26:0;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;142035:26:0;;;;;;;;;-1:-1:-1::0;;;;;142035:42:0::1;;142078:6;142035:50;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24::::0;17:12:::1;2:2;142035:50:0;;;;8:9:-1;5:2;;;45:16;42:1;39::::0;24:38:::1;77:16;74:1;67:27;5:2;-1:-1:::0;;116225:32:0::2;::::0;-1:-1:-1;;;116225:32:0;;-1:-1:-1;;;;;116225:24:0;::::2;::::0;-1:-1:-1;116225:24:0::2;::::0;-1:-1:-1;116225:32:0::2;::::0;116250:6;;116225:32:::2;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24::::0;17:12:::2;2:2;116225:32:0;;;;8:9:-1;5:2;;;45:16;42:1;39::::0;24:38:::2;77:16;74:1;67:27;5:2;-1:-1:::0;;113013:1:0;112999:15;;-1:-1:-1;;;;;116044:221:0:o;150612:821::-;151007:23;112919:11;;112934:1;112919:16;112911:39;;;;-1:-1:-1;;;112911:39:0;;;;;;;;;112975:1;112961:11;:15;150936:6;142321:22:::1;150936:6:::0;142321:14:::1;:22::i;:::-;142320:23;142312:42;;;;-1:-1:-1::0;;;142312:42:0::1;;;;;;;;;150981:6:::2;141906;-1:-1:-1::0;;;;;141899:20:0::2;;:22;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24::::0;17:12:::2;2:2;141899:22:0;;;;8:9:-1;5:2;;;45:16;42:1;39::::0;24:38:::2;77:16;74:1;67:27;5:2;141899:22:0;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;141899:22:0;;;;;;;;;-1:-1:-1::0;;;;;141885:36:0::2;:10;-1:-1:-1::0;;;;;141885:36:0::2;;:80;;;-1:-1:-1::0;141938:10:0::2;141960:4;141938:27;141885:80;141863:161;;;;-1:-1:-1::0;;;141863:161:0::2;;;;;;;;;142035:10;;;;;;;;;-1:-1:-1::0;;;;;142035:10:0::2;-1:-1:-1::0;;;;;142035:24:0::2;;:26;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24::::0;17:12:::2;2:2;142035:26:0;;;;8:9:-1;5:2;;;45:16;42:1;39::::0;24:38:::2;77:16;74:1;67:27;5:2;142035:26:0;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;142035:26:0;;;;;;;;;-1:-1:-1::0;;;;;142035:42:0::2;;142078:6;142035:50;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24::::0;17:12:::2;2:2;142035:50:0;;;;8:9:-1;5:2;;;45:16;42:1;39::::0;24:38:::2;77:16;74:1;67:27;5:2;142035:50:0;;;;151048:24:::3;151075:42;151091:6;151099:5;151106:2;151110:6;151075:15;:42::i;:::-;151048:69;;151129:16;151150:10;;;;;;;;;-1:-1:-1::0;;;;;151150:10:0::3;-1:-1:-1::0;;;;;151150:25:0::3;;:27;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24::::0;17:12:::3;2:2;151150:27:0;;;;8:9:-1;5:2;;;45:16;42:1;39::::0;24:38:::3;77:16;74:1;67:27;5:2;151150:27:0;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;151150:27:0;;;;;;;;;-1:-1:-1::0;;;;;151150:41:0::3;;151192:6;151200:2;151150:53;;;;;;;;;;;;;;;;;;;::::0;::::3;;;;;;;;;5:9:-1;2:2;;;27:1;24::::0;17:12:::3;2:2;151150:53:0;;;;8:9:-1;5:2;;;45:16;42:1;39::::0;24:38:::3;77:16;74:1;67:27;5:2;151150:53:0;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;151150:53:0;;;;;;;;;151128:75;;;151221:11;151216:145;;151249:47;151261:6;151269:5;151276:19;151249:11;:47::i;:::-;151311:38;151323:6;151339:1;151343:5;151311:11;:38::i;:::-;151380:45;151401:6;151409:2;151413:5;151420:4;;151380:45;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16:::0;::::3;74:27:::0;;;;-1:-1;151380:20:0::3;::::0;-1:-1:-1;;;151380:45:0:i:3;:::-;113013:1:::0;112999:15;;151373:52;150612:821;-1:-1:-1;;;;;;;;;;;;150612:821:0:o;148208:313::-;112919:11;;:16;112911:39;;;;-1:-1:-1;;;112911:39:0;;;;;;;;;112975:1;112961:11;:15;148369:6;142321:22:::1;148369:6:::0;142321:14:::1;:22::i;:::-;142320:23;142312:42;;;;-1:-1:-1::0;;;142312:42:0::1;;;;;;;;;148414:6:::2;141906;-1:-1:-1::0;;;;;141899:20:0::2;;:22;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24::::0;17:12:::2;2:2;141899:22:0;;;;8:9:-1;5:2;;;45:16;42:1;39::::0;24:38:::2;77:16;74:1;67:27;5:2;141899:22:0;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;141899:22:0;;;;;;;;;-1:-1:-1::0;;;;;141885:36:0::2;:10;-1:-1:-1::0;;;;;141885:36:0::2;;:80;;;-1:-1:-1::0;141938:10:0::2;141960:4;141938:27;141885:80;141863:161;;;;-1:-1:-1::0;;;141863:161:0::2;;;;;;;;;142035:10;;;;;;;;;-1:-1:-1::0;;;;;142035:10:0::2;-1:-1:-1::0;;;;;142035:24:0::2;;:26;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24::::0;17:12:::2;2:2;142035:26:0;;;;8:9:-1;5:2;;;45:16;42:1;39::::0;24:38:::2;77:16;74:1;67:27;5:2;142035:26:0;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;142035:26:0;;;;;;;;;-1:-1:-1::0;;;;;142035:42:0::2;;142078:6;142035:50;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24::::0;17:12:::2;2:2;142035:50:0;;;;8:9:-1;5:2;;;45:16;42:1;39::::0;24:38:::2;77:16;74:1;67:27;5:2;142035:50:0;;;;148438:10:::3;;;;;;;;;-1:-1:-1::0;;;;;148438:10:0::3;-1:-1:-1::0;;;;;148438:21:0::3;;:23;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24::::0;17:12:::3;2:2;148438:23:0;;;;8:9:-1;5:2;;;45:16;42:1;39::::0;24:38:::3;77:16;74:1;67:27;5:2;148438:23:0;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;148438:23:0;;;;;;;;;-1:-1:-1::0;;;;;148438:35:0::3;;148474:6;148482:8;148492:20;148500:11;;148492:3;:7;;:20;;;;:::i;:::-;148438:75;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24::::0;17:12:::3;2:2;148438:75:0;;;;8:9:-1;5:2;;;45:16;42:1;39::::0;24:38:::3;77:16;74:1;67:27;122342:47:0::0;;;;;;;;;;;;;:::o;128478:706::-;112919:11;;:16;112911:39;;;;-1:-1:-1;;;112911:39:0;;;;;;;;;112975:1;112961:11;:15;;;128597:10:::1;::::0;:22:::1;::::0;;-1:-1:-1;;;128597:22:0;;;;-1:-1:-1;;;;;128597:10:0;;::::1;::::0;:20:::1;::::0;:22:::1;::::0;;::::1;::::0;::::1;::::0;;;;;;;;;:10;:22;::::1;;2:2:-1::0;::::1;;;27:1;24::::0;17:12:::1;2:2;128597:22:0;;;;8:9:-1;5:2;;;45:16;42:1;39::::0;24:38:::1;77:16;74:1;67:27;5:2;128597:22:0;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;128597:22:0;;;;;;;;;128584:35:::0;-1:-1:-1;128637:6:0::1;128632:545;128649:17:::0;;::::1;128632:545;;;128688:13;128704:6;;128711:1;128704:9;;;;;;;;;;;;;;;;;;;;;;128688:25:::0;-1:-1:-1;;;;;;128732:19:0;::::1;128728:438;;128786:21;128826:38;128786:21:::0;128854:9:::1;-1:-1:-1::0;;;;;128826:19:0;::::1;::::0;:38;::::1;:19;:38;:::i;:::-;;128728:438;;;;128919:37;::::0;-1:-1:-1;;;128919:37:0;;128905:11:::1;::::0;-1:-1:-1;;;;;128919:22:0;::::1;::::0;::::1;::::0;:37:::1;::::0;128950:4:::1;::::0;128919:37:::1;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24::::0;17:12:::1;2:2;128919:37:0;;;;8:9:-1;5:2;;;45:16;42:1;39::::0;24:38:::1;77:16;74:1;67:27;5:2;128919:37:0;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;128919:37:0;;;;;;;;;128905:51:::0;-1:-1:-1;128979:10:0;;128975:176:::1;;129098:33;::::0;-1:-1:-1;;;129098:33:0;;-1:-1:-1;;;;;129098:21:0;::::1;::::0;::::1;::::0;:33:::1;::::0;129120:2;;129124:6;;129098:33:::1;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24::::0;17:12:::1;2:2;129098:33:0;;;;8:9:-1;5:2;;;45:16;42:1;39::::0;24:38:::1;77:16;74:1;67:27;5:2;129098:33:0;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;129098:33:0;;;;;;;;;;128975:176;128728:438;;-1:-1:-1::0;128668:3:0::1;;128632:545;;;-1:-1:-1::0;;113013:1:0;112999:15;;-1:-1:-1;;128478:706:0:o;117138:130::-;117230:23;117138:130;:::o;147921:23::-;;;;:::o;128179:141::-;-1:-1:-1;;;;;128291:15:0;128262:4;128291:15;;;:7;:15;;;;;:21;;128179:141::o;148529:308::-;112919:11;;:16;112911:39;;;;-1:-1:-1;;;112911:39:0;;;;;;;;;112975:1;112961:11;:15;148723:6;142321:22:::1;148723:6:::0;142321:14:::1;:22::i;:::-;142320:23;142312:42;;;;-1:-1:-1::0;;;142312:42:0::1;;;;;;;;;122695:10:::2;122717:4;122695:27;122687:60;;;;-1:-1:-1::0;;;122687:60:0::2;;;;;;;;;148771:10:::3;;;;;;;;;-1:-1:-1::0;;;;;148771:10:0::3;-1:-1:-1::0;;;;;148771:21:0::3;;:23;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24::::0;17:12:::3;2:2;148771:23:0;;;;8:9:-1;5:2;;;45:16;42:1;39::::0;24:38:::3;77:16;74:1;67:27;5:2;148771:23:0;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;148771:23:0;;;;;;;;;-1:-1:-1::0;;;;;148771:35:0::3;;148807:6;148815:8;148825:3;148771:58;;;;;;;;;;;;;;;;;;151441:383:::0;151542:10;151567;151592:14;151642:10;;;;;;;;;-1:-1:-1;;;;;151642:10:0;-1:-1:-1;;;;;151642:21:0;;:23;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;151642:23:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;151642:23:0;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;151642:23:0;;;;;;;;;-1:-1:-1;;;;;151642:36:0;;151679:6;151642:44;;;;;;;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;151642:44:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;151642:44:0;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;151642:44:0;;;;;;;;;151634:52;;151705:10;;;;;;;;;-1:-1:-1;;;;;151705:10:0;-1:-1:-1;;;;;151705:21:0;;:23;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;151705:23:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;151705:23:0;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;151705:23:0;;;;;;;;;-1:-1:-1;;;;;151705:34:0;;151740:6;151705:42;;;;;;;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;151705:42:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;151705:42:0;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;151705:42:0;;;;;;;;;151697:50;;151770:10;;;;;;;;;-1:-1:-1;;;;;151770:10:0;-1:-1:-1;;;;;151770:21:0;;:23;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;151770:23:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;151770:23:0;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;151770:23:0;;;;;;;;;-1:-1:-1;;;;;151770:38:0;;151809:6;151770:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;151770:46:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;151770:46:0;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;151770:46:0;;;;;;;;;151441:383;;;;-1:-1:-1;;151441:383:0:o;122305:28::-;;;-1:-1:-1;;;;;122305:28:0;;:::o;149421:595::-;149734:23;112919:11;;112934:1;112919:16;112911:39;;;;-1:-1:-1;;;112911:39:0;;;;;;;;;112975:1;112961:11;:15;149663:6;142321:22:::1;149663:6:::0;142321:14:::1;:22::i;:::-;142320:23;142312:42;;;;-1:-1:-1::0;;;142312:42:0::1;;;;;;;;;149708:6:::2;141906;-1:-1:-1::0;;;;;141899:20:0::2;;:22;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24::::0;17:12:::2;2:2;141899:22:0;;;;8:9:-1;5:2;;;45:16;42:1;39::::0;24:38:::2;77:16;74:1;67:27;5:2;141899:22:0;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;141899:22:0;;;;;;;;;-1:-1:-1::0;;;;;141885:36:0::2;:10;-1:-1:-1::0;;;;;141885:36:0::2;;:80;;;-1:-1:-1::0;141938:10:0::2;141960:4;141938:27;141885:80;141863:161;;;;-1:-1:-1::0;;;141863:161:0::2;;;;;;;;;142035:10;;;;;;;;;-1:-1:-1::0;;;;;142035:10:0::2;-1:-1:-1::0;;;;;142035:24:0::2;;:26;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24::::0;17:12:::2;2:2;142035:26:0;;;;8:9:-1;5:2;;;45:16;42:1;39::::0;24:38:::2;77:16;74:1;67:27;5:2;142035:26:0;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;142035:26:0;;;;;;;;;-1:-1:-1::0;;;;;142035:42:0::2;;142078:6;142035:50;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24::::0;17:12:::2;2:2;142035:50:0;;;;8:9:-1;5:2;;;45:16;42:1;39::::0;24:38:::2;77:16;74:1;67:27;5:2;142035:50:0;;;;149776:16:::3;149797:10;;;;;;;;;-1:-1:-1::0;;;;;149797:10:0::3;-1:-1:-1::0;;;;;149797:25:0::3;;:27;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24::::0;17:12:::3;2:2;149797:27:0;;;;8:9:-1;5:2;;;45:16;42:1;39::::0;24:38:::3;77:16;74:1;67:27;5:2;149797:27:0;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;149797:27:0;;;;;;;;;-1:-1:-1::0;;;;;149797:41:0::3;;149839:6;149847:2;149797:53;;;;;;;;;;;;;;;;;;;::::0;::::3;;;;;;;;;5:9:-1;2:2;;;27:1;24::::0;17:12:::3;2:2;149797:53:0;;;;8:9:-1;5:2;;;45:16;42:1;39::::0;24:38:::3;77:16;74:1;67:27;5:2;149797:53:0;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;149797:53:0;;;;;;;;;149775:75;;;149866:11;149861:83;;149894:38;149906:6;149922:1;149926:5;149894:11;:38::i;:::-;149963:45;149984:6;149992:2;149996:5;150003:4;;149963:45;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16:::0;::::3;74:27:::0;;;;-1:-1;149963:20:0::3;::::0;-1:-1:-1;;;149963:45:0:i:3;:::-;113013:1:::0;112999:15;;149956:52;149421:595;-1:-1:-1;;;;;;;;;149421:595:0:o;130284:200::-;130400:14;130441:35;130468:4;130474:1;130441:26;:35::i;:::-;130432:44;130284:200;-1:-1:-1;;130284:200:0:o;132263:582::-;132355:7;122030:225;;;;;;;;;;;;;;132483:3;:10;;;132512:3;:10;;;132541:3;:9;;;132579:3;:8;;;132569:19;;;;;;132607:3;:9;;;132635:3;:14;;;132668:3;:12;;;132699:3;:12;;;132730:3;:12;;;132761:3;:15;;;132795:3;:16;;;132411:415;;;;;;;;;;;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;132411:415:0;;;132387:450;;;;;;132380:457;;132263:582;;;:::o;106082:331::-;106219:7;106310:13;;;;;;;;;;;;;-1:-1:-1;;;106310:13:0;;;106342:10;106371:8;106275:119;;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;106275:119:0;;;106251:154;;;;;;106244:161;;106082:331;;;;:::o;133780:453::-;133956:4;133978:13;133994:19;134008:4;133994:13;:19::i;:::-;133978:35;-1:-1:-1;;;;;;;134028:33:0;;-1:-1:-1;;;134028:33:0;134024:202;;;134085:45;134105:6;-1:-1:-1;;;;;134098:20:0;;:22;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;134098:22:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;134098:22:0;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;134098:22:0;;;;;;;;;134122:7;134085:12;:45::i;:::-;134078:52;;;;;134024:202;134170:44;134184:6;134192;134200:4;134206:7;134170:13;:44::i;133780:453::-;;;;;;:::o;107727:630::-;107916:4;107964:10;:17;107946:7;:14;:35;107938:66;;;;-1:-1:-1;;;107938:66:0;;;;;;;;;108015:18;;108044:284;108065:7;:14;108061:1;:18;108044:284;;;108122:10;-1:-1:-1;;;;;108109:23:0;:7;108117:1;108109:10;;;;;;;;;;;;;;-1:-1:-1;;;;;108109:23:0;;108101:57;;;;-1:-1:-1;;;108101:57:0;;;;;;;;;108186:7;108194:1;108186:10;;;;;;;;;;;;;;108173:23;;108216:52;108232:8;108242:7;108250:1;108242:10;;;;;;;;;;;;;;108254;108265:1;108254:13;;;;;;;;;;;;;;108216:15;:52::i;:::-;108211:106;;108296:5;108289:12;;;;;;108211:106;108081:3;;108044:284;;;-1:-1:-1;108345:4:0;;107727:630;-1:-1:-1;;;;;107727:630:0:o;134524:533::-;134678:10;134674:376;;-1:-1:-1;;;;;134714:15:0;;;;;;:7;:15;;;;;;;;:38;;;:26;;:38;;;;;;;;134713:39;134705:64;;;;-1:-1:-1;;;134705:64:0;;;;;;;;;-1:-1:-1;;;;;134784:15:0;;;;;;:7;:15;;;;;;;;:38;;;134825:4;134784:26;;;:38;;;;;;:45;;-1:-1:-1;;134784:45:0;;;;;;134674:376;;;-1:-1:-1;;;;;134878:15:0;;;;;;:7;:15;;;;;:21;134870:29;;134862:57;;;;-1:-1:-1;;;134862:57:0;;;;;;;;;134961:12;134952:3;134943:5;:12;;134942:32;;134934:60;;;;-1:-1:-1;;;134934:60:0;;;;;;;;;-1:-1:-1;;;;;135009:15:0;;;;;;:7;:15;;;;;:29;;;134674:376;134524:533;;;:::o;38571:269::-;38717:12;38757:28;-1:-1:-1;;;;;38757:10:0;;38768:6;38776:8;38757:28;:10;:28;:::i;:::-;38747:38;;38804:7;38796:36;;;;-1:-1:-1;;;38796:36:0;;;;;;;;36026:205;36162:5;;;36186:6;;;:20;;;36205:1;36200;36196;:5;;;;;;:10;36186:20;36178:45;;;;-1:-1:-1;;;36178:45:0;;;;;;;;36440:191;36576:5;;;36600:6;;;;36592:31;;;;-1:-1:-1;;;36592:31:0;;;;;;;;133015:718;133184:12;133199:56;133237:11;:17;;;133199:33;133211:11;:20;;;133199:7;:11;;:33;;;;:::i;:::-;:37;:56;:37;:56;:::i;:::-;133184:71;;133266:47;133278:6;133286:11;:17;;;133305:7;133266:11;:47::i;:::-;133350:21;;;;133326:20;;-1:-1:-1;;;;;133350:35:0;;133349:74;;133402:11;:21;;;133349:74;;;133389:10;133349:74;133438:17;;133326:97;;-1:-1:-1;;;;;;133438:31:0;133434:292;;133486:47;133499:6;133507:12;133521:7;133486:47;;;;;;;;;;;;:12;:47::i;:::-;;133434:292;;;133592:71;133614:6;133622:11;:17;;;133641:12;133655:7;133592:21;:71::i;:::-;133566:148;;;;-1:-1:-1;;;133566:148:0;;;;;;;;;133015:718;;;;;:::o;117378:276::-;117467:6;117485:23;117511:17;:15;:17::i;:::-;117485:43;-1:-1:-1;117544:6:0;117539:108;117560:7;:14;117556:1;:18;117539:108;;;117596:1;-1:-1:-1;;;;;117596:12:0;;117609:7;117617:1;117609:10;;;;;;;;;;;;;;117629:4;117596:39;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;117596:39:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;-1:-1;;117576:3:0;;;;;-1:-1:-1;117539:108:0;;-1:-1:-1;117539:108:0;;;117378:276;;;:::o;144533:207::-;144623:4;144646:10;144661;;;;;;;;;-1:-1:-1;;;;;144661:10:0;-1:-1:-1;;;;;144661:24:0;;:26;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;144661:26:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;144661:26:0;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;144661:26:0;;;;;;;;;-1:-1:-1;;;;;144661:34:0;;144696:6;144661:42;;;;;;;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;144661:42:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;144661:42:0;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;144661:42:0;;;;;;;;;-1:-1:-1;144729:3:0;-1:-1:-1;;144533:207:0;-1:-1:-1;;;144533:207:0:o;145981:1131::-;146153:24;-1:-1:-1;;;;;146203:19:0;;146195:43;;;;-1:-1:-1;;;146195:43:0;;;;;;;;;146298:39;;-1:-1:-1;;;146298:39:0;;146281:14;;-1:-1:-1;;;;;146298:22:0;;;;;:39;;146321:6;;146329:7;;146298:39;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;146298:39:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;146298:39:0;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;146298:39:0;;;;;;;;;146281:56;;146364:9;146354:6;:19;146350:528;;146448:19;146486:13;;146482:190;;146550:47;146571:6;146579:5;146586:7;146595:1;146550:20;:47::i;:::-;146520:136;;;;-1:-1:-1;;;146520:136:0;;;;;;;;;146763:52;146784:6;146792:5;146799:7;146808:6;146763:20;:52::i;:::-;146737:129;;;;-1:-1:-1;;;146737:129:0;;;;;;;;;146350:528;;146968:9;146959:6;:18;146955:94;;;147016:21;:6;147027:9;147016:21;:10;:21;:::i;:::-;146994:43;;146955:94;147081:5;-1:-1:-1;;;;;147064:40:0;147073:6;-1:-1:-1;;;;;147064:40:0;;147088:7;147097:6;147064:40;;;;;;;;;;;;;;;;145981:1131;;;;;;;:::o;135065:356::-;135218:1;135209:6;:10;:40;;;;-1:-1:-1;135247:1:0;135223:12;:10;:12::i;:::-;-1:-1:-1;;;;;135223:26:0;;;135209:40;135205:209;;;135279:10;;:24;;;-1:-1:-1;;;135279:24:0;;;;135266:10;;-1:-1:-1;;;;;135279:10:0;;:22;;:24;;;;;;;;;;;;;;:10;:24;;;2:2:-1;;;;27:1;24;17:12;2:2;135279:24:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;135279:24:0;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;135279:24:0;;;;;;;;;-1:-1:-1;;;;;135279:35:0;;135315:5;135322:6;135279:50;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;135279:50:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;135279:50:0;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;135279:50:0;;;;;;;;;135266:63;;135355:12;:10;:12::i;:::-;-1:-1:-1;;;;;135344:43:0;;135388:6;135396:5;135344:58;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;135344:58:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;135344:58:0;;;;135205:209;135065:356;;;:::o;145459:514::-;-1:-1:-1;;;;;145662:19:0;;145658:246;;145698:36;145711:6;145719:2;145723:6;145698:36;;;;;;;;;;;;:12;:36::i;:::-;;145658:246;;;145793:48;145815:6;145823:5;145830:2;145834:6;145793:21;:48::i;:::-;145767:125;;;;-1:-1:-1;;;145767:125:0;;;;;;;;;145945:2;-1:-1:-1;;;;;145919:46:0;145938:5;-1:-1:-1;;;;;145919:46:0;145930:6;-1:-1:-1;;;;;145919:46:0;;145949:6;145957:7;145919:46;;;;;;;;;;;;;;;;145459:514;;;;;:::o;117719:275::-;117810:6;117828:23;117854:17;:15;:17::i;:::-;117828:43;-1:-1:-1;117887:6:0;117882:105;117903:7;:14;117899:1;:18;117882:105;;;117939:1;-1:-1:-1;;;;;117939:12:0;;117952:7;117960:1;117952:10;;;;;;;;;;;;;;117972:1;117939:36;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;117939:36:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;-1:-1;;117919:3:0;;;;;-1:-1:-1;117882:105:0;;-1:-1:-1;117882:105:0;151832:526;152209:10;;:24;;;-1:-1:-1;;;152209:24:0;;;;152029:23;;-1:-1:-1;;;;;152209:10:0;;:22;;:24;;;;;;;;;;;;;;:10;:24;;;2:2:-1;;;;27:1;24;17:12;2:2;152209:24:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;152209:24:0;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;152209:24:0;;;;;;;;;-1:-1:-1;;;;;152209:35:0;;152245:2;152249:4;152209:45;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;152209:45:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;152209:45:0;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;152209:45:0;;;;;;;;;:50;152201:78;;;;-1:-1:-1;;;152201:78:0;;;;;;;;;152297:53;152324:6;152332:2;152336:5;152343:6;152297:26;:53::i;:::-;152290:60;;151832:526;;;;;;;:::o;130748:241::-;130902:12;130939:42;:4;130954:26;130958:2;:17;;130954:26;130939:42;:14;:42;:::i;132853:154::-;132945:13;132983:16;:4;132945:13;132983:16;:13;:16;:::i;129977:213::-;130108:4;130138:7;:14;130156:1;130138:19;:43;;;;;130175:6;-1:-1:-1;;;;;130161:20:0;:7;130169:1;130161:10;;;;;;;;;;;;;;-1:-1:-1;;;;;130161:20:0;;130130:52;;129977:213;;;;:::o;152366:990::-;152593:4;-1:-1:-1;;;;;;152633:37:0;;-1:-1:-1;;;152633:37:0;;:90;;-1:-1:-1;;;;;;;152687:36:0;;-1:-1:-1;;;152687:36:0;152633:90;:143;;;-1:-1:-1;;;;;;;152740:36:0;;-1:-1:-1;;;152740:36:0;152633:143;:207;;;-1:-1:-1;;;;;;;152793:47:0;;-1:-1:-1;;;152793:47:0;152633:207;:264;;;-1:-1:-1;;;;;;;152857:40:0;;-1:-1:-1;;;152857:40:0;152633:264;152615:732;;;152935:45;152955:6;-1:-1:-1;;;;;152948:20:0;;:22;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;152948:22:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;152948:22:0;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;152948:22:0;;;;;;;;;152972:7;152935:12;:45::i;:::-;152928:52;;;;152615:732;-1:-1:-1;;;;;;153002:51:0;;-1:-1:-1;;;153002:51:0;152998:349;;;153125:10;;:26;;;-1:-1:-1;;;153125:26:0;;;;153077:201;;-1:-1:-1;;;;;153125:10:0;;:24;;:26;;;;;;;;;;;;;;:10;:26;;;2:2:-1;;;;27:1;24;17:12;2:2;153125:26:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;153125:26:0;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;153125:26:0;;;;;;;;;153170:6;153195:7;153221:42;153077:29;:201::i;152998:349::-;153311:24;;-1:-1:-1;;;153311:24:0;;;;;;;;108365:1003;108538:4;108560:24;108587:23;108608:1;108587:9;:16;:20;;:23;;;;:::i;:::-;108560:50;-1:-1:-1;108621:27:0;108665:38;:9;108560:50;108665:38;:17;:38;:::i;:::-;108651:53;;;;;;;;;;108621:83;-1:-1:-1;108717:21:0;108741:39;:9;108757:1;108760:19;108741:39;:15;:39;:::i;:::-;108717:63;-1:-1:-1;108814:20:0;108797:13;:37;;;;;;;;;108793:568;;;108858:50;108881:8;108891:6;108899:8;108858:22;:50::i;:::-;108851:57;;;;;;;108793:568;108947:21;108930:13;:38;;;;;;;;;108926:435;;;109034:6;-1:-1:-1;;;;;108992:48:0;:38;109011:8;109021;108992:18;:38::i;:::-;-1:-1:-1;;;;;108992:48:0;;108985:55;;;;;;;108926:435;109079:22;109062:13;:39;;;;;;;;;109058:303;;;109118:12;109214:8;109161:62;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;109161:62:0;;;109133:105;;;;;;109118:120;;109298:6;-1:-1:-1;;;;;109260:44:0;:34;109279:4;109285:8;109260:18;:34::i;:::-;-1:-1:-1;;;;;109260:44:0;;109253:51;;;;;;;;109058:303;109344:5;109337:12;;;;;;;38021:395;38158:12;38192:11;38188:55;;-1:-1:-1;38227:4:0;38220:11;;38188:55;38253:25;38281:14;:2;-1:-1:-1;;;;;38281:12:0;;:14::i;:::-;38253:42;;38360:9;-1:-1:-1;;;;;38360:14:0;38382:6;38395:8;38360:48;;;;;;;;;;;;;;;;;;;;;;;;;12:1:-1;19;14:27;;;;67:4;61:11;56:16;;134:4;130:9;123:4;105:16;101:27;97:43;94:1;90:51;84:4;77:65;157:16;154:1;147:27;211:16;208:1;201:4;198:1;194:12;179:49;5:228;;14:27;32:4;27:9;;5:228;-1:-1;38346:62:0;;38021:395;-1:-1:-1;;;;;;38021:395:0:o;118002:264::-;118208:50;;-1:-1:-1;;;118208:50:0;;118171:12;;-1:-1:-1;;;;;118208:23:0;;;;;:50;;118238:1;;118242:2;;118246:5;;118253:4;;118208:50;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;118208:50:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;118208:50:0;;;;;;39:16:-1;36:1;17:17;2:54;101:4;118208:50:0;80:15:-1;;;-1:-1;;76:31;65:43;;120:4;113:20;118208:50:0;;;;;;;;118355:838;118528:12;118558:19;118617:26;;;118658:2;118675:6;118580:112;;;;;;;;;;;;;;-1:-1:-1;;26:21;;;22:32;6:49;;118580:112:0;;;49:4:-1;25:18;;61:17;;-1:-1;;;;;182:15;-1:-1;;;;;;118580:112:0;;;179:29:-1;;;;160:49;;;118580:112:0;-1:-1:-1;118703:23:0;118729:38;118742:6;118750:5;-1:-1:-1;118580:112:0;118729:12;:38::i;:::-;118958:17;;118703:64;;-1:-1:-1;118958:21:0;118954:232;;119017:10;119006:30;;;;;;;;;;;;;;118996:40;;118954:232;;;119170:4;119160:14;;118954:232;118355:838;;;;;;;;:::o;119282:846::-;119459:12;119489:19;119548:25;;;119588:7;119610:6;119511:116;;;;;;;;;;36239:193;36347:4;36382:1;36377;:6;;36369:32;;;;-1:-1:-1;;;36369:32:0;;;;;;;;;-1:-1:-1;36419:5:0;;;36239:193::o;143235:162::-;143365:10;;:23;;;-1:-1:-1;;;143365:23:0;;;;143325:7;;-1:-1:-1;;;;;143365:10:0;;:21;;:23;;;;;;;;;;;;;;:10;:23;;;2:2:-1;;;;27:1;24;17:12;2:2;143365:23:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;143365:23:0;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;143365:23:0;;;;;;;;;143350:39;;143235:162;:::o;147120:715::-;147316:23;147652:2;-1:-1:-1;;;;;147642:12:0;:6;-1:-1:-1;;;;;147642:12:0;;;:45;;;;-1:-1:-1;147659:28:0;;-1:-1:-1;;;147659:28:0;;-1:-1:-1;;;;;147659:24:0;;;;;:28;;147684:2;;147659:28;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;147659:28:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;147659:28:0;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;147659:28:0;;;;;;;;;147658:29;147642:45;147634:73;;;;-1:-1:-1;;;147634:73:0;;;;;;;;;147731:39;147744:6;147752:2;147756:5;147763:6;147731:12;:39::i;:::-;147718:52;;147809:2;-1:-1:-1;;;;;147786:41:0;147801:6;-1:-1:-1;;;;;147786:41:0;;147813:5;147820:6;147786:41;;;;;;;;;;;;;;;;147120:715;;;;;;:::o;27986:338::-;28063:7;28109:6;28118:2;28109:11;28091:6;:13;:30;;28083:39;;12:1:-1;9;2:12;28083:39:0;-1:-1:-1;28214:30:0;28230:4;28214:30;28208:37;-1:-1:-1;;;28204:71:0;;;27986:338::o;30423:297::-;30499:6;30544;30553:1;30544:10;30526:6;:13;:29;;30518:38;;12:1:-1;9;2:12;30518:38:0;-1:-1:-1;30641:30:0;30657:4;30641:30;30635:37;;30423:297::o;136894:3313::-;137132:4;137205:7;:14;137223:1;137205:19;137201:64;;;-1:-1:-1;137248:5:0;137241:12;;137201:64;137355:31;;-1:-1:-1;;;137355:31:0;;137317:35;;-1:-1:-1;;;;;137355:23:0;;;;;:31;;137379:6;;137355:31;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;137355:31:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;137355:31:0;;;;;;39:16:-1;36:1;17:17;2:54;101:4;137355:31:0;80:15:-1;;;-1:-1;;76:31;65:43;;120:4;113:20;137355:31:0;;;;;;;;;137317:69;;137397:33;;:::i;:::-;137433:28;137448:12;137433:14;:28::i;:::-;137397:64;;137531:22;137556:5;137531:30;;137572:39;137634:7;:14;137614:35;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;137614:35:0;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;137572:77;;137660:19;137689:6;-1:-1:-1;;;;;137682:20:0;;:22;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;137682:22:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;137682:22:0;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;137682:22:0;;;;;;;;;137660:44;-1:-1:-1;137715:17:0;;;137776:523;137797:7;:14;137793:1;:18;137776:523;;;137891:10;-1:-1:-1;;;;;137878:23:0;:7;137886:1;137878:10;;;;;;;;;;;;;;-1:-1:-1;;;;;137878:23:0;;137870:57;;;;-1:-1:-1;;;137870:57:0;;;;;;;;;137955:7;137963:1;137955:10;;;;;;;;;;;;;;137942:23;;138000:11;-1:-1:-1;;;;;137986:25:0;:7;137994:1;137986:10;;;;;;;;;;;;;;-1:-1:-1;;;;;137986:25:0;;137982:306;;;138052:4;138032:24;;137982:306;;;138105:13;-1:-1:-1;;;;;138105:24:0;;138130:6;138138:7;138146:1;138138:10;;;;;;;;;;;;;;138105:44;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;138105:44:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;138105:44:0;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;138105:44:0;;;;;;;;;138097:76;;;;-1:-1:-1;;;138097:76:0;;;;;;;;;138227:13;-1:-1:-1;;;;;138227:25:0;;138253:6;138261:7;138269:1;138261:10;;;;;;;;;;;;;;138227:45;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;138227:45:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;138227:45:0;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;138227:45:0;;;;;;;;;138192:32;;138209:14;;;;138192:16;;:32;;;;;;;;;;;:80;;;;137982:306;137813:3;;137776:523;;;-1:-1:-1;138367:28:0;138352:11;:43;;;;;;;;;138348:286;;;138420:17;138412:61;;;;-1:-1:-1;;;138412:61:0;;;;;;;;;138348:286;;;138510:30;138495:11;:45;;;;;;;;;138491:143;;;138566:17;138565:18;138557:65;;;;-1:-1:-1;;;138557:65:0;;;;;;;;;138855:12;138837:16;138830:38;138880:34;;:::i;:::-;138917:32;138932:16;138917:14;:32::i;:::-;138880:69;-1:-1:-1;139000:18:0;;;139065:11;:45;;;;;;;;;139061:148;;139144:1;139127:18;;;;139172:17;:25;;139196:1;139172:25;;;139192:1;139172:25;139160:37;;;139061:148;139223:8;;:12;139219:143;;139306:8;;139341:9;;139289:25;;;139329:21;139219:143;139386:1;139372:684;136770:2;139389:1;:18;139372:684;;;139444:1;139433:5;139439:1;139433:8;;;;;;;;;;;:12;139429:616;;;139483:1;139466:18;;;;139511:1;139507;:5;139503:527;;;139633:1;139621:6;139628:1;139621:9;;;;;;;;;;;:13;:21;;139641:1;139621:21;;;139637:1;139621:21;139609:33;;;;;;139503:527;;;139676:2;139672:1;:6;139668:362;;;139791:28;139799:6;139806:1;139799:9;;;;;;;;;;;139810:5;139816:1;139810:8;;;;;;;;;;;139791:7;:28::i;:::-;:36;;139826:1;139791:36;;139668:362;139970:32;139982:6;139989:1;139982:9;;;;;;;;;;;139993:5;139999:1;139993:8;;;;;;;;;;;139970:11;:32::i;:::-;:40;;140009:1;139970:40;;;140005:1;139970:40;139958:52;;;;;;139668:362;139409:3;;139372:684;;;;140116:36;140128:8;140138:13;140116:11;:36::i;:::-;140108:67;;;;-1:-1:-1;;;140108:67:0;;;;;;;;;-1:-1:-1;140195:4:0;;136894:3313;-1:-1:-1;;;;;;;;;;;;;;136894:3313:0:o;28332:287::-;28407:5;28451:6;28460:1;28451:10;28433:6;:13;:29;;28425:38;;12:1:-1;9;2:12;28425:38:0;-1:-1:-1;28543:29:0;28559:3;28543:29;28537:36;;28332:287::o;25379:2599::-;25526:12;25591:7;25582:6;:16;25564:6;:13;:35;;25556:44;;12:1:-1;9;2:12;25556:44:0;25613:22;25679:15;;25708:2005;;;;27857:4;27851:11;27838:24;;27910:4;27899:9;27895:20;27889:4;27882:34;25672:2259;;25708:2005;25893:4;25887:11;25874:24;;26562:2;26553:7;26549:16;26950:9;26943:17;26937:4;26933:28;26921:9;26910;26906:25;26902:60;26999:7;26995:2;26991:16;27256:6;27242:9;27235:17;27229:4;27225:28;27213:9;27205:6;27201:22;27197:57;27193:70;27027:434;27290:3;27286:2;27283:11;27027:434;;;27432:9;;27421:21;;27332:4;27324:13;;;;27365;27027:434;;;-1:-1:-1;;27481:26:0;;;27693:2;27676:11;-1:-1:-1;;27672:25:0;27666:4;27659:39;-1:-1:-1;25672:2259:0;-1:-1:-1;27961:9:0;25379:2599;-1:-1:-1;;;;25379:2599:0:o;109376:595::-;109554:4;109576:21;109637:36;;;109699:8;109688:20;;;;;;;;;;;;;-1:-1:-1;;26:21;;;22:32;6:49;;109688:20:0;;;;109600:143;;109723:9;;109600:143;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;109600:143:0;;;;-1:-1:-1;;;;;109600:143:0;;38:4:-1;29:7;25:18;67:10;61:17;-1:-1;;;;;199:8;192:4;186;182:15;179:29;167:10;160:49;0:215;;;109600:143:0;109576:167;;109755:12;109769:19;109792:6;-1:-1:-1;;;;;109792:17:0;109810:8;109792:27;;;;;;;;;;;;;;;;;;;;;;12:1:-1;19;14:27;;;;67:4;61:11;56:16;;134:4;130:9;123:4;105:16;101:27;97:43;94:1;90:51;84:4;77:65;157:16;154:1;147:27;211:16;208:1;201:4;198:1;194:12;179:49;5:228;;14:27;32:4;27:9;;5:228;;109754:65:0;;;;109852:7;:43;;;;;109876:6;:13;109893:2;109876:19;109852:43;:100;;;;-1:-1:-1;;;;109912:18:0;:6;109928:1;109912:18;:15;:18;:::i;:::-;-1:-1:-1;;;;;;109912:40:0;;109852:100;109830:133;109376:595;-1:-1:-1;;;;;;;109376:595:0:o;109979:1116::-;110133:7;110162:9;:16;110182:2;110162:22;110158:72;;-1:-1:-1;110216:1:0;110201:17;;110158:72;110567:4;110552:20;;110546:27;110613:4;110598:20;;110592:27;110663:4;110648:20;;110642:27;110671:4;110638:38;110830:66;110817:79;;110813:129;;;110928:1;110913:17;;;;;;;110813:129;110956:1;:7;;110961:2;110956:7;:18;;;;110967:1;:7;;110972:2;110967:7;110956:18;110952:136;;;110998:28;111008:8;111018:1;111021;111024;110998:28;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;110998:28:0;;;;;;;;110991:35;;;;;;;110952:136;111074:1;111059:17;;;;;;;37697:173;37856:4;37697:173::o;140601:284::-;140729:33;;:::i;:::-;140785:6;140780:98;140801:9;:16;140797:1;:20;140780:98;;;140839:5;140845:9;140855:1;140845:12;;;;;;;;;;;;;;:18;;;140839:25;;;;;;;;;;:27;;;;;;;;;140819:3;140780:98;;;;140601:284;;;:::o;140215:183::-;140388:1;140383;140375:9;;;;140374:15;-1:-1:-1;140365:24:0;;140215:183::o;140406:187::-;140578:1;140570:9;;140583:1;140569:15;-1:-1:-1;140560:24:0;;140406:187::o;147871:5490::-;;;;;;;;;;-1:-1:-1;;;;;147871:5490:0;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;147871:5490:0;;;;;:::o;:::-;;;;;;;;;;;29:2:-1;21:6;17:15;125:4;109:14;101:6;88:42;-1:-1;147871:5490:0;;;-1:-1:-1;;147871:5490:0:o;:::-;;;;;;;;;;-1:-1:-1;;;;;147871:5490:0;;;;;;;;;;;;;;;;;;;;:::o;679:707:-1:-;;796:3;789:4;781:6;777:17;773:27;763:2;;-1:-1;;804:12;763:2;851:6;838:20;873:80;888:64;945:6;888:64;;;873:80;;;981:21;;;864:89;-1:-1;1025:4;1038:14;;;;1013:17;;;1127;;;1118:27;;;;1115:36;-1:-1;1112:2;;;1164:1;;1154:12;1112:2;1189:1;1174:206;1199:6;1196:1;1193:13;1174:206;;;85:6;72:20;97:33;124:5;97:33;;;1267:50;;1331:14;;;;1359;;;;1221:1;1214:9;1174:206;;;1178:14;;;;;756:630;;;;;1410:705;;1536:3;1529:4;1521:6;1517:17;1513:27;1503:2;;-1:-1;;1544:12;1503:2;1591:6;1578:20;1613:89;1628:73;1694:6;1628:73;;1613:89;1730:21;;;1604:98;-1:-1;1774:4;1787:14;;;;1762:17;;;1882:1;1867:242;1892:6;1889:1;1886:13;1867:242;;;1999:46;2041:3;1774:4;1975:3;1962:17;1766:6;1950:30;;1999:46;;;1987:59;;2060:14;;;;2088;;;;1914:1;1907:9;1867:242;;3754:336;;;3868:3;3861:4;3853:6;3849:17;3845:27;3835:2;;-1:-1;;3876:12;3835:2;-1:-1;3906:20;;3946:18;3935:30;;3932:2;;;-1:-1;;3968:12;3932:2;4012:4;4004:6;4000:17;3988:29;;4063:3;4012:4;4043:17;4004:6;4029:32;;4026:41;4023:2;;;4080:1;;4070:12;4023:2;3828:262;;;;;;4099:440;;4200:3;4193:4;4185:6;4181:17;4177:27;4167:2;;-1:-1;;4208:12;4167:2;4255:6;4242:20;4277:64;4292:48;4333:6;4292:48;;4277:64;4268:73;;4361:6;4354:5;4347:21;4465:3;4397:4;4456:6;4389;4447:16;;4444:25;4441:2;;;4482:1;;4472:12;4441:2;57734:6;4397:4;4389:6;4385:17;4397:4;4423:5;4419:16;57711:30;57790:1;57772:16;;;4397:4;57772:16;57765:27;4423:5;4160:379;-1:-1;;4160:379;5757:824;;5883:4;5871:9;5866:3;5862:19;5858:30;5855:2;;;-1:-1;;5891:12;5855:2;5919:20;5883:4;5919:20;;;5910:29;;226:6;220:13;238:33;265:5;238:33;;;6021:60;6003:16;5996:86;;6144:2;6213:9;6209:22;6803:13;6144:2;6163:5;6159:16;6152:86;6305:2;6374:9;6370:22;6803:13;6305:2;6324:5;6320:16;6313:86;6466:2;6535:9;6531:22;6803:13;6466:2;6485:5;6481:16;6474:86;5849:732;;;;;6866:241;;6970:2;6958:9;6949:7;6945:23;6941:32;6938:2;;;-1:-1;;6976:12;6938:2;85:6;72:20;97:33;124:5;97:33;;7114:263;;7229:2;7217:9;7208:7;7204:23;7200:32;7197:2;;;-1:-1;;7235:12;7197:2;226:6;220:13;238:33;265:5;238:33;;7384:366;;;7505:2;7493:9;7484:7;7480:23;7476:32;7473:2;;;-1:-1;;7511:12;7473:2;85:6;72:20;97:33;124:5;97:33;;;7563:63;-1:-1;7663:2;7702:22;;72:20;97:33;72:20;97:33;;;7671:63;;;;7467:283;;;;;;7757:617;;;;;7912:3;7900:9;7891:7;7887:23;7883:33;7880:2;;;-1:-1;;7919:12;7880:2;85:6;72:20;97:33;124:5;97:33;;;7971:63;-1:-1;8071:2;8110:22;;72:20;97:33;72:20;97:33;;;8079:63;-1:-1;8179:2;8218:22;;72:20;97:33;72:20;97:33;;;7874:500;;;;-1:-1;8187:63;;8287:2;8326:22;6655:20;;-1:-1;;7874:500;8381:867;;;;;;;8572:3;8560:9;8551:7;8547:23;8543:33;8540:2;;;-1:-1;;8579:12;8540:2;85:6;72:20;97:33;124:5;97:33;;;8631:63;-1:-1;8731:2;8770:22;;72:20;97:33;72:20;97:33;;;8739:63;-1:-1;8839:2;8878:22;;72:20;97:33;72:20;97:33;;;8847:63;-1:-1;8947:2;8986:22;;6655:20;;-1:-1;9083:3;9068:19;;9055:33;9108:18;9097:30;;9094:2;;;-1:-1;;9130:12;9094:2;9168:64;9224:7;9215:6;9204:9;9200:22;9168:64;;;8534:714;;;;-1:-1;8534:714;;-1:-1;8534:714;;9158:74;;8534:714;-1:-1;;;8534:714;9255:993;;;;;;;;9463:3;9451:9;9442:7;9438:23;9434:33;9431:2;;;-1:-1;;9470:12;9431:2;85:6;72:20;97:33;124:5;97:33;;;9522:63;-1:-1;9622:2;9661:22;;72:20;97:33;72:20;97:33;;;9630:63;-1:-1;9730:2;9769:22;;72:20;97:33;72:20;97:33;;;9738:63;-1:-1;9838:2;9877:22;;6655:20;;-1:-1;9946:3;9986:22;;6655:20;;-1:-1;10083:3;10068:19;;10055:33;10108:18;10097:30;;10094:2;;;-1:-1;;10130:12;10094:2;10168:64;10224:7;10215:6;10204:9;10200:22;10168:64;;;9425:823;;;;-1:-1;9425:823;;-1:-1;9425:823;;;;10158:74;;-1:-1;;;9425:823;10255:741;;;;;;10429:3;10417:9;10408:7;10404:23;10400:33;10397:2;;;-1:-1;;10436:12;10397:2;85:6;72:20;97:33;124:5;97:33;;;10488:63;-1:-1;10588:2;10627:22;;72:20;97:33;72:20;97:33;;;10596:63;-1:-1;10696:2;10735:22;;6655:20;;-1:-1;10832:2;10817:18;;10804:32;10856:18;10845:30;;10842:2;;;-1:-1;;10878:12;10842:2;10916:64;10972:7;10963:6;10952:9;10948:22;10916:64;;;10391:605;;;;-1:-1;10391:605;;-1:-1;10906:74;;;10391:605;-1:-1;;;10391:605;11003:366;;;11124:2;11112:9;11103:7;11099:23;11095:32;11092:2;;;-1:-1;;11130:12;11092:2;85:6;72:20;97:33;124:5;97:33;;;11182:63;11282:2;11321:22;;;;6655:20;;-1:-1;;;11086:283;11376:397;;;11515:2;11503:9;11494:7;11490:23;11486:32;11483:2;;;-1:-1;;11521:12;11483:2;11579:17;11566:31;11617:18;;11609:6;11606:30;11603:2;;;-1:-1;;11639:12;11603:2;11740:6;11729:9;11725:22;431:3;424:4;416:6;412:17;408:27;398:2;;-1:-1;;439:12;398:2;482:6;469:20;459:30;;11617:18;501:6;498:30;495:2;;;-1:-1;;531:12;495:2;626:3;11515:2;;610:6;606:17;567:6;592:32;;589:41;586:2;;;-1:-1;;633:12;586:2;11515;563:17;;11667:90;;-1:-1;11477:296;;-1:-1;;;;11477:296;11780:444;;11946:2;;11934:9;11925:7;11921:23;11917:32;11914:2;;;-1:-1;;11952:12;11914:2;12003:17;11997:24;12041:18;12033:6;12030:30;12027:2;;;-1:-1;;12063:12;12027:2;12191:6;12180:9;12176:22;2308:3;2301:4;2293:6;2289:17;2285:27;2275:2;;-1:-1;;2316:12;2275:2;2356:6;2350:13;2336:27;;2378:106;2393:90;2476:6;2393:90;;2378:106;2512:21;;;2569:14;;;;2544:17;;;2670:4;2658:17;;;2649:27;;;;2646:36;-1:-1;2643:2;;;-1:-1;;2685:12;2643:2;-1:-1;2711:10;;2705:243;2730:6;2727:1;2724:13;2705:243;;;2810:74;2880:3;2868:10;2810:74;;;2798:87;;2752:1;2745:9;;;;;2899:14;;;;2927;;;;2705:243;;;-1:-1;12083:125;;11908:316;-1:-1;;;;;;;;11908:316;12231:257;;12343:2;12331:9;12322:7;12318:23;12314:32;12311:2;;;-1:-1;;12349:12;12311:2;3686:6;3680:13;58474:5;55805:13;55798:21;58452:5;58449:32;58439:2;;-1:-1;;58485:12;12495:393;;;12624:2;12612:9;12603:7;12599:23;12595:32;12592:2;;;-1:-1;;12630:12;12592:2;3686:6;3680:13;58474:5;55805:13;55798:21;58452:5;58449:32;58439:2;;-1:-1;;58485:12;58439:2;12790;12840:22;;;;6803:13;12682:71;;6803:13;;-1:-1;;;12586:302;12895:360;;13019:2;13007:9;12998:7;12994:23;12990:32;12987:2;;;-1:-1;;13025:12;12987:2;13076:17;13070:24;13114:18;13106:6;13103:30;13100:2;;;-1:-1;;13136:12;13100:2;13222:6;13211:9;13207:22;4660:3;4653:4;4645:6;4641:17;4637:27;4627:2;;-1:-1;;4668:12;4627:2;4708:6;4702:13;4688:27;;4730:64;4745:48;4786:6;4745:48;;4730:64;4814:6;4807:5;4800:21;4918:3;13019:2;4909:6;4842;4900:16;;4897:25;4894:2;;;-1:-1;;4925:12;4894:2;4945:39;4977:6;13019:2;4876:5;4872:16;13019:2;4842:6;4838:17;4945:39;;;13156:83;12981:274;-1:-1;;;;;12981:274;13262:1309;;;;;;;13542:3;13530:9;13521:7;13517:23;13513:33;13510:2;;;-1:-1;;13549:12;13510:2;13607:17;13594:31;13645:18;;13637:6;13634:30;13631:2;;;-1:-1;;13667:12;13631:2;13697:62;13751:7;13742:6;13731:9;13727:22;13697:62;;;13687:72;;13796:2;;;;13839:9;13835:22;6655:20;13804:63;;13904:2;13947:9;13943:22;6655:20;13912:63;;3096:3;3077:17;14078:9;3077:17;3073:27;3063:2;;-1:-1;;3104:12;3063:2;3157:78;53767:17;3157:78;;;3241:16;14012:2;14078:9;14074:22;3329:27;14078:9;3329:27;3358:3;3329:27;3326:36;3323:2;;;-1:-1;;3365:12;3323:2;-1:-1;3385:206;3138:4;3407:1;3404:13;3385:206;;;6655:20;;3478:50;;3542:14;;;;3570;;;;3432:1;3425:9;3385:206;;;-1:-1;14020:86;;-1:-1;;14143:33;;-1:-1;;14185:30;;;14182:2;;;-1:-1;;14218:12;14182:2;14248:87;14327:7;14318:6;14307:9;14303:22;14248:87;;;14238:97;;14400:3;14389:9;14385:19;14372:33;14358:47;;13645:18;14417:6;14414:30;14411:2;;;-1:-1;;14447:12;14411:2;;14477:78;14547:7;14538:6;14527:9;14523:22;14477:78;;;14467:88;;;13504:1067;;;;;;;;;15826:316;;15967:3;15955:9;15946:7;15942:23;15938:33;15935:2;;;-1:-1;;15974:12;15935:2;16036:90;16118:7;16094:22;16036:90;;16149:263;;16264:2;16252:9;16243:7;16239:23;16235:32;16232:2;;;-1:-1;;16270:12;16232:2;-1:-1;6803:13;;16226:186;-1:-1;16226:186;16419:399;;;16551:2;16539:9;16530:7;16526:23;16522:32;16519:2;;;-1:-1;;16557:12;16519:2;6809:6;6803:13;16609:74;;16720:2;16774:9;16770:22;220:13;238:33;265:5;238:33;;18605:343;;18747:5;54393:12;54935:6;54930:3;54923:19;18840:52;18885:6;54972:4;54967:3;54963:14;54972:4;18866:5;18862:16;18840:52;;;58248:7;58232:14;-1:-1;;58228:28;18904:39;;;;54972:4;18904:39;;18695:253;-1:-1;;18695:253;30585:262;;19115:5;54393:12;19226:52;19271:6;19266:3;19259:4;19252:5;19248:16;19226:52;;;19290:16;;;;;30710:137;-1:-1;;30710:137;30854:544;;19115:5;54393:12;19226:52;19271:6;19266:3;19259:4;19252:5;19248:16;19226:52;;;19290:16;;;;18173:37;;;-1:-1;19259:4;31250:12;;18173:37;31361:12;;;31037:361;-1:-1;31037:361;31405:511;20338:66;20318:87;;20302:2;20424:12;;18173:37;;;;31879:12;;;31613:303;32300:372;27566:34;27546:55;;27635:34;27630:2;27621:12;;27614:56;27704:34;27699:2;27690:12;;27683:56;27773:34;27768:2;27759:12;;27752:56;27843:34;27837:3;27828:13;;27821:57;27913:34;27907:3;27898:13;;27891:57;-1:-1;;;27977:3;27968:13;;27961:29;27529:3;28009:13;;32480:192;32679:213;-1:-1;;;;;56599:54;;;;17223:37;;32797:2;32782:18;;32768:124;32899:324;-1:-1;;;;;56599:54;;;17223:37;;56599:54;;33209:2;33194:18;;17223:37;33045:2;33030:18;;33016:207;33230:376;-1:-1;;;;;56599:54;;;;17223:37;;33592:2;33577:18;;19586:76;33402:2;33387:18;;33373:233;33944:435;-1:-1;;;;;56599:54;;;;17223:37;;34282:2;34267:18;;18173:37;;;;34365:2;34350:18;;18173:37;34118:2;34103:18;;34089:290;34386:357;34552:2;34566:47;;;54393:12;;34537:18;;;54923:19;;;34386:357;;34552:2;54248:14;;;;54963;;;;34386:357;17704:257;17729:6;17726:1;17723:13;17704:257;;;17790:13;;-1:-1;;;;;;55971:78;18440:36;;54779:14;;;;16975;;;;17751:1;17744:9;17704:257;;34750:213;18173:37;;;34868:2;34853:18;;34839:124;34970:1447;18173:37;;;-1:-1;;;;;56599:54;;;35563:2;35548:18;;17223:37;56599:54;;;35646:2;35631:18;;17223:37;35729:2;35714:18;;18173:37;;;;35812:3;35797:19;;18173:37;;;;56610:42;35881:19;;18173:37;;;;35980:3;35965:19;;18173:37;;;;56599:54;;36064:3;36049:19;;17223:37;36148:3;36133:19;;18173:37;36232:3;36217:19;;18173:37;36317:3;36302:19;;18173:37;56599:54;36402:3;36387:19;;17223:37;35398:3;35383:19;;35369:1048;36424:539;18173:37;;;56815:4;56804:16;;;;36783:2;36768:18;;30538:35;36866:2;36851:18;;18173:37;36949:2;36934:18;;18173:37;36622:3;36607:19;;36593:370;36970:320;-1:-1;;;;;;55971:78;;;;18440:36;;-1:-1;;;;;56599:54;37276:2;37261:18;;17223:37;37114:2;37099:18;;37085:205;37640:297;;37776:2;37797:17;37790:47;37851:76;37776:2;37765:9;37761:18;37913:6;37851:76;;37944:492;;38126:2;38147:17;38140:47;38201:76;38126:2;38115:9;38111:18;38263:6;38201:76;;;38325:9;38319:4;38315:20;38310:2;38299:9;38295:18;38288:48;38350:76;38421:4;38412:6;38350:76;;38701:407;38892:2;38906:47;;;20675:2;38877:18;;;54923:19;-1:-1;;;54963:14;;;20691:33;20743:12;;;38863:245;39115:407;39306:2;39320:47;;;20994:2;39291:18;;;54923:19;-1:-1;;;54963:14;;;21010:34;21063:12;;;39277:245;39529:407;39720:2;39734:47;;;21314:2;39705:18;;;54923:19;-1:-1;;;54963:14;;;21330:38;21387:12;;;39691:245;39943:407;40134:2;40148:47;;;21638:2;40119:18;;;54923:19;-1:-1;;;54963:14;;;21654:37;21710:12;;;40105:245;40357:407;40548:2;40562:47;;;21961:2;40533:18;;;54923:19;-1:-1;;;54963:14;;;21977:42;22038:12;;;40519:245;40771:407;40962:2;40976:47;;;22289:2;40947:18;;;54923:19;-1:-1;;;54963:14;;;22305:40;22364:12;;;40933:245;41185:407;41376:2;41390:47;;;22615:2;41361:18;;;54923:19;-1:-1;;;54963:14;;;22631:41;22691:12;;;41347:245;41599:407;41790:2;41804:47;;;22942:2;41775:18;;;54923:19;22978:33;54963:14;;;22958:54;23031:12;;;41761:245;42013:407;42204:2;42218:47;;;23282:2;42189:18;;;54923:19;-1:-1;;;54963:14;;;23298:39;23356:12;;;42175:245;42427:407;42618:2;42632:47;;;23607:2;42603:18;;;54923:19;-1:-1;;;54963:14;;;23623:38;23680:12;;;42589:245;42841:407;43032:2;43046:47;;;23931:2;43017:18;;;54923:19;-1:-1;;;54963:14;;;23947:36;24002:12;;;43003:245;43255:407;43446:2;43460:47;;;24253:2;43431:18;;;54923:19;-1:-1;;;54963:14;;;24269:44;24332:12;;;43417:245;43669:407;43860:2;43874:47;;;24583:2;43845:18;;;54923:19;-1:-1;;;54963:14;;;24599:38;24656:12;;;43831:245;44083:407;44274:2;44288:47;;;24907:2;44259:18;;;54923:19;-1:-1;;;54963:14;;;24923:38;24980:12;;;44245:245;44497:407;44688:2;44702:47;;;25231:2;44673:18;;;54923:19;25267:33;54963:14;;;25247:54;25320:12;;;44659:245;44911:407;45102:2;45116:47;;;25571:2;45087:18;;;54923:19;-1:-1;;;54963:14;;;25587:42;25648:12;;;45073:245;45325:407;45516:2;45530:47;;;25899:2;45501:18;;;54923:19;-1:-1;;;54963:14;;;25915:38;25972:12;;;45487:245;45739:407;45930:2;45944:47;;;26223:2;45915:18;;;54923:19;-1:-1;;;54963:14;;;26239:43;26301:12;;;45901:245;46153:407;46344:2;46358:47;;;26552:2;46329:18;;;54923:19;-1:-1;;;54963:14;;;26568:35;26622:12;;;46315:245;46567:407;46758:2;46772:47;;;26873:1;46743:18;;;54923:19;-1:-1;;;54963:14;;;26888:30;26937:12;;;46729:245;46981:407;47172:2;47186:47;;;28261:2;47157:18;;;54923:19;28297:34;54963:14;;;28277:55;-1:-1;;;28352:12;;;28345:26;28390:12;;;47143:245;47395:407;47586:2;47600:47;;;28641:2;47571:18;;;54923:19;-1:-1;;;54963:14;;;28657:39;28715:12;;;47557:245;47809:407;48000:2;48014:47;;;28966:2;47985:18;;;54923:19;-1:-1;;;54963:14;;;28982:35;29036:12;;;47971:245;48223:407;48414:2;48428:47;;;29287:2;48399:18;;;54923:19;-1:-1;;;54963:14;;;29303:41;29363:12;;;48385:245;48637:407;48828:2;48842:47;;;29614:1;48813:18;;;54923:19;-1:-1;;;54963:14;;;29629:29;29677:12;;;48799:245;49051:407;49242:2;49256:47;;;29928:2;49227:18;;;54923:19;-1:-1;;;54963:14;;;29944:41;30004:12;;;49213:245;49465:407;49656:2;49670:47;;;30255:2;49641:18;;;54923:19;-1:-1;;;54963:14;;;30271:35;30325:12;;;49627:245;50099:731;;18203:5;18180:3;18173:37;18203:5;50506:2;50495:9;50491:18;18173:37;18203:5;50589:2;50578:9;50574:18;18173:37;18083:5;55805:13;55798:21;50666:2;50655:9;50651:18;18056:34;50341:3;50703;50692:9;50688:19;50681:49;50744:76;50341:3;50330:9;50326:19;50806:6;50744:76;;50837:408;;18203:5;18180:3;18173:37;51001:2;51119;51108:9;51104:18;51097:48;51159:76;51001:2;50990:9;50986:18;51221:6;51159:76;;51252:435;18173:37;;;51590:2;51575:18;;18173:37;;;;51673:2;51658:18;;18173:37;51426:2;51411:18;;51397:290;51694:623;;56815:4;30566:5;56804:16;30545:3;30538:35;3946:18;;56610:42;;;55721:5;56599:54;52071:2;52060:9;52056:18;17223:37;18203:5;52154:2;52143:9;52139:18;18173:37;51910:3;52191:2;52180:9;52176:18;52169:48;52231:76;51910:3;51899:9;51895:19;52293:6;52231:76;;;52223:84;51881:436;-1:-1;;;;;;51881:436;52324:256;52386:2;52380:9;52412:17;;;52487:18;52472:34;;52508:22;;;52469:62;52466:2;;;52544:1;;52534:12;52466:2;52386;52553:22;52364:216;;-1:-1;52364:216;52587:304;;52746:18;52738:6;52735:30;52732:2;;;-1:-1;;52768:12;52732:2;-1:-1;52813:4;52801:17;;;52866:15;;52669:222;53806:321;;53949:18;53941:6;53938:30;53935:2;;;-1:-1;;53971:12;53935:2;-1:-1;58248:7;54025:17;-1:-1;;54021:33;54112:4;54102:15;;53872:255;57807:268;57872:1;57879:101;57893:6;57890:1;57887:13;57879:101;;;57960:11;;;57954:18;57941:11;;;57934:39;57915:2;57908:10;57879:101;;;57995:6;57992:1;57989:13;57986:2;;;-1:-1;;57872:1;58042:16;;58035:27;57856:219;58269:117;-1:-1;;;;;56599:54;;58328:35;;58318:2;;58377:1;;58367:12;58318:2;58312:74;;;105428:111:0;;105694:7;;105766:9;;105428:111;;;;;;;;;;;;105906:6;:11;;;105890:29;;;;;;105954:6;:14;;;105938:32;;;;;;105989:8;106016:6;:24;;;105820:235;;;;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;105820:235:0;;;105796:270;;;;;;105789:277;;;105608:466;;;:::o;866:372:-1:-;542:34;522:55;;611:34;606:2;597:12;;590:56;-1:-1;;;675:2;666:12;;659:42;506:2;720:12;;1046:192;1245:659;196:37;;;1640:2;1625:18;;196:37;;;;1723:2;1708:18;;196:37;;;;1806:2;1791:18;;196:37;-1:-1;;;;;2304:54;1889:3;1874:19;;76:37;1475:3;1460:19;;1446:458

Swarm Source

ipfs://837fa8fb97bd3d5d51d11b101d16005de3c51965e3d371dc8ffc69919f5a6637

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.