6 txs
12 calls
constructor
constructor(address initialOwner)
functions
allowance
viewfunction allowance(address owner, address spender) view returns (uint256)
balanceOf
viewfunction balanceOf(address account) view returns (uint256)
decimals
viewfunction decimals() view returns (uint8)
getAmountOut
viewfunction getAmountOut(uint256 value, bool buy_) view returns (uint256)
getReserves
viewfunction getReserves() view returns (uint256, uint256)
liquidityAdded
viewfunction liquidityAdded() view returns (bool)
liquidityProvider
viewfunction liquidityProvider() view returns (address)
liquidityTokenA
viewfunction liquidityTokenA() view returns (uint256)
liquidityTokenB
viewfunction liquidityTokenB() view returns (uint256)
name
viewfunction name() view returns (string)
owner
viewfunction owner() view returns (address)
symbol
viewfunction symbol() view returns (string)
timeToUnlockLiquidity
viewfunction timeToUnlockLiquidity() view returns (uint256)
TokenOPA
viewfunction TokenOPA() view returns (address)
totalSupply
viewfunction totalSupply() view returns (uint256)
USDT
viewfunction USDT() view returns (address)
addLiquidity
nonpayablefunction addLiquidity(uint256 _timeToUnlockLiquidity)
approve
nonpayablefunction approve(address spender, uint256 value) returns (bool)
extendLiquidityLock
nonpayablefunction extendLiquidityLock(uint256 _timeToUnlockLiquidity)
liquidityProviderTransfer
nonpayablefunction liquidityProviderTransfer(address newLiquidityProvider)
notFreeQuotaBuy
nonpayablefunction notFreeQuotaBuy(uint256 amount)
removeLiquidity
nonpayablefunction removeLiquidity()
renounceOwnership
nonpayablefunction renounceOwnership()
sell
nonpayablefunction sell(uint256 amount)
setToken
nonpayablefunction setToken(address tokenA_)
transfer
nonpayablefunction transfer(address to, uint256 value) returns (bool)
transferFrom
nonpayablefunction transferFrom(address from, address to, uint256 value) returns (bool)
transferOwnership
nonpayablefunction transferOwnership(address newOwner)
events
AddFreeQuota
event AddFreeQuota(address[] addrs, uint256[] amounts, uint256 id, uint256 time)
AddFreeQuotaId
event AddFreeQuotaId(uint256 id, uint256 time)
AddLiquidity
event AddLiquidity(uint256 _blockToUnlockLiquidity, uint256 value)
AddNotFreeQuota
event AddNotFreeQuota(address[] addrs, uint256[] amounts, uint256 id, uint256 time)
AddNotFreeQuotaId
event AddNotFreeQuotaId(uint256 id, uint256 time)
Approval
event Approval(address indexed owner, address indexed spender, uint256 value)
Buy
event Buy(address indexed user, uint256 amount, uint256 outAmount, uint256 tokenA, uint256 tokenB)
ExtendLiquidityLock
event ExtendLiquidityLock(uint256 lockTime)
FreeQuotaBuy
event FreeQuotaBuy(address indexed user, uint256 amount, uint256 culAmount, uint256 time)
LiquidityProviderTransfer
event LiquidityProviderTransfer(address liquidityProvider)
NotFreeQuotaBuy
event NotFreeQuotaBuy(address indexed user, uint256 amount, uint256 culAmount, uint256 time)
NotFreeQuotaTransfer
event NotFreeQuotaTransfer(address indexed user, address indexed To, uint256 amount, uint256 time)
OwnershipTransferred
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)
RemoveLiquidity
event RemoveLiquidity(uint256 value)
Sell
event Sell(address indexed user, uint256 amount, uint256 outAmount, uint256 tokenA, uint256 tokenB)
Swap
event Swap(address indexed sender, uint256 amount0In, uint256 amount1In, uint256 amount0Out, uint256 amount1Out)
Transfer
event Transfer(address indexed from, address indexed to, uint256 value)
errors
AddLiquidityInvalid
error AddLiquidityInvalid()
AllowanceUnauthorizedAccount
error AllowanceUnauthorizedAccount(address account)
ERC20InsufficientAllowance
error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed)
ERC20InsufficientBalance
error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed)
ERC20InvalidApprover
error ERC20InvalidApprover(address approver)
ERC20InvalidReceiver
error ERC20InvalidReceiver(address receiver)
ERC20InvalidSender
error ERC20InvalidSender(address sender)
ERC20InvalidSpender
error ERC20InvalidSpender(address spender)
InsufficientQuota
error InsufficientQuota(address user, uint256 balance, uint256 needed)
OwnableInvalidOwner
error OwnableInvalidOwner(address owner)
OwnableUnauthorizedAccount
error OwnableUnauthorizedAccount(address account)
ParametersInvalid
error ParametersInvalid()
SafeERC20FailedOperation
error SafeERC20FailedOperation(address token)
creation bytecode
0x6080604052600680546001600160a01b0319163017905534801562000022575f80fd5b5060405162001bd638038062001bd68339810160408190526200004591620002d3565b604080518082018252600a8082526927a820afba32b9ba2f9960b11b602080840182905284518086019095529184529083015282916003620000888382620003a2565b506004620000978282620003a2565b5050506001600160a01b038116620000c957604051631e4fbdf760e01b81525f60048201526024015b60405180910390fd5b620000d48162000117565b50620000fe33620000e86012600a62000579565b620000f8906301406f4062000586565b62000168565b50600780546001600160a01b03191633179055620005b6565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b6001600160a01b038216620001935760405163ec442f0560e01b81525f6004820152602401620000c0565b620001a05f8383620001a4565b5050565b6001600160a01b038316620001d2578060025f828254620001c69190620005a0565b90915550620002449050565b6001600160a01b0383165f9081526020819052604090205481811015620002265760405163391434e360e21b81526001600160a01b03851660048201526024810182905260448101839052606401620000c0565b6001600160a01b0384165f9081526020819052604090209082900390555b6001600160a01b038216620002625760028054829003905562000280565b6001600160a01b0382165f9081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051620002c691815260200190565b60405180910390a3505050565b5f60208284031215620002e4575f80fd5b81516001600160a01b0381168114620002fb575f80fd5b9392505050565b634e487b7160e01b5f52604160045260245ffd5b600181811c908216806200032b57607f821691505b6020821081036200034a57634e487b7160e01b5f52602260045260245ffd5b50919050565b601f8211156200039d575f81815260208120601f850160051c81016020861015620003785750805b601f850160051c820191505b81811015620003995782815560010162000384565b5050505b505050565b81516001600160401b03811115620003be57620003be62000302565b620003d681620003cf845462000316565b8462000350565b602080601f8311600181146200040c575f8415620003f45750858301515b5f19600386901b1c1916600185901b17855562000399565b5f85815260208120601f198616915b828110156200043c578886015182559484019460019091019084016200041b565b50858210156200045a57878501515f19600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b5f52601160045260245ffd5b600181815b80851115620004be57815f1904821115620004a257620004a26200046a565b80851615620004b057918102915b93841c939080029062000483565b509250929050565b5f82620004d65750600162000573565b81620004e457505f62000573565b8160018114620004fd5760028114620005085762000528565b600191505062000573565b60ff8411156200051c576200051c6200046a565b50506001821b62000573565b5060208310610133831016604e8410600b84101617156200054d575081810a62000573565b6200055983836200047e565b805f19048211156200056f576200056f6200046a565b0290505b92915050565b5f620002fb8383620004c6565b80820281158282048414176200057357620005736200046a565b808201808211156200057357620005736200046a565b61161280620005c45f395ff3fe608060405234801561000f575f80fd5b50600436106101bb575f3560e01c806367b9a286116100f3578063bd52b0bc11610093578063d94439231161006e578063d9443923146103a1578063dd62ed3e146103b5578063e4849b32146103ed578063f2fde38b14610400575f80fd5b8063bd52b0bc1461036a578063c496be4114610373578063c54e44eb14610386575f80fd5b80638da5cb5b116100ce5780638da5cb5b1461032b57806395d89b411461033c5780639a4c022c14610344578063a9059cbb14610357575f80fd5b806367b9a286146102f357806370a08231146102fb578063715018a614610323575f80fd5b806317ab77511161015e5780632584e9f2116101395780632584e9f214610293578063313ce567146102a657806351c6590a146102b55780635b8bec55146102c8575f80fd5b806317ab77511461026f57806318160ddd1461027857806323b872dd14610280575f80fd5b80630a26cc2c116101995780630a26cc2c1461021d5780630b89813e1461023257806311106ee214610249578063144fa6d71461025c575f80fd5b806306fdde03146101bf5780630902f1ac146101dd578063095ea7b3146101fa575b5f80fd5b6101c7610413565b6040516101d4919061137a565b60405180910390f35b6101e56104a3565b604080519283526020830191909152016101d4565b61020d6102083660046113e0565b61058a565b60405190151581526020016101d4565b61023061022b366004611408565b6105a3565b005b61023b60085481565b6040519081526020016101d4565b61023b61025736600461141f565b610682565b61023061026a366004611451565b6106d2565b61023b60095481565b60025461023b565b61020d61028e366004611471565b6106fc565b6102306102a1366004611451565b61071f565b604051601281526020016101d4565b6102306102c3366004611408565b6107a0565b6007546102db906001600160a01b031681565b6040516001600160a01b0390911681526020016101d4565b610230610916565b61023b610309366004611451565b6001600160a01b03165f9081526020819052604090205490565b610230610b09565b6005546001600160a01b03166102db565b6101c7610b1c565b610230610352366004611408565b610b2b565b61020d6103653660046113e0565b610ba4565b61023b600a5481565b6006546102db906001600160a01b031681565b6102db7355d398326f99059ff775485246999027b319795581565b60065461020d90600160a01b900460ff1681565b61023b6103c33660046114aa565b6001600160a01b039182165f90815260016020908152604080832093909416825291909152205490565b6102306103fb366004611408565b610bb1565b61023061040e366004611451565b610bd9565b606060038054610422906114db565b80601f016020809104026020016040519081016040528092919081815260200182805461044e906114db565b80156104995780601f1061047057610100808354040283529160200191610499565b820191905f5260205f20905b81548152906001019060200180831161047c57829003601f168201915b5050505050905090565b6040516370a0823160e01b81523060048201525f9081907355d398326f99059ff775485246999027b3197955906370a0823190602401602060405180830381865afa1580156104f4573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105189190611513565b6006546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa15801561055e573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105829190611513565b915091509091565b5f33610597818585610c16565b60019150505b92915050565b6007546001600160a01b0316336001600160a01b0316146105df5760405162461bcd60e51b81526004016105d69061152a565b60405180910390fd5b806008541180156105f95750600654600160a01b900460ff165b156106465760405162461bcd60e51b815260206004820152601a60248201527f596f752063616e27742073686f7274656e206475726174696f6e00000000000060448201526064016105d6565b60088190556040518181527fe9da15d4cb5bea133d9613a866c909df5594489b91a3f780d43720d560b3c94c906020015b60405180910390a150565b5f805f61068d6104a3565b9150915083156106be576106a18583611580565b6106ab8287611593565b6106b591906115aa565b9250505061059d565b6106c88582611580565b6106ab8387611593565b6106da610c28565b600680546001600160a01b0319166001600160a01b0392909216919091179055565b5f33610709858285610c55565b610714858585610cd1565b506001949350505050565b6007546001600160a01b0316336001600160a01b0316146107525760405162461bcd60e51b81526004016105d69061152a565b600780546001600160a01b0319166001600160a01b0383169081179091556040519081527f3c27aeeb95897cd36e99d21fa799912d323b28189b13f4aa66b733e98061ec4b90602001610677565b6007546001600160a01b0316336001600160a01b0316146107d35760405162461bcd60e51b81526004016105d69061152a565b600654670de0b6b3a76400009069021e19e0c9bab240000090600160a01b900460ff16156108145760405163a395eecd60e01b815260040160405180910390fd5b6006805460ff60a01b1916600160a01b1790556108318342611580565b600881905542111561087a5760405162461bcd60e51b8152602060048201526012602482015271426c6f636b2074696d6520746f6f206c6f7760701b60448201526064016105d6565b600780546001600160a01b031916339081179091556108b0907355d398326f99059ff775485246999027b3197955903085610d2e565b6007546006546108ce916001600160a01b0391821691163084610d2e565b6009829055600a81905560408051848152602081018490527fcb1652de9aeec38545fc281847b3dbfc89aab56dfa907b1ab68466f602c36fb4910160405180910390a1505050565b6007546001600160a01b0316336001600160a01b0316146109495760405162461bcd60e51b81526004016105d69061152a565b60085442101561098e5760405162461bcd60e51b815260206004820152601060248201526f131a5c5d5a591a5d1e481b1bd8dad95960821b60448201526064016105d6565b6006805460ff60a01b191690556040516370a0823160e01b81523060048201525f907355d398326f99059ff775485246999027b3197955906370a0823190602401602060405180830381865afa1580156109ea573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610a0e9190611513565b6006546040516370a0823160e01b81523060048201529192505f916001600160a01b03909116906370a0823190602401602060405180830381865afa158015610a59573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610a7d9190611513565b600754909150610aac907355d398326f99059ff775485246999027b3197955906001600160a01b031684610d95565b600754600654610ac9916001600160a01b03918216911683610d95565b5f6009819055600a556040518281527f9a5a8a32afd899e7f95003c6e21c9fab2d50e11992439d14472229180c60c7aa9060200160405180910390a15050565b610b11610c28565b610b1a5f610dc6565b565b606060048054610422906114db565b33610b4c7355d398326f99059ff775485246999027b3197955823085610d2e565b610b568183610e17565b604080518381525f6020820152428183015290516001600160a01b038316917f703da37effadc211ab15edefe7d704b11f25409b4ca09132081c3af460125b1a919081900360600190a25050565b5f33610597818585610cd1565b6006543390610bcb906001600160a01b0316823085610d2e565b610bd58183610f98565b5050565b610be1610c28565b6001600160a01b038116610c0a57604051631e4fbdf760e01b81525f60048201526024016105d6565b610c1381610dc6565b50565b610c238383836001611116565b505050565b6005546001600160a01b03163314610b1a5760405163118cdaa760e01b81523360048201526024016105d6565b6001600160a01b038381165f908152600160209081526040808320938616835292905220545f19811015610ccb5781811015610cbd57604051637dc7a0d960e11b81526001600160a01b038416600482015260248101829052604481018390526064016105d6565b610ccb84848484035f611116565b50505050565b6001600160a01b038316610cfa57604051634b637e8f60e11b81525f60048201526024016105d6565b6001600160a01b038216610d235760405163ec442f0560e01b81525f60048201526024016105d6565b610c238383836111e8565b6040516001600160a01b038481166024830152838116604483015260648201839052610ccb9186918216906323b872dd906084015b604051602081830303815290604052915060e01b6020820180516001600160e01b03838183161783525050505061130e565b6040516001600160a01b03838116602483015260448201839052610c2391859182169063a9059cbb90606401610d63565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b805f03610e4a5760405162461bcd60e51b81526020600482015260016024820152600360fc1b60448201526064016105d6565b600954600a545f610e5b8484611580565b610e658385611593565b610e6f91906115aa565b610e7990836115c9565b90505f8111610ec05760405162461bcd60e51b8152602060048201526013602482015272125b9cdd59999a58da595b9d081bdd5d1c1d5d606a1b60448201526064016105d6565b610eca8484611580565b600955610ed781836115c9565b600a55600654610ef1906001600160a01b03168683610d95565b6040805185815260208101839052908101849052606081018390526001600160a01b038616907f064fb1933e186be0b289a87e98518dc18cc9856ecbc9f1353d1a138ddf733ec59060800160405180910390a2604080518581525f60208201819052918101919091526060810182905233907f49926bbebe8474393f434dfa4f78694c0923efa07d19f2284518bfabd06eb737906080015b60405180910390a25050505050565b805f03610fcb5760405162461bcd60e51b81526020600482015260016024820152600360fc1b60448201526064016105d6565b600954600a545f610fdc8483611580565b610fe68385611593565b610ff091906115aa565b610ffa90846115c9565b90505f81116110415760405162461bcd60e51b8152602060048201526013602482015272125b9cdd59999a58da595b9d081bdd5d1c1d5d606a1b60448201526064016105d6565b61104b81846115c9565b6009556110588483611580565b600a5561107a7355d398326f99059ff775485246999027b31979558683610d95565b6040805185815260208101839052908101849052606081018390526001600160a01b038616907f483f8aec0fd892ac72ad1ba8d0e9c9e73db59c12d263fd71de480b5b3deeae3c9060800160405180910390a2604080515f80825260208201879052918101839052606081019190915233907f49926bbebe8474393f434dfa4f78694c0923efa07d19f2284518bfabd06eb73790608001610f89565b6001600160a01b03841661113f5760405163e602df0560e01b81525f60048201526024016105d6565b6001600160a01b03831661116857604051634a1406b160e11b81525f60048201526024016105d6565b6001600160a01b038085165f9081526001602090815260408083209387168352929052208290558015610ccb57826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040516111da91815260200190565b60405180910390a350505050565b6001600160a01b038316611212578060025f8282546112079190611580565b909155506112829050565b6001600160a01b0383165f90815260208190526040902054818110156112645760405163391434e360e21b81526001600160a01b038516600482015260248101829052604481018390526064016105d6565b6001600160a01b0384165f9081526020819052604090209082900390555b6001600160a01b03821661129e576002805482900390556112bc565b6001600160a01b0382165f9081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405161130191815260200190565b60405180910390a3505050565b5f8060205f8451602086015f885af18061132d576040513d5f823e3d81fd5b50505f513d91508115611344578060011415611351565b6001600160a01b0384163b155b15610ccb57604051635274afe760e01b81526001600160a01b03851660048201526024016105d6565b5f6020808352835180828501525f5b818110156113a557858101830151858201604001528201611389565b505f604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b03811681146113db575f80fd5b919050565b5f80604083850312156113f1575f80fd5b6113fa836113c5565b946020939093013593505050565b5f60208284031215611418575f80fd5b5035919050565b5f8060408385031215611430575f80fd5b8235915060208301358015158114611446575f80fd5b809150509250929050565b5f60208284031215611461575f80fd5b61146a826113c5565b9392505050565b5f805f60608486031215611483575f80fd5b61148c846113c5565b925061149a602085016113c5565b9150604084013590509250925092565b5f80604083850312156114bb575f80fd5b6114c4836113c5565b91506114d2602084016113c5565b90509250929050565b600181811c908216806114ef57607f821691505b60208210810361150d57634e487b7160e01b5f52602260045260245ffd5b50919050565b5f60208284031215611523575f80fd5b5051919050565b60208082526022908201527f596f7520617265206e6f7420746865206c69717569646974792070726f76696460408201526132b960f11b606082015260800190565b634e487b7160e01b5f52601160045260245ffd5b8082018082111561059d5761059d61156c565b808202811582820484141761059d5761059d61156c565b5f826115c457634e487b7160e01b5f52601260045260245ffd5b500490565b8181038181111561059d5761059d61156c56fea2646970667358221220011ed64a7a3e610173bc7e9c05624990f3c87168a3d781d6ca33b60a2ef821ed64736f6c63430008140033000000000000000000000000627642feb066f379c06b00dd51c1978cc3bcc4c2