Contract 0x421bff16bba3bca1720638482c647eb832fd9de4 2

Txn Hash Method
Block
From
To
Value [Txn Fee]
0x6d29e84e325af91fba16e13d860138208ba29a67c7b594bb98f5a2193612ed0f0xd884c2d218932622022-05-25 6:33:4227 secs ago0xbf25a3ec6467e122c0d4fccb8c91560c20dde299 IN  0x421bff16bba3bca1720638482c647eb832fd9de40 MOVR0.005015026
0x0fd10fa86d50e3a8e28bca39057fc536d96cb36dc2f2410fb92a670c4f5633d00x4161002a18932572022-05-25 6:32:421 min ago0x1ca06d867e4958b499e98322f2d16bff33ff923f IN  0x421bff16bba3bca1720638482c647eb832fd9de40 MOVR0.000590697
0x9822a5a8c888b9dea29b8e63443196a7de4109b666b99ff2cf90b0f33f0252d90x4161002a18932562022-05-25 6:32:301 min ago0xf2ff48b08ce5a73bf2c54d54a733154b274496cb IN  0x421bff16bba3bca1720638482c647eb832fd9de40 MOVR0.0014407925
0xeaf6eacb6c449acaaada52db63a0885400101e6d76c596cf224dde48d87bd9e40x4161002a18932542022-05-25 6:31:482 mins ago0x1ca06d867e4958b499e98322f2d16bff33ff923f IN  0x421bff16bba3bca1720638482c647eb832fd9de40 MOVR0.000590858
0x642f087b6f2bc2617598083af32c6bde40016e78a27a7ffddee3f34b2dcb7e1c0x4161002a18932522022-05-25 6:31:242 mins ago0x0e32ebbfe09f59481ea8fc07a6a44501b3158e83 IN  0x421bff16bba3bca1720638482c647eb832fd9de40 MOVR0.001403965
0x5eefd4445e3d0a4abf9ad7db26fabd7c0fa3bb039df7cf5d171ac7430ec8cc530xd884c2d218932512022-05-25 6:31:122 mins ago0x79c510508e46de9810806d64cff3febd7a26e084 IN  0x421bff16bba3bca1720638482c647eb832fd9de40 MOVR0.004239906
0x73ce11ebc27549988ccb28e36d078b3b50bdd26ca3c50d393b9e080d1bb4a42d0xd884c2d218932502022-05-25 6:31:003 mins ago0x22abaec9110d7b61770e39626454138d51bddd8b IN  0x421bff16bba3bca1720638482c647eb832fd9de40 MOVR0.0023207775
0x17c7696342158139a550c4ca11c4c355e8fa6b632a37172e92e498797ee576dc0xd884c2d218932462022-05-25 6:30:123 mins ago0x22abaec9110d7b61770e39626454138d51bddd8b IN  0x421bff16bba3bca1720638482c647eb832fd9de40 MOVR0.01415298
0xe09797c3552f3c29acb50592e4837d70a893d6d55ba48090807c59ba74c5ebe40xd884c2d218932432022-05-25 6:29:364 mins ago0xd96d7851b30cfd3e6275985301f5be3b53b840ae IN  0x421bff16bba3bca1720638482c647eb832fd9de40 MOVR0.0022871125
0xdaa28c726997106e06a2343c0d2051dce954384c66a1b07cbf87a52a082061f30xd884c2d218932432022-05-25 6:29:364 mins ago0x0e32ebbfe09f59481ea8fc07a6a44501b3158e83 IN  0x421bff16bba3bca1720638482c647eb832fd9de40 MOVR0.002326955
0xa8fafbcf00360b8d9e623c256c4bca9e74c4db1d537611b801b04758d3a599c80x4161002a18932422022-05-25 6:29:244 mins ago0x1ca06d867e4958b499e98322f2d16bff33ff923f IN  0x421bff16bba3bca1720638482c647eb832fd9de40 MOVR0.000590697
0x03b8ad8b41392c812bd644a6fd081f54ad96c4b13445d7a29449139e3b3ebc6f0x4161002a18932362022-05-25 6:28:066 mins ago0x1ca06d867e4958b499e98322f2d16bff33ff923f IN  0x421bff16bba3bca1720638482c647eb832fd9de40 MOVR0.00059554
0x67266410442e08b97660b198e4c426e3f83f488b6eb0f1a8f019ad156b766a4a0x4161002a18932312022-05-25 6:26:307 mins ago0xf59d51b788198ef0673c798efa16750dbf674d59 IN  0x421bff16bba3bca1720638482c647eb832fd9de40 MOVR0.0026357225
0x231f7ee441a8b690701e40bb6f21d6371ef5e58d40320ea7716f3d0bb12cb64f0x4161002a18932072022-05-25 6:21:0613 mins ago0x5114e0a7a2fc85685bc114477d7c3035d47daf8b IN  0x421bff16bba3bca1720638482c647eb832fd9de40 MOVR0.00200865
0xeb73662c38bb4f937da5adc389bdbfa133aeb2df809775ff510b55b4bd1b66b60x4161002a18932042022-05-25 6:20:3013 mins ago0x5114e0a7a2fc85685bc114477d7c3035d47daf8b IN  0x421bff16bba3bca1720638482c647eb832fd9de40 MOVR0.00200865
0x603bdf76c7365611a91bd2ebbc981c3c38e2e40abfaf0fc542772d3190e7d3dd0x4161002a18932032022-05-25 6:20:1813 mins ago0x5114e0a7a2fc85685bc114477d7c3035d47daf8b IN  0x421bff16bba3bca1720638482c647eb832fd9de40 MOVR0.001996905
0xd93018c2fc4af2c5f2cea7b598f738030f67b9d4e6442b33eb3108f9717c00f00x4161002a18932002022-05-25 6:19:4214 mins ago0x1ca06d867e4958b499e98322f2d16bff33ff923f IN  0x421bff16bba3bca1720638482c647eb832fd9de40 MOVR0.000571215
0x641224dc5c4aaf0a7ea00f716c528dfac2cfca94f40541766065a00312a513df0xd884c2d218932002022-05-25 6:19:4214 mins ago0xf59d51b788198ef0673c798efa16750dbf674d59 IN  0x421bff16bba3bca1720638482c647eb832fd9de40 MOVR0.0044396025
0x5b2587f71645849cdb3b815fb1d373e21be7ffd4e7ecccc372f2e88afc4a7dac0xd884c2d218931982022-05-25 6:19:0615 mins ago0x5114e0a7a2fc85685bc114477d7c3035d47daf8b IN  0x421bff16bba3bca1720638482c647eb832fd9de40 MOVR0.0052546625
0x0d29bef55eabe7afaef5b99c2849c46e71aae9af22c07134c703b3c2f793b1930xd884c2d218931982022-05-25 6:19:0615 mins ago0x5114e0a7a2fc85685bc114477d7c3035d47daf8b IN  0x421bff16bba3bca1720638482c647eb832fd9de40 MOVR0.0052700075
0xd5f01952a566013e8db281e1750761631bc480cf8d4bd0c055f798cf0debd4d90xd884c2d218931972022-05-25 6:18:4815 mins ago0x5114e0a7a2fc85685bc114477d7c3035d47daf8b IN  0x421bff16bba3bca1720638482c647eb832fd9de40 MOVR0.00542198
0xaf68055f60bf7a07e74675c7bc46545b4a29c8468d287a71d5197bbc7a62d5280x4161002a18931922022-05-25 6:17:4216 mins ago0x0eb3d4d770f47056697fb2f4e889a58e35e090b4 IN  0x421bff16bba3bca1720638482c647eb832fd9de40 MOVR0.000571252
0x043dc142e6dbcd900a56d3955079fa7a26613018fa9e77741f89cf229fe4a89e0x4161002a18931882022-05-25 6:16:4217 mins ago0x1ca06d867e4958b499e98322f2d16bff33ff923f IN  0x421bff16bba3bca1720638482c647eb832fd9de40 MOVR0.000569757
0x70595d04aa085e2f511b1aebefc23d34c5660dfdd8e37dc4943deb2e738adc5a0xd884c2d218931872022-05-25 6:16:3017 mins ago0x0eb3d4d770f47056697fb2f4e889a58e35e090b4 IN  0x421bff16bba3bca1720638482c647eb832fd9de40 MOVR0.000900896
0x00d4eb7cee96aec51400b58a90c3747956e6623008f636d1ea7e72ee1c3b5b0c0x4161002a18931812022-05-25 6:15:1818 mins ago0x1ca06d867e4958b499e98322f2d16bff33ff923f IN  0x421bff16bba3bca1720638482c647eb832fd9de40 MOVR0.000583083
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
DPSDocks

Compiler Version
v0.8.13+commit.abaa5c0e

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 16 : DPSDocks.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;

import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";
import "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol";
import "./interfaces/DPSStructs.sol";
import "./interfaces/DPSInterfaces.sol";

