zellic-audit
Initial commit
f998fcd
raw
history blame
No virus
29.5 kB
{
"language": "Solidity",
"sources": {
"/contracts/ArtistDAO.sol": {
"content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.8.3;\n\nimport \"./IApolloToken.sol\";\nimport \"./third-party/UniswapV2Library.sol\";\n\nabstract contract Context {\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n}\n\n/// @title The DAO contract for the Apollo Inu token\ncontract ApolloDAO is Context {\n\n /// @notice The address & interface of the apollo token contract\n IApolloToken public immutable apolloToken;\n /// @notice The address of the wETH contract. Used to determine minimum balances.\n address public immutable wethAddress;\n /// @notice The addres of the USDC contract. Used to determine minimum balances.\n address public immutable usdcAddress;\n /// @notice Address of the Uniswap v2 factory used to create the pairs\n address public immutable uniswapFactory;\n\n /// @notice Event that is emitted when a new DAO is nominated\n event NewDAONomination(address indexed newDAO, address indexed nominator);\n /// @notice Event that is emitted when a new vote is submitted\n event VoteSubmitted(address indexed newDAO, address indexed voter, uint256 voteAmount, bool voteFor);\n /// @notice Event that is emitted when a vote is withdrawn\n event VoteWithdrawn(address indexed newDAO, address indexed voter);\n /// @notice Event that is emitted when voting is closed for a nominated DAO\n event VotingClosed(address indexed newDAO, bool approved);\n /// @notice Event that is emitted when a new contest is started\n event ContestStarted(uint256 endDate);\n /// @notice Event that is emitted when a cycle has ended and a winner selected\n event CycleWinnerSelected(address indexed winner, uint256 reward, string summary);\n\n /// @notice A record of the current state of a DAO nomination\n struct DAONomination {\n /// The timestamp (i.e. `block.timestamp`) that the nomination was created\n uint256 timeOfNomination;\n /// The account that made the nomination\n address nominator;\n /// The total amount of votes in favor of the nomination\n uint256 votesFor;\n /// The total amount of votes against the nomination\n uint256 votesAgainst;\n /// Whether voting has closed for this nomination\n bool votingClosed;\n }\n\n /// @notice A description of a single vote record by a particular account for a nomination\n struct DAOVotes {\n /// The count of tokens committed to this vote\n uint256 voteCount;\n /// Whether an account voted in favor of the nomination\n bool votedFor;\n }\n\n struct LeadCandidate {\n address candidate;\n uint256 voteCount;\n uint256 voteCycle;\n }\n\n /// @dev A mapping of the contract address of a nomination to the nomination state\n mapping (address => DAONomination) private _newDAONominations;\n /// @dev A mapping of the vote record by an account for a nominated DAO\n mapping (address => mapping (address => DAOVotes)) private _lockedVotes;\n\n /// @notice The minimum voting duration for a particular nomination (three days).\n uint256 public constant daoVotingDuration = 259200;\n /// @notice The minimum amount of Apollo an account must hold to submit a new nomination\n uint256 public constant minimumDAOBalance = 10000000000 * 10**9;\n /// @notice The total amount of votes—and thus Apollo tokens—that are currently held by this DAO\n uint256 public totalLockedVotes;\n /// @notice The total number of DAO nominations that are open for voting\n uint256 public activeDAONominations;\n\n /// @notice The address of the new approved DAO that will be eligible to replace this DAO\n address public approvedNewDAO = address(0);\n /// @notice The address of the privileged admin that can decide contests\n address public immutable admin;\n /// @notice The minimum amount of time after a new DAO is approved before it can be activated as the\n /// next effective DAO (two days).\n uint256 public constant daoUpdateDelay = 86400;\n /// @notice The timestamp when the new DAO was approved\n uint256 public daoApprovedTime;\n /// @notice The IPFS summary of every cycle\n mapping(uint256 => string) public votingSummary;\n\n /// @notice The total duration in seconds of one voting cycle\n uint256 public votingCycleLength = 1123200;\n /// @notice The timestamp when the current voting cycle started\n uint256 public currentVotingCycleStart = 1663081280;\n /// @notice The timestamp when the current voting cycle ends\n uint256 public currentVotingCycleEnd = 1663599680;\n /// @notice Whether or not a contest is currently running\n bool public contestIsRunning = true;\n \n LeadCandidate public leadVoteRecipient;\n\n ///@notice The percent of the DAO balance that the winnings cannot exceed\n uint256 public maxBalancePercentage = 5;\n /// @notice The % of the winnings to be burned.\n /// e.g. if this value is 1 that is .1%\n uint256 public awardBurnPerMille = 1;\n /// @notice The % of the DAO pool to be given to the dev wallet.\n /// e.g. if this value is 5 that is .5%\n uint256 public devWalletPerMille = 10;\n /// @notice The wallet used to fund the Apollo DAO development\n address public immutable devWallet;\n /// @notice The minimum value of Apollo in USDC required to vote\n uint256 public minimumUSDValueToVote = 50 * 10**6;\n /// @notice The minimum value of Apollo in USDC required to nominate\n uint256 public minimumUSDValueToNominate = 75 * 10**6;\n /// @notice The percentage of vote withdrawls to burn\n uint256 public constant daoVoteBurnPercentage = 1;\n /// @notice The wallet that will control contest parameters\n address public immutable deployingWallet;\n\n\n // New award properties\n \n /// @notice The per-contestant percentage of APOLLO that is awarded to the winner.\n /// e.g. if there are 3 contestants and the contract holds 10M APOLLO, the winner\n /// receives 10M * 0.1% * 3 == 30k APOLLO.\n uint256 public awardPerContestantPerMille = 2;\n /// @notice The minimum threshold of votes in a single contest where the winner will\n /// receive a bonus. The bonus is equal to the base reward times the percentage of\n /// new voters. e.g. of the base reward is 30k, and half of all voters are new, the\n /// reward is 30k + 30k * 0.5 == 45k.\n uint256 public minVotesForBonus = 50;\n\n /// @notice Award percentages that are paid to the first, second, and third place \n /// contestants in a contest. These values are specified \"per-mille\" as opposed to\n /// percentages so they can be more precise.\n uint32[3] public awardTiersPerMille = [800, 150, 50];\n\n /// @notice The winnings being held waiting for winners to fullfill\n /// their requirements\n mapping(address=>uint256) public heldWinnings;\n /// @notice The number of tokens held for winnings\n uint256 public totalHeldWinnings;\n\n constructor(\n address tokenAddress, \n address _wethAddress, \n address _usdcAddress, \n address _devWallet, \n address _admin, \n address _deployingWallet\n ) {\n apolloToken = IApolloToken(tokenAddress);\n wethAddress = _wethAddress;\n usdcAddress = _usdcAddress;\n uniswapFactory = apolloToken.uniswapRouter().factory();\n devWallet = _devWallet;\n admin = _admin;\n deployingWallet = _deployingWallet;\n }\n\n // Modifiers\n\n modifier onlyAdmin(){\n require(_msgSender()==admin,\"Only admin can call this function\");\n _;\n }\n\n modifier onlyDeployingWallet(){\n require(_msgSender()==deployingWallet,\"Only deploying wallet can call this function\");\n _;\n }\n\n // Public functions\n\n /// @notice The minimum amount of Apollo an account must hold to submit a vote\n function minimumVoteBalance() public view returns (uint256) {\n return _apolloAmountFromUSD(minimumUSDValueToVote);\n }\n\n /// @notice The minimum amount of Apollo an account must hold to submit a nomination\n function minimumNominationBalance() public view returns (uint256) {\n return _apolloAmountFromUSD(minimumUSDValueToNominate);\n }\n\n /// @notice Used to start a new contest after the previous contest has been completed\n function startContest() external onlyAdmin {\n require(contestIsRunning == false, \"Another contest is running\");\n\n currentVotingCycleStart = block.timestamp;\n currentVotingCycleEnd = block.timestamp + votingCycleLength;\n contestIsRunning = true;\n emit ContestStarted(currentVotingCycleEnd);\n }\n\n /// @notice Used to complete a contest and distribute funds to the winner\n function completeCycle(\n address[3] calldata _winners,\n uint256 _contestantsCount,\n uint256 _totalVotesCount,\n uint256 _newVotersCount,\n string memory voteSummary\n ) public onlyAdmin{\n require(contestIsRunning, \"No running contest\");\n require(block.timestamp > currentVotingCycleEnd, \"Voting Cycle has not ended\");\n\n leadVoteRecipient.candidate = _winners[0];\n leadVoteRecipient.voteCount = _totalVotesCount;\n leadVoteRecipient.voteCycle = currentVotingCycleEnd;\n votingSummary[currentVotingCycleEnd] = voteSummary;\n contestIsRunning = false;\n\n (\n uint256 totalAward,\n uint256 burnAmount,\n uint256 devWalletTake\n ) = _disbursementAmountsForContest(_contestantsCount, _totalVotesCount, _newVotersCount);\n\n if (totalAward <= 0) {\n return;\n }\n\n uint256 remainingAward = totalAward;\n for (uint8 index = 0; index < 3; index++) {\n uint32 tierPerMille = awardTiersPerMille[index];\n uint256 award = totalAward * tierPerMille / 1000;\n remainingAward -= award;\n\n if (award > 0 && _winners[index] != address(0)) {\n heldWinnings[_winners[index]] += award;\n totalHeldWinnings += award;\n }\n if (index == 0) {\n // This is the first-place winner\n emit CycleWinnerSelected(leadVoteRecipient.candidate, award, voteSummary);\n }\n }\n\n // Due to rounding during integer division, there may be some tiny amount of remaining APOLLO.\n // We simply burn it in these cases.\n burnAmount += remainingAward;\n apolloToken.transfer(devWallet, devWalletTake);\n apolloToken.burn(burnAmount);\n }\n\n /// @notice Disburses winnings to winners\n /// @param _winner The address of the winner to get funds\n function disburseWinnings(address _winner) external onlyAdmin{\n uint256 heldForWinner = heldWinnings[_winner];\n require(heldForWinner > 0, \"This address has no winnings\");\n \n apolloToken.transfer(_winner, heldForWinner);\n apolloToken.burn(heldForWinner * awardBurnPerMille / 1000);\n \n heldWinnings[_winner] = 0;\n totalHeldWinnings -= heldForWinner;\n }\n\n /// @notice Cancels winnings if winner did not\n /// complete requirements to receive funds\n /// @param _winner The address of the winner to have\n /// winnings removed\n function cancelWinnings(address _winner) external onlyAdmin{\n uint256 heldForWinner = heldWinnings[_winner];\n require(heldForWinner > 0, \"This address has no winnings\");\n\n heldWinnings[_winner] = 0;\n totalHeldWinnings -= heldForWinner;\n }\n\n /// @notice Cast a vote for an active nominated DAO\n /// @param voteAmount The amount of Apollo to commit to your vote\n /// @param newDAO The address of the nominated DAO to cast a vote for\n /// @param voteFor Whether you want to vote in favor of the nomination\n function voteForDAONomination(uint256 voteAmount, address newDAO, bool voteFor) external {\n require(_newDAONominations[newDAO].timeOfNomination > 0 , \"There is no DAO Nomination for this address\");\n require(_lockedVotes[_msgSender()][newDAO].voteCount == 0, \"User already voted on this nomination\");\n require(approvedNewDAO == address(0), \"There is already an approved new DAO\");\n apolloToken.transferFrom(_msgSender(), address(this), voteAmount);\n totalLockedVotes += voteAmount;\n _lockedVotes[_msgSender()][newDAO].voteCount += voteAmount;\n _lockedVotes[_msgSender()][newDAO].votedFor = voteFor;\n if(voteFor){\n _newDAONominations[newDAO].votesFor += voteAmount;\n } else {\n _newDAONominations[newDAO].votesAgainst += voteAmount;\n }\n emit VoteSubmitted(newDAO, _msgSender(), voteAmount, voteFor);\n }\n\n /// @notice Withdraw votes you have previously cast for a nomination. This can be called regardless of\n /// whether a nomination is active. If still active, your votes will no longer count in the final tally.\n /// @param newDAO The address of the nomination to withdraw your votes from\n function withdrawNewDAOVotes(address newDAO) external {\n uint256 currentVoteCount = _lockedVotes[_msgSender()][newDAO].voteCount;\n require(currentVoteCount > 0 , \"You have not cast votes for this nomination\");\n require((totalLockedVotes - currentVoteCount) >= 0, \"Withdrawing would take DAO balance below expected rewards amount\");\n\n uint256 apolloToBurn = currentVoteCount * daoVoteBurnPercentage / 100;\n uint256 apolloToTransfer = currentVoteCount - apolloToBurn;\n\n apolloToken.transfer(_msgSender(), apolloToTransfer);\n apolloToken.burn(apolloToBurn);\n\n\n totalLockedVotes -= currentVoteCount;\n _lockedVotes[_msgSender()][newDAO].voteCount -= currentVoteCount;\n\n if(_lockedVotes[_msgSender()][newDAO].votedFor){\n _newDAONominations[newDAO].votesFor -= currentVoteCount;\n } else {\n _newDAONominations[newDAO].votesAgainst -= currentVoteCount;\n }\n emit VoteWithdrawn(newDAO, _msgSender());\n }\n\n /// @notice Submit a nomination for a new DAO contract\n /// @param newDAO The address of the new DAO contract you wish to nominate\n function nominateNewDAO(address newDAO) external {\n require(apolloToken.balanceOf(_msgSender()) >= minimumDAOBalance , \"Nominator does not own enough APOLLO\");\n require(_newDAONominations[newDAO].timeOfNomination == 0, \"This address has already been nominated\");\n _newDAONominations[newDAO] = DAONomination({\n timeOfNomination: block.timestamp,\n nominator: _msgSender(),\n votesFor: 0,\n votesAgainst: 0,\n votingClosed: false\n });\n activeDAONominations += 1;\n emit NewDAONomination(newDAO, _msgSender());\n }\n\n /// @notice Close voting for the provided nomination, preventing any future votes\n /// @param newDAO The address of the nomination to close voting for\n function closeNewDAOVoting(address newDAO) external {\n require(block.timestamp > (_newDAONominations[newDAO].timeOfNomination + daoVotingDuration), \"We have not passed the minimum voting duration\");\n require(!_newDAONominations[newDAO].votingClosed, \"Voting has already closed for this nomination\");\n require(approvedNewDAO == address(0), \"There is already an approved new DAO\");\n\n bool approved = (_newDAONominations[newDAO].votesFor > _newDAONominations[newDAO].votesAgainst);\n if (approved) {\n approvedNewDAO = newDAO;\n daoApprovedTime = block.timestamp;\n }\n activeDAONominations -= 1;\n _newDAONominations[newDAO].votingClosed = true;\n emit VotingClosed(newDAO, approved);\n }\n\n /// @notice Update the address of the active DAO in the Apollo token contract\n /// @dev This function may only be called after a new DAO is approved and after the update delay has elapsed\n function updateDAOAddress() external {\n require(approvedNewDAO != address(0), \"There is not an approved new DAO\");\n require(block.timestamp > (daoApprovedTime + daoUpdateDelay), \"We have not finished the delay for an approved DAO\");\n apolloToken.changeArtistAddress(approvedNewDAO);\n }\n\n /// @notice Reflects any contract balance left behinf\n ///@param amountToReflect is the amount to reflect. Set to 0 to reflect entire balance\n function reflectBalance(uint256 amountToReflect) external {\n require(apolloToken.artistDAO() != address(this), \"This function cannot be called while this contract is the DAO\");\n if(amountToReflect == 0){\n amountToReflect = apolloToken.balanceOf(address(this));\n }\n apolloToken.reflect(amountToReflect);\n }\n\n /// @notice The time the provided DAO address was nominated\n /// @param dao The DAO address that was previously nominated\n function daoNominationTime(address dao) external view returns (uint256){\n return _newDAONominations[dao].timeOfNomination;\n }\n\n /// @notice The account that nominated the provided DAO address\n /// @param dao The DAO address that was previously nominated\n function daoNominationNominator(address dao) external view returns (address){\n return _newDAONominations[dao].nominator;\n }\n\n /// @notice The amount of votes in favor of a nomination\n /// @param dao The DAO address to check\n function daoNominationVotesFor(address dao) external view returns (uint256){\n return _newDAONominations[dao].votesFor;\n }\n\n /// @notice The amount of votes against a nomination\n /// @param dao The DAO address to check\n function daoNominationVotesAgainst(address dao) external view returns (uint256){\n return _newDAONominations[dao].votesAgainst;\n }\n\n /// @notice Whether voting is closed for the provided DAO address\n /// @param dao The DAO address that was previously nominated\n function daoNominationVotingClosed(address dao) external view returns (bool){\n return _newDAONominations[dao].votingClosed;\n }\n\n /// @notice The amount of votes pledged by the provided voter for the provided DAO nomination\n /// @param voter The address who cast a vote for the DAO\n /// @param dao The address of the nominated DAO to check\n function checkAddressVoteAmount(address voter, address dao) external view returns (uint256){\n return _lockedVotes[voter][dao].voteCount;\n }\n\n function checkDAOAddressVote(address voter, address dao) external view returns (bool){\n return _lockedVotes[voter][dao].votedFor;\n }\n\n // Functions for changing contest parameters\n\n function setMaxBalancePercentage(uint256 newPercentage) external onlyDeployingWallet {\n maxBalancePercentage = newPercentage;\n }\n\n function setMinimumVoteDollarAmount(uint256 newDollarAmount) external onlyDeployingWallet {\n minimumUSDValueToVote = newDollarAmount;\n }\n\n function setMinimumNominationDollarAmount(uint256 newDollarAmount) external onlyDeployingWallet {\n minimumUSDValueToNominate = newDollarAmount;\n }\n\n function setBurnPerMille(uint256 newPerMille) external onlyDeployingWallet {\n awardBurnPerMille = newPerMille;\n }\n\n function setDevWalletPerMille(uint256 newPerMille) external onlyDeployingWallet {\n devWalletPerMille = newPerMille;\n }\n\n function setAwardPerContestantPerMille(uint256 _awardPerContestantPerMille) external onlyDeployingWallet {\n awardPerContestantPerMille = _awardPerContestantPerMille;\n }\n\n function setMinVotesForBonus(uint256 _minVotesForBonus) external onlyDeployingWallet {\n minVotesForBonus = _minVotesForBonus;\n }\n\n function setVotingCycleLength(uint256 _votingCycleLength) external onlyDeployingWallet {\n votingCycleLength = _votingCycleLength;\n }\n\n function setAwardTiersPerMille(uint32[3] calldata _awardTiersPerMille) external onlyDeployingWallet {\n uint32 total = 0;\n for (uint32 index; index < 3; index++) {\n total += _awardTiersPerMille[index];\n }\n require(total == 1000, \"Sum of awards should equal 1000\");\n awardTiersPerMille = _awardTiersPerMille;\n }\n\n // Internal functions\n\n /// @notice The minimum amount of Apollo an account must hold to submit a vote\n function _apolloAmountFromUSD(uint256 _usdAmount) internal view returns (uint256) {\n (uint usdcReserve, uint wethToUSDCReserve) = UniswapV2Library.getReserves(uniswapFactory, usdcAddress, wethAddress);\n (uint apolloReserve, uint wethToApolloReserve) = UniswapV2Library.getReserves(uniswapFactory, address(apolloToken), wethAddress);\n uint wethAmount = UniswapV2Library.quote(_usdAmount, usdcReserve, wethToUSDCReserve);\n uint apolloAmount = UniswapV2Library.quote(wethAmount, wethToApolloReserve, apolloReserve);\n return apolloAmount;\n }\n\n /// @notice Returns the amounts used for awards and other disbursements for this contest\n function _disbursementAmountsForContest(\n uint256 _contestantsCount,\n uint256 _totalVotesCount,\n uint256 _newVotersCount\n ) private view returns (\n uint256 totalAward,\n uint256 burnAmount,\n uint256 devWalletTake\n ) {\n uint256 daoBalance = apolloToken.balanceOf(address(this));\n uint256 baseAwardPerContestant = daoBalance * awardPerContestantPerMille / 1000;\n uint256 baseAward = baseAwardPerContestant * _contestantsCount;\n uint256 potentialBonusAward = _totalVotesCount > 0 ? baseAward * _newVotersCount / _totalVotesCount : 0;\n uint256 bonusAward = _totalVotesCount >= minVotesForBonus ? potentialBonusAward : 0;\n totalAward = baseAward + bonusAward;\n\n uint256 maxAward = daoBalance * maxBalancePercentage / 100;\n if (totalAward > maxAward) {\n // Ensure the total award is not greater than the maximum allowed award\n totalAward = maxAward;\n }\n\n burnAmount = totalAward * awardBurnPerMille / 1000;\n totalAward -= burnAmount;\n devWalletTake = daoBalance * devWalletPerMille / 1000;\n }\n\n // Functions for retrieving random funding on contract\n \n /// @notice For recovering any random tokens that \n /// have gotten onto the contract\n /// @param _to The address receiving the token\n /// @param _token The token being moved \n function sendRandomTokens(address _to, address _token) external onlyDeployingWallet {\n require(_token != address(apolloToken), \"Cannot send Apollo\");\n IApolloToken anyToken = IApolloToken(_token);\n anyToken.transfer(_to, anyToken.balanceOf(address(this)));\n }\n\n}\n"
},
"/contracts/third-party/UniswapV2Library.sol": {
"content": "// SPDX-License-Identifier: GPL-3.0\n\npragma solidity >=0.5.0;\n\nimport '@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol';\n\nlibrary SafeMath {\n function mul(uint x, uint y) internal pure returns (uint z) {\n require(y == 0 || (z = x * y) / y == x, 'ds-math-mul-overflow');\n }\n}\n\nlibrary UniswapV2Library {\n using SafeMath for uint;\n\n // returns sorted token addresses, used to handle return values from pairs sorted in this order\n function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) {\n require(tokenA != tokenB, 'UniswapV2Library: IDENTICAL_ADDRESSES');\n (token0, token1) = tokenA < tokenB ? (tokenA, tokenB) : (tokenB, tokenA);\n require(token0 != address(0), 'UniswapV2Library: ZERO_ADDRESS');\n }\n\n // calculates the CREATE2 address for a pair without making any external calls\n function pairFor(address factory, address tokenA, address tokenB) internal pure returns (address pair) {\n (address token0, address token1) = sortTokens(tokenA, tokenB);\n pair = address(uint160(uint(keccak256(abi.encodePacked(\n hex'ff',\n factory,\n keccak256(abi.encodePacked(token0, token1)),\n hex'96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f' // init code hash\n )))));\n }\n\n // fetches and sorts the reserves for a pair\n function getReserves(address factory, address tokenA, address tokenB) internal view returns (uint reserveA, uint reserveB) {\n (address token0,) = sortTokens(tokenA, tokenB);\n (uint reserve0, uint reserve1,) = IUniswapV2Pair(pairFor(factory, tokenA, tokenB)).getReserves();\n (reserveA, reserveB) = tokenA == token0 ? (reserve0, reserve1) : (reserve1, reserve0);\n }\n\n // given some amount of an asset and pair reserves, returns an equivalent amount of the other asset\n function quote(uint amountA, uint reserveA, uint reserveB) internal pure returns (uint amountB) {\n require(amountA > 0, 'UniswapV2Library: INSUFFICIENT_AMOUNT');\n require(reserveA > 0 && reserveB > 0, 'UniswapV2Library: INSUFFICIENT_LIQUIDITY');\n amountB = amountA.mul(reserveB) / reserveA;\n }\n}\n"
},
"/contracts/IApolloToken.sol": {
"content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\ninterface IUniswapV2Router02 {\n function factory() external view returns (address);\n}\n\ninterface IApolloToken {\n function changeArtistAddress(address newAddress) external;\n function balanceOf(address account) external view returns (uint256);\n function transfer(address recipient, uint256 amount) external returns (bool);\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) external returns (bool);\n function burn(uint256 burnAmount) external;\n function reflect(uint256 tAmount) external;\n function artistDAO() external view returns (address);\n function uniswapRouter() external view returns (IUniswapV2Router02);\n}\n"
},
"@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol": {
"content": "pragma solidity >=0.5.0;\n\ninterface IUniswapV2Pair {\n event Approval(address indexed owner, address indexed spender, uint value);\n event Transfer(address indexed from, address indexed to, uint value);\n\n function name() external pure returns (string memory);\n function symbol() external pure returns (string memory);\n function decimals() external pure returns (uint8);\n function totalSupply() external view returns (uint);\n function balanceOf(address owner) external view returns (uint);\n function allowance(address owner, address spender) external view returns (uint);\n\n function approve(address spender, uint value) external returns (bool);\n function transfer(address to, uint value) external returns (bool);\n function transferFrom(address from, address to, uint value) external returns (bool);\n\n function DOMAIN_SEPARATOR() external view returns (bytes32);\n function PERMIT_TYPEHASH() external pure returns (bytes32);\n function nonces(address owner) external view returns (uint);\n\n function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;\n\n event Mint(address indexed sender, uint amount0, uint amount1);\n event Burn(address indexed sender, uint amount0, uint amount1, address indexed to);\n event Swap(\n address indexed sender,\n uint amount0In,\n uint amount1In,\n uint amount0Out,\n uint amount1Out,\n address indexed to\n );\n event Sync(uint112 reserve0, uint112 reserve1);\n\n function MINIMUM_LIQUIDITY() external pure returns (uint);\n function factory() external view returns (address);\n function token0() external view returns (address);\n function token1() external view returns (address);\n function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);\n function price0CumulativeLast() external view returns (uint);\n function price1CumulativeLast() external view returns (uint);\n function kLast() external view returns (uint);\n\n function mint(address to) external returns (uint liquidity);\n function burn(address to) external returns (uint amount0, uint amount1);\n function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;\n function skim(address to) external;\n function sync() external;\n\n function initialize(address, address) external;\n}\n"
}
},
"settings": {
"remappings": [],
"optimizer": {
"enabled": false,
"runs": 200
},
"evmVersion": "london",
"libraries": {},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
}
}
}