Contract Overview
Balance:
0 AVAX

AVAX Value:
$0.00(@ $24.73/AVAX)

Token:
More Info
Tag:
Not Available. Update?

Contract Creators:
Contract Source Code Verified (Partial Match)
Contract Name:
CoqRing

Compiler Version
v0.8.20+commit.a1b79de6

Optimization Enabled:
Yes with 200 runs

Created At:
Mon, 15 Jan 2024 22:28:05 GMT
VRFCoordinatorV2Interface.sol
@chainlink
contracts
src
v0.8
interfaces
VRFCoordinatorV2Interface.sol


Contract ABI
[
  {
    "inputs": [
      {
        "internalType": "uint64",
        "name": "subscriptionId",
        "type": "uint64"
      },
      {
        "internalType": "address",
        "name": "_coq",
        "type": "address"
      },
      {
        "internalType": "address",
        "name": "_dikdik",
        "type": "address"
      },
      {
        "internalType": "address",
        "name": "_pepe",
        "type": "address"
      }
    ],
    "stateMutability": "nonpayable",
    "type": "constructor"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "have",
        "type": "address"
      },
      {
        "internalType": "address",
        "name": "want",
        "type": "address"
      }
    ],
    "name": "OnlyCoordinatorCanFulfill",
    "type": "error"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "internalType": "uint256",
        "name": "attackId",
        "type": "uint256"
      },
      {
        "components": [
          {
            "internalType": "uint8",
            "name": "attack",
            "type": "uint8"
          },
          {
            "internalType": "uint8",
            "name": "defense",
            "type": "uint8"
          },
          {
            "internalType": "uint8",
            "name": "successful",
            "type": "uint8"
          },
          {
            "internalType": "uint8",
            "name": "complete",
            "type": "uint8"
          },
          {
            "internalType": "uint256",
            "name": "attackerTokenId",
            "type": "uint256"
          },
          {
            "internalType": "uint256",
            "name": "defenderTokenId",
            "type": "uint256"
          },
          {
            "internalType": "uint256",
            "name": "stake",
            "type": "uint256"
          },
          {
            "internalType": "uint256",
            "name": "spoils",
            "type": "uint256"
          },
          {
            "internalType": "uint256",
            "name": "id",
            "type": "uint256"
          },
          {
            "internalType": "address",
            "name": "attackerOwner",
            "type": "address"
          },
          {
            "internalType": "address",
            "name": "defenderOwner",
            "type": "address"
          }
        ],
        "indexed": false,
        "internalType": "struct CoqRing.Attack",
        "name": "attack",
        "type": "tuple"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "spoils",
        "type": "uint256"
      }
    ],
    "name": "AttackCompleted",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "cooldown",
        "type": "uint256"
      }
    ],
    "name": "AttackCooldownSet",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "cost",
        "type": "uint256"
      }
    ],
    "name": "AttackCostSet",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": false,
        "internalType": "bool",
        "name": "paused",
        "type": "bool"
      }
    ],
    "name": "ContractPaused",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "cooldown",
        "type": "uint256"
      }
    ],
    "name": "DefenseCooldownSet",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "cost",
        "type": "uint256"
      }
    ],
    "name": "DefenseCostSet",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "bps",
        "type": "uint256"
      }
    ],
    "name": "FeeBpsSet",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "bps",
        "type": "uint256"
      }
    ],
    "name": "LossBpsSet",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "min",
        "type": "uint256"
      }
    ],
    "name": "MinDefendersSet",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "internalType": "uint256",
        "name": "attackId",
        "type": "uint256"
      },
      {
        "indexed": true,
        "internalType": "uint256",
        "name": "tokenId",
        "type": "uint256"
      },
      {
        "indexed": true,
        "internalType": "address",
        "name": "owner",
        "type": "address"
      },
      {
        "indexed": false,
        "internalType": "uint8",
        "name": "attack",
        "type": "uint8"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "timestamp",
        "type": "uint256"
      }
    ],
    "name": "NewAttack",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "internalType": "uint256",
        "name": "tokenId",
        "type": "uint256"
      },
      {
        "indexed": true,
        "internalType": "address",
        "name": "owner",
        "type": "address"
      },
      {
        "indexed": false,
        "internalType": "uint8",
        "name": "defense",
        "type": "uint8"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "timestamp",
        "type": "uint256"
      }
    ],
    "name": "NewDefender",
    "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": true,
        "internalType": "uint256",
        "name": "tokenId",
        "type": "uint256"
      },
      {
        "indexed": true,
        "internalType": "address",
        "name": "owner",
        "type": "address"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "stake",
        "type": "uint256"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "timestamp",
        "type": "uint256"
      }
    ],
    "name": "RemoveDefender",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "internalType": "uint256",
        "name": "tokenId",
        "type": "uint256"
      },
      {
        "indexed": true,
        "internalType": "address",
        "name": "owner",
        "type": "address"
      },
      {
        "indexed": false,
        "internalType": "uint8",
        "name": "defense",
        "type": "uint8"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "timestamp",
        "type": "uint256"
      }
    ],
    "name": "UpdateDefender",
    "type": "event"
  },
  {
    "inputs": [],
    "name": "BPS",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "COQ",
    "outputs": [
      {
        "internalType": "contract IERC20",
        "name": "",
        "type": "address"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "DIKDIKS",
    "outputs": [
      {
        "internalType": "contract IERC721",
        "name": "",
        "type": "address"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "PEPES",
    "outputs": [
      {
        "internalType": "contract IERC721",
        "name": "",
        "type": "address"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "_tokenId",
        "type": "uint256"
      },
      {
        "internalType": "uint8",
        "name": "_attack",
        "type": "uint8"
      }
    ],
    "name": "attack",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "attackCooldown",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "attackCost",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "attackCounter",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "attackFeeBps",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "name": "attackerToLastAttack",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "name": "attacks",
    "outputs": [
      {
        "internalType": "uint8",
        "name": "attack",
        "type": "uint8"
      },
      {
        "internalType": "uint8",
        "name": "defense",
        "type": "uint8"
      },
      {
        "internalType": "uint8",
        "name": "successful",
        "type": "uint8"
      },
      {
        "internalType": "uint8",
        "name": "complete",
        "type": "uint8"
      },
      {
        "internalType": "uint256",
        "name": "attackerTokenId",
        "type": "uint256"
      },
      {
        "internalType": "uint256",
        "name": "defenderTokenId",
        "type": "uint256"
      },
      {
        "internalType": "uint256",
        "name": "stake",
        "type": "uint256"
      },
      {
        "internalType": "uint256",
        "name": "spoils",
        "type": "uint256"
      },
      {
        "internalType": "uint256",
        "name": "id",
        "type": "uint256"
      },
      {
        "internalType": "address",
        "name": "attackerOwner",
        "type": "address"
      },
      {
        "internalType": "address",
        "name": "defenderOwner",
        "type": "address"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "_tokenId",
        "type": "uint256"
      }
    ],
    "name": "cooldownForAttacker",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "_tokenId",
        "type": "uint256"
      }
    ],
    "name": "cooldownForDefender",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "_tokenId",
        "type": "uint256"
      },
      {
        "internalType": "uint8",
        "name": "_defense",
        "type": "uint8"
      }
    ],
    "name": "defend",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "defenderStats",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "bang",
        "type": "uint256"
      },
      {
        "internalType": "uint256",
        "name": "smash",
        "type": "uint256"
      },
      {
        "internalType": "uint256",
        "name": "thrust",
        "type": "uint256"
      },
      {
        "internalType": "uint256",
        "name": "total",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "name": "defenderToIndex",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "name": "defenders",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "defenseCooldown",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "defenseCost",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "_contract",
        "type": "address"
      }
    ],
    "name": "emergencyWithdrawERC20",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "feeAddress",
    "outputs": [
      {
        "internalType": "address",
        "name": "",
        "type": "address"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "flipPaused",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "getAttacks",
    "outputs": [
      {
        "components": [
          {
            "internalType": "uint8",
            "name": "attack",
            "type": "uint8"
          },
          {
            "internalType": "uint8",
            "name": "defense",
            "type": "uint8"
          },
          {
            "internalType": "uint8",
            "name": "successful",
            "type": "uint8"
          },
          {
            "internalType": "uint8",
            "name": "complete",
            "type": "uint8"
          },
          {
            "internalType": "uint256",
            "name": "attackerTokenId",
            "type": "uint256"
          },
          {
            "internalType": "uint256",
            "name": "defenderTokenId",
            "type": "uint256"
          },
          {
            "internalType": "uint256",
            "name": "stake",
            "type": "uint256"
          },
          {
            "internalType": "uint256",
            "name": "spoils",
            "type": "uint256"
          },
          {
            "internalType": "uint256",
            "name": "id",
            "type": "uint256"
          },
          {
            "internalType": "address",
            "name": "attackerOwner",
            "type": "address"
          },
          {
            "internalType": "address",
            "name": "defenderOwner",
            "type": "address"
          }
        ],
        "internalType": "struct CoqRing.Attack[]",
        "name": "",
        "type": "tuple[]"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "getDefenders",
    "outputs": [
      {
        "internalType": "uint256[]",
        "name": "",
        "type": "uint256[]"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "lossFeeBps",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "_attackId",
        "type": "uint256"
      }
    ],
    "name": "manualTriggerVRF",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "minDefenders",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "owner",
    "outputs": [
      {
        "internalType": "address",
        "name": "",
        "type": "address"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "requestId",
        "type": "uint256"
      },
      {
        "internalType": "uint256[]",
        "name": "randomWords",
        "type": "uint256[]"
      }
    ],
    "name": "rawFulfillRandomWords",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "_tokenId",
        "type": "uint256"
      }
    ],
    "name": "removeDefender",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "renounceOwnership",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "name": "s_requestIdToAttack",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "_newAmount",
        "type": "uint256"
      }
    ],
    "name": "setAttackCooldown",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "_newAmount",
        "type": "uint256"
      }
    ],
    "name": "setAttackCost",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "_newAmount",
        "type": "uint256"
      }
    ],
    "name": "setAttackFeeBps",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint32",
        "name": "_newAmount",
        "type": "uint32"
      }
    ],
    "name": "setCallbackGasLimit",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "_newAmount",
        "type": "uint256"
      }
    ],
    "name": "setDefenseCooldown",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "_newAmount",
        "type": "uint256"
      }
    ],
    "name": "setDefenseCost",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "_newAddress",
        "type": "address"
      }
    ],
    "name": "setFeeAddress",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "bytes32",
        "name": "_newKeyHash",
        "type": "bytes32"
      }
    ],
    "name": "setKeyHash",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "_newAmount",
        "type": "uint256"
      }
    ],
    "name": "setLossFeeBps",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "_newAmount",
        "type": "uint256"
      }
    ],
    "name": "setMinDefenders",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "_newAddress",
        "type": "address"
      }
    ],
    "name": "setSub",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint64",
        "name": "_newAmount",
        "type": "uint64"
      }
    ],
    "name": "setSubId",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "stakeModifier",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "subscriptionAddress",
    "outputs": [
      {
        "internalType": "address",
        "name": "",
        "type": "address"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "name": "tokenIdToDefense",
    "outputs": [
      {
        "internalType": "uint8",
        "name": "defense",
        "type": "uint8"
      },
      {
        "internalType": "uint256",
        "name": "stake",
        "type": "uint256"
      },
      {
        "internalType": "uint256",
        "name": "stakeModifier",
        "type": "uint256"
      },
      {
        "internalType": "uint256",
        "name": "lastUpdate",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "newOwner",
        "type": "address"
      }
    ],
    "name": "transferOwnership",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "_tokenId",
        "type": "uint256"
      },
      {
        "internalType": "uint8",
        "name": "_defense",
        "type": "uint8"
      }
    ],
    "name": "updateDefense",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  }
]