contract DPSDocks is ERC721Holder, ERC1155Holder, ReentrancyGuard, Ownable {
    DPSVoyageI public voyage;
    DPSRandomI public causality;
    IERC721 public dps;
    DPSPirateFeaturesI public dpsFeatures;
    DPSFlagshipI public flagship;
    DPSSupportShipI public supportShip;
    IERC1155 public artifact;
    DPSCartographerI public cartographer;
    DPSGameSettingsI public gameSettings;
    DPSChestsI public chest;

    /**
     * @notice list of voyages started by wallet
     */
    mapping(address => mapping(uint256 => LockedVoyage)) private lockedVoyages;

    /**
     * @notice list of voyages finished by wallet
     */
    mapping(address => mapping(uint256 => LockedVoyage)) private finishedVoyages;

    /**
     * @notice list of voyages ids started by wallet
     */
    mapping(address => uint256[]) private lockedVoyagesIds;

    /**
     * @notice list of voyages ids finished by wallet
     */
    mapping(address => uint256[]) private finishedVoyagesIds;

    /**
     * @notice finished voyages results voyageId=>results
     */
    mapping(uint256 => VoyageResult) public voyageResults;

    /**
     * @notice list of locked voyages and their owners id => wallet
     */
    mapping(uint256 => address) public ownerOfLockedVoyages;

    event LockVoyage(
        uint256 indexed _voyageId,
        uint256 indexed _dpsId,
        uint256 indexed _flagshipId,
        uint8[9] _supportShipIds,
        ARTIFACT_TYPE _artifactId,
        uint256 _lockedAt
    );

    event ClaimVoyageRewards(
        uint256 indexed _voyageId,
        uint16 _noOfChests,
        uint8[9] _destroyedSupportships,
        uint16 _healthDamage,
        uint16[] _interactionRNGs,
        uint8[] _interactionResults,
        uint256 _claimedAt
    );

    event SetContract(uint256 _target, address _contract);

    event TokenRecovered(address indexed _token, bytes _data);

    error Unhealthy();

    constructor() {}

    /**
     * @notice Locking a voyage
     * @param _causalityParams causality parameters
     * @param _lockedVoyages array of objects that contains:
     * - voyageId
     * - dpsId (Pirate)
     * - flagshipId
     * - supportShips - list of support ships ids, an array of 9 corresponding with the support ship types, 
                        a value at a certain position means a support ship sent to sail
     * - totalSupportShips
     * - artifactId
     * the rest of the params are ignored
     */
    function lockVoyageItems(LockedVoyage[] calldata _lockedVoyages, CausalityParams[] calldata _causalityParams)
        external
        nonReentrant
    {
        if (gameSettings.isPaused(4) == 1) revert Paused();

        // wrong causality params
        if (_lockedVoyages.length != _causalityParams.length) revert WrongParams(1);

        for (uint256 index; index < _lockedVoyages.length; index++) {
            LockedVoyage memory lockedVoyage = _lockedVoyages[index];
            CausalityParams memory params = _causalityParams[index];

            // if flagship is unhealthy
            if (flagship.getPartsLevel(lockedVoyage.flagshipId)[uint256(FLAGSHIP_PART.HEALTH)] != 100) revert Unhealthy();

            // if it is already started
            if (lockedVoyages[msg.sender][lockedVoyage.voyageId].voyageId != 0) revert WrongState(1);

            // if it is already finished
            if (finishedVoyages[msg.sender][lockedVoyage.voyageId].voyageId != 0) revert WrongState(2);

            VoyageConfig memory voyageConfig = cartographer.viewVoyageConfiguration(params, lockedVoyage.voyageId);

            uint256 totalSupportShips;
            for (uint256 i; i < lockedVoyage.supportShips.length; i++) {
                totalSupportShips += lockedVoyage.supportShips[i];
            }

            // too many support ships
            if (
                totalSupportShips > gameSettings.getMaxSupportShipsPerVoyageType(voyageConfig.typeOfVoyage) ||
                totalSupportShips != lockedVoyage.totalSupportShips
            ) revert WrongState(3);

            // causality params are wrong based on the block number
            if (block.number <= voyageConfig.boughtAt + voyageConfig.noOfBlockJumps) revert WrongState(4);

            lockedVoyage.lockedBlock = block.number;
            lockedVoyage.lockedTimestamp = block.timestamp;
            lockedVoyage.claimedTime = 0;
            lockedVoyage.navigation = 0;
            lockedVoyage.luck = 0;
            lockedVoyage.strength = 0;
            lockedVoyage.sequence = voyageConfig.sequence;
            lockedVoyage.totalSupportShips = uint8(totalSupportShips);
            lockedVoyage.voyageType = voyageConfig.typeOfVoyage;
            lockedVoyages[msg.sender][lockedVoyage.voyageId] = lockedVoyage;
            lockedVoyagesIds[msg.sender].push(lockedVoyage.voyageId);
            ownerOfLockedVoyages[lockedVoyage.voyageId] = msg.sender;

            dps.safeTransferFrom(msg.sender, address(this), lockedVoyage.dpsId);
            flagship.safeTransferFrom(msg.sender, address(this), lockedVoyage.flagshipId);

            unchecked {
                for (uint256 i; i < lockedVoyage.supportShips.length; i++) {
                    if (lockedVoyage.supportShips[i] > 0) {
                        supportShip.safeTransferFrom(msg.sender, address(this), i, lockedVoyage.supportShips[i], "");
                    }
                }
            }
            if (lockedVoyage.artifactId != ARTIFACT_TYPE.NONE) {
                artifact.safeTransferFrom(msg.sender, address(this), uint256(lockedVoyage.artifactId), 1, "");
            }

            voyage.safeTransferFrom(msg.sender, address(this), lockedVoyage.voyageId);

            emit LockVoyage(
                lockedVoyage.voyageId,
                lockedVoyage.dpsId,
                lockedVoyage.flagshipId,
                lockedVoyage.supportShips,
                lockedVoyage.artifactId,
                block.timestamp
            );
        }
    }

    /**
     * @notice Claiming rewards with params retrieved from the random future blocks
     * @param _voyageIds - ids of the voyages
     * @param _causalityParams - list of parameters used to generated random outcomes
     */
    function claimRewards(uint256[] calldata _voyageIds, CausalityParams[] calldata _causalityParams) external nonReentrant {
        if (gameSettings.isPaused(5) == 1) revert Paused();

        // params not ok
        if (_voyageIds.length != _causalityParams.length) revert WrongParams(2);

        for (uint256 i; i < _voyageIds.length; i++) {
            uint256 voyageId = _voyageIds[i];

            // we get the owner of the voyage it be different than buyer in case nft sold on marketplaces
            address owner = ownerOfLockedVoyages[voyageId];

            LockedVoyage storage lockedVoyage = lockedVoyages[owner][voyageId];
            VoyageConfig memory voyageConfig = voyage.getVoyageConfig(voyageId);
            voyageConfig.sequence = lockedVoyage.sequence;

            // not the owner
            if (owner == address(0)) revert AddressZero();

            // if causality params are wrong, like no of interactions * gap between interactions + locked timestamp > current timestamp
            if (
                lockedVoyage.lockedTimestamp + voyageConfig.noOfInteractions * voyageConfig.gapBetweenInteractions >
                block.timestamp
            ) revert WrongState(4);

            // blocks not passed correctly
            if (block.number <= lockedVoyage.lockedBlock + voyageConfig.noOfInteractions * voyageConfig.noOfBlockJumps)
                revert WrongState(5);

            causality.checkCausalityParams(_causalityParams[i], voyageConfig, lockedVoyage);

            VoyageResult memory voyageResult = computeVoyageState(
                lockedVoyage,
                voyageConfig.sequence,
                cartographer.buyers(voyageId),
                _causalityParams[i]
            );
            lockedVoyage.claimedTime = block.timestamp;
            finishedVoyages[owner][lockedVoyage.voyageId] = lockedVoyage;
            finishedVoyagesIds[owner].push(lockedVoyage.voyageId);
            voyageResults[voyageId] = voyageResult;

            LockedVoyage memory cached = lockedVoyage;

            //TODO not sure if this should be afterwards. need to check
            cleanLockedVoyage(lockedVoyage.voyageId, owner);

            awardRewards(voyageResult, voyageConfig.typeOfVoyage, cached, owner);

            emit ClaimVoyageRewards(
                voyageId,
                voyageResult.awardedChests,
                voyageResult.destroyedSupportShips,
                voyageResult.healthDamage,
                voyageResult.interactionRNGs,
                voyageResult.interactionResults,
                block.timestamp
            );
        }
    }

    /**
     * @notice checking voyage state between start start and finish sail, it uses causality parameters to determine the outcome of interactions
     * @param _voyageId - id of the voyage
     * @param _causalityParams - list of parameters used to generated random outcomes, it can be an incomplete list, meaning that you can check mid-sail to determine outcomes
     */
    function checkVoyageState(uint256 _voyageId, CausalityParams calldata _causalityParams)
        external
        view
        returns (VoyageResult memory voyageResult)
    {
        LockedVoyage storage lockedVoyage = lockedVoyages[ownerOfLockedVoyages[_voyageId]][_voyageId];

        // not started
        if (voyage.ownerOf(_voyageId) != address(this) || lockedVoyage.voyageId == 0) revert WrongState(1);

        VoyageConfig memory voyageConfig = voyage.getVoyageConfig(_voyageId);
        voyageConfig.sequence = lockedVoyage.sequence;

        // not started
        if ((block.timestamp - lockedVoyage.lockedTimestamp) <= voyageConfig.gapBetweenInteractions) revert WrongState(1);

        uint256 interactions = (block.timestamp - lockedVoyage.lockedTimestamp) / voyageConfig.gapBetweenInteractions;
        if (interactions > voyageConfig.sequence.length) interactions = voyageConfig.sequence.length;
        uint256 length = voyageConfig.sequence.length;
        for (uint256 i; i < length - interactions; i++) {
            voyageConfig.sequence[length - i - 1] = 0;
        }
        return computeVoyageState(lockedVoyage, voyageConfig.sequence, cartographer.buyers(_voyageId), _causalityParams);
    }

    /**
     * @notice computing voyage state based on the locked voyage skills and config and causality params
     * @param _lockedVoyage - locked voyage items
     * @param _sequence - sequence of interactions
     * @param _buyer - initial buyer used for randomenss
     * @param _causalityParams - list of parameters used to generated random outcomes, it can be an incomplete list, meaning that you can check mid-sail to determine outcomes
     * @return VoyageResult - containing the results of a voyage based on interactions
     */
    function computeVoyageState(
        LockedVoyage storage _lockedVoyage,
        uint8[] memory _sequence,
        address _buyer,
        CausalityParams calldata _causalityParams
    ) internal view returns (VoyageResult memory) {
        VoyageStatusCache memory claimingRewardsCache;
        (, uint16[3] memory features) = dpsFeatures.getTraitsAndSkills(uint16(_lockedVoyage.dpsId));

        // traits not set
        if (features[0] == 0 || features[1] == 0 || features[2] == 0) revert WrongState(6);

        unchecked {
            claimingRewardsCache.luck += features[0];
            claimingRewardsCache.navigation += features[1];
            claimingRewardsCache.strength += features[2];
            claimingRewardsCache = gameSettings.computeFlagShipSkills(
                flagship.getPartsLevel(_lockedVoyage.flagshipId),
                claimingRewardsCache
            );
            claimingRewardsCache = gameSettings.computeSupportSkills(
                _lockedVoyage.supportShips,
                _lockedVoyage.artifactId,
                claimingRewardsCache
            );

            VoyageResult memory voyageResult;
            uint256 maxRollCap = gameSettings.maxRollCap();
            voyageResult.interactionResults = new uint8[](_sequence.length);
            voyageResult.interactionRNGs = new uint16[](_sequence.length);

            claimingRewardsCache = gameSettings.debuffVoyage(_lockedVoyage.voyageType, claimingRewardsCache);

            for (uint256 i; i < _sequence.length; i++) {
                INTERACTION interaction = INTERACTION(_sequence[i]);
                if (interaction == INTERACTION.NONE || voyageResult.healthDamage == 100) {
                    voyageResult.skippedInteractions++;
                    continue;
                }
                // string memory entropy = string(abi.encodePacked());
                claimingRewardsCache.entropy = string(
                    abi.encodePacked("INTERACTION_RESULT_", i, "_", _lockedVoyage.voyageId)
                );
                uint256 result = causality.getRandom(
                    _buyer,
                    _causalityParams.blockNumber[i],
                    _causalityParams.hash1[i],
                    _causalityParams.hash2[i],
                    _causalityParams.timestamp[i],
                    _causalityParams.signature[i],
                    claimingRewardsCache.entropy,
                    0,
                    maxRollCap
                );
                (voyageResult, claimingRewardsCache) = gameSettings.interpretResults(
                    result,
                    voyageResult,
                    _lockedVoyage,
                    claimingRewardsCache,
                    interaction,
                    _causalityParams,
                    i
                );
                voyageResult.interactionRNGs[i] = uint16(result);
            }
            return voyageResult;
        }
    }

    /**
     * @notice awards the voyage (if any) and transfers back the assets that were locked into the voyage
     *         to the owners, also if support ship destroyed, it burns them, if healh damage taken then apply effect on flagship
     * @param _voyageResult - the result of the voyage that is used to award and apply effects
     * @param _typeOfVoyage - used to mint the chests types accordingly with the voyage type
     * @param _lockedVoyage - locked voyage object used to get the locked items that needs to be transferred back
     * @param _owner - the owner of the voyage that will receive rewards + items back
     *
     */
    function awardRewards(
        VoyageResult memory _voyageResult,
        VOYAGE_TYPE _typeOfVoyage,
        LockedVoyage memory _lockedVoyage,
        address _owner
    ) internal {
        chest.mint(_owner, _typeOfVoyage, _voyageResult.awardedChests);
        dps.safeTransferFrom(address(this), _owner, _lockedVoyage.dpsId);

        if (_voyageResult.healthDamage > 0)
            flagship.upgradePart(FLAGSHIP_PART.HEALTH, _lockedVoyage.flagshipId, 100 - _voyageResult.healthDamage);
        flagship.safeTransferFrom(address(this), _owner, _lockedVoyage.flagshipId);
        for (uint256 i; i < 9; i++) {
            if (_voyageResult.destroyedSupportShips[i] > 0) {
                supportShip.burn(address(this), i, _voyageResult.destroyedSupportShips[i]);
            }
            if (_lockedVoyage.supportShips[i] > _voyageResult.destroyedSupportShips[i])
                supportShip.safeTransferFrom(
                    address(this),
                    _owner,
                    i,
                    _lockedVoyage.supportShips[i] - _voyageResult.destroyedSupportShips[i],
                    ""
                );
        }
        if (_lockedVoyage.artifactId != ARTIFACT_TYPE.NONE)
            artifact.safeTransferFrom(address(this), _owner, uint256(_lockedVoyage.artifactId), 1, "");
        voyage.burn(_lockedVoyage.voyageId);
    }

    /**
     * @notice cleans a locked voyage, usually once it's finished
     * @param _voyageId - voyage id
     * @param _owner  - owner of the voyage
     */
    function cleanLockedVoyage(uint256 _voyageId, address _owner) internal {
        uint256[] storage voyagesForOwner = lockedVoyagesIds[_owner];
        for (uint256 i; i < voyagesForOwner.length; i++) {
            if (voyagesForOwner[i] == _voyageId) {
                voyagesForOwner[i] = voyagesForOwner[voyagesForOwner.length - 1];
                voyagesForOwner.pop();
            }
        }
        delete ownerOfLockedVoyages[_voyageId];
        delete lockedVoyages[_owner][_voyageId];
    }

    function onERC721Received(
        address _operator,
        address,
        uint256,
        bytes calldata
    ) public view override returns (bytes4) {
        if (_operator != address(this)) revert Unauthorized();
        return this.onERC721Received.selector;
    }

    function onERC1155Received(
        address _operator,
        address,
        uint256,
        uint256,
        bytes calldata
    ) public view override returns (bytes4) {
        if (_operator != address(this)) revert Unauthorized();
        return this.onERC1155Received.selector;
    }

    /**
     * @notice used to recover tokens using call. This will be used so we can save some contract sizes
     * @param _token the token address
     * @param _data encoded with abi.encodeWithSignature(signatureString, arg); of transferFrom, transfer methods
     */
    function recoverToken(address _token, bytes calldata _data) external onlyOwner {
        (bool success, ) = _token.call{value: 0}(_data);
        if (!success) revert NotEnoughTokens();
        emit TokenRecovered(_token, _data);
    }

    function cleanVoyageResults(uint256 _voyageId) external onlyOwner {
        delete voyageResults[_voyageId];
    }

    /**
     * SETTERS & GETTERS
     */
    function setContract(address _contract, uint8 _target) external onlyOwner {
        if (_contract == address(0)) revert AddressZero();
        if (_target == 1) voyage = DPSVoyageI(_contract);
        else if (_target == 2) causality = DPSRandomI(_contract);
        else if (_target == 3) dps = IERC721(_contract);
        else if (_target == 4) flagship = DPSFlagshipI(_contract);
        else if (_target == 5) supportShip = DPSSupportShipI(_contract);
        else if (_target == 6) artifact = IERC1155(_contract);
        else if (_target == 7) gameSettings = DPSGameSettingsI(_contract);
        else if (_target == 8) dpsFeatures = DPSPirateFeaturesI(_contract);
        else if (_target == 9) cartographer = DPSCartographerI(_contract);
        else if (_target == 10) chest = DPSChestsI(_contract);
        emit SetContract(_target, _contract);
    }

    function getLockedVoyagesForOwner(
        address _owner,
        uint256 _start,
        uint256 _stop
    ) external view returns (LockedVoyage[] memory locked) {
        unchecked {
            uint256 length = lockedVoyagesIds[_owner].length;
            if (_stop > length) _stop = length;
            locked = new LockedVoyage[](length);
            for (uint256 i = _start; i < _stop; i++) {
                locked[i - _start] = lockedVoyages[_owner][lockedVoyagesIds[_owner][i]];
            }
        }
    }

    function getLockedVoyageByOwnerAndId(address _owner, uint256 _voyageId)
        external
        view
        returns (LockedVoyage memory locked)
    {
        for (uint256 i; i < lockedVoyagesIds[_owner].length; i++) {
            uint256 tempId = lockedVoyagesIds[_owner][i];
            if (tempId == _voyageId) return lockedVoyages[_owner][tempId];
        }
    }

    function getFinishedVoyagesForOwner(
        address _owner,
        uint256 _start,
        uint256 _stop
    ) external view returns (LockedVoyage[] memory finished) {
        unchecked {
            uint256 length = finishedVoyagesIds[_owner].length;
            if (_stop > length) _stop = length;
            finished = new LockedVoyage[](length);
            for (uint256 i = _start; i < _stop; i++) {
                finished[i - _start] = finishedVoyages[_owner][finishedVoyagesIds[_owner][i]];
            }
        }
    }

    function getFinishedVoyageByOwnerAndId(address _owner, uint256 _voyageId)
        external
        view
        returns (LockedVoyage memory finished)
    {
        for (uint256 i; i < finishedVoyagesIds[_owner].length; i++) {
            uint256 tempId = finishedVoyagesIds[_owner][i];
            if (tempId == _voyageId) return finishedVoyages[_owner][tempId];
        }
    }

    function voyagesLength(address _owner, bool _locked) external view returns (uint256) {
        if (_locked) return lockedVoyagesIds[_owner].length;
        return finishedVoyagesIds[_owner].length;
    }

    function getLastComputedState(uint256 _voyageId) external view returns (VoyageResult memory) {
        return voyageResults[_voyageId];
    }
}

