{"compiler":{"version":"0.8.10+commit.fc410830"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"address","name":"initialOwner","type":"address"},{"internalType":"uint256","name":"biddingStartTime","type":"uint256"},{"internalType":"uint256","name":"biddingEndTime","type":"uint256"},{"internalType":"uint256","name":"claimingEndTime","type":"uint256"},{"internalType":"uint256","name":"auctionWinnersCount","type":"uint256"},{"internalType":"uint256","name":"raffleWinnersCount","type":"uint256"},{"internalType":"uint256","name":"reservePrice","type":"uint256"},{"internalType":"uint256","name":"minBidIncrement","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"bidderID","type":"uint256"}],"name":"NewAuctionWinner","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"bidder","type":"address"},{"indexed":false,"internalType":"uint256","name":"bidderID","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"bidAmount","type":"uint256"}],"name":"NewBid","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"bidderID","type":"uint256"}],"name":"NewGoldenTicketWinner","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"bidderID","type":"uint256"}],"name":"NewRaffleWinner","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"},{"stateMutability":"payable","type":"fallback"},{"inputs":[],"name":"auctionWinnersCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bid","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"biddingEndTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"biddingStartTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"bidderID","type":"uint256"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"bidsCount","type":"uint256"}],"name":"claimFees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimProceeds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimingEndTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAuctionWinners","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"bidder","type":"address"}],"name":"getBid","outputs":[{"components":[{"internalType":"uint256","name":"bidderID","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"enum BidModel.WinType","name":"winType","type":"uint8"},{"internalType":"bool","name":"claimed","type":"bool"}],"internalType":"struct BidModel.Bid","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"bidderID","type":"uint256"}],"name":"getBidByID","outputs":[{"components":[{"internalType":"uint256","name":"bidderID","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"enum BidModel.WinType","name":"winType","type":"uint8"},{"internalType":"bool","name":"claimed","type":"bool"}],"internalType":"struct BidModel.Bid","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"bidderID","type":"uint256"}],"name":"getBidWithAddress","outputs":[{"components":[{"internalType":"address","name":"bidder","type":"address"},{"components":[{"internalType":"uint256","name":"bidderID","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"enum BidModel.WinType","name":"winType","type":"uint8"},{"internalType":"bool","name":"claimed","type":"bool"}],"internalType":"struct BidModel.Bid","name":"bid","type":"tuple"}],"internalType":"struct BidModel.BidWithAddress","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"bidderID","type":"uint256"}],"name":"getBidderAddress","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getBiddersCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getBidsWithAddresses","outputs":[{"components":[{"internalType":"address","name":"bidder","type":"address"},{"components":[{"internalType":"uint256","name":"bidderID","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"enum BidModel.WinType","name":"winType","type":"uint8"},{"internalType":"bool","name":"claimed","type":"bool"}],"internalType":"struct BidModel.Bid","name":"bid","type":"tuple"}],"internalType":"struct BidModel.BidWithAddress[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getRaffleParticipants","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getRaffleWinners","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getState","outputs":[{"internalType":"enum StateModel.State","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minBidIncrement","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"raffleWinnersCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"}],"name":"rescueTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"reservePrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"settleAuction","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"randomNumbers","type":"uint256[]"}],"name":"settleRaffle","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawUnclaimedFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}],"devdoc":{"events":{"NewAuctionWinner(uint256)":{"details":"A bidder has been drawn as auction winner"},"NewBid(address,uint256,uint256)":{"details":"A new bid has been placed or an existing bid has been bumped"},"NewGoldenTicketWinner(uint256)":{"details":"A bidder has been drawn as the golden ticket winner"},"NewRaffleWinner(uint256)":{"details":"A bidder has been drawn as raffle winner"}},"kind":"dev","methods":{"claimFees(uint256)":{"details":"This function is designed to be called multiple times, to split iteration though all non-winning bids across multiple transactions.","params":{"bidsCount":"The number of bids to be processed at once."}},"getAuctionWinners()":{"returns":{"_0":"A list of auction winner bidder IDs."}},"getBidderAddress(uint256)":{"returns":{"_0":"Address of bidder account for given bidder ID."}},"getRaffleWinners()":{"returns":{"_0":"A list of raffle winner bidder IDs."}},"owner()":{"details":"Returns the address of the current owner."},"renounceOwnership()":{"details":"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner."},"rescueTokens(address)":{"params":{"tokenAddress":"The address of an ERC-20 token contract."}},"settleAuction()":{"details":"Removes highest bids from the heap, sets their WinType to AUCTION and adds them to _auctionWinners array. Temporarily adds auction winner bidderIDs to a separate heap and then retrieves them in descending order. This is done to efficiently remove auction winners from _raffleParticipants array as they no longer take part in the raffle."},"settleRaffle(uint256[])":{"details":"Sets WinType of the first selected bid to GOLDEN_TICKET. Sets WinType to RAFFLE for the remaining selected bids.","params":{"randomNumbers":"The source of randomness for the function. Each random number is used to draw at most `_winnersPerRandom` raffle winners."}},"transferOwnership(address)":{"details":"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner."}},"version":1},"userdoc":{"kind":"user","methods":{"claim(uint256)":{"notice":"Allows a bidder to claim their funds after the raffle is settled. Golden Ticket winner can withdraw the full bid amount. Raffle winner can withdraw the bid amount minus `_reservePrice`. Non-winning bidder can withdraw the bid amount minus 2% fee. Auction winner pays the full bid amount and is not entitled to any withdrawal."},"claimFees(uint256)":{"notice":"Allows the owner to claim the 2% fees from non-winning bids after the raffle is settled."},"claimProceeds()":{"notice":"Allows the owner to claim proceeds from the ticket sale after the raffle is settled. Proceeds include: sum of auction winner bid amounts, `_reservePrice` paid by each raffle winner (except the Golden Ticket winner)."},"rescueTokens(address)":{"notice":"Allows the owner to retrieve any ERC-20 tokens that were sent to the contract by accident."},"settleAuction()":{"notice":"Draws auction winners and changes contract state to AUCTION_SETTLED."},"settleRaffle(uint256[])":{"notice":"Draws raffle winners and changes contract state to RAFFLE_SETTLED. The first selected raffle winner becomes the Golden Ticket winner."},"withdrawUnclaimedFunds()":{"notice":"Allows the owner to withdraw all funds left in the contract by the participants. Callable only after the claiming window is closed."}},"version":1}},"settings":{"compilationTarget":{"contracts/AuctionRaffle.sol":"AuctionRaffle"},"evmVersion":"london","libraries":{},"metadata":{"bytecodeHash":"ipfs"},"optimizer":{"enabled":true,"runs":20000},"remappings":[]},"sources":{"@openzeppelin/contracts/access/Ownable.sol":{"keccak256":"0x24e0364e503a9bbde94c715d26573a76f14cd2a202d45f96f52134ab806b67b9","license":"MIT","urls":["bzz-raw://e12cbaa7378fd9b62280e4e1d164bedcb4399ce238f5f98fc0eefb7e50577981","dweb:/ipfs/QmXRoFGUgfsaRkoPT5bxNMtSayKTQ8GZATLPXf69HcRA51"]},"@openzeppelin/contracts/token/ERC20/IERC20.sol":{"keccak256":"0xbbc8ac883ac3c0078ce5ad3e288fbb3ffcc8a30c3a98c0fda0114d64fc44fca2","license":"MIT","urls":["bzz-raw://87a7a5d2f6f63f84598af02b8c50ca2df2631cb8ba2453e8d95fcb17e4be9824","dweb:/ipfs/QmR76hqtAcRqoFj33tmNjcWTLrgNsAaakYwnKZ8zoJtKei"]},"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol":{"keccak256":"0xc3d946432c0ddbb1f846a0d3985be71299df331b91d06732152117f62f0be2b5","license":"MIT","urls":["bzz-raw://4632c341a06ba5c079b51ca5a915efab4e6ab57735b37839b3e8365ff806a43e","dweb:/ipfs/QmTHT3xHYed2wajEoA5qu7ii2BxLpPhQZHwAhtLK5Z7ANK"]},"@openzeppelin/contracts/utils/Address.sol":{"keccak256":"0x2ccf9d2313a313d41a791505f2b5abfdc62191b5d4334f7f7a82691c088a1c87","license":"MIT","urls":["bzz-raw://b3a57d0854b2fdce6ebff933a48dca2445643d1eccfc27f00292e937f26c6a58","dweb:/ipfs/QmW45rZooS9TqR4YXUbjRbtf2Bpb5ouSarBvfW1LdGprvV"]},"@openzeppelin/contracts/utils/Context.sol":{"keccak256":"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7","license":"MIT","urls":["bzz-raw://6df0ddf21ce9f58271bdfaa85cde98b200ef242a05a3f85c2bc10a8294800a92","dweb:/ipfs/QmRK2Y5Yc6BK7tGKkgsgn3aJEQGi5aakeSPZvS65PV8Xp3"]},"contracts/AuctionRaffle.sol":{"keccak256":"0x61c902ec4a6b709643b40393ba4b8acdb250ef8c77c9e47a010301c709061c97","license":"MIT","urls":["bzz-raw://b262dd4be157d4f8703de45e1c87568ad340952f59a509a2aa2f31818676162f","dweb:/ipfs/QmSnbhQ1J2uqUJ1PLXoLC9iKWsFkMFQLCySoUN5mQ6tQBe"]},"contracts/Config.sol":{"keccak256":"0x7c868ee81f55e0d20561a348edaf9d21d6fb6706394a62d89fcce73873565093","license":"MIT","urls":["bzz-raw://65beb8651f709c4f43e497d29b0e0790d48c4b4355dd57ebf05adac03238908c","dweb:/ipfs/QmPouxXDETdsqDeNpJnjAyoUXvXrTATHAR6KepE9WQ3Vns"]},"contracts/libs/MaxHeap.sol":{"keccak256":"0xbd7f16bb35dc49785b48ca7952a2e08886a8e87ffd8500409f48f5bab3cb7f1d","license":"MIT","urls":["bzz-raw://401e92650ff82d8e1d9ba34f1e8720cac32c809430081261cde68200fe767358","dweb:/ipfs/QmZpqf2ViULY7LbkWQwDpyKgAvJigMGAikeuDujbaouAiA"]},"contracts/models/BidModel.sol":{"keccak256":"0x5d27751cd23d78e4f8b9281e3dcded6f766a32f9ddf6eac2d4b0cf95cbbb7378","license":"MIT","urls":["bzz-raw://74766cde617606af119ef65ef773abb52cc2eb8753b6576eff193f9673e459da","dweb:/ipfs/QmQANrc8kgvRUnxQ5w5V2xsxgiUTYuLrp5b9PfVL4RMi9U"]},"contracts/models/StateModel.sol":{"keccak256":"0xbca0916da0f3310de1c01b9451047285ae36432872cb0141759cb4f1cf6a9919","license":"MIT","urls":["bzz-raw://a7606964ba4a5dd83c97b394d238be1b65bfe134ebcd3bcb9ee5453ef4711093","dweb:/ipfs/QmbgYEgjKUULmg7z79z3CK7HGL4zm6StgGk3shYekjpdSD"]}},"version":1}