[ { "inputs": [], "stateMutability": "nonpayable", "type": "constructor" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "owner", "type": "address" }, { "indexed": true, "internalType": "address", "name": "spender", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "value", "type": "uint256" } ], "name": "Approval", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "previousOwner", "type": "address" }, { "indexed": true, "internalType": "address", "name": "newOwner", "type": "address" } ], "name": "OwnershipTransferred", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "user", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "nftId", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "reward", "type": "uint256" }, { "indexed": false, "internalType": "uint32", "name": "ts", "type": "uint32" } ], "name": "RewardClaimed", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "address", "name": "owner", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "nftId", "type": "uint256" }, { "indexed": false, "internalType": "uint32", "name": "ts", "type": "uint32" } ], "name": "Staked", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "from", "type": "address" }, { "indexed": true, "internalType": "address", "name": "to", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "value", "type": "uint256" } ], "name": "Transfer", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "address", "name": "owner", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "nftId", "type": "uint256" }, { "indexed": false, "internalType": "uint32", "name": "ts", "type": "uint32" } ], "name": "Unstaked", "type": "event" }, { "inputs": [], "name": "AHB_CONTRACT", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "owner", "type": "address" }, { "internalType": "address", "name": "spender", "type": "address" } ], "name": "allowance", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "spender", "type": "address" }, { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "approve", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "account", "type": "address" } ], "name": "balanceOf", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "tokenId", "type": "uint256" } ], "name": "claimReward", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "decimals", "outputs": [ { "internalType": "uint8", "name": "", "type": "uint8" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "spender", "type": "address" }, { "internalType": "uint256", "name": "subtractedValue", "type": "uint256" } ], "name": "decreaseAllowance", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "tokenId", "type": "uint256" } ], "name": "getClaimableReward", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "tokenId", "type": "uint256" } ], "name": "getHotel", "outputs": [ { "components": [ { "internalType": "uint256", "name": "tokenId", "type": "uint256" }, { "internalType": "uint256", "name": "rooms", "type": "uint256" }, { "internalType": "uint256", "name": "stars", "type": "uint256" }, { "internalType": "uint256", "name": "lastStarUpgrade", "type": "uint256" }, { "internalType": "uint256", "name": "roomUpgradePrice", "type": "uint256" }, { "internalType": "uint256", "name": "lastClaim", "type": "uint256" }, { "internalType": "address", "name": "owner", "type": "address" } ], "internalType": "struct AvaxHotelBusiness.AvaxHotel", "name": "", "type": "tuple" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "spender", "type": "address" }, { "internalType": "uint256", "name": "addedValue", "type": "uint256" } ], "name": "increaseAllowance", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "name", "outputs": [ { "internalType": "string", "name": "", "type": "string" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "", "type": "address" }, { "internalType": "address", "name": "", "type": "address" }, { "internalType": "uint256", "name": "", "type": "uint256" }, { "internalType": "bytes", "name": "", "type": "bytes" } ], "name": "onERC721Received", "outputs": [ { "internalType": "bytes4", "name": "", "type": "bytes4" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "owner", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "renounceOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_ahbContract", "type": "address" } ], "name": "setAhbContract", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "tokenId", "type": "uint256" } ], "name": "stake", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "name": "stakedHotels", "outputs": [ { "internalType": "uint256", "name": "nftId", "type": "uint256" }, { "internalType": "uint32", "name": "lastClaim", "type": "uint32" }, { "internalType": "uint256", "name": "claimedReward", "type": "uint256" }, { "internalType": "address", "name": "owner", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "symbol", "outputs": [ { "internalType": "string", "name": "", "type": "string" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "totalStakedNFT", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "totalSupply", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "recipient", "type": "address" }, { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "transfer", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "sender", "type": "address" }, { "internalType": "address", "name": "recipient", "type": "address" }, { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "transferFrom", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "newOwner", "type": "address" } ], "name": "transferOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "tokenId", "type": "uint256" } ], "name": "unstake", "outputs": [], "stateMutability": "nonpayable", "type": "function" } ]
6080604052600980546001600160a01b031990811673caae8fc2e2f0c8bec80479a2eab7dbfa138ecb5617909155600a80548216739b4df7f9707dc7263072c02c0f3fb396daec5c3b179055600b805482167320ce93891e56c80119e95b193c53976b0e8ace2e179055600c8054821673dee6f6d4d10a7ddbab9c8526ebe8ef13e1cf99cc179055600d805490911673b3c14a8c2e39aca0061bda1529468456bb829dd4179055348015620000b357600080fd5b50604080518082018252600b81526a23bab2b9ba102a37b5b2b760a91b60208083019182528351808501909452600584526411d55154d560da1b908401528151919291620001049160039162000364565b5080516200011a90600490602084019062000364565b50505062000137620001316200021160201b60201c565b62000215565b600b5462000173906001600160a01b03166200016d6b01cb15d24956472c0b000000600562000267602090811b62000d4117901c565b6200027c565b600d54620001a9906001600160a01b03166200016d6b01cb15d24956472c0b000000600562000267602090811b62000d4117901c565b620001d5306200016d60026b01cb15d24956472c0b0000006200026760201b62000d411790919060201c565b6009546200020b906001600160a01b03166200016d6b01cb15d24956472c0b000000600a62000267602090811b62000d4117901c565b62000491565b3390565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60006200027582846200040a565b9392505050565b6001600160a01b038216620002d75760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640160405180910390fd5b8060026000828254620002eb91906200042d565b90915550506001600160a01b038216600090815260208190526040812080548392906200031a9084906200042d565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b828054620003729062000454565b90600052602060002090601f016020900481019282620003965760008555620003e1565b82601f10620003b157805160ff1916838001178555620003e1565b82800160010185558215620003e1579182015b82811115620003e1578251825591602001919060010190620003c4565b50620003ef929150620003f3565b5090565b5b80821115620003ef5760008155600101620003f4565b6000826200042857634e487b7160e01b600052601260045260246000fd5b500490565b600082198211156200044f57634e487b7160e01b600052601160045260246000fd5b500190565b600181811c908216806200046957607f821691505b602082108114156200048b57634e487b7160e01b600052602260045260246000fd5b50919050565b6118b780620004a16000396000f3fe608060405234801561001057600080fd5b50600436106101985760003560e01c80638c25be3d116100e3578063ad0b43641161008c578063bfba285311610066578063bfba285314610460578063dd62ed3e14610473578063f2fde38b146104ac57600080fd5b8063ad0b4364146103c7578063ae169a50146103da578063bde99400146103ed57600080fd5b8063a457c2d7116100bd578063a457c2d71461038e578063a694fc3a146103a1578063a9059cbb146103b457600080fd5b80638c25be3d1461034e5780638da5cb5b1461036157806395d89b411461038657600080fd5b8063313ce5671161014557806370a082311161011f57806370a0823114610314578063715018a61461033d57806375233e321461034557600080fd5b8063313ce56714610280578063395093511461028f578063697e295b146102a257600080fd5b806318160ddd1161017657806318160ddd1461024657806323b872dd146102585780632e17de781461026b57600080fd5b806306fdde031461019d578063095ea7b3146101bb578063150b7a02146101de575b600080fd5b6101a56104bf565b6040516101b29190611481565b60405180910390f35b6101ce6101c93660046114eb565b610551565b60405190151581526020016101b2565b6102156101ec36600461155e565b7f150b7a0200000000000000000000000000000000000000000000000000000000949350505050565b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020016101b2565b6002545b6040519081526020016101b2565b6101ce610266366004611622565b610567565b61027e610279366004611663565b61062b565b005b604051601281526020016101b2565b6101ce61029d3660046114eb565b6106a0565b6102b56102b0366004611663565b6106dc565b6040516101b29190600060e082019050825182526020830151602083015260408301516040830152606083015160608301526080830151608083015260a083015160a08301526001600160a01b0360c08401511660c083015292915050565b61024a61032236600461167c565b6001600160a01b031660009081526020819052604090205490565b61027e6107b4565b61024a60075481565b61024a61035c366004611663565b61081a565b6005546001600160a01b03165b6040516001600160a01b0390911681526020016101b2565b6101a5610942565b6101ce61039c3660046114eb565b610951565b61027e6103af366004611663565b610a02565b6101ce6103c23660046114eb565b610a0b565b60065461036e906001600160a01b031681565b61027e6103e8366004611663565b610a18565b6104326103fb366004611663565b6008602052600090815260409020805460018201546002830154600390930154919263ffffffff909116916001600160a01b031684565b6040805194855263ffffffff9093166020850152918301526001600160a01b031660608201526080016101b2565b61027e61046e36600461167c565b610bd9565b61024a610481366004611699565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b61027e6104ba36600461167c565b610c62565b6060600380546104ce906116d2565b80601f01602080910402602001604051908101604052809291908181526020018280546104fa906116d2565b80156105475780601f1061051c57610100808354040283529160200191610547565b820191906000526020600020905b81548152906001019060200180831161052a57829003601f168201915b5050505050905090565b600061055e338484610d4d565b50600192915050565b6000610574848484610ea5565b6001600160a01b0384166000908152600160209081526040808320338452909152902054828110156106135760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206160448201527f6c6c6f77616e636500000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6106208533858403610d4d565b506001949350505050565b6000818152600860205260409020600301546001600160a01b031633146106945760405162461bcd60e51b815260206004820152600e60248201527f4e6f7420617574686f72697a6564000000000000000000000000000000000000604482015260640161060a565b61069d816110bd565b50565b3360008181526001602090815260408083206001600160a01b0387168452909152812054909161055e9185906106d7908690611723565b610d4d565b6107256040518060e0016040528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160006001600160a01b031681525090565b6006546040517f8b50306b000000000000000000000000000000000000000000000000000000008152600481018490526001600160a01b03909116908190638b50306b9060240160e060405180830381865afa158015610789573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107ad919061173b565b9392505050565b6005546001600160a01b0316331461080e5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161060a565b61081860006111db565b565b6000818152600860205260408120546108755760405162461bcd60e51b815260206004820152600f60248201527f446f65736e2774207374616b696e670000000000000000000000000000000000604482015260640161060a565b6000610880836106dc565b60008481526008602090815260408083209184015190840151939450909290916108c160326108bb60646108b5600a886117c5565b90610d41565b9061123a565b6108cc90600a611723565b6108de90670de0b6b3a76400006117dc565b90506108f9600a6108b56108f28583611723565b849061123a565b60018501549091506000906109149063ffffffff16426117fb565b63ffffffff169050610936620151806108b5848461123a90919063ffffffff16565b98975050505050505050565b6060600480546104ce906116d2565b3360009081526001602090815260408083206001600160a01b0386168452909152812054828110156109eb5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f000000000000000000000000000000000000000000000000000000606482015260840161060a565b6109f83385858403610d4d565b5060019392505050565b61069d81611246565b600061055e338484610ea5565b600081815260086020526040902054610a735760405162461bcd60e51b815260206004820152600f60248201527f446f65736e2774207374616b696e670000000000000000000000000000000000604482015260640161060a565b600081815260086020526040902060038101546001600160a01b03163314610ac95760405162461bcd60e51b81526020600482015260096024820152682727aa1027aba722a960b91b604482015260640161060a565b6000610ad48361081a565b6040517fa9059cbb00000000000000000000000000000000000000000000000000000000815233600482015260248101829052909150309063a9059cbb906044016020604051808303816000875af1158015610b34573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b589190611820565b5060018201805463ffffffff19164263ffffffff908116919091179091556002830154610b8791839061146916565b600283015560408051848152602081018390524263ffffffff1681830152905133917fa2c90f5e15323106efd2af6b3e2e6a588fe22073af0710ea106e978a3aacc0f7919081900360600190a2505050565b6005546001600160a01b03163314610c335760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161060a565b6006805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6005546001600160a01b03163314610cbc5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161060a565b6001600160a01b038116610d385760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161060a565b61069d816111db565b60006107ad8284611842565b6001600160a01b038316610dc85760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f7265737300000000000000000000000000000000000000000000000000000000606482015260840161060a565b6001600160a01b038216610e445760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f7373000000000000000000000000000000000000000000000000000000000000606482015260840161060a565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610f215760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f6472657373000000000000000000000000000000000000000000000000000000606482015260840161060a565b6001600160a01b038216610f9d5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f6573730000000000000000000000000000000000000000000000000000000000606482015260840161060a565b6001600160a01b0383166000908152602081905260409020548181101561102c5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e63650000000000000000000000000000000000000000000000000000606482015260840161060a565b6001600160a01b03808516600090815260208190526040808220858503905591851681529081208054849290611063908490611723565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516110af91815260200190565b60405180910390a350505050565b6006546001600160a01b03166110d282610a18565b604051632142170760e11b8152306004820152336024820152604481018390526001600160a01b038216906342842e0e90606401600060405180830381600087803b15801561112057600080fd5b505af1158015611134573d6000803e3d6000fd5b5050600754611147925090506001611475565b600755600082815260086020908152604080832083815560018101805463ffffffff1916905560028101939093556003909201805473ffffffffffffffffffffffffffffffffffffffff1916905581513381529081018490524263ffffffff168183015290517f72b9fb9c9cea84f74073db9855aad69f78ddaf542c4caf5897a2af67d8e2970c9181900360600190a15050565b600580546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60006107ad82846117dc565b6006546040517f6352211e000000000000000000000000000000000000000000000000000000008152600481018390526001600160a01b039091169033908290636352211e90602401602060405180830381865afa1580156112ac573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112d09190611864565b6001600160a01b0316146113125760405162461bcd60e51b81526020600482015260096024820152682727aa1027aba722a960b91b604482015260640161060a565b6040805160808101825283815263ffffffff4281166020830152600092820192909252336060820152600754909161134e919060019061146916565b600755600083815260086020908152604091829020835181559083015160018201805463ffffffff191663ffffffff90921691909117905582820151600282015560608301516003909101805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b039283161790559051632142170760e11b815233600482015230602482015260448101859052908316906342842e0e90606401600060405180830381600087803b15801561140657600080fd5b505af115801561141a573d6000803e3d6000fd5b505060408051338152602081018790524263ffffffff168183015290517f1186a0fd4b6c8a1f60c379695fa5433d9528920b68d49c541a722a287e5de5789350908190036060019150a1505050565b60006107ad8284611723565b60006107ad82846117c5565b600060208083528351808285015260005b818110156114ae57858101830151858201604001528201611492565b818111156114c0576000604083870101525b50601f01601f1916929092016040019392505050565b6001600160a01b038116811461069d57600080fd5b600080604083850312156114fe57600080fd5b8235611509816114d6565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561155657611556611517565b604052919050565b6000806000806080858703121561157457600080fd5b843561157f816114d6565b9350602085810135611590816114d6565b935060408601359250606086013567ffffffffffffffff808211156115b457600080fd5b818801915088601f8301126115c857600080fd5b8135818111156115da576115da611517565b6115ec601f8201601f1916850161152d565b9150808252898482850101111561160257600080fd5b808484018584013760008482840101525080935050505092959194509250565b60008060006060848603121561163757600080fd5b8335611642816114d6565b92506020840135611652816114d6565b929592945050506040919091013590565b60006020828403121561167557600080fd5b5035919050565b60006020828403121561168e57600080fd5b81356107ad816114d6565b600080604083850312156116ac57600080fd5b82356116b7816114d6565b915060208301356116c7816114d6565b809150509250929050565b600181811c908216806116e657607f821691505b6020821081141561170757634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b600082198211156117365761173661170d565b500190565b600060e0828403121561174d57600080fd5b60405160e0810181811067ffffffffffffffff8211171561177057611770611517565b8060405250825181526020830151602082015260408301516040820152606083015160608201526080830151608082015260a083015160a082015260c08301516117b9816114d6565b60c08201529392505050565b6000828210156117d7576117d761170d565b500390565b60008160001904831182151516156117f6576117f661170d565b500290565b600063ffffffff838116908316818110156118185761181861170d565b039392505050565b60006020828403121561183257600080fd5b815180151581146107ad57600080fd5b60008261185f57634e487b7160e01b600052601260045260246000fd5b500490565b60006020828403121561187657600080fd5b81516107ad816114d656fea264697066735822122090047b9705bff1845dacf9ae3e0f0e571aa7d77877e438cfec62025c68d1df5d64736f6c634300080b0033