1 tx
1.6k calls
constructor
constructor(address _token)
functions
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)
MARKET_MANAGER_ROLE
viewfunction MARKET_MANAGER_ROLE() view returns (bytes32)
OPERATOR_ROLE
viewfunction OPERATOR_ROLE() view returns (bytes32)
supportsInterface
viewfunction supportsInterface(bytes4 interfaceId) view returns (bool)
token
viewfunction token() view returns (address)
allocate
nonpayablefunction allocate(address to, uint128 amount)
deallocate
nonpayablefunction deallocate(address from, uint128 amount)
grantRole
nonpayablefunction grantRole(bytes32 role, address account)
renounceRole
nonpayablefunction renounceRole(bytes32 role, address callerConfirmation)
rescueERC20
nonpayablefunction rescueERC20(address rescueToken, uint128 amount, address to)
revokeRole
nonpayablefunction revokeRole(bytes32 role, address account)
withdraw
nonpayablefunction withdraw(uint128 amount, address to)
events
ERC20Rescued
event ERC20Rescued(address indexed token, uint128 amount, address indexed to)
LiquidityAllocated
event LiquidityAllocated(address indexed market, uint128 amount)
LiquidityDeallocated
event LiquidityDeallocated(address indexed market, uint128 amount)
LiquidityDeposited
event LiquidityDeposited(address indexed provider, uint128 amount)
LiquidityWithdrawn
event LiquidityWithdrawn(address indexed provider, uint128 amount)
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)
errors
AccessControlBadConfirmation
error AccessControlBadConfirmation()
AccessControlUnauthorizedAccount
error AccessControlUnauthorizedAccount(address account, bytes32 neededRole)
AmountMustBeGreaterThanZero
error AmountMustBeGreaterThanZero()
InsufficientBalance
error InsufficientBalance()
SafeERC20FailedOperation
error SafeERC20FailedOperation(address token)
ZeroAddress
error ZeroAddress()
creation bytecode
0x60a060405234801562000010575f80fd5b5060405162000ed738038062000ed78339810160408190526200003391620001df565b6001600160a01b0381166200005b5760405163d92e233d60e01b815260040160405180910390fd5b6001600160a01b038116608052620000745f33620000e9565b506200008f5f8051602062000eb783398151915233620000e9565b50620000bc7f959ec338079b71742207829b3534c23a2ddd8bcc180652a0ea6677af748b5fed5f62000195565b620000d65f8051602062000eb78339815191525f62000195565b620000e25f8062000195565b506200020e565b5f828152602081815260408083206001600160a01b038516845290915281205460ff166200018c575f838152602081815260408083206001600160a01b03861684529091529020805460ff19166001179055620001433390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45060016200018f565b505f5b92915050565b5f82815260208190526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b5f60208284031215620001f0575f80fd5b81516001600160a01b038116811462000207575f80fd5b9392505050565b608051610c66620002515f395f8181610222015281816102b101528181610426015281816104cd015281816106630152818161070a01526108290152610c665ff3fe608060405234801561000f575f80fd5b50600436106100e5575f3560e01c806391d1485411610088578063d547741f11610063578063d547741f146101e3578063f5b541a6146101f6578063fc0c546a1461021d578063ff972d081461025c575f80fd5b806391d14854146101b6578063a217fddf146101c9578063d02ff67d146101d0575f80fd5b8063248a9ca3116100c3578063248a9ca3146101395780632f2ff15d1461016957806336568abe1461017c5780633ade20db1461018f575f80fd5b806301ffc9a7146100e957806309025eb6146101115780631d9b078314610126575b5f80fd5b6100fc6100f7366004610ae9565b61026f565b60405190151581526020015b60405180910390f35b61012461011f366004610b48565b6102a5565b005b610124610134366004610b88565b610397565b61015b610147366004610bb9565b5f9081526020819052604090206001015490565b604051908152602001610108565b610124610177366004610bd0565b61054a565b61012461018a366004610bd0565b610574565b61015b7f959ec338079b71742207829b3534c23a2ddd8bcc180652a0ea6677af748b5fed81565b6100fc6101c4366004610bd0565b6105ac565b61015b5f81565b6101246101de366004610bf1565b6105d4565b6101246101f1366004610bd0565b61077e565b61015b7f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b92981565b6102447f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610108565b61012461026a366004610bf1565b6107a2565b5f6001600160e01b03198216637965db0b60e01b148061029f57506301ffc9a760e01b6001600160e01b03198316145b92915050565b5f6102af8161089e565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316846001600160a01b0316036103015760405163d92e233d60e01b815260040160405180910390fd5b6001600160a01b0382166103285760405163d92e233d60e01b815260040160405180910390fd5b6103456001600160a01b038516836001600160801b0386166108ab565b6040516001600160801b03841681526001600160a01b0380841691908616907fef54c42d57b6d749bbe942c243b7dd3b0140ff0c466d021430015f88d9389f9a9060200160405180910390a350505050565b7f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b9296103c18161089e565b6001600160a01b0382166103e85760405163d92e233d60e01b815260040160405180910390fd5b826001600160801b03165f0361041157604051635e85ae7360e01b815260040160405180910390fd5b6040516370a0823160e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015610473573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906104979190610c19565b836001600160801b031611156104c057604051631e9acf1760e31b815260040160405180910390fd5b6104fd6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016836001600160801b0386166108ab565b6040516001600160801b03841681526001600160a01b038316907f1a2573b0306bd830b2c5b5ccf886e23e3162bf34a60fb2707aeda3e07e1ddec6906020015b60405180910390a2505050565b5f828152602081905260409020600101546105648161089e565b61056e838361090a565b50505050565b6001600160a01b038116331461059d5760405163334bd91960e11b815260040160405180910390fd5b6105a78282610999565b505050565b5f918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b7f959ec338079b71742207829b3534c23a2ddd8bcc180652a0ea6677af748b5fed6105fe8161089e565b6001600160a01b0383166106255760405163d92e233d60e01b815260040160405180910390fd5b816001600160801b03165f0361064e57604051635e85ae7360e01b815260040160405180910390fd5b6040516370a0823160e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa1580156106b0573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906106d49190610c19565b826001600160801b031611156106fd57604051631e9acf1760e31b815260040160405180910390fd5b61073a6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016846001600160801b0385166108ab565b6040516001600160801b03831681526001600160a01b038416907f5511a3e0ed8ceab5e7153b44580af837a46c6760e2a01436e3788023a45a571d9060200161053d565b5f828152602081905260409020600101546107988161089e565b61056e8383610999565b7f959ec338079b71742207829b3534c23a2ddd8bcc180652a0ea6677af748b5fed6107cc8161089e565b6001600160a01b0383166107f35760405163d92e233d60e01b815260040160405180910390fd5b816001600160801b03165f0361081c57604051635e85ae7360e01b815260040160405180910390fd5b61085a6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001684306001600160801b038616610a02565b6040516001600160801b03831681526001600160a01b038416907f2246c773aec73ea3a9601f6d32029f4cec1e86f7b3002901083e966e4cb7d5459060200161053d565b6108a88133610a3b565b50565b6040516001600160a01b038381166024830152604482018390526105a791859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180516001600160e01b038381831617835250505050610a7d565b5f61091583836105ac565b610992575f838152602081815260408083206001600160a01b03861684529091529020805460ff1916600117905561094a3390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a450600161029f565b505f61029f565b5f6109a483836105ac565b15610992575f838152602081815260408083206001600160a01b0386168085529252808320805460ff1916905551339286917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a450600161029f565b6040516001600160a01b03848116602483015283811660448301526064820183905261056e9186918216906323b872dd906084016108d8565b610a4582826105ac565b610a795760405163e2517d3f60e01b81526001600160a01b0382166004820152602481018390526044015b60405180910390fd5b5050565b5f8060205f8451602086015f885af180610a9c576040513d5f823e3d81fd5b50505f513d91508115610ab3578060011415610ac0565b6001600160a01b0384163b155b1561056e57604051635274afe760e01b81526001600160a01b0385166004820152602401610a70565b5f60208284031215610af9575f80fd5b81356001600160e01b031981168114610b10575f80fd5b9392505050565b80356001600160a01b0381168114610b2d575f80fd5b919050565b80356001600160801b0381168114610b2d575f80fd5b5f805f60608486031215610b5a575f80fd5b610b6384610b17565b9250610b7160208501610b32565b9150610b7f60408501610b17565b90509250925092565b5f8060408385031215610b99575f80fd5b610ba283610b32565b9150610bb060208401610b17565b90509250929050565b5f60208284031215610bc9575f80fd5b5035919050565b5f8060408385031215610be1575f80fd5b82359150610bb060208401610b17565b5f8060408385031215610c02575f80fd5b610c0b83610b17565b9150610bb060208401610b32565b5f60208284031215610c29575f80fd5b505191905056fea264697066735822122003f84ed5431c6b87400bf782451813da3b92c4fc907341a613bffb46eca4cc7c64736f6c6343000814003397667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b929000000000000000000000000833589fcd6edb6e08f4c7c32d4f71b54bda02913