File 2 of 16 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

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

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

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

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

        _;

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

File 3 of 16 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

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

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

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

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

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

File 4 of 16 : ERC721Holder.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (token/ERC721/utils/ERC721Holder.sol)

pragma solidity ^0.8.0;

import "../IERC721Receiver.sol";

/**
 * @dev Implementation of the {IERC721Receiver} interface.
 *
 * Accepts all token transfers.
 * Make sure the contract is able to use its token with {IERC721-safeTransferFrom}, {IERC721-approve} or {IERC721-setApprovalForAll}.
 */
contract ERC721Holder is IERC721Receiver {
    /**
     * @dev See {IERC721Receiver-onERC721Received}.
     *
     * Always returns `IERC721Receiver.onERC721Received.selector`.
     */
    function onERC721Received(
        address,
        address,
        uint256,
        bytes memory
    ) public virtual override returns (bytes4) {
        return this.onERC721Received.selector;
    }
}

File 5 of 16 : ERC1155Holder.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (token/ERC1155/utils/ERC1155Holder.sol)

pragma solidity ^0.8.0;

import "./ERC1155Receiver.sol";

/**
 * @dev _Available since v3.1._
 */
contract ERC1155Holder is ERC1155Receiver {
    function onERC1155Received(
        address,
        address,
        uint256,
        uint256,
        bytes memory
    ) public virtual override returns (bytes4) {
        return this.onERC1155Received.selector;
    }

    function onERC1155BatchReceived(
        address,
        address,
        uint256[] memory,
        uint256[] memory,
        bytes memory
    ) public virtual override returns (bytes4) {
        return this.onERC1155BatchReceived.selector;
    }
}

File 6 of 16 : DPSStructs.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;

enum VOYAGE_TYPE {
    EASY,
    MEDIUM,
    HARD,
    LEGENDARY
}

enum SUPPORT_SHIP_TYPE {
    SLOOP_STRENGTH,
    SLOOP_LUCK,
    SLOOP_NAVIGATION,
    CARAVEL_STRENGTH,
    CARAVEL_LUCK,
    CARAVEL_NAVIGATION,
    GALLEON_STRENGTH,
    GALLEON_LUCK,
    GALLEON_NAVIGATION
}

enum ARTIFACT_TYPE {
    NONE,
    COMMON_STRENGTH,
    COMMON_LUCK,
    COMMON_NAVIGATION,
    RARE_STRENGTH,
    RARE_LUCK,
    RARE_NAVIGATION,
    EPIC_STRENGTH,
    EPIC_LUCK,
    EPIC_NAVIGATION,
    LEGENDARY_STRENGTH,
    LEGENDARY_LUCK,
    LEGENDARY_NAVIGATION
}

enum INTERACTION {
    NONE,
    CHEST,
    STORM,
    ENEMY
}

enum FLAGSHIP_PART {
    HEALTH,
    CANNON,
    HULL,
    SAILS,
    HELM,
    FLAG,
    FIGUREHEAD
}

enum SKILL_TYPE {
    LUCK,
    STRENGTH,
    NAVIGATION
}

struct VoyageConfig {
    VOYAGE_TYPE typeOfVoyage;
    uint8 noOfInteractions;
    uint16 noOfBlockJumps;
    // 1 - Chest 2 - Storm 3 - Enemy
    uint8[] sequence;
    uint256 boughtAt;
    uint256 gapBetweenInteractions;
}

struct CartographerConfig {
    uint8 minNoOfChests;
    uint8 maxNoOfChests;
    uint8 minNoOfStorms;
    uint8 maxNoOfStorms;
    uint8 minNoOfEnemies;
    uint8 maxNoOfEnemies;
    uint8 totalInteractions;
    uint256 gapBetweenInteractions;
}

struct RandomInteractions {
    uint256 randomNoOfChests;
    uint256 randomNoOfStorms;
    uint256 randomNoOfEnemies;
    uint8 generatedChests;
    uint8 generatedStorms;
    uint8 generatedEnemies;
    uint256[] positionsForGeneratingInteractions;
}

struct CausalityParams {
    uint256[] blockNumber;
    bytes32[] hash1;
    bytes32[] hash2;
    uint256[] timestamp;
    bytes[] signature;
}

struct LockedVoyage {
    uint8 totalSupportShips;
    VOYAGE_TYPE voyageType;
    ARTIFACT_TYPE artifactId;
    uint8[9] supportShips; //this should be an array for each type, expressing the quantities he took on a trip
    uint8[] sequence;
    uint16 navigation;
    uint16 luck;
    uint16 strength;
    uint256 voyageId;
    uint256 dpsId;
    uint256 flagshipId;
    uint256 lockedBlock;
    uint256 lockedTimestamp;
    uint256 claimedTime;
}

struct VoyageResult {
    uint16 awardedChests;
    uint8[9] destroyedSupportShips;
    uint8 totalSupportShipsDestroyed;
    uint8 healthDamage;
    uint16 skippedInteractions;
    uint16[] interactionRNGs;
    uint8[] interactionResults;
}

struct VoyageStatusCache {
    uint256 strength;
    uint256 luck;
    uint256 navigation;
    string entropy;
}

error AddressZero();
error Paused();
error WrongParams(uint256 _location);
error WrongState(uint256 _state);
error Unauthorized();
error NotEnoughTokens();

File 7 of 16 : DPSInterfaces.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;

import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol";
import "./DPSStructs.sol";

interface DPSVoyageI is IERC721Enumerable {
    function mint(
        address _owner,
        uint256 _tokenId,
        VoyageConfig calldata config
    ) external;

    function burn(uint256 _tokenId) external;

    function getVoyageConfig(uint256 _voyageId) external view returns (VoyageConfig memory config);

    function tokensOfOwner(address _owner) external view returns (uint256[] memory);

    function exists(uint256 _tokenId) external view returns (bool);

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

interface DPSRandomI {
    function getRandomBatch(
        address _address,
        uint256[] memory _blockNumber,
        bytes32[] memory _hash1,
        bytes32[] memory _hash2,
        uint256[] memory _timestamp,
        bytes[] calldata _signature,
        string[] calldata _entropy,
        uint256 _min,
        uint256 _max
    ) external view returns (uint256[] memory randoms);

    function getRandomUnverifiedBatch(
        address _address,
        uint256[] memory _blockNumber,
        bytes32[] memory _hash1,
        bytes32[] memory _hash2,
        uint256[] memory _timestamp,
        string[] calldata _entropy,
        uint256 _min,
        uint256 _max
    ) external pure returns (uint256[] memory randoms);

    function getRandom(
        address _address,
        uint256 _blockNumber,
        bytes32 _hash1,
        bytes32 _hash2,
        uint256 _timestamp,
        bytes calldata _signature,
        string calldata _entropy,
        uint256 _min,
        uint256 _max
    ) external view returns (uint256 randoms);

    function getRandomUnverified(
        address _address,
        uint256 _blockNumber,
        bytes32 _hash1,
        bytes32 _hash2,
        uint256 _timestamp,
        string calldata _entropy,
        uint256 _min,
        uint256 _max
    ) external pure returns (uint256 randoms);

    function checkCausalityParams(
        CausalityParams calldata _causalityParams,
        VoyageConfig calldata _voyageConfig,
        LockedVoyage calldata _lockedVoyage
    ) external pure;
}

interface DPSGameSettingsI {
    function getVoyageConfig(VOYAGE_TYPE _type) external view returns (CartographerConfig memory);

    function maxSkillsCap() external view returns (uint16);

    function maxRollCap() external view returns (uint16);

    function flagshipBaseSkills() external view returns (uint16);

    function maxOpenLockBoxes() external view returns (uint256);

    function blockJumps() external view returns (uint16);

    function getSkillsPerFlagshipParts() external view returns (uint16[7] memory skills);

    function getSkillTypeOfEachFlagshipPart() external view returns (uint8[7] memory skillTypes);

    function getTMAPPerVoyageType(VOYAGE_TYPE _type) external view returns (uint256);

    function gapBetweenVoyagesCreation() external view returns (uint256);

    function isPaused(uint8 _component) external view returns (uint8);

    function tmapPerDoubloon() external view returns (uint256);

    function repairFlagshipCost() external view returns (uint256);

    function doubloonPerUpgradePart() external view returns (uint256);

    function getChestDoubloonRewards(VOYAGE_TYPE _type) external view returns (uint256);

    function computeFlagShipSkills(uint8[7] calldata levels, VoyageStatusCache memory _claimingRewardsCache)
        external
        view
        returns (VoyageStatusCache memory);

    function computeSupportSkills(
        uint8[9] calldata _supportShips,
        ARTIFACT_TYPE _type,
        VoyageStatusCache memory _claimingRewardsCache
    ) external view returns (VoyageStatusCache memory);

    function getDoubloonsPerSupportShipType(SUPPORT_SHIP_TYPE _type) external view returns (uint256);

    function getSupportShipsSkillBoosts(SUPPORT_SHIP_TYPE _type) external view returns (uint16);

    function getMaxSupportShipsPerVoyageType(VOYAGE_TYPE _type) external view returns (uint8);

    function getMaxRollPerChest(VOYAGE_TYPE _type) external view returns (uint256);

    function maxRollCapLockBoxes() external view returns (uint16);

    function getLockBoxesDistribution(ARTIFACT_TYPE _type) external view returns (uint16[2] memory);

    function getVoyageDebuffs(VOYAGE_TYPE _type) external view returns (uint16);

    function debuffVoyage(VOYAGE_TYPE _voyageType, VoyageStatusCache memory _claimingRewardsCache)
        external
        view
        returns (VoyageStatusCache memory);

    function interpretResults(
        uint256 _result,
        VoyageResult memory _voyageResult,
        LockedVoyage calldata _lockedVoyage,
        VoyageStatusCache memory _claimingRewardsCache,
        INTERACTION _interaction,
        CausalityParams calldata _causalityParams,
        uint256 _index
    ) external view returns (VoyageResult memory, VoyageStatusCache memory);

    function getArtifactSkillBoosts(ARTIFACT_TYPE _type) external view returns (uint16);
}

interface DPSPirateFeaturesI {
    function getTraitsAndSkills(uint16 _dpsId) external view returns (string[8] memory, uint16[3] memory);
}

interface DPSSupportShipI is IERC1155 {
    function burn(
        address _from,
        uint256 _type,
        uint256 _amount
    ) external;

    function mint(
        address _owner,
        uint256 _type,
        uint256 _amount
    ) external;
}

interface DPSFlagshipI is IERC721 {
    function mint(address _owner, uint256 _id) external;

    function burn(uint256 _id) external;

    function upgradePart(
        FLAGSHIP_PART _trait,
        uint256 _tokenId,
        uint8 _level
    ) external;

    function getPartsLevel(uint256 _flagshipId) external view returns (uint8[7] memory);

    function tokensOfOwner(address _owner) external view returns (uint256[] memory);

    function exists(uint256 _tokenId) external view returns (bool);
}

interface DPSCartographerI {
    function viewVoyageConfiguration(CausalityParams calldata causalityParams, uint256 _voyageId)
        external
        view
        returns (VoyageConfig memory voyageConfig);

    function buyers(uint256 _voyageId) external view returns (address);
}

interface DPSChestsI is IERC1155 {
    function mint(
        address _to,
        VOYAGE_TYPE _voyageType,
        uint256 _amount
    ) external;

    function burn(
        address _from,
        VOYAGE_TYPE _voyageType,
        uint256 _amount
    ) external;
}

interface MintableBurnableIERC1155 is IERC1155 {
    function mint(
        address _to,
        uint256 _type,
        uint256 _amount
    ) external;

