21 txs
35 calls
constructor
constructor(address owner_, address weth_, address factoryV3_, address swapRouter_, address platformWallet_, uint256 platformFee_)
functions
owner
viewfunction owner() view returns (address)
platformFee
viewfunction platformFee() view returns (uint256)
platformWallet
viewfunction platformWallet() view returns (address)
buy
nonpayablefunction buy(uint256 amountInWETH, address rock, address to, uint256 deadline)
buyWithETH
payablefunction buyWithETH(address rock, address to, uint256 deadline) payable
renounceOwnership
nonpayablefunction renounceOwnership()
sell
nonpayablefunction sell(uint256 amountInRock, address rock, address to, bool toUnwrap, uint256 deadline)
transferOwnership
nonpayablefunction transferOwnership(address newOwner)
updatePlatformFee
nonpayablefunction updatePlatformFee(uint256 newPlatformFee)
updatePlatformWallet
nonpayablefunction updatePlatformWallet(address newPlatformWallet)
events
Buy
event Buy(address indexed rock, address indexed V3Pool, uint256 amountWETH, uint256 amountRock, address to)
OwnershipTransferred
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)
PlatformFeeUpdate
event PlatformFeeUpdate(uint256 newPlatformFee, uint256 oldPlatformFee)
PlatformWalletUpdate
event PlatformWalletUpdate(address indexed newPlatformWallet, address indexed oldPlatformWallet)
Sell
event Sell(address indexed rock, address indexed V3Pool, uint256 amountRock, uint256 amountWETH, address to)
UpdatePlatformFee
event UpdatePlatformFee(uint256 newPlatformFee, uint256 oldPlatformFee)
UpdatePlatformWallet
event UpdatePlatformWallet(address newPlatformWallet, address oldPlatformWallet)
errors
ExceededDeadline
error ExceededDeadline()
FailedCall
error FailedCall()
InavidPlatformAddress
error InavidPlatformAddress()
InsufficientBalance
error InsufficientBalance(uint256 balance, uint256 needed)
InvalidAddress
error InvalidAddress()
InvalidAssignment
error InvalidAssignment()
InvalidInputAmount
error InvalidInputAmount()
InvalidPlatformFee
error InvalidPlatformFee()
OwnableInvalidOwner
error OwnableInvalidOwner(address owner)
OwnableUnauthorizedAccount
error OwnableUnauthorizedAccount(address account)
PoolDoesNotExist
error PoolDoesNotExist()
SafeERC20FailedOperation
error SafeERC20FailedOperation(address token)
creation bytecode
0x60a060405234801561000f575f5ffd5b50604051611ad3380380611ad383398101604081905261002e916101a0565b856001600160a01b03811661005c57604051631e4fbdf760e01b81525f600482015260240160405180910390fd5b6100658161012e565b506001600160a01b038516158061008357506001600160a01b038416155b8061009557506001600160a01b038316155b156100aa576100aa63e6c4247b60e01b61017d565b6001600160a01b0382166100c8576100c863b9e4c56760e01b61017d565b805f036100df576100df63183440b760e31b61017d565b6001600160a01b03948516608052600180549486166001600160a01b03199586161790556002805493861693851693909317909255600380549190941692169190911790915560045550610209565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b805f5260045ffd5b80516001600160a01b038116811461019b575f5ffd5b919050565b5f5f5f5f5f5f60c087890312156101b5575f5ffd5b6101be87610185565b95506101cc60208801610185565b94506101da60408801610185565b93506101e860608801610185565b92506101f660808801610185565b915060a087015190509295509295509295565b60805161183461029f5f395f81816102630152818161032b01528181610383015281816103bd01528181610404015281816104530152818161064b01528181610800015281816109120152818161094c015281816109a501528181610a4d01528181610ad201528181610bfd01528181610cbe01528181610d5c01528181610d9601528181610ddd0152610e2c01526118345ff3fe6080604052600436106100b0575f3560e01c8063aa0b598811610066578063db64a6e11161004c578063db64a6e1146101a5578063f2fde38b146101b8578063fa2af9da146101d7575f5ffd5b8063aa0b598814610167578063ada4ef3014610186575f5ffd5b806349c659161161009657806349c6591614610104578063715018a6146101235780638da5cb5b14610137575f5ffd5b80630afc7bf4146100bb57806326232a2e146100dc575f5ffd5b366100b757005b5f5ffd5b3480156100c6575f5ffd5b506100da6100d536600461159c565b6101f6565b005b3480156100e7575f5ffd5b506100f160045481565b6040519081526020015b60405180910390f35b34801561010f575f5ffd5b506100da61011e3660046115ee565b6105de565b34801561012e575f5ffd5b506100da610b58565b348015610142575f5ffd5b505f546001600160a01b03165b6040516001600160a01b0390911681526020016100fb565b348015610172575f5ffd5b506100da610181366004611645565b610b6b565b348015610191575f5ffd5b506100da6101a036600461165c565b610b7f565b6100da6101b336600461167e565b610b90565b3480156101c3575f5ffd5b506100da6101d236600461165c565b610fa3565b3480156101e2575f5ffd5b5060035461014f906001600160a01b031681565b8061020081610ffb565b845f03610230576102307f340dabef00000000000000000000000000000000000000000000000000000000611028565b6001546040517f1698ee820000000000000000000000000000000000000000000000000000000081526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811660048301528681166024830152610bb860448301525f921690631698ee8290606401602060405180830381865afa1580156102c1573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906102e591906116bc565b90506001600160a01b03811661031e5761031e7f9c8787c000000000000000000000000000000000000000000000000000000000611028565b6103536001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016853089611030565b5f6103e8600454886103659190611704565b61036f919061171b565b6003549091506103ac906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081169116836110b2565b6003546103e6906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811691168361116f565b6103f08188611753565b60025490975061042d906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081169116896110b2565b6040517fffffffffffffffffffffffffffffffffffffffff0000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000606090811b821660208401527e0bb80000000000000000000000000000000000000000000000000000000000603484015288901b1660378201525f90604b0160408051601f198184030181526080830182528083526001600160a01b03808a1660208501528383018c90525f6060850181905260025493517fb858183f00000000000000000000000000000000000000000000000000000000815292955092169063b858183f90610527908590600401611766565b6020604051808303815f875af1158015610543573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061056791906117cc565b9050846001600160a01b0316896001600160a01b03167f0daf98ca968d02ea35519e9b431a9f4185e069631b0c16f2e351cca350e12af38c848c6040516105ca9392919092835260208301919091526001600160a01b0316604082015260600190565b60405180910390a350505050505050505050565b806105e881610ffb565b855f03610618576106187f340dabef00000000000000000000000000000000000000000000000000000000611028565b6001546040517f1698ee820000000000000000000000000000000000000000000000000000000081526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811660048301528781166024830152610bb860448301525f921690631698ee8290606401602060405180830381865afa1580156106a9573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906106cd91906116bc565b90506001600160a01b038116610706576107067f9c8787c000000000000000000000000000000000000000000000000000000000611028565b61071b6001600160a01b03871686308a611030565b6002546040517f095ea7b30000000000000000000000000000000000000000000000000000000081526001600160a01b039182166004820152602481018990529087169063095ea7b3906044016020604051808303815f875af1158015610784573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107a891906117e3565b506040517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606088811b821660208401527e0bb8000000000000000000000000000000000000000000000000000000000060348401527f0000000000000000000000000000000000000000000000000000000000000000901b1660378201525f90604b0160408051601f198184030181526080830182528083523060208401528282018b90525f6060840181905260025492517fb858183f000000000000000000000000000000000000000000000000000000008152919450916001600160a01b03169063b858183f906108a0908590600401611766565b6020604051808303815f875af11580156108bc573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108e091906117cc565b90505f6103e8600454836108f49190611704565b6108fe919061171b565b60035490915061093b906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081169116836110b2565b600354610975906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811691168361116f565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201525f907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa1580156109f2573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610a1691906117cc565b90508815610ac5576040517f2e1a7d4d000000000000000000000000000000000000000000000000000000008152600481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690632e1a7d4d906024015f604051808303815f87803b158015610a96575f5ffd5b505af1158015610aa8573d5f5f3e3d5ffd5b50610ac0925050506001600160a01b038b16826111a5565b610af9565b610af96001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168b8361116f565b604080518d8152602081018590526001600160a01b038c8116828401529151888316928e16917fcf6fb4bb8248e51cb4bad5294f240615b1d0f5560da60c639802d614431e8f19919081900360600190a3505050505050505050505050565b610b60611271565b610b695f6112b6565b565b610b73611271565b610b7c8161131d565b50565b610b87611271565b610b7c816113c1565b80610b9a81610ffb565b345f03610bca57610bca7f340dabef00000000000000000000000000000000000000000000000000000000611028565b6001546040517f1698ee820000000000000000000000000000000000000000000000000000000081526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811660048301528681166024830152610bb860448301525f921690631698ee8290606401602060405180830381865afa158015610c5b573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610c7f91906116bc565b90506001600160a01b038116610cb857610cb87f9c8787c000000000000000000000000000000000000000000000000000000000611028565b5f3490507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d0e30db0826040518263ffffffff1660e01b81526004015f604051808303818588803b158015610d15575f5ffd5b505af1158015610d27573d5f5f3e3d5ffd5b50505050505f6103e860045483610d3e9190611704565b610d48919061171b565b600354909150610d85906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081169116836110b2565b600354610dbf906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811691168361116f565b610dc98183611753565b600254909250610e06906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081169116846110b2565b6040517fffffffffffffffffffffffffffffffffffffffff0000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000606090811b821660208401527e0bb80000000000000000000000000000000000000000000000000000000000603484015289901b1660378201525f90604b0160408051601f198184030181526080830182528083526001600160a01b03808b1660208501528383018790525f6060850181905260025493517fb858183f00000000000000000000000000000000000000000000000000000000815292955092169063b858183f90610f00908590600401611766565b6020604051808303815f875af1158015610f1c573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610f4091906117cc565b9050856001600160a01b03168a6001600160a01b03167f0daf98ca968d02ea35519e9b431a9f4185e069631b0c16f2e351cca350e12af387848d6040516105ca9392919092835260208301919091526001600160a01b0316604082015260600190565b610fab611271565b6001600160a01b038116610ff2576040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081525f60048201526024015b60405180910390fd5b610b7c816112b6565b42811015610b7c57610b7c7fc7cdabac000000000000000000000000000000000000000000000000000000005b805f5260045ffd5b6040516001600160a01b0384811660248301528381166044830152606482018390526110ac9186918216906323b872dd906084015b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506114b8565b50505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f095ea7b300000000000000000000000000000000000000000000000000000000179052611131848261153d565b6110ac576040516001600160a01b0384811660248301525f604483015261116591869182169063095ea7b390606401611065565b6110ac84826114b8565b6040516001600160a01b038381166024830152604482018390526111a091859182169063a9059cbb90606401611065565b505050565b804710156111e8576040517fcf47918100000000000000000000000000000000000000000000000000000000815247600482015260248101829052604401610fe9565b5f826001600160a01b0316826040515f6040518083038185875af1925050503d805f8114611231576040519150601f19603f3d011682016040523d82523d5f602084013e611236565b606091505b50509050806111a0576040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f546001600160a01b03163314610b69576040517f118cdaa7000000000000000000000000000000000000000000000000000000008152336004820152602401610fe9565b5f80546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b805f0361134d5761134d7f340dabef00000000000000000000000000000000000000000000000000000000611028565b600454810361137f5761137f7f7fd217e300000000000000000000000000000000000000000000000000000000611028565b6004546040805183815260208101929092527f61312852de43725e4264e8d956247989130cee42a6a07bb5475ed12335609c7b910160405180910390a1600455565b6001600160a01b0381166113f8576113f87fe6c4247b00000000000000000000000000000000000000000000000000000000611028565b6003546001600160a01b0390811690821603611437576114377f7fd217e300000000000000000000000000000000000000000000000000000000611028565b600354604080516001600160a01b03808516825290921660208301527fa31a0871e96638141a6d14f91d9d806c9f760b3173a8c89cf8ebd42a5654692c910160405180910390a1600380547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b5f5f60205f8451602086015f885af1806114d7576040513d5f823e3d81fd5b50505f513d915081156114ee5780600114156114fb565b6001600160a01b0384163b155b156110ac576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b0385166004820152602401610fe9565b5f5f5f5f60205f8651602088015f8a5af192503d91505f51905082801561157c5750811561156e578060011461157c565b5f866001600160a01b03163b115b93505050505b92915050565b6001600160a01b0381168114610b7c575f5ffd5b5f5f5f5f608085870312156115af575f5ffd5b8435935060208501356115c181611588565b925060408501356115d181611588565b9396929550929360600135925050565b8015158114610b7c575f5ffd5b5f5f5f5f5f60a08688031215611602575f5ffd5b85359450602086013561161481611588565b9350604086013561162481611588565b92506060860135611634816115e1565b949793965091946080013592915050565b5f60208284031215611655575f5ffd5b5035919050565b5f6020828403121561166c575f5ffd5b813561167781611588565b9392505050565b5f5f5f60608486031215611690575f5ffd5b833561169b81611588565b925060208401356116ab81611588565b929592945050506040919091013590565b5f602082840312156116cc575f5ffd5b815161167781611588565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b8082028115828204841417611582576115826116d7565b5f8261174e577f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b500490565b81810381811115611582576115826116d7565b602081525f82516080602084015280518060a0850152806020830160c086015e5f60c082860101526001600160a01b036020860151166040850152604085015160608501526060850151608085015260c0601f19601f8301168501019250505092915050565b5f602082840312156117dc575f5ffd5b5051919050565b5f602082840312156117f3575f5ffd5b8151611677816115e156fea26469706673582212203cdabbd2b5ed0e44c37ddc35dea5aaeb73aa003fb0e7fe358f8edba886a3736264736f6c634300081c0033000000000000000000000000c11ef92901ab20505f780591faa60bf87f9b963a000000000000000000000000bb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c000000000000000000000000db1d10011ad0ff90774d0c6bb92e5c5c8b4461f7000000000000000000000000b971ef87ede563556b2ed4b1c0b0019111dd85d2000000000000000000000000c11ef92901ab20505f780591faa60bf87f9b963a000000000000000000000000000000000000000000000000000000000000000a