1 tx
2 calls
constructor
constructor(address admin, address manager, address controller)
functions
CONTROLLER_ROLE
viewfunction CONTROLLER_ROLE() view returns (bytes32)
DEFAULT_ADMIN_ROLE
viewfunction DEFAULT_ADMIN_ROLE() view returns (bytes32)
exclusivity
viewfunction exclusivity(uint256 poolId, uint256 layer, uint256 strategyId) view returns (uint8)
getAllStrategiesForPool
viewfunction getAllStrategiesForPool(uint256 poolId) view returns (uint256[])
getLayerStrategies
viewfunction getLayerStrategies(uint256 poolId, uint8 layerId) view returns (uint256[])
getPool
viewfunction getPool(uint256 poolId) view returns (tuple)
getPoolLayers
viewfunction getPoolLayers(uint256 poolId) view returns (uint256[])
getPools
viewfunction getPools(uint256[] poolIds) view returns (tuple[] result)
getPoolsByDateRange
viewfunction getPoolsByDateRange(uint16 _fromDay, uint16 _toDay) view returns (uint256[] poolIds)
getPoolsCount
viewfunction getPoolsCount() view returns (uint256)
getRoleAdmin
viewfunction getRoleAdmin(bytes32 role) view returns (bytes32)
getStrategiesFromLayer
viewfunction getStrategiesFromLayer(uint256 poolId, uint256 layerId) view returns (uint256[] strategyIds, uint8[] _exclusivity)
getStrategyExclusivity
viewfunction getStrategyExclusivity(uint256 poolId, uint256 layerId, uint256 strategyId) view returns (uint8)
getStrategyLayer
viewfunction getStrategyLayer(uint256 poolId, uint256 strategyId) view returns (uint256)
hasAnnounced
viewfunction hasAnnounced(uint256 poolId) view returns (bool)
hasExclusiveStrategies
viewfunction hasExclusiveStrategies(uint256 poolId, uint256 layer) view returns (bool)
hasLayer
viewfunction hasLayer(uint256 poolId, uint256 layer) view returns (bool)
hasRole
viewfunction hasRole(bytes32 role, address account) view returns (bool)
hasStarted
viewfunction hasStarted(uint256 poolId) view returns (bool)
isPoolActive
viewfunction isPoolActive(uint256 poolId) view returns (bool)
isPoolCalculated
viewfunction isPoolCalculated(uint256 poolId) view returns (bool)
isPoolEnded
viewfunction isPoolEnded(uint256 poolId) view returns (bool)
MANAGER_ROLE
viewfunction MANAGER_ROLE() view returns (bytes32)
nextPoolId
viewfunction nextPoolId() view returns (uint256)
poolLiveWeight
viewfunction poolLiveWeight(uint256 poolId) view returns (uint256)
pools
viewfunction pools(uint256 poolId) view returns (bool hasAnnounced, bool toSkipInUI, uint16 startDay, uint16 endDay, uint256 totalPoolWeight, uint256 parentPoolId)
strategyLayer
viewfunction strategyLayer(uint256 poolId, uint256 strategyId) view returns (uint256)
supportsInterface
viewfunction supportsInterface(bytes4 interfaceId) view returns (bool)
announcePool
nonpayablefunction announcePool(uint256 poolId)
assignStrategyToPool
nonpayablefunction assignStrategyToPool(uint256 poolId, uint256 layer, uint256 strategyId, uint8 strategyExclusivity)
grantRole
nonpayablefunction grantRole(bytes32 role, address account)
markStrategyAsIgnored
nonpayablefunction markStrategyAsIgnored(uint256 poolId, uint256 layer, uint256 strategyId)
removeLayer
nonpayablefunction removeLayer(uint256 poolId, uint8 layer)
removeStrategyFromPool
nonpayablefunction removeStrategyFromPool(uint256 poolId, uint256 layer, uint256 strategyId)
renounceRole
nonpayablefunction renounceRole(bytes32 role, address callerConfirmation)
revokeRole
nonpayablefunction revokeRole(bytes32 role, address account)
setPoolLiveWeight
nonpayablefunction setPoolLiveWeight(uint256 poolId, uint256 liveWeight)
setPoolTotalStakeWeight
nonpayablefunction setPoolTotalStakeWeight(uint256 poolId, uint256 totalPoolWeight)
unmarkStrategyAsIgnored
nonpayablefunction unmarkStrategyAsIgnored(uint256 poolId, uint256 layer, uint256 strategyId)
upsertPool
nonpayablefunction upsertPool(uint256 _poolId, uint16 _startDay, uint16 _endDay, uint256 _parentPoolId) returns (uint256 poolId)
events
AnnouncePool
event AnnouncePool(uint256 indexed poolId, uint16 startDay, uint16 endDay)
PoolUpserted
event PoolUpserted(uint256 indexed poolId, uint16 startDay, uint16 endDay, uint256 totalPoolWeight, uint256 indexed parentPoolId)
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)
StrategyAddedToLayer
event StrategyAddedToLayer(uint256 poolId, uint256 layer, uint256 strategyId)
StrategyRemovedFromLayer
event StrategyRemovedFromLayer(uint256 indexed poolId, uint256 layer, uint256 strategyId)
errors
AccessControlBadConfirmation
error AccessControlBadConfirmation()
AccessControlUnauthorizedAccount
error AccessControlUnauthorizedAccount(address account, bytes32 neededRole)
InvalidDates
error InvalidDates()
ParentPoolIsSelf
error ParentPoolIsSelf()
PoolAlreadyAnnounced
error PoolAlreadyAnnounced()
PoolAlreadyCalculated
error PoolAlreadyCalculated()
PoolDoesNotExist
error PoolDoesNotExist(uint256 poolId)
PoolNotEnded
error PoolNotEnded()
creation bytecode
0x608060405234801561000f575f5ffd5b50604051611e55380380611e5583398101604081905261002e91610160565b6100385f8461009c565b506100637f241ecf16d79d0f8dbfb92cbc07fe17840425976cf0667f022fe9877caa831b088361009c565b5061008e7f7b765e0e932d348852a6f810bfa1ab891e259123f02db8cdcde614c5702233578261009c565b505060018055506101a09050565b5f828152602081815260408083206001600160a01b038516845290915281205460ff1661013c575f838152602081815260408083206001600160a01b03861684529091529020805460ff191660011790556100f43390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a450600161013f565b505f5b92915050565b80516001600160a01b038116811461015b575f5ffd5b919050565b5f5f5f60608486031215610172575f5ffd5b61017b84610145565b925061018960208501610145565b915061019760408501610145565b90509250925092565b611ca8806101ad5f395ff3fe608060405234801561000f575f5ffd5b506004361061023f575f3560e01c806384ee807511610135578063b3106faf116100b4578063d547741f11610079578063d547741f14610644578063dc23f1f114610657578063ec87621c1461066a578063ed4317ad1461067e578063f8b7317c14610691575f5ffd5b8063b3106faf146105b8578063b4ac6860146105cb578063bbbaf8c8146105d3578063c6ff181b146105e6578063cde4505c14610610575f5ffd5b806391d14854116100fa57806391d14854146104c2578063979d0609146104d55780639803963f14610515578063a217fddf14610528578063ac4afa381461052f575f5ffd5b806384ee807514610449578063873f69981461045c5780638acf3b051461046f5780638b9198af146104825780638f200697146104af575f5ffd5b80632a17cb18116101c15780633e22ad37116101865780633e22ad37146103dc578063413d7da4146103ef57806351f41c091461040257806365439db6146104155780636b53e2c914610436575f5ffd5b80632a17cb18146103705780632a40fd20146103835780632f2ff15d146103a357806331365d66146103b657806336568abe146103c9575f5ffd5b806318e561311161020757806318e56131146102e8578063194418cb146102f1578063248a9ca31461031b57806325781f141461033d5780632952dde814610350575f5ffd5b806301ffc9a714610243578063068bcd8d1461026b578063092c5b3b1461028b5780630d899374146102c05780630db484d4146102d3575b5f5ffd5b6102566102513660046117b0565b6106b0565b60405190151581526020015b60405180910390f35b61027e6102793660046117d7565b6106e6565b6040516102629190611834565b6102b27f7b765e0e932d348852a6f810bfa1ab891e259123f02db8cdcde614c57022335781565b604051908152602001610262565b6102566102ce3660046117d7565b6107eb565b6102e66102e1366004611842565b6107f5565b005b6102b260015481565b6102b26102ff366004611842565b5f91825260096020908152604080842092845291905290205490565b6102b26103293660046117d7565b5f9081526020819052604090206001015490565b6102b261034b366004611878565b6108f1565b61036361035e3660046118cd565b610aa6565b6040516102629190611995565b6102e661037e3660046117d7565b610be3565b6103966103913660046119e2565b610c6a565b6040516102629190611a4d565b6102e66103b1366004611a5f565b610de3565b6102566103c4366004611842565b610e0d565b6102e66103d7366004611a5f565b610e2b565b6102566103ea3660046117d7565b610e63565b6102e66103fd366004611a98565b610e7b565b6102566104103660046117d7565b610f77565b610428610423366004611842565b610f81565b604051610262929190611af5565b6102e6610444366004611b55565b6110fb565b610396610457366004611b96565b6111c6565b61039661046a3660046117d7565b6111ed565b6102e661047d366004611b96565b611206565b610256610490366004611842565b600a60209081525f928352604080842090915290825290205460ff1681565b6102e66104bd366004611a98565b611266565b6102566104d0366004611a5f565b6112a6565b6105086104e3366004611a98565b600760209081525f938452604080852082529284528284209052825290205460ff1681565b6040516102629190611bbe565b6103966105233660046117d7565b6112ce565b6102b25f81565b61058161053d3660046117d7565b600260208190525f918252604090912080546001820154919092015460ff8084169361010081049091169261ffff620100008304811693600160201b909304169186565b604080519615158752941515602087015261ffff9384169486019490945291166060840152608083015260a082015260c001610262565b6102e66105c6366004611842565b6112e7565b6102b2611323565b6102566105e13660046117d7565b611337565b6102b26105f4366004611842565b600960209081525f928352604080842090915290825290205481565b61050861061e366004611a98565b5f9283526007602090815260408085209385529281528284209184525290205460ff1690565b6102e6610652366004611a5f565b611341565b6102566106653660046117d7565b611365565b6102b25f516020611c535f395f51905f5281565b6102e661068c366004611a98565b61137b565b6102b261069f3660046117d7565b60036020525f908152604090205481565b5f6001600160e01b03198216637965db0b60e01b14806106e057506301ffc9a760e01b6001600160e01b03198316145b92915050565b6040805160c0810182525f80825260208201819052918101829052606081018290526080810182905260a08101919091525f8281526002602052604090205462010000900461ffff161580159061075457505f82815260026020526040902054600160201b900461ffff1615155b829061077f57604051631e657b1d60e01b815260040161077691815260200190565b60405180910390fd5b50505f90815260026020818152604092839020835160c081018552815460ff8082161515835261010082041615159382019390935261ffff620100008404811695820195909552600160201b90920490931660608201526001830154608082015291015460a082015290565b5f6106e0826113b4565b7f7b765e0e932d348852a6f810bfa1ab891e259123f02db8cdcde614c57022335761081f81611400565b610828836113b4565b6108455760405163e66e03b960e01b815260040160405180910390fd5b5f83815260026020526040902060010154156108745760405163d72a525360e01b815260040160405180910390fd5b5f8381526002602081815260409283902060018101869055918201548254845161ffff62010000830481168252600160201b9092049091169281019290925292810185905290919085907f47f6d167ea6e8ae2b59a1afe3e6689b26bc8d833b2e98ec91db28ec4f7b89d249060600160405180910390a350505050565b5f5f516020611c535f395f51905f5261090981611400565b5f8681526002602052604090205460ff16156109385760405163c1bb562b60e01b815260040160405180910390fd5b855f0361095b5760018054925082905f61095183611be0565b91905055506109be565b5f8681526002602052604090205486925062010000900461ffff1615158061099a57505f82815260026020526040902054600160201b900461ffff1615155b82906109bc57604051631e657b1d60e01b815260040161077691815260200190565b505b8183036109de576040516371f2b80f60e11b815260040160405180910390fd5b8361ffff168561ffff1610610a065760405163364dd21b60e21b815260040160405180910390fd5b5f828152600260208181526040808420805465ffffffff000019166201000061ffff8c8116820265ffff00000000191692909217600160201b8c84168102919091178085559684018b90558451918704831682529095041692840192909252820192909252849084907f47f6d167ea6e8ae2b59a1afe3e6689b26bc8d833b2e98ec91db28ec4f7b89d249060600160405180910390a35050949350505050565b6060815167ffffffffffffffff811115610ac257610ac26118b9565b604051908082528060200260200182016040528015610b2057816020015b6040805160c0810182525f8082526020808301829052928201819052606082018190526080820181905260a082015282525f19909201910181610ae05790505b5090505f5b8251811015610bdd5760025f848381518110610b4357610b43611bf8565b60209081029190910181015182528181019290925260409081015f20815160c081018352815460ff8082161515835261010082041615159482019490945261ffff620100008504811693820193909352600160201b9093049091166060830152600181015460808301526002015460a08201528251839083908110610bca57610bca611bf8565b6020908102919091010152600101610b25565b50919050565b5f516020611c535f395f51905f52610bfa81611400565b5f82815260026020908152604091829020805460ff191660011790819055825161ffff62010000830481168252600160201b9092049091169181019190915283917fb7d45e4134f4dcd10a12a32866dd2922675c618e1afb1c4b720c7f17d176b128910160405180910390a25050565b60605f60018054610c7b9190611c0c565b67ffffffffffffffff811115610c9357610c936118b9565b604051908082528060200260200182016040528015610cbc578160200160208202803683370190505b5090505f60015b600154811015610d4b575f8181526002602052604090205461ffff808716620100009092041611801590610d1257505f8181526002602052604090205461ffff808816600160201b9092041610155b15610d435780838381518110610d2a57610d2a611bf8565b602090810291909101015281610d3f81611be0565b9250505b600101610cc3565b508067ffffffffffffffff811115610d6557610d656118b9565b604051908082528060200260200182016040528015610d8e578160200160208202803683370190505b5092505f5b81811015610dda57828181518110610dad57610dad611bf8565b6020026020010151848281518110610dc757610dc7611bf8565b6020908102919091010152600101610d93565b50505092915050565b5f82815260208190526040902060010154610dfd81611400565b610e07838361140d565b50505050565b5f828152600460205260408120610e24908361149c565b9392505050565b6001600160a01b0381163314610e545760405163334bd91960e11b815260040160405180910390fd5b610e5e82826114b3565b505050565b5f8181526002602052604081206001015415156106e0565b5f516020611c535f395f51905f52610e9281611400565b5f8481526002602052604090205460ff1615610ec15760405163c1bb562b60e01b815260040160405180910390fd5b5f84815260096020908152604080832085845282528083208390558683526007825280832086845282528083208584528252808320805460ff1916905586835260059091529020610f12908361151c565b505f8481526006602090815260408083208684529091529020610f35908361151c565b50604080518481526020810184905285917fd4ecdd0c3164068abc3460771516eac541814c0d47faaeb1bdf1cc419c559b72910160405180910390a250505050565b5f6106e082611527565b5f82815260066020908152604080832084845290915281206060918291610fa790611572565b90508067ffffffffffffffff811115610fc257610fc26118b9565b604051908082528060200260200182016040528015610feb578160200160208202803683370190505b5092508067ffffffffffffffff811115611007576110076118b9565b604051908082528060200260200182016040528015611030578160200160208202803683370190505b5091505f5b818110156110f2575f868152600660209081526040808320888452909152812061105f908361157b565b90508085838151811061107457611074611bf8565b6020908102919091018101919091525f88815260078252604080822089835283528082208483529092522054845160ff909116908590849081106110ba576110ba611bf8565b602002602001019060028111156110d3576110d3611ac1565b908160028111156110e6576110e6611ac1565b90525050600101611035565b50509250929050565b5f516020611c535f395f51905f5261111281611400565b5f8581526004602052604090206111299085611586565b505f858152600660209081526040808320878452909152902061114c9084611586565b505f85815260076020908152604080832087845282528083208684529091529020805483919060ff1916600183600281111561118a5761118a611ac1565b02179055505f8581526009602090815260408083208684528252808320879055878352600590915290206111be9084611586565b505050505050565b5f82815260066020908152604080832060ff851684529091529020606090610e2490611591565b5f8181526005602052604090206060906106e090611591565b5f516020611c535f395f51905f5261121d81611400565b5f8381526002602052604090205460ff161561124c5760405163c1bb562b60e01b815260040160405180910390fd5b5f838152600460205260409020610e079060ff841661151c565b5f516020611c535f395f51905f5261127d81611400565b5f848152600860209081526040808320868452909152902061129f9083611586565b5050505050565b5f918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b5f8181526004602052604090206060906106e090611591565b7f7b765e0e932d348852a6f810bfa1ab891e259123f02db8cdcde614c57022335761131181611400565b505f9182526003602052604090912055565b5f600180546113329190611c0c565b905090565b5f6106e08261159d565b5f8281526020819052604090206001015461135b81611400565b610e0783836114b3565b5f8181526002602052604081205460ff166106e0565b5f516020611c535f395f51905f5261139281611400565b5f848152600860209081526040808320868452909152902061129f908361151c565b5f81815260026020526040812054600160201b900461ffff166113d56115be565b61ffff161180156106e05750505f90815260026020526040902054600160201b900461ffff16151590565b61140a81336115cc565b50565b5f61141883836112a6565b611495575f838152602081815260408083206001600160a01b03861684529091529020805460ff1916600117905561144d3390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45060016106e0565b505f6106e0565b5f8181526001830160205260408120541515610e24565b5f6114be83836112a6565b15611495575f838152602081815260408083206001600160a01b0386168085529252808320805460ff1916905551339286917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45060016106e0565b5f610e248383611609565b5f8181526002602052604081205462010000900461ffff166115476115be565b61ffff16101580156106e05750505f9081526002602052604090205462010000900461ffff16151590565b5f6106e0825490565b5f610e2483836116ec565b5f610e248383611712565b60605f610e2483611757565b5f6115a782611527565b80156106e057506115b7826113b4565b1592915050565b5f6113326201518042611c1f565b6115d682826112a6565b6116055760405163e2517d3f60e01b81526001600160a01b038216600482015260248101839052604401610776565b5050565b5f81815260018301602052604081205480156116e3575f61162b600183611c0c565b85549091505f9061163e90600190611c0c565b905080821461169d575f865f01828154811061165c5761165c611bf8565b905f5260205f200154905080875f01848154811061167c5761167c611bf8565b5f918252602080832090910192909255918252600188019052604090208390555b85548690806116ae576116ae611c3e565b600190038181905f5260205f20015f90559055856001015f8681526020019081526020015f205f9055600193505050506106e0565b5f9150506106e0565b5f825f01828154811061170157611701611bf8565b905f5260205f200154905092915050565b5f81815260018301602052604081205461149557508154600181810184555f8481526020808220909301849055845484825282860190935260409020919091556106e0565b6060815f018054806020026020016040519081016040528092919081815260200182805480156117a457602002820191905f5260205f20905b815481526020019060010190808311611790575b50505050509050919050565b5f602082840312156117c0575f5ffd5b81356001600160e01b031981168114610e24575f5ffd5b5f602082840312156117e7575f5ffd5b5035919050565b80511515825260208101511515602083015261ffff604082015116604083015261ffff60608201511660608301526080810151608083015260a081015160a08301525050565b60c081016106e082846117ee565b5f5f60408385031215611853575f5ffd5b50508035926020909101359150565b803561ffff81168114611873575f5ffd5b919050565b5f5f5f5f6080858703121561188b575f5ffd5b8435935061189b60208601611862565b92506118a960408601611862565b9396929550929360600135925050565b634e487b7160e01b5f52604160045260245ffd5b5f602082840312156118dd575f5ffd5b813567ffffffffffffffff8111156118f3575f5ffd5b8201601f81018413611903575f5ffd5b803567ffffffffffffffff81111561191d5761191d6118b9565b8060051b604051601f19603f830116810181811067ffffffffffffffff8211171561194a5761194a6118b9565b604052918252602081840181019290810187841115611967575f5ffd5b6020850194505b8385101561198a5784358082526020958601959093500161196e565b509695505050505050565b602080825282518282018190525f918401906040840190835b818110156119d7576119c18385516117ee565b6020939093019260c092909201916001016119ae565b509095945050505050565b5f5f604083850312156119f3575f5ffd5b6119fc83611862565b9150611a0a60208401611862565b90509250929050565b5f8151808452602084019350602083015f5b82811015611a43578151865260209586019590910190600101611a25565b5093949350505050565b602081525f610e246020830184611a13565b5f5f60408385031215611a70575f5ffd5b8235915060208301356001600160a01b0381168114611a8d575f5ffd5b809150509250929050565b5f5f5f60608486031215611aaa575f5ffd5b505081359360208301359350604090920135919050565b634e487b7160e01b5f52602160045260245ffd5b60038110611af157634e487b7160e01b5f52602160045260245ffd5b9052565b604081525f611b076040830185611a13565b82810360208401528084518083526020830191506020860192505f5b81811015611b4957611b36838551611ad5565b6020938401939290920191600101611b23565b50909695505050505050565b5f5f5f5f60808587031215611b68575f5ffd5b843593506020850135925060408501359150606085013560038110611b8b575f5ffd5b939692955090935050565b5f5f60408385031215611ba7575f5ffd5b82359150602083013560ff81168114611a8d575f5ffd5b602081016106e08284611ad5565b634e487b7160e01b5f52601160045260245ffd5b5f60018201611bf157611bf1611bcc565b5060010190565b634e487b7160e01b5f52603260045260245ffd5b818103818111156106e0576106e0611bcc565b5f82611c3957634e487b7160e01b5f52601260045260245ffd5b500490565b634e487b7160e01b5f52603160045260245ffdfe241ecf16d79d0f8dbfb92cbc07fe17840425976cf0667f022fe9877caa831b08a2646970667358221220f19014a5392546b9fb03c11baa7c26f1cd6a6d63dc2dde8e38f724ae97e621fd64736f6c634300081e00330000000000000000000000006972480b73fd3a5278c039cf072b499c4ca22e330000000000000000000000006972480b73fd3a5278c039cf072b499c4ca22e33000000000000000000000000caefb6572a337415b67ba840fdf1f7edb76111a1