3 txs
6 calls
constructor
constructor(address _uniswapV3Router, address _weth, address _treasury)
functions
ADMIN_ROLE
viewfunction ADMIN_ROLE() view returns (bytes32)
DEFAULT_ADMIN_ROLE
viewfunction DEFAULT_ADMIN_ROLE() view returns (bytes32)
getRoleAdmin
viewfunction getRoleAdmin(bytes32 role) view returns (bytes32)
hasRole
viewfunction hasRole(bytes32 role, address account) view returns (bool)
OPERATOR_ROLE
viewfunction OPERATOR_ROLE() view returns (bytes32)
paused
viewfunction paused() view returns (bool)
supportsInterface
viewfunction supportsInterface(bytes4 interfaceId) view returns (bool)
TREASURY_FEE
viewfunction TREASURY_FEE() view returns (uint256)
treasury
viewfunction treasury() view returns (address)
uniswapV3Router
viewfunction uniswapV3Router() view returns (address)
weth
viewfunction weth() view returns (address)
executeSwap
nonpayablefunction executeSwap(address tokenIn, uint256 amountIn, uint24 fee, uint256 amountOutMinimum, uint160 sqrtPriceLimitX96)
executeSwapWithPermit
nonpayablefunction executeSwapWithPermit(address tokenIn, uint256 amountIn, uint24 fee, uint256 amountOutMinimum, uint160 sqrtPriceLimitX96, uint256 permitDeadline, uint8 v, bytes32 r, bytes32 s)
grantRole
nonpayablefunction grantRole(bytes32 role, address account)
pause
nonpayablefunction pause()
renounceRole
nonpayablefunction renounceRole(bytes32 role, address callerConfirmation)
revokeRole
nonpayablefunction revokeRole(bytes32 role, address account)
setTreasury
nonpayablefunction setTreasury(address _newTreasury)
unpause
nonpayablefunction unpause()
events
Paused
event Paused(address account)
RoleAdminChanged
event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole)
RoleGranted
event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender)
RoleRevoked
event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender)
SwapExecuted
event SwapExecuted(address indexed tokenIn, uint256 amountIn, uint256 amountOut)
TreasuryFeeTransferred
event TreasuryFeeTransferred(uint256 amount)
TreasuryUpdated
event TreasuryUpdated(address indexed newTreasury)
Unpaused
event Unpaused(address account)
errors
AccessControlBadConfirmation
error AccessControlBadConfirmation()
AccessControlUnauthorizedAccount
error AccessControlUnauthorizedAccount(address account, bytes32 neededRole)
EnforcedPause
error EnforcedPause()
ExpectedPause
error ExpectedPause()
ReentrancyGuardReentrantCall
error ReentrancyGuardReentrantCall()
SafeERC20FailedOperation
error SafeERC20FailedOperation(address token)
creation bytecode
0x60c06040523480156200001157600080fd5b50604051620014b2380380620014b28339810160408190526200003491620002bd565b600180556002805460ff191690556001600160a01b0383166200009e5760405162461bcd60e51b815260206004820152601660248201527f496e76616c696420726f7574657220616464726573730000000000000000000060448201526064015b60405180910390fd5b6001600160a01b038216620000f65760405162461bcd60e51b815260206004820152601460248201527f496e76616c696420574554482061646472657373000000000000000000000000604482015260640162000095565b6001600160a01b0381166200014e5760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420747265617375727920616464726573730000000000000000604482015260640162000095565b6001600160a01b0380841660805282811660a0526002805491831661010002610100600160a81b03199092169190911790556200018d600033620001f1565b50620001ba7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177533620001f1565b50620001e77f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b92933620001f1565b5050505062000307565b6000828152602081815260408083206001600160a01b038516845290915281205460ff1662000296576000838152602081815260408083206001600160a01b03861684529091529020805460ff191660011790556200024d3390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45060016200029a565b5060005b92915050565b80516001600160a01b0381168114620002b857600080fd5b919050565b600080600060608486031215620002d357600080fd5b620002de84620002a0565b9250620002ee60208501620002a0565b9150620002fe60408501620002a0565b90509250925092565b60805160a051611169620003496000396000818161024c01528181610ab00152610bd80152600081816101a901528181610a1a0152610b5201526111696000f3fe6080604052600436106101185760003560e01c806361d027b3116100a0578063a217fddf11610064578063a217fddf14610337578063d547741f1461034c578063da0d0d7b1461036c578063f0f442601461038c578063f5b541a6146103ac57600080fd5b806361d027b3146102a657806375b238fc146102cb5780638456cb59146102ed5780638ce1a4831461030257806391d148541461031757600080fd5b806336568abe116100e757806336568abe146102055780633f4ba83a146102255780633fc8cef31461023a5780635b96ee6f1461026e5780635c975abb1461028e57600080fd5b806301ffc9a714610124578063248a9ca3146101595780632c76d7a6146101975780632f2ff15d146101e357600080fd5b3661011f57005b600080fd5b34801561013057600080fd5b5061014461013f366004610ec2565b6103e0565b60405190151581526020015b60405180910390f35b34801561016557600080fd5b50610189610174366004610ef3565b60009081526020819052604090206001015490565b604051908152602001610150565b3480156101a357600080fd5b506101cb7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610150565b3480156101ef57600080fd5b506102036101fe366004610f21565b610417565b005b34801561021157600080fd5b50610203610220366004610f21565b610442565b34801561023157600080fd5b5061020361047a565b34801561024657600080fd5b506101cb7f000000000000000000000000000000000000000000000000000000000000000081565b34801561027a57600080fd5b50610203610289366004610f69565b61049d565b34801561029a57600080fd5b5060025460ff16610144565b3480156102b257600080fd5b506002546101cb9061010090046001600160a01b031681565b3480156102d757600080fd5b5061018960008051602061111483398151915281565b3480156102f957600080fd5b50610203610620565b34801561030e57600080fd5b50610189606481565b34801561032357600080fd5b50610144610332366004610f21565b610640565b34801561034357600080fd5b50610189600081565b34801561035857600080fd5b50610203610367366004610f21565b610669565b34801561037857600080fd5b50610203610387366004610ffc565b61068e565b34801561039857600080fd5b506102036103a7366004611059565b610784565b3480156103b857600080fd5b506101897f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b92981565b60006001600160e01b03198216637965db0b60e01b148061041157506301ffc9a760e01b6001600160e01b03198316145b92915050565b60008281526020819052604090206001015461043281610845565b61043c838361084f565b50505050565b6001600160a01b038116331461046b5760405163334bd91960e11b815260040160405180910390fd5b61047582826108e1565b505050565b60008051602061111483398151915261049281610845565b61049a61094c565b50565b6104a561099e565b6104ad6109c4565b7f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b9296104d781610845565b6001600160a01b038a1661052a5760405162461bcd60e51b8152602060048201526015602482015274496e76616c696420746f6b656e206164647265737360581b60448201526064015b60405180910390fd5b6000891161057a5760405162461bcd60e51b815260206004820152601d60248201527f416d6f756e74206d7573742062652067726561746572207468616e20300000006044820152606401610521565b60405163d505accf60e01b8152336004820152306024820152604481018a90526064810186905260ff8516608482015260a4810184905260c481018390526001600160a01b038b169063d505accf9060e401600060405180830381600087803b1580156105e657600080fd5b505af11580156105fa573d6000803e3d6000fd5b5050505061060b8a8a8a8a8a6109ee565b5061061560018055565b505050505050505050565b60008051602061111483398151915261063881610845565b61049a610d5f565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b60008281526020819052604090206001015461068481610845565b61043c83836108e1565b61069661099e565b61069e6109c4565b7f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b9296106c881610845565b6001600160a01b0386166107165760405162461bcd60e51b8152602060048201526015602482015274496e76616c696420746f6b656e206164647265737360581b6044820152606401610521565b600085116107665760405162461bcd60e51b815260206004820152601d60248201527f416d6f756e74206d7573742062652067726561746572207468616e20300000006044820152606401610521565b61077386868686866109ee565b5061077d60018055565b5050505050565b60008051602061111483398151915261079c81610845565b6001600160a01b0382166107f25760405162461bcd60e51b815260206004820152601860248201527f496e76616c6964207472656173757279206164647265737300000000000000006044820152606401610521565b60028054610100600160a81b0319166101006001600160a01b038516908102919091179091556040517f7dae230f18360d76a040c81f050aa14eb9d6dc7901b20fc5d855e2a20fe814d190600090a25050565b61049a8133610d9c565b600061085b8383610640565b6108d9576000838152602081815260408083206001600160a01b03861684529091529020805460ff191660011790556108913390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a4506001610411565b506000610411565b60006108ed8383610640565b156108d9576000838152602081815260408083206001600160a01b0386168085529252808320805460ff1916905551339286917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a4506001610411565b610954610dd9565b6002805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b60025460ff16156109c25760405163d93c066560e01b815260040160405180910390fd5b565b6002600154036109e757604051633ee5aeb560e01b815260040160405180910390fd5b6002600155565b610a036001600160a01b038616333087610dfc565b60405163095ea7b360e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811660048301526024820186905286169063095ea7b3906044016020604051808303816000875af1158015610a72573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a969190611076565b506040805160e0810182526001600160a01b0387811682527f000000000000000000000000000000000000000000000000000000000000000081166020830190815262ffffff8781168486019081523060608601908152608086018b815260a087018a815289871660c0890190815298516304e45aaf60e01b8152885188166004820152955187166024870152925190931660448501525184166064840152905160848301525160a48201529251811660c484015290916000917f000000000000000000000000000000000000000000000000000000000000000016906304e45aaf9060e4016020604051808303816000875af1158015610b9b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bbf9190611098565b604051632e1a7d4d60e01b8152600481018290529091507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690632e1a7d4d90602401600060405180830381600087803b158015610c2457600080fd5b505af1158015610c38573d6000803e3d6000fd5b505050506000612710606483610c4e91906110c7565b610c5891906110de565b90508015610cd3576002546040516101009091046001600160a01b0316906108fc8315029083906000818181858888f19350505050158015610c9e573d6000803e3d6000fd5b506040518181527fe4d1eaf19a6b8737a45cdcb0fb58e67257edb14c3a6208629044ee41dcc9417c9060200160405180910390a15b6000610cdf8284611100565b604051909150339082156108fc029083906000818181858888f19350505050158015610d0f573d6000803e3d6000fd5b5060408051898152602081018590526001600160a01b038b16917f2d043ce009ff53fd444b0f4f5ff4c3f4ee293265203f77f156eeb33b595dfc4f910160405180910390a2505050505050505050565b610d6761099e565b6002805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586109813390565b610da68282610640565b610dd55760405163e2517d3f60e01b81526001600160a01b038216600482015260248101839052604401610521565b5050565b60025460ff166109c257604051638dfc202b60e01b815260040160405180910390fd5b604080516001600160a01b038581166024830152841660448201526064808201849052825180830390910181526084909101909152602080820180516001600160e01b03166323b872dd60e01b178152825161043c938893909260009283929183919082885af180610e74576040513d6000823e3d81fd5b50506000513d91508115610e8c578060011415610e99565b6001600160a01b0384163b155b1561043c57604051635274afe760e01b81526001600160a01b0385166004820152602401610521565b600060208284031215610ed457600080fd5b81356001600160e01b031981168114610eec57600080fd5b9392505050565b600060208284031215610f0557600080fd5b5035919050565b6001600160a01b038116811461049a57600080fd5b60008060408385031215610f3457600080fd5b823591506020830135610f4681610f0c565b809150509250929050565b803562ffffff81168114610f6457600080fd5b919050565b60008060008060008060008060006101208a8c031215610f8857600080fd5b8935610f9381610f0c565b985060208a01359750610fa860408b01610f51565b965060608a0135955060808a0135610fbf81610f0c565b945060a08a0135935060c08a013560ff81168114610fdc57600080fd5b8093505060e08a013591506101008a013590509295985092959850929598565b600080600080600060a0868803121561101457600080fd5b853561101f81610f0c565b94506020860135935061103460408701610f51565b925060608601359150608086013561104b81610f0c565b809150509295509295909350565b60006020828403121561106b57600080fd5b8135610eec81610f0c565b60006020828403121561108857600080fd5b81518015158114610eec57600080fd5b6000602082840312156110aa57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b8082028115828204841417610411576104116110b1565b6000826110fb57634e487b7160e01b600052601260045260246000fd5b500490565b81810381811115610411576104116110b156fea49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775a26469706673582212207d3c617d3e8c2cac812401865a1cff661ef27a855cd0ae0a10a906e30cc555e564736f6c634300081400330000000000000000000000002626664c2603336e57b271c5c0b26f421741e4810000000000000000000000004200000000000000000000000000000000000006000000000000000000000000274e1e9fd4356a6564fd95e2ba5242f6e64d844d