    function burn(
        address _from,
        uint256 _type,
        uint256 _amount
    ) external;
}

File 8 of 16 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (utils/Context.sol)

pragma solidity ^0.8.0;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

File 9 of 16 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (token/ERC721/IERC721Receiver.sol)

pragma solidity ^0.8.0;

/**
 * @title ERC721 token receiver interface
 * @dev Interface for any contract that wants to support safeTransfers
 * from ERC721 asset contracts.
 */
interface IERC721Receiver {
    /**
     * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
     * by `operator` from `from`, this function is called.
     *
     * It must return its Solidity selector to confirm the token transfer.
     * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.
     *
     * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`.
     */
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}

File 10 of 16 : ERC1155Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (token/ERC1155/utils/ERC1155Receiver.sol)

pragma solidity ^0.8.0;

import "../IERC1155Receiver.sol";
import "../../../utils/introspection/ERC165.sol";

/**
 * @dev _Available since v3.1._
 */
abstract contract ERC1155Receiver is ERC165, IERC1155Receiver {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
        return interfaceId == type(IERC1155Receiver).interfaceId || super.supportsInterface(interfaceId);
    }
}

File 11 of 16 : IERC1155Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (token/ERC1155/IERC1155Receiver.sol)

pragma solidity ^0.8.0;

import "../../utils/introspection/IERC165.sol";

/**
 * @dev _Available since v3.1._
 */
interface IERC1155Receiver is IERC165 {
    /**
        @dev Handles the receipt of a single ERC1155 token type. This function is
        called at the end of a `safeTransferFrom` after the balance has been updated.
        To accept the transfer, this must return
        `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))`
        (i.e. 0xf23a6e61, or its own function selector).
        @param operator The address which initiated the transfer (i.e. msg.sender)
        @param from The address which previously owned the token
        @param id The ID of the token being transferred
        @param value The amount of tokens being transferred
        @param data Additional data with no specified format
        @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed
    */
    function onERC1155Received(
        address operator,
        address from,
        uint256 id,
        uint256 value,
        bytes calldata data
    ) external returns (bytes4);

    /**
        @dev Handles the receipt of a multiple ERC1155 token types. This function
        is called at the end of a `safeBatchTransferFrom` after the balances have
        been updated. To accept the transfer(s), this must return
        `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))`
        (i.e. 0xbc197c81, or its own function selector).
        @param operator The address which initiated the batch transfer (i.e. msg.sender)
        @param from The address which previously owned the token
        @param ids An array containing ids of each token being transferred (order and length must match values array)
        @param values An array containing amounts of each token being transferred (order and length must match ids array)
        @param data Additional data with no specified format
        @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed
    */
    function onERC1155BatchReceived(
        address operator,
        address from,
        uint256[] calldata ids,
        uint256[] calldata values,
        bytes calldata data
    ) external returns (bytes4);
}

File 12 of 16 : ERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (utils/introspection/ERC165.sol)

pragma solidity ^0.8.0;

import "./IERC165.sol";

/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
 * for the additional interface id that will be supported. For example:
 *
 * ```solidity
 * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
 *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
 * }
 * ```
 *
 * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
 */
abstract contract ERC165 is IERC165 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}

File 13 of 16 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (utils/introspection/IERC165.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

File 14 of 16 : IERC721Enumerable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (token/ERC721/extensions/IERC721Enumerable.sol)

pragma solidity ^0.8.0;

import "../IERC721.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Enumerable is IERC721 {
    /**
     * @dev Returns the total amount of tokens stored by the contract.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns a token ID owned by `owner` at a given `index` of its token list.
     * Use along with {balanceOf} to enumerate all of ``owner``'s tokens.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId);

    /**
     * @dev Returns a token ID at a given `index` of all the tokens stored by the contract.
     * Use along with {totalSupply} to enumerate all tokens.
     */
    function tokenByIndex(uint256 index) external view returns (uint256);
}

File 15 of 16 : IERC1155.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (token/ERC1155/IERC1155.sol)

pragma solidity ^0.8.0;

import "../../utils/introspection/IERC165.sol";

/**
 * @dev Required interface of an ERC1155 compliant contract, as defined in the
 * https://eips.ethereum.org/EIPS/eip-1155[EIP].
 *
 * _Available since v3.1._
 */
interface IERC1155 is IERC165 {
    /**
     * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.
     */
    event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);

    /**
     * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all
     * transfers.
     */
    event TransferBatch(
        address indexed operator,
        address indexed from,
        address indexed to,
        uint256[] ids,
        uint256[] values
    );

    /**
     * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to
     * `approved`.
     */
    event ApprovalForAll(address indexed account, address indexed operator, bool approved);

    /**
     * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.
     *
     * If an {URI} event was emitted for `id`, the standard
     * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value
     * returned by {IERC1155MetadataURI-uri}.
     */
    event URI(string value, uint256 indexed id);

    /**
     * @dev Returns the amount of tokens of token type `id` owned by `account`.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function balanceOf(address account, uint256 id) external view returns (uint256);

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.
     *
     * Requirements:
     *
     * - `accounts` and `ids` must have the same length.
     */
    function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids)
        external
        view
        returns (uint256[] memory);

    /**
     * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,
     *
     * Emits an {ApprovalForAll} event.
     *
     * Requirements:
     *
     * - `operator` cannot be the caller.
     */
    function setApprovalForAll(address operator, bool approved) external;

    /**
     * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.
     *
     * See {setApprovalForAll}.
     */
    function isApprovedForAll(address account, address operator) external view returns (bool);

    /**
     * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - If the caller is not `from`, it must be have been approved to spend ``from``'s tokens via {setApprovalForAll}.
     * - `from` must have a balance of tokens of type `id` of at least `amount`.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes calldata data
    ) external;

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - `ids` and `amounts` must have the same length.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
     * acceptance magic value.
     */
    function safeBatchTransferFrom(
        address from,
        address to,
        uint256[] calldata ids,
        uint256[] calldata amounts,
        bytes calldata data
    ) external;
}

File 16 of 16 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

import "../../utils/introspection/IERC165.sol";

/**
 * @dev Required interface of an ERC721 compliant contract.
 */
interface IERC721 is IERC165 {
    /**
     * @dev Emitted when `tokenId` token is transferred from `from` to `to`.
     */
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
     */
    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
     */
    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);

    /**
     * @dev Returns the number of tokens in ``owner``'s account.
     */
    function balanceOf(address owner) external view returns (uint256 balance);

    /**
     * @dev Returns the owner of the `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function ownerOf(uint256 tokenId) external view returns (address owner);

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Gives permission to `to` to transfer `tokenId` token to another account.
     * The approval is cleared when the token is transferred.
     *
     * Only a single account can be approved at a time, so approving the zero address clears previous approvals.
     *
     * Requirements:
     *
     * - The caller must own the token or be an approved operator.
     * - `tokenId` must exist.
     *
     * Emits an {Approval} event.
     */
    function approve(address to, uint256 tokenId) external;

    /**
     * @dev Returns the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

    /**
     * @dev Approve or remove `operator` as an operator for the caller.
     * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
     *
     * Requirements:
     *
     * - The `operator` cannot be the caller.
     *
     * Emits an {ApprovalForAll} event.
     */
    function setApprovalForAll(address operator, bool _approved) external;

    /**
     * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
     *
     * See {setApprovalForAll}
     */
    function isApprovedForAll(address owner, address operator) external view returns (bool);

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes calldata data
    ) external;
}

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

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AddressZero","type":"error"},{"inputs":[],"name":"NotEnoughTokens","type":"error"},{"inputs":[],"name":"Paused","type":"error"},{"inputs":[],"name":"Unauthorized","type":"error"},{"inputs":[],"name":"Unhealthy","type":"error"},{"inputs":[{"internalType":"uint256","name":"_location","type":"uint256"}],"name":"WrongParams","type":"error"},{"inputs":[{"internalType":"uint256","name":"_state","type":"uint256"}],"name":"WrongState","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"_voyageId","type":"uint256"},{"indexed":false,"internalType":"uint16","name":"_noOfChests","type":"uint16"},{"indexed":false,"internalType":"uint8[9]","name":"_destroyedSupportships","type":"uint8[9]"},{"indexed":false,"internalType":"uint16","name":"_healthDamage","type":"uint16"},{"indexed":false,"internalType":"uint16[]","name":"_interactionRNGs","type":"uint16[]"},{"indexed":false,"internalType":"uint8[]","name":"_interactionResults","type":"uint8[]"},{"indexed":false,"internalType":"uint256","name":"_claimedAt","type":"uint256"}],"name":"ClaimVoyageRewards","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"_voyageId","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"_dpsId","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"_flagshipId","type":"uint256"},{"indexed":false,"internalType":"uint8[9]","name":"_supportShipIds","type":"uint8[9]"},{"indexed":false,"internalType":"enum ARTIFACT_TYPE","name":"_artifactId","type":"uint8"},{"indexed":false,"internalType":"uint256","name":"_lockedAt","type":"uint256"}],"name":"LockVoyage","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_target","type":"uint256"},{"indexed":false,"internalType":"address","name":"_contract","type":"address"}],"name":"SetContract","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_token","type":"address"},{"indexed":false,"internalType":"bytes","name":"_data","type":"bytes"}],"name":"TokenRecovered","type":"event"},{"inputs":[],"name":"artifact","outputs":[{"internalType":"contract IERC1155","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"cartographer","outputs":[{"internalType":"contract DPSCartographerI","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"causality","outputs":[{"internalType":"contract DPSRandomI","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_voyageId","type":"uint256"},{"components":[{"internalType":"uint256[]","name":"blockNumber","type":"uint256[]"},{"internalType":"bytes32[]","name":"hash1","type":"bytes32[]"},{"internalType":"bytes32[]","name":"hash2","type":"bytes32[]"},{"internalType":"uint256[]","name":"timestamp","type":"uint256[]"},{"internalType":"bytes[]","name":"signature","type":"bytes[]"}],"internalType":"struct CausalityParams","name":"_causalityParams","type":"tuple"}],"name":"checkVoyageState","outputs":[{"components":[{"internalType":"uint16","name":"awardedChests","type":"uint16"},{"internalType":"uint8[9]","name":"destroyedSupportShips","type":"uint8[9]"},{"internalType":"uint8","name":"totalSupportShipsDestroyed","type":"uint8"},{"internalType":"uint8","name":"healthDamage","type":"uint8"},{"internalType":"uint16","name":"skippedInteractions","type":"uint16"},{"internalType":"uint16[]","name":"interactionRNGs","type":"uint16[]"},{"internalType":"uint8[]","name":"interactionResults","type":"uint8[]"}],"internalType":"struct VoyageResult","name":"voyageResult","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"chest","outputs":[{"internalType":"contract DPSChestsI","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_voyageIds","type":"uint256[]"},{"components":[{"internalType":"uint256[]","name":"blockNumber","type":"uint256[]"},{"internalType":"bytes32[]","name":"hash1","type":"bytes32[]"},{"internalType":"bytes32[]","name":"hash2","type":"bytes32[]"},{"internalType":"uint256[]","name":"timestamp","type":"uint256[]"},{"internalType":"bytes[]","name":"signature","type":"bytes[]"}],"internalType":"struct CausalityParams[]","name":"_causalityParams","type":"tuple[]"}],"name":"claimRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_voyageId","type":"uint256"}],"name":"cleanVoyageResults","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"dps","outputs":[{"internalType":"contract IERC721","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"dpsFeatures","outputs":[{"internalType":"contract DPSPirateFeaturesI","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"flagship","outputs":[{"internalType":"contract DPSFlagshipI","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"gameSettings","outputs":[{"internalType":"contract DPSGameSettingsI","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"uint256","name":"_voyageId","type":"uint256"}],"name":"getFinishedVoyageByOwnerAndId","outputs":[{"components":[{"internalType":"uint8","name":"totalSupportShips","type":"uint8"},{"internalType":"enum VOYAGE_TYPE","name":"voyageType","type":"uint8"},{"internalType":"enum ARTIFACT_TYPE","name":"artifactId","type":"uint8"},{"internalType":"uint8[9]","name":"supportShips","type":"uint8[9]"},{"internalType":"uint8[]","name":"sequence","type":"uint8[]"},{"internalType":"uint16","name":"navigation","type":"uint16"},{"internalType":"uint16","name":"luck","type":"uint16"},{"internalType":"uint16","name":"strength","type":"uint16"},{"internalType":"uint256","name":"voyageId","type":"uint256"},{"internalType":"uint256","name":"dpsId","type":"uint256"},{"internalType":"uint256","name":"flagshipId","type":"uint256"},{"internalType":"uint256","name":"lockedBlock","type":"uint256"},{"internalType":"uint256","name":"lockedTimestamp","type":"uint256"},{"internalType":"uint256","name":"claimedTime","type":"uint256"}],"internalType":"struct LockedVoyage","name":"finished","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"uint256","name":"_start","type":"uint256"},{"internalType":"uint256","name":"_stop","type":"uint256"}],"name":"getFinishedVoyagesForOwner","outputs":[{"components":[{"internalType":"uint8","name":"totalSupportShips","type":"uint8"},{"internalType":"enum VOYAGE_TYPE","name":"voyageType","type":"uint8"},{"internalType":"enum ARTIFACT_TYPE","name":"artifactId","type":"uint8"},{"internalType":"uint8[9]","name":"supportShips","type":"uint8[9]"},{"internalType":"uint8[]","name":"sequence","type":"uint8[]"},{"internalType":"uint16","name":"navigation","type":"uint16"},{"internalType":"uint16","name":"luck","type":"uint16"},{"internalType":"uint16","name":"strength","type":"uint16"},{"internalType":"uint256","name":"voyageId","type":"uint256"},{"internalType":"uint256","name":"dpsId","type":"uint256"},{"internalType":"uint256","name":"flagshipId","type":"uint256"},{"internalType":"uint256","name":"lockedBlock","type":"uint256"},{"internalType":"uint256","name":"lockedTimestamp","type":"uint256"},{"internalType":"uint256","name":"claimedTime","type":"uint256"}],"internalType":"struct LockedVoyage[]","name":"finished","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_voyageId","type":"uint256"}],"name":"getLastComputedState","outputs":[{"components":[{"internalType":"uint16","name":"awardedChests","type":"uint16"},{"internalType":"uint8[9]","name":"destroyedSupportShips","type":"uint8[9]"},{"internalType":"uint8","name":"totalSupportShipsDestroyed","type":"uint8"},{"internalType":"uint8","name":"healthDamage","type":"uint8"},{"internalType":"uint16","name":"skippedInteractions","type":"uint16"},{"internalType":"uint16[]","name":"interactionRNGs","type":"uint16[]"},{"internalType":"uint8[]","name":"interactionResults","type":"uint8[]"}],"internalType":"struct VoyageResult","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"uint256","name":"_voyageId","type":"uint256"}],"name":"getLockedVoyageByOwnerAndId","outputs":[{"components":[{"internalType":"uint8","name":"totalSupportShips","type":"uint8"},{"internalType":"enum VOYAGE_TYPE","name":"voyageType","type":"uint8"},{"internalType":"enum ARTIFACT_TYPE","name":"artifactId","type":"uint8"},{"internalType":"uint8[9]","name":"supportShips","type":"uint8[9]"},{"internalType":"uint8[]","name":"sequence","type":"uint8[]"},{"internalType":"uint16","name":"navigation","type":"uint16"},{"internalType":"uint16","name":"luck","type":"uint16"},{"internalType":"uint16","name":"strength","type":"uint16"},{"internalType":"uint256","name":"voyageId","type":"uint256"},{"internalType":"uint256","name":"dpsId","type":"uint256"},{"internalType":"uint256","name":"flagshipId","type":"uint256"},{"internalType":"uint256","name":"lockedBlock","type":"uint256"},{"internalType":"uint256","name":"lockedTimestamp","type":"uint256"},{"internalType":"uint256","name":"claimedTime","type":"uint256"}],"internalType":"struct LockedVoyage","name":"locked","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"uint256","name":"_start","type":"uint256"},{"internalType":"uint256","name":"_stop","type":"uint256"}],"name":"getLockedVoyagesForOwner","outputs":[{"components":[{"internalType":"uint8","name":"totalSupportShips","type":"uint8"},{"internalType":"enum VOYAGE_TYPE","name":"voyageType","type":"uint8"},{"internalType":"enum ARTIFACT_TYPE","name":"artifactId","type":"uint8"},{"internalType":"uint8[9]","name":"supportShips","type":"uint8[9]"},{"internalType":"uint8[]","name":"sequence","type":"uint8[]"},{"internalType":"uint16","name":"navigation","type":"uint16"},{"internalType":"uint16","name":"luck","type":"uint16"},{"internalType":"uint16","name":"strength","type":"uint16"},{"internalType":"uint256","name":"voyageId","type":"uint256"},{"internalType":"uint256","name":"dpsId","type":"uint256"},{"internalType":"uint256","name":"flagshipId","type":"uint256"},{"internalType":"uint256","name":"lockedBlock","type":"uint256"},{"internalType":"uint256","name":"lockedTimestamp","type":"uint256"},{"internalType":"uint256","name":"claimedTime","type":"uint256"}],"internalType":"struct LockedVoyage[]","name":"locked","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint8","name":"totalSupportShips","type":"uint8"},{"internalType":"enum VOYAGE_TYPE","name":"voyageType","type":"uint8"},{"internalType":"enum ARTIFACT_TYPE","name":"artifactId","type":"uint8"},{"internalType":"uint8[9]","name":"supportShips","type":"uint8[9]"},{"internalType":"uint8[]","name":"sequence","type":"uint8[]"},{"internalType":"uint16","name":"navigation","type":"uint16"},{"internalType":"uint16","name":"luck","type":"uint16"},{"internalType":"uint16","name":"strength","type":"uint16"},{"internalType":"uint256","name":"voyageId","type":"uint256"},{"internalType":"uint256","name":"dpsId","type":"uint256"},{"internalType":"uint256","name":"flagshipId","type":"uint256"},{"internalType":"uint256","name":"lockedBlock","type":"uint256"},{"internalType":"uint256","name":"lockedTimestamp","type":"uint256"},{"internalType":"uint256","name":"claimedTime","type":"uint256"}],"internalType":"struct LockedVoyage[]","name":"_lockedVoyages","type":"tuple[]"},{"components":[{"internalType":"uint256[]","name":"blockNumber","type":"uint256[]"},{"internalType":"bytes32[]","name":"hash1","type":"bytes32[]"},{"internalType":"bytes32[]","name":"hash2","type":"bytes32[]"},{"internalType":"uint256[]","name":"timestamp","type":"uint256[]"},{"internalType":"bytes[]","name":"signature","type":"bytes[]"}],"internalType":"struct CausalityParams[]","name":"_causalityParams","type":"tuple[]"}],"name":"lockVoyageItems","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155BatchReceived","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_operator","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_operator","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"ownerOfLockedVoyages","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"recoverToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_contract","type":"address"},{"internalType":"uint8","name":"_target","type":"uint8"}],"name":"setContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"supportShip","outputs":[{"internalType":"contract DPSSupportShipI","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"voyage","outputs":[{"internalType":"contract DPSVoyageI","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"voyageResults","outputs":[{"internalType":"uint16","name":"awardedChests","type":"uint16"},{"internalType":"uint8","name":"totalSupportShipsDestroyed","type":"uint8"},{"internalType":"uint8","name":"healthDamage","type":"uint8"},{"internalType":"uint16","name":"skippedInteractions","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"bool","name":"_locked","type":"bool"}],"name":"voyagesLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]

