0 txs
0 calls
constructor
constructor(address _tellerV2, address _marketRegistry, address _collateralManager)
functions
allocatedRewards
viewfunction allocatedRewards(uint256) view returns (address allocator, address rewardTokenAddress, uint256 rewardTokenAmount, uint256 marketId, address requiredPrincipalTokenAddress, address requiredCollateralTokenAddress, uint256 minimumCollateralPerPrincipalAmount, uint256 rewardPerLoanPrincipalAmount, uint32 bidStartTimeMin, uint32 bidStartTimeMax, uint8 allocationStrategy)
getRewardTokenAmount
viewfunction getRewardTokenAmount(uint256 _allocationId) view returns (uint256)
rewardClaimedForBid
viewfunction rewardClaimedForBid(uint256, uint256) view returns (bool)
allocateRewards
nonpayablefunction allocateRewards(tuple _allocation) returns (uint256 allocationId_)
claimRewards
nonpayablefunction claimRewards(uint256 _allocationId, uint256 _bidId)
deallocateRewards
nonpayablefunction deallocateRewards(uint256 _allocationId, uint256 _tokenAmount)
increaseAllocationAmount
nonpayablefunction increaseAllocationAmount(uint256 _allocationId, uint256 _tokenAmount)
initialize
nonpayablefunction initialize()
updateAllocation
nonpayablefunction updateAllocation(uint256 _allocationId, uint256 _minimumCollateralPerPrincipalAmount, uint256 _rewardPerLoanPrincipalAmount, uint32 _bidStartTimeMin, uint32 _bidStartTimeMax)
events
ClaimedRewards
event ClaimedRewards(uint256 allocationId, uint256 bidId, address recipient, uint256 amount)
CreatedAllocation
event CreatedAllocation(uint256 allocationId, address allocator, uint256 marketId)
DecreasedAllocation
event DecreasedAllocation(uint256 allocationId, uint256 amount)
DeletedAllocation
event DeletedAllocation(uint256 allocationId)
IncreasedAllocation
event IncreasedAllocation(uint256 allocationId, uint256 amount)
Initialized
event Initialized(uint8 version)
UpdatedAllocation
event UpdatedAllocation(uint256 allocationId)
errors
No errors.
creation bytecode
0x60e06040523480156200001157600080fd5b5060405162001b3238038062001b3283398101604081905262000034916200006f565b6001600160a01b0392831660805290821660a0521660c052620000b9565b80516001600160a01b03811681146200006a57600080fd5b919050565b6000806000606084860312156200008557600080fd5b620000908462000052565b9250620000a06020850162000052565b9150620000b06040850162000052565b90509250925092565b60805160a05160c051611a4c620000e6600039600061042b0152600050506000610e750152611a4c6000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c80636f05bbdc116100665780636f05bbdc146101245780638129fc1c146101c8578063888b15a5146101d0578063abcc45e0146101f4578063b291ac4c1461020757600080fd5b80633997ec2c146100985780634cfb5beb146100ad578063594dd432146100f05780635cb22c5a14610103575b600080fd5b6100ab6100a6366004611479565b61021a565b005b6100db6100bb366004611479565b600360209081526000928352604080842090915290825290205460ff1681565b60405190151581526020015b60405180910390f35b6100ab6100fe366004611479565b610319565b61011661011136600461149b565b6107d6565b6040519081526020016100e7565b6101b16101323660046114b4565b60026020819052600091825260409091208054600182015492820154600383015460048401546005850154600686015460078701546008909701546001600160a01b0396871698871697959694959385169490921692909163ffffffff8082169164010000000081049091169068010000000000000000900460ff168b565b6040516100e79b9a999897969594939291906114e3565b6100ab6109e3565b6101166101de3660046114b4565b6000908152600260208190526040909120015490565b6100ab610202366004611585565b610aec565b6100ab610215366004611479565b610be6565b600082815260026020526040908190206001015490516323b872dd60e01b8152336004820152306024820152604481018390526001600160a01b03909116906323b872dd90606401602060405180830381600087803b15801561027c57600080fd5b505af1158015610290573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102b491906115db565b50600082815260026020819052604082200180548392906102d6908490611613565b909155505060408051838152602081018390527f6066faf685f9876a4e900441602eb0063cdc31b9241c2384019c1b72bf58f1e191015b60405180910390a15050565b6000828152600260209081526040808320848452600383528184208685529092529091205460ff161561038c5760405162461bcd60e51b81526020600482015260166024820152751c995dd85c9908185b1c9958591e4818db185a5b595960521b60448201526064015b60405180910390fd5b60008281526003602090815260408083208684529091528120805460ff191660011790556103b983610e1a565b600583015460a082015160088501549293506001600160a01b03909116916103f3919063ffffffff80821691640100000000900416610f73565b6001600160a01b038116156104c45760405163cd98536b60e01b8152600481018590526001600160a01b0382811660248301526000917f00000000000000000000000000000000000000000000000000000000000000009091169063cd98536b9060440160206040518083038186803b15801561046f57600080fd5b505afa158015610483573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104a7919061162b565b90506104c28282856060015186608001518860060154611075565b505b600483015460608301516001600160a01b039081169116146105405760405162461bcd60e51b815260206004820152602f60248201527f5072696e636970616c20746f6b656e2061646472657373206d69736d6174636860448201526e103337b91030b63637b1b0ba34b7b760891b6064820152608401610383565b600085815260026020526040908190206003015490830151146105a55760405162461bcd60e51b815260206004820181905260248201527f4d61726b65744964206d69736d6174636820666f7220616c6c6f636174696f6e6044820152606401610383565b600082606001516001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b1580156105e457600080fd5b505afa1580156105f8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061061c9190611644565b60ff169050600061064c8560080160089054906101000a900460ff168560e00151866000015187602001516111eb565b905060008460a001518560c001516106649190611667565b9050600061068286608001518363ffffffff16868a60070154611341565b90508660020154811115610697575060028601545b600081116106db5760405162461bcd60e51b81526020600482015260116024820152702737ba3434b733903a379031b630b4b69760791b6044820152606401610383565b6106e58982611374565b6000898152600260205260409081902060010154905163a9059cbb60e01b81526001600160a01b038581166004830152602482018490529091169063a9059cbb90604401602060405180830381600087803b15801561074357600080fd5b505af1158015610757573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061077b91906115db565b50604080518a8152602081018a90526001600160a01b038516818301526060810183905290517f9bcf4b7082743be9e48c040fa49881bdac9ba7ed4f12e71d8ff6c946da65c0649181900360800190a1505050505050505050565b60018054600091826107e78361168c565b909155509050336107fb60208401846116bc565b6001600160a01b0316146108515760405162461bcd60e51b815260206004820152601960248201527f496e76616c696420616c6c6f6361746f722061646472657373000000000000006044820152606401610383565b600061086360a08401608085016116bc565b6001600160a01b031614156108cb5760405162461bcd60e51b815260206004820152602860248201527f496e76616c6964207265717569726564207072696e636970616c20746f6b656e604482015267206164647265737360c01b6064820152608401610383565b6108db60408301602084016116bc565b604080516323b872dd60e01b81523360048201523060248201529084013560448201526001600160a01b0391909116906323b872dd90606401602060405180830381600087803b15801561092e57600080fd5b505af1158015610942573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061096691906115db565b50600081815260026020526040902082906109818282611764565b507f678866ebbf19eed1d9f95e0bfd63584f721eab8935f83844394f78873789a80d9050816109b360208501856116bc565b604080519283526001600160a01b03919091166020830152606085810135838301529051918290030190a1919050565b600054610100900460ff1615808015610a035750600054600160ff909116105b80610a1d5750303b158015610a1d575060005460ff166001145b610a805760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610383565b6000805460ff191660011790558015610aa3576000805461ff0019166101001790555b8015610ae9576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50565b600085815260026020526040902080546001600160a01b03163314610b6d5760405162461bcd60e51b815260206004820152603160248201527f4f6e6c792074686520616c6c6f6361746f722063616e2075706461746520616c6044820152703637b1b0ba34b7b7103932bbb0b932399760791b6064820152608401610383565b600681018590556007810184905560088101805463ffffffff8481166401000000000267ffffffffffffffff19909216908616171790556040517ffcd537d3fc9c6f64078c9c86412d6a64c37948df1bd043ecc7f9f581d7e8e24490610bd69088815260200190565b60405180910390a1505050505050565b6000828152600260205260409020546001600160a01b03163314610c5f5760405162461bcd60e51b815260206004820152602a60248201527f4f6e6c792074686520616c6c6f6361746f722063616e206465616c6c6f63617460448201526932903932bbb0b932399760b11b6064820152608401610383565b60008281526002602081905260409091200154811115610c8e5750600081815260026020819052604090912001545b610c988282611374565b6000828152600260205260409081902060010154905163a9059cbb60e01b8152336004820152602481018390526001600160a01b039091169063a9059cbb90604401602060405180830381600087803b158015610cf457600080fd5b505af1158015610d08573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d2c91906115db565b5060008281526002602081905260409091200154610de457600082815260026020819052604080832080546001600160a01b03199081168255600182018054821690559281018490556003810184905560048101805484169055600581018054909316909255600682018390556007820192909255600801805468ffffffffffffffffff19169055517f698179301d5c74d995c4597afa699d93a464ea03a6a2a9bfc11f0d0fd4c9cfd99061030d9084815260200190565b60408051838152602081018390527fdb6f83be148266f54cb6b67859eedb520ac995d0d6b670dcee19a3d5c6f1e47e910161030d565b610e5f6040805161010081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c081018290529060e082015290565b60405163e0d3d58d60e01b8152600481018390527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063e0d3d58d906024016101006040518083038186803b158015610ec057600080fd5b505afa158015610ed4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ef89190611859565b886020810160408201606083016080840160a0850160c0860160e08701886006811115610f2757610f276114cd565b6006811115610f3857610f386114cd565b905263ffffffff988916905297909616909652959093526001600160a01b039586169093525093909152928116909152919091169052919050565b63ffffffff82161580610f9157508163ffffffff168363ffffffff16115b610ff25760405162461bcd60e51b815260206004820152602c60248201527f4c6f616e20776173206163636570746564206265666f726520746865206d696e60448201526b1039ba30b93a103a34b6b29760a11b6064820152608401610383565b63ffffffff8116158061101057508063ffffffff168363ffffffff16105b6110705760405162461bcd60e51b815260206004820152602b60248201527f4c6f616e2077617320616363657074656420616674657220746865206d61782060448201526a39ba30b93a103a34b6b29760a91b6064820152608401610383565b505050565b6000836001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b1580156110b057600080fd5b505afa1580156110c4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110e89190611644565b60ff1690506000866001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b15801561112857600080fd5b505afa15801561113c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111609190611644565b60ff16905060006111738584848761139e565b9050808710156111e15760405162461bcd60e51b815260206004820152603360248201527f4c6f616e20646f6573206e6f74206d656574206d696e696d756d20636f6c6c616044820152723a32b930b634bd30ba34b7b7103930ba34b79760691b6064820152608401610383565b5050505050505050565b600080856001811115611200576112006114cd565b141561126e57600484600681111561121a5761121a6114cd565b146112675760405162461bcd60e51b815260206004820152601b60248201527f496e76616c69642062696420737461746520666f72206c6f616e2e00000000006044820152606401610383565b5081611339565b6001856001811115611282576112826114cd565b14156112f157600384600681111561129c5761129c6114cd565b10156112ea5760405162461bcd60e51b815260206004820152601b60248201527f496e76616c69642062696420737461746520666f72206c6f616e2e00000000006044820152606401610383565b5080611339565b60405162461bcd60e51b815260206004820152601b60248201527f556e6b6e6f776e20616c6c6f636174696f6e20737472617465677900000000006044820152606401610383565b949350505050565b600080611359868461135487600a6119dd565b6113c3565b905061136a81866301e133806113c3565b9695505050505050565b600082815260026020819052604082200180548392906113959084906119e9565b90915550505050565b60006113ba85836113af8688611613565b61135490600a6119dd565b95945050505050565b6000808060001985870985870292508281108382030391505080600014156113fe578382816113f4576113f4611a00565b0492505050611472565b80841161140a57600080fd5b600084868809851960019081018716968790049682860381900495909211909303600082900391909104909201919091029190911760038402600290811880860282030280860282030280860282030280860282030280860282030280860290910302029150505b9392505050565b6000806040838503121561148c57600080fd5b50508035926020909101359150565b600061016082840312156114ae57600080fd5b50919050565b6000602082840312156114c657600080fd5b5035919050565b634e487b7160e01b600052602160045260246000fd5b6001600160a01b038c811682528b81166020830152604082018b9052606082018a90528881166080830152871660a082015260c0810186905260e0810185905263ffffffff848116610100830152831661012082015261016081016002831061155c57634e487b7160e01b600052602160045260246000fd5b826101408301529c9b505050505050505050505050565b63ffffffff81168114610ae957600080fd5b600080600080600060a0868803121561159d57600080fd5b85359450602086013593506040860135925060608601356115bd81611573565b915060808601356115cd81611573565b809150509295509295909350565b6000602082840312156115ed57600080fd5b8151801515811461147257600080fd5b634e487b7160e01b600052601160045260246000fd5b60008219821115611626576116266115fd565b500190565b60006020828403121561163d57600080fd5b5051919050565b60006020828403121561165657600080fd5b815160ff8116811461147257600080fd5b600063ffffffff83811690831681811015611684576116846115fd565b039392505050565b60006000198214156116a0576116a06115fd565b5060010190565b6001600160a01b0381168114610ae957600080fd5b6000602082840312156116ce57600080fd5b8135611472816116a7565b600081356116e6816116a7565b92915050565b80546001600160a01b0319166001600160a01b0392909216919091179055565b600081356116e681611573565b60008135600281106116e657600080fd5b6002821061174857634e487b7160e01b600052602160045260246000fd5b805460ff60401b8360401b1660ff60401b198216178255505050565b611776611770836116d9565b826116ec565b61178e611785602084016116d9565b600183016116ec565b60408201356002820155606082013560038201556117ba6117b1608084016116d9565b600483016116ec565b6117d26117c960a084016116d9565b600583016116ec565b60c0820135600682015560e08201356007820155600881016118116117fa610100850161170c565b825463ffffffff191663ffffffff91909116178255565b611843611821610120850161170c565b825467ffffffff00000000191660209190911b67ffffffff0000000016178255565b6110706118536101408501611719565b8261172a565b600080600080600080600080610100898b03121561187657600080fd5b8851611881816116a7565b60208a0151909850611892816116a7565b60408a015160608b015191985096506118aa816116a7565b60808a015160a08b015191965094506118c281611573565b60c08a01519093506118d381611573565b60e08a0151909250600781106118e857600080fd5b809150509295985092959890939650565b600181815b8085111561193457816000190482111561191a5761191a6115fd565b8085161561192757918102915b93841c93908002906118fe565b509250929050565b60008261194b575060016116e6565b81611958575060006116e6565b816001811461196e576002811461197857611994565b60019150506116e6565b60ff841115611989576119896115fd565b50506001821b6116e6565b5060208310610133831016604e8410600b84101617156119b7575081810a6116e6565b6119c183836118f9565b80600019048211156119d5576119d56115fd565b029392505050565b6000611472838361193c565b6000828210156119fb576119fb6115fd565b500390565b634e487b7160e01b600052601260045260246000fdfea26469706673582212202afd277896ffeebea66317019e90fd9a4751d2b6e6d76a64610cd64f50a117cb64736f6c634300080900330000000000000000000000005cfd3aed08a444be32839bd911ebecd6888611640000000000000000000000002bd9697bf0ab44be5ca698fb5787d8f13ca48ffc00000000000000000000000071b04a8569914bcb99d5f95644cf6b089c826024