Contract Creation Code
6101006040526003805473d5d517abe5cf79b7e95ec98db0f0277788aff6346001600160a01b0319918216179091556004805473c03b9483b53c5b000fa073d3c4549e0aee6e2e8e9083168117909155600580549092161781557f83250c5584ffa93feb6ee082981c5ebe484c865196750b39835ad4f13780435d600655600060078190556a084595161401484a0000006008556a0422ca8b0a00a425000000600955600a55600b556103e8600c556107d0600d55610384600e55610e10600f5560108054600160401b600160981b03191672010003000000010007a1200000000000000000179055348015620000f557600080fd5b506040516200316e3803806200316e8339810160408190526200011891620001fc565b6003546001600160a01b0316608052600160005562000137336200018d565b600354600280546001600160a01b0319166001600160a01b03928316179055601080546001600160401b039096166001600160401b03199096169590951790945591831660a052821660c0521660e05262000266565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b80516001600160a01b0381168114620001f757600080fd5b919050565b600080600080608085870312156200021357600080fd5b84516001600160401b03811681146200022b57600080fd5b93506200023b60208601620001df565b92506200024b60408601620001df565b91506200025b60608601620001df565b905092959194509250565b60805160a05160c05160e051612e81620002ed600039600081816105ca01526114d90152600081816105a301528181610ad901528181610f7201528181611b3f0152612068015260008181610453015281816110f2015281816116330152818161166b01528181611d4501526122210152600081816108a201526108e40152612e816000f3fe608060405234801561001057600080fd5b50600436106102bb5760003560e01c806394a3951b11610182578063c61b93b0116100e9578063d78b1d39116100a2578063eb1dc5991161007c578063eb1dc599146106ca578063ebec8a8a146106d3578063f2fde38b14610730578063f948afe51461074357600080fd5b8063d78b1d391461063b578063e2a14439146106b8578063e73961f5146106c157600080fd5b8063c61b93b01461059e578063c7d3a6e9146105c5578063c8728736146105ec578063cc724750146105f5578063cd0b7f1f14610608578063d175ae531461062857600080fd5b8063a4eb718c1161013b578063a4eb718c14610536578063a6bffefb14610549578063a78c55621461055c578063a830fd3a1461056f578063a91c176414610582578063ac117a7b1461059557600080fd5b806394a3951b146104c157806398544710146104ca5780639bc7e0a4146104dd5780639ebadbd2146104f05780639f3aa7f214610503578063a15032261461051657600080fd5b806351d6fc00116102265780637ee5eaf9116101df5780637ee5eaf91461041857806380b022641461044e5780638331485b146104755780638705fcd4146104885780638a3dffd11461049b5780638da5cb5b146104b057600080fd5b806351d6fc00146103a45780635647e2ee146103b757806356a83946146103d75780636e0e09d4146103ea578063715018a6146103fd5780637c5cfdc81461040557600080fd5b80632dce7443116102785780632dce74431461032f578063333171bb146103385780633e2831fe1461034057806340c442de146103535780634127535814610366578063508ca9f11461039157600080fd5b8063014fed0c146102c05780631d074caa146102de5780631f90e6e3146102f55780631fe543e314610308578063249d39e91461031d5780632631a7c614610326575b600080fd5b6102c8610756565b6040516102d59190612910565b60405180910390f35b6102e760085481565b6040519081526020016102d5565b6102e76103033660046129d9565b61083f565b61031b610316366004612a08565b610897565b005b6102e761271081565b6102e760075481565b6102e7600b5481565b61031b610924565b61031b61034e366004612ad2565b61096f565b61031b610361366004612b11565b6109bd565b600554610379906001600160a01b031681565b6040516001600160a01b0390911681526020016102d5565b600454610379906001600160a01b031681565b61031b6103b2366004612b2e565b610a68565b6102e76103c53660046129d9565b60126020526000908152604090205481565b6102e76103e53660046129d9565b610cc5565b61031b6103f83660046129d9565b610ce6565b61031b610ecb565b61031b610413366004612b2e565b610f01565b601754601854601954601a5461042e9392919084565b6040805194855260208501939093529183015260608201526080016102d5565b6103797f000000000000000000000000000000000000000000000000000000000000000081565b61031b610483366004612b11565b6111d4565b61031b610496366004612b11565b611220565b6104a361126c565b6040516102d59190612b64565b6001546001600160a01b0316610379565b6102e7600d5481565b61031b6104d83660046129d9565b6112c4565b61031b6104eb3660046129d9565b6112f3565b61031b6104fe3660046129d9565b611359565b61031b610511366004612b2e565b6113b8565b6102e76105243660046129d9565b60116020526000908152604090205481565b61031b610544366004612ba8565b611904565b61031b6105573660046129d9565b611959565b61031b61056a3660046129d9565b6119b8565b61031b61057d3660046129d9565b611a17565b6102e76105903660046129d9565b611a76565b6102e7600f5481565b6103797f000000000000000000000000000000000000000000000000000000000000000081565b6103797f000000000000000000000000000000000000000000000000000000000000000081565b6102e760095481565b61031b6106033660046129d9565b611af8565b6102e76106163660046129d9565b60136020526000908152604090205481565b61031b6106363660046129d9565b611db6565b61064e6106493660046129d9565b611e15565b6040805160ff9c8d1681529a8c1660208c0152988b16988a0198909852989095166060880152608087019390935260a086019190915260c085015260e08401526101008301526001600160a01b0392831661012083015291909116610140820152610160016102d5565b6102e7600a5481565b6102e7600e5481565b6102e7600c5481565b61070c6106e13660046129d9565b601460205260009081526040902080546001820154600283015460039093015460ff90921692909184565b6040805160ff909516855260208501939093529183015260608201526080016102d5565b61031b61073e366004612b11565b611e93565b61031b6107513660046129d9565b611f2e565b60606016805480602002602001604051908101604052809291908181526020016000905b82821015610836576000848152602090819020604080516101608101825260088602909201805460ff808216855261010080830482168688015262010000830482169486019490945263010000009091041660608401526001808201546080850152600282015460a0850152600382015460c0850152600482015460e085015260058201549284019290925260068101546001600160a01b0390811661012085015260079091015416610140830152908352909201910161077a565b50505050905090565b600e54600082815260126020526040812054909161085c91612be4565b421061086a57506000919050565b600e54600083815260126020526040902054429161088791612be4565b6108919190612bf7565b92915050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146109165760405163073e64fd60e21b81523360048201526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001660248201526044015b60405180910390fd5b6109208282611f8d565b5050565b6001546001600160a01b0316331461094e5760405162461bcd60e51b815260040161090d90612c0a565b6010805460ff60901b198116600160901b9182900460ff1615909102179055565b6001546001600160a01b031633146109995760405162461bcd60e51b815260040161090d90612c0a565b6010805467ffffffffffffffff191667ffffffffffffffff92909216919091179055565b6001546001600160a01b031633146109e75760405162461bcd60e51b815260040161090d90612c0a565b6040516370a0823160e01b815230600482015281906109209033906001600160a01b038416906370a0823190602401602060405180830381865afa158015610a33573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a579190612c3f565b6001600160a01b03841691906123b4565b600260005403610a8a5760405162461bcd60e51b815260040161090d90612c58565b6002600055601054600160901b900460ff1615610ab95760405162461bcd60e51b815260040161090d90612c8f565b6040516331a9108f60e11b81526004810183905233906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690636352211e90602401602060405180830381865afa158015610b20573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b449190612cb5565b6001600160a01b031614610b6a5760405162461bcd60e51b815260040161090d90612cd2565b60008160ff16118015610b80575060048160ff16105b610bbf5760405162461bcd60e51b815260206004820152601060248201526f496e76616c696420446566656e73652160801b604482015260640161090d565b60008281526014602052604081208054429260ff9091169003610c155760405162461bcd60e51b815260206004820152600e60248201526d4e6f7420646566656e64696e672160901b604482015260640161090d565b81600f548260030154610c289190612be4565b1115610c465760405162461bcd60e51b815260040161090d90612d09565b8054610c579060009060ff1661241c565b805460ff191660ff8416908117825560038201839055610c799060019061241c565b6040805160ff8516815260208101849052339186917f4f244acf461ac9692c5ad1f0349787470aafa2b2f704da10975a3c5e6440cb5b91015b60405180910390a3505060016000555050565b60158181548110610cd557600080fd5b600091825260209091200154905081565b6001546001600160a01b03163314610d105760405162461bcd60e51b815260040161090d90612c0a565b600060168281548110610d2557610d25612d35565b600091825260209182902060408051610160810182526008909302909101805460ff808216855261010080830482169686019690965262010000820481169385019390935263010000009004909116606083015260018101546080830152600281015460a0830152600381015460c0830152600481015460e083015260058101549282019290925260068201546001600160a01b039081166101208301526007928301541661014082015290546016805492935083929091908110610dec57610dec612d35565b60009182526020918290208351600892909202018054928401516040850151606086015160ff94851661ffff199096169590951761010092851683021763ffff00001916620100009185169190910263ff000000191617630100000093909416929092029290921782556080830151600183015560a0830151600283015560c0830151600383015560e0830151600483015582015160058201556101208201516006820180546001600160a01b03199081166001600160a01b0393841617909155610140909301516007909201805490931691161790556109206124e9565b6001546001600160a01b03163314610ef55760405162461bcd60e51b815260040161090d90612c0a565b610eff60006125d0565b565b600260005403610f235760405162461bcd60e51b815260040161090d90612c58565b6002600055601054600160901b900460ff1615610f525760405162461bcd60e51b815260040161090d90612c8f565b6040516331a9108f60e11b81526004810183905233906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690636352211e90602401602060405180830381865afa158015610fb9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fdd9190612cb5565b6001600160a01b0316146110035760405162461bcd60e51b815260040161090d90612cd2565b60008160ff16118015611019575060048160ff16105b6110585760405162461bcd60e51b815260206004820152601060248201526f496e76616c696420446566656e73652160801b604482015260640161090d565b6000828152601460205260409020805442919060ff16156110b05760405162461bcd60e51b8152602060048201526012602482015271416c726561647920646566656e64696e672160701b604482015260640161090d565b81600f5482600301546110c39190612be4565b11156110e15760405162461bcd60e51b815260040161090d90612d09565b60085461111c906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169033903090612622565b805460ff191660ff848116919091178255600854600180840191909155600a546002840155600383018490556015805460008881526013602052604081208290558184018355919091527f55f448fdea98c4d29eb340757ef0a66cd03dbb9538908a6a81d96026b71ec475018690558254611197921661241c565b6040805160ff8516815260208101849052339186917f40b88ce655b066c28c29858777e59db1f88063e15f50bce3fb23af2e8bf102929101610cb2565b6001546001600160a01b031633146111fe5760405162461bcd60e51b815260040161090d90612c0a565b600480546001600160a01b0319166001600160a01b0392909216919091179055565b6001546001600160a01b0316331461124a5760405162461bcd60e51b815260040161090d90612c0a565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b606060158054806020026020016040519081016040528092919081815260200182805480156112ba57602002820191906000526020600020905b8154815260200190600101908083116112a6575b5050505050905090565b6001546001600160a01b031633146112ee5760405162461bcd60e51b815260040161090d90612c0a565b600655565b6001546001600160a01b0316331461131d5760405162461bcd60e51b815260040161090d90612c0a565b600d8190556040518181527f4a257655023ba2dff6d5f51b8d2bfb4a7a2573c58e91f287469f8468c59a5484906020015b60405180910390a150565b6001546001600160a01b031633146113835760405162461bcd60e51b815260040161090d90612c0a565b60088190556040518181527fbac0585dc58aa3b9658625c57fbc09b5fa961386d7066793e5d58cbf3175a8b99060200161134e565b6002600054036113da5760405162461bcd60e51b815260040161090d90612c58565b6002600055601054600160901b900460ff16156114095760405162461bcd60e51b815260040161090d90612c8f565b600e54600083815260126020526040902054429182916114299190612be4565b111561146d5760405162461bcd60e51b8152602060048201526013602482015272436f6f6c646f776e206e6f742072656164792160681b604482015260640161090d565b600b5460155410156114b95760405162461bcd60e51b81526020600482015260156024820152744e6f7420656e6f75676820646566656e646572732160581b604482015260640161090d565b6040516331a9108f60e11b81526004810184905233906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690636352211e90602401602060405180830381865afa158015611520573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115449190612cb5565b6001600160a01b03161461159a5760405162461bcd60e51b815260206004820152601860248201527f596f7520646f6e2774206f776e20746861742070657065210000000000000000604482015260640161090d565b60008260ff161180156115b0575060048260ff16105b6115ee5760405162461bcd60e51b815260206004820152600f60248201526e496e76616c69642041747461636b2160881b604482015260640161090d565b6000612710600c546009546116039190612d4b565b61160d9190612d78565b905060008160095461161f9190612bf7565b60055490915061165e906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081169133911685612622565b6116936001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333084612622565b6040805161016081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e081018290526101008101829052610120810182905261014081019190915284816000019060ff16908160ff168152505085816080018181525050338161012001906001600160a01b031690816001600160a01b031681525050818160c001818152505060168054905081610100018181525050601681908060018154018082558091505060019003906000526020600020906008020160009091909190915060008201518160000160006101000a81548160ff021916908360ff16021790555060208201518160000160016101000a81548160ff021916908360ff16021790555060408201518160000160026101000a81548160ff021916908360ff16021790555060608201518160000160036101000a81548160ff021916908360ff1602179055506080820151816001015560a0820151816002015560c0820151816003015560e0820151816004015561010082015181600501556101208201518160060160006101000a8154816001600160a01b0302191690836001600160a01b031602179055506101408201518160070160006101000a8154816001600160a01b0302191690836001600160a01b031602179055505050836012600088815260200190815260200160002081905550336001600160a01b0316866007547fabe020aa9f94e711e089a7a05d2c4090713b36369c079f87681e3937dc81a11188886040516118e792919060ff929092168252602082015260400190565b60405180910390a46118f76124e9565b5050600160005550505050565b6001546001600160a01b0316331461192e5760405162461bcd60e51b815260040161090d90612c0a565b6010805463ffffffff909216600160401b026bffffffff000000000000000019909216919091179055565b6001546001600160a01b031633146119835760405162461bcd60e51b815260040161090d90612c0a565b600b8190556040518181527f1693a149ee0953d6698c54c1c3f1976d4519b99b5c65e9e6a4ad58d8beba4c019060200161134e565b6001546001600160a01b031633146119e25760405162461bcd60e51b815260040161090d90612c0a565b600f8190556040518181527fa3fc7c5328982e76dd095862a491245b550150adb236d0ef1a8d612f97cd430e9060200161134e565b6001546001600160a01b03163314611a415760405162461bcd60e51b815260040161090d90612c0a565b600c8190556040518181527f4f78c4ceb393a616bbd264a4584a9ad15d722042ce1e135e6a8380217f5cb42b9060200161134e565b60008181526014602090815260408083208151608081018352815460ff1681526001820154938101939093526002810154918301919091526003015460608201819052600f54611ac591612be4565b4210611ad45750600092915050565b42600f548260600151611ae79190612be4565b611af19190612bf7565b9392505050565b600260005403611b1a5760405162461bcd60e51b815260040161090d90612c58565b60026000556040516331a9108f60e11b81526004810182905233906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690636352211e90602401602060405180830381865afa158015611b86573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611baa9190612cb5565b6001600160a01b031614611bd05760405162461bcd60e51b815260040161090d90612cd2565b60008181526014602052604081208054429260ff9091169003611c265760405162461bcd60e51b815260206004820152600e60248201526d4e6f7420646566656e64696e672160901b604482015260640161090d565b81600f548260030154611c399190612be4565b1115611c575760405162461bcd60e51b815260040161090d90612d09565b60008160020154600a54611c6b9190612bf7565b8260010154611c7a9190612be4565b600085815260136020526040812054601580549394509092611c9e90600190612bf7565b81548110611cae57611cae612d35565b906000526020600020015490508060158381548110611ccf57611ccf612d35565b60009182526020808320909101929092558281526013909152604090208290556015805480611d0057611d00612d8c565b60008281526020812082016000199081018290559091019091558454611d29919060ff1661241c565b835460ff1916845560006001850155611d6c6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001633856123b4565b6040805184815260208101879052339188917f7e8507c0636825364699c1cd193d4a8b8f6b67ce0b3280eff4b9c90c8e16a89b910160405180910390a35050600160005550505050565b6001546001600160a01b03163314611de05760405162461bcd60e51b815260040161090d90612c0a565b600e8190556040518181527fb7e3cb6aaf053d67fcece3d9a1914ede14e7f9f0d608d4524c32dc7ea492552a9060200161134e565b60168181548110611e2557600080fd5b60009182526020909120600890910201805460018201546002830154600384015460048501546005860154600687015460079097015460ff80881699506101008804811698620100008904821698630100000090049091169695949392916001600160a01b0391821691168b565b6001546001600160a01b03163314611ebd5760405162461bcd60e51b815260040161090d90612c0a565b6001600160a01b038116611f225760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161090d565b611f2b816125d0565b50565b6001546001600160a01b03163314611f585760405162461bcd60e51b815260040161090d90612c0a565b60098190556040518181527f8e8f0b931f0bc49e57f15e6a004fbaadf2dd303ce43f8a0d3fc38ff6bfa1bb439060200161134e565b6000828152601160205260408120546016805491929183908110611fb357611fb3612d35565b90600052602060002090600802019050600080601580549050905060008186600081518110611fe457611fe4612d35565b6020026020010151611ff69190612da2565b905060006015828154811061200d5761200d612d35565b6000918252602080832091909101548083526014909152604091829020600288018290558054885460ff9091166101000261ff001990911617885591516331a9108f60e11b8152600481018290529092506001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690636352211e90602401602060405180830381865afa1580156120af573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120d39190612cb5565b6007870180546001600160a01b0319166001600160a01b0392909216919091179055855481546121099160ff9081169116612660565b156122515760008160020154600a546121229190612bf7565b82600101546121319190612be4565b905060006015612142600188612bf7565b8154811061215257612152612d35565b90600052602060002001549050806015868154811061217357612173612d35565b600091825260208083209091019290925582815260139091526040902085905560158054806121a4576121a4612d8c565b600082815260208120820160001990810182905590910190915583546121cd919060ff1661241c565b825460ff1916835560006001840155600a546002840155875463ffff00001916630101000017885560038801546122049083612be4565b60048901819055600689015490975061224a906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081169116896123b4565b50506122ec565b6000612710600d5488600301546122689190612d4b565b6122729190612d78565b905060006122808683612d78565b905080600a60008282546122949190612be4565b92505081905550808360020160008282546122af9190612be4565b90915550506003880154600184015483916122c991612be4565b6122d39190612bf7565b60018401555050855463ff000000191663010000001786555b60408051875460ff8082168352600882901c81166020840152601082901c81168385015260189190911c16606082015260018801546080820152600288015460a0820152600388015460c0820152600488015460e0820152600588015461010082015260068801546001600160a01b039081166101208301526007890154166101408201526101608101879052905188917f519e8ff8c337df7646950fbba305ba7b809754015628103d935bfa5a3ef6903991908190036101800190a2505050505050505050565b6040516001600160a01b03831660248201526044810182905261241790849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526126c6565b505050565b8060ff1660010361245657816124405760175461243b90600190612bf7565b61244e565b60175461244e906001612be4565b6017556124bb565b8060ff16600203612490578161247a5760185461247590600190612bf7565b612488565b601854612488906001612be4565b6018556124bb565b816124a9576019546124a490600190612bf7565b6124b7565b6019546124b7906001612be4565b6019555b816124d457601a546124cf90600190612bf7565b6124e2565b601a546124e2906001612be4565b601a555050565b6002546006546010546040516305d3b1d360e41b8152600481019290925267ffffffffffffffff8116602483015261ffff600160801b820416604483015263ffffffff600160401b820481166064840152600160601b9091041660848201526000916001600160a01b031690635d3b1d309060a4016020604051808303816000875af115801561257d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125a19190612c3f565b600780546000838152601160205260408120829055929350600192906125c8908490612be4565b909155505050565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6040516001600160a01b038085166024830152831660448201526064810182905261265a9085906323b872dd60e01b906084016123e0565b50505050565b60008260ff16600114801561267857508160ff166002145b8061269457508260ff16600214801561269457508160ff166003145b806126b057508260ff1660031480156126b057508160ff166001145b156126bd57506001610891565b50600092915050565b600061271b826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166127989092919063ffffffff16565b80519091501561241757808060200190518101906127399190612db6565b6124175760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161090d565b60606127a784846000856127af565b949350505050565b6060824710156128105760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161090d565b843b61285e5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161090d565b600080866001600160a01b0316858760405161287a9190612dfc565b60006040518083038185875af1925050503d80600081146128b7576040519150601f19603f3d011682016040523d82523d6000602084013e6128bc565b606091505b50915091506128cc8282866128d7565b979650505050505050565b606083156128e6575081611af1565b8251156128f65782518084602001fd5b8160405162461bcd60e51b815260040161090d9190612e18565b602080825282518282018190526000919060409081850190868401855b828110156129cc578151805160ff90811686528782015181168887015286820151811687870152606080830151909116908601526080808201519086015260a0808201519086015260c0808201519086015260e080820151908601526101008082015190860152610120808201516001600160a01b0390811691870191909152610140918201511690850152610160909301929085019060010161292d565b5091979650505050505050565b6000602082840312156129eb57600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b60008060408385031215612a1b57600080fd5b8235915060208084013567ffffffffffffffff80821115612a3b57600080fd5b818601915086601f830112612a4f57600080fd5b813581811115612a6157612a616129f2565b8060051b604051601f19603f83011681018181108582111715612a8657612a866129f2565b604052918252848201925083810185019189831115612aa457600080fd5b938501935b82851015612ac257843584529385019392850192612aa9565b8096505050505050509250929050565b600060208284031215612ae457600080fd5b813567ffffffffffffffff81168114611af157600080fd5b6001600160a01b0381168114611f2b57600080fd5b600060208284031215612b2357600080fd5b8135611af181612afc565b60008060408385031215612b4157600080fd5b82359150602083013560ff81168114612b5957600080fd5b809150509250929050565b6020808252825182820181905260009190848201906040850190845b81811015612b9c57835183529284019291840191600101612b80565b50909695505050505050565b600060208284031215612bba57600080fd5b813563ffffffff81168114611af157600080fd5b634e487b7160e01b600052601160045260246000fd5b8082018082111561089157610891612bce565b8181038181111561089157610891612bce565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060208284031215612c5157600080fd5b5051919050565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b6020808252600c908201526b47616d65205061757365642160a01b604082015260600190565b600060208284031215612cc757600080fd5b8151611af181612afc565b6020808252601a908201527f596f7520646f6e2774206f776e20746861742064696b64696b21000000000000604082015260600190565b602080825260129082015271436f6f6c646f776e206e6f7420726561647960701b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b808202811582820484141761089157610891612bce565b634e487b7160e01b600052601260045260246000fd5b600082612d8757612d87612d62565b500490565b634e487b7160e01b600052603160045260246000fd5b600082612db157612db1612d62565b500690565b600060208284031215612dc857600080fd5b81518015158114611af157600080fd5b60005b83811015612df3578181015183820152602001612ddb565b50506000910152565b60008251612e0e818460208701612dd8565b9190910192915050565b6020815260008251806020840152612e37816040850160208701612dd8565b601f01601f1916919091016040019291505056fea26469706673582212208c2b39ee5ac5dab6cfbb2a17fcf6587f4e140fc7c9366a138234338d7b8c64d464736f6c634300081400330000000000000000000000000000000000000000000000000000000000000014000000000000000000000000420fca0121dc28039145009570975747295f23290000000000000000000000008fe7eb2b9d26a73ea8c8234aacd0de81fcba50f500000000000000000000000040801889321743cd0dcb6e4c15eaa584b36564dc