60806040523480156200001157600080fd5b506001600055620000223362000028565b6200007a565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b615f2a806200008a6000396000f3fe608060405234801561001057600080fd5b50600436106101e55760003560e01c8063944018cf1161010f578063bc197c81116100a2578063f23a6e6111610071578063f23a6e61146104e2578063f2fde38b146104f5578063fcb601b814610508578063ffd7593c1461051b57600080fd5b8063bc197c811461048a578063d884c2d2146104a9578063d970d60f146104bc578063e012d8d3146104cf57600080fd5b8063a09620fb116100de578063a09620fb14610431578063a428e07f14610444578063b7297cf314610464578063b9f37e3f1461047757600080fd5b8063944018cf146103c157806395cdfb4b146103ea5780639b610b0a1461040b5780639f33d8811461041e57600080fd5b806348ec459c11610187578063647aba3011610156578063647aba3014610375578063715018a6146103885780637bc53f3e146103905780638da5cb5b146103b057600080fd5b806348ec459c146102b7578063613a3cea1461032f57806362c2fd6b1461034f57806364026ac01461036257600080fd5b806320482fd2116101c357806320482fd2146102535780633086f74d146102665780633c2f22bc146102915780634161002a146102a457600080fd5b806301ffc9a7146101ea578063150b7a0214610212578063179113381461023e575b600080fd5b6101fd6101f8366004613b23565b61052e565b60405190151581526020015b60405180910390f35b610225610220366004613bb1565b610565565b6040516001600160e01b03199091168152602001610209565b61025161024c366004613c23565b6105a1565b005b610251610261366004613c3c565b610623565b600654610279906001600160a01b031681565b6040516001600160a01b039091168152602001610209565b600754610279906001600160a01b031681565b6102516102b2366004613cd4565b610718565b6102fc6102c5366004613c23565b6010602052600090815260409020805460029091015461ffff9182169160ff80831692610100810490911691620100009091041684565b604051610209949392919061ffff948516815260ff93841660208201529190921660408201529116606082015260800190565b61034261033d366004613d3f565b61106a565b6040516102099190613efd565b600854610279906001600160a01b031681565b600b54610279906001600160a01b031681565b600954610279906001600160a01b031681565b6102516112cc565b6103a361039e366004613f10565b611302565b6040516102099190613f45565b6001546001600160a01b0316610279565b6102796103cf366004613c23565b6011602052600090815260409020546001600160a01b031681565b6103fd6103f8366004613fa7565b6115c3565b604051908152602001610209565b6103a3610419366004613f10565b611607565b61025161042c366004614004565b6118bf565b600454610279906001600160a01b031681565b610457610452366004614032565b611b02565b6040516102099190614138565b600a54610279906001600160a01b031681565b600254610279906001600160a01b031681565b61022561049836600461436c565b63bc197c8160e01b95945050505050565b6102516104b7366004613cd4565b611e23565b600554610279906001600160a01b031681565b6104576104dd366004613c23565b6126db565b6102256104f0366004614419565b612887565b610251610503366004614494565b6128c4565b610342610516366004613d3f565b61295f565b600354610279906001600160a01b031681565b60006001600160e01b03198216630271189760e51b148061055f57506301ffc9a760e01b6001600160e01b03198316145b92915050565b60006001600160a01b038616301461058f576040516282b42960e81b815260040160405180910390fd5b50630a85bd0160e11b95945050505050565b6001546001600160a01b031633146105d45760405162461bcd60e51b81526004016105cb906144b1565b60405180910390fd5b6000818152601060205260408120805461ffff19168155600181018290559060028201805463ffffffff191690556106106003830160006137c2565b61061e6004830160006137e7565b505050565b6001546001600160a01b0316331461064d5760405162461bcd60e51b81526004016105cb906144b1565b6000836001600160a01b03166000848460405161066b9291906144e6565b60006040518083038185875af1925050503d80600081146106a8576040519150601f19603f3d011682016040523d82523d6000602084013e6106ad565b606091505b50509050806106cf576040516308aeed0f60e21b815260040160405180910390fd5b836001600160a01b03167f1a220fe4bd914e6a0feadfe838ea2660505afe80ab0ce47d8bdc2ac1525166b7848460405161070a92919061451f565b60405180910390a250505050565b60026000540361076a5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016105cb565b6002600055600a5460405163bc61e73360e01b81526004808201526001600160a01b039091169063bc61e73390602401602060405180830381865afa1580156107b7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107db9190614546565b60ff166001036107fe576040516313d0ff5960e31b815260040160405180910390fd5b82811461082157604051632473a0d360e11b8152600160048201526024016105cb565b60005b8381101561105e57600085858381811061084057610840614563565b90506020028101906108529190614579565b61085b9061469a565b9050600084848481811061087157610871614563565b905060200281019061088391906147a7565b61088c9061483c565b60065461014084015160405163a3df934f60e01b815260048101919091529192506001600160a01b03169063a3df934f9060240160e060405180830381865afa1580156108dd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109019190614917565b5160ff1660641461092557604051631f6de81d60e21b815260040160405180910390fd5b336000908152600c60209081526040808320610100860151845290915290206004015415610969576040516328d7be8d60e11b8152600160048201526024016105cb565b336000908152600d602090815260408083206101008601518452909152902060040154156109ad576040516328d7be8d60e11b8152600260048201526024016105cb565b600954610100830151604051630b6cf9c360e01b81526000926001600160a01b031691630b6cf9c3916109e4918691600401614a25565b600060405180830381865afa158015610a01573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610a299190810190614b77565b90506000805b6009811015610a745784606001518160098110610a4e57610a4e614563565b6020020151610a609060ff1683614c49565b915080610a6c81614c61565b915050610a2f565b50600a548251604051636d0b2f4d60e01b81526001600160a01b0390921691636d0b2f4d91610aa591600401614c7a565b602060405180830381865afa158015610ac2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ae69190614546565b60ff16811180610afa5750835160ff168114155b15610b1b576040516328d7be8d60e11b8152600360048201526024016105cb565b816040015161ffff168260800151610b339190614c49565b4311610b54576040516328d7be8d60e11b81526004818101526024016105cb565b436101608501524261018085015260006101a0850181905260a0850181905260c0850181905260e08501526060820151608085015260ff81168452815160208501906003811115610ba757610ba7613d6b565b90816003811115610bba57610bba613d6b565b905250336000908152600c6020908152604080832061010080890151855290835292208651815460ff90911660ff1982168117835592880151889492939092849261ffff191690911790836003811115610c1657610c16613d6b565b021790555060408201518154829062ff000019166201000083600c811115610c4057610c40613d6b565b02179055506060820151610c5a906001830190600961380c565b5060808201518051610c7691600284019160209091019061389f565b5060a082015160038201805460c085015160e086015161ffff9081166401000000000265ffff0000000019928216620100000263ffffffff1990941691909516179190911716919091179055610100808301516004808401919091556101208085015160058501556101408501516006850155610160850151600785015561018085015160088501556101a090940151600990930192909255336000818152600e60209081526040808320948b018051865460018101885596855283852090960195909555935182526011905282902080546001600160a01b031916821790558254938801519151632142170760e11b81526001600160a01b0394909416936342842e0e93610d89933092909101614c8d565b600060405180830381600087803b158015610da357600080fd5b505af1158015610db7573d6000803e3d6000fd5b5050600654610140870151604051632142170760e11b81526001600160a01b0390921693506342842e0e9250610df39133913091600401614c8d565b600060405180830381600087803b158015610e0d57600080fd5b505af1158015610e21573d6000803e3d6000fd5b5050505060005b6009811015610ee757600085606001518260098110610e4957610e49614563565b602002015160ff161115610edf5760075460608601516001600160a01b039091169063f242432a903390309085908160098110610e8857610e88614563565b60200201516040518563ffffffff1660e01b8152600401610eac9493929190614cb1565b600060405180830381600087803b158015610ec657600080fd5b505af1158015610eda573d6000803e3d6000fd5b505050505b600101610e28565b5060008460400151600c811115610f0057610f00613d6b565b14610f885760085460408501516001600160a01b039091169063f242432a9033903090600c811115610f3457610f34613d6b565b60016040518563ffffffff1660e01b8152600401610f559493929190614ceb565b600060405180830381600087803b158015610f6f57600080fd5b505af1158015610f83573d6000803e3d6000fd5b505050505b600254610100850151604051632142170760e11b81526001600160a01b03909216916342842e0e91610fc09133913091600401614c8d565b600060405180830381600087803b158015610fda57600080fd5b505af1158015610fee573d6000803e3d6000fd5b505050508361014001518461012001518561010001517f9389cafddc689017c70183e8e67b2bd36bd3f016ffc3ae2f2c4b06b1c329a3a8876060015188604001514260405161103f93929190614d23565b60405180910390a450505050808061105690614c61565b915050610824565b50506001600055505050565b611072613905565b60005b6001600160a01b0384166000908152600e60205260409020548110156112c5576001600160a01b0384166000908152600e602052604081208054839081106110bf576110bf614563565b906000526020600020015490508381036112b2576001600160a01b0385166000908152600c6020908152604080832084845282529182902082516101c08101909352805460ff8082168552919284019161010090910416600381111561112757611127613d6b565b600381111561113857611138613d6b565b8152815460209091019062010000900460ff16600c81111561115c5761115c613d6b565b600c81111561116d5761116d613d6b565b815260408051610120810191829052602090920191906001840190600990826000855b825461010083900a900460ff16815260206001928301818104948501949093039092029101808411611190579050505050505081526020016002820180548060200260200160405190810160405280929190818152602001828054801561123457602002820191906000526020600020906000905b825461010083900a900460ff168152602060019283018181049485019490930390920291018084116112055790505b5050509183525050600382015461ffff80821660208401526201000082048116604084015264010000000090910416606082015260048201546080820152600582015460a0820152600682015460c0820152600782015460e0820152600882015461010082015260099091015461012090910152925061055f915050565b50806112bd81614c61565b915050611075565b5092915050565b6001546001600160a01b031633146112f65760405162461bcd60e51b81526004016105cb906144b1565b6113006000612a2f565b565b6001600160a01b0383166000908152600e60205260409020546060908083111561132a578092505b806001600160401b038111156113425761134261414b565b60405190808252806020026020018201604052801561137b57816020015b611368613905565b8152602001906001900390816113605790505b509150835b838110156115ba576001600160a01b0386166000908152600c60209081526040808320600e90925282208054919291849081106113bf576113bf614563565b60009182526020808320909101548352828101939093526040918201902081516101c08101909252805460ff8082168452929391929184019161010090910416600381111561141057611410613d6b565b600381111561142157611421613d6b565b8152815460209091019062010000900460ff16600c81111561144557611445613d6b565b600c81111561145657611456613d6b565b815260408051610120810191829052602090920191906001840190600990826000855b825461010083900a900460ff16815260206001928301818104948501949093039092029101808411611479579050505050505081526020016002820180548060200260200160405190810160405280929190818152602001828054801561151d57602002820191906000526020600020906000905b825461010083900a900460ff168152602060019283018181049485019490930390920291018084116114ee5790505b5050509183525050600382015461ffff80821660208401526201000082048116604084015264010000000090910416606082015260048201546080820152600582015460a0820152600682015460c0820152600782015460e0820152600882015461010082015260099091015461012090910152835184908784039081106115a7576115a7614563565b6020908102919091010152600101611380565b50509392505050565b600081156115ea57506001600160a01b0382166000908152600e602052604090205461055f565b50506001600160a01b03166000908152600f602052604090205490565b6001600160a01b0383166000908152600f60205260409020546060908083111561162f578092505b806001600160401b038111156116475761164761414b565b60405190808252806020026020018201604052801561168057816020015b61166d613905565b8152602001906001900390816116655790505b509150835b838110156115ba576001600160a01b0386166000908152600d60209081526040808320600f90925282208054919291849081106116c4576116c4614563565b60009182526020808320909101548352828101939093526040918201902081516101c08101909252805460ff8082168452929391929184019161010090910416600381111561171557611715613d6b565b600381111561172657611726613d6b565b8152815460209091019062010000900460ff16600c81111561174a5761174a613d6b565b600c81111561175b5761175b613d6b565b815260408051610120810191829052602090920191906001840190600990826000855b825461010083900a900460ff1681526020600192830181810494850194909303909202910180841161177e579050505050505081526020016002820180548060200260200160405190810160405280929190818152602001828054801561182257602002820191906000526020600020906000905b825461010083900a900460ff168152602060019283018181049485019490930390920291018084116117f35790505b5050509183525050600382015461ffff80821660208401526201000082048116604084015264010000000090910416606082015260048201546080820152600582015460a0820152600682015460c0820152600782015460e0820152600882015461010082015260099091015461012090910152835184908784039081106118ac576118ac614563565b6020908102919091010152600101611685565b6001546001600160a01b031633146118e95760405162461bcd60e51b81526004016105cb906144b1565b6001600160a01b03821661191057604051639fabe1c160e01b815260040160405180910390fd5b8060ff1660010361193b57600280546001600160a01b0319166001600160a01b038416179055611aba565b8060ff1660020361196657600380546001600160a01b0319166001600160a01b038416179055611aba565b8060ff1660030361199157600480546001600160a01b0319166001600160a01b038416179055611aba565b8060ff166004036119bc57600680546001600160a01b0319166001600160a01b038416179055611aba565b8060ff166005036119e757600780546001600160a01b0319166001600160a01b038416179055611aba565b8060ff16600603611a1257600880546001600160a01b0319166001600160a01b038416179055611aba565b8060ff16600703611a3d57600a80546001600160a01b0319166001600160a01b038416179055611aba565b8060ff16600803611a6857600580546001600160a01b0319166001600160a01b038416179055611aba565b8060ff16600903611a9357600980546001600160a01b0319166001600160a01b038416179055611aba565b8060ff16600a03611aba57600b80546001600160a01b0319166001600160a01b0384161790555b6040805160ff831681526001600160a01b03841660208201527fd58da2325ce084e36b92ea4c1a90706ffa665d07ec064f887de9dbb8f15f4995910160405180910390a15050565b611b0a613987565b6000838152601160209081526040808320546001600160a01b039081168452600c83528184208785529092529182902060025492516331a9108f60e11b815260048101879052909230921690636352211e90602401602060405180830381865afa158015611b7c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ba09190614d4f565b6001600160a01b0316141580611bb857506004810154155b15611bd9576040516328d7be8d60e11b8152600160048201526024016105cb565b6002546040516352a701e360e01b8152600481018690526000916001600160a01b0316906352a701e390602401600060405180830381865afa158015611c23573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611c4b9190810190614b77565b60028301805460408051602080840282018101909252828152939450830182828015611cb457602002820191906000526020600020906000905b825461010083900a900460ff16815260206001928301818104948501949093039092029101808411611c855790505b5050505050606082015260a08101516008830154611cd29042614d6c565b11611cf3576040516328d7be8d60e11b8152600160048201526024016105cb565b60008160a00151836008015442611d0a9190614d6c565b611d149190614d83565b9050816060015151811115611d2b57506060810151515b60608201515160005b611d3e8383614d6c565b811015611d975760608401516000906001611d598486614d6c565b611d639190614d6c565b81518110611d7357611d73614563565b60ff9092166020928302919091019091015280611d8f81614c61565b915050611d34565b506060830151600954604051631e55504360e31b8152600481018a9052611e1892879290916001600160a01b039091169063f2aa821890602401602060405180830381865afa158015611dee573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e129190614d4f565b89612a81565b979650505050505050565b600260005403611e755760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016105cb565b6002600055600a5460405163bc61e73360e01b8152600560048201526001600160a01b039091169063bc61e73390602401602060405180830381865afa158015611ec3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ee79190614546565b60ff16600103611f0a576040516313d0ff5960e31b815260040160405180910390fd5b828114611f2d57604051632473a0d360e11b8152600260048201526024016105cb565b60005b8381101561105e576000858583818110611f4c57611f4c614563565b602090810292909201356000818152601184526040808220546001600160a01b03908116808452600c875282842085855290965281832060025492516352a701e360e01b815260048101869052949750945091929116906352a701e390602401600060405180830381865afa158015611fc9573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611ff19190810190614b77565b6002830180546040805160208084028201810190925282815293945083018282801561205a57602002820191906000526020600020906000905b825461010083900a900460ff1681526020600192830181810494850194909303909202910180841161202b5790505b505050505060608201526001600160a01b03831661208b57604051639fabe1c160e01b815260040160405180910390fd5b428160a00151826020015160ff166120a39190614da5565b83600801546120b29190614c49565b11156120d3576040516328d7be8d60e11b81526004818101526024016105cb565b8060400151816020015160ff166120ea9190614dc4565b61ffff1682600701546120fd9190614c49565b431161211f576040516328d7be8d60e11b8152600560048201526024016105cb565b6003546001600160a01b0316639d54c5eb88888881811061214257612142614563565b905060200281019061215491906147a7565b83856040518463ffffffff1660e01b815260040161217493929190615726565b60006040518083038186803b15801561218c57600080fd5b505afa1580156121a0573d6000803e3d6000fd5b505050506060810151600954604051631e55504360e31b8152600481018790526000926122489286926001600160a01b039091169063f2aa821890602401602060405180830381865afa1580156121fb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061221f9190614d4f565b8b8b8b81811061223157612231614563565b905060200281019061224391906147a7565b612a81565b4260098501556001600160a01b0385166000908152600d602090815260408083206004880154845290915290208454815460ff91821660ff19821681178455875494955087946101009081900490931692849261ffff1916909117908360038111156122b6576122b6613d6b565b02179055508154815460ff62010000928390041691839162ff000019169083600c8111156122e6576122e6613d6b565b02179055506122fd600182810190840160096139d8565b50600282810180546123129284019190613a0b565b5060038281018054918301805461ffff1980821661ffff95861690811784558454620100009081900487160263ffffffff19909316179190911780835592546401000000009081900485160265ffff00000000199093169290921790556004808501548185015560058086015490850155600680860154908501556007808601549085015560088086015490850155600994850154938501939093556001600160a01b0388166000908152600f60209081526040808320958a015486546001818101895597855283852001558b83526010825290912086518154941693909216929092178155908401518493919261240e92908401919061380c565b5060408201516002820180546060850151608086015161ffff16620100000263ffff00001960ff9283166101000261ffff199094169290951691909117919091179290921691909117905560a08201518051612474916003840191602090910190613a58565b5060c0820151805161249091600484019160209091019061389f565b5050604080516101c08101909152845460ff808216835260009350869160208401916101009091041660038111156124ca576124ca613d6b565b60038111156124db576124db613d6b565b8152815460209091019062010000900460ff16600c8111156124ff576124ff613d6b565b600c81111561251057612510613d6b565b815260408051610120810191829052602090920191906001840190600990826000855b825461010083900a900460ff1681526020600192830181810494850194909303909202910180841161253357905050505050508152602001600282018054806020026020016040519081016040528092919081815260200182805480156125d757602002820191906000526020600020906000905b825461010083900a900460ff168152602060019283018181049485019490930390920291018084116125a85790505b5050509183525050600382015461ffff8082166020840152620100008204811660408401526401000000009091041660608201526004808301546080830152600583015460a0830152600683015460c0830152600783015460e083015260088301546101008301526009909201546101209091015285015490915061265c90866131b3565b61266c828460000151838861331a565b857fdc1dda0cf54208fd9e79bd79cf307bd77513a34429e54c94e91619dd58883fd38360000151846020015185606001518660a001518760c00151426040516126ba969594939291906157ac565b60405180910390a250505050505080806126d390614c61565b915050611f30565b6126e3613987565b6000828152601060209081526040808320815160e081018352815461ffff168152825161012081019384905290949193850192909160018501916009918390855b825461010083900a900460ff1681526020600192830181810494850194909303909202910180841161272457505050928452505050600282015460ff80821660208085019190915261010083049091166040808501919091526201000090920461ffff166060840152600384018054835181840281018401909452808452608090940193909183018282801561280157602002820191906000526020600020906000905b82829054906101000a900461ffff1661ffff16815260200190600201906020826001010492830192600103820291508084116127c85790505b505050505081526020016004820180548060200260200160405190810160405280929190818152602001828054801561287757602002820191906000526020600020906000905b825461010083900a900460ff168152602060019283018181049485019490930390920291018084116128485790505b5050505050815250509050919050565b60006001600160a01b03871630146128b1576040516282b42960e81b815260040160405180910390fd5b5063f23a6e6160e01b9695505050505050565b6001546001600160a01b031633146128ee5760405162461bcd60e51b81526004016105cb906144b1565b6001600160a01b0381166129535760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016105cb565b61295c81612a2f565b50565b612967613905565b60005b6001600160a01b0384166000908152600f60205260409020548110156112c5576001600160a01b0384166000908152600f602052604081208054839081106129b4576129b4614563565b90600052602060002001549050838103612a1c576001600160a01b0385166000908152600d6020908152604080832084845282529182902082516101c08101909352805460ff8082168552919284019161010090910416600381111561112757611127613d6b565b5080612a2781614c61565b91505061296a565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b612a89613987565b612ab46040518060800160405280600081526020016000815260200160008152602001606081525090565b60058054908701546040516306814e3960e31b815261ffff90911660048201526000916001600160a01b03169063340a71c890602401600060405180830381865afa158015612b07573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052612b2f91908101906158eb565b805190925061ffff1615905080612b4c5750602081015161ffff16155b80612b5d5750604081015161ffff16155b15612b7e576040516328d7be8d60e11b8152600660048201526024016105cb565b805160208301805161ffff909216909101905280600160200201516040838101805161ffff93841601905282810151845192169091018352600a5460068054908a0154925163a3df934f60e01b815260048101939093526001600160a01b0391821692636a29d81e929091169063a3df934f9060240160e060405180830381865afa158015612c11573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c359190614917565b846040518363ffffffff1660e01b8152600401612c539291906159cb565b600060405180830381865afa158015612c70573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052612c989190810190615a8d565b600a54885460405163125ec29360e21b81529294506001600160a01b039091169163497b0a4c91612cdc9160018c019162010000900460ff16908790600401615ac1565b600060405180830381865afa158015612cf9573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052612d219190810190615a8d565b9150612d2b613987565b600a546040805163dc5fa7ab60e01b815290516000926001600160a01b03169163dc5fa7ab9160048083019260209291908290030181865afa158015612d75573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d999190615afb565b61ffff16905087516001600160401b03811115612db857612db861414b565b604051908082528060200260200182016040528015612de1578160200160208202803683370190505b5060c083015287516001600160401b03811115612e0057612e0061414b565b604051908082528060200260200182016040528015612e29578160200160208202803683370190505b5060a0830152600a54895460405163ad3d117960e01b81526001600160a01b039092169163ad3d117991612e6b9161010090910460ff16908890600401615b18565b600060405180830381865afa158015612e88573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052612eb09190810190615a8d565b935060005b88518110156131a5576000898281518110612ed257612ed2614563565b602002602001015160ff166003811115612eee57612eee613d6b565b90506000816003811115612f0457612f04613d6b565b1480612f175750836060015160ff166064145b15612f31575060808301805160010161ffff16905261319d565b60048b015460405172494e544552414354494f4e5f524553554c545f60681b602082015260338101849052605f60f81b6053820152605481019190915260740160408051601f1981840301815291905260608701526003546000906001600160a01b031663691712338b612fa58c80615b3a565b87818110612fb557612fb5614563565b905060200201358c8060200190612fcc9190615b3a565b88818110612fdc57612fdc614563565b905060200201358d8060400190612ff39190615b3a565b8981811061300357613003614563565b905060200201358e806060019061301a9190615b3a565b8a81811061302a5761302a614563565b905060200201358f80608001906130419190615b3a565b8b81811061305157613051614563565b90506020028101906130639190615b83565b8f6060015160008e6040518b63ffffffff1660e01b81526004016130909a99989796959493929190615bc9565b602060405180830381865afa1580156130ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130d19190615c33565b9050600a60009054906101000a90046001600160a01b03166001600160a01b0316636a3f1e1282878f8b878f8a6040518863ffffffff1660e01b81526004016131209796959493929190615c4c565b600060405180830381865afa15801561313d573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526131659190810190615d76565b8098508196505050808560a00151848151811061318457613184614563565b602002602001019061ffff16908161ffff168152505050505b600101612eb5565b509098975050505050505050565b6001600160a01b0381166000908152600e60205260408120905b815481101561327d57838282815481106131e9576131e9614563565b90600052602060002001540361326b578154829061320990600190614d6c565b8154811061321957613219614563565b906000526020600020015482828154811061323657613236614563565b90600052602060002001819055508180548061325457613254615e88565b600190038181906000526020600020016000905590555b8061327581614c61565b9150506131cd565b50600083815260116020908152604080832080546001600160a01b03191690556001600160a01b0385168352600c82528083208684529091528120805462ffffff1916815560018101829055906132d86002830160006137e7565b5060038101805465ffffffffffff1916905560006004820181905560058201819055600682018190556007820181905560088201819055600990910155505050565b600b548451604051632769c3d960e11b81526001600160a01b0390921691634ed387b29161334e9185918891600401615e9e565b600060405180830381600087803b15801561336857600080fd5b505af115801561337c573d6000803e3d6000fd5b505060048054610120860151604051632142170760e11b81526001600160a01b0390921694506342842e0e93506133b892309287929101614c8d565b600060405180830381600087803b1580156133d257600080fd5b505af11580156133e6573d6000803e3d6000fd5b50505050606084015160ff16156134765760065461014083015160608601516001600160a01b0390921691639a55583991600091613425906064615ecf565b6040518463ffffffff1660e01b815260040161344393929190615ef2565b600060405180830381600087803b15801561345d57600080fd5b505af1158015613471573d6000803e3d6000fd5b505050505b600654610140830151604051632142170760e11b81526001600160a01b03909216916342842e0e916134ae9130918691600401614c8d565b600060405180830381600087803b1580156134c857600080fd5b505af11580156134dc573d6000803e3d6000fd5b5050505060005b60098110156136b15760008560200151826009811061350457613504614563565b602002015160ff1611156135b05760075460208601516001600160a01b039091169063f5298aca9030908490816009811061354157613541614563565b60200201516040516001600160e01b031960e086901b1681526001600160a01b039093166004840152602483019190915260ff166044820152606401600060405180830381600087803b15801561359757600080fd5b505af11580156135ab573d6000803e3d6000fd5b505050505b846020015181600981106135c6576135c6614563565b602002015160ff16836060015182600981106135e4576135e4614563565b602002015160ff16111561369f5760075460208601516001600160a01b039091169063f242432a90309085908590816009811061362357613623614563565b60200201518860600151876009811061363e5761363e614563565b602002015161364d9190615ecf565b6040518563ffffffff1660e01b815260040161366c9493929190614cb1565b600060405180830381600087803b15801561368657600080fd5b505af115801561369a573d6000803e3d6000fd5b505050505b806136a981614c61565b9150506134e3565b5060008260400151600c8111156136ca576136ca613d6b565b146137525760085460408301516001600160a01b039091169063f242432a9030908490600c8111156136fe576136fe613d6b565b60016040518563ffffffff1660e01b815260040161371f9493929190614ceb565b600060405180830381600087803b15801561373957600080fd5b505af115801561374d573d6000803e3d6000fd5b505050505b600254610100830151604051630852cd8d60e31b81526001600160a01b03909216916342966c689161378a9160040190815260200190565b600060405180830381600087803b1580156137a457600080fd5b505af11580156137b8573d6000803e3d6000fd5b5050505050505050565b50805460008255600f01601090049060005260206000209081019061295c9190613aef565b50805460008255601f01602090049060005260206000209081019061295c9190613aef565b60018301918390821561388f5791602002820160005b8382111561386057835183826101000a81548160ff021916908360ff1602179055509260200192600101602081600001049283019260010302613822565b801561388d5782816101000a81549060ff0219169055600101602081600001049283019260010302613860565b505b5061389b929150613aef565b5090565b82805482825590600052602060002090601f0160209004810192821561388f5791602002820160008382111561386057835183826101000a81548160ff021916908360ff1602179055509260200192600101602081600001049283019260010302613822565b604080516101c081019091526000808252602082019081526020016000815260200161392f613b04565b815260200160608152602001600061ffff168152602001600061ffff168152602001600061ffff1681526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b6040518060e00160405280600061ffff1681526020016139a5613b04565b8152602001600060ff168152602001600060ff168152602001600061ffff16815260200160608152602001606081525090565b60018301918390821561388f5791601f016020900482015b8281111561388f5782548255916001019190600101906139f0565b82805482825590600052602060002090601f0160209004810192821561388f57600052602060002091601f016020900482018281111561388f5782548255916001019190600101906139f0565b82805482825590600052602060002090600f0160109004810192821561388f5791602002820160005b83821115613ac157835183826101000a81548161ffff021916908361ffff1602179055509260200192600201602081600101049283019260010302613a81565b801561388d5782816101000a81549061ffff0219169055600201602081600101049283019260010302613ac1565b5b8082111561389b5760008155600101613af0565b6040518061012001604052806009906020820280368337509192915050565b600060208284031215613b3557600080fd5b81356001600160e01b031981168114613b4d57600080fd5b9392505050565b6001600160a01b038116811461295c57600080fd5b60008083601f840112613b7b57600080fd5b5081356001600160401b03811115613b9257600080fd5b602083019150836020828501011115613baa57600080fd5b9250929050565b600080600080600060808688031215613bc957600080fd5b8535613bd481613b54565b94506020860135613be481613b54565b93506040860135925060608601356001600160401b03811115613c0657600080fd5b613c1288828901613b69565b969995985093965092949392505050565b600060208284031215613c3557600080fd5b5035919050565b600080600060408486031215613c5157600080fd5b8335613c5c81613b54565b925060208401356001600160401b03811115613c7757600080fd5b613c8386828701613b69565b9497909650939450505050565b60008083601f840112613ca257600080fd5b5081356001600160401b03811115613cb957600080fd5b6020830191508360208260051b8501011115613baa57600080fd5b60008060008060408587031215613cea57600080fd5b84356001600160401b0380821115613d0157600080fd5b613d0d88838901613c90565b90965094506020870135915080821115613d2657600080fd5b50613d3387828801613c90565b95989497509550505050565b60008060408385031215613d5257600080fd5b8235613d5d81613b54565b946020939093013593505050565b634e487b7160e01b600052602160045260246000fd5b6004811061295c5761295c613d6b565b613d9a81613d81565b9052565b600d8110613d9a57613d9a613d6b565b8060005b6009811015613dd457815160ff16845260209384019390910190600101613db2565b50505050565b600081518084526020808501945080840160005b83811015613e0d57815160ff1687529582019590820190600101613dee565b509495945050505050565b805160ff16825260006102c06020830151613e366020860182613d91565b506040830151613e496040860182613d9e565b506060830151613e5c6060860182613dae565b5060808301516101808281870152613e7683870183613dda565b925060a085015191506101a0613e918188018461ffff169052565b60c086015161ffff9081166101c089015260e0870151166101e088015261010086015161020088015261012086015161022088015261014086015161024088015261016086015161026088015290850151610280870152909301516102a0909401939093525090919050565b602081526000613b4d6020830184613e18565b600080600060608486031215613f2557600080fd5b8335613f3081613b54565b95602085013595506040909401359392505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015613f9a57603f19888603018452613f88858351613e18565b94509285019290850190600101613f6c565b5092979650505050505050565b60008060408385031215613fba57600080fd5b8235613fc581613b54565b915060208301358015158114613fda57600080fd5b809150509250929050565b60ff8116811461295c57600080fd5b8035613fff81613fe5565b919050565b6000806040838503121561401757600080fd5b823561402281613b54565b91506020830135613fda81613fe5565b6000806040838503121561404557600080fd5b8235915060208301356001600160401b0381111561406257600080fd5b830160a08186031215613fda57600080fd5b600081518084526020808501945080840160005b83811015613e0d57815161ffff1687529582019590820190600101614088565b60006101e061ffff835116845260208301516140c76020860182613dae565b5060ff60408401511661014085015260608301516140eb61016086018260ff169052565b50608083015161ffff1661018085015260a08301516101a0850182905261411482860182614074565b91505060c08301518482036101c086015261412f8282613dda565b95945050505050565b602081526000613b4d60208301846140a8565b634e487b7160e01b600052604160045260246000fd5b6040516101c081016001600160401b03811182821017156141845761418461414b565b60405290565b60405160a081016001600160401b03811182821017156141845761418461414b565b60405160c081016001600160401b03811182821017156141845761418461414b565b60405160e081016001600160401b03811182821017156141845761418461414b565b60405161012081016001600160401b03811182821017156141845761418461414b565b60405161010081016001600160401b03811182821017156141845761418461414b565b604051601f8201601f191681016001600160401b038111828210171561425e5761425e61414b565b604052919050565b60006001600160401b0382111561427f5761427f61414b565b5060051b60200190565b600082601f83011261429a57600080fd5b813560206142af6142aa83614266565b614236565b82815260059290921b840181019181810190868411156142ce57600080fd5b8286015b848110156142e957803583529183019183016142d2565b509695505050505050565b60006001600160401b0382111561430d5761430d61414b565b50601f01601f191660200190565b600082601f83011261432c57600080fd5b813561433a6142aa826142f4565b81815284602083860101111561434f57600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a0868803121561438457600080fd5b853561438f81613b54565b9450602086013561439f81613b54565b935060408601356001600160401b03808211156143bb57600080fd5b6143c789838a01614289565b945060608801359150808211156143dd57600080fd5b6143e989838a01614289565b935060808801359150808211156143ff57600080fd5b5061440c8882890161431b565b9150509295509295909350565b60008060008060008060a0878903121561443257600080fd5b863561443d81613b54565b9550602087013561444d81613b54565b9450604087013593506060870135925060808701356001600160401b0381111561447657600080fd5b61448289828a01613b69565b979a9699509497509295939492505050565b6000602082840312156144a657600080fd5b8135613b4d81613b54565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b8183823760009101908152919050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6020815260006145336020830184866144f6565b949350505050565b8051613fff81613fe5565b60006020828403121561455857600080fd5b8151613b4d81613fe5565b634e487b7160e01b600052603260045260246000fd5b600082356102be1983360301811261459057600080fd5b9190910192915050565b6004811061295c57600080fd5b8035613fff8161459a565b8035600d8110613fff57600080fd5b600082601f8301126145d257600080fd5b6145da6141f0565b806101208401858111156145ed57600080fd5b845b8181101561461057803561460281613fe5565b8452602093840193016145ef565b509095945050505050565b600082601f83011261462c57600080fd5b8135602061463c6142aa83614266565b82815260059290921b8401810191818101908684111561465b57600080fd5b8286015b848110156142e957803561467281613fe5565b835291830191830161465f565b61ffff8116811461295c57600080fd5b8035613fff8161467f565b60006102c082360312156146ad57600080fd5b6146b5614161565b6146be83613ff4565b81526146cc602084016145a7565b60208201526146dd604084016145b2565b60408201526146ef36606085016145c1565b6060820152610180808401356001600160401b0381111561470f57600080fd5b61471b3682870161461b565b6080840152506101a061472f81860161468f565b60a08401526147416101c0860161468f565b60c08401526147536101e0860161468f565b60e0840152610200850135610100840152610220850135610120840152610240850135610140840152610260850135610160840152610280850135828401526102a085013581840152505080915050919050565b60008235609e1983360301811261459057600080fd5b600082601f8301126147ce57600080fd5b813560206147de6142aa83614266565b82815260059290921b840181019181810190868411156147fd57600080fd5b8286015b848110156142e95780356001600160401b038111156148205760008081fd5b61482e8986838b010161431b565b845250918301918301614801565b600060a0823603121561484e57600080fd5b61485661418a565b82356001600160401b038082111561486d57600080fd5b61487936838701614289565b8352602085013591508082111561488f57600080fd5b61489b36838701614289565b602084015260408501359150808211156148b457600080fd5b6148c036838701614289565b604084015260608501359150808211156148d957600080fd5b6148e536838701614289565b606084015260808501359150808211156148fe57600080fd5b5061490b368286016147bd565b60808301525092915050565b600060e0828403121561492957600080fd5b82601f83011261493857600080fd5b60405160e081018181106001600160401b038211171561495a5761495a61414b565b6040528060e084018581111561496f57600080fd5b845b8181101561499257805161498481613fe5565b835260209283019201614971565b509195945050505050565b600081518084526020808501945080840160005b83811015613e0d578151875295820195908201906001016149b1565b60005b838110156149e85781810151838201526020016149d0565b83811115613dd45750506000910152565b60008151808452614a118160208601602086016149cd565b601f01601f19169290920160200192915050565b604081526000835160a06040840152614a4160e084018261499d565b9050602080860151603f1980868503016060870152614a60848361499d565b93506040880151915080868503016080870152614a7d848361499d565b935060608801519150808685030160a0870152614a9a848361499d565b608089015187820390920160c08801528151808252909450908301915082840190600581901b8501840160005b82811015614af557601f19878303018452614ae38286516149f9565b94860194938601939150600101614ac7565b5093909601969096525095945050505050565b8051613fff8161467f565b600082601f830112614b2457600080fd5b81516020614b346142aa83614266565b82815260059290921b84018101918181019086841115614b5357600080fd5b8286015b848110156142e9578051614b6a81613fe5565b8352918301918301614b57565b600060208284031215614b8957600080fd5b81516001600160401b0380821115614ba057600080fd5b9083019060c08286031215614bb457600080fd5b614bbc6141ac565b8251614bc78161459a565b81526020830151614bd781613fe5565b60208201526040830151614bea8161467f565b6040820152606083015182811115614c0157600080fd5b614c0d87828601614b13565b6060830152506080830151608082015260a083015160a082015280935050505092915050565b634e487b7160e01b600052601160045260246000fd5b60008219821115614c5c57614c5c614c33565b500190565b600060018201614c7357614c73614c33565b5060010190565b60208101614c8783613d81565b91905290565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b039485168152929093166020830152604082015260ff909116606082015260a06080820181905260009082015260c00190565b6001600160a01b0394851681529290931660208301526040820152606081019190915260a06080820181905260009082015260c00190565b6101608101614d328286613dae565b614d40610120830185613d9e565b82610140830152949350505050565b600060208284031215614d6157600080fd5b8151613b4d81613b54565b600082821015614d7e57614d7e614c33565b500390565b600082614da057634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615614dbf57614dbf614c33565b500290565b600061ffff80831681851681830481118215151615614de557614de5614c33565b02949350505050565b6000808335601e19843603018112614e0557600080fd5b83016020810192503590506001600160401b03811115614e2457600080fd5b8060051b3603831315613baa57600080fd5b81835260006001600160fb1b03831115614e4f57600080fd5b8260051b8083602087013760009401602001938452509192915050565b6000614e788283614dee565b60a08552614e8a60a086018284614e36565b9150506020614e9b81850185614dee565b86840383880152614ead848284614e36565b93505050614ebe6040850185614dee565b8684036040880152614ed1848284614e36565b93505050614ee26060850185614dee565b8684036060880152614ef5848284614e36565b93505050614f066080850185614dee565b8684036080880152808452828401600582901b850184018360005b84811015614f8f57878303601f19018452813536879003601e19018112614f4757600080fd5b860180356001600160401b03811115614f5f57600080fd5b803603881315614f6e57600080fd5b614f7b85828b85016144f6565b958901959450505090860190600101614f21565b50909998505050505050505050565b805460ff8082168452600882901c81166020850152601082901c81166040850152601882901c81166060850152614fdf60808501828460201c1660ff169052565b614ff360a08501828460281c1660ff169052565b61500760c08501828460301c1660ff169052565b61501b60e08501828460381c1660ff169052565b613dd46101008501828460401c1660ff169052565b805480835260008281526020808220940193909190825b82601f820110156152ce57815460ff80821688526020615070818a01838560081c1660ff169052565b6040615085818b01848660101c1660ff169052565b606061509a818c01858760181c1660ff169052565b60806150ae818d018688871c1660ff169052565b60a093506150c5848d01868860281c1660ff169052565b60c06150da818e01878960301c1660ff169052565b60e06150ef818f01888a60381c1660ff169052565b60ff88861c8816166101008f01526151126101208f01888a60481c1660ff169052565b6151276101408f01888a60501c1660ff169052565b61513c6101608f01888a60581c1660ff169052565b60ff88851c8816166101808f015261515f6101a08f01888a60681c1660ff169052565b6151746101c08f01888a60701c1660ff169052565b6151896101e08f01888a60781c1660ff169052565b60ff88841c8816166102008f01526151ac6102208f01888a60881c1660ff169052565b6151c16102408f01888a60901c1660ff169052565b6151d66102608f01888a60981c1660ff169052565b60ff88871c8816166102808f01526151f96102a08f01888a60a81c1660ff169052565b61520e6102c08f01888a60b01c1660ff169052565b6152236102e08f01888a60b81c1660ff169052565b60ff88831c8816166103008f01526152466103208f01888a60c81c1660ff169052565b61525b6103408f01888a60d01c1660ff169052565b6152706103608f01888a60d81c1660ff169052565b60ff88821c8816166103808f01525050505050506152996103a08901828460e81c1660ff169052565b6152ae6103c08901828460f01c1660ff169052565b5060f81c6103e08701526104009095019460019190910190602001615047565b905490828110156152e95760ff821686526020909501946001015b828110156153055760ff600883901c1686526020909501946001015b828110156153215760ff601083901c1686526020909501946001015b8281101561533d5760ff601883901c1686526020909501946001015b8281101561535a57602082901c60ff168652602095909501946001015b828110156153765760ff602883901c1686526020909501946001015b828110156153925760ff603083901c1686526020909501946001015b828110156153ae5760ff603883901c1686526020909501946001015b828110156153ca5760ff604083901c1686526020909501946001015b828110156153e65760ff604883901c1686526020909501946001015b828110156154025760ff605083901c1686526020909501946001015b8281101561541e5760ff605883901c1686526020909501946001015b8281101561543a5760ff606083901c1686526020909501946001015b828110156154565760ff606883901c1686526020909501946001015b828110156154725760ff607083901c1686526020909501946001015b8281101561548e5760ff607883901c1686526020909501946001015b828110156154aa5760ff608083901c1686526020909501946001015b828110156154c65760ff608883901c1686526020909501946001015b828110156154e25760ff609083901c1686526020909501946001015b828110156154fe5760ff609883901c1686526020909501946001015b8281101561551a5760ff60a083901c1686526020909501946001015b828110156155365760ff60a883901c1686526020909501946001015b828110156155525760ff60b083901c1686526020909501946001015b8281101561556e5760ff60b883901c1686526020909501946001015b8281101561558a5760ff60c083901c1686526020909501946001015b828110156155a65760ff60c883901c1686526020909501946001015b828110156155c25760ff60d083901c1686526020909501946001015b828110156155de5760ff60d883901c1686526020909501946001015b828110156155fa5760ff60e083901c1686526020909501946001015b828110156156165760ff60e883901c1686526020909501946001015b828110156156325760ff60f083901c1686526020909501946001015b828110156156485760f882901c86526020860195505b5093949350505050565b805460ff811683526000906102c0906156746020860160ff8360081c16613d91565b6156876040860160ff8360101c16613d9e565b506156986060850160018501614f9e565b806101808501526156ae81850160028501615030565b600384015461ffff8082166101a0880152601082901c81166101c088015260209190911c166101e0860152600484015461020086015260058401546102208601526006840154610240860152600784015461026086015260088401546102808601526009909301546102a09094019390935250919050565b6060815260006157396060830186614e6c565b8281036020840152845161574c81613d81565b8082525060ff602086015116602082015261ffff6040860151166040820152606085015160c0606083015261578460c0830182613dda565b90506080860151608083015260a086015160a08301528381036040850152611e188186615652565b60006101c080830161ffff808b16855260206157ca8187018c613dae565b60ff8a166101408701526101608601939093528751918290526101e08501928089019260005b8181101561580e5784518416865294820194938201936001016157f0565b50505050508281036101808401526158268186613dda565b915050826101a0830152979650505050505050565b600082601f83011261584c57600080fd5b815161585a6142aa826142f4565b81815284602083860101111561586f57600080fd5b6145338260208301602087016149cd565b600082601f83011261589157600080fd5b604051606081018181106001600160401b03821117156158b3576158b361414b565b6040528060608401858111156158c857600080fd5b845b818110156149925780516158dd8161467f565b8352602092830192016158ca565b600080608083850312156158fe57600080fd5b82516001600160401b038082111561591557600080fd5b818501915085601f83011261592957600080fd5b615931614213565b8061010084018881111561594457600080fd5b845b818110156159795780518581111561595e5760008081fd5b61596a8b82890161583b565b85525060209384019301615946565b50508095505050505061598f8460208501615880565b90509250929050565b805182526020810151602083015260408101516040830152600060608201516080606085015261453360808501826149f9565b60006101008285835b60078110156159f657815160ff168352602092830192909101906001016159d4565b5050508060e084015261412f81840185615998565b600060808284031215615a1d57600080fd5b604051608081016001600160401b038282108183111715615a4057615a4061414b565b816040528293508451835260208501516020840152604085015160408401526060850151915080821115615a7357600080fd5b50615a808582860161583b565b6060830152505092915050565b600060208284031215615a9f57600080fd5b81516001600160401b03811115615ab557600080fd5b61453384828501615a0b565b6000610160615ad08387614f9e565b615ade610120840186613d9e565b80610140840152615af181840185615998565b9695505050505050565b600060208284031215615b0d57600080fd5b8151613b4d8161467f565b615b2183613d81565b8281526040602082015260006145336040830184615998565b6000808335601e19843603018112615b5157600080fd5b8301803591506001600160401b03821115615b6b57600080fd5b6020019150600581901b3603821315613baa57600080fd5b6000808335601e19843603018112615b9a57600080fd5b8301803591506001600160401b03821115615bb457600080fd5b602001915036819003821315613baa57600080fd5b600061012060018060a01b038d1683528b60208401528a60408401528960608401528860808401528060a0840152615c04818401888a6144f6565b905082810360c0840152615c1881876149f9565b60e08401959095525050610100015298975050505050505050565b600060208284031215615c4557600080fd5b5051919050565b87815260e060208201526000615c6560e08301896140a8565b8281036040840152615c778189615652565b90508281036060840152615c8b8188615998565b9050615c9686613d81565b85608084015282810360a0840152615cae8186614e6c565b9150508260c083015298975050505050505050565b600082601f830112615cd457600080fd5b615cdc6141f0565b80610120840185811115615cef57600080fd5b845b81811015614610578051615d0481613fe5565b845260209384019301615cf1565b600082601f830112615d2357600080fd5b81516020615d336142aa83614266565b82815260059290921b84018101918181019086841115615d5257600080fd5b8286015b848110156142e9578051615d698161467f565b8352918301918301615d56565b60008060408385031215615d8957600080fd5b82516001600160401b0380821115615da057600080fd5b908401906101e08287031215615db557600080fd5b615dbd6141ce565b615dc683614b08565b8152615dd58760208501615cc3565b6020820152615de7610140840161453b565b6040820152615df9610160840161453b565b6060820152615e0b6101808401614b08565b60808201526101a083015182811115615e2357600080fd5b615e2f88828601615d12565b60a0830152506101c083015182811115615e4857600080fd5b615e5488828601614b13565b60c0830152506020860151909450915080821115615e7157600080fd5b50615e7e85828601615a0b565b9150509250929050565b634e487b7160e01b600052603160045260246000fd5b6001600160a01b038416815260608101615eb784613d81565b83602083015261ffff83166040830152949350505050565b600060ff821660ff841680821015615ee957615ee9614c33565b90039392505050565b6060810160078510615f0657615f06613d6b565b938152602081019290925260ff166040909101529056fea164736f6c634300080d000a

Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.