diff --git a/frontend/.sentryclirc b/frontend/.sentryclirc new file mode 100644 index 00000000..49b50a9a --- /dev/null +++ b/frontend/.sentryclirc @@ -0,0 +1,3 @@ + +[auth] +token=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 diff --git a/frontend/src/components/molecules/EventTransferLock.tsx b/frontend/src/components/molecules/EventTransferLock.tsx new file mode 100644 index 00000000..ddf8bb73 --- /dev/null +++ b/frontend/src/components/molecules/EventTransferLock.tsx @@ -0,0 +1,102 @@ +import { Box, Button, Flex, Grid, Spinner, Text } from "@chakra-ui/react"; +import { BigNumber } from "ethers"; +import { FC, useEffect } from "react"; +import { useIsNonTransferable, useTransferLock } from "src/hooks/useMintNFT"; +import AlertMessage from "../atoms/form/AlertMessage"; +import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; +import { faLock, faLockOpen } from "@fortawesome/free-solid-svg-icons"; +import { useLocale } from "src/hooks/useLocale"; + +type Props = { + eventId: BigNumber; +}; + +const EventTransferLock: FC = ({ eventId }) => { + const { t } = useLocale(); + const { isNonTransferable, refetch, isLoading } = + useIsNonTransferable(eventId); + + const { + lock, + isLoading: isLocking, + error, + isSuccess, + status, + } = useTransferLock(eventId, !isNonTransferable); + + useEffect(() => { + refetch(); + }, [status]); + + return ( + <> + {t.EVENT_TRANSFERLOCK_SETTING} + + {t.EVENT_TRANSFERLOCK_SETTING_DESC} + + {isLoading ? ( + + ) : ( + + + + + + + + + {isNonTransferable + ? t.EVENT_ISNONTRANSFERABLE_TRUE + : t.EVENT_ISNONTRANSFERABLE_FALSE} + + + {isNonTransferable + ? t.EVENT_ISNONTRANSFERABLE_TRUE_DESC + : t.EVENT_ISNONTRANSFERABLE_FALSE_DESC} + + + + + + + )} + {error && ( + + {(error as any).reason} + + )} + + ); +}; + +export default EventTransferLock; diff --git a/frontend/src/components/organisms/CreateEventForm.tsx b/frontend/src/components/organisms/CreateEventForm.tsx index c81a07f4..e41fe8f2 100644 --- a/frontend/src/components/organisms/CreateEventForm.tsx +++ b/frontend/src/components/organisms/CreateEventForm.tsx @@ -52,6 +52,7 @@ export interface EventFormData { secretPhrase: string; mintLimit: number; useMtx: "true" | "false"; + nonTransferable: "true" | "false"; nfts: NFT.NFTImage[]; } @@ -89,7 +90,8 @@ const CreateEventForm: FC = ({ address }) => { endTime: "", secretPhrase: "", mintLimit: 10, - useMtx: undefined, + useMtx: "false", + nonTransferable: "false", nfts: [ { name: "", @@ -138,6 +140,7 @@ const CreateEventForm: FC = ({ address }) => { secretPhrase: formData.secretPhrase, mintLimit: Number(formData.mintLimit), useMtx: formData.useMtx === "true", + nonTransferable: formData.nonTransferable === "true", attributes: nftAttributes, }; await createEvent(params); @@ -191,7 +194,6 @@ const CreateEventForm: FC = ({ address }) => { ); if (foundEvent && copiedPastEventId) { const pastAttributeRecords = await copyPastAttribute(copiedPastEventId); - console.log(pastAttributeRecords); setValue("eventName", foundEvent.name); setValue("description", foundEvent.description); @@ -557,7 +559,7 @@ const CreateEventForm: FC = ({ address }) => { formState: { errors }, }) => ( <> - + {t.EVENT_USE_MTX_FALSE} @@ -579,6 +581,38 @@ const CreateEventForm: FC = ({ address }) => { )} + + {t.EVENT_USE_NTT} + + + {t.EVENT_USE_NTT_DESC} + + + ( + <> + + + {t.EVENT_USE_NTT_FALSE} + + {t.EVENT_USE_NTT_TRUE} + + + {errors.nonTransferable?.message} + + + )} + /> + + {t.EVENT_SECRETPHRASE} diff --git a/frontend/src/components/organisms/EventEditSection.tsx b/frontend/src/components/organisms/EventEditSection.tsx index 245af360..813351d5 100644 --- a/frontend/src/components/organisms/EventEditSection.tsx +++ b/frontend/src/components/organisms/EventEditSection.tsx @@ -3,6 +3,7 @@ import { FC, useMemo } from "react"; import { useCollaboratorAccessEventGroups } from "src/hooks/useEvent"; import { Event } from "types/Event"; import EventMintLock from "../molecules/EventMintLock"; +import EventTransferLock from "../molecules/EventTransferLock"; import ResetSecretPhrase from "../molecules/ResetSecretPhrase"; import { useLocale } from "src/hooks/useLocale"; import DropNFTs from "./nft/DropNFTs"; @@ -44,6 +45,10 @@ const EventEditSection: FC = ({ event }) => { + + + + diff --git a/frontend/src/contracts/EventManager.json b/frontend/src/contracts/EventManager.json index 4db0c47e..9ee05c85 100644 --- a/frontend/src/contracts/EventManager.json +++ b/frontend/src/contracts/EventManager.json @@ -105,6 +105,11 @@ "name": "_useMtx", "type": "bool" }, + { + "internalType": "bool", + "name": "_nonTransferable", + "type": "bool" + }, { "internalType": "bytes32", "name": "_secretPhrase", @@ -519,6 +524,30 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [ + { + "internalType": "address", + "name": "_address", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_eventId", + "type": "uint256" + } + ], + "name": "hasAdminAccessByEventId", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -693,8 +722,8 @@ "type": "function" } ], - "bytecode": "0x608060405234801561001057600080fd5b5061311b806100206000396000f3fe6080604052600436106101405760003560e01c80638da5cb5b116100b6578063cb8668ea1161006f578063cb8668ea14610399578063d96c2c3a1461044f578063dc2ddcae1461046d578063f2fde38b1461048d578063f5620823146104ad578063f926b50c146104cd57600080fd5b80638da5cb5b146102bf5780638f184bea146102e7578063972f1327146103075780639e3d87cd14610337578063b98079bc14610357578063c72b51761461038457600080fd5b8063398121a611610108578063398121a61461020a578063471ade98146102375780636b1f762214610257578063715018a61461027757806374c4b95d1461028c5780638be103371461029f57600080fd5b80630422cb161461014557806308fb5eb21461017b5780631ac30e631461019d578063331e36ea146101bd57806337c81cd7146101ea575b600080fd5b34801561015157600080fd5b5061016561016036600461284a565b6104ed565b60405161017291906128b2565b60405180910390f35b34801561018757600080fd5b5061019b61019636600461284a565b610751565b005b3480156101a957600080fd5b5061019b6101b836600461284a565b6107e4565b3480156101c957600080fd5b506101dd6101d836600461293a565b610864565b6040516101729190612953565b3480156101f657600080fd5b5061019b61020536600461284a565b6109c5565b34801561021657600080fd5b5061022a6102253660046129c2565b610a45565b6040516101729190612a59565b34801561024357600080fd5b5061019b610252366004612abb565b610de8565b34801561026357600080fd5b5061019b61027236600461293a565b6110b3565b34801561028357600080fd5b5061019b6110c0565b61019b61029a366004612cbf565b6110d4565b3480156102ab57600080fd5b5061019b6102ba366004612abb565b61152b565b3480156102cb57600080fd5b506033546040516001600160a01b039091168152602001610172565b3480156102f357600080fd5b5061016561030236600461284a565b6116d1565b34801561031357600080fd5b50610327610322366004612d99565b6118d0565b6040519015158152602001610172565b34801561034357600080fd5b5061019b610352366004612dc3565b6118f1565b34801561036357600080fd5b5061037761037236600461293a565b611a41565b6040516101729190612e09565b34801561039057600080fd5b50610165611c69565b3480156103a557600080fd5b506104426103b4366004612e1c565b604080516060808201835260008083526020808401829052928401819052835191820184526001600160a01b0394909416808252948452607182528284209484529381528183206000805160206130c683398151915284528082528284205460ff9081161515868401526000805160206130a683398151915285529152918190205490911615159082015290565b6040516101729190612e48565b34801561045b57600080fd5b50606854604051908152602001610172565b34801561047957600080fd5b5061019b610488366004612e76565b611dd3565b34801561049957600080fd5b5061019b6104a836600461284a565b611fc7565b3480156104b957600080fd5b5061022a6104c836600461293a565b612040565b3480156104d957600080fd5b5061019b6104e836600461293a565b612338565b6067546060906000906001600160401b0381111561050d5761050d612af0565b604051908082528060200260200182016040528015610536578160200160208202803683370190505b509050600060015b6067548111610594576105518186612384565b15610582578083838151811061056957610569612eaa565b60209081029190910101528161057e81612ed6565b9250505b8061058c81612ed6565b91505061053e565b506000816001600160401b038111156105af576105af612af0565b6040519080825280602002602001820160405280156105e857816020015b6105d5612733565b8152602001906001900390816105cd5790505b50905060005b82811015610748576000600185838151811061060c5761060c612eaa565b602002602001015161061e9190612ef1565b90506067818154811061063357610633612eaa565b9060005260206000209060030201604051806060016040529081600082015481526020016001820160009054906101000a90046001600160a01b03166001600160a01b03166001600160a01b0316815260200160028201805461069590612f08565b80601f01602080910402602001604051908101604052809291908181526020018280546106c190612f08565b801561070e5780601f106106e35761010080835404028352916020019161070e565b820191906000526020600020905b8154815290600101906020018083116106f157829003601f168201915b50505050508152505083838151811061072957610729612eaa565b602002602001018190525050808061074090612ed6565b9150506105ee565b50949350505050565b610759612405565b6001600160a01b0381166107c25760405162461bcd60e51b815260206004820152602560248201527f6f7065726174696f6e20636f6e74726f6c6c6572206164647265737320697320604482015264626c616e6b60d81b60648201526084015b60405180910390fd5b607080546001600160a01b0319166001600160a01b0392909216919091179055565b6107ec612405565b6001600160a01b0381166108425760405162461bcd60e51b815260206004820152601960248201527f6d696e74206e6674206164647265737320697320626c616e6b0000000000000060448201526064016107b9565b606c80546001600160a01b0319166001600160a01b0392909216919091179055565b600081815260726020526040812054606091816001600160401b0381111561088e5761088e612af0565b6040519080825280602002602001820160405280156108d957816020015b60408051606081018252600080825260208083018290529282015282526000199092019101816108ac5790505b50905060005b828110156109bd57600085815260726020526040812080548390811061090757610907612eaa565b6000918252602080832090910154604080516060810182526001600160a01b039092168083528a85526071845281852081865284528185206000805160206130c683398151915286528085528286205460ff9081161515858701526000805160206130a683398151915287529452938190205490921615159181019190915284519192509084908490811061099e5761099e612eaa565b60200260200101819052505080806109b590612ed6565b9150506108df565b509392505050565b6109cd612405565b6001600160a01b038116610a235760405162461bcd60e51b815260206004820152601860248201527f72656c61796572206164647265737320697320626c616e6b000000000000000060448201526064016107b9565b606d80546001600160a01b0319166001600160a01b0392909216919091179055565b60685460609083610a5557606493505b6064841115610a9b5760405162461bcd60e51b81526020600482015260126024820152716c696d697420697320746f6f206c6172676560701b60448201526064016107b9565b80831115610ae15760405162461bcd60e51b81526020600482015260136024820152726f666673657420697320746f6f206c6172676560681b60448201526064016107b9565b80610aec8486612f43565b1115610aff57610afc8382612ef1565b93505b6000846001600160401b03811115610b1957610b19612af0565b604051908082528060200260200182016040528015610b5257816020015b610b3f61275d565b815260200190600190039081610b375790505b50905060005b85811015610ddd576000610b6c8287612f43565b610b77906001612f43565b610b819085612ef1565b10610dcb576068610b928287612f43565b610b9d906001612f43565b610ba79085612ef1565b81548110610bb757610bb7612eaa565b90600052602060002090600602016040518060c00160405290816000820154815260200160018201548152602001600282018054610bf490612f08565b80601f0160208091040260200160405190810160405280929190818152602001828054610c2090612f08565b8015610c6d5780601f10610c4257610100808354040283529160200191610c6d565b820191906000526020600020905b815481529060010190602001808311610c5057829003601f168201915b50505050508152602001600382018054610c8690612f08565b80601f0160208091040260200160405190810160405280929190818152602001828054610cb290612f08565b8015610cff5780601f10610cd457610100808354040283529160200191610cff565b820191906000526020600020905b815481529060010190602001808311610ce257829003601f168201915b50505050508152602001600482018054610d1890612f08565b80601f0160208091040260200160405190810160405280929190818152602001828054610d4490612f08565b8015610d915780601f10610d6657610100808354040283529160200191610d91565b820191906000526020600020905b815481529060010190602001808311610d7457829003601f168201915b50505091835250506005919091015460ff1615156020909101528251839083908110610dbf57610dbf612eaa565b60200260200101819052505b80610dd581612ed6565b915050610b58565b509150505b92915050565b60705460408051635c975abb60e01b815290516001600160a01b03909216918291635c975abb916004808301926020929190829003018186803b158015610e2e57600080fd5b505afa158015610e42573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e669190612f5b565b15610e835760405162461bcd60e51b81526004016107b990612f78565b610e8d843361245f565b610ec95760405162461bcd60e51b815260206004820152600d60248201526c139bdd081c195c9b5a5d1d1959609a1b60448201526064016107b9565b610ed282612514565b610f0d5760405162461bcd60e51b815260206004820152600c60248201526b496e76616c696420726f6c6560a01b60448201526064016107b9565b60008481526071602090815260408083206001600160a01b038716845282528083208584528252808320805460ff1916905586835260729091529020548015801590610f5e5750610f5e8585612541565b156110ac57600181111561106c576000805b82811015610fd957600087815260726020526040902080546001600160a01b038816919083908110610fa457610fa4612eaa565b6000918252602090912001546001600160a01b03161415610fc757809150610fd9565b80610fd181612ed6565b915050610f70565b506000868152607260205260409020610ff3600184612ef1565b8154811061100357611003612eaa565b60009182526020808320909101548883526072909152604090912080546001600160a01b03909216918390811061103c5761103c612eaa565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550505b600085815260726020526040902080548061108957611089612f98565b600082815260209020810160001990810180546001600160a01b03191690550190555b5050505050565b6110bb612405565b606e55565b6110c8612405565b6110d26000612585565b565b876110df8133612384565b6111245760405162461bcd60e51b81526020600482015260166024820152752cb7ba903430bb32903737903832b936b4b9b9b4b7b760511b60448201526064016107b9565b60705460408051635c975abb60e01b815290516001600160a01b03909216918291635c975abb916004808301926020929190829003018186803b15801561116a57600080fd5b505afa15801561117e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111a29190612f5b565b156111bf5760405162461bcd60e51b81526004016107b990612f78565b6000861180156111d15750606f548611155b6112155760405162461bcd60e51b81526020600482015260156024820152741b5a5b9d081b1a5b5a5d081a5cc81a5b9d985b1a59605a1b60448201526064016107b9565b841561131257606e5460009061122b3a89612fae565b6112359190612fae565b90508034101561127a5760405162461bcd60e51b815260206004820152601060248201526f4e6f7420656e6f7567682076616c756560801b60448201526064016107b9565b606d546040516000916001600160a01b03169034908381818185875af1925050503d80600081146112c7576040519150601f19603f3d011682016040523d82523d6000602084013e6112cc565b606091505b505090508061130f5760405162461bcd60e51b815260206004820152600f60248201526e1d1c985b9cd9995c8819985a5b1959608a1b60448201526064016107b9565b50505b600061131d60655490565b905061132d606580546001019055565b6040805160c08101825282815260208082018e81529282018d8152606083018d9052608083018c905289151560a084015260688054600181018255600091909152835160069091027fa2153420d844928b4421650203c77babc8b33d7f2e7b450e2966db0c22097753810191825594517fa2153420d844928b4421650203c77babc8b33d7f2e7b450e2966db0c2209775486015590518051939491936113fc937fa2153420d844928b4421650203c77babc8b33d7f2e7b450e2966db0c22097755909301929190910190612795565b5060608201518051611418916003840191602090910190612795565b5060808201518051611434916004840191602090910190612795565b5060a091909101516005909101805460ff1916911515919091179055606c5460405163ef3ad9eb60e01b81526001600160a01b0390911690819063ef3ad9eb906114889085908c908b908b90600401612fcd565b600060405180830381600087803b1580156114a257600080fd5b505af11580156114b6573d6000803e3d6000fd5b50505060008d8152606a60209081526040808320805460018101825590845282842001869055858352606b8252918290208f905590518481523392507fffde68815858e4c88d054382adadf9d3280426c744cf9c1991303ff77afdc1e2910160405180910390a2505050505050505050505050565b60705460408051635c975abb60e01b815290516001600160a01b03909216918291635c975abb916004808301926020929190829003018186803b15801561157157600080fd5b505afa158015611585573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115a99190612f5b565b156115c65760405162461bcd60e51b81526004016107b990612f78565b6115d0843361245f565b61160c5760405162461bcd60e51b815260206004820152600d60248201526c139bdd081c195c9b5a5d1d1959609a1b60448201526064016107b9565b61161582612514565b6116505760405162461bcd60e51b815260206004820152600c60248201526b496e76616c696420726f6c6560a01b60448201526064016107b9565b60008481526071602090815260408083206001600160a01b038716845282528083208584529091529020805460ff1916600117905561168f84846125d7565b6116cb5760008481526072602090815260408220805460018101825590835291200180546001600160a01b0319166001600160a01b0385161790555b50505050565b6001600160a01b038116600090815260696020526040812054606754606092826001600160401b0381111561170857611708612af0565b60405190808252806020026020018201604052801561174157816020015b61172e612733565b8152602001906001900390816117265790505b5090506000805b838110156118c557866001600160a01b03166067828154811061176d5761176d612eaa565b60009182526020909120600160039092020101546001600160a01b031614156118b357606781815481106117a3576117a3612eaa565b9060005260206000209060030201604051806060016040529081600082015481526020016001820160009054906101000a90046001600160a01b03166001600160a01b03166001600160a01b0316815260200160028201805461180590612f08565b80601f016020809104026020016040519081016040528092919081815260200182805461183190612f08565b801561187e5780601f106118535761010080835404028352916020019161187e565b820191906000526020600020905b81548152906001019060200180831161186157829003601f168201915b50505050508152505083838151811061189957611899612eaa565b602002602001018190525081806118af90612ed6565b9250505b806118bd81612ed6565b915050611748565b509095945050505050565b6000818152606b60205260408120546118e98185612384565b949350505050565b600054600290610100900460ff16158015611913575060005460ff8083169116105b6119765760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016107b9565b6000805461ffff191660ff8316176101001790556119926126a2565b6066541580156119a25750606554155b156119c3576119b5606680546001019055565b6119c3606580546001019055565b6119cc856109c5565b6119d5846110b3565b6119de83612338565b607080546001600160a01b0319166001600160a01b0384161790556000805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15050505050565b611a4961275d565b6000611a56600184612ef1565b9050600060688281548110611a6d57611a6d612eaa565b90600052602060002090600602016040518060c00160405290816000820154815260200160018201548152602001600282018054611aaa90612f08565b80601f0160208091040260200160405190810160405280929190818152602001828054611ad690612f08565b8015611b235780601f10611af857610100808354040283529160200191611b23565b820191906000526020600020905b815481529060010190602001808311611b0657829003601f168201915b50505050508152602001600382018054611b3c90612f08565b80601f0160208091040260200160405190810160405280929190818152602001828054611b6890612f08565b8015611bb55780601f10611b8a57610100808354040283529160200191611bb5565b820191906000526020600020905b815481529060010190602001808311611b9857829003601f168201915b50505050508152602001600482018054611bce90612f08565b80601f0160208091040260200160405190810160405280929190818152602001828054611bfa90612f08565b8015611c475780601f10611c1c57610100808354040283529160200191611c47565b820191906000526020600020905b815481529060010190602001808311611c2a57829003601f168201915b50505091835250506005919091015460ff161515602090910152949350505050565b6067546060906000816001600160401b03811115611c8957611c89612af0565b604051908082528060200260200182016040528015611cc257816020015b611caf612733565b815260200190600190039081611ca75790505b50606780546040805160208084028201810190925282815293945060009084015b82821015611dc757600084815260209081902060408051606081018252600386029092018054835260018101546001600160a01b03169383019390935260028301805492939291840191611d3690612f08565b80601f0160208091040260200160405190810160405280929190818152602001828054611d6290612f08565b8015611daf5780601f10611d8457610100808354040283529160200191611daf565b820191906000526020600020905b815481529060010190602001808311611d9257829003601f168201915b50505050508152505081526020019060010190611ce3565b50929695505050505050565b60705460408051635c975abb60e01b815290516001600160a01b03909216918291635c975abb916004808301926020929190829003018186803b158015611e1957600080fd5b505afa158015611e2d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e519190612f5b565b15611e6e5760405162461bcd60e51b81526004016107b990612f78565b6000611e7960665490565b9050611e89606680546001019055565b6040805160608101825282815233602080830191825292820186815260678054600181018255600091909152835160039091027f9787eeb91fe3101235e4a76063c7023ecb40f923f97916639c598592fa30d6ae810191825592517f9787eeb91fe3101235e4a76063c7023ecb40f923f97916639c598592fa30d6af840180546001600160a01b03929092166001600160a01b03199092169190911790559051805193949193611f60937f9787eeb91fe3101235e4a76063c7023ecb40f923f97916639c598592fa30d6b001929190910190612795565b505033600081815260696020908152604080832080546001810182559084529190922001849055519091507f88d8a40d3d79893e13972978642d5fe29930912ee4c0b62a535815945c1d7bd090611fba9084815260200190565b60405180910390a2505050565b611fcf612405565b6001600160a01b0381166120345760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016107b9565b61203d81612585565b50565b6000818152606a6020526040812054606091816001600160401b0381111561206a5761206a612af0565b6040519080825280602002602001820160405280156120a357816020015b61209061275d565b8152602001906001900390816120885790505b50905060005b828110156109bd576000858152606a6020526040812060016120cb8487612ef1565b6120d59190612ef1565b815481106120e5576120e5612eaa565b9060005260206000200154905060686001826121019190612ef1565b8154811061211157612111612eaa565b90600052602060002090600602016040518060c0016040529081600082015481526020016001820154815260200160028201805461214e90612f08565b80601f016020809104026020016040519081016040528092919081815260200182805461217a90612f08565b80156121c75780601f1061219c576101008083540402835291602001916121c7565b820191906000526020600020905b8154815290600101906020018083116121aa57829003601f168201915b505050505081526020016003820180546121e090612f08565b80601f016020809104026020016040519081016040528092919081815260200182805461220c90612f08565b80156122595780601f1061222e57610100808354040283529160200191612259565b820191906000526020600020905b81548152906001019060200180831161223c57829003601f168201915b5050505050815260200160048201805461227290612f08565b80601f016020809104026020016040519081016040528092919081815260200182805461229e90612f08565b80156122eb5780601f106122c0576101008083540402835291602001916122eb565b820191906000526020600020905b8154815290600101906020018083116122ce57829003601f168201915b50505091835250506005919091015460ff161515602090910152835184908490811061231957612319612eaa565b602002602001018190525050808061233090612ed6565b9150506120a9565b612340612405565b8061237f5760405162461bcd60e51b815260206004820152600f60248201526e06d696e74206c696d6974206973203608c1b60448201526064016107b9565b606f55565b6000808311801561239757506067548311155b6123d55760405162461bcd60e51b815260206004820152600f60248201526e125b9d985b1a590819dc9bdd5c1259608a1b60448201526064016107b9565b6123df838361245f565b806123fe57506123fe83836000805160206130a68339815191526126d1565b9392505050565b6033546001600160a01b031633146110d25760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016107b9565b6000808311801561247257506067548311155b6124b05760405162461bcd60e51b815260206004820152600f60248201526e125b9d985b1a590819dc9bdd5c1259608a1b60448201526064016107b9565b6001600160a01b03821660676124c7600186612ef1565b815481106124d7576124d7612eaa565b60009182526020909120600160039092020101546001600160a01b031614806123fe57506123fe83836000805160206130c68339815191526126d1565b60006000805160206130c6833981519152821480610de25750506000805160206130a68339815191521490565b600061255c83836000805160206130c68339815191526126d1565b1580156123fe575061257d83836000805160206130a68339815191526126d1565b159392505050565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60008281526072602090815260408083208054825181850281018501909352808352849383018282801561263457602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311612616575b5050505050905060005b815181101561269757836001600160a01b031682828151811061266357612663612eaa565b60200260200101516001600160a01b0316141561268557600192505050610de2565b8061268f81612ed6565b91505061263e565b506000949350505050565b600054610100900460ff166126c95760405162461bcd60e51b81526004016107b99061305a565b6110d2612703565b60009283526071602090815260408085206001600160a01b039490941685529281528284209184525290205460ff1690565b600054610100900460ff1661272a5760405162461bcd60e51b81526004016107b99061305a565b6110d233612585565b60405180606001604052806000815260200160006001600160a01b03168152602001606081525090565b6040518060c0016040528060008152602001600081526020016060815260200160608152602001606081526020016000151581525090565b8280546127a190612f08565b90600052602060002090601f0160209004810192826127c35760008555612809565b82601f106127dc57805160ff1916838001178555612809565b82800160010185558215612809579182015b828111156128095782518255916020019190600101906127ee565b50612815929150612819565b5090565b5b80821115612815576000815560010161281a565b80356001600160a01b038116811461284557600080fd5b919050565b60006020828403121561285c57600080fd5b6123fe8261282e565b6000815180845260005b8181101561288b5760208185018101518683018201520161286f565b8181111561289d576000602083870101525b50601f01601f19169290920160200192915050565b60006020808301818452808551808352604092508286019150828160051b87010184880160005b8381101561292c57888303603f19018552815180518452878101516001600160a01b031688850152860151606087850181905261291881860183612865565b9689019694505050908601906001016128d9565b509098975050505050505050565b60006020828403121561294c57600080fd5b5035919050565b6020808252825182820181905260009190848201906040850190845b818110156129b6576129a383855180516001600160a01b031682526020808201511515908301526040908101511515910152565b928401926060929092019160010161296f565b50909695505050505050565b600080604083850312156129d557600080fd5b50508035926020909101359150565b80518252602081015160208301526000604082015160c06040850152612a0d60c0850182612865565b905060608301518482036060860152612a268282612865565b91505060808301518482036080860152612a408282612865565b91505060a0830151151560a08501528091505092915050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015612aae57603f19888603018452612a9c8583516129e4565b94509285019290850190600101612a80565b5092979650505050505050565b600080600060608486031215612ad057600080fd5b83359250612ae06020850161282e565b9150604084013590509250925092565b634e487b7160e01b600052604160045260246000fd5b604080519081016001600160401b0381118282101715612b2857612b28612af0565b60405290565b604051601f8201601f191681016001600160401b0381118282101715612b5657612b56612af0565b604052919050565b600082601f830112612b6f57600080fd5b81356001600160401b03811115612b8857612b88612af0565b612b9b601f8201601f1916602001612b2e565b818152846020838601011115612bb057600080fd5b816020850160208301376000918101602001919091529392505050565b801515811461203d57600080fd5b803561284581612bcd565b600082601f830112612bf757600080fd5b813560206001600160401b0380831115612c1357612c13612af0565b8260051b612c22838201612b2e565b9384528581018301938381019088861115612c3c57600080fd5b84880192505b85831015612cb357823584811115612c5a5760008081fd5b88016040818b03601f1901811315612c725760008081fd5b612c7a612b06565b8783013587811115612c8c5760008081fd5b612c9a8d8a83870101612b5e565b8252509101358682015282529184019190840190612c42565b98975050505050505050565b600080600080600080600080610100898b031215612cdc57600080fd5b8835975060208901356001600160401b0380821115612cfa57600080fd5b612d068c838d01612b5e565b985060408b0135915080821115612d1c57600080fd5b612d288c838d01612b5e565b975060608b0135915080821115612d3e57600080fd5b612d4a8c838d01612b5e565b965060808b01359550612d5f60a08c01612bdb565b945060c08b0135935060e08b0135915080821115612d7c57600080fd5b50612d898b828c01612be6565b9150509295985092959890939650565b60008060408385031215612dac57600080fd5b612db58361282e565b946020939093013593505050565b60008060008060808587031215612dd957600080fd5b612de28561282e565b93506020850135925060408501359150612dfe6060860161282e565b905092959194509250565b6020815260006123fe60208301846129e4565b60008060408385031215612e2f57600080fd5b82359150612e3f6020840161282e565b90509250929050565b81516001600160a01b0316815260208083015115159082015260408083015115159082015260608101610de2565b600060208284031215612e8857600080fd5b81356001600160401b03811115612e9e57600080fd5b6118e984828501612b5e565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415612eea57612eea612ec0565b5060010190565b600082821015612f0357612f03612ec0565b500390565b600181811c90821680612f1c57607f821691505b60208210811415612f3d57634e487b7160e01b600052602260045260246000fd5b50919050565b60008219821115612f5657612f56612ec0565b500190565b600060208284031215612f6d57600080fd5b81516123fe81612bcd565b60208082526006908201526514185d5cd95960d21b604082015260600190565b634e487b7160e01b600052603160045260246000fd5b6000816000190483118215151615612fc857612fc8612ec0565b500290565b60006080820186835260208681850152604086818601526080606086015282865180855260a08701915060a08160051b880101945083880160005b8281101561304957888703609f190184528151805186895261302c878a0182612865565b918801519888019890985296509285019290850190600101613008565b50949b9a5050505050505050505050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b60608201526080019056fef38814eec94cecab51d76c4344615af8334e61ee8d4ae6b02411905a54259ecedf8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec42a26469706673582212202e7001c4d2e0301ba89b8e69a7d916a3a225412451e731283f5a026def55358664736f6c63430008090033", - "deployedBytecode": "0x6080604052600436106101405760003560e01c80638da5cb5b116100b6578063cb8668ea1161006f578063cb8668ea14610399578063d96c2c3a1461044f578063dc2ddcae1461046d578063f2fde38b1461048d578063f5620823146104ad578063f926b50c146104cd57600080fd5b80638da5cb5b146102bf5780638f184bea146102e7578063972f1327146103075780639e3d87cd14610337578063b98079bc14610357578063c72b51761461038457600080fd5b8063398121a611610108578063398121a61461020a578063471ade98146102375780636b1f762214610257578063715018a61461027757806374c4b95d1461028c5780638be103371461029f57600080fd5b80630422cb161461014557806308fb5eb21461017b5780631ac30e631461019d578063331e36ea146101bd57806337c81cd7146101ea575b600080fd5b34801561015157600080fd5b5061016561016036600461284a565b6104ed565b60405161017291906128b2565b60405180910390f35b34801561018757600080fd5b5061019b61019636600461284a565b610751565b005b3480156101a957600080fd5b5061019b6101b836600461284a565b6107e4565b3480156101c957600080fd5b506101dd6101d836600461293a565b610864565b6040516101729190612953565b3480156101f657600080fd5b5061019b61020536600461284a565b6109c5565b34801561021657600080fd5b5061022a6102253660046129c2565b610a45565b6040516101729190612a59565b34801561024357600080fd5b5061019b610252366004612abb565b610de8565b34801561026357600080fd5b5061019b61027236600461293a565b6110b3565b34801561028357600080fd5b5061019b6110c0565b61019b61029a366004612cbf565b6110d4565b3480156102ab57600080fd5b5061019b6102ba366004612abb565b61152b565b3480156102cb57600080fd5b506033546040516001600160a01b039091168152602001610172565b3480156102f357600080fd5b5061016561030236600461284a565b6116d1565b34801561031357600080fd5b50610327610322366004612d99565b6118d0565b6040519015158152602001610172565b34801561034357600080fd5b5061019b610352366004612dc3565b6118f1565b34801561036357600080fd5b5061037761037236600461293a565b611a41565b6040516101729190612e09565b34801561039057600080fd5b50610165611c69565b3480156103a557600080fd5b506104426103b4366004612e1c565b604080516060808201835260008083526020808401829052928401819052835191820184526001600160a01b0394909416808252948452607182528284209484529381528183206000805160206130c683398151915284528082528284205460ff9081161515868401526000805160206130a683398151915285529152918190205490911615159082015290565b6040516101729190612e48565b34801561045b57600080fd5b50606854604051908152602001610172565b34801561047957600080fd5b5061019b610488366004612e76565b611dd3565b34801561049957600080fd5b5061019b6104a836600461284a565b611fc7565b3480156104b957600080fd5b5061022a6104c836600461293a565b612040565b3480156104d957600080fd5b5061019b6104e836600461293a565b612338565b6067546060906000906001600160401b0381111561050d5761050d612af0565b604051908082528060200260200182016040528015610536578160200160208202803683370190505b509050600060015b6067548111610594576105518186612384565b15610582578083838151811061056957610569612eaa565b60209081029190910101528161057e81612ed6565b9250505b8061058c81612ed6565b91505061053e565b506000816001600160401b038111156105af576105af612af0565b6040519080825280602002602001820160405280156105e857816020015b6105d5612733565b8152602001906001900390816105cd5790505b50905060005b82811015610748576000600185838151811061060c5761060c612eaa565b602002602001015161061e9190612ef1565b90506067818154811061063357610633612eaa565b9060005260206000209060030201604051806060016040529081600082015481526020016001820160009054906101000a90046001600160a01b03166001600160a01b03166001600160a01b0316815260200160028201805461069590612f08565b80601f01602080910402602001604051908101604052809291908181526020018280546106c190612f08565b801561070e5780601f106106e35761010080835404028352916020019161070e565b820191906000526020600020905b8154815290600101906020018083116106f157829003601f168201915b50505050508152505083838151811061072957610729612eaa565b602002602001018190525050808061074090612ed6565b9150506105ee565b50949350505050565b610759612405565b6001600160a01b0381166107c25760405162461bcd60e51b815260206004820152602560248201527f6f7065726174696f6e20636f6e74726f6c6c6572206164647265737320697320604482015264626c616e6b60d81b60648201526084015b60405180910390fd5b607080546001600160a01b0319166001600160a01b0392909216919091179055565b6107ec612405565b6001600160a01b0381166108425760405162461bcd60e51b815260206004820152601960248201527f6d696e74206e6674206164647265737320697320626c616e6b0000000000000060448201526064016107b9565b606c80546001600160a01b0319166001600160a01b0392909216919091179055565b600081815260726020526040812054606091816001600160401b0381111561088e5761088e612af0565b6040519080825280602002602001820160405280156108d957816020015b60408051606081018252600080825260208083018290529282015282526000199092019101816108ac5790505b50905060005b828110156109bd57600085815260726020526040812080548390811061090757610907612eaa565b6000918252602080832090910154604080516060810182526001600160a01b039092168083528a85526071845281852081865284528185206000805160206130c683398151915286528085528286205460ff9081161515858701526000805160206130a683398151915287529452938190205490921615159181019190915284519192509084908490811061099e5761099e612eaa565b60200260200101819052505080806109b590612ed6565b9150506108df565b509392505050565b6109cd612405565b6001600160a01b038116610a235760405162461bcd60e51b815260206004820152601860248201527f72656c61796572206164647265737320697320626c616e6b000000000000000060448201526064016107b9565b606d80546001600160a01b0319166001600160a01b0392909216919091179055565b60685460609083610a5557606493505b6064841115610a9b5760405162461bcd60e51b81526020600482015260126024820152716c696d697420697320746f6f206c6172676560701b60448201526064016107b9565b80831115610ae15760405162461bcd60e51b81526020600482015260136024820152726f666673657420697320746f6f206c6172676560681b60448201526064016107b9565b80610aec8486612f43565b1115610aff57610afc8382612ef1565b93505b6000846001600160401b03811115610b1957610b19612af0565b604051908082528060200260200182016040528015610b5257816020015b610b3f61275d565b815260200190600190039081610b375790505b50905060005b85811015610ddd576000610b6c8287612f43565b610b77906001612f43565b610b819085612ef1565b10610dcb576068610b928287612f43565b610b9d906001612f43565b610ba79085612ef1565b81548110610bb757610bb7612eaa565b90600052602060002090600602016040518060c00160405290816000820154815260200160018201548152602001600282018054610bf490612f08565b80601f0160208091040260200160405190810160405280929190818152602001828054610c2090612f08565b8015610c6d5780601f10610c4257610100808354040283529160200191610c6d565b820191906000526020600020905b815481529060010190602001808311610c5057829003601f168201915b50505050508152602001600382018054610c8690612f08565b80601f0160208091040260200160405190810160405280929190818152602001828054610cb290612f08565b8015610cff5780601f10610cd457610100808354040283529160200191610cff565b820191906000526020600020905b815481529060010190602001808311610ce257829003601f168201915b50505050508152602001600482018054610d1890612f08565b80601f0160208091040260200160405190810160405280929190818152602001828054610d4490612f08565b8015610d915780601f10610d6657610100808354040283529160200191610d91565b820191906000526020600020905b815481529060010190602001808311610d7457829003601f168201915b50505091835250506005919091015460ff1615156020909101528251839083908110610dbf57610dbf612eaa565b60200260200101819052505b80610dd581612ed6565b915050610b58565b509150505b92915050565b60705460408051635c975abb60e01b815290516001600160a01b03909216918291635c975abb916004808301926020929190829003018186803b158015610e2e57600080fd5b505afa158015610e42573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e669190612f5b565b15610e835760405162461bcd60e51b81526004016107b990612f78565b610e8d843361245f565b610ec95760405162461bcd60e51b815260206004820152600d60248201526c139bdd081c195c9b5a5d1d1959609a1b60448201526064016107b9565b610ed282612514565b610f0d5760405162461bcd60e51b815260206004820152600c60248201526b496e76616c696420726f6c6560a01b60448201526064016107b9565b60008481526071602090815260408083206001600160a01b038716845282528083208584528252808320805460ff1916905586835260729091529020548015801590610f5e5750610f5e8585612541565b156110ac57600181111561106c576000805b82811015610fd957600087815260726020526040902080546001600160a01b038816919083908110610fa457610fa4612eaa565b6000918252602090912001546001600160a01b03161415610fc757809150610fd9565b80610fd181612ed6565b915050610f70565b506000868152607260205260409020610ff3600184612ef1565b8154811061100357611003612eaa565b60009182526020808320909101548883526072909152604090912080546001600160a01b03909216918390811061103c5761103c612eaa565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550505b600085815260726020526040902080548061108957611089612f98565b600082815260209020810160001990810180546001600160a01b03191690550190555b5050505050565b6110bb612405565b606e55565b6110c8612405565b6110d26000612585565b565b876110df8133612384565b6111245760405162461bcd60e51b81526020600482015260166024820152752cb7ba903430bb32903737903832b936b4b9b9b4b7b760511b60448201526064016107b9565b60705460408051635c975abb60e01b815290516001600160a01b03909216918291635c975abb916004808301926020929190829003018186803b15801561116a57600080fd5b505afa15801561117e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111a29190612f5b565b156111bf5760405162461bcd60e51b81526004016107b990612f78565b6000861180156111d15750606f548611155b6112155760405162461bcd60e51b81526020600482015260156024820152741b5a5b9d081b1a5b5a5d081a5cc81a5b9d985b1a59605a1b60448201526064016107b9565b841561131257606e5460009061122b3a89612fae565b6112359190612fae565b90508034101561127a5760405162461bcd60e51b815260206004820152601060248201526f4e6f7420656e6f7567682076616c756560801b60448201526064016107b9565b606d546040516000916001600160a01b03169034908381818185875af1925050503d80600081146112c7576040519150601f19603f3d011682016040523d82523d6000602084013e6112cc565b606091505b505090508061130f5760405162461bcd60e51b815260206004820152600f60248201526e1d1c985b9cd9995c8819985a5b1959608a1b60448201526064016107b9565b50505b600061131d60655490565b905061132d606580546001019055565b6040805160c08101825282815260208082018e81529282018d8152606083018d9052608083018c905289151560a084015260688054600181018255600091909152835160069091027fa2153420d844928b4421650203c77babc8b33d7f2e7b450e2966db0c22097753810191825594517fa2153420d844928b4421650203c77babc8b33d7f2e7b450e2966db0c2209775486015590518051939491936113fc937fa2153420d844928b4421650203c77babc8b33d7f2e7b450e2966db0c22097755909301929190910190612795565b5060608201518051611418916003840191602090910190612795565b5060808201518051611434916004840191602090910190612795565b5060a091909101516005909101805460ff1916911515919091179055606c5460405163ef3ad9eb60e01b81526001600160a01b0390911690819063ef3ad9eb906114889085908c908b908b90600401612fcd565b600060405180830381600087803b1580156114a257600080fd5b505af11580156114b6573d6000803e3d6000fd5b50505060008d8152606a60209081526040808320805460018101825590845282842001869055858352606b8252918290208f905590518481523392507fffde68815858e4c88d054382adadf9d3280426c744cf9c1991303ff77afdc1e2910160405180910390a2505050505050505050505050565b60705460408051635c975abb60e01b815290516001600160a01b03909216918291635c975abb916004808301926020929190829003018186803b15801561157157600080fd5b505afa158015611585573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115a99190612f5b565b156115c65760405162461bcd60e51b81526004016107b990612f78565b6115d0843361245f565b61160c5760405162461bcd60e51b815260206004820152600d60248201526c139bdd081c195c9b5a5d1d1959609a1b60448201526064016107b9565b61161582612514565b6116505760405162461bcd60e51b815260206004820152600c60248201526b496e76616c696420726f6c6560a01b60448201526064016107b9565b60008481526071602090815260408083206001600160a01b038716845282528083208584529091529020805460ff1916600117905561168f84846125d7565b6116cb5760008481526072602090815260408220805460018101825590835291200180546001600160a01b0319166001600160a01b0385161790555b50505050565b6001600160a01b038116600090815260696020526040812054606754606092826001600160401b0381111561170857611708612af0565b60405190808252806020026020018201604052801561174157816020015b61172e612733565b8152602001906001900390816117265790505b5090506000805b838110156118c557866001600160a01b03166067828154811061176d5761176d612eaa565b60009182526020909120600160039092020101546001600160a01b031614156118b357606781815481106117a3576117a3612eaa565b9060005260206000209060030201604051806060016040529081600082015481526020016001820160009054906101000a90046001600160a01b03166001600160a01b03166001600160a01b0316815260200160028201805461180590612f08565b80601f016020809104026020016040519081016040528092919081815260200182805461183190612f08565b801561187e5780601f106118535761010080835404028352916020019161187e565b820191906000526020600020905b81548152906001019060200180831161186157829003601f168201915b50505050508152505083838151811061189957611899612eaa565b602002602001018190525081806118af90612ed6565b9250505b806118bd81612ed6565b915050611748565b509095945050505050565b6000818152606b60205260408120546118e98185612384565b949350505050565b600054600290610100900460ff16158015611913575060005460ff8083169116105b6119765760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016107b9565b6000805461ffff191660ff8316176101001790556119926126a2565b6066541580156119a25750606554155b156119c3576119b5606680546001019055565b6119c3606580546001019055565b6119cc856109c5565b6119d5846110b3565b6119de83612338565b607080546001600160a01b0319166001600160a01b0384161790556000805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15050505050565b611a4961275d565b6000611a56600184612ef1565b9050600060688281548110611a6d57611a6d612eaa565b90600052602060002090600602016040518060c00160405290816000820154815260200160018201548152602001600282018054611aaa90612f08565b80601f0160208091040260200160405190810160405280929190818152602001828054611ad690612f08565b8015611b235780601f10611af857610100808354040283529160200191611b23565b820191906000526020600020905b815481529060010190602001808311611b0657829003601f168201915b50505050508152602001600382018054611b3c90612f08565b80601f0160208091040260200160405190810160405280929190818152602001828054611b6890612f08565b8015611bb55780601f10611b8a57610100808354040283529160200191611bb5565b820191906000526020600020905b815481529060010190602001808311611b9857829003601f168201915b50505050508152602001600482018054611bce90612f08565b80601f0160208091040260200160405190810160405280929190818152602001828054611bfa90612f08565b8015611c475780601f10611c1c57610100808354040283529160200191611c47565b820191906000526020600020905b815481529060010190602001808311611c2a57829003601f168201915b50505091835250506005919091015460ff161515602090910152949350505050565b6067546060906000816001600160401b03811115611c8957611c89612af0565b604051908082528060200260200182016040528015611cc257816020015b611caf612733565b815260200190600190039081611ca75790505b50606780546040805160208084028201810190925282815293945060009084015b82821015611dc757600084815260209081902060408051606081018252600386029092018054835260018101546001600160a01b03169383019390935260028301805492939291840191611d3690612f08565b80601f0160208091040260200160405190810160405280929190818152602001828054611d6290612f08565b8015611daf5780601f10611d8457610100808354040283529160200191611daf565b820191906000526020600020905b815481529060010190602001808311611d9257829003601f168201915b50505050508152505081526020019060010190611ce3565b50929695505050505050565b60705460408051635c975abb60e01b815290516001600160a01b03909216918291635c975abb916004808301926020929190829003018186803b158015611e1957600080fd5b505afa158015611e2d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e519190612f5b565b15611e6e5760405162461bcd60e51b81526004016107b990612f78565b6000611e7960665490565b9050611e89606680546001019055565b6040805160608101825282815233602080830191825292820186815260678054600181018255600091909152835160039091027f9787eeb91fe3101235e4a76063c7023ecb40f923f97916639c598592fa30d6ae810191825592517f9787eeb91fe3101235e4a76063c7023ecb40f923f97916639c598592fa30d6af840180546001600160a01b03929092166001600160a01b03199092169190911790559051805193949193611f60937f9787eeb91fe3101235e4a76063c7023ecb40f923f97916639c598592fa30d6b001929190910190612795565b505033600081815260696020908152604080832080546001810182559084529190922001849055519091507f88d8a40d3d79893e13972978642d5fe29930912ee4c0b62a535815945c1d7bd090611fba9084815260200190565b60405180910390a2505050565b611fcf612405565b6001600160a01b0381166120345760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016107b9565b61203d81612585565b50565b6000818152606a6020526040812054606091816001600160401b0381111561206a5761206a612af0565b6040519080825280602002602001820160405280156120a357816020015b61209061275d565b8152602001906001900390816120885790505b50905060005b828110156109bd576000858152606a6020526040812060016120cb8487612ef1565b6120d59190612ef1565b815481106120e5576120e5612eaa565b9060005260206000200154905060686001826121019190612ef1565b8154811061211157612111612eaa565b90600052602060002090600602016040518060c0016040529081600082015481526020016001820154815260200160028201805461214e90612f08565b80601f016020809104026020016040519081016040528092919081815260200182805461217a90612f08565b80156121c75780601f1061219c576101008083540402835291602001916121c7565b820191906000526020600020905b8154815290600101906020018083116121aa57829003601f168201915b505050505081526020016003820180546121e090612f08565b80601f016020809104026020016040519081016040528092919081815260200182805461220c90612f08565b80156122595780601f1061222e57610100808354040283529160200191612259565b820191906000526020600020905b81548152906001019060200180831161223c57829003601f168201915b5050505050815260200160048201805461227290612f08565b80601f016020809104026020016040519081016040528092919081815260200182805461229e90612f08565b80156122eb5780601f106122c0576101008083540402835291602001916122eb565b820191906000526020600020905b8154815290600101906020018083116122ce57829003601f168201915b50505091835250506005919091015460ff161515602090910152835184908490811061231957612319612eaa565b602002602001018190525050808061233090612ed6565b9150506120a9565b612340612405565b8061237f5760405162461bcd60e51b815260206004820152600f60248201526e06d696e74206c696d6974206973203608c1b60448201526064016107b9565b606f55565b6000808311801561239757506067548311155b6123d55760405162461bcd60e51b815260206004820152600f60248201526e125b9d985b1a590819dc9bdd5c1259608a1b60448201526064016107b9565b6123df838361245f565b806123fe57506123fe83836000805160206130a68339815191526126d1565b9392505050565b6033546001600160a01b031633146110d25760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016107b9565b6000808311801561247257506067548311155b6124b05760405162461bcd60e51b815260206004820152600f60248201526e125b9d985b1a590819dc9bdd5c1259608a1b60448201526064016107b9565b6001600160a01b03821660676124c7600186612ef1565b815481106124d7576124d7612eaa565b60009182526020909120600160039092020101546001600160a01b031614806123fe57506123fe83836000805160206130c68339815191526126d1565b60006000805160206130c6833981519152821480610de25750506000805160206130a68339815191521490565b600061255c83836000805160206130c68339815191526126d1565b1580156123fe575061257d83836000805160206130a68339815191526126d1565b159392505050565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60008281526072602090815260408083208054825181850281018501909352808352849383018282801561263457602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311612616575b5050505050905060005b815181101561269757836001600160a01b031682828151811061266357612663612eaa565b60200260200101516001600160a01b0316141561268557600192505050610de2565b8061268f81612ed6565b91505061263e565b506000949350505050565b600054610100900460ff166126c95760405162461bcd60e51b81526004016107b99061305a565b6110d2612703565b60009283526071602090815260408085206001600160a01b039490941685529281528284209184525290205460ff1690565b600054610100900460ff1661272a5760405162461bcd60e51b81526004016107b99061305a565b6110d233612585565b60405180606001604052806000815260200160006001600160a01b03168152602001606081525090565b6040518060c0016040528060008152602001600081526020016060815260200160608152602001606081526020016000151581525090565b8280546127a190612f08565b90600052602060002090601f0160209004810192826127c35760008555612809565b82601f106127dc57805160ff1916838001178555612809565b82800160010185558215612809579182015b828111156128095782518255916020019190600101906127ee565b50612815929150612819565b5090565b5b80821115612815576000815560010161281a565b80356001600160a01b038116811461284557600080fd5b919050565b60006020828403121561285c57600080fd5b6123fe8261282e565b6000815180845260005b8181101561288b5760208185018101518683018201520161286f565b8181111561289d576000602083870101525b50601f01601f19169290920160200192915050565b60006020808301818452808551808352604092508286019150828160051b87010184880160005b8381101561292c57888303603f19018552815180518452878101516001600160a01b031688850152860151606087850181905261291881860183612865565b9689019694505050908601906001016128d9565b509098975050505050505050565b60006020828403121561294c57600080fd5b5035919050565b6020808252825182820181905260009190848201906040850190845b818110156129b6576129a383855180516001600160a01b031682526020808201511515908301526040908101511515910152565b928401926060929092019160010161296f565b50909695505050505050565b600080604083850312156129d557600080fd5b50508035926020909101359150565b80518252602081015160208301526000604082015160c06040850152612a0d60c0850182612865565b905060608301518482036060860152612a268282612865565b91505060808301518482036080860152612a408282612865565b91505060a0830151151560a08501528091505092915050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015612aae57603f19888603018452612a9c8583516129e4565b94509285019290850190600101612a80565b5092979650505050505050565b600080600060608486031215612ad057600080fd5b83359250612ae06020850161282e565b9150604084013590509250925092565b634e487b7160e01b600052604160045260246000fd5b604080519081016001600160401b0381118282101715612b2857612b28612af0565b60405290565b604051601f8201601f191681016001600160401b0381118282101715612b5657612b56612af0565b604052919050565b600082601f830112612b6f57600080fd5b81356001600160401b03811115612b8857612b88612af0565b612b9b601f8201601f1916602001612b2e565b818152846020838601011115612bb057600080fd5b816020850160208301376000918101602001919091529392505050565b801515811461203d57600080fd5b803561284581612bcd565b600082601f830112612bf757600080fd5b813560206001600160401b0380831115612c1357612c13612af0565b8260051b612c22838201612b2e565b9384528581018301938381019088861115612c3c57600080fd5b84880192505b85831015612cb357823584811115612c5a5760008081fd5b88016040818b03601f1901811315612c725760008081fd5b612c7a612b06565b8783013587811115612c8c5760008081fd5b612c9a8d8a83870101612b5e565b8252509101358682015282529184019190840190612c42565b98975050505050505050565b600080600080600080600080610100898b031215612cdc57600080fd5b8835975060208901356001600160401b0380821115612cfa57600080fd5b612d068c838d01612b5e565b985060408b0135915080821115612d1c57600080fd5b612d288c838d01612b5e565b975060608b0135915080821115612d3e57600080fd5b612d4a8c838d01612b5e565b965060808b01359550612d5f60a08c01612bdb565b945060c08b0135935060e08b0135915080821115612d7c57600080fd5b50612d898b828c01612be6565b9150509295985092959890939650565b60008060408385031215612dac57600080fd5b612db58361282e565b946020939093013593505050565b60008060008060808587031215612dd957600080fd5b612de28561282e565b93506020850135925060408501359150612dfe6060860161282e565b905092959194509250565b6020815260006123fe60208301846129e4565b60008060408385031215612e2f57600080fd5b82359150612e3f6020840161282e565b90509250929050565b81516001600160a01b0316815260208083015115159082015260408083015115159082015260608101610de2565b600060208284031215612e8857600080fd5b81356001600160401b03811115612e9e57600080fd5b6118e984828501612b5e565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415612eea57612eea612ec0565b5060010190565b600082821015612f0357612f03612ec0565b500390565b600181811c90821680612f1c57607f821691505b60208210811415612f3d57634e487b7160e01b600052602260045260246000fd5b50919050565b60008219821115612f5657612f56612ec0565b500190565b600060208284031215612f6d57600080fd5b81516123fe81612bcd565b60208082526006908201526514185d5cd95960d21b604082015260600190565b634e487b7160e01b600052603160045260246000fd5b6000816000190483118215151615612fc857612fc8612ec0565b500290565b60006080820186835260208681850152604086818601526080606086015282865180855260a08701915060a08160051b880101945083880160005b8281101561304957888703609f190184528151805186895261302c878a0182612865565b918801519888019890985296509285019290850190600101613008565b50949b9a5050505050505050505050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b60608201526080019056fef38814eec94cecab51d76c4344615af8334e61ee8d4ae6b02411905a54259ecedf8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec42a26469706673582212202e7001c4d2e0301ba89b8e69a7d916a3a225412451e731283f5a026def55358664736f6c63430008090033", + "bytecode": "0x608060405234801561001057600080fd5b506131a4806100206000396000f3fe60806040526004361061014b5760003560e01c80638f184bea116100b6578063cd0a7d621161006f578063cd0a7d6214610467578063d96c2c3a1461047a578063dc2ddcae14610498578063f2fde38b146104b8578063f5620823146104d8578063f926b50c146104f857600080fd5b80638f184bea1461030f578063972f13271461032f5780639e3d87cd1461034f578063b98079bc1461036f578063c72b51761461039c578063cb8668ea146103b157600080fd5b8063471ade9811610108578063471ade9814610242578063683159fd146102625780636b1f762214610292578063715018a6146102b25780638be10337146102c75780638da5cb5b146102e757600080fd5b80630422cb161461015057806308fb5eb2146101865780631ac30e63146101a8578063331e36ea146101c857806337c81cd7146101f5578063398121a614610215575b600080fd5b34801561015c57600080fd5b5061017061016b366004612892565b610518565b60405161017d91906128fa565b60405180910390f35b34801561019257600080fd5b506101a66101a1366004612892565b61077c565b005b3480156101b457600080fd5b506101a66101c3366004612892565b61080f565b3480156101d457600080fd5b506101e86101e3366004612982565b61088f565b60405161017d919061299b565b34801561020157600080fd5b506101a6610210366004612892565b6109f0565b34801561022157600080fd5b50610235610230366004612a0a565b610a70565b60405161017d9190612aa1565b34801561024e57600080fd5b506101a661025d366004612b03565b610e13565b34801561026e57600080fd5b5061028261027d366004612b38565b6110c0565b604051901515815260200161017d565b34801561029e57600080fd5b506101a66102ad366004612982565b6110e1565b3480156102be57600080fd5b506101a66110ee565b3480156102d357600080fd5b506101a66102e2366004612b03565b611102565b3480156102f357600080fd5b506033546040516001600160a01b03909116815260200161017d565b34801561031b57600080fd5b5061017061032a366004612892565b61128a565b34801561033b57600080fd5b5061028261034a366004612b38565b611489565b34801561035b57600080fd5b506101a661036a366004612b62565b6114a2565b34801561037b57600080fd5b5061038f61038a366004612982565b6115f2565b60405161017d9190612ba8565b3480156103a857600080fd5b5061017061181a565b3480156103bd57600080fd5b5061045a6103cc366004612bbb565b604080516060808201835260008083526020808401829052928401819052835191820184526001600160a01b03949094168082529484526071825282842094845293815281832060008051602061314f83398151915284528082528284205460ff90811615158684015260008051602061312f83398151915285529152918190205490911615159082015290565b60405161017d9190612be7565b6101a6610475366004612de4565b611984565b34801561048657600080fd5b5060685460405190815260200161017d565b3480156104a457600080fd5b506101a66104b3366004612ecf565b611e1b565b3480156104c457600080fd5b506101a66104d3366004612892565b61200f565b3480156104e457600080fd5b506102356104f3366004612982565b612088565b34801561050457600080fd5b506101a6610513366004612982565b612380565b6067546060906000906001600160401b0381111561053857610538612c15565b604051908082528060200260200182016040528015610561578160200160208202803683370190505b509050600060015b60675481116105bf5761057c81866123cc565b156105ad578083838151811061059457610594612f03565b6020908102919091010152816105a981612f2f565b9250505b806105b781612f2f565b915050610569565b506000816001600160401b038111156105da576105da612c15565b60405190808252806020026020018201604052801561061357816020015b61060061277b565b8152602001906001900390816105f85790505b50905060005b82811015610773576000600185838151811061063757610637612f03565b60200260200101516106499190612f4a565b90506067818154811061065e5761065e612f03565b9060005260206000209060030201604051806060016040529081600082015481526020016001820160009054906101000a90046001600160a01b03166001600160a01b03166001600160a01b031681526020016002820180546106c090612f61565b80601f01602080910402602001604051908101604052809291908181526020018280546106ec90612f61565b80156107395780601f1061070e57610100808354040283529160200191610739565b820191906000526020600020905b81548152906001019060200180831161071c57829003601f168201915b50505050508152505083838151811061075457610754612f03565b602002602001018190525050808061076b90612f2f565b915050610619565b50949350505050565b61078461244d565b6001600160a01b0381166107ed5760405162461bcd60e51b815260206004820152602560248201527f6f7065726174696f6e20636f6e74726f6c6c6572206164647265737320697320604482015264626c616e6b60d81b60648201526084015b60405180910390fd5b607080546001600160a01b0319166001600160a01b0392909216919091179055565b61081761244d565b6001600160a01b03811661086d5760405162461bcd60e51b815260206004820152601960248201527f6d696e74206e6674206164647265737320697320626c616e6b0000000000000060448201526064016107e4565b606c80546001600160a01b0319166001600160a01b0392909216919091179055565b600081815260726020526040812054606091816001600160401b038111156108b9576108b9612c15565b60405190808252806020026020018201604052801561090457816020015b60408051606081018252600080825260208083018290529282015282526000199092019101816108d75790505b50905060005b828110156109e857600085815260726020526040812080548390811061093257610932612f03565b6000918252602080832090910154604080516060810182526001600160a01b039092168083528a855260718452818520818652845281852060008051602061314f83398151915286528085528286205460ff90811615158587015260008051602061312f8339815191528752945293819020549092161515918101919091528451919250908490849081106109c9576109c9612f03565b60200260200101819052505080806109e090612f2f565b91505061090a565b509392505050565b6109f861244d565b6001600160a01b038116610a4e5760405162461bcd60e51b815260206004820152601860248201527f72656c61796572206164647265737320697320626c616e6b000000000000000060448201526064016107e4565b606d80546001600160a01b0319166001600160a01b0392909216919091179055565b60685460609083610a8057606493505b6064841115610ac65760405162461bcd60e51b81526020600482015260126024820152716c696d697420697320746f6f206c6172676560701b60448201526064016107e4565b80831115610b0c5760405162461bcd60e51b81526020600482015260136024820152726f666673657420697320746f6f206c6172676560681b60448201526064016107e4565b80610b178486612f9c565b1115610b2a57610b278382612f4a565b93505b6000846001600160401b03811115610b4457610b44612c15565b604051908082528060200260200182016040528015610b7d57816020015b610b6a6127a5565b815260200190600190039081610b625790505b50905060005b85811015610e08576000610b978287612f9c565b610ba2906001612f9c565b610bac9085612f4a565b10610df6576068610bbd8287612f9c565b610bc8906001612f9c565b610bd29085612f4a565b81548110610be257610be2612f03565b90600052602060002090600602016040518060c00160405290816000820154815260200160018201548152602001600282018054610c1f90612f61565b80601f0160208091040260200160405190810160405280929190818152602001828054610c4b90612f61565b8015610c985780601f10610c6d57610100808354040283529160200191610c98565b820191906000526020600020905b815481529060010190602001808311610c7b57829003601f168201915b50505050508152602001600382018054610cb190612f61565b80601f0160208091040260200160405190810160405280929190818152602001828054610cdd90612f61565b8015610d2a5780601f10610cff57610100808354040283529160200191610d2a565b820191906000526020600020905b815481529060010190602001808311610d0d57829003601f168201915b50505050508152602001600482018054610d4390612f61565b80601f0160208091040260200160405190810160405280929190818152602001828054610d6f90612f61565b8015610dbc5780601f10610d9157610100808354040283529160200191610dbc565b820191906000526020600020905b815481529060010190602001808311610d9f57829003601f168201915b50505091835250506005919091015460ff1615156020909101528251839083908110610dea57610dea612f03565b60200260200101819052505b80610e0081612f2f565b915050610b83565b509150505b92915050565b60705460408051635c975abb60e01b815290516001600160a01b03909216918291635c975abb916004808301926020929190829003018186803b158015610e5957600080fd5b505afa158015610e6d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e919190612fb4565b15610eae5760405162461bcd60e51b81526004016107e490612fd1565b83610eb981336124a7565b610ed55760405162461bcd60e51b81526004016107e490612ff1565b610ede8361255c565b610f195760405162461bcd60e51b815260206004820152600c60248201526b496e76616c696420726f6c6560a01b60448201526064016107e4565b60008581526071602090815260408083206001600160a01b038816845282528083208684528252808320805460ff1916905587835260729091529020548015801590610f6a5750610f6a8686612589565b156110b8576001811115611078576000805b82811015610fe557600088815260726020526040902080546001600160a01b038916919083908110610fb057610fb0612f03565b6000918252602090912001546001600160a01b03161415610fd357809150610fe5565b80610fdd81612f2f565b915050610f7c565b506000878152607260205260409020610fff600184612f4a565b8154811061100f5761100f612f03565b60009182526020808320909101548983526072909152604090912080546001600160a01b03909216918390811061104857611048612f03565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550505b600086815260726020526040902080548061109557611095613021565b600082815260209020810160001990810180546001600160a01b03191690550190555b505050505050565b6000818152606b60205260408120546110d981856124a7565b949350505050565b6110e961244d565b606e55565b6110f661244d565b61110060006125cd565b565b60705460408051635c975abb60e01b815290516001600160a01b03909216918291635c975abb916004808301926020929190829003018186803b15801561114857600080fd5b505afa15801561115c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111809190612fb4565b1561119d5760405162461bcd60e51b81526004016107e490612fd1565b836111a881336124a7565b6111c45760405162461bcd60e51b81526004016107e490612ff1565b6111cd8361255c565b6112085760405162461bcd60e51b815260206004820152600c60248201526b496e76616c696420726f6c6560a01b60448201526064016107e4565b60008581526071602090815260408083206001600160a01b038816845282528083208684529091529020805460ff19166001179055611247858561261f565b6112835760008581526072602090815260408220805460018101825590835291200180546001600160a01b0319166001600160a01b0386161790555b5050505050565b6001600160a01b038116600090815260696020526040812054606754606092826001600160401b038111156112c1576112c1612c15565b6040519080825280602002602001820160405280156112fa57816020015b6112e761277b565b8152602001906001900390816112df5790505b5090506000805b8381101561147e57866001600160a01b03166067828154811061132657611326612f03565b60009182526020909120600160039092020101546001600160a01b0316141561146c576067818154811061135c5761135c612f03565b9060005260206000209060030201604051806060016040529081600082015481526020016001820160009054906101000a90046001600160a01b03166001600160a01b03166001600160a01b031681526020016002820180546113be90612f61565b80601f01602080910402602001604051908101604052809291908181526020018280546113ea90612f61565b80156114375780601f1061140c57610100808354040283529160200191611437565b820191906000526020600020905b81548152906001019060200180831161141a57829003601f168201915b50505050508152505083838151811061145257611452612f03565b6020026020010181905250818061146890612f2f565b9250505b8061147681612f2f565b915050611301565b509095945050505050565b6000818152606b60205260408120546110d981856123cc565b600054600290610100900460ff161580156114c4575060005460ff8083169116105b6115275760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016107e4565b6000805461ffff191660ff8316176101001790556115436126ea565b6066541580156115535750606554155b1561157457611566606680546001019055565b611574606580546001019055565b61157d856109f0565b611586846110e1565b61158f83612380565b607080546001600160a01b0319166001600160a01b0384161790556000805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15050505050565b6115fa6127a5565b6000611607600184612f4a565b905060006068828154811061161e5761161e612f03565b90600052602060002090600602016040518060c0016040529081600082015481526020016001820154815260200160028201805461165b90612f61565b80601f016020809104026020016040519081016040528092919081815260200182805461168790612f61565b80156116d45780601f106116a9576101008083540402835291602001916116d4565b820191906000526020600020905b8154815290600101906020018083116116b757829003601f168201915b505050505081526020016003820180546116ed90612f61565b80601f016020809104026020016040519081016040528092919081815260200182805461171990612f61565b80156117665780601f1061173b57610100808354040283529160200191611766565b820191906000526020600020905b81548152906001019060200180831161174957829003601f168201915b5050505050815260200160048201805461177f90612f61565b80601f01602080910402602001604051908101604052809291908181526020018280546117ab90612f61565b80156117f85780601f106117cd576101008083540402835291602001916117f8565b820191906000526020600020905b8154815290600101906020018083116117db57829003601f168201915b50505091835250506005919091015460ff161515602090910152949350505050565b6067546060906000816001600160401b0381111561183a5761183a612c15565b60405190808252806020026020018201604052801561187357816020015b61186061277b565b8152602001906001900390816118585790505b50606780546040805160208084028201810190925282815293945060009084015b8282101561197857600084815260209081902060408051606081018252600386029092018054835260018101546001600160a01b031693830193909352600283018054929392918401916118e790612f61565b80601f016020809104026020016040519081016040528092919081815260200182805461191390612f61565b80156119605780601f1061193557610100808354040283529160200191611960565b820191906000526020600020905b81548152906001019060200180831161194357829003601f168201915b50505050508152505081526020019060010190611894565b50929695505050505050565b8861198f81336123cc565b6119ab5760405162461bcd60e51b81526004016107e490612ff1565b60705460408051635c975abb60e01b815290516001600160a01b03909216918291635c975abb916004808301926020929190829003018186803b1580156119f157600080fd5b505afa158015611a05573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a299190612fb4565b15611a465760405162461bcd60e51b81526004016107e490612fd1565b600087118015611a585750606f548711155b611a9c5760405162461bcd60e51b81526020600482015260156024820152741b5a5b9d081b1a5b5a5d081a5cc81a5b9d985b1a59605a1b60448201526064016107e4565b8515611b9957606e54600090611ab23a8a613037565b611abc9190613037565b905080341015611b015760405162461bcd60e51b815260206004820152601060248201526f4e6f7420656e6f7567682076616c756560801b60448201526064016107e4565b606d546040516000916001600160a01b03169034908381818185875af1925050503d8060008114611b4e576040519150601f19603f3d011682016040523d82523d6000602084013e611b53565b606091505b5050905080611b965760405162461bcd60e51b815260206004820152600f60248201526e1d1c985b9cd9995c8819985a5b1959608a1b60448201526064016107e4565b50505b6000611ba460655490565b9050611bb4606580546001019055565b6040805160c08101825282815260208082018f81529282018e8152606083018e9052608083018d90528a151560a084015260688054600181018255600091909152835160069091027fa2153420d844928b4421650203c77babc8b33d7f2e7b450e2966db0c22097753810191825594517fa2153420d844928b4421650203c77babc8b33d7f2e7b450e2966db0c220977548601559051805193949193611c83937fa2153420d844928b4421650203c77babc8b33d7f2e7b450e2966db0c220977559093019291909101906127dd565b5060608201518051611c9f9160038401916020909101906127dd565b5060808201518051611cbb9160048401916020909101906127dd565b5060a091909101516005909101805460ff1916911515919091179055606c5460405163ef3ad9eb60e01b81526001600160a01b0390911690819063ef3ad9eb90611d0f9085908d908b908b90600401613056565b600060405180830381600087803b158015611d2957600080fd5b505af1158015611d3d573d6000803e3d6000fd5b505050508615611da95760405163e572e74b60e01b815260048101839052600160248201526001600160a01b0382169063e572e74b90604401600060405180830381600087803b158015611d9057600080fd5b505af1158015611da4573d6000803e3d6000fd5b505050505b60008d8152606a60209081526040808320805460018101825590845282842001859055848352606b8252918290208f9055905183815233917fffde68815858e4c88d054382adadf9d3280426c744cf9c1991303ff77afdc1e2910160405180910390a250505050505050505050505050565b60705460408051635c975abb60e01b815290516001600160a01b03909216918291635c975abb916004808301926020929190829003018186803b158015611e6157600080fd5b505afa158015611e75573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e999190612fb4565b15611eb65760405162461bcd60e51b81526004016107e490612fd1565b6000611ec160665490565b9050611ed1606680546001019055565b6040805160608101825282815233602080830191825292820186815260678054600181018255600091909152835160039091027f9787eeb91fe3101235e4a76063c7023ecb40f923f97916639c598592fa30d6ae810191825592517f9787eeb91fe3101235e4a76063c7023ecb40f923f97916639c598592fa30d6af840180546001600160a01b03929092166001600160a01b03199092169190911790559051805193949193611fa8937f9787eeb91fe3101235e4a76063c7023ecb40f923f97916639c598592fa30d6b0019291909101906127dd565b505033600081815260696020908152604080832080546001810182559084529190922001849055519091507f88d8a40d3d79893e13972978642d5fe29930912ee4c0b62a535815945c1d7bd0906120029084815260200190565b60405180910390a2505050565b61201761244d565b6001600160a01b03811661207c5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016107e4565b612085816125cd565b50565b6000818152606a6020526040812054606091816001600160401b038111156120b2576120b2612c15565b6040519080825280602002602001820160405280156120eb57816020015b6120d86127a5565b8152602001906001900390816120d05790505b50905060005b828110156109e8576000858152606a6020526040812060016121138487612f4a565b61211d9190612f4a565b8154811061212d5761212d612f03565b9060005260206000200154905060686001826121499190612f4a565b8154811061215957612159612f03565b90600052602060002090600602016040518060c0016040529081600082015481526020016001820154815260200160028201805461219690612f61565b80601f01602080910402602001604051908101604052809291908181526020018280546121c290612f61565b801561220f5780601f106121e45761010080835404028352916020019161220f565b820191906000526020600020905b8154815290600101906020018083116121f257829003601f168201915b5050505050815260200160038201805461222890612f61565b80601f016020809104026020016040519081016040528092919081815260200182805461225490612f61565b80156122a15780601f10612276576101008083540402835291602001916122a1565b820191906000526020600020905b81548152906001019060200180831161228457829003601f168201915b505050505081526020016004820180546122ba90612f61565b80601f01602080910402602001604051908101604052809291908181526020018280546122e690612f61565b80156123335780601f1061230857610100808354040283529160200191612333565b820191906000526020600020905b81548152906001019060200180831161231657829003601f168201915b50505091835250506005919091015460ff161515602090910152835184908490811061236157612361612f03565b602002602001018190525050808061237890612f2f565b9150506120f1565b61238861244d565b806123c75760405162461bcd60e51b815260206004820152600f60248201526e06d696e74206c696d6974206973203608c1b60448201526064016107e4565b606f55565b600080831180156123df57506067548311155b61241d5760405162461bcd60e51b815260206004820152600f60248201526e125b9d985b1a590819dc9bdd5c1259608a1b60448201526064016107e4565b61242783836124a7565b806124465750612446838360008051602061312f833981519152612719565b9392505050565b6033546001600160a01b031633146111005760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016107e4565b600080831180156124ba57506067548311155b6124f85760405162461bcd60e51b815260206004820152600f60248201526e125b9d985b1a590819dc9bdd5c1259608a1b60448201526064016107e4565b6001600160a01b038216606761250f600186612f4a565b8154811061251f5761251f612f03565b60009182526020909120600160039092020101546001600160a01b031614806124465750612446838360008051602061314f833981519152612719565b600060008051602061314f833981519152821480610e0d57505060008051602061312f8339815191521490565b60006125a4838360008051602061314f833981519152612719565b15801561244657506125c5838360008051602061312f833981519152612719565b159392505050565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60008281526072602090815260408083208054825181850281018501909352808352849383018282801561267c57602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161265e575b5050505050905060005b81518110156126df57836001600160a01b03168282815181106126ab576126ab612f03565b60200260200101516001600160a01b031614156126cd57600192505050610e0d565b806126d781612f2f565b915050612686565b506000949350505050565b600054610100900460ff166127115760405162461bcd60e51b81526004016107e4906130e3565b61110061274b565b60009283526071602090815260408085206001600160a01b039490941685529281528284209184525290205460ff1690565b600054610100900460ff166127725760405162461bcd60e51b81526004016107e4906130e3565b611100336125cd565b60405180606001604052806000815260200160006001600160a01b03168152602001606081525090565b6040518060c0016040528060008152602001600081526020016060815260200160608152602001606081526020016000151581525090565b8280546127e990612f61565b90600052602060002090601f01602090048101928261280b5760008555612851565b82601f1061282457805160ff1916838001178555612851565b82800160010185558215612851579182015b82811115612851578251825591602001919060010190612836565b5061285d929150612861565b5090565b5b8082111561285d5760008155600101612862565b80356001600160a01b038116811461288d57600080fd5b919050565b6000602082840312156128a457600080fd5b61244682612876565b6000815180845260005b818110156128d3576020818501810151868301820152016128b7565b818111156128e5576000602083870101525b50601f01601f19169290920160200192915050565b60006020808301818452808551808352604092508286019150828160051b87010184880160005b8381101561297457888303603f19018552815180518452878101516001600160a01b0316888501528601516060878501819052612960818601836128ad565b968901969450505090860190600101612921565b509098975050505050505050565b60006020828403121561299457600080fd5b5035919050565b6020808252825182820181905260009190848201906040850190845b818110156129fe576129eb83855180516001600160a01b031682526020808201511515908301526040908101511515910152565b92840192606092909201916001016129b7565b50909695505050505050565b60008060408385031215612a1d57600080fd5b50508035926020909101359150565b80518252602081015160208301526000604082015160c06040850152612a5560c08501826128ad565b905060608301518482036060860152612a6e82826128ad565b91505060808301518482036080860152612a8882826128ad565b91505060a0830151151560a08501528091505092915050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015612af657603f19888603018452612ae4858351612a2c565b94509285019290850190600101612ac8565b5092979650505050505050565b600080600060608486031215612b1857600080fd5b83359250612b2860208501612876565b9150604084013590509250925092565b60008060408385031215612b4b57600080fd5b612b5483612876565b946020939093013593505050565b60008060008060808587031215612b7857600080fd5b612b8185612876565b93506020850135925060408501359150612b9d60608601612876565b905092959194509250565b6020815260006124466020830184612a2c565b60008060408385031215612bce57600080fd5b82359150612bde60208401612876565b90509250929050565b81516001600160a01b0316815260208083015115159082015260408083015115159082015260608101610e0d565b634e487b7160e01b600052604160045260246000fd5b604080519081016001600160401b0381118282101715612c4d57612c4d612c15565b60405290565b604051601f8201601f191681016001600160401b0381118282101715612c7b57612c7b612c15565b604052919050565b600082601f830112612c9457600080fd5b81356001600160401b03811115612cad57612cad612c15565b612cc0601f8201601f1916602001612c53565b818152846020838601011115612cd557600080fd5b816020850160208301376000918101602001919091529392505050565b801515811461208557600080fd5b803561288d81612cf2565b600082601f830112612d1c57600080fd5b813560206001600160401b0380831115612d3857612d38612c15565b8260051b612d47838201612c53565b9384528581018301938381019088861115612d6157600080fd5b84880192505b85831015612dd857823584811115612d7f5760008081fd5b88016040818b03601f1901811315612d975760008081fd5b612d9f612c2b565b8783013587811115612db15760008081fd5b612dbf8d8a83870101612c83565b8252509101358682015282529184019190840190612d67565b98975050505050505050565b60008060008060008060008060006101208a8c031215612e0357600080fd5b8935985060208a01356001600160401b0380821115612e2157600080fd5b612e2d8d838e01612c83565b995060408c0135915080821115612e4357600080fd5b612e4f8d838e01612c83565b985060608c0135915080821115612e6557600080fd5b612e718d838e01612c83565b975060808c01359650612e8660a08d01612d00565b9550612e9460c08d01612d00565b945060e08c013593506101008c0135915080821115612eb257600080fd5b50612ebf8c828d01612d0b565b9150509295985092959850929598565b600060208284031215612ee157600080fd5b81356001600160401b03811115612ef757600080fd5b6110d984828501612c83565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415612f4357612f43612f19565b5060010190565b600082821015612f5c57612f5c612f19565b500390565b600181811c90821680612f7557607f821691505b60208210811415612f9657634e487b7160e01b600052602260045260246000fd5b50919050565b60008219821115612faf57612faf612f19565b500190565b600060208284031215612fc657600080fd5b815161244681612cf2565b60208082526006908201526514185d5cd95960d21b604082015260600190565b6020808252601690820152752cb7ba903430bb32903737903832b936b4b9b9b4b7b760511b604082015260600190565b634e487b7160e01b600052603160045260246000fd5b600081600019048311821515161561305157613051612f19565b500290565b60006080820186835260208681850152604086818601526080606086015282865180855260a08701915060a08160051b880101945083880160005b828110156130d257888703609f19018452815180518689526130b5878a01826128ad565b918801519888019890985296509285019290850190600101613091565b50949b9a5050505050505050505050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b60608201526080019056fef38814eec94cecab51d76c4344615af8334e61ee8d4ae6b02411905a54259ecedf8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec42a2646970667358221220b5880241e7f856a19decb5d2eec554bcf9152b30752d74ca17e2685023e012a764736f6c63430008090033", + "deployedBytecode": "0x60806040526004361061014b5760003560e01c80638f184bea116100b6578063cd0a7d621161006f578063cd0a7d6214610467578063d96c2c3a1461047a578063dc2ddcae14610498578063f2fde38b146104b8578063f5620823146104d8578063f926b50c146104f857600080fd5b80638f184bea1461030f578063972f13271461032f5780639e3d87cd1461034f578063b98079bc1461036f578063c72b51761461039c578063cb8668ea146103b157600080fd5b8063471ade9811610108578063471ade9814610242578063683159fd146102625780636b1f762214610292578063715018a6146102b25780638be10337146102c75780638da5cb5b146102e757600080fd5b80630422cb161461015057806308fb5eb2146101865780631ac30e63146101a8578063331e36ea146101c857806337c81cd7146101f5578063398121a614610215575b600080fd5b34801561015c57600080fd5b5061017061016b366004612892565b610518565b60405161017d91906128fa565b60405180910390f35b34801561019257600080fd5b506101a66101a1366004612892565b61077c565b005b3480156101b457600080fd5b506101a66101c3366004612892565b61080f565b3480156101d457600080fd5b506101e86101e3366004612982565b61088f565b60405161017d919061299b565b34801561020157600080fd5b506101a6610210366004612892565b6109f0565b34801561022157600080fd5b50610235610230366004612a0a565b610a70565b60405161017d9190612aa1565b34801561024e57600080fd5b506101a661025d366004612b03565b610e13565b34801561026e57600080fd5b5061028261027d366004612b38565b6110c0565b604051901515815260200161017d565b34801561029e57600080fd5b506101a66102ad366004612982565b6110e1565b3480156102be57600080fd5b506101a66110ee565b3480156102d357600080fd5b506101a66102e2366004612b03565b611102565b3480156102f357600080fd5b506033546040516001600160a01b03909116815260200161017d565b34801561031b57600080fd5b5061017061032a366004612892565b61128a565b34801561033b57600080fd5b5061028261034a366004612b38565b611489565b34801561035b57600080fd5b506101a661036a366004612b62565b6114a2565b34801561037b57600080fd5b5061038f61038a366004612982565b6115f2565b60405161017d9190612ba8565b3480156103a857600080fd5b5061017061181a565b3480156103bd57600080fd5b5061045a6103cc366004612bbb565b604080516060808201835260008083526020808401829052928401819052835191820184526001600160a01b03949094168082529484526071825282842094845293815281832060008051602061314f83398151915284528082528284205460ff90811615158684015260008051602061312f83398151915285529152918190205490911615159082015290565b60405161017d9190612be7565b6101a6610475366004612de4565b611984565b34801561048657600080fd5b5060685460405190815260200161017d565b3480156104a457600080fd5b506101a66104b3366004612ecf565b611e1b565b3480156104c457600080fd5b506101a66104d3366004612892565b61200f565b3480156104e457600080fd5b506102356104f3366004612982565b612088565b34801561050457600080fd5b506101a6610513366004612982565b612380565b6067546060906000906001600160401b0381111561053857610538612c15565b604051908082528060200260200182016040528015610561578160200160208202803683370190505b509050600060015b60675481116105bf5761057c81866123cc565b156105ad578083838151811061059457610594612f03565b6020908102919091010152816105a981612f2f565b9250505b806105b781612f2f565b915050610569565b506000816001600160401b038111156105da576105da612c15565b60405190808252806020026020018201604052801561061357816020015b61060061277b565b8152602001906001900390816105f85790505b50905060005b82811015610773576000600185838151811061063757610637612f03565b60200260200101516106499190612f4a565b90506067818154811061065e5761065e612f03565b9060005260206000209060030201604051806060016040529081600082015481526020016001820160009054906101000a90046001600160a01b03166001600160a01b03166001600160a01b031681526020016002820180546106c090612f61565b80601f01602080910402602001604051908101604052809291908181526020018280546106ec90612f61565b80156107395780601f1061070e57610100808354040283529160200191610739565b820191906000526020600020905b81548152906001019060200180831161071c57829003601f168201915b50505050508152505083838151811061075457610754612f03565b602002602001018190525050808061076b90612f2f565b915050610619565b50949350505050565b61078461244d565b6001600160a01b0381166107ed5760405162461bcd60e51b815260206004820152602560248201527f6f7065726174696f6e20636f6e74726f6c6c6572206164647265737320697320604482015264626c616e6b60d81b60648201526084015b60405180910390fd5b607080546001600160a01b0319166001600160a01b0392909216919091179055565b61081761244d565b6001600160a01b03811661086d5760405162461bcd60e51b815260206004820152601960248201527f6d696e74206e6674206164647265737320697320626c616e6b0000000000000060448201526064016107e4565b606c80546001600160a01b0319166001600160a01b0392909216919091179055565b600081815260726020526040812054606091816001600160401b038111156108b9576108b9612c15565b60405190808252806020026020018201604052801561090457816020015b60408051606081018252600080825260208083018290529282015282526000199092019101816108d75790505b50905060005b828110156109e857600085815260726020526040812080548390811061093257610932612f03565b6000918252602080832090910154604080516060810182526001600160a01b039092168083528a855260718452818520818652845281852060008051602061314f83398151915286528085528286205460ff90811615158587015260008051602061312f8339815191528752945293819020549092161515918101919091528451919250908490849081106109c9576109c9612f03565b60200260200101819052505080806109e090612f2f565b91505061090a565b509392505050565b6109f861244d565b6001600160a01b038116610a4e5760405162461bcd60e51b815260206004820152601860248201527f72656c61796572206164647265737320697320626c616e6b000000000000000060448201526064016107e4565b606d80546001600160a01b0319166001600160a01b0392909216919091179055565b60685460609083610a8057606493505b6064841115610ac65760405162461bcd60e51b81526020600482015260126024820152716c696d697420697320746f6f206c6172676560701b60448201526064016107e4565b80831115610b0c5760405162461bcd60e51b81526020600482015260136024820152726f666673657420697320746f6f206c6172676560681b60448201526064016107e4565b80610b178486612f9c565b1115610b2a57610b278382612f4a565b93505b6000846001600160401b03811115610b4457610b44612c15565b604051908082528060200260200182016040528015610b7d57816020015b610b6a6127a5565b815260200190600190039081610b625790505b50905060005b85811015610e08576000610b978287612f9c565b610ba2906001612f9c565b610bac9085612f4a565b10610df6576068610bbd8287612f9c565b610bc8906001612f9c565b610bd29085612f4a565b81548110610be257610be2612f03565b90600052602060002090600602016040518060c00160405290816000820154815260200160018201548152602001600282018054610c1f90612f61565b80601f0160208091040260200160405190810160405280929190818152602001828054610c4b90612f61565b8015610c985780601f10610c6d57610100808354040283529160200191610c98565b820191906000526020600020905b815481529060010190602001808311610c7b57829003601f168201915b50505050508152602001600382018054610cb190612f61565b80601f0160208091040260200160405190810160405280929190818152602001828054610cdd90612f61565b8015610d2a5780601f10610cff57610100808354040283529160200191610d2a565b820191906000526020600020905b815481529060010190602001808311610d0d57829003601f168201915b50505050508152602001600482018054610d4390612f61565b80601f0160208091040260200160405190810160405280929190818152602001828054610d6f90612f61565b8015610dbc5780601f10610d9157610100808354040283529160200191610dbc565b820191906000526020600020905b815481529060010190602001808311610d9f57829003601f168201915b50505091835250506005919091015460ff1615156020909101528251839083908110610dea57610dea612f03565b60200260200101819052505b80610e0081612f2f565b915050610b83565b509150505b92915050565b60705460408051635c975abb60e01b815290516001600160a01b03909216918291635c975abb916004808301926020929190829003018186803b158015610e5957600080fd5b505afa158015610e6d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e919190612fb4565b15610eae5760405162461bcd60e51b81526004016107e490612fd1565b83610eb981336124a7565b610ed55760405162461bcd60e51b81526004016107e490612ff1565b610ede8361255c565b610f195760405162461bcd60e51b815260206004820152600c60248201526b496e76616c696420726f6c6560a01b60448201526064016107e4565b60008581526071602090815260408083206001600160a01b038816845282528083208684528252808320805460ff1916905587835260729091529020548015801590610f6a5750610f6a8686612589565b156110b8576001811115611078576000805b82811015610fe557600088815260726020526040902080546001600160a01b038916919083908110610fb057610fb0612f03565b6000918252602090912001546001600160a01b03161415610fd357809150610fe5565b80610fdd81612f2f565b915050610f7c565b506000878152607260205260409020610fff600184612f4a565b8154811061100f5761100f612f03565b60009182526020808320909101548983526072909152604090912080546001600160a01b03909216918390811061104857611048612f03565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550505b600086815260726020526040902080548061109557611095613021565b600082815260209020810160001990810180546001600160a01b03191690550190555b505050505050565b6000818152606b60205260408120546110d981856124a7565b949350505050565b6110e961244d565b606e55565b6110f661244d565b61110060006125cd565b565b60705460408051635c975abb60e01b815290516001600160a01b03909216918291635c975abb916004808301926020929190829003018186803b15801561114857600080fd5b505afa15801561115c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111809190612fb4565b1561119d5760405162461bcd60e51b81526004016107e490612fd1565b836111a881336124a7565b6111c45760405162461bcd60e51b81526004016107e490612ff1565b6111cd8361255c565b6112085760405162461bcd60e51b815260206004820152600c60248201526b496e76616c696420726f6c6560a01b60448201526064016107e4565b60008581526071602090815260408083206001600160a01b038816845282528083208684529091529020805460ff19166001179055611247858561261f565b6112835760008581526072602090815260408220805460018101825590835291200180546001600160a01b0319166001600160a01b0386161790555b5050505050565b6001600160a01b038116600090815260696020526040812054606754606092826001600160401b038111156112c1576112c1612c15565b6040519080825280602002602001820160405280156112fa57816020015b6112e761277b565b8152602001906001900390816112df5790505b5090506000805b8381101561147e57866001600160a01b03166067828154811061132657611326612f03565b60009182526020909120600160039092020101546001600160a01b0316141561146c576067818154811061135c5761135c612f03565b9060005260206000209060030201604051806060016040529081600082015481526020016001820160009054906101000a90046001600160a01b03166001600160a01b03166001600160a01b031681526020016002820180546113be90612f61565b80601f01602080910402602001604051908101604052809291908181526020018280546113ea90612f61565b80156114375780601f1061140c57610100808354040283529160200191611437565b820191906000526020600020905b81548152906001019060200180831161141a57829003601f168201915b50505050508152505083838151811061145257611452612f03565b6020026020010181905250818061146890612f2f565b9250505b8061147681612f2f565b915050611301565b509095945050505050565b6000818152606b60205260408120546110d981856123cc565b600054600290610100900460ff161580156114c4575060005460ff8083169116105b6115275760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016107e4565b6000805461ffff191660ff8316176101001790556115436126ea565b6066541580156115535750606554155b1561157457611566606680546001019055565b611574606580546001019055565b61157d856109f0565b611586846110e1565b61158f83612380565b607080546001600160a01b0319166001600160a01b0384161790556000805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15050505050565b6115fa6127a5565b6000611607600184612f4a565b905060006068828154811061161e5761161e612f03565b90600052602060002090600602016040518060c0016040529081600082015481526020016001820154815260200160028201805461165b90612f61565b80601f016020809104026020016040519081016040528092919081815260200182805461168790612f61565b80156116d45780601f106116a9576101008083540402835291602001916116d4565b820191906000526020600020905b8154815290600101906020018083116116b757829003601f168201915b505050505081526020016003820180546116ed90612f61565b80601f016020809104026020016040519081016040528092919081815260200182805461171990612f61565b80156117665780601f1061173b57610100808354040283529160200191611766565b820191906000526020600020905b81548152906001019060200180831161174957829003601f168201915b5050505050815260200160048201805461177f90612f61565b80601f01602080910402602001604051908101604052809291908181526020018280546117ab90612f61565b80156117f85780601f106117cd576101008083540402835291602001916117f8565b820191906000526020600020905b8154815290600101906020018083116117db57829003601f168201915b50505091835250506005919091015460ff161515602090910152949350505050565b6067546060906000816001600160401b0381111561183a5761183a612c15565b60405190808252806020026020018201604052801561187357816020015b61186061277b565b8152602001906001900390816118585790505b50606780546040805160208084028201810190925282815293945060009084015b8282101561197857600084815260209081902060408051606081018252600386029092018054835260018101546001600160a01b031693830193909352600283018054929392918401916118e790612f61565b80601f016020809104026020016040519081016040528092919081815260200182805461191390612f61565b80156119605780601f1061193557610100808354040283529160200191611960565b820191906000526020600020905b81548152906001019060200180831161194357829003601f168201915b50505050508152505081526020019060010190611894565b50929695505050505050565b8861198f81336123cc565b6119ab5760405162461bcd60e51b81526004016107e490612ff1565b60705460408051635c975abb60e01b815290516001600160a01b03909216918291635c975abb916004808301926020929190829003018186803b1580156119f157600080fd5b505afa158015611a05573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a299190612fb4565b15611a465760405162461bcd60e51b81526004016107e490612fd1565b600087118015611a585750606f548711155b611a9c5760405162461bcd60e51b81526020600482015260156024820152741b5a5b9d081b1a5b5a5d081a5cc81a5b9d985b1a59605a1b60448201526064016107e4565b8515611b9957606e54600090611ab23a8a613037565b611abc9190613037565b905080341015611b015760405162461bcd60e51b815260206004820152601060248201526f4e6f7420656e6f7567682076616c756560801b60448201526064016107e4565b606d546040516000916001600160a01b03169034908381818185875af1925050503d8060008114611b4e576040519150601f19603f3d011682016040523d82523d6000602084013e611b53565b606091505b5050905080611b965760405162461bcd60e51b815260206004820152600f60248201526e1d1c985b9cd9995c8819985a5b1959608a1b60448201526064016107e4565b50505b6000611ba460655490565b9050611bb4606580546001019055565b6040805160c08101825282815260208082018f81529282018e8152606083018e9052608083018d90528a151560a084015260688054600181018255600091909152835160069091027fa2153420d844928b4421650203c77babc8b33d7f2e7b450e2966db0c22097753810191825594517fa2153420d844928b4421650203c77babc8b33d7f2e7b450e2966db0c220977548601559051805193949193611c83937fa2153420d844928b4421650203c77babc8b33d7f2e7b450e2966db0c220977559093019291909101906127dd565b5060608201518051611c9f9160038401916020909101906127dd565b5060808201518051611cbb9160048401916020909101906127dd565b5060a091909101516005909101805460ff1916911515919091179055606c5460405163ef3ad9eb60e01b81526001600160a01b0390911690819063ef3ad9eb90611d0f9085908d908b908b90600401613056565b600060405180830381600087803b158015611d2957600080fd5b505af1158015611d3d573d6000803e3d6000fd5b505050508615611da95760405163e572e74b60e01b815260048101839052600160248201526001600160a01b0382169063e572e74b90604401600060405180830381600087803b158015611d9057600080fd5b505af1158015611da4573d6000803e3d6000fd5b505050505b60008d8152606a60209081526040808320805460018101825590845282842001859055848352606b8252918290208f9055905183815233917fffde68815858e4c88d054382adadf9d3280426c744cf9c1991303ff77afdc1e2910160405180910390a250505050505050505050505050565b60705460408051635c975abb60e01b815290516001600160a01b03909216918291635c975abb916004808301926020929190829003018186803b158015611e6157600080fd5b505afa158015611e75573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e999190612fb4565b15611eb65760405162461bcd60e51b81526004016107e490612fd1565b6000611ec160665490565b9050611ed1606680546001019055565b6040805160608101825282815233602080830191825292820186815260678054600181018255600091909152835160039091027f9787eeb91fe3101235e4a76063c7023ecb40f923f97916639c598592fa30d6ae810191825592517f9787eeb91fe3101235e4a76063c7023ecb40f923f97916639c598592fa30d6af840180546001600160a01b03929092166001600160a01b03199092169190911790559051805193949193611fa8937f9787eeb91fe3101235e4a76063c7023ecb40f923f97916639c598592fa30d6b0019291909101906127dd565b505033600081815260696020908152604080832080546001810182559084529190922001849055519091507f88d8a40d3d79893e13972978642d5fe29930912ee4c0b62a535815945c1d7bd0906120029084815260200190565b60405180910390a2505050565b61201761244d565b6001600160a01b03811661207c5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016107e4565b612085816125cd565b50565b6000818152606a6020526040812054606091816001600160401b038111156120b2576120b2612c15565b6040519080825280602002602001820160405280156120eb57816020015b6120d86127a5565b8152602001906001900390816120d05790505b50905060005b828110156109e8576000858152606a6020526040812060016121138487612f4a565b61211d9190612f4a565b8154811061212d5761212d612f03565b9060005260206000200154905060686001826121499190612f4a565b8154811061215957612159612f03565b90600052602060002090600602016040518060c0016040529081600082015481526020016001820154815260200160028201805461219690612f61565b80601f01602080910402602001604051908101604052809291908181526020018280546121c290612f61565b801561220f5780601f106121e45761010080835404028352916020019161220f565b820191906000526020600020905b8154815290600101906020018083116121f257829003601f168201915b5050505050815260200160038201805461222890612f61565b80601f016020809104026020016040519081016040528092919081815260200182805461225490612f61565b80156122a15780601f10612276576101008083540402835291602001916122a1565b820191906000526020600020905b81548152906001019060200180831161228457829003601f168201915b505050505081526020016004820180546122ba90612f61565b80601f01602080910402602001604051908101604052809291908181526020018280546122e690612f61565b80156123335780601f1061230857610100808354040283529160200191612333565b820191906000526020600020905b81548152906001019060200180831161231657829003601f168201915b50505091835250506005919091015460ff161515602090910152835184908490811061236157612361612f03565b602002602001018190525050808061237890612f2f565b9150506120f1565b61238861244d565b806123c75760405162461bcd60e51b815260206004820152600f60248201526e06d696e74206c696d6974206973203608c1b60448201526064016107e4565b606f55565b600080831180156123df57506067548311155b61241d5760405162461bcd60e51b815260206004820152600f60248201526e125b9d985b1a590819dc9bdd5c1259608a1b60448201526064016107e4565b61242783836124a7565b806124465750612446838360008051602061312f833981519152612719565b9392505050565b6033546001600160a01b031633146111005760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016107e4565b600080831180156124ba57506067548311155b6124f85760405162461bcd60e51b815260206004820152600f60248201526e125b9d985b1a590819dc9bdd5c1259608a1b60448201526064016107e4565b6001600160a01b038216606761250f600186612f4a565b8154811061251f5761251f612f03565b60009182526020909120600160039092020101546001600160a01b031614806124465750612446838360008051602061314f833981519152612719565b600060008051602061314f833981519152821480610e0d57505060008051602061312f8339815191521490565b60006125a4838360008051602061314f833981519152612719565b15801561244657506125c5838360008051602061312f833981519152612719565b159392505050565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60008281526072602090815260408083208054825181850281018501909352808352849383018282801561267c57602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161265e575b5050505050905060005b81518110156126df57836001600160a01b03168282815181106126ab576126ab612f03565b60200260200101516001600160a01b031614156126cd57600192505050610e0d565b806126d781612f2f565b915050612686565b506000949350505050565b600054610100900460ff166127115760405162461bcd60e51b81526004016107e4906130e3565b61110061274b565b60009283526071602090815260408085206001600160a01b039490941685529281528284209184525290205460ff1690565b600054610100900460ff166127725760405162461bcd60e51b81526004016107e4906130e3565b611100336125cd565b60405180606001604052806000815260200160006001600160a01b03168152602001606081525090565b6040518060c0016040528060008152602001600081526020016060815260200160608152602001606081526020016000151581525090565b8280546127e990612f61565b90600052602060002090601f01602090048101928261280b5760008555612851565b82601f1061282457805160ff1916838001178555612851565b82800160010185558215612851579182015b82811115612851578251825591602001919060010190612836565b5061285d929150612861565b5090565b5b8082111561285d5760008155600101612862565b80356001600160a01b038116811461288d57600080fd5b919050565b6000602082840312156128a457600080fd5b61244682612876565b6000815180845260005b818110156128d3576020818501810151868301820152016128b7565b818111156128e5576000602083870101525b50601f01601f19169290920160200192915050565b60006020808301818452808551808352604092508286019150828160051b87010184880160005b8381101561297457888303603f19018552815180518452878101516001600160a01b0316888501528601516060878501819052612960818601836128ad565b968901969450505090860190600101612921565b509098975050505050505050565b60006020828403121561299457600080fd5b5035919050565b6020808252825182820181905260009190848201906040850190845b818110156129fe576129eb83855180516001600160a01b031682526020808201511515908301526040908101511515910152565b92840192606092909201916001016129b7565b50909695505050505050565b60008060408385031215612a1d57600080fd5b50508035926020909101359150565b80518252602081015160208301526000604082015160c06040850152612a5560c08501826128ad565b905060608301518482036060860152612a6e82826128ad565b91505060808301518482036080860152612a8882826128ad565b91505060a0830151151560a08501528091505092915050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015612af657603f19888603018452612ae4858351612a2c565b94509285019290850190600101612ac8565b5092979650505050505050565b600080600060608486031215612b1857600080fd5b83359250612b2860208501612876565b9150604084013590509250925092565b60008060408385031215612b4b57600080fd5b612b5483612876565b946020939093013593505050565b60008060008060808587031215612b7857600080fd5b612b8185612876565b93506020850135925060408501359150612b9d60608601612876565b905092959194509250565b6020815260006124466020830184612a2c565b60008060408385031215612bce57600080fd5b82359150612bde60208401612876565b90509250929050565b81516001600160a01b0316815260208083015115159082015260408083015115159082015260608101610e0d565b634e487b7160e01b600052604160045260246000fd5b604080519081016001600160401b0381118282101715612c4d57612c4d612c15565b60405290565b604051601f8201601f191681016001600160401b0381118282101715612c7b57612c7b612c15565b604052919050565b600082601f830112612c9457600080fd5b81356001600160401b03811115612cad57612cad612c15565b612cc0601f8201601f1916602001612c53565b818152846020838601011115612cd557600080fd5b816020850160208301376000918101602001919091529392505050565b801515811461208557600080fd5b803561288d81612cf2565b600082601f830112612d1c57600080fd5b813560206001600160401b0380831115612d3857612d38612c15565b8260051b612d47838201612c53565b9384528581018301938381019088861115612d6157600080fd5b84880192505b85831015612dd857823584811115612d7f5760008081fd5b88016040818b03601f1901811315612d975760008081fd5b612d9f612c2b565b8783013587811115612db15760008081fd5b612dbf8d8a83870101612c83565b8252509101358682015282529184019190840190612d67565b98975050505050505050565b60008060008060008060008060006101208a8c031215612e0357600080fd5b8935985060208a01356001600160401b0380821115612e2157600080fd5b612e2d8d838e01612c83565b995060408c0135915080821115612e4357600080fd5b612e4f8d838e01612c83565b985060608c0135915080821115612e6557600080fd5b612e718d838e01612c83565b975060808c01359650612e8660a08d01612d00565b9550612e9460c08d01612d00565b945060e08c013593506101008c0135915080821115612eb257600080fd5b50612ebf8c828d01612d0b565b9150509295985092959850929598565b600060208284031215612ee157600080fd5b81356001600160401b03811115612ef757600080fd5b6110d984828501612c83565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415612f4357612f43612f19565b5060010190565b600082821015612f5c57612f5c612f19565b500390565b600181811c90821680612f7557607f821691505b60208210811415612f9657634e487b7160e01b600052602260045260246000fd5b50919050565b60008219821115612faf57612faf612f19565b500190565b600060208284031215612fc657600080fd5b815161244681612cf2565b60208082526006908201526514185d5cd95960d21b604082015260600190565b6020808252601690820152752cb7ba903430bb32903737903832b936b4b9b9b4b7b760511b604082015260600190565b634e487b7160e01b600052603160045260246000fd5b600081600019048311821515161561305157613051612f19565b500290565b60006080820186835260208681850152604086818601526080606086015282865180855260a08701915060a08160051b880101945083880160005b828110156130d257888703609f19018452815180518689526130b5878a01826128ad565b918801519888019890985296509285019290850190600101613091565b50949b9a5050505050505050505050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b60608201526080019056fef38814eec94cecab51d76c4344615af8334e61ee8d4ae6b02411905a54259ecedf8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec42a2646970667358221220b5880241e7f856a19decb5d2eec554bcf9152b30752d74ca17e2685023e012a764736f6c63430008090033", "linkReferences": {}, "deployedLinkReferences": {} } diff --git a/frontend/src/contracts/MintNFT.json b/frontend/src/contracts/MintNFT.json index 3fdac2c2..9436a04c 100644 --- a/frontend/src/contracts/MintNFT.json +++ b/frontend/src/contracts/MintNFT.json @@ -123,6 +123,25 @@ "name": "MintedNFTAttributeURL", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "eventId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bool", + "name": "isNonTransferable", + "type": "bool" + } + ], + "name": "NonTransferable", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -278,6 +297,24 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_eventId", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "_isNonTransferable", + "type": "bool" + } + ], + "name": "changeNonTransferable", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ { @@ -315,6 +352,25 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + } + ], + "name": "getEventIdOfTokenId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -353,6 +409,25 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_eventId", + "type": "uint256" + } + ], + "name": "getIsNonTransferable", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -480,6 +555,25 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "eventId", + "type": "uint256" + } + ], + "name": "getTokenIdsByEvent", + "outputs": [ + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -763,6 +857,42 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "eventId", + "type": "uint256" + }, + { + "internalType": "uint256[]", + "name": "tokenIds", + "type": "uint256[]" + } + ], + "name": "setEventIdOfTokenIds", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "eventIds", + "type": "uint256[]" + }, + { + "internalType": "uint256[][]", + "name": "tokenIdsArr", + "type": "uint256[][]" + } + ], + "name": "setEventIdOfTokenIdsBatch", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ { @@ -960,8 +1090,8 @@ "type": "function" } ], - "bytecode": "0x608060405234801561001057600080fd5b50613e1f806100206000396000f3fe608060405234801561001057600080fd5b50600436106102275760003560e01c8063715018a611610130578063b88d4fde116100b8578063df4b39dd1161007c578063df4b39dd146104e8578063e985e9c51461050c578063ef3ad9eb14610548578063f2fde38b1461055b578063fa86623b1461056e57600080fd5b8063b88d4fde14610489578063c0c53b8b1461049c578063c4b88ea4146104af578063c87b56dd146104c2578063d622abc2146104d557600080fd5b806394d84290116100ff57806394d842901461042857806395d89b411461043b5780639dcd681114610443578063a22cb46514610456578063af5723b11461046957600080fd5b8063715018a6146103dc5780638da5cb5b146103e45780638f70738e146103f55780639041e3f41461041557600080fd5b80632f745c59116101b35780634f6ccce7116101825780634f6ccce7146103605780634ffc9f4b14610373578063572b6c05146103945780636352211e146103b657806370a08231146103c957600080fd5b80632f745c591461031457806342842e0e1461032757806342966c681461033a5780634df301491461034d57600080fd5b80630daa8be7116101fa5780630daa8be7146102a957806312b90fd6146102bc57806318160ddd146102cf57806319ffeb3b146102e157806323b872dd1461030157600080fd5b806301ffc9a71461022c57806306fdde0314610254578063081812fc14610269578063095ea7b314610294575b600080fd5b61023f61023a3660046130a3565b610581565b60405190151581526020015b60405180910390f35b61025c6105ac565b60405161024b919061311f565b61027c610277366004613132565b61063e565b6040516001600160a01b03909116815260200161024b565b6102a76102a2366004613160565b610665565b005b6102a76102b736600461319a565b610792565b6102a76102ca36600461327d565b61092d565b6099545b60405190815260200161024b565b6102f46102ef366004613327565b610b78565b60405161024b9190613353565b6102a761030f3660046133c9565b610ead565b6102d3610322366004613160565b610ee5565b6102a76103353660046133c9565b610f7b565b6102a7610348366004613132565b610f96565b61023f61035b366004613477565b610faa565b6102d361036e366004613132565b6110ff565b6102d3610381366004613132565b6000908152610134602052604090205490565b61023f6103a23660046134a5565b60c9546001600160a01b0391821691161490565b61027c6103c4366004613132565b611192565b6102d36103d73660046134a5565b6111f2565b6102a7611278565b60fc546001600160a01b031661027c565b610408610403366004613132565b61128c565b60405161024b91906134c2565b6102a76104233660046134a5565b6115b7565b6102d3610436366004613132565b611638565b61025c6116ca565b6102a7610451366004613524565b6116d9565b6102a7610464366004613546565b611870565b61047c610477366004613574565b611886565b60405161024b9190613604565b6102a76104973660046136af565b611986565b6102a76104aa36600461372e565b6119c5565b61047c6104bd366004613132565b611b2a565b61025c6104d0366004613132565b611b97565b61023f6104e3366004613160565b611c3c565b61023f6104f6366004613132565b6000908152610136602052604090205460ff1690565b61023f61051a366004613779565b6001600160a01b039182166000908152606a6020908152604080832093909416825291909152205460ff1690565b6102a76105563660046137a7565b611c68565b6102a76105693660046134a5565b611dfb565b6102a761057c3660046138cd565b611e71565b60006001600160e01b0319821663780e9d6360e01b14806105a657506105a682611f85565b92915050565b6060606580546105bb90613904565b80601f01602080910402602001604051908101604052809291908181526020018280546105e790613904565b80156106345780601f1061060957610100808354040283529160200191610634565b820191906000526020600020905b81548152906001019060200180831161061757829003601f168201915b5050505050905090565b600061064982611fd5565b506000908152606960205260409020546001600160a01b031690565b600061067082611192565b9050806001600160a01b0316836001600160a01b031614156106e35760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084015b60405180910390fd5b806001600160a01b03166106f5612034565b6001600160a01b0316148061071157506107118161051a612034565b6107835760405162461bcd60e51b815260206004820152603e60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206e6f7220617070726f76656420666f7220616c6c000060648201526084016106da565b61078d8383612064565b505050565b61012f5482906001600160a01b03168063972f13276107af612034565b6040516001600160e01b031960e084901b1681526001600160a01b0390911660048201526024810185905260440160206040518083038186803b1580156107f557600080fd5b505afa158015610809573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061082d919061394f565b6108495760405162461bcd60e51b81526004016106da9061396c565b6101395460408051635c975abb60e01b815290516001600160a01b03909216918291635c975abb916004808301926020929190829003018186803b15801561089057600080fd5b505afa1580156108a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108c8919061394f565b156108d257600080fd5b60008581526101366020908152604091829020805460ff1916871515908117909155915191825286917f1e3ed2b292ed72652054799a4fde74789a8670c153df666f76e01345ec318281910160405180910390a25050505050565b61012f5482906001600160a01b03168063972f132761094a612034565b6040516001600160e01b031960e084901b1681526001600160a01b0390911660048201526024810185905260440160206040518083038186803b15801561099057600080fd5b505afa1580156109a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109c8919061394f565b6109e45760405162461bcd60e51b81526004016106da9061396c565b6101395460408051635c975abb60e01b815290516001600160a01b03909216918291635c975abb916004808301926020929190829003018186803b158015610a2b57600080fd5b505afa158015610a3f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a63919061394f565b15610a6d57600080fd5b6000610a7886611638565b8551600088815261013460205260409020549192501115610adb5760405162461bcd60e51b815260206004820152601d60248201527f72656d61696e696e6720636f756e74206973206e6f7420656e6f75676800000060448201526064016106da565b60005b8551811015610b31576000868281518110610afb57610afb61399c565b60200260200101519050610b0f8189611c3c565b610b1e57610b1e8389836120d2565b5080610b29816139c8565b915050610ade565b5085610b3b612034565b6001600160a01b03167ff0fae1d6c53c230d212972a098b7dbf41d3a6dbb348a4ebf640a51ce63cd3b6760405160405180910390a3505050505050565b606082610b8457606492505b6064831115610bca5760405162461bcd60e51b81526020600482015260126024820152716c696d697420697320746f6f206c6172676560701b60448201526064016106da565b6000836001600160401b03811115610be457610be46131ca565b604051908082528060200260200182016040528015610c2a57816020015b604080518082019091526060815260006020820152815260200190600190039081610c025790505b509050610c39846000196139e3565b831115610c945760405162461bcd60e51b815260206004820152602360248201527f6c696d6974202b206f6666736574206d757374206265203c3d20325e323536206044820152622d203160e81b60648201526084016106da565b6000610ca084866139fa565b90506000845b82811015610de85760006101336000610cbf8b856123cc565b81526020019081526020016000208054610cd890613904565b80601f0160208091040260200160405190810160405280929190818152602001828054610d0490613904565b8015610d515780601f10610d2657610100808354040283529160200191610d51565b820191906000526020600020905b815481529060010190602001808311610d3457829003601f168201915b505060408051600081526020810180835281519020959650610d799450869350019050613a12565b6040516020818303038152906040528051906020012014610dd557604051806040016040528082815260200183815250858481518110610dbb57610dbb61399c565b60200260200101819052508280610dd1906139c8565b9350505b5080610de0816139c8565b915050610ca6565b506000816001600160401b03811115610e0357610e036131ca565b604051908082528060200260200182016040528015610e4957816020015b604080518082019091526060815260006020820152815260200190600190039081610e215790505b50905060005b82811015610ea157848181518110610e6957610e6961399c565b6020026020010151828281518110610e8357610e8361399c565b60200260200101819052508080610e99906139c8565b915050610e4f565b50979650505050505050565b610ebe610eb8612034565b82612402565b610eda5760405162461bcd60e51b81526004016106da90613a2e565b61078d838383612481565b6000610ef0836111f2565b8210610f525760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b60648201526084016106da565b506001600160a01b03919091166000908152609760209081526040808320938352929052205490565b61078d83838360405180602001604052806000815250611986565b610f9e612628565b610fa7816126a1565b50565b6000610fb68284612748565b610ffa5760405162461bcd60e51b8152602060048201526015602482015274696e76616c6964207365637265742070687261736560581b60448201526064016106da565b600083815261013460205260409020546110565760405162461bcd60e51b815260206004820152601760248201527f72656d61696e696e6720636f756e74206973207a65726f00000000000000000060448201526064016106da565b611067611061612034565b84611c3c565b156110a55760405162461bcd60e51b815260206004820152600e60248201526d185b1c9958591e481b5a5b9d195960921b60448201526064016106da565b6000838152610136602052604090205460ff16156110f65760405162461bcd60e51b815260206004820152600e60248201526d1b5a5b9d081a5cc81b1bd8dad95960921b60448201526064016106da565b50600192915050565b600061110a60995490565b821061116d5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b60648201526084016106da565b609982815481106111805761118061399c565b90600052602060002001549050919050565b6000818152606760205260408120546001600160a01b0316806105a65760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b60448201526064016106da565b60006001600160a01b03821661125c5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b60648201526084016106da565b506001600160a01b031660009081526068602052604090205490565b611280612628565b61128a60006127f6565b565b61012f5460405163f562082360e01b8152600481018390526060916001600160a01b031690600090829063f56208239060240160006040518083038186803b1580156112d757600080fd5b505afa1580156112eb573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526113139190810190613b79565b9050600081516001600160401b03811115611330576113306131ca565b60405190808252806020026020018201604052801561136357816020015b606081526020019060019003908161134e5790505b5090506000805b83518110156113f0576113998482815181106113885761138861399c565b602002602001015160000151611b2a565b8382815181106113ab576113ab61399c565b60200260200101819052508281815181106113c8576113c861399c565b602002602001015151826113dc91906139fa565b9150806113e8816139c8565b91505061136a565b506000816001600160401b0381111561140b5761140b6131ca565b60405190808252806020026020018201604052801561146957816020015b611456604051806060016040528060006001600160a01b0316815260200160008152602001600081525090565b8152602001906001900390816114295790505b50905060005b828110156115ac5760005b85518110156115a65760005b8582815181106114985761149861399c565b6020026020010151518110156115935760405180606001604052808784815181106114c5576114c561399c565b602002602001015183815181106114de576114de61399c565b6020026020010151600001516001600160a01b0316815260200188848151811061150a5761150a61399c565b602002602001015160000151815260200187848151811061152d5761152d61399c565b602002602001015183815181106115465761154661399c565b6020026020010151602001518152508484815181106115675761156761399c565b6020026020010181905250828061157d906139c8565b935050808061158b906139c8565b915050611486565b508061159e816139c8565b91505061147a565b5061146f565b509695505050505050565b6115bf612628565b6001600160a01b0381166116155760405162461bcd60e51b815260206004820152601e60248201527f6576656e74206d616e61676572206164647265737320697320626c616e6b000060448201526064016106da565b61012f80546001600160a01b0319166001600160a01b0392909216919091179055565b61012f54604051632e601e6f60e21b8152600481018390526000916001600160a01b0316908290829063b98079bc9060240160006040518083038186803b15801561168257600080fd5b505afa158015611696573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526116be9190810190613c29565b60200151949350505050565b6060606680546105bb90613904565b61012f5482906001600160a01b03168063972f13276116f6612034565b6040516001600160e01b031960e084901b1681526001600160a01b0390911660048201526024810185905260440160206040518083038186803b15801561173c57600080fd5b505afa158015611750573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611774919061394f565b6117905760405162461bcd60e51b81526004016106da9061396c565b6101395460408051635c975abb60e01b815290516001600160a01b03909216918291635c975abb916004808301926020929190829003018186803b1580156117d757600080fd5b505afa1580156117eb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061180f919061394f565b1561181957600080fd5b60008581526101356020526040902084905584611834612034565b6001600160a01b03167fae5b067be3e4869ca571a499572a09085a17c3d0442a8965b8356bf47f63ba9960405160405180910390a35050505050565b61188261187b612034565b8383612848565b5050565b6060600082516001600160401b038111156118a3576118a36131ca565b6040519080825280602002602001820160405280156118e857816020015b60408051808201909152600080825260208201528152602001906001900390816118c15790505b50905060005b835181101561197f5760405180604001604052806119248684815181106119175761191761399c565b6020026020010151611192565b6001600160a01b031681526020018583815181106119445761194461399c565b60200260200101518152508282815181106119615761196161399c565b60200260200101819052508080611977906139c8565b9150506118ee565b5092915050565b611997611991612034565b83612402565b6119b35760405162461bcd60e51b81526004016106da90613a2e565b6119bf84848484612917565b50505050565b600054600490610100900460ff161580156119e7575060005460ff8083169116105b611a4a5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016106da565b6000805461ffff191660ff83161761010017905560408051808201825260098152684d696e7452616c6c7960b81b6020808301919091528251808401909352600283526126a960f11b90830152611aa09161294a565b611aa861297b565b611ab1846129aa565b61013780546001600160a01b038581166001600160a01b0319928316179092556101398054928516929091169190911790556000805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150505050565b60606105a66101386000848152602001908152602001600020805480602002602001604051908101604052809291908181526020018280548015611b8d57602002820191906000526020600020905b815481526020019060010190808311611b79575b5050505050611886565b60008181526101306020526040812080546060929190611bb690613904565b80601f0160208091040260200160405190810160405280929190818152602001828054611be290613904565b8015611c2f5780601f10611c0457610100808354040283529160200191611c2f565b820191906000526020600020905b815481529060010190602001808311611c1257829003601f168201915b5093979650505050505050565b60006101316000611c4d85856129fb565b815260208101919091526040016000205460ff169392505050565b6101395460408051635c975abb60e01b815290516001600160a01b03909216918291635c975abb916004808301926020929190829003018186803b158015611caf57600080fd5b505afa158015611cc3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ce7919061394f565b15611cf157600080fd5b61012f546001600160a01b0316611d06612034565b6001600160a01b031614611d4b5760405162461bcd60e51b815260206004820152600c60248201526b1d5b985d5d1a1bdc9a5e995960a21b60448201526064016106da565b60008581526101346020908152604080832087905561013590915281208490555b8251811015611df357828181518110611d8757611d8761399c565b6020026020010151600001516101336000611dbf89878681518110611dae57611dae61399c565b6020026020010151602001516123cc565b81526020019081526020016000209080519060200190611de0929190612ff4565b5080611deb816139c8565b915050611d6c565b505050505050565b611e03612628565b6001600160a01b038116611e685760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016106da565b610fa7816127f6565b6101395460408051635c975abb60e01b815290516001600160a01b03909216918291635c975abb916004808301926020929190829003018186803b158015611eb857600080fd5b505afa158015611ecc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ef0919061394f565b15611efa57600080fd5b611f048383610faa565b506101375460405163635e393960e11b81526001600160a01b0390911690819063c6bc727290611f3a9086908890600401613c80565b600060405180830381600087803b158015611f5457600080fd5b505af1158015611f68573d6000803e3d6000fd5b50505050611f7e8585611f79612034565b6120d2565b5050505050565b60006001600160e01b031982166380ac58cd60e01b1480611fb657506001600160e01b03198216635b5e139f60e01b145b806105a657506301ffc9a760e01b6001600160e01b03198316146105a6565b6000818152606760205260409020546001600160a01b0316610fa75760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b60448201526064016106da565b60c9546000906001600160a01b0316331415612057575060131936013560601c90565b61205f612a29565b905090565b600081815260696020526040902080546001600160a01b0319166001600160a01b038416908117909155819061209982611192565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600082815261013460205260409020546120ee906001906139e3565b600083815261013460205260408120919091556001906101319061211284866129fb565b815260200190815260200160002060006101000a81548160ff021916908315150217905550600061214382856129fb565b600081815261013260205260409020549091506121618160016139fa565b600083815261013260205260408120919091556101338161218287826123cc565b8152602001908152602001600020805461219b90613904565b80601f01602080910402602001604051908101604052809291908181526020018280546121c790613904565b80156122145780601f106121e957610100808354040283529160200191612214565b820191906000526020600020905b8154815290600101906020018083116121f757829003601f168201915b505050505090506000610133600061222c88866123cc565b8152602001908152602001600020805461224590613904565b80601f016020809104026020016040519081016040528092919081815260200182805461227190613904565b80156122be5780601f10612293576101008083540402835291602001916122be565b820191906000526020600020905b8154815290600101906020018083116122a157829003601f168201915b5050604080516000815260208101808352815190209596506122e69450869350019050613a12565b6040516020818303038152906040528051906020012014612305578091505b81610130600061231561012e5490565b81526020019081526020016000209080519060200190612336929190612ff4565b5060008681526101386020526040902061012e54815460018101835560009283526020909220909101556123738561236e61012e5490565b612a51565b61238261012e80546001019055565b846001600160a01b03167faf2fad1984d2c7abaa9300537cf9fe1bcfaf2d6226e4ffdf03522dbf3064808e836040516123bb919061311f565b60405180910390a250505050505050565b60408051602081018490529081018290526000906060015b60405160208183030381529060405280519060200120905092915050565b60008061240e83611192565b9050806001600160a01b0316846001600160a01b0316148061245557506001600160a01b038082166000908152606a602090815260408083209388168352929052205460ff165b806124795750836001600160a01b031661246e8461063e565b6001600160a01b0316145b949350505050565b826001600160a01b031661249482611192565b6001600160a01b0316146124f85760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b60648201526084016106da565b6001600160a01b03821661255a5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016106da565b612565838383612a6b565b612570600082612064565b6001600160a01b03831660009081526068602052604081208054600192906125999084906139e3565b90915550506001600160a01b03821660009081526068602052604081208054600192906125c79084906139fa565b909155505060008181526067602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b612630612034565b6001600160a01b031661264b60fc546001600160a01b031690565b6001600160a01b03161461128a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016106da565b60006126ac82611192565b90506126ba81600084612a6b565b6126c5600083612064565b6001600160a01b03811660009081526068602052604081208054600192906126ee9084906139e3565b909155505060008281526067602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6101375460408051602080820183526000858152610135909152828120548252915163532dd84d60e11b815291926001600160a01b0316918390839063a65bb09a9061279c90899086908a90600401613c9d565b60206040518083038186803b1580156127b457600080fd5b505afa1580156127c8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127ec919061394f565b9695505050505050565b60fc80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b816001600160a01b0316836001600160a01b031614156128aa5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016106da565b6001600160a01b038381166000818152606a6020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b612922848484612481565b61292e84848484612b23565b6119bf5760405162461bcd60e51b81526004016106da90613ce6565b600054610100900460ff166129715760405162461bcd60e51b81526004016106da90613d38565b6118828282612c37565b600054610100900460ff166129a25760405162461bcd60e51b81526004016106da90613d38565b61128a612c85565b600054610100900460ff166129d15760405162461bcd60e51b81526004016106da90613d38565b6129d9612cbc565b60c980546001600160a01b0319166001600160a01b0392909216919091179055565b6040516bffffffffffffffffffffffff19606084901b166020820152603481018290526000906054016123e4565b60c9546000906001600160a01b0316331415612a4c575060131936013560601c90565b503390565b611882828260405180602001604052806000815250612ce3565b6001600160a01b038316612ac657612ac181609980546000838152609a60205260408120829055600182018355919091527f72a152ddfb8e864297c917af52ea6c1c68aead0fee1a62673fcc7e0c94979d000155565b612ae9565b816001600160a01b0316836001600160a01b031614612ae957612ae98382612d16565b6001600160a01b038216612b005761078d81612db3565b826001600160a01b0316826001600160a01b03161461078d5761078d8282612e62565b60006001600160a01b0384163b15612c2c57836001600160a01b031663150b7a02612b4c612034565b8786866040518563ffffffff1660e01b8152600401612b6e9493929190613d83565b602060405180830381600087803b158015612b8857600080fd5b505af1925050508015612bb8575060408051601f3d908101601f19168201909252612bb591810190613db6565b60015b612c12573d808015612be6576040519150601f19603f3d011682016040523d82523d6000602084013e612beb565b606091505b508051612c0a5760405162461bcd60e51b81526004016106da90613ce6565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612479565b506001949350505050565b600054610100900460ff16612c5e5760405162461bcd60e51b81526004016106da90613d38565b8151612c71906065906020850190612ff4565b50805161078d906066906020840190612ff4565b600054610100900460ff16612cac5760405162461bcd60e51b81526004016106da90613d38565b61128a612cb7612034565b6127f6565b600054610100900460ff1661128a5760405162461bcd60e51b81526004016106da90613d38565b612ced8383612ea6565b612cfa6000848484612b23565b61078d5760405162461bcd60e51b81526004016106da90613ce6565b60006001612d23846111f2565b612d2d91906139e3565b600083815260986020526040902054909150808214612d80576001600160a01b03841660009081526097602090815260408083208584528252808320548484528184208190558352609890915290208190555b5060009182526098602090815260408084208490556001600160a01b039094168352609781528383209183525290812055565b609954600090612dc5906001906139e3565b6000838152609a602052604081205460998054939450909284908110612ded57612ded61399c565b906000526020600020015490508060998381548110612e0e57612e0e61399c565b6000918252602080832090910192909255828152609a90915260408082208490558582528120556099805480612e4657612e46613dd3565b6001900381819060005260206000200160009055905550505050565b6000612e6d836111f2565b6001600160a01b039093166000908152609760209081526040808320868452825280832085905593825260989052919091209190915550565b6001600160a01b038216612efc5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016106da565b6000818152606760205260409020546001600160a01b031615612f615760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016106da565b612f6d60008383612a6b565b6001600160a01b0382166000908152606860205260408120805460019290612f969084906139fa565b909155505060008181526067602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b82805461300090613904565b90600052602060002090601f0160209004810192826130225760008555613068565b82601f1061303b57805160ff1916838001178555613068565b82800160010185558215613068579182015b8281111561306857825182559160200191906001019061304d565b50613074929150613078565b5090565b5b808211156130745760008155600101613079565b6001600160e01b031981168114610fa757600080fd5b6000602082840312156130b557600080fd5b81356130c08161308d565b9392505050565b60005b838110156130e25781810151838201526020016130ca565b838111156119bf5750506000910152565b6000815180845261310b8160208601602086016130c7565b601f01601f19169290920160200192915050565b6020815260006130c060208301846130f3565b60006020828403121561314457600080fd5b5035919050565b6001600160a01b0381168114610fa757600080fd5b6000806040838503121561317357600080fd5b823561317e8161314b565b946020939093013593505050565b8015158114610fa757600080fd5b600080604083850312156131ad57600080fd5b8235915060208301356131bf8161318c565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b604080519081016001600160401b0381118282101715613202576132026131ca565b60405290565b60405160c081016001600160401b0381118282101715613202576132026131ca565b604051601f8201601f191681016001600160401b0381118282101715613252576132526131ca565b604052919050565b60006001600160401b03821115613273576132736131ca565b5060051b60200190565b6000806040838503121561329057600080fd5b823591506020808401356001600160401b038111156132ae57600080fd5b8401601f810186136132bf57600080fd5b80356132d26132cd8261325a565b61322a565b81815260059190911b820183019083810190888311156132f157600080fd5b928401925b828410156133185783356133098161314b565b825292840192908401906132f6565b80955050505050509250929050565b60008060006060848603121561333c57600080fd5b505081359360208301359350604090920135919050565b60006020808301818452808551808352604092508286019150828160051b87010184880160005b838110156133bb57888303603f190185528151805187855261339e888601826130f3565b91890151948901949094529487019492509086019060010161337a565b509098975050505050505050565b6000806000606084860312156133de57600080fd5b83356133e98161314b565b925060208401356133f98161314b565b929592945050506040919091013590565b600082601f83011261341b57600080fd5b6040516103008082018281106001600160401b038211171561343f5761343f6131ca565b6040528301818582111561345257600080fd5b845b8281101561346c578035825260209182019101613454565b509195945050505050565b600080610320838503121561348b57600080fd5b8235915061349c846020850161340a565b90509250929050565b6000602082840312156134b757600080fd5b81356130c08161314b565b602080825282518282018190526000919060409081850190868401855b8281101561351757815180516001600160a01b03168552868101518786015285015185850152606090930192908501906001016134df565b5091979650505050505050565b6000806040838503121561353757600080fd5b50508035926020909101359150565b6000806040838503121561355957600080fd5b82356135648161314b565b915060208301356131bf8161318c565b6000602080838503121561358757600080fd5b82356001600160401b0381111561359d57600080fd5b8301601f810185136135ae57600080fd5b80356135bc6132cd8261325a565b81815260059190911b820183019083810190878311156135db57600080fd5b928401925b828410156135f9578335825292840192908401906135e0565b979650505050505050565b602080825282518282018190526000919060409081850190868401855b8281101561351757815180516001600160a01b03168552860151868501529284019290850190600101613621565b60006001600160401b03821115613668576136686131ca565b50601f01601f191660200190565b60006136846132cd8461364f565b905082815283838301111561369857600080fd5b828260208301376000602084830101529392505050565b600080600080608085870312156136c557600080fd5b84356136d08161314b565b935060208501356136e08161314b565b92506040850135915060608501356001600160401b0381111561370257600080fd5b8501601f8101871361371357600080fd5b61372287823560208401613676565b91505092959194509250565b60008060006060848603121561374357600080fd5b833561374e8161314b565b9250602084013561375e8161314b565b9150604084013561376e8161314b565b809150509250925092565b6000806040838503121561378c57600080fd5b82356137978161314b565b915060208301356131bf8161314b565b600080600080608085870312156137bd57600080fd5b84359350602085013592506040850135915060608501356001600160401b03808211156137e957600080fd5b818701915087601f8301126137fd57600080fd5b813561380b6132cd8261325a565b8082825260208201915060208360051b86010192508a83111561382d57600080fd5b602085015b838110156138bd57848135111561384857600080fd5b803586016040818e03601f1901121561386057600080fd5b6138686131e0565b60208201358781111561387a57600080fd5b8201603f81018f1361388b57600080fd5b61389d8f602083013560408401613676565b825250604091909101356020808301919091529084529283019201613832565b50979a9699509497505050505050565b600080600061034084860312156138e357600080fd5b83359250602084013591506138fb856040860161340a565b90509250925092565b600181811c9082168061391857607f821691505b6020821081141561393957634e487b7160e01b600052602260045260246000fd5b50919050565b805161394a8161318c565b919050565b60006020828403121561396157600080fd5b81516130c08161318c565b6020808252601690820152753cb7ba903430bb32903737903832b936b4b9b9b4b7b760511b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006000198214156139dc576139dc6139b2565b5060010190565b6000828210156139f5576139f56139b2565b500390565b60008219821115613a0d57613a0d6139b2565b500190565b60008251613a248184602087016130c7565b9190910192915050565b6020808252602e908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526d1c881b9bdc88185c1c1c9bdd995960921b606082015260800190565b600082601f830112613a8d57600080fd5b8151613a9b6132cd8261364f565b818152846020838601011115613ab057600080fd5b6124798260208301602087016130c7565b600060c08284031215613ad357600080fd5b613adb613208565b9050815181526020820151602082015260408201516001600160401b0380821115613b0557600080fd5b613b1185838601613a7c565b60408401526060840151915080821115613b2a57600080fd5b613b3685838601613a7c565b60608401526080840151915080821115613b4f57600080fd5b50613b5c84828501613a7c565b608083015250613b6e60a0830161393f565b60a082015292915050565b60006020808385031215613b8c57600080fd5b82516001600160401b0380821115613ba357600080fd5b818501915085601f830112613bb757600080fd5b8151613bc56132cd8261325a565b81815260059190911b83018401908481019088831115613be457600080fd5b8585015b83811015613c1c57805185811115613c005760008081fd5b613c0e8b89838a0101613ac1565b845250918601918601613be8565b5098975050505050505050565b600060208284031215613c3b57600080fd5b81516001600160401b03811115613c5157600080fd5b61247984828501613ac1565b8060005b60188110156119bf578151845260209384019390910190600101613c61565b6103208101613c8f8285613c5d565b826103008301529392505050565b6103408101613cac8286613c5d565b61030082018460005b6001811015613cd4578151835260209283019290910190600101613cb5565b50505082610320830152949350505050565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906127ec908301846130f3565b600060208284031215613dc857600080fd5b81516130c08161308d565b634e487b7160e01b600052603160045260246000fdfea2646970667358221220f95f15da9f0adbbea607d4b3634a16a7d3e46eaa7befbec139d697d3ead11bf764736f6c63430008090033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106102275760003560e01c8063715018a611610130578063b88d4fde116100b8578063df4b39dd1161007c578063df4b39dd146104e8578063e985e9c51461050c578063ef3ad9eb14610548578063f2fde38b1461055b578063fa86623b1461056e57600080fd5b8063b88d4fde14610489578063c0c53b8b1461049c578063c4b88ea4146104af578063c87b56dd146104c2578063d622abc2146104d557600080fd5b806394d84290116100ff57806394d842901461042857806395d89b411461043b5780639dcd681114610443578063a22cb46514610456578063af5723b11461046957600080fd5b8063715018a6146103dc5780638da5cb5b146103e45780638f70738e146103f55780639041e3f41461041557600080fd5b80632f745c59116101b35780634f6ccce7116101825780634f6ccce7146103605780634ffc9f4b14610373578063572b6c05146103945780636352211e146103b657806370a08231146103c957600080fd5b80632f745c591461031457806342842e0e1461032757806342966c681461033a5780634df301491461034d57600080fd5b80630daa8be7116101fa5780630daa8be7146102a957806312b90fd6146102bc57806318160ddd146102cf57806319ffeb3b146102e157806323b872dd1461030157600080fd5b806301ffc9a71461022c57806306fdde0314610254578063081812fc14610269578063095ea7b314610294575b600080fd5b61023f61023a3660046130a3565b610581565b60405190151581526020015b60405180910390f35b61025c6105ac565b60405161024b919061311f565b61027c610277366004613132565b61063e565b6040516001600160a01b03909116815260200161024b565b6102a76102a2366004613160565b610665565b005b6102a76102b736600461319a565b610792565b6102a76102ca36600461327d565b61092d565b6099545b60405190815260200161024b565b6102f46102ef366004613327565b610b78565b60405161024b9190613353565b6102a761030f3660046133c9565b610ead565b6102d3610322366004613160565b610ee5565b6102a76103353660046133c9565b610f7b565b6102a7610348366004613132565b610f96565b61023f61035b366004613477565b610faa565b6102d361036e366004613132565b6110ff565b6102d3610381366004613132565b6000908152610134602052604090205490565b61023f6103a23660046134a5565b60c9546001600160a01b0391821691161490565b61027c6103c4366004613132565b611192565b6102d36103d73660046134a5565b6111f2565b6102a7611278565b60fc546001600160a01b031661027c565b610408610403366004613132565b61128c565b60405161024b91906134c2565b6102a76104233660046134a5565b6115b7565b6102d3610436366004613132565b611638565b61025c6116ca565b6102a7610451366004613524565b6116d9565b6102a7610464366004613546565b611870565b61047c610477366004613574565b611886565b60405161024b9190613604565b6102a76104973660046136af565b611986565b6102a76104aa36600461372e565b6119c5565b61047c6104bd366004613132565b611b2a565b61025c6104d0366004613132565b611b97565b61023f6104e3366004613160565b611c3c565b61023f6104f6366004613132565b6000908152610136602052604090205460ff1690565b61023f61051a366004613779565b6001600160a01b039182166000908152606a6020908152604080832093909416825291909152205460ff1690565b6102a76105563660046137a7565b611c68565b6102a76105693660046134a5565b611dfb565b6102a761057c3660046138cd565b611e71565b60006001600160e01b0319821663780e9d6360e01b14806105a657506105a682611f85565b92915050565b6060606580546105bb90613904565b80601f01602080910402602001604051908101604052809291908181526020018280546105e790613904565b80156106345780601f1061060957610100808354040283529160200191610634565b820191906000526020600020905b81548152906001019060200180831161061757829003601f168201915b5050505050905090565b600061064982611fd5565b506000908152606960205260409020546001600160a01b031690565b600061067082611192565b9050806001600160a01b0316836001600160a01b031614156106e35760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084015b60405180910390fd5b806001600160a01b03166106f5612034565b6001600160a01b0316148061071157506107118161051a612034565b6107835760405162461bcd60e51b815260206004820152603e60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206e6f7220617070726f76656420666f7220616c6c000060648201526084016106da565b61078d8383612064565b505050565b61012f5482906001600160a01b03168063972f13276107af612034565b6040516001600160e01b031960e084901b1681526001600160a01b0390911660048201526024810185905260440160206040518083038186803b1580156107f557600080fd5b505afa158015610809573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061082d919061394f565b6108495760405162461bcd60e51b81526004016106da9061396c565b6101395460408051635c975abb60e01b815290516001600160a01b03909216918291635c975abb916004808301926020929190829003018186803b15801561089057600080fd5b505afa1580156108a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108c8919061394f565b156108d257600080fd5b60008581526101366020908152604091829020805460ff1916871515908117909155915191825286917f1e3ed2b292ed72652054799a4fde74789a8670c153df666f76e01345ec318281910160405180910390a25050505050565b61012f5482906001600160a01b03168063972f132761094a612034565b6040516001600160e01b031960e084901b1681526001600160a01b0390911660048201526024810185905260440160206040518083038186803b15801561099057600080fd5b505afa1580156109a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109c8919061394f565b6109e45760405162461bcd60e51b81526004016106da9061396c565b6101395460408051635c975abb60e01b815290516001600160a01b03909216918291635c975abb916004808301926020929190829003018186803b158015610a2b57600080fd5b505afa158015610a3f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a63919061394f565b15610a6d57600080fd5b6000610a7886611638565b8551600088815261013460205260409020549192501115610adb5760405162461bcd60e51b815260206004820152601d60248201527f72656d61696e696e6720636f756e74206973206e6f7420656e6f75676800000060448201526064016106da565b60005b8551811015610b31576000868281518110610afb57610afb61399c565b60200260200101519050610b0f8189611c3c565b610b1e57610b1e8389836120d2565b5080610b29816139c8565b915050610ade565b5085610b3b612034565b6001600160a01b03167ff0fae1d6c53c230d212972a098b7dbf41d3a6dbb348a4ebf640a51ce63cd3b6760405160405180910390a3505050505050565b606082610b8457606492505b6064831115610bca5760405162461bcd60e51b81526020600482015260126024820152716c696d697420697320746f6f206c6172676560701b60448201526064016106da565b6000836001600160401b03811115610be457610be46131ca565b604051908082528060200260200182016040528015610c2a57816020015b604080518082019091526060815260006020820152815260200190600190039081610c025790505b509050610c39846000196139e3565b831115610c945760405162461bcd60e51b815260206004820152602360248201527f6c696d6974202b206f6666736574206d757374206265203c3d20325e323536206044820152622d203160e81b60648201526084016106da565b6000610ca084866139fa565b90506000845b82811015610de85760006101336000610cbf8b856123cc565b81526020019081526020016000208054610cd890613904565b80601f0160208091040260200160405190810160405280929190818152602001828054610d0490613904565b8015610d515780601f10610d2657610100808354040283529160200191610d51565b820191906000526020600020905b815481529060010190602001808311610d3457829003601f168201915b505060408051600081526020810180835281519020959650610d799450869350019050613a12565b6040516020818303038152906040528051906020012014610dd557604051806040016040528082815260200183815250858481518110610dbb57610dbb61399c565b60200260200101819052508280610dd1906139c8565b9350505b5080610de0816139c8565b915050610ca6565b506000816001600160401b03811115610e0357610e036131ca565b604051908082528060200260200182016040528015610e4957816020015b604080518082019091526060815260006020820152815260200190600190039081610e215790505b50905060005b82811015610ea157848181518110610e6957610e6961399c565b6020026020010151828281518110610e8357610e8361399c565b60200260200101819052508080610e99906139c8565b915050610e4f565b50979650505050505050565b610ebe610eb8612034565b82612402565b610eda5760405162461bcd60e51b81526004016106da90613a2e565b61078d838383612481565b6000610ef0836111f2565b8210610f525760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b60648201526084016106da565b506001600160a01b03919091166000908152609760209081526040808320938352929052205490565b61078d83838360405180602001604052806000815250611986565b610f9e612628565b610fa7816126a1565b50565b6000610fb68284612748565b610ffa5760405162461bcd60e51b8152602060048201526015602482015274696e76616c6964207365637265742070687261736560581b60448201526064016106da565b600083815261013460205260409020546110565760405162461bcd60e51b815260206004820152601760248201527f72656d61696e696e6720636f756e74206973207a65726f00000000000000000060448201526064016106da565b611067611061612034565b84611c3c565b156110a55760405162461bcd60e51b815260206004820152600e60248201526d185b1c9958591e481b5a5b9d195960921b60448201526064016106da565b6000838152610136602052604090205460ff16156110f65760405162461bcd60e51b815260206004820152600e60248201526d1b5a5b9d081a5cc81b1bd8dad95960921b60448201526064016106da565b50600192915050565b600061110a60995490565b821061116d5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b60648201526084016106da565b609982815481106111805761118061399c565b90600052602060002001549050919050565b6000818152606760205260408120546001600160a01b0316806105a65760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b60448201526064016106da565b60006001600160a01b03821661125c5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b60648201526084016106da565b506001600160a01b031660009081526068602052604090205490565b611280612628565b61128a60006127f6565b565b61012f5460405163f562082360e01b8152600481018390526060916001600160a01b031690600090829063f56208239060240160006040518083038186803b1580156112d757600080fd5b505afa1580156112eb573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526113139190810190613b79565b9050600081516001600160401b03811115611330576113306131ca565b60405190808252806020026020018201604052801561136357816020015b606081526020019060019003908161134e5790505b5090506000805b83518110156113f0576113998482815181106113885761138861399c565b602002602001015160000151611b2a565b8382815181106113ab576113ab61399c565b60200260200101819052508281815181106113c8576113c861399c565b602002602001015151826113dc91906139fa565b9150806113e8816139c8565b91505061136a565b506000816001600160401b0381111561140b5761140b6131ca565b60405190808252806020026020018201604052801561146957816020015b611456604051806060016040528060006001600160a01b0316815260200160008152602001600081525090565b8152602001906001900390816114295790505b50905060005b828110156115ac5760005b85518110156115a65760005b8582815181106114985761149861399c565b6020026020010151518110156115935760405180606001604052808784815181106114c5576114c561399c565b602002602001015183815181106114de576114de61399c565b6020026020010151600001516001600160a01b0316815260200188848151811061150a5761150a61399c565b602002602001015160000151815260200187848151811061152d5761152d61399c565b602002602001015183815181106115465761154661399c565b6020026020010151602001518152508484815181106115675761156761399c565b6020026020010181905250828061157d906139c8565b935050808061158b906139c8565b915050611486565b508061159e816139c8565b91505061147a565b5061146f565b509695505050505050565b6115bf612628565b6001600160a01b0381166116155760405162461bcd60e51b815260206004820152601e60248201527f6576656e74206d616e61676572206164647265737320697320626c616e6b000060448201526064016106da565b61012f80546001600160a01b0319166001600160a01b0392909216919091179055565b61012f54604051632e601e6f60e21b8152600481018390526000916001600160a01b0316908290829063b98079bc9060240160006040518083038186803b15801561168257600080fd5b505afa158015611696573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526116be9190810190613c29565b60200151949350505050565b6060606680546105bb90613904565b61012f5482906001600160a01b03168063972f13276116f6612034565b6040516001600160e01b031960e084901b1681526001600160a01b0390911660048201526024810185905260440160206040518083038186803b15801561173c57600080fd5b505afa158015611750573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611774919061394f565b6117905760405162461bcd60e51b81526004016106da9061396c565b6101395460408051635c975abb60e01b815290516001600160a01b03909216918291635c975abb916004808301926020929190829003018186803b1580156117d757600080fd5b505afa1580156117eb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061180f919061394f565b1561181957600080fd5b60008581526101356020526040902084905584611834612034565b6001600160a01b03167fae5b067be3e4869ca571a499572a09085a17c3d0442a8965b8356bf47f63ba9960405160405180910390a35050505050565b61188261187b612034565b8383612848565b5050565b6060600082516001600160401b038111156118a3576118a36131ca565b6040519080825280602002602001820160405280156118e857816020015b60408051808201909152600080825260208201528152602001906001900390816118c15790505b50905060005b835181101561197f5760405180604001604052806119248684815181106119175761191761399c565b6020026020010151611192565b6001600160a01b031681526020018583815181106119445761194461399c565b60200260200101518152508282815181106119615761196161399c565b60200260200101819052508080611977906139c8565b9150506118ee565b5092915050565b611997611991612034565b83612402565b6119b35760405162461bcd60e51b81526004016106da90613a2e565b6119bf84848484612917565b50505050565b600054600490610100900460ff161580156119e7575060005460ff8083169116105b611a4a5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016106da565b6000805461ffff191660ff83161761010017905560408051808201825260098152684d696e7452616c6c7960b81b6020808301919091528251808401909352600283526126a960f11b90830152611aa09161294a565b611aa861297b565b611ab1846129aa565b61013780546001600160a01b038581166001600160a01b0319928316179092556101398054928516929091169190911790556000805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150505050565b60606105a66101386000848152602001908152602001600020805480602002602001604051908101604052809291908181526020018280548015611b8d57602002820191906000526020600020905b815481526020019060010190808311611b79575b5050505050611886565b60008181526101306020526040812080546060929190611bb690613904565b80601f0160208091040260200160405190810160405280929190818152602001828054611be290613904565b8015611c2f5780601f10611c0457610100808354040283529160200191611c2f565b820191906000526020600020905b815481529060010190602001808311611c1257829003601f168201915b5093979650505050505050565b60006101316000611c4d85856129fb565b815260208101919091526040016000205460ff169392505050565b6101395460408051635c975abb60e01b815290516001600160a01b03909216918291635c975abb916004808301926020929190829003018186803b158015611caf57600080fd5b505afa158015611cc3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ce7919061394f565b15611cf157600080fd5b61012f546001600160a01b0316611d06612034565b6001600160a01b031614611d4b5760405162461bcd60e51b815260206004820152600c60248201526b1d5b985d5d1a1bdc9a5e995960a21b60448201526064016106da565b60008581526101346020908152604080832087905561013590915281208490555b8251811015611df357828181518110611d8757611d8761399c565b6020026020010151600001516101336000611dbf89878681518110611dae57611dae61399c565b6020026020010151602001516123cc565b81526020019081526020016000209080519060200190611de0929190612ff4565b5080611deb816139c8565b915050611d6c565b505050505050565b611e03612628565b6001600160a01b038116611e685760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016106da565b610fa7816127f6565b6101395460408051635c975abb60e01b815290516001600160a01b03909216918291635c975abb916004808301926020929190829003018186803b158015611eb857600080fd5b505afa158015611ecc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ef0919061394f565b15611efa57600080fd5b611f048383610faa565b506101375460405163635e393960e11b81526001600160a01b0390911690819063c6bc727290611f3a9086908890600401613c80565b600060405180830381600087803b158015611f5457600080fd5b505af1158015611f68573d6000803e3d6000fd5b50505050611f7e8585611f79612034565b6120d2565b5050505050565b60006001600160e01b031982166380ac58cd60e01b1480611fb657506001600160e01b03198216635b5e139f60e01b145b806105a657506301ffc9a760e01b6001600160e01b03198316146105a6565b6000818152606760205260409020546001600160a01b0316610fa75760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b60448201526064016106da565b60c9546000906001600160a01b0316331415612057575060131936013560601c90565b61205f612a29565b905090565b600081815260696020526040902080546001600160a01b0319166001600160a01b038416908117909155819061209982611192565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600082815261013460205260409020546120ee906001906139e3565b600083815261013460205260408120919091556001906101319061211284866129fb565b815260200190815260200160002060006101000a81548160ff021916908315150217905550600061214382856129fb565b600081815261013260205260409020549091506121618160016139fa565b600083815261013260205260408120919091556101338161218287826123cc565b8152602001908152602001600020805461219b90613904565b80601f01602080910402602001604051908101604052809291908181526020018280546121c790613904565b80156122145780601f106121e957610100808354040283529160200191612214565b820191906000526020600020905b8154815290600101906020018083116121f757829003601f168201915b505050505090506000610133600061222c88866123cc565b8152602001908152602001600020805461224590613904565b80601f016020809104026020016040519081016040528092919081815260200182805461227190613904565b80156122be5780601f10612293576101008083540402835291602001916122be565b820191906000526020600020905b8154815290600101906020018083116122a157829003601f168201915b5050604080516000815260208101808352815190209596506122e69450869350019050613a12565b6040516020818303038152906040528051906020012014612305578091505b81610130600061231561012e5490565b81526020019081526020016000209080519060200190612336929190612ff4565b5060008681526101386020526040902061012e54815460018101835560009283526020909220909101556123738561236e61012e5490565b612a51565b61238261012e80546001019055565b846001600160a01b03167faf2fad1984d2c7abaa9300537cf9fe1bcfaf2d6226e4ffdf03522dbf3064808e836040516123bb919061311f565b60405180910390a250505050505050565b60408051602081018490529081018290526000906060015b60405160208183030381529060405280519060200120905092915050565b60008061240e83611192565b9050806001600160a01b0316846001600160a01b0316148061245557506001600160a01b038082166000908152606a602090815260408083209388168352929052205460ff165b806124795750836001600160a01b031661246e8461063e565b6001600160a01b0316145b949350505050565b826001600160a01b031661249482611192565b6001600160a01b0316146124f85760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b60648201526084016106da565b6001600160a01b03821661255a5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016106da565b612565838383612a6b565b612570600082612064565b6001600160a01b03831660009081526068602052604081208054600192906125999084906139e3565b90915550506001600160a01b03821660009081526068602052604081208054600192906125c79084906139fa565b909155505060008181526067602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b612630612034565b6001600160a01b031661264b60fc546001600160a01b031690565b6001600160a01b03161461128a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016106da565b60006126ac82611192565b90506126ba81600084612a6b565b6126c5600083612064565b6001600160a01b03811660009081526068602052604081208054600192906126ee9084906139e3565b909155505060008281526067602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6101375460408051602080820183526000858152610135909152828120548252915163532dd84d60e11b815291926001600160a01b0316918390839063a65bb09a9061279c90899086908a90600401613c9d565b60206040518083038186803b1580156127b457600080fd5b505afa1580156127c8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127ec919061394f565b9695505050505050565b60fc80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b816001600160a01b0316836001600160a01b031614156128aa5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016106da565b6001600160a01b038381166000818152606a6020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b612922848484612481565b61292e84848484612b23565b6119bf5760405162461bcd60e51b81526004016106da90613ce6565b600054610100900460ff166129715760405162461bcd60e51b81526004016106da90613d38565b6118828282612c37565b600054610100900460ff166129a25760405162461bcd60e51b81526004016106da90613d38565b61128a612c85565b600054610100900460ff166129d15760405162461bcd60e51b81526004016106da90613d38565b6129d9612cbc565b60c980546001600160a01b0319166001600160a01b0392909216919091179055565b6040516bffffffffffffffffffffffff19606084901b166020820152603481018290526000906054016123e4565b60c9546000906001600160a01b0316331415612a4c575060131936013560601c90565b503390565b611882828260405180602001604052806000815250612ce3565b6001600160a01b038316612ac657612ac181609980546000838152609a60205260408120829055600182018355919091527f72a152ddfb8e864297c917af52ea6c1c68aead0fee1a62673fcc7e0c94979d000155565b612ae9565b816001600160a01b0316836001600160a01b031614612ae957612ae98382612d16565b6001600160a01b038216612b005761078d81612db3565b826001600160a01b0316826001600160a01b03161461078d5761078d8282612e62565b60006001600160a01b0384163b15612c2c57836001600160a01b031663150b7a02612b4c612034565b8786866040518563ffffffff1660e01b8152600401612b6e9493929190613d83565b602060405180830381600087803b158015612b8857600080fd5b505af1925050508015612bb8575060408051601f3d908101601f19168201909252612bb591810190613db6565b60015b612c12573d808015612be6576040519150601f19603f3d011682016040523d82523d6000602084013e612beb565b606091505b508051612c0a5760405162461bcd60e51b81526004016106da90613ce6565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612479565b506001949350505050565b600054610100900460ff16612c5e5760405162461bcd60e51b81526004016106da90613d38565b8151612c71906065906020850190612ff4565b50805161078d906066906020840190612ff4565b600054610100900460ff16612cac5760405162461bcd60e51b81526004016106da90613d38565b61128a612cb7612034565b6127f6565b600054610100900460ff1661128a5760405162461bcd60e51b81526004016106da90613d38565b612ced8383612ea6565b612cfa6000848484612b23565b61078d5760405162461bcd60e51b81526004016106da90613ce6565b60006001612d23846111f2565b612d2d91906139e3565b600083815260986020526040902054909150808214612d80576001600160a01b03841660009081526097602090815260408083208584528252808320548484528184208190558352609890915290208190555b5060009182526098602090815260408084208490556001600160a01b039094168352609781528383209183525290812055565b609954600090612dc5906001906139e3565b6000838152609a602052604081205460998054939450909284908110612ded57612ded61399c565b906000526020600020015490508060998381548110612e0e57612e0e61399c565b6000918252602080832090910192909255828152609a90915260408082208490558582528120556099805480612e4657612e46613dd3565b6001900381819060005260206000200160009055905550505050565b6000612e6d836111f2565b6001600160a01b039093166000908152609760209081526040808320868452825280832085905593825260989052919091209190915550565b6001600160a01b038216612efc5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016106da565b6000818152606760205260409020546001600160a01b031615612f615760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016106da565b612f6d60008383612a6b565b6001600160a01b0382166000908152606860205260408120805460019290612f969084906139fa565b909155505060008181526067602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b82805461300090613904565b90600052602060002090601f0160209004810192826130225760008555613068565b82601f1061303b57805160ff1916838001178555613068565b82800160010185558215613068579182015b8281111561306857825182559160200191906001019061304d565b50613074929150613078565b5090565b5b808211156130745760008155600101613079565b6001600160e01b031981168114610fa757600080fd5b6000602082840312156130b557600080fd5b81356130c08161308d565b9392505050565b60005b838110156130e25781810151838201526020016130ca565b838111156119bf5750506000910152565b6000815180845261310b8160208601602086016130c7565b601f01601f19169290920160200192915050565b6020815260006130c060208301846130f3565b60006020828403121561314457600080fd5b5035919050565b6001600160a01b0381168114610fa757600080fd5b6000806040838503121561317357600080fd5b823561317e8161314b565b946020939093013593505050565b8015158114610fa757600080fd5b600080604083850312156131ad57600080fd5b8235915060208301356131bf8161318c565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b604080519081016001600160401b0381118282101715613202576132026131ca565b60405290565b60405160c081016001600160401b0381118282101715613202576132026131ca565b604051601f8201601f191681016001600160401b0381118282101715613252576132526131ca565b604052919050565b60006001600160401b03821115613273576132736131ca565b5060051b60200190565b6000806040838503121561329057600080fd5b823591506020808401356001600160401b038111156132ae57600080fd5b8401601f810186136132bf57600080fd5b80356132d26132cd8261325a565b61322a565b81815260059190911b820183019083810190888311156132f157600080fd5b928401925b828410156133185783356133098161314b565b825292840192908401906132f6565b80955050505050509250929050565b60008060006060848603121561333c57600080fd5b505081359360208301359350604090920135919050565b60006020808301818452808551808352604092508286019150828160051b87010184880160005b838110156133bb57888303603f190185528151805187855261339e888601826130f3565b91890151948901949094529487019492509086019060010161337a565b509098975050505050505050565b6000806000606084860312156133de57600080fd5b83356133e98161314b565b925060208401356133f98161314b565b929592945050506040919091013590565b600082601f83011261341b57600080fd5b6040516103008082018281106001600160401b038211171561343f5761343f6131ca565b6040528301818582111561345257600080fd5b845b8281101561346c578035825260209182019101613454565b509195945050505050565b600080610320838503121561348b57600080fd5b8235915061349c846020850161340a565b90509250929050565b6000602082840312156134b757600080fd5b81356130c08161314b565b602080825282518282018190526000919060409081850190868401855b8281101561351757815180516001600160a01b03168552868101518786015285015185850152606090930192908501906001016134df565b5091979650505050505050565b6000806040838503121561353757600080fd5b50508035926020909101359150565b6000806040838503121561355957600080fd5b82356135648161314b565b915060208301356131bf8161318c565b6000602080838503121561358757600080fd5b82356001600160401b0381111561359d57600080fd5b8301601f810185136135ae57600080fd5b80356135bc6132cd8261325a565b81815260059190911b820183019083810190878311156135db57600080fd5b928401925b828410156135f9578335825292840192908401906135e0565b979650505050505050565b602080825282518282018190526000919060409081850190868401855b8281101561351757815180516001600160a01b03168552860151868501529284019290850190600101613621565b60006001600160401b03821115613668576136686131ca565b50601f01601f191660200190565b60006136846132cd8461364f565b905082815283838301111561369857600080fd5b828260208301376000602084830101529392505050565b600080600080608085870312156136c557600080fd5b84356136d08161314b565b935060208501356136e08161314b565b92506040850135915060608501356001600160401b0381111561370257600080fd5b8501601f8101871361371357600080fd5b61372287823560208401613676565b91505092959194509250565b60008060006060848603121561374357600080fd5b833561374e8161314b565b9250602084013561375e8161314b565b9150604084013561376e8161314b565b809150509250925092565b6000806040838503121561378c57600080fd5b82356137978161314b565b915060208301356131bf8161314b565b600080600080608085870312156137bd57600080fd5b84359350602085013592506040850135915060608501356001600160401b03808211156137e957600080fd5b818701915087601f8301126137fd57600080fd5b813561380b6132cd8261325a565b8082825260208201915060208360051b86010192508a83111561382d57600080fd5b602085015b838110156138bd57848135111561384857600080fd5b803586016040818e03601f1901121561386057600080fd5b6138686131e0565b60208201358781111561387a57600080fd5b8201603f81018f1361388b57600080fd5b61389d8f602083013560408401613676565b825250604091909101356020808301919091529084529283019201613832565b50979a9699509497505050505050565b600080600061034084860312156138e357600080fd5b83359250602084013591506138fb856040860161340a565b90509250925092565b600181811c9082168061391857607f821691505b6020821081141561393957634e487b7160e01b600052602260045260246000fd5b50919050565b805161394a8161318c565b919050565b60006020828403121561396157600080fd5b81516130c08161318c565b6020808252601690820152753cb7ba903430bb32903737903832b936b4b9b9b4b7b760511b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006000198214156139dc576139dc6139b2565b5060010190565b6000828210156139f5576139f56139b2565b500390565b60008219821115613a0d57613a0d6139b2565b500190565b60008251613a248184602087016130c7565b9190910192915050565b6020808252602e908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526d1c881b9bdc88185c1c1c9bdd995960921b606082015260800190565b600082601f830112613a8d57600080fd5b8151613a9b6132cd8261364f565b818152846020838601011115613ab057600080fd5b6124798260208301602087016130c7565b600060c08284031215613ad357600080fd5b613adb613208565b9050815181526020820151602082015260408201516001600160401b0380821115613b0557600080fd5b613b1185838601613a7c565b60408401526060840151915080821115613b2a57600080fd5b613b3685838601613a7c565b60608401526080840151915080821115613b4f57600080fd5b50613b5c84828501613a7c565b608083015250613b6e60a0830161393f565b60a082015292915050565b60006020808385031215613b8c57600080fd5b82516001600160401b0380821115613ba357600080fd5b818501915085601f830112613bb757600080fd5b8151613bc56132cd8261325a565b81815260059190911b83018401908481019088831115613be457600080fd5b8585015b83811015613c1c57805185811115613c005760008081fd5b613c0e8b89838a0101613ac1565b845250918601918601613be8565b5098975050505050505050565b600060208284031215613c3b57600080fd5b81516001600160401b03811115613c5157600080fd5b61247984828501613ac1565b8060005b60188110156119bf578151845260209384019390910190600101613c61565b6103208101613c8f8285613c5d565b826103008301529392505050565b6103408101613cac8286613c5d565b61030082018460005b6001811015613cd4578151835260209283019290910190600101613cb5565b50505082610320830152949350505050565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906127ec908301846130f3565b600060208284031215613dc857600080fd5b81516130c08161308d565b634e487b7160e01b600052603160045260246000fdfea2646970667358221220f95f15da9f0adbbea607d4b3634a16a7d3e46eaa7befbec139d697d3ead11bf764736f6c63430008090033", + "bytecode": "0x608060405234801561001057600080fd5b506143dd806100206000396000f3fe608060405234801561001057600080fd5b50600436106102695760003560e01c8063715018a611610151578063b88d4fde116100c3578063df4b39dd11610087578063df4b39dd146105b5578063e572e74b146105d9578063e985e9c5146105ec578063ef3ad9eb14610628578063f2fde38b1461063b578063fa86623b1461064e57600080fd5b8063b88d4fde14610556578063c0c53b8b14610569578063c4b88ea41461057c578063c87b56dd1461058f578063d622abc2146105a257600080fd5b806394d842901161011557806394d84290146104d457806395d89b41146104e75780639731c1d6146104ef5780639dcd681114610510578063a22cb46514610523578063af5723b11461053657600080fd5b8063715018a6146104645780638da5cb5b1461046c5780638f70738e1461047d578063902d41c51461049d5780639041e3f4146104c157600080fd5b80632f745c59116101ea5780634df30149116101ae5780634df30149146103d55780634f6ccce7146103e85780634ffc9f4b146103fb578063572b6c051461041c5780636352211e1461043e57806370a082311461045157600080fd5b80632f745c59146103765780633c5f24bf1461038957806342842e0e1461039c57806342966c68146103af5780634d01a500146103c257600080fd5b806312b90fd61161023157806312b90fd6146102fe57806318160ddd1461031157806319ffeb3b1461032357806323b872dd1461034357806329ec9f441461035657600080fd5b806301ffc9a71461026e57806306fdde0314610296578063081812fc146102ab578063095ea7b3146102d65780630daa8be7146102eb575b600080fd5b61028161027c366004613504565b610661565b60405190151581526020015b60405180910390f35b61029e61068c565b60405161028d9190613580565b6102be6102b9366004613593565b61071e565b6040516001600160a01b03909116815260200161028d565b6102e96102e43660046135c1565b610745565b005b6102e96102f93660046135fb565b610872565b6102e961030c3660046136de565b610a0e565b6099545b60405190815260200161028d565b610336610331366004613788565b610c59565b60405161028d91906137b4565b6102e961035136600461382a565b610f8e565b610369610364366004613593565b610fc6565b60405161028d919061386b565b6103156103843660046135c1565b611029565b6102e961039736600461390a565b6110bf565b6102e96103aa36600461382a565b6110d5565b6102e96103bd366004613593565b6110f0565b6102e96103d0366004613950565b611104565b6102816103e3366004613a91565b6111cb565b6103156103f6366004613593565b611320565b610315610409366004613593565b6000908152610134602052604090205490565b61028161042a366004613abf565b60c9546001600160a01b0391821691161490565b6102be61044c366004613593565b6113b3565b61031561045f366004613abf565b611413565b6102e9611499565b60fc546001600160a01b03166102be565b61049061048b366004613593565b6114ad565b60405161028d9190613adc565b6102816104ab366004613593565b600090815261013b602052604090205460ff1690565b6102e96104cf366004613abf565b6117d8565b6103156104e2366004613593565b611859565b61029e6118eb565b6103156104fd366004613593565b600090815261013a602052604090205490565b6102e961051e366004613b3e565b6118fa565b6102e9610531366004613b60565b611a91565b610549610544366004613b8e565b611aa3565b60405161028d9190613bc2565b6102e9610564366004613c6d565b611ba3565b6102e9610577366004613cec565b611bdc565b61054961058a366004613593565b611d41565b61029e61059d366004613593565b611dae565b6102816105b03660046135c1565b611e53565b6102816105c3366004613593565b6000908152610136602052604090205460ff1690565b6102e96105e73660046135fb565b611e7f565b6102816105fa366004613d37565b6001600160a01b039182166000908152606a6020908152604080832093909416825291909152205460ff1690565b6102e9610636366004613d65565b612010565b6102e9610649366004613abf565b6121a3565b6102e961065c366004613e8b565b612219565b60006001600160e01b0319821663780e9d6360e01b148061068657506106868261232d565b92915050565b60606065805461069b90613ec2565b80601f01602080910402602001604051908101604052809291908181526020018280546106c790613ec2565b80156107145780601f106106e957610100808354040283529160200191610714565b820191906000526020600020905b8154815290600101906020018083116106f757829003601f168201915b5050505050905090565b60006107298261237d565b506000908152606960205260409020546001600160a01b031690565b6000610750826113b3565b9050806001600160a01b0316836001600160a01b031614156107c35760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084015b60405180910390fd5b806001600160a01b03166107d56123dc565b6001600160a01b031614806107f157506107f1816105fa6123dc565b6108635760405162461bcd60e51b815260206004820152603e60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206e6f7220617070726f76656420666f7220616c6c000060648201526084016107ba565b61086d838361240c565b505050565b61012f5482906001600160a01b03168063972f132761088f6123dc565b6040516001600160e01b031960e084901b1681526001600160a01b0390911660048201526024810185905260440160206040518083038186803b1580156108d557600080fd5b505afa1580156108e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061090d9190613f0d565b6109295760405162461bcd60e51b81526004016107ba90613f2a565b6101395460408051635c975abb60e01b815290516001600160a01b03909216918291635c975abb916004808301926020929190829003018186803b15801561097057600080fd5b505afa158015610984573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109a89190613f0d565b156109b257600080fd5b60008581526101366020908152604091829020805460ff1916871515908117909155915191825286917f1e3ed2b292ed72652054799a4fde74789a8670c153df666f76e01345ec31828191015b60405180910390a25050505050565b61012f5482906001600160a01b03168063972f1327610a2b6123dc565b6040516001600160e01b031960e084901b1681526001600160a01b0390911660048201526024810185905260440160206040518083038186803b158015610a7157600080fd5b505afa158015610a85573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aa99190613f0d565b610ac55760405162461bcd60e51b81526004016107ba90613f2a565b6101395460408051635c975abb60e01b815290516001600160a01b03909216918291635c975abb916004808301926020929190829003018186803b158015610b0c57600080fd5b505afa158015610b20573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b449190613f0d565b15610b4e57600080fd5b6000610b5986611859565b8551600088815261013460205260409020549192501115610bbc5760405162461bcd60e51b815260206004820152601d60248201527f72656d61696e696e6720636f756e74206973206e6f7420656e6f75676800000060448201526064016107ba565b60005b8551811015610c12576000868281518110610bdc57610bdc613f5a565b60200260200101519050610bf08189611e53565b610bff57610bff83898361247a565b5080610c0a81613f86565b915050610bbf565b5085610c1c6123dc565b6001600160a01b03167ff0fae1d6c53c230d212972a098b7dbf41d3a6dbb348a4ebf640a51ce63cd3b6760405160405180910390a3505050505050565b606082610c6557606492505b6064831115610cab5760405162461bcd60e51b81526020600482015260126024820152716c696d697420697320746f6f206c6172676560701b60448201526064016107ba565b6000836001600160401b03811115610cc557610cc561362b565b604051908082528060200260200182016040528015610d0b57816020015b604080518082019091526060815260006020820152815260200190600190039081610ce35790505b509050610d1a84600019613fa1565b831115610d755760405162461bcd60e51b815260206004820152602360248201527f6c696d6974202b206f6666736574206d757374206265203c3d20325e323536206044820152622d203160e81b60648201526084016107ba565b6000610d818486613fb8565b90506000845b82811015610ec95760006101336000610da08b85612775565b81526020019081526020016000208054610db990613ec2565b80601f0160208091040260200160405190810160405280929190818152602001828054610de590613ec2565b8015610e325780601f10610e0757610100808354040283529160200191610e32565b820191906000526020600020905b815481529060010190602001808311610e1557829003601f168201915b505060408051600081526020810180835281519020959650610e5a9450869350019050613fd0565b6040516020818303038152906040528051906020012014610eb657604051806040016040528082815260200183815250858481518110610e9c57610e9c613f5a565b60200260200101819052508280610eb290613f86565b9350505b5080610ec181613f86565b915050610d87565b506000816001600160401b03811115610ee457610ee461362b565b604051908082528060200260200182016040528015610f2a57816020015b604080518082019091526060815260006020820152815260200190600190039081610f025790505b50905060005b82811015610f8257848181518110610f4a57610f4a613f5a565b6020026020010151828281518110610f6457610f64613f5a565b60200260200101819052508080610f7a90613f86565b915050610f30565b50979650505050505050565b610f9f610f996123dc565b826127ab565b610fbb5760405162461bcd60e51b81526004016107ba90613fec565b61086d83838361282a565b6000818152610138602090815260409182902080548351818402810184019094528084526060939283018282801561101d57602002820191906000526020600020905b815481526020019060010190808311611009575b50505050509050919050565b600061103483611413565b82106110965760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b60648201526084016107ba565b506001600160a01b03919091166000908152609760209081526040808320938352929052205490565b6110c7612898565b6110d18282612911565b5050565b61086d83838360405180602001604052806000815250611ba3565b6110f8612898565b6111018161295b565b50565b61110c612898565b8151815181146111545760405162461bcd60e51b81526020600482015260136024820152720d8cadccee8d040d2e640dcdee840dac2e8c6d606b1b60448201526064016107ba565b60005b818110156111c55782818151811061117157611171613f5a565b6020026020010151516000146111bd576111bd84828151811061119657611196613f5a565b60200260200101518483815181106111b0576111b0613f5a565b6020026020010151612911565b600101611157565b50505050565b60006111d78284612a02565b61121b5760405162461bcd60e51b8152602060048201526015602482015274696e76616c6964207365637265742070687261736560581b60448201526064016107ba565b600083815261013460205260409020546112775760405162461bcd60e51b815260206004820152601760248201527f72656d61696e696e6720636f756e74206973207a65726f00000000000000000060448201526064016107ba565b6112886112826123dc565b84611e53565b156112c65760405162461bcd60e51b815260206004820152600e60248201526d185b1c9958591e481b5a5b9d195960921b60448201526064016107ba565b6000838152610136602052604090205460ff16156113175760405162461bcd60e51b815260206004820152600e60248201526d1b5a5b9d081a5cc81b1bd8dad95960921b60448201526064016107ba565b50600192915050565b600061132b60995490565b821061138e5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b60648201526084016107ba565b609982815481106113a1576113a1613f5a565b90600052602060002001549050919050565b6000818152606760205260408120546001600160a01b0316806106865760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b60448201526064016107ba565b60006001600160a01b03821661147d5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b60648201526084016107ba565b506001600160a01b031660009081526068602052604090205490565b6114a1612898565b6114ab6000612ab0565b565b61012f5460405163f562082360e01b8152600481018390526060916001600160a01b031690600090829063f56208239060240160006040518083038186803b1580156114f857600080fd5b505afa15801561150c573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526115349190810190614137565b9050600081516001600160401b038111156115515761155161362b565b60405190808252806020026020018201604052801561158457816020015b606081526020019060019003908161156f5790505b5090506000805b8351811015611611576115ba8482815181106115a9576115a9613f5a565b602002602001015160000151611d41565b8382815181106115cc576115cc613f5a565b60200260200101819052508281815181106115e9576115e9613f5a565b602002602001015151826115fd9190613fb8565b91508061160981613f86565b91505061158b565b506000816001600160401b0381111561162c5761162c61362b565b60405190808252806020026020018201604052801561168a57816020015b611677604051806060016040528060006001600160a01b0316815260200160008152602001600081525090565b81526020019060019003908161164a5790505b50905060005b828110156117cd5760005b85518110156117c75760005b8582815181106116b9576116b9613f5a565b6020026020010151518110156117b45760405180606001604052808784815181106116e6576116e6613f5a565b602002602001015183815181106116ff576116ff613f5a565b6020026020010151600001516001600160a01b0316815260200188848151811061172b5761172b613f5a565b602002602001015160000151815260200187848151811061174e5761174e613f5a565b6020026020010151838151811061176757611767613f5a565b60200260200101516020015181525084848151811061178857611788613f5a565b6020026020010181905250828061179e90613f86565b93505080806117ac90613f86565b9150506116a7565b50806117bf81613f86565b91505061169b565b50611690565b509695505050505050565b6117e0612898565b6001600160a01b0381166118365760405162461bcd60e51b815260206004820152601e60248201527f6576656e74206d616e61676572206164647265737320697320626c616e6b000060448201526064016107ba565b61012f80546001600160a01b0319166001600160a01b0392909216919091179055565b61012f54604051632e601e6f60e21b8152600481018390526000916001600160a01b0316908290829063b98079bc9060240160006040518083038186803b1580156118a357600080fd5b505afa1580156118b7573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526118df91908101906141e7565b60200151949350505050565b60606066805461069b90613ec2565b61012f5482906001600160a01b03168063972f13276119176123dc565b6040516001600160e01b031960e084901b1681526001600160a01b0390911660048201526024810185905260440160206040518083038186803b15801561195d57600080fd5b505afa158015611971573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119959190613f0d565b6119b15760405162461bcd60e51b81526004016107ba90613f2a565b6101395460408051635c975abb60e01b815290516001600160a01b03909216918291635c975abb916004808301926020929190829003018186803b1580156119f857600080fd5b505afa158015611a0c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a309190613f0d565b15611a3a57600080fd5b60008581526101356020526040902084905584611a556123dc565b6001600160a01b03167fae5b067be3e4869ca571a499572a09085a17c3d0442a8965b8356bf47f63ba9960405160405180910390a35050505050565b6110d1611a9c6123dc565b8383612b02565b6060600082516001600160401b03811115611ac057611ac061362b565b604051908082528060200260200182016040528015611b0557816020015b6040805180820190915260008082526020820152815260200190600190039081611ade5790505b50905060005b8351811015611b9c576040518060400160405280611b41868481518110611b3457611b34613f5a565b60200260200101516113b3565b6001600160a01b03168152602001858381518110611b6157611b61613f5a565b6020026020010151815250828281518110611b7e57611b7e613f5a565b60200260200101819052508080611b9490613f86565b915050611b0b565b5092915050565b611bb4611bae6123dc565b836127ab565b611bd05760405162461bcd60e51b81526004016107ba90613fec565b6111c584848484612bd1565b600054600490610100900460ff16158015611bfe575060005460ff8083169116105b611c615760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016107ba565b6000805461ffff191660ff83161761010017905560408051808201825260098152684d696e7452616c6c7960b81b6020808301919091528251808401909352600283526126a960f11b90830152611cb791612c04565b611cbf612c35565b611cc884612c64565b61013780546001600160a01b038581166001600160a01b0319928316179092556101398054928516929091169190911790556000805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150505050565b60606106866101386000848152602001908152602001600020805480602002602001604051908101604052809291908181526020018280548015611da457602002820191906000526020600020905b815481526020019060010190808311611d90575b5050505050611aa3565b60008181526101306020526040812080546060929190611dcd90613ec2565b80601f0160208091040260200160405190810160405280929190818152602001828054611df990613ec2565b8015611e465780601f10611e1b57610100808354040283529160200191611e46565b820191906000526020600020905b815481529060010190602001808311611e2957829003601f168201915b5093979650505050505050565b60006101316000611e648585612cb5565b815260208101919091526040016000205460ff169392505050565b61012f5482906001600160a01b03168063683159fd611e9c6123dc565b6040516001600160e01b031960e084901b1681526001600160a01b0390911660048201526024810185905260440160206040518083038186803b158015611ee257600080fd5b505afa158015611ef6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f1a9190613f0d565b611f365760405162461bcd60e51b81526004016107ba90613f2a565b6101395460408051635c975abb60e01b815290516001600160a01b03909216918291635c975abb916004808301926020929190829003018186803b158015611f7d57600080fd5b505afa158015611f91573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fb59190613f0d565b15611fbf57600080fd5b600085815261013b6020908152604091829020805460ff1916871515908117909155915191825286917fec48382efd77c28bd224c3221392758fb274b160a104cc76c67d2719bcaef7c091016109ff565b6101395460408051635c975abb60e01b815290516001600160a01b03909216918291635c975abb916004808301926020929190829003018186803b15801561205757600080fd5b505afa15801561206b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061208f9190613f0d565b1561209957600080fd5b61012f546001600160a01b03166120ae6123dc565b6001600160a01b0316146120f35760405162461bcd60e51b815260206004820152600c60248201526b1d5b985d5d1a1bdc9a5e995960a21b60448201526064016107ba565b60008581526101346020908152604080832087905561013590915281208490555b825181101561219b5782818151811061212f5761212f613f5a565b60200260200101516000015161013360006121678987868151811061215657612156613f5a565b602002602001015160200151612775565b81526020019081526020016000209080519060200190612188929190613455565b508061219381613f86565b915050612114565b505050505050565b6121ab612898565b6001600160a01b0381166122105760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016107ba565b61110181612ab0565b6101395460408051635c975abb60e01b815290516001600160a01b03909216918291635c975abb916004808301926020929190829003018186803b15801561226057600080fd5b505afa158015612274573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122989190613f0d565b156122a257600080fd5b6122ac83836111cb565b506101375460405163635e393960e11b81526001600160a01b0390911690819063c6bc7272906122e2908690889060040161423e565b600060405180830381600087803b1580156122fc57600080fd5b505af1158015612310573d6000803e3d6000fd5b5050505061232685856123216123dc565b61247a565b5050505050565b60006001600160e01b031982166380ac58cd60e01b148061235e57506001600160e01b03198216635b5e139f60e01b145b8061068657506301ffc9a760e01b6001600160e01b0319831614610686565b6000818152606760205260409020546001600160a01b03166111015760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b60448201526064016107ba565b60c9546000906001600160a01b03163314156123ff575060131936013560601c90565b612407612ce3565b905090565b600081815260696020526040902080546001600160a01b0319166001600160a01b0384169081179091558190612441826113b3565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000828152610134602052604090205461249690600190613fa1565b60008381526101346020526040812091909155600190610131906124ba8486612cb5565b815260200190815260200160002060006101000a81548160ff02191690831515021790555060006124eb8285612cb5565b60008181526101326020526040902054909150612509816001613fb8565b600083815261013260205260408120919091556101338161252a8782612775565b8152602001908152602001600020805461254390613ec2565b80601f016020809104026020016040519081016040528092919081815260200182805461256f90613ec2565b80156125bc5780601f10612591576101008083540402835291602001916125bc565b820191906000526020600020905b81548152906001019060200180831161259f57829003601f168201915b50505050509050600061013360006125d48886612775565b815260200190815260200160002080546125ed90613ec2565b80601f016020809104026020016040519081016040528092919081815260200182805461261990613ec2565b80156126665780601f1061263b57610100808354040283529160200191612666565b820191906000526020600020905b81548152906001019060200180831161264957829003601f168201915b50506040805160008152602081018083528151902095965061268e9450869350019050613fd0565b60405160208183030381529060405280519060200120146126ad578091505b60006126b961012e5490565b60008181526101306020908152604090912085519293506126de929091860190613455565b5060008781526101386020908152604080832080546001810182559084528284200184905583835261013a909152902087905561272061012e80546001019055565b61272a8682612d0b565b856001600160a01b03167faf2fad1984d2c7abaa9300537cf9fe1bcfaf2d6226e4ffdf03522dbf3064808e846040516127639190613580565b60405180910390a25050505050505050565b60408051602081018490529081018290526000906060015b60405160208183030381529060405280519060200120905092915050565b6000806127b7836113b3565b9050806001600160a01b0316846001600160a01b031614806127fe57506001600160a01b038082166000908152606a602090815260408083209388168352929052205460ff165b806128225750836001600160a01b03166128178461071e565b6001600160a01b0316145b949350505050565b600081815261013a6020908152604080832054835261013b90915290205460ff161561288d5760405162461bcd60e51b81526020600482015260126024820152711d1c985b9cd9995c881a5cc81b1bd8dad95960721b60448201526064016107ba565b61086d838383612d25565b6128a06123dc565b6001600160a01b03166128bb60fc546001600160a01b031690565b6001600160a01b0316146114ab5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016107ba565b805160005b818110156111c5578361013a600085848151811061293657612936613f5a565b6020026020010151815260200190815260200160002081905550806001019050612916565b6000612966826113b3565b905061297481600084612ecc565b61297f60008361240c565b6001600160a01b03811660009081526068602052604081208054600192906129a8908490613fa1565b909155505060008281526067602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6101375460408051602080820183526000858152610135909152828120548252915163532dd84d60e11b815291926001600160a01b0316918390839063a65bb09a90612a5690899086908a9060040161425b565b60206040518083038186803b158015612a6e57600080fd5b505afa158015612a82573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612aa69190613f0d565b9695505050505050565b60fc80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b816001600160a01b0316836001600160a01b03161415612b645760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016107ba565b6001600160a01b038381166000818152606a6020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b612bdc84848461282a565b612be884848484612f84565b6111c55760405162461bcd60e51b81526004016107ba906142a4565b600054610100900460ff16612c2b5760405162461bcd60e51b81526004016107ba906142f6565b6110d18282613098565b600054610100900460ff16612c5c5760405162461bcd60e51b81526004016107ba906142f6565b6114ab6130e6565b600054610100900460ff16612c8b5760405162461bcd60e51b81526004016107ba906142f6565b612c9361311d565b60c980546001600160a01b0319166001600160a01b0392909216919091179055565b6040516bffffffffffffffffffffffff19606084901b1660208201526034810182905260009060540161278d565b60c9546000906001600160a01b0316331415612d06575060131936013560601c90565b503390565b6110d1828260405180602001604052806000815250613144565b826001600160a01b0316612d38826113b3565b6001600160a01b031614612d9c5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b60648201526084016107ba565b6001600160a01b038216612dfe5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016107ba565b612e09838383612ecc565b612e1460008261240c565b6001600160a01b0383166000908152606860205260408120805460019290612e3d908490613fa1565b90915550506001600160a01b0382166000908152606860205260408120805460019290612e6b908490613fb8565b909155505060008181526067602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6001600160a01b038316612f2757612f2281609980546000838152609a60205260408120829055600182018355919091527f72a152ddfb8e864297c917af52ea6c1c68aead0fee1a62673fcc7e0c94979d000155565b612f4a565b816001600160a01b0316836001600160a01b031614612f4a57612f4a8382613177565b6001600160a01b038216612f615761086d81613214565b826001600160a01b0316826001600160a01b03161461086d5761086d82826132c3565b60006001600160a01b0384163b1561308d57836001600160a01b031663150b7a02612fad6123dc565b8786866040518563ffffffff1660e01b8152600401612fcf9493929190614341565b602060405180830381600087803b158015612fe957600080fd5b505af1925050508015613019575060408051601f3d908101601f1916820190925261301691810190614374565b60015b613073573d808015613047576040519150601f19603f3d011682016040523d82523d6000602084013e61304c565b606091505b50805161306b5760405162461bcd60e51b81526004016107ba906142a4565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612822565b506001949350505050565b600054610100900460ff166130bf5760405162461bcd60e51b81526004016107ba906142f6565b81516130d2906065906020850190613455565b50805161086d906066906020840190613455565b600054610100900460ff1661310d5760405162461bcd60e51b81526004016107ba906142f6565b6114ab6131186123dc565b612ab0565b600054610100900460ff166114ab5760405162461bcd60e51b81526004016107ba906142f6565b61314e8383613307565b61315b6000848484612f84565b61086d5760405162461bcd60e51b81526004016107ba906142a4565b6000600161318484611413565b61318e9190613fa1565b6000838152609860205260409020549091508082146131e1576001600160a01b03841660009081526097602090815260408083208584528252808320548484528184208190558352609890915290208190555b5060009182526098602090815260408084208490556001600160a01b039094168352609781528383209183525290812055565b60995460009061322690600190613fa1565b6000838152609a60205260408120546099805493945090928490811061324e5761324e613f5a565b90600052602060002001549050806099838154811061326f5761326f613f5a565b6000918252602080832090910192909255828152609a909152604080822084905585825281205560998054806132a7576132a7614391565b6001900381819060005260206000200160009055905550505050565b60006132ce83611413565b6001600160a01b039093166000908152609760209081526040808320868452825280832085905593825260989052919091209190915550565b6001600160a01b03821661335d5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016107ba565b6000818152606760205260409020546001600160a01b0316156133c25760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016107ba565b6133ce60008383612ecc565b6001600160a01b03821660009081526068602052604081208054600192906133f7908490613fb8565b909155505060008181526067602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b82805461346190613ec2565b90600052602060002090601f01602090048101928261348357600085556134c9565b82601f1061349c57805160ff19168380011785556134c9565b828001600101855582156134c9579182015b828111156134c95782518255916020019190600101906134ae565b506134d59291506134d9565b5090565b5b808211156134d557600081556001016134da565b6001600160e01b03198116811461110157600080fd5b60006020828403121561351657600080fd5b8135613521816134ee565b9392505050565b60005b8381101561354357818101518382015260200161352b565b838111156111c55750506000910152565b6000815180845261356c816020860160208601613528565b601f01601f19169290920160200192915050565b6020815260006135216020830184613554565b6000602082840312156135a557600080fd5b5035919050565b6001600160a01b038116811461110157600080fd5b600080604083850312156135d457600080fd5b82356135df816135ac565b946020939093013593505050565b801515811461110157600080fd5b6000806040838503121561360e57600080fd5b823591506020830135613620816135ed565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b604080519081016001600160401b03811182821017156136635761366361362b565b60405290565b60405160c081016001600160401b03811182821017156136635761366361362b565b604051601f8201601f191681016001600160401b03811182821017156136b3576136b361362b565b604052919050565b60006001600160401b038211156136d4576136d461362b565b5060051b60200190565b600080604083850312156136f157600080fd5b823591506020808401356001600160401b0381111561370f57600080fd5b8401601f8101861361372057600080fd5b803561373361372e826136bb565b61368b565b81815260059190911b8201830190838101908883111561375257600080fd5b928401925b8284101561377957833561376a816135ac565b82529284019290840190613757565b80955050505050509250929050565b60008060006060848603121561379d57600080fd5b505081359360208301359350604090920135919050565b60006020808301818452808551808352604092508286019150828160051b87010184880160005b8381101561381c57888303603f19018552815180518785526137ff88860182613554565b9189015194890194909452948701949250908601906001016137db565b509098975050505050505050565b60008060006060848603121561383f57600080fd5b833561384a816135ac565b9250602084013561385a816135ac565b929592945050506040919091013590565b6020808252825182820181905260009190848201906040850190845b818110156138a357835183529284019291840191600101613887565b50909695505050505050565b600082601f8301126138c057600080fd5b813560206138d061372e836136bb565b82815260059290921b840181019181810190868411156138ef57600080fd5b8286015b848110156117cd57803583529183019183016138f3565b6000806040838503121561391d57600080fd5b8235915060208301356001600160401b0381111561393a57600080fd5b613946858286016138af565b9150509250929050565b6000806040838503121561396357600080fd5b82356001600160401b038082111561397a57600080fd5b613986868387016138af565b935060209150818501358181111561399d57600080fd5b8501601f810187136139ae57600080fd5b80356139bc61372e826136bb565b81815260059190911b820184019084810190898311156139db57600080fd5b8584015b83811015613a13578035868111156139f75760008081fd5b613a058c89838901016138af565b8452509186019186016139df565b508096505050505050509250929050565b600082601f830112613a3557600080fd5b6040516103008082018281106001600160401b0382111715613a5957613a5961362b565b60405283018185821115613a6c57600080fd5b845b82811015613a86578035825260209182019101613a6e565b509195945050505050565b6000806103208385031215613aa557600080fd5b82359150613ab68460208501613a24565b90509250929050565b600060208284031215613ad157600080fd5b8135613521816135ac565b602080825282518282018190526000919060409081850190868401855b82811015613b3157815180516001600160a01b0316855286810151878601528501518585015260609093019290850190600101613af9565b5091979650505050505050565b60008060408385031215613b5157600080fd5b50508035926020909101359150565b60008060408385031215613b7357600080fd5b8235613b7e816135ac565b91506020830135613620816135ed565b600060208284031215613ba057600080fd5b81356001600160401b03811115613bb657600080fd5b612822848285016138af565b602080825282518282018190526000919060409081850190868401855b82811015613b3157815180516001600160a01b03168552860151868501529284019290850190600101613bdf565b60006001600160401b03821115613c2657613c2661362b565b50601f01601f191660200190565b6000613c4261372e84613c0d565b9050828152838383011115613c5657600080fd5b828260208301376000602084830101529392505050565b60008060008060808587031215613c8357600080fd5b8435613c8e816135ac565b93506020850135613c9e816135ac565b92506040850135915060608501356001600160401b03811115613cc057600080fd5b8501601f81018713613cd157600080fd5b613ce087823560208401613c34565b91505092959194509250565b600080600060608486031215613d0157600080fd5b8335613d0c816135ac565b92506020840135613d1c816135ac565b91506040840135613d2c816135ac565b809150509250925092565b60008060408385031215613d4a57600080fd5b8235613d55816135ac565b91506020830135613620816135ac565b60008060008060808587031215613d7b57600080fd5b84359350602085013592506040850135915060608501356001600160401b0380821115613da757600080fd5b818701915087601f830112613dbb57600080fd5b8135613dc961372e826136bb565b8082825260208201915060208360051b86010192508a831115613deb57600080fd5b602085015b83811015613e7b578481351115613e0657600080fd5b803586016040818e03601f19011215613e1e57600080fd5b613e26613641565b602082013587811115613e3857600080fd5b8201603f81018f13613e4957600080fd5b613e5b8f602083013560408401613c34565b825250604091909101356020808301919091529084529283019201613df0565b50979a9699509497505050505050565b60008060006103408486031215613ea157600080fd5b8335925060208401359150613eb98560408601613a24565b90509250925092565b600181811c90821680613ed657607f821691505b60208210811415613ef757634e487b7160e01b600052602260045260246000fd5b50919050565b8051613f08816135ed565b919050565b600060208284031215613f1f57600080fd5b8151613521816135ed565b6020808252601690820152753cb7ba903430bb32903737903832b936b4b9b9b4b7b760511b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415613f9a57613f9a613f70565b5060010190565b600082821015613fb357613fb3613f70565b500390565b60008219821115613fcb57613fcb613f70565b500190565b60008251613fe2818460208701613528565b9190910192915050565b6020808252602e908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526d1c881b9bdc88185c1c1c9bdd995960921b606082015260800190565b600082601f83011261404b57600080fd5b815161405961372e82613c0d565b81815284602083860101111561406e57600080fd5b612822826020830160208701613528565b600060c0828403121561409157600080fd5b614099613669565b9050815181526020820151602082015260408201516001600160401b03808211156140c357600080fd5b6140cf8583860161403a565b604084015260608401519150808211156140e857600080fd5b6140f48583860161403a565b6060840152608084015191508082111561410d57600080fd5b5061411a8482850161403a565b60808301525061412c60a08301613efd565b60a082015292915050565b6000602080838503121561414a57600080fd5b82516001600160401b038082111561416157600080fd5b818501915085601f83011261417557600080fd5b815161418361372e826136bb565b81815260059190911b830184019084810190888311156141a257600080fd5b8585015b838110156141da578051858111156141be5760008081fd5b6141cc8b89838a010161407f565b8452509186019186016141a6565b5098975050505050505050565b6000602082840312156141f957600080fd5b81516001600160401b0381111561420f57600080fd5b6128228482850161407f565b8060005b60188110156111c557815184526020938401939091019060010161421f565b610320810161424d828561421b565b826103008301529392505050565b610340810161426a828661421b565b61030082018460005b6001811015614292578151835260209283019290910190600101614273565b50505082610320830152949350505050565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090612aa690830184613554565b60006020828403121561438657600080fd5b8151613521816134ee565b634e487b7160e01b600052603160045260246000fdfea2646970667358221220530b3f51b9f51f2eb5859dec995ce8fed1c2fd8287e137080be2bc79c4f7ee4064736f6c63430008090033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106102695760003560e01c8063715018a611610151578063b88d4fde116100c3578063df4b39dd11610087578063df4b39dd146105b5578063e572e74b146105d9578063e985e9c5146105ec578063ef3ad9eb14610628578063f2fde38b1461063b578063fa86623b1461064e57600080fd5b8063b88d4fde14610556578063c0c53b8b14610569578063c4b88ea41461057c578063c87b56dd1461058f578063d622abc2146105a257600080fd5b806394d842901161011557806394d84290146104d457806395d89b41146104e75780639731c1d6146104ef5780639dcd681114610510578063a22cb46514610523578063af5723b11461053657600080fd5b8063715018a6146104645780638da5cb5b1461046c5780638f70738e1461047d578063902d41c51461049d5780639041e3f4146104c157600080fd5b80632f745c59116101ea5780634df30149116101ae5780634df30149146103d55780634f6ccce7146103e85780634ffc9f4b146103fb578063572b6c051461041c5780636352211e1461043e57806370a082311461045157600080fd5b80632f745c59146103765780633c5f24bf1461038957806342842e0e1461039c57806342966c68146103af5780634d01a500146103c257600080fd5b806312b90fd61161023157806312b90fd6146102fe57806318160ddd1461031157806319ffeb3b1461032357806323b872dd1461034357806329ec9f441461035657600080fd5b806301ffc9a71461026e57806306fdde0314610296578063081812fc146102ab578063095ea7b3146102d65780630daa8be7146102eb575b600080fd5b61028161027c366004613504565b610661565b60405190151581526020015b60405180910390f35b61029e61068c565b60405161028d9190613580565b6102be6102b9366004613593565b61071e565b6040516001600160a01b03909116815260200161028d565b6102e96102e43660046135c1565b610745565b005b6102e96102f93660046135fb565b610872565b6102e961030c3660046136de565b610a0e565b6099545b60405190815260200161028d565b610336610331366004613788565b610c59565b60405161028d91906137b4565b6102e961035136600461382a565b610f8e565b610369610364366004613593565b610fc6565b60405161028d919061386b565b6103156103843660046135c1565b611029565b6102e961039736600461390a565b6110bf565b6102e96103aa36600461382a565b6110d5565b6102e96103bd366004613593565b6110f0565b6102e96103d0366004613950565b611104565b6102816103e3366004613a91565b6111cb565b6103156103f6366004613593565b611320565b610315610409366004613593565b6000908152610134602052604090205490565b61028161042a366004613abf565b60c9546001600160a01b0391821691161490565b6102be61044c366004613593565b6113b3565b61031561045f366004613abf565b611413565b6102e9611499565b60fc546001600160a01b03166102be565b61049061048b366004613593565b6114ad565b60405161028d9190613adc565b6102816104ab366004613593565b600090815261013b602052604090205460ff1690565b6102e96104cf366004613abf565b6117d8565b6103156104e2366004613593565b611859565b61029e6118eb565b6103156104fd366004613593565b600090815261013a602052604090205490565b6102e961051e366004613b3e565b6118fa565b6102e9610531366004613b60565b611a91565b610549610544366004613b8e565b611aa3565b60405161028d9190613bc2565b6102e9610564366004613c6d565b611ba3565b6102e9610577366004613cec565b611bdc565b61054961058a366004613593565b611d41565b61029e61059d366004613593565b611dae565b6102816105b03660046135c1565b611e53565b6102816105c3366004613593565b6000908152610136602052604090205460ff1690565b6102e96105e73660046135fb565b611e7f565b6102816105fa366004613d37565b6001600160a01b039182166000908152606a6020908152604080832093909416825291909152205460ff1690565b6102e9610636366004613d65565b612010565b6102e9610649366004613abf565b6121a3565b6102e961065c366004613e8b565b612219565b60006001600160e01b0319821663780e9d6360e01b148061068657506106868261232d565b92915050565b60606065805461069b90613ec2565b80601f01602080910402602001604051908101604052809291908181526020018280546106c790613ec2565b80156107145780601f106106e957610100808354040283529160200191610714565b820191906000526020600020905b8154815290600101906020018083116106f757829003601f168201915b5050505050905090565b60006107298261237d565b506000908152606960205260409020546001600160a01b031690565b6000610750826113b3565b9050806001600160a01b0316836001600160a01b031614156107c35760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084015b60405180910390fd5b806001600160a01b03166107d56123dc565b6001600160a01b031614806107f157506107f1816105fa6123dc565b6108635760405162461bcd60e51b815260206004820152603e60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206e6f7220617070726f76656420666f7220616c6c000060648201526084016107ba565b61086d838361240c565b505050565b61012f5482906001600160a01b03168063972f132761088f6123dc565b6040516001600160e01b031960e084901b1681526001600160a01b0390911660048201526024810185905260440160206040518083038186803b1580156108d557600080fd5b505afa1580156108e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061090d9190613f0d565b6109295760405162461bcd60e51b81526004016107ba90613f2a565b6101395460408051635c975abb60e01b815290516001600160a01b03909216918291635c975abb916004808301926020929190829003018186803b15801561097057600080fd5b505afa158015610984573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109a89190613f0d565b156109b257600080fd5b60008581526101366020908152604091829020805460ff1916871515908117909155915191825286917f1e3ed2b292ed72652054799a4fde74789a8670c153df666f76e01345ec31828191015b60405180910390a25050505050565b61012f5482906001600160a01b03168063972f1327610a2b6123dc565b6040516001600160e01b031960e084901b1681526001600160a01b0390911660048201526024810185905260440160206040518083038186803b158015610a7157600080fd5b505afa158015610a85573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aa99190613f0d565b610ac55760405162461bcd60e51b81526004016107ba90613f2a565b6101395460408051635c975abb60e01b815290516001600160a01b03909216918291635c975abb916004808301926020929190829003018186803b158015610b0c57600080fd5b505afa158015610b20573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b449190613f0d565b15610b4e57600080fd5b6000610b5986611859565b8551600088815261013460205260409020549192501115610bbc5760405162461bcd60e51b815260206004820152601d60248201527f72656d61696e696e6720636f756e74206973206e6f7420656e6f75676800000060448201526064016107ba565b60005b8551811015610c12576000868281518110610bdc57610bdc613f5a565b60200260200101519050610bf08189611e53565b610bff57610bff83898361247a565b5080610c0a81613f86565b915050610bbf565b5085610c1c6123dc565b6001600160a01b03167ff0fae1d6c53c230d212972a098b7dbf41d3a6dbb348a4ebf640a51ce63cd3b6760405160405180910390a3505050505050565b606082610c6557606492505b6064831115610cab5760405162461bcd60e51b81526020600482015260126024820152716c696d697420697320746f6f206c6172676560701b60448201526064016107ba565b6000836001600160401b03811115610cc557610cc561362b565b604051908082528060200260200182016040528015610d0b57816020015b604080518082019091526060815260006020820152815260200190600190039081610ce35790505b509050610d1a84600019613fa1565b831115610d755760405162461bcd60e51b815260206004820152602360248201527f6c696d6974202b206f6666736574206d757374206265203c3d20325e323536206044820152622d203160e81b60648201526084016107ba565b6000610d818486613fb8565b90506000845b82811015610ec95760006101336000610da08b85612775565b81526020019081526020016000208054610db990613ec2565b80601f0160208091040260200160405190810160405280929190818152602001828054610de590613ec2565b8015610e325780601f10610e0757610100808354040283529160200191610e32565b820191906000526020600020905b815481529060010190602001808311610e1557829003601f168201915b505060408051600081526020810180835281519020959650610e5a9450869350019050613fd0565b6040516020818303038152906040528051906020012014610eb657604051806040016040528082815260200183815250858481518110610e9c57610e9c613f5a565b60200260200101819052508280610eb290613f86565b9350505b5080610ec181613f86565b915050610d87565b506000816001600160401b03811115610ee457610ee461362b565b604051908082528060200260200182016040528015610f2a57816020015b604080518082019091526060815260006020820152815260200190600190039081610f025790505b50905060005b82811015610f8257848181518110610f4a57610f4a613f5a565b6020026020010151828281518110610f6457610f64613f5a565b60200260200101819052508080610f7a90613f86565b915050610f30565b50979650505050505050565b610f9f610f996123dc565b826127ab565b610fbb5760405162461bcd60e51b81526004016107ba90613fec565b61086d83838361282a565b6000818152610138602090815260409182902080548351818402810184019094528084526060939283018282801561101d57602002820191906000526020600020905b815481526020019060010190808311611009575b50505050509050919050565b600061103483611413565b82106110965760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b60648201526084016107ba565b506001600160a01b03919091166000908152609760209081526040808320938352929052205490565b6110c7612898565b6110d18282612911565b5050565b61086d83838360405180602001604052806000815250611ba3565b6110f8612898565b6111018161295b565b50565b61110c612898565b8151815181146111545760405162461bcd60e51b81526020600482015260136024820152720d8cadccee8d040d2e640dcdee840dac2e8c6d606b1b60448201526064016107ba565b60005b818110156111c55782818151811061117157611171613f5a565b6020026020010151516000146111bd576111bd84828151811061119657611196613f5a565b60200260200101518483815181106111b0576111b0613f5a565b6020026020010151612911565b600101611157565b50505050565b60006111d78284612a02565b61121b5760405162461bcd60e51b8152602060048201526015602482015274696e76616c6964207365637265742070687261736560581b60448201526064016107ba565b600083815261013460205260409020546112775760405162461bcd60e51b815260206004820152601760248201527f72656d61696e696e6720636f756e74206973207a65726f00000000000000000060448201526064016107ba565b6112886112826123dc565b84611e53565b156112c65760405162461bcd60e51b815260206004820152600e60248201526d185b1c9958591e481b5a5b9d195960921b60448201526064016107ba565b6000838152610136602052604090205460ff16156113175760405162461bcd60e51b815260206004820152600e60248201526d1b5a5b9d081a5cc81b1bd8dad95960921b60448201526064016107ba565b50600192915050565b600061132b60995490565b821061138e5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b60648201526084016107ba565b609982815481106113a1576113a1613f5a565b90600052602060002001549050919050565b6000818152606760205260408120546001600160a01b0316806106865760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b60448201526064016107ba565b60006001600160a01b03821661147d5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b60648201526084016107ba565b506001600160a01b031660009081526068602052604090205490565b6114a1612898565b6114ab6000612ab0565b565b61012f5460405163f562082360e01b8152600481018390526060916001600160a01b031690600090829063f56208239060240160006040518083038186803b1580156114f857600080fd5b505afa15801561150c573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526115349190810190614137565b9050600081516001600160401b038111156115515761155161362b565b60405190808252806020026020018201604052801561158457816020015b606081526020019060019003908161156f5790505b5090506000805b8351811015611611576115ba8482815181106115a9576115a9613f5a565b602002602001015160000151611d41565b8382815181106115cc576115cc613f5a565b60200260200101819052508281815181106115e9576115e9613f5a565b602002602001015151826115fd9190613fb8565b91508061160981613f86565b91505061158b565b506000816001600160401b0381111561162c5761162c61362b565b60405190808252806020026020018201604052801561168a57816020015b611677604051806060016040528060006001600160a01b0316815260200160008152602001600081525090565b81526020019060019003908161164a5790505b50905060005b828110156117cd5760005b85518110156117c75760005b8582815181106116b9576116b9613f5a565b6020026020010151518110156117b45760405180606001604052808784815181106116e6576116e6613f5a565b602002602001015183815181106116ff576116ff613f5a565b6020026020010151600001516001600160a01b0316815260200188848151811061172b5761172b613f5a565b602002602001015160000151815260200187848151811061174e5761174e613f5a565b6020026020010151838151811061176757611767613f5a565b60200260200101516020015181525084848151811061178857611788613f5a565b6020026020010181905250828061179e90613f86565b93505080806117ac90613f86565b9150506116a7565b50806117bf81613f86565b91505061169b565b50611690565b509695505050505050565b6117e0612898565b6001600160a01b0381166118365760405162461bcd60e51b815260206004820152601e60248201527f6576656e74206d616e61676572206164647265737320697320626c616e6b000060448201526064016107ba565b61012f80546001600160a01b0319166001600160a01b0392909216919091179055565b61012f54604051632e601e6f60e21b8152600481018390526000916001600160a01b0316908290829063b98079bc9060240160006040518083038186803b1580156118a357600080fd5b505afa1580156118b7573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526118df91908101906141e7565b60200151949350505050565b60606066805461069b90613ec2565b61012f5482906001600160a01b03168063972f13276119176123dc565b6040516001600160e01b031960e084901b1681526001600160a01b0390911660048201526024810185905260440160206040518083038186803b15801561195d57600080fd5b505afa158015611971573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119959190613f0d565b6119b15760405162461bcd60e51b81526004016107ba90613f2a565b6101395460408051635c975abb60e01b815290516001600160a01b03909216918291635c975abb916004808301926020929190829003018186803b1580156119f857600080fd5b505afa158015611a0c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a309190613f0d565b15611a3a57600080fd5b60008581526101356020526040902084905584611a556123dc565b6001600160a01b03167fae5b067be3e4869ca571a499572a09085a17c3d0442a8965b8356bf47f63ba9960405160405180910390a35050505050565b6110d1611a9c6123dc565b8383612b02565b6060600082516001600160401b03811115611ac057611ac061362b565b604051908082528060200260200182016040528015611b0557816020015b6040805180820190915260008082526020820152815260200190600190039081611ade5790505b50905060005b8351811015611b9c576040518060400160405280611b41868481518110611b3457611b34613f5a565b60200260200101516113b3565b6001600160a01b03168152602001858381518110611b6157611b61613f5a565b6020026020010151815250828281518110611b7e57611b7e613f5a565b60200260200101819052508080611b9490613f86565b915050611b0b565b5092915050565b611bb4611bae6123dc565b836127ab565b611bd05760405162461bcd60e51b81526004016107ba90613fec565b6111c584848484612bd1565b600054600490610100900460ff16158015611bfe575060005460ff8083169116105b611c615760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016107ba565b6000805461ffff191660ff83161761010017905560408051808201825260098152684d696e7452616c6c7960b81b6020808301919091528251808401909352600283526126a960f11b90830152611cb791612c04565b611cbf612c35565b611cc884612c64565b61013780546001600160a01b038581166001600160a01b0319928316179092556101398054928516929091169190911790556000805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150505050565b60606106866101386000848152602001908152602001600020805480602002602001604051908101604052809291908181526020018280548015611da457602002820191906000526020600020905b815481526020019060010190808311611d90575b5050505050611aa3565b60008181526101306020526040812080546060929190611dcd90613ec2565b80601f0160208091040260200160405190810160405280929190818152602001828054611df990613ec2565b8015611e465780601f10611e1b57610100808354040283529160200191611e46565b820191906000526020600020905b815481529060010190602001808311611e2957829003601f168201915b5093979650505050505050565b60006101316000611e648585612cb5565b815260208101919091526040016000205460ff169392505050565b61012f5482906001600160a01b03168063683159fd611e9c6123dc565b6040516001600160e01b031960e084901b1681526001600160a01b0390911660048201526024810185905260440160206040518083038186803b158015611ee257600080fd5b505afa158015611ef6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f1a9190613f0d565b611f365760405162461bcd60e51b81526004016107ba90613f2a565b6101395460408051635c975abb60e01b815290516001600160a01b03909216918291635c975abb916004808301926020929190829003018186803b158015611f7d57600080fd5b505afa158015611f91573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fb59190613f0d565b15611fbf57600080fd5b600085815261013b6020908152604091829020805460ff1916871515908117909155915191825286917fec48382efd77c28bd224c3221392758fb274b160a104cc76c67d2719bcaef7c091016109ff565b6101395460408051635c975abb60e01b815290516001600160a01b03909216918291635c975abb916004808301926020929190829003018186803b15801561205757600080fd5b505afa15801561206b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061208f9190613f0d565b1561209957600080fd5b61012f546001600160a01b03166120ae6123dc565b6001600160a01b0316146120f35760405162461bcd60e51b815260206004820152600c60248201526b1d5b985d5d1a1bdc9a5e995960a21b60448201526064016107ba565b60008581526101346020908152604080832087905561013590915281208490555b825181101561219b5782818151811061212f5761212f613f5a565b60200260200101516000015161013360006121678987868151811061215657612156613f5a565b602002602001015160200151612775565b81526020019081526020016000209080519060200190612188929190613455565b508061219381613f86565b915050612114565b505050505050565b6121ab612898565b6001600160a01b0381166122105760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016107ba565b61110181612ab0565b6101395460408051635c975abb60e01b815290516001600160a01b03909216918291635c975abb916004808301926020929190829003018186803b15801561226057600080fd5b505afa158015612274573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122989190613f0d565b156122a257600080fd5b6122ac83836111cb565b506101375460405163635e393960e11b81526001600160a01b0390911690819063c6bc7272906122e2908690889060040161423e565b600060405180830381600087803b1580156122fc57600080fd5b505af1158015612310573d6000803e3d6000fd5b5050505061232685856123216123dc565b61247a565b5050505050565b60006001600160e01b031982166380ac58cd60e01b148061235e57506001600160e01b03198216635b5e139f60e01b145b8061068657506301ffc9a760e01b6001600160e01b0319831614610686565b6000818152606760205260409020546001600160a01b03166111015760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b60448201526064016107ba565b60c9546000906001600160a01b03163314156123ff575060131936013560601c90565b612407612ce3565b905090565b600081815260696020526040902080546001600160a01b0319166001600160a01b0384169081179091558190612441826113b3565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000828152610134602052604090205461249690600190613fa1565b60008381526101346020526040812091909155600190610131906124ba8486612cb5565b815260200190815260200160002060006101000a81548160ff02191690831515021790555060006124eb8285612cb5565b60008181526101326020526040902054909150612509816001613fb8565b600083815261013260205260408120919091556101338161252a8782612775565b8152602001908152602001600020805461254390613ec2565b80601f016020809104026020016040519081016040528092919081815260200182805461256f90613ec2565b80156125bc5780601f10612591576101008083540402835291602001916125bc565b820191906000526020600020905b81548152906001019060200180831161259f57829003601f168201915b50505050509050600061013360006125d48886612775565b815260200190815260200160002080546125ed90613ec2565b80601f016020809104026020016040519081016040528092919081815260200182805461261990613ec2565b80156126665780601f1061263b57610100808354040283529160200191612666565b820191906000526020600020905b81548152906001019060200180831161264957829003601f168201915b50506040805160008152602081018083528151902095965061268e9450869350019050613fd0565b60405160208183030381529060405280519060200120146126ad578091505b60006126b961012e5490565b60008181526101306020908152604090912085519293506126de929091860190613455565b5060008781526101386020908152604080832080546001810182559084528284200184905583835261013a909152902087905561272061012e80546001019055565b61272a8682612d0b565b856001600160a01b03167faf2fad1984d2c7abaa9300537cf9fe1bcfaf2d6226e4ffdf03522dbf3064808e846040516127639190613580565b60405180910390a25050505050505050565b60408051602081018490529081018290526000906060015b60405160208183030381529060405280519060200120905092915050565b6000806127b7836113b3565b9050806001600160a01b0316846001600160a01b031614806127fe57506001600160a01b038082166000908152606a602090815260408083209388168352929052205460ff165b806128225750836001600160a01b03166128178461071e565b6001600160a01b0316145b949350505050565b600081815261013a6020908152604080832054835261013b90915290205460ff161561288d5760405162461bcd60e51b81526020600482015260126024820152711d1c985b9cd9995c881a5cc81b1bd8dad95960721b60448201526064016107ba565b61086d838383612d25565b6128a06123dc565b6001600160a01b03166128bb60fc546001600160a01b031690565b6001600160a01b0316146114ab5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016107ba565b805160005b818110156111c5578361013a600085848151811061293657612936613f5a565b6020026020010151815260200190815260200160002081905550806001019050612916565b6000612966826113b3565b905061297481600084612ecc565b61297f60008361240c565b6001600160a01b03811660009081526068602052604081208054600192906129a8908490613fa1565b909155505060008281526067602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6101375460408051602080820183526000858152610135909152828120548252915163532dd84d60e11b815291926001600160a01b0316918390839063a65bb09a90612a5690899086908a9060040161425b565b60206040518083038186803b158015612a6e57600080fd5b505afa158015612a82573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612aa69190613f0d565b9695505050505050565b60fc80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b816001600160a01b0316836001600160a01b03161415612b645760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016107ba565b6001600160a01b038381166000818152606a6020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b612bdc84848461282a565b612be884848484612f84565b6111c55760405162461bcd60e51b81526004016107ba906142a4565b600054610100900460ff16612c2b5760405162461bcd60e51b81526004016107ba906142f6565b6110d18282613098565b600054610100900460ff16612c5c5760405162461bcd60e51b81526004016107ba906142f6565b6114ab6130e6565b600054610100900460ff16612c8b5760405162461bcd60e51b81526004016107ba906142f6565b612c9361311d565b60c980546001600160a01b0319166001600160a01b0392909216919091179055565b6040516bffffffffffffffffffffffff19606084901b1660208201526034810182905260009060540161278d565b60c9546000906001600160a01b0316331415612d06575060131936013560601c90565b503390565b6110d1828260405180602001604052806000815250613144565b826001600160a01b0316612d38826113b3565b6001600160a01b031614612d9c5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b60648201526084016107ba565b6001600160a01b038216612dfe5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016107ba565b612e09838383612ecc565b612e1460008261240c565b6001600160a01b0383166000908152606860205260408120805460019290612e3d908490613fa1565b90915550506001600160a01b0382166000908152606860205260408120805460019290612e6b908490613fb8565b909155505060008181526067602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6001600160a01b038316612f2757612f2281609980546000838152609a60205260408120829055600182018355919091527f72a152ddfb8e864297c917af52ea6c1c68aead0fee1a62673fcc7e0c94979d000155565b612f4a565b816001600160a01b0316836001600160a01b031614612f4a57612f4a8382613177565b6001600160a01b038216612f615761086d81613214565b826001600160a01b0316826001600160a01b03161461086d5761086d82826132c3565b60006001600160a01b0384163b1561308d57836001600160a01b031663150b7a02612fad6123dc565b8786866040518563ffffffff1660e01b8152600401612fcf9493929190614341565b602060405180830381600087803b158015612fe957600080fd5b505af1925050508015613019575060408051601f3d908101601f1916820190925261301691810190614374565b60015b613073573d808015613047576040519150601f19603f3d011682016040523d82523d6000602084013e61304c565b606091505b50805161306b5760405162461bcd60e51b81526004016107ba906142a4565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612822565b506001949350505050565b600054610100900460ff166130bf5760405162461bcd60e51b81526004016107ba906142f6565b81516130d2906065906020850190613455565b50805161086d906066906020840190613455565b600054610100900460ff1661310d5760405162461bcd60e51b81526004016107ba906142f6565b6114ab6131186123dc565b612ab0565b600054610100900460ff166114ab5760405162461bcd60e51b81526004016107ba906142f6565b61314e8383613307565b61315b6000848484612f84565b61086d5760405162461bcd60e51b81526004016107ba906142a4565b6000600161318484611413565b61318e9190613fa1565b6000838152609860205260409020549091508082146131e1576001600160a01b03841660009081526097602090815260408083208584528252808320548484528184208190558352609890915290208190555b5060009182526098602090815260408084208490556001600160a01b039094168352609781528383209183525290812055565b60995460009061322690600190613fa1565b6000838152609a60205260408120546099805493945090928490811061324e5761324e613f5a565b90600052602060002001549050806099838154811061326f5761326f613f5a565b6000918252602080832090910192909255828152609a909152604080822084905585825281205560998054806132a7576132a7614391565b6001900381819060005260206000200160009055905550505050565b60006132ce83611413565b6001600160a01b039093166000908152609760209081526040808320868452825280832085905593825260989052919091209190915550565b6001600160a01b03821661335d5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016107ba565b6000818152606760205260409020546001600160a01b0316156133c25760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016107ba565b6133ce60008383612ecc565b6001600160a01b03821660009081526068602052604081208054600192906133f7908490613fb8565b909155505060008181526067602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b82805461346190613ec2565b90600052602060002090601f01602090048101928261348357600085556134c9565b82601f1061349c57805160ff19168380011785556134c9565b828001600101855582156134c9579182015b828111156134c95782518255916020019190600101906134ae565b506134d59291506134d9565b5090565b5b808211156134d557600081556001016134da565b6001600160e01b03198116811461110157600080fd5b60006020828403121561351657600080fd5b8135613521816134ee565b9392505050565b60005b8381101561354357818101518382015260200161352b565b838111156111c55750506000910152565b6000815180845261356c816020860160208601613528565b601f01601f19169290920160200192915050565b6020815260006135216020830184613554565b6000602082840312156135a557600080fd5b5035919050565b6001600160a01b038116811461110157600080fd5b600080604083850312156135d457600080fd5b82356135df816135ac565b946020939093013593505050565b801515811461110157600080fd5b6000806040838503121561360e57600080fd5b823591506020830135613620816135ed565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b604080519081016001600160401b03811182821017156136635761366361362b565b60405290565b60405160c081016001600160401b03811182821017156136635761366361362b565b604051601f8201601f191681016001600160401b03811182821017156136b3576136b361362b565b604052919050565b60006001600160401b038211156136d4576136d461362b565b5060051b60200190565b600080604083850312156136f157600080fd5b823591506020808401356001600160401b0381111561370f57600080fd5b8401601f8101861361372057600080fd5b803561373361372e826136bb565b61368b565b81815260059190911b8201830190838101908883111561375257600080fd5b928401925b8284101561377957833561376a816135ac565b82529284019290840190613757565b80955050505050509250929050565b60008060006060848603121561379d57600080fd5b505081359360208301359350604090920135919050565b60006020808301818452808551808352604092508286019150828160051b87010184880160005b8381101561381c57888303603f19018552815180518785526137ff88860182613554565b9189015194890194909452948701949250908601906001016137db565b509098975050505050505050565b60008060006060848603121561383f57600080fd5b833561384a816135ac565b9250602084013561385a816135ac565b929592945050506040919091013590565b6020808252825182820181905260009190848201906040850190845b818110156138a357835183529284019291840191600101613887565b50909695505050505050565b600082601f8301126138c057600080fd5b813560206138d061372e836136bb565b82815260059290921b840181019181810190868411156138ef57600080fd5b8286015b848110156117cd57803583529183019183016138f3565b6000806040838503121561391d57600080fd5b8235915060208301356001600160401b0381111561393a57600080fd5b613946858286016138af565b9150509250929050565b6000806040838503121561396357600080fd5b82356001600160401b038082111561397a57600080fd5b613986868387016138af565b935060209150818501358181111561399d57600080fd5b8501601f810187136139ae57600080fd5b80356139bc61372e826136bb565b81815260059190911b820184019084810190898311156139db57600080fd5b8584015b83811015613a13578035868111156139f75760008081fd5b613a058c89838901016138af565b8452509186019186016139df565b508096505050505050509250929050565b600082601f830112613a3557600080fd5b6040516103008082018281106001600160401b0382111715613a5957613a5961362b565b60405283018185821115613a6c57600080fd5b845b82811015613a86578035825260209182019101613a6e565b509195945050505050565b6000806103208385031215613aa557600080fd5b82359150613ab68460208501613a24565b90509250929050565b600060208284031215613ad157600080fd5b8135613521816135ac565b602080825282518282018190526000919060409081850190868401855b82811015613b3157815180516001600160a01b0316855286810151878601528501518585015260609093019290850190600101613af9565b5091979650505050505050565b60008060408385031215613b5157600080fd5b50508035926020909101359150565b60008060408385031215613b7357600080fd5b8235613b7e816135ac565b91506020830135613620816135ed565b600060208284031215613ba057600080fd5b81356001600160401b03811115613bb657600080fd5b612822848285016138af565b602080825282518282018190526000919060409081850190868401855b82811015613b3157815180516001600160a01b03168552860151868501529284019290850190600101613bdf565b60006001600160401b03821115613c2657613c2661362b565b50601f01601f191660200190565b6000613c4261372e84613c0d565b9050828152838383011115613c5657600080fd5b828260208301376000602084830101529392505050565b60008060008060808587031215613c8357600080fd5b8435613c8e816135ac565b93506020850135613c9e816135ac565b92506040850135915060608501356001600160401b03811115613cc057600080fd5b8501601f81018713613cd157600080fd5b613ce087823560208401613c34565b91505092959194509250565b600080600060608486031215613d0157600080fd5b8335613d0c816135ac565b92506020840135613d1c816135ac565b91506040840135613d2c816135ac565b809150509250925092565b60008060408385031215613d4a57600080fd5b8235613d55816135ac565b91506020830135613620816135ac565b60008060008060808587031215613d7b57600080fd5b84359350602085013592506040850135915060608501356001600160401b0380821115613da757600080fd5b818701915087601f830112613dbb57600080fd5b8135613dc961372e826136bb565b8082825260208201915060208360051b86010192508a831115613deb57600080fd5b602085015b83811015613e7b578481351115613e0657600080fd5b803586016040818e03601f19011215613e1e57600080fd5b613e26613641565b602082013587811115613e3857600080fd5b8201603f81018f13613e4957600080fd5b613e5b8f602083013560408401613c34565b825250604091909101356020808301919091529084529283019201613df0565b50979a9699509497505050505050565b60008060006103408486031215613ea157600080fd5b8335925060208401359150613eb98560408601613a24565b90509250925092565b600181811c90821680613ed657607f821691505b60208210811415613ef757634e487b7160e01b600052602260045260246000fd5b50919050565b8051613f08816135ed565b919050565b600060208284031215613f1f57600080fd5b8151613521816135ed565b6020808252601690820152753cb7ba903430bb32903737903832b936b4b9b9b4b7b760511b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415613f9a57613f9a613f70565b5060010190565b600082821015613fb357613fb3613f70565b500390565b60008219821115613fcb57613fcb613f70565b500190565b60008251613fe2818460208701613528565b9190910192915050565b6020808252602e908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526d1c881b9bdc88185c1c1c9bdd995960921b606082015260800190565b600082601f83011261404b57600080fd5b815161405961372e82613c0d565b81815284602083860101111561406e57600080fd5b612822826020830160208701613528565b600060c0828403121561409157600080fd5b614099613669565b9050815181526020820151602082015260408201516001600160401b03808211156140c357600080fd5b6140cf8583860161403a565b604084015260608401519150808211156140e857600080fd5b6140f48583860161403a565b6060840152608084015191508082111561410d57600080fd5b5061411a8482850161403a565b60808301525061412c60a08301613efd565b60a082015292915050565b6000602080838503121561414a57600080fd5b82516001600160401b038082111561416157600080fd5b818501915085601f83011261417557600080fd5b815161418361372e826136bb565b81815260059190911b830184019084810190888311156141a257600080fd5b8585015b838110156141da578051858111156141be5760008081fd5b6141cc8b89838a010161407f565b8452509186019186016141a6565b5098975050505050505050565b6000602082840312156141f957600080fd5b81516001600160401b0381111561420f57600080fd5b6128228482850161407f565b8060005b60188110156111c557815184526020938401939091019060010161421f565b610320810161424d828561421b565b826103008301529392505050565b610340810161426a828661421b565b61030082018460005b6001811015614292578151835260209283019290910190600101614273565b50505082610320830152949350505050565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090612aa690830184613554565b60006020828403121561438657600080fd5b8151613521816134ee565b634e487b7160e01b600052603160045260246000fdfea2646970667358221220530b3f51b9f51f2eb5859dec995ce8fed1c2fd8287e137080be2bc79c4f7ee4064736f6c63430008090033", "linkReferences": {}, "deployedLinkReferences": {} } diff --git a/frontend/src/hooks/useEvent.ts b/frontend/src/hooks/useEvent.ts index ed6036a4..bb01c522 100644 --- a/frontend/src/hooks/useEvent.ts +++ b/frontend/src/hooks/useEvent.ts @@ -235,12 +235,13 @@ export const useCreateEvent = (address: string) => { ).toISOString(); await mutateAsync({ args: [ - params.groupId, + Number(params.groupId), params.eventName, params.description, `${startDateTime}/${endDateTime}`, params.mintLimit, params.useMtx, + params.nonTransferable, proof?.publicInputCalldata[0], params.attributes, ], diff --git a/frontend/src/hooks/useMintNFT.ts b/frontend/src/hooks/useMintNFT.ts index f5b07936..37615053 100644 --- a/frontend/src/hooks/useMintNFT.ts +++ b/frontend/src/hooks/useMintNFT.ts @@ -470,6 +470,17 @@ export const useIsMintLocked = (eventId: number | BigNumber) => { return { isMintLocked: data, isLoading, refetch }; }; +export const useIsNonTransferable = (eventId: number | BigNumber) => { + const { mintNFTContract } = useMintNFTContract(); + const { data, isLoading, refetch } = useContractRead( + mintNFTContract, + "getIsNonTransferable", + [eventId] + ); + + return { isNonTransferable: data, isLoading, refetch }; +}; + export const useMintLock = (eventId: number | BigNumber, locked: boolean) => { const { mintNFTContract } = useMintNFTContract(); const { mutateAsync, isLoading, error, status } = useContractWrite( @@ -508,6 +519,47 @@ export const useMintLock = (eventId: number | BigNumber, locked: boolean) => { return { lock, isLoading, error, status, isSuccess }; }; +export const useTransferLock = ( + eventId: number | BigNumber, + locked: boolean +) => { + const { mintNFTContract } = useMintNFTContract(); + const { mutateAsync, isLoading, error, status } = useContractWrite( + mintNFTContract, + "changeNonTransferable" + ); + + const fromBlock = useCurrentBlock(); + const { data } = useContractEvents(mintNFTContract, "NonTransferable", { + queryFilter: { + filters: { + eventId: eventId, + fromBlock, + }, + }, + subscribe: true, + }); + + const lock = useCallback(async () => { + try { + await mutateAsync({ args: [eventId, locked] }); + } catch (_) {} + }, [eventId, locked, mutateAsync]); + + const isSuccess = useMemo(() => { + const includesEvent = (data: ContractEvent>[]) => { + if (!fromBlock) return false; + return data.some((event) => { + return event.transaction.blockNumber > fromBlock; + }); + }; + if (status !== "success" || !data || !includesEvent(data)) return false; + return true; + }, [data, status, eventId, locked]); + + return { lock, isLoading, error, status, isSuccess }; +}; + export const useResetSecretPhrase = (eventId: number | BigNumber) => { const { mintNFTContract } = useMintNFTContract(); const { diff --git a/frontend/src/locales/en.ts b/frontend/src/locales/en.ts index ed8feaa9..927fc271 100644 --- a/frontend/src/locales/en.ts +++ b/frontend/src/locales/en.ts @@ -86,6 +86,11 @@ export default { EVENT_USE_MTX: "Taking on gas fee for participants", EVENT_USE_MTX_TRUE: "Yes", EVENT_USE_MTX_FALSE: "No", + EVENT_USE_NTT: "Transfer setting for NFTs", + EVENT_USE_NTT_DESC: + "If you set it to non-transferable, the person who receives the NFT in this event will not be able to transfer it to others. This setting can be changed later.", + EVENT_USE_NTT_TRUE: "Non-transferable", + EVENT_USE_NTT_FALSE: "Transferable", EVENT_ESTIMATED_GAS_MTX: "Estimated deposit amount required to take on", EVENT_SECRETPHRASE: "SecretPhrase to mint", EVENT_SECRETPHRASE_DESC: @@ -134,12 +139,20 @@ export default { EVENT_ADMIN_MENU: "Admin Menu", EVENT_MINTLOCK_SETTING: "MintLock Setting", EVENT_MINTLOCK_SETTING_DESC: - "While locked, participants will not be able to Mint (receive proof of participation) for NFT.", - EVENT_ISLOCKED_TRUE: "Locked", - EVENT_ISLOCKED_FALSE: "Unlocked", + "While mint locked, participants will not be able to Mint (receive proof of participation) for NFT.", + EVENT_ISLOCKED_TRUE: "MintLocked", + EVENT_ISLOCKED_FALSE: "MintUnlocked", EVENT_ISLOCKED_TRUE_DESC: "NFT cannot be Minted.", EVENT_ISLOCKED_FALSE_DESC: "NFT can be Minted.", EVENT_MINTLOCK_FAIL: "Failed to change MintLock.", + EVENT_TRANSFERLOCK_SETTING: "TransferLock Setting", + EVENT_TRANSFERLOCK_SETTING_DESC: + "While transfer locked, participants will not be able to Transfer (send proof of participation) to others.", + EVENT_ISNONTRANSFERABLE_TRUE: "Non-Transferable", + EVENT_ISNONTRANSFERABLE_FALSE: "Transferable", + EVENT_ISNONTRANSFERABLE_TRUE_DESC: "NFT cannot be Transfer", + EVENT_ISNONTRANSFERABLE_FALSE_DESC: "NFT can be Transfer", + EVENT_TRANSFERLOCK_FAIL: "Failed to change TransferLock.", EVENT_ADMIN_SUBMIT: "Confirm", SECRET_PHRASE_RESET: "Reset Secret Phrase", SECRET_PHRASE_RESET_NEW: "New secret phrase", diff --git a/frontend/src/locales/ja.ts b/frontend/src/locales/ja.ts index 84fcf57e..f39d40d9 100644 --- a/frontend/src/locales/ja.ts +++ b/frontend/src/locales/ja.ts @@ -87,6 +87,11 @@ export default { "ガス代を肩代わりして、参加者が無料でNFTを受け取れるようにする。", EVENT_USE_MTX_TRUE: "肩代わりする", EVENT_USE_MTX_FALSE: "肩代わりしない", + EVENT_USE_NTT: "NFTの譲渡設定", + EVENT_USE_NTT_DESC: + "譲渡不可にすると、このイベントで配布されるNFTは他の人に譲渡することができなくなります。この設定は後から変更できます。", + EVENT_USE_NTT_TRUE: "譲渡不可", + EVENT_USE_NTT_FALSE: "譲渡可", EVENT_ESTIMATED_GAS_MTX: "肩代わりに必要な予想デポジット金額", EVENT_SECRETPHRASE: "NFT受け取りのひみつの「あいことば」", EVENT_SECRETPHRASE_DESC: @@ -135,12 +140,20 @@ export default { EVENT_ADMIN_MENU: "管理者メニュー", EVENT_MINTLOCK_SETTING: "Mintロック設定", EVENT_MINTLOCK_SETTING_DESC: - "ロック中は、NFTのMint(参加証明の受け取り)ができなくなります。", - EVENT_ISLOCKED_TRUE: "ロック中", - EVENT_ISLOCKED_FALSE: "ロックされていません", + "Mintロック中は、NFTのMint(参加証明の受け取り)ができなくなります。", + EVENT_ISLOCKED_TRUE: "Mintロック中", + EVENT_ISLOCKED_FALSE: "Mintロックされていません", EVENT_ISLOCKED_TRUE_DESC: "NFTの配布をストップしています。", EVENT_ISLOCKED_FALSE_DESC: "NFTをMintすることが可能です。", EVENT_MINTLOCK_FAIL: "MintLock中にエラーが発生しました", + EVENT_TRANSFERLOCK_SETTING: "Transferロック設定", + EVENT_TRANSFERLOCK_SETTING_DESC: + "Transferロック中は、NFTのTransfer(参加証明の他者への送信)ができなくなります。", + EVENT_ISNONTRANSFERABLE_TRUE: "Transferロック中", + EVENT_ISNONTRANSFERABLE_FALSE: "Transferはロックされていません", + EVENT_ISNONTRANSFERABLE_TRUE_DESC: "NFTのTransferを制限しています。", + EVENT_ISNONTRANSFERABLE_FALSE_DESC: "NFTをTransferすることが可能です。", + EVENT_TRANSFERLOCK_FAIL: "TransferLock中にエラーが発生しました", SECRET_PHRASE_RESET: "あいことばのリセット", SECRET_PHRASE_RESET_NEW: "新しいあいことば", SECRET_PHRASE_RESET_NEW_PLACEHOLDER: "新しいあいことばを入力", diff --git a/frontend/types/Event.ts b/frontend/types/Event.ts index 6e8aeea9..e5627ef0 100644 --- a/frontend/types/Event.ts +++ b/frontend/types/Event.ts @@ -26,6 +26,7 @@ export namespace Event { secretPhrase: string; mintLimit: number; useMtx: boolean; + nonTransferable: boolean; attributes: { metaDataURL: string; requiredParticipateCount: number }[]; } diff --git a/hardhat/contracts/Event.sol b/hardhat/contracts/Event.sol index 07221e60..bf7dc1f2 100644 --- a/hardhat/contracts/Event.sol +++ b/hardhat/contracts/Event.sol @@ -117,21 +117,23 @@ contract EventManager is OwnableUpgradeable { event CreateGroup(address indexed owner, uint256 groupId); event CreateEvent(address indexed owner, uint256 eventId); - // Currently, reinitializer(2) was executed as constructor. + // Currently, reinitializer(3) was executed as constructor. function initialize( + address _owner, address _relayerAddr, uint256 _mtxPrice, uint256 _maxMintLimit, address _operationControllerAddr - ) public reinitializer(2) { + ) public reinitializer(3) { __Ownable_init(); + _transferOwnership(_owner); if (_groupIds.current() == 0 && _eventRecordIds.current() == 0) { _groupIds.increment(); _eventRecordIds.increment(); } - setRelayerAddr(_relayerAddr); - setMtxPrice(_mtxPrice); - setMaxMintLimit(_maxMintLimit); + relayerAddr = _relayerAddr; + mtxPrice = _mtxPrice; + maxMintLimit = _maxMintLimit; operationControllerAddr = _operationControllerAddr; } @@ -199,6 +201,7 @@ contract EventManager is OwnableUpgradeable { string memory _date, uint256 _mintLimit, bool _useMtx, + bool _nonTransferable, bytes32 _secretPhrase, IMintNFT.NFTAttribute[] memory _eventNFTAttributes ) external payable onlyCollaboratorAccess(_groupId) whenNotPaused { @@ -236,6 +239,10 @@ contract EventManager is OwnableUpgradeable { _eventNFTAttributes ); + if (_nonTransferable) { + _mintNFT.changeNonTransferable(_newEventId, true); + } + eventIdsByGroupId[_groupId].push(_newEventId); groupIdByEventId[_newEventId] = _groupId; @@ -299,6 +306,14 @@ contract EventManager is OwnableUpgradeable { return _eventRecord; } + function hasAdminAccessByEventId( + address _address, + uint256 _eventId + ) external view returns (bool) { + uint256 _groupId = groupIdByEventId[_eventId]; + return _hasAdminAccess(_groupId, _address); + } + function hasCollaboratorAccessByEventId( address _address, uint256 _eventId diff --git a/hardhat/contracts/IEvent.sol b/hardhat/contracts/IEvent.sol index 26efcf58..a14a6b98 100644 --- a/hardhat/contracts/IEvent.sol +++ b/hardhat/contracts/IEvent.sol @@ -10,6 +10,11 @@ struct EventRecord { } interface IEventManager { + function hasAdminAccessByEventId( + address _addr, + uint256 _eventId + ) external view returns (bool); + function hasCollaboratorAccessByEventId( address _addr, uint256 _eventId diff --git a/hardhat/contracts/IMintNFT.sol b/hardhat/contracts/IMintNFT.sol index a8406ecf..f5eab4be 100644 --- a/hardhat/contracts/IMintNFT.sol +++ b/hardhat/contracts/IMintNFT.sol @@ -18,6 +18,11 @@ interface IMintNFT { view returns (bool); + function changeNonTransferable( + uint256 _eventId, + bool _isNonTransferable + ) external; + function getApproved(uint256 tokenId) external view returns (address); function getRemainingNFTCount(uint256 _eventId) diff --git a/hardhat/contracts/MintNFT.sol b/hardhat/contracts/MintNFT.sol index 92fd64e0..2da323d0 100644 --- a/hardhat/contracts/MintNFT.sol +++ b/hardhat/contracts/MintNFT.sol @@ -59,11 +59,18 @@ contract MintNFT is // Create a mapping to store NFT holders by event ID mapping(uint256 => uint256[]) private tokenIdsByEvent; address private operationControllerAddr; + // Create a mapping to store event ID by token ID + mapping(uint256 => uint256) private eventIdOfTokenId; + // is non transferable via EventId + mapping(uint256 => bool) private isNonTransferable; event MintedNFTAttributeURL(address indexed holder, string url); event MintLocked(uint256 indexed eventId, bool isLocked); event ResetSecretPhrase(address indexed executor, uint256 indexed eventId); + event NonTransferable(uint256 indexed eventId, bool isNonTransferable); event DroppedNFTs(address indexed executor, uint256 indexed eventId); + event BurnByAdmin(uint256 indexed tokenId, address indexed admin); + event Burn(uint256 indexed tokenId, address indexed owner); modifier onlyCollaboratorAccess(uint256 _eventId) { IEventManager eventManager = IEventManager(eventManagerAddr); @@ -82,15 +89,17 @@ contract MintNFT is _; } - // Currently, reinitializer(4) was executed as constructor. + // Currently, reinitializer(5) was executed as constructor. function initialize( - MinimalForwarderUpgradeable trustedForwarder, + address _owner, + MinimalForwarderUpgradeable _trustedForwarder, address _secretPhraseVerifierAddr, address _operationControllerAddr - ) public reinitializer(4) { + ) public reinitializer(5) { __ERC721_init("MintRally", "MR"); __Ownable_init(); - __ERC2771Context_init(address(trustedForwarder)); + _transferOwnership(_owner); + __ERC2771Context_init(address(_trustedForwarder)); secretPhraseVerifierAddr = _secretPhraseVerifierAddr; operationControllerAddr = _operationControllerAddr; } @@ -141,6 +150,24 @@ contract MintNFT is _mintNFT(_groupId, _eventId, _msgSender()); } + function dropNFTs( + uint256 _eventId, + address[] memory _addresses + ) external onlyCollaboratorAccess(_eventId) whenNotPaused { + uint256 groupId = getGroupIdByEvent(_eventId); + require( + remainingEventNftCount[_eventId] >= _addresses.length, + "remaining count is not enough" + ); + for (uint256 index = 0; index < _addresses.length; index++) { + address addr = _addresses[index]; + if (!isHoldingEventNFTByAddress(addr, _eventId)) { + _mintNFT(groupId, _eventId, addr); + } + } + emit DroppedNFTs(_msgSender(), _eventId); + } + function _mintNFT( uint256 _groupId, uint256 _eventId, @@ -168,30 +195,16 @@ contract MintNFT is metaDataURL = specialMetaDataURL; } - nftMetaDataURL[_tokenIds.current()] = metaDataURL; - tokenIdsByEvent[_eventId].push(_tokenIds.current()); - _safeMint(_address, _tokenIds.current()); + uint256 tokenId = _tokenIds.current(); + + nftMetaDataURL[tokenId] = metaDataURL; + tokenIdsByEvent[_eventId].push(tokenId); + eventIdOfTokenId[tokenId] = _eventId; _tokenIds.increment(); - emit MintedNFTAttributeURL(_address, metaDataURL); - } + _safeMint(_address, tokenId); - function dropNFTs( - uint256 _eventId, - address[] memory _addresses - ) external onlyCollaboratorAccess(_eventId) whenNotPaused { - uint256 groupId = getGroupIdByEvent(_eventId); - require( - remainingEventNftCount[_eventId] >= _addresses.length, - "remaining count is not enough" - ); - for (uint256 index = 0; index < _addresses.length; index++) { - address addr = _addresses[index]; - if (!isHoldingEventNFTByAddress(addr, _eventId)) { - _mintNFT(groupId, _eventId, addr); - } - } - emit DroppedNFTs(_msgSender(), _eventId); + emit MintedNFTAttributeURL(_address, metaDataURL); } function canMint( @@ -222,6 +235,22 @@ contract MintNFT is emit MintLocked(_eventId, _locked); } + function changeNonTransferable( + uint256 _eventId, + bool _isNonTransferable + ) external whenNotPaused { + IEventManager eventManager = IEventManager(eventManagerAddr); + + require( + _msgSender() == eventManagerAddr || + eventManager.hasAdminAccessByEventId(_msgSender(), _eventId), + "you have no permission" + ); + isNonTransferable[_eventId] = _isNonTransferable; + + emit NonTransferable(_eventId, _isNonTransferable); + } + function resetSecretPhrase( uint256 _eventId, bytes32 _secretPhrase @@ -234,6 +263,12 @@ contract MintNFT is return isMintLocked[_eventId]; } + function getIsNonTransferable( + uint256 _eventId + ) external view returns (bool) { + return isNonTransferable[_eventId]; + } + function isHoldingEventNFTByAddress( address _addr, uint256 _eventId @@ -309,8 +344,16 @@ contract MintNFT is return _nftAttributeRecords; } - function burn(uint256 tokenId) public onlyOwner { + function burnByAdmin(uint256 tokenId) public onlyOwner { + require(_exists(tokenId), "Token does not exist"); _burn(tokenId); + emit BurnByAdmin(tokenId, _msgSender()); + } + + function burn(uint256 tokenId) public { + require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721Burnable: caller is not owner nor approved"); + _burn(tokenId); + emit Burn(tokenId, _msgSender()); } function tokenURI( @@ -396,9 +439,73 @@ contract MintNFT is return holders; } + function getTokenIdsByEvent( + uint256 eventId + ) external view returns (uint256[] memory) { + return tokenIdsByEvent[eventId]; + } + + function getEventIdOfTokenId( + uint256 _tokenId + ) public view returns (uint256) { + return eventIdOfTokenId[_tokenId]; + } + function getGroupIdByEvent(uint256 _eventId) public view returns (uint256) { IEventManager eventManager = IEventManager(eventManagerAddr); EventRecord memory _event = eventManager.getEventById(_eventId); return _event.groupId; } + + function _transfer( + address from, + address to, + uint256 tokenId + ) internal virtual override { + require( + !isNonTransferable[eventIdOfTokenId[tokenId]], + "transfer is locked" + ); + super._transfer(from, to, tokenId); + } + + function setEventIdOfTokenIds( + uint256 eventId, + uint256[] memory tokenIds + ) external onlyOwner { + _setEventIdOfTokenIds(eventId, tokenIds); + } + + function setEventIdOfTokenIdsBatch( + uint256[] memory eventIds, + uint256[][] memory tokenIdsArr + ) external onlyOwner { + uint256 eventIdsLength = eventIds.length; + + require(eventIdsLength == tokenIdsArr.length, "length is not match"); + + for (uint256 i = 0; i < eventIdsLength; ) { + if (tokenIdsArr[i].length != 0) { + _setEventIdOfTokenIds(eventIds[i], tokenIdsArr[i]); + } + + unchecked { + ++i; + } + } + } + + function _setEventIdOfTokenIds( + uint256 eventId, + uint256[] memory tokenIds + ) internal { + uint256 tokenIdsLength = tokenIds.length; + for (uint256 i = 0; i < tokenIdsLength; ) { + eventIdOfTokenId[tokenIds[i]] = eventId; + + unchecked { + ++i; + } + } + } } diff --git a/hardhat/hardhat.config.ts b/hardhat/hardhat.config.ts index 2f382151..346df69e 100644 --- a/hardhat/hardhat.config.ts +++ b/hardhat/hardhat.config.ts @@ -13,19 +13,6 @@ import "hardhat-watcher"; dotenv.config(); -// This is a sample Hardhat task. To learn how to create your own go to -// https://hardhat.org/guides/create-task.html -task("accounts", "Prints the list of accounts", async (taskArgs, hre) => { - const accounts = await hre.ethers.getSigners(); - - for (const account of accounts) { - console.log(account.address); - } -}); - -// You need to export an object to set up your config -// Go to https://hardhat.org/config/ to learn more - const config: HardhatUserConfig = { solidity: { version: "0.8.9", diff --git a/hardhat/scripts/helper/getAddresses.ts b/hardhat/scripts/helper/getAddresses.ts new file mode 100644 index 00000000..6c104e0f --- /dev/null +++ b/hardhat/scripts/helper/getAddresses.ts @@ -0,0 +1,39 @@ +import { network } from "hardhat"; + +export const mintNFTAddress = () => { + let contractAddress = ""; + switch (network.name) { + case "mumbai": + contractAddress = process.env.MUMBAI_MINTNFT_ADDRESS!; + break; + case "polygon": + contractAddress = process.env.POLYGON_MINTNFT_ADDRESS!; + break; + case "local": + contractAddress = process.env.LOCAL_MINTNFT_ADDRESS!; + break; + default: + break; + } + + return contractAddress; +}; + +export const eventManagerAddress = () => { + let contractAddress = ""; + switch (network.name) { + case "mumbai": + contractAddress = process.env.MUMBAI_EVENTMANAGER_ADDRESS!; + break; + case "polygon": + contractAddress = process.env.POLYGON_EVENTMANAGER_ADDRESS!; + break; + case "local": + contractAddress = process.env.LOCAL_EVENTMANAGER_ADDRESS!; + break; + default: + break; + } + + return contractAddress; +}; diff --git a/hardhat/scripts/helper/upgrade.ts b/hardhat/scripts/helper/upgrade.ts index 93dcffd8..43a7aab9 100644 --- a/hardhat/scripts/helper/upgrade.ts +++ b/hardhat/scripts/helper/upgrade.ts @@ -1,21 +1,9 @@ import { ethers, network, upgrades } from "hardhat"; import { MintNFT } from "../../typechain"; +import { eventManagerAddress, mintNFTAddress } from "./getAddresses"; export const upgradeMintNFT = async (params?: any[]) => { - let contractAddress = ""; - switch (network.name) { - case "mumbai": - contractAddress = process.env.MUMBAI_MINTNFT_ADDRESS!; - break; - case "polygon": - contractAddress = process.env.POLYGON_MINTNFT_ADDRESS!; - break; - case "local": - contractAddress = process.env.LOCAL_MINTNFT_ADDRESS!; - break; - default: - break; - } + let contractAddress = mintNFTAddress(); const MintNFTFactory = await ethers.getContractFactory("MintNFT"); const deployedMintNFT: MintNFT = (await upgrades.upgradeProxy( @@ -37,20 +25,7 @@ export const upgradeMintNFT = async (params?: any[]) => { }; export const upgradeEventManager = async (params?: any[]) => { - let contractAddress = ""; - switch (network.name) { - case "mumbai": - contractAddress = process.env.MUMBAI_EVENTMANAGER_ADDRESS!; - break; - case "polygon": - contractAddress = process.env.POLYGON_EVENTMANAGER_ADDRESS!; - break; - case "local": - contractAddress = process.env.LOCAL_EVENTMANAGER_ADDRESS!; - break; - default: - break; - } + let contractAddress = eventManagerAddress(); const EventManagerFactory = await ethers.getContractFactory("EventManager"); const deployedEventManager: any = await upgrades.upgradeProxy( diff --git a/hardhat/scripts/updateEventIdOfTokenId.ts b/hardhat/scripts/updateEventIdOfTokenId.ts new file mode 100644 index 00000000..1cc238eb --- /dev/null +++ b/hardhat/scripts/updateEventIdOfTokenId.ts @@ -0,0 +1,53 @@ +import { ethers } from "hardhat"; +import { MintNFT, EventManager } from "../typechain"; +import { BigNumber } from "ethers"; +import { eventManagerAddress, mintNFTAddress } from "./helper/getAddresses"; + +async function main() { + const MINT_NFT_ADDRESS = mintNFTAddress(); + const EVENT_MANAGER_ADDRESS = eventManagerAddress(); + + const MintNFTFactory = await ethers.getContractFactory("MintNFT"); + const mintNFT = MintNFTFactory.attach(MINT_NFT_ADDRESS) as MintNFT; + + // EventManagerのインスタンスを作成 + const EventManagerFactory = await ethers.getContractFactory("EventManager"); + const eventManager = EventManagerFactory.attach( + EVENT_MANAGER_ADDRESS + ) as EventManager; + + let eventIds: number[] = []; + let tokenIdsArr: number[][] = []; + + const eventRecordCountBigNumber = await eventManager.getEventRecordCount(); + const eventRecordCount = eventRecordCountBigNumber.toNumber(); + console.log("eventRecordCount", eventRecordCount); + + for (let i = 1; i <= eventRecordCount; i++) { + eventIds.push(i); + + // @todo コントラクトをアップグレード後、以下のコメントアウトを外す + const tokenIds: BigNumber[] = await mintNFT.getTokenIdsByEvent(i); + console.log(tokenIds); + + tokenIdsArr.push(tokenIds.map((tokenId) => tokenId.toNumber())); + } + + // @todo コントラクトをアップグレード後、以下のコメントアウトを外す + await (await mintNFT.setEventIdOfTokenIdsBatch(eventIds, tokenIdsArr)).wait(); + + const lastEventIdOfTokenIds = tokenIdsArr[eventIds.length - 1]; + + console.log("lastEventIdOfTokenIds", lastEventIdOfTokenIds); + + const eventIdOfTokenId = await mintNFT.getEventIdOfTokenId( + lastEventIdOfTokenIds[lastEventIdOfTokenIds.length - 1] + ); + + console.log("check eventIdOfTokenId", eventIdOfTokenId.toNumber()); +} + +main().catch((error) => { + console.error(error); + process.exitCode = 1; +}); diff --git a/hardhat/scripts/upgrades/v1.3.0/upgrade_stg.ts b/hardhat/scripts/upgrades/v1.3.0/upgrade_stg.ts index d32757d5..aba3cb41 100644 --- a/hardhat/scripts/upgrades/v1.3.0/upgrade_stg.ts +++ b/hardhat/scripts/upgrades/v1.3.0/upgrade_stg.ts @@ -4,14 +4,20 @@ import { upgradeEventManager, upgradeMintNFT } from "../../helper/upgrade"; async function main() { if (network.name !== "mumbai") throw new Error("wrong network"); - await upgradeMintNFT(); - // [ + // await upgradeMintNFT([ + // process.env.MUMBAI_OWNER_ADDRESS!, // process.env.MUMBAI_FORWARDER_ADDRESS!, // process.env.MUMBAI_SECRETPHRASE_VERIFIER_ADDRESS!, // process.env.MUMBAI_OPERATION_CONTROLLER_ADDRESS!, - // ] + // ]); - // await upgradeEventManager(); + await upgradeEventManager([ + process.env.MUMBAI_OWNER_ADDRESS!, + process.env.MUMBAI_RELAYER_ADDRESS!, + 250000, + 1000000, + process.env.MUMBAI_OPERATION_CONTROLLER_ADDRESS, + ]); } main().catch((error) => { diff --git a/hardhat/scripts/utils/create_test_events.ts b/hardhat/scripts/utils/create_test_events.ts index 2efbdabf..0d46492f 100644 --- a/hardhat/scripts/utils/create_test_events.ts +++ b/hardhat/scripts/utils/create_test_events.ts @@ -4,7 +4,7 @@ import { ethers } from "hardhat"; // eslint-disable-next-line node/no-missing-import import { generateProof } from "../../test/helper/secret_phrase"; // eslint-disable-next-line node/no-missing-import -import { EventManager } from "../typechain"; +import { EventManager } from "../../typechain"; dotenv.config(); type eventParams = { @@ -15,6 +15,7 @@ type eventParams = { endTime: string; mintLimit: number; useMtx: boolean; + nonTransferable: boolean; secretPhrase?: string; attributes: any; }; @@ -43,6 +44,12 @@ class EventCreator { public async createEvents(_events: eventParams[]) { // create new group console.log("creating group..."); + + // undefinedのエラーが出たため、暫定的に追加してみました + if (!this.eventManager) { + throw new Error("EventManager is undefined"); + } + const datestring = new Date().toISOString().replace(/:/g, "-"); const txn1 = await this.eventManager.createGroup(`group-${datestring}`); await txn1.wait(); @@ -59,6 +66,7 @@ class EventCreator { event.date, event.mintLimit, event.useMtx, + event.nonTransferable, this.publicInputCalldata[0], event.attributes, { @@ -87,6 +95,7 @@ const main = async () => { endTime: "12:00", mintLimit: 1, useMtx: false, + nonTransferable: false, attributes: [ { metaDataURL: "ipfs://hogehoge/count0.json", diff --git a/hardhat/scripts/utils/transfer.ts b/hardhat/scripts/utils/transfer.ts new file mode 100644 index 00000000..7816efdf --- /dev/null +++ b/hardhat/scripts/utils/transfer.ts @@ -0,0 +1,25 @@ +import { ethers } from "hardhat"; + +const main = async () => { + const [owner] = await ethers.getSigners(); + + const mintNFTContract = await ethers.getContractAt( + "MintNFT", + "0x0165878A594ca255338adfa4d48449f69242Eb8F", + owner + ); + + const tx = await mintNFTContract.transferFrom( + owner.address, + "0x70997970C51812dc3A010C7d01b50e0d17dc79C8", + 0 + ); + await tx.wait(); +}; + +main() + .then(() => process.exit(0)) + .catch((error) => { + console.error(error); + process.exit(1); + }); diff --git a/hardhat/test/EventManager.ts b/hardhat/test/EventManager.ts index 6e0f511e..1066b3bd 100644 --- a/hardhat/test/EventManager.ts +++ b/hardhat/test/EventManager.ts @@ -60,6 +60,7 @@ describe("EventManager", function () { const deployedMintNFT: any = await upgrades.deployProxy( MintNFTFactory, [ + organizer.address, "0xdCb93093424447bF4FE9Df869750950922F1E30B", secretPhraseVerifier.address, operationController.address, @@ -81,7 +82,12 @@ describe("EventManager", function () { ); const deployedEventManagerContract: any = await upgrades.deployProxy( eventManagerContractFactory, - [relayer.address, 250000, 1000000, operationController.address], + [ + organizer.address, + relayer.address, + 250000, + 1000000, + operationController.address], { initializer: "initialize", } @@ -126,6 +132,7 @@ describe("EventManager", function () { "2022-07-3O", 100, false, + false, publicInputCalldata[0], attributes ) @@ -140,6 +147,7 @@ describe("EventManager", function () { "2022-07-3O", 100, false, + false, publicInputCalldata[0], attributes ); @@ -173,6 +181,7 @@ describe("EventManager", function () { "2022-08-01", 100, false, + false, publicInputCalldata[0], attributes ); @@ -197,6 +206,7 @@ describe("EventManager", function () { "2022-07-3O", 10, true, + false, publicInputCalldata[0], attributes, { value: ethers.utils.parseUnits(String(250000 * 10 * 1.33), "gwei") } @@ -220,6 +230,7 @@ describe("EventManager", function () { "2022-07-3O", 11 + i, true, + false, publicInputCalldata[0], attributes, { @@ -322,6 +333,7 @@ describe("EventManager", function () { "2022-07-3O", 100, false, + false, publicInputCalldata[0], attributes ) @@ -341,6 +353,7 @@ describe("EventManager", function () { "2022-07-3O", 100, false, + false, publicInputCalldata[0], attributes ); @@ -395,6 +408,7 @@ describe("EventManager", function () { "2022-07-3O", 100, false, + false, publicInputCalldata[0], attributes ) @@ -414,6 +428,7 @@ describe("EventManager", function () { "2022-07-3O", 100, false, + false, publicInputCalldata[0], attributes ); @@ -451,6 +466,7 @@ describe("EventManager", function () { "2022-07-3O", 100, false, + false, publicInputCalldata[0], attributes ) @@ -466,7 +482,13 @@ describe("EventManager", function () { ); const deployedEventManagerContract: any = await upgrades.deployProxy( eventManagerContractFactory, - [relayer.address, 500000, 1000000, operationController.address], + [ + organizer.address, + relayer.address, + 500000, + 1000000, + operationController.address + ], { initializer: "initialize", } @@ -515,7 +537,13 @@ describe("EventManager", function () { ); const deployedEventManagerContract: any = await upgrades.deployProxy( eventManagerContractFactory, - [relayer.address, 500000, 1000000, operationController.address], + [ + organizer.address, + relayer.address, + 500000, + 1000000, + operationController.address + ], { initializer: "initialize", } @@ -584,7 +612,13 @@ describe("EventManager", function () { ); const deployedEventManagerContract: any = await upgrades.deployProxy( eventManagerContractFactory, - [relayer.address, 250000, 1000000, operationController.address], + [ + organizer.address, + relayer.address, + 250000, + 1000000, + operationController.address + ], { initializer: "initialize", } @@ -629,6 +663,7 @@ describe("EventManager", function () { "2023-07-3O", 100, false, + false, publicInputCalldata[0], attributes, { value: ethers.utils.parseUnits(String(250000 * 10 * 1.33), "gwei") } @@ -645,6 +680,7 @@ describe("EventManager", function () { "2023-07-3O", 100, false, + false, publicInputCalldata[0], attributes, { value: ethers.utils.parseUnits(String(250000 * 10 * 1.33), "gwei") } @@ -671,7 +707,13 @@ describe("EventManager", function () { ); const deployedEventManagerContract: any = await upgrades.deployProxy( eventManagerContractFactory, - [relayer.address, 250000, 1000000, operationController.address], + [ + organizer.address, + relayer.address, + 250000, + 1000000, + operationController.address + ], { initializer: "initialize", } @@ -1151,6 +1193,7 @@ describe("EventManager", function () { "2022-07-3O", 100, false, + false, publicInputCalldata[0], attributes ); @@ -1164,6 +1207,7 @@ describe("EventManager", function () { "2022-07-3O", 100, false, + false, publicInputCalldata[0], attributes ); diff --git a/hardhat/test/MintNFT.ts b/hardhat/test/MintNFT.ts index 6bdea3b2..fbe17892 100644 --- a/hardhat/test/MintNFT.ts +++ b/hardhat/test/MintNFT.ts @@ -63,6 +63,7 @@ const deployOperationController = async () => { * @returns deployed mintNFT */ const deployMintNFT = async ( + deployer: SignerWithAddress, secretPhraseVerifier: SecretPhraseVerifier, operationController: OperationController ) => { @@ -70,6 +71,7 @@ const deployMintNFT = async ( const deployedMintNFT: any = await upgrades.deployProxy( MintNFTFactory, [ + deployer.address, "0xdCb93093424447bF4FE9Df869750950922F1E30B", secretPhraseVerifier.address, operationController.address, @@ -87,13 +89,20 @@ const deployMintNFT = async ( * @returns deployed eventManager */ const deployEventManager = async ( + deployer: SignerWithAddress, relayer: SignerWithAddress, operationController: OperationController ) => { const EventManager = await ethers.getContractFactory("EventManager"); const deployedEventManager: any = await upgrades.deployProxy( EventManager, - [relayer.address, 250000, 1000000, operationController.address], + [ + deployer.address, + relayer.address, + 250000, + 1000000, + operationController.address + ], { initializer: "initialize", } @@ -105,14 +114,15 @@ const deployEventManager = async ( * @param relayer address * @returns deployed contracts array */ -const deployAll = async (relayer: SignerWithAddress) => { +const deployAll = async (deployer: SignerWithAddress, relayer: SignerWithAddress) => { const secretPhraseVerifier = await deploySecretPhraseVerifier(); const operationController = await deployOperationController(); const mintNFT = await deployMintNFT( + deployer, secretPhraseVerifier, operationController ); - const eventManager = await deployEventManager(relayer, operationController); + const eventManager = await deployEventManager(deployer, relayer, operationController); await mintNFT.setEventManagerAddr(eventManager.address); await eventManager.setMintNFTAddr(mintNFT.address); return [secretPhraseVerifier, mintNFT, eventManager, operationController]; @@ -124,6 +134,7 @@ type eventGroupParams = { date: string; mintLimit: BigNumberish; useMtx: boolean; + nonTransferable: boolean; secretPhrase: BytesLike; eventNFTAttributes: { metaDataURL: string; @@ -154,6 +165,7 @@ const createEventRecord = async ( params.date, params.mintLimit, params.useMtx, + params.nonTransferable, params.secretPhrase, params.eventNFTAttributes ); @@ -170,17 +182,19 @@ describe("MintNFT", function () { let organizer: SignerWithAddress; let participant1: SignerWithAddress; - let relayer: SignerWithAddress; let participant2: SignerWithAddress; + let participant3: SignerWithAddress; + let participant4: SignerWithAddress; + let relayer: SignerWithAddress; before(async () => { - [organizer, participant1, relayer, participant2] = + [organizer, participant1, participant2, participant3, participant4, relayer] = await ethers.getSigners(); // generate proof const { publicInputCalldata } = await generateProof(); // Deploy all contracts - [, mintNFT, eventManager, operationController] = await deployAll(relayer); + [, mintNFT, eventManager, operationController] = await deployAll(organizer, relayer); // Create a Group and an Event await createGroup(eventManager, "First Group"); const groupsList = await eventManager.getGroups(); @@ -193,6 +207,7 @@ describe("MintNFT", function () { "2022-07-3O", 10, false, + false, publicInputCalldata[0], attributes ); @@ -208,9 +223,11 @@ describe("MintNFT", function () { .connect(organizer) .mintParticipateNFT(createdGroupId, createdEventIds[0], proofCalldata); await mintNftTxn.wait(); - + const nftAttribute = await mintNFT.tokenURI(0); expect(nftAttribute).equal("ipfs://hogehoge/count0.json"); + + expect(await mintNFT.getEventIdOfTokenId(0)).equal(createdEventIds[0]); }); it("fail to mint when event MintLocked", async () => { @@ -240,23 +257,60 @@ describe("MintNFT", function () { }); }); - describe("burn", () => { - it("success to burn", async () => { + describe("burn function", function () { + it("should allow a token owner to burn their token", async function () { + const { proofCalldata } = await generateProof(); + + const mintTx = await mintNFT.connect(participant1).mintParticipateNFT(createdGroupId, createdEventIds[0], proofCalldata); + await mintTx.wait(); + + expect(await mintNFT.balanceOf(participant1.address)).to.equal(1); + + const tokenId = await mintNFT.tokenOfOwnerByIndex(participant1.address, 0); + await expect(mintNFT.connect(participant1).burn(tokenId)) + .to.emit(mintNFT, 'Burn') + .withArgs(tokenId, participant1.address); + }); + + it("should fail if a non-owner tries to burn a token", async function () { const { proofCalldata } = await generateProof(); - const mintNftTxn = await mintNFT - .connect(participant2) - .mintParticipateNFT(createdGroupId, createdEventIds[0], proofCalldata); - await mintNftTxn.wait(); - - expect(await mintNFT.balanceOf(participant2.address)).equal(1); - - const tokenId = await mintNFT.tokenOfOwnerByIndex( - participant2.address, - 0 - ); - await mintNFT.connect(organizer).burn(tokenId); - expect(await mintNFT.balanceOf(participant2.address)).equal(0); + const mintTx = await mintNFT.connect(participant2).mintParticipateNFT(createdGroupId, createdEventIds[0], proofCalldata); + await mintTx.wait(); + + const tokenId = await mintNFT.tokenOfOwnerByIndex(participant2.address, 0); + + await expect(mintNFT.connect(participant1).burn(tokenId)) + .to.be.revertedWith("caller is not owner nor approved"); + }); + }); + + describe("burnByAdmin function", function () { + it("should allow the contract owner to burn any token", async function () { + const { proofCalldata } = await generateProof(); + + const mintTx = await mintNFT.connect(participant3).mintParticipateNFT(createdGroupId, createdEventIds[0], proofCalldata); + await mintTx.wait(); + + const tokenId = await mintNFT.tokenOfOwnerByIndex(participant3.address, 0); + + await expect(mintNFT.connect(organizer).burnByAdmin(tokenId)) + .to.emit(mintNFT, 'BurnByAdmin') + .withArgs(tokenId, organizer.address); + + expect(await mintNFT.balanceOf(participant1.address)).to.equal(0); + }); + + it("should fail if a non-contract owner tries to burn a token", async function () { + const { proofCalldata } = await generateProof(); + + const mintTx = await mintNFT.connect(participant4).mintParticipateNFT(createdGroupId, createdEventIds[0], proofCalldata); + await mintTx.wait(); + + const tokenId = await mintNFT.tokenOfOwnerByIndex(participant4.address, 0); + + await expect(mintNFT.connect(participant4).burnByAdmin(tokenId)) + .to.be.revertedWith("Ownable: caller is not the owner"); }); }); @@ -281,7 +335,7 @@ describe("MintNFT", function () { const { publicInputCalldata } = await generateProof(); // Deploy all contracts - [, mintNFT, eventManager] = await deployAll(relayer); + [, mintNFT, eventManager] = await deployAll(organizer, relayer); // Create a Group and an Event await createGroup(eventManager, "First Group"); @@ -297,6 +351,7 @@ describe("MintNFT", function () { date: "2022-07-3O", mintLimit: 10, useMtx: false, + nonTransferable: false, secretPhrase: publicInputCalldata[0], eventNFTAttributes: attributes, }); @@ -309,6 +364,7 @@ describe("MintNFT", function () { date: "2022-07-3O", mintLimit: 10, useMtx: false, + nonTransferable: false, secretPhrase: publicInputCalldata[0], eventNFTAttributes: attributes, }); @@ -321,6 +377,7 @@ describe("MintNFT", function () { date: "2022-07-3O", mintLimit: 10, useMtx: false, + nonTransferable: false, secretPhrase: publicInputCalldata[0], eventNFTAttributes: attributes, }); @@ -339,6 +396,8 @@ describe("MintNFT", function () { proofCalldata ); await mintNftTxn.wait(); + expect(await mintNFT.getEventIdOfTokenId(0)).equal(createdEventIds[0]); + const { proofCalldata: proofCalldata2 } = await generateProof(); const mintNftTxn2 = await mintNFT .connect(participant1) @@ -348,6 +407,8 @@ describe("MintNFT", function () { proofCalldata2 ); await mintNftTxn2.wait(); + expect(await mintNFT.getEventIdOfTokenId(1)).equal(createdEventIds[0]); + const { proofCalldata: proofCalldata3 } = await generateProof(); const mintNftTxn3 = await mintNFT .connect(participant2) @@ -357,6 +418,8 @@ describe("MintNFT", function () { proofCalldata3 ); await mintNftTxn3.wait(); + expect(await mintNFT.getEventIdOfTokenId(2)).equal(createdEventIds[0]); + const { proofCalldata: proofCalldata4 } = await generateProof(); const mintNftTxn4 = await mintNFT .connect(participant1) @@ -366,6 +429,8 @@ describe("MintNFT", function () { proofCalldata4 ); await mintNftTxn4.wait(); + expect(await mintNFT.getEventIdOfTokenId(3)).equal(createdEventIds[1]); + const { proofCalldata: proofCalldata5 } = await generateProof(); const mintNftTxn5 = await mintNFT .connect(participant1) @@ -375,6 +440,7 @@ describe("MintNFT", function () { proofCalldata5 ); await mintNftTxn5.wait(); + expect(await mintNFT.getEventIdOfTokenId(4)).equal(createdEventIds[2]); }); it("get owners of the tokens", async () => { const tokens = [0, 1, 2, 3, 4]; @@ -538,7 +604,7 @@ describe("nft revolution", () => { // generate proof const { publicInputCalldata } = await generateProof(); - [, mintNFT, eventManager] = await deployAll(relayer); + [, mintNFT, eventManager] = await deployAll(organizer, relayer); // Create a Group and an Event await createGroup(eventManager, "First Group"); @@ -551,6 +617,7 @@ describe("nft revolution", () => { date: "2022-07-3O", mintLimit: 10, useMtx: false, + nonTransferable: false, secretPhrase: publicInputCalldata[0], eventNFTAttributes: attributes, }); @@ -561,6 +628,7 @@ describe("nft revolution", () => { date: "2022-07-3O", mintLimit: 1, useMtx: false, + nonTransferable: false, secretPhrase: publicInputCalldata[0], eventNFTAttributes: attributes, }); @@ -669,7 +737,7 @@ describe("bulk mint by event owner", () => { // generate proof const { publicInputCalldata } = await generateProof(); - [, mintNFT, eventManager] = await deployAll(relayer); + [, mintNFT, eventManager] = await deployAll(organizer, relayer); // Create a Group and an Event await createGroup(eventManager, "First Group"); @@ -682,6 +750,7 @@ describe("bulk mint by event owner", () => { date: "2022-07-3O", mintLimit: 10, useMtx: false, + nonTransferable: false, secretPhrase: publicInputCalldata[0], eventNFTAttributes: attributes, }); @@ -692,6 +761,7 @@ describe("bulk mint by event owner", () => { date: "2022-07-3O", mintLimit: 10, useMtx: false, + nonTransferable: false, secretPhrase: publicInputCalldata[0], eventNFTAttributes: attributes, }); @@ -699,6 +769,7 @@ describe("bulk mint by event owner", () => { const eventsList = await eventManager.getEventRecords(0, 0); createdEventIds = eventsList.map((event) => event.eventRecordId.toNumber()); }); + it("drop NFTs by event owner", async () => { await expect( mintNFT @@ -714,6 +785,11 @@ describe("bulk mint by event owner", () => { ) .to.emit(mintNFT, "DroppedNFTs") .withArgs(organizer.address, createdEventIds[1]); + console.log(await mintNFT.ownerOf(0)); + console.log(await mintNFT.ownerOf(1)); + + console.log(participant1.address); + expect(await mintNFT.ownerOf(0)).to.equal(participant1.address); expect(await mintNFT.ownerOf(1)).to.equal(participant2.address); expect(await mintNFT.ownerOf(2)).to.equal(participant3.address); @@ -783,7 +859,7 @@ describe("mint locked flag", () => { before(async () => { [organizer, participant1, relayer] = await ethers.getSigners(); - [, mintNFT, eventManager, operationController] = await deployAll(relayer); + [, mintNFT, eventManager, operationController] = await deployAll(organizer, relayer); // Create a Group and an Event await createGroup(eventManager, "First Group", organizer); @@ -798,6 +874,7 @@ describe("mint locked flag", () => { date: "2022-07-3O", mintLimit: 10, useMtx: false, + nonTransferable: false, secretPhrase: "0x10c7da1d87ac3a86d34053a76768cc39c581d469b68863a9fba17bcdaa048f98", eventNFTAttributes: attributes, @@ -865,6 +942,95 @@ describe("mint locked flag", () => { }); }); +describe("non transferable flag", () => { + let mintNFT: MintNFT; + let eventManager: EventManager; + let operationController: OperationController; + + let createdGroupId: number; + const createdEventIds: number[] = []; + + let organizer: SignerWithAddress; + let participant1: SignerWithAddress; + let participant2: SignerWithAddress; + let relayer: SignerWithAddress; + + let correctProofCalldata!: any; + + before(async () => { + [organizer, participant1, participant2, relayer] = + await ethers.getSigners(); + + // generate proof + const { publicInputCalldata, proofCalldata } = await generateProof(); + [, mintNFT, eventManager, operationController] = await deployAll(organizer, relayer); + correctProofCalldata = publicInputCalldata[0]; + + // Create a Group and an Event + await createGroup(eventManager, "First Group", organizer); + const groupsList = await eventManager.getGroups(); + createdGroupId = groupsList[0].groupId.toNumber(); + + const createEventTxn = await eventManager.createEventRecord( + createdGroupId, + "event1", + "event1 description", + "2022-07-3O", + 10, + false, + false, + correctProofCalldata, + attributes + ); + await createEventTxn.wait(); + const eventsList = await eventManager.getEventRecords(0, 0); + createdEventIds.push(eventsList[0].eventRecordId.toNumber()); + + const mintNftTxn = await mintNFT + .connect(participant1) + .mintParticipateNFT(createdGroupId, createdEventIds[0], proofCalldata); + await mintNftTxn.wait(); + }); + + it("should get non transferable flag", async () => { + const flag = await mintNFT.connect(organizer).getIsNonTransferable(1); + expect(flag).equal(false); + expect(await mintNFT.ownerOf(0)).equal(participant1.address); + await expect( + mintNFT + .connect(participant1) + .transferFrom(participant1.address, participant2.address, 0) + ).not.to.be.reverted; + expect(await mintNFT.ownerOf(0)).equal(participant2.address); + }); + + it("should change non transferable flag by owner", async () => { + await mintNFT.connect(organizer).changeNonTransferable(1, true); + const flag = await mintNFT.connect(organizer).getIsNonTransferable(1); + expect(flag).equal(true); + expect(await mintNFT.ownerOf(0)).equal(participant2.address); + await expect( + mintNFT + .connect(participant2) + .transferFrom(participant2.address, participant1.address, 0) + ).to.be.reverted; + expect(await mintNFT.ownerOf(0)).equal(participant2.address); + }); + + it("No one but the owner should be able to change non transferable flag", async () => { + await expect( + mintNFT.connect(participant1).changeNonTransferable(1, false) + ).to.be.revertedWith("you have no permission"); + }); + + it("should not change if paused", async () => { + await operationController.connect(organizer).pause(); + await expect(mintNFT.connect(organizer).changeNonTransferable(1, false)).to + .be.reverted; + await operationController.connect(organizer).unpause(); + }); +}); + describe("reset secret phrase", () => { let mintNFT: MintNFT; let eventManager: EventManager; @@ -882,7 +1048,7 @@ describe("reset secret phrase", () => { before(async () => { [organizer, participant1, relayer] = await ethers.getSigners(); // deploy all contracts - [, mintNFT, eventManager, operationController] = await deployAll(relayer); + [, mintNFT, eventManager, operationController] = await deployAll(organizer, relayer); // generate proof const { publicInputCalldata } = await generateProof(); correctProofCalldata = publicInputCalldata[0]; @@ -900,6 +1066,7 @@ describe("reset secret phrase", () => { date: "2022-07-3O", mintLimit: 10, useMtx: false, + nonTransferable: false, secretPhrase: correctProofCalldata, eventNFTAttributes: attributes, },