2k txs
14.8k calls
constructor
constructor(address _zk)
functions
balanceOf
viewfunction balanceOf(address user) view returns (uint128)
getUserHistoryAt
viewfunction getUserHistoryAt(address user, uint256 index) view returns (tuple)
getUserHistoryLength
viewfunction getUserHistoryLength(address user) view returns (uint256)
lastSlopeChangeAppliedAt
viewfunction lastSlopeChangeAppliedAt() view returns (uint128)
MAX_LOCK_TIME
viewfunction MAX_LOCK_TIME() view returns (uint128)
MIN_LOCK_TIME
viewfunction MIN_LOCK_TIME() view returns (uint128)
positionData
viewfunction positionData(address) view returns (uint128 amount, uint128 expiry)
slopeChanges
viewfunction slopeChanges(uint128) view returns (uint128)
totalSupplyAt
viewfunction totalSupplyAt(uint128) view returns (uint128)
totalSupplyStored
viewfunction totalSupplyStored() view returns (uint128)
WEEK
viewfunction WEEK() view returns (uint128)
zk
viewfunction zk() view returns (address)
increaseLockPosition
nonpayablefunction increaseLockPosition(uint128 additionalAmountToLock, uint128 newExpiry) returns (uint128 newVeBalance)
totalSupplyAndBalanceCurrent
nonpayablefunction totalSupplyAndBalanceCurrent(address user) returns (uint128, uint128)
totalSupplyCurrent
nonpayablefunction totalSupplyCurrent() returns (uint128)
withdraw
nonpayablefunction withdraw() returns (uint128 amount)
events
NewLockPosition
event NewLockPosition(address indexed user, uint128 amount, uint128 expiry)
Withdraw
event Withdraw(address indexed user, uint128 amount)
errors
AddressEmptyCode
error AddressEmptyCode(address target)
AddressInsufficientBalance
error AddressInsufficientBalance(address account)
ExpiryInThePast
error ExpiryInThePast(uint256 expiry)
FailedInnerCall
error FailedInnerCall()
InvalidWTime
error InvalidWTime(uint256 wTime)
SafeERC20FailedOperation
error SafeERC20FailedOperation(address token)
VEExceededMaxLockTime
error VEExceededMaxLockTime()
VEInsufficientLockTime
error VEInsufficientLockTime()
VENotAllowedReduceExpiry
error VENotAllowedReduceExpiry()
VEPositionNotExpired
error VEPositionNotExpired()
VEZeroAmountLocked
error VEZeroAmountLocked()
VEZeroPosition
error VEZeroPosition()
creation bytecode
0x60a06040523480156200001157600080fd5b50604051620014d2380380620014d28339810160408190526200003491620000a8565b6001600160a01b0381166080526200004b62000072565b600280546001600160801b0319166001600160801b03929092169190911790555062000149565b60006200007f4262000084565b905090565b600062093a80620000968184620000da565b620000a291906200010f565b92915050565b600060208284031215620000bb57600080fd5b81516001600160a01b0381168114620000d357600080fd5b9392505050565b60006001600160801b03838116806200010357634e487b7160e01b600052601260045260246000fd5b92169190910492915050565b6001600160801b038181168382160280821691908281146200014157634e487b7160e01b600052601160045260246000fd5b505092915050565b60805161135f62000173600039600081816101ea015281816103920152610670015261135f6000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c8063c91c1f5711610097578063ef1c243a11610066578063ef1c243a146102b4578063f4359ce514610132578063fa78668f146102bc578063fc367c61146102c757600080fd5b8063c91c1f57146101e5578063cb6b4f3c14610224578063d88e92a914610278578063e268b3a4146102a157600080fd5b80637c386c71116100d35780637c386c711461014f578063814b2cac14610196578063947975d9146101a9578063c8121ec2146101d257600080fd5b806330d981af146101055780633ccfd60b1461012a5780633ff032071461013257806370a082311461013c575b600080fd5b61010d6102e8565b6040516001600160801b0390911681526020015b60405180910390f35b61010d610305565b61010d62093a8081565b61010d61014a36600461111a565b61040d565b61016261015d366004611135565b610466565b6040805182516001600160801b03908116825260209384015180518216858401529093015190921690820152606001610121565b60025461010d906001600160801b031681565b61010d6101b7366004611176565b6004602052600090815260409020546001600160801b031681565b61010d6101e0366004611191565b610497565b61020c7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610121565b61025861023236600461111a565b6001602052600090815260409020546001600160801b0380821691600160801b90041682565b604080516001600160801b03938416815292909116602083015201610121565b61010d610286366004611176565b6003602052600090815260409020546001600160801b031681565b6102586102af36600461111a565b610706565b61010d610723565b61010d6301dfe20081565b6102da6102d536600461111a565b61075b565b604051908152602001610121565b6000806102f3610779565b5090506102ff816108c0565b91505090565b600033610311816108e2565b61032e576040516339ba104360e01b815260040160405180910390fd5b6001600160a01b0381166000908152600160205260408120546001600160801b0316925082900361037257604051631e95654360e11b815260040160405180910390fd5b6001600160a01b038082166000908152600160205260408120556103c2907f000000000000000000000000000000000000000000000000000000000000000016826001600160801b038516610913565b6040516001600160801b03831681526001600160a01b038216907f0e1bb0545c1ebb9fb680bde73514e572831de93b479c087ec1ef6c35c3a19fd69060200160405180910390a25090565b6001600160a01b03811660009081526001602090815260408083208151808301909252546001600160801b038082168352600160801b90910416918101919091526104609061045b90610977565b6108c0565b92915050565b61046e6110c4565b6001600160a01b038316600090815260056020526040902061049090836109c9565b9392505050565b6000336104ac6001600160801b038416610a3f565b6104d957604051637bf16ce960e11b81526001600160801b03841660048201526024015b60405180910390fd5b6001600160801b038316421061050d5760405163d928003560e01b81526001600160801b03841660048201526024016104d0565b6001600160a01b0381166000908152600160205260409020546001600160801b03600160801b9091048116908416101561055a57604051631f8b0c5960e21b815260040160405180910390fd5b6105686301dfe200426111da565b836001600160801b0316111561059157604051632739a01960e11b815260040160405180910390fd5b61059e62093a80426111da565b836001600160801b031610156105c757604051630def6af560e21b815260040160405180910390fd5b6001600160a01b0381166000908152600160205260408120546105f3906001600160801b0316866111ed565b9050806001600160801b031660000361061f576040516323fbc14f60e11b815260040160405180910390fd5b6001600160a01b03821660009081526001602052604081205461065290600160801b90046001600160801b031686611214565b90506001600160801b038616156106a1576106a16001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001684306001600160801b038a16610a55565b6106ac838783610a94565b604080516001600160801b038086168252881660208201529195506001600160a01b038516917fb1a3371956c54dc1d83695b4a006b051c8313ee986e533b6b964e77c9066fc2c910160405180910390a250505092915050565b6000806107116102e8565b61071a8461040d565b91509150915091565b60408051808201909152600080546001600160801b038082168452600160801b90910416602083015290610756906108c0565b905090565b6001600160a01b038116600090815260056020526040812054610460565b604080518082019091526000808252602082015260408051808201909152600080546001600160801b038082168452600160801b9091048116602084015260025491929116826107c7610c94565b9050806001600160801b0316826001600160801b0316106107ec575090939092509050565b806001600160801b0316826001600160801b0316101561087d5761081362093a80836111ed565b6001600160801b0380821660009081526003602052604090205491935061083d9185911684610c9f565b92506108498383610cf9565b6001600160801b03838116600090815260046020526040902080546001600160801b031916929091169190911790556107ec565b50815160208301516001600160801b03918216600160801b9183169190910217600055600280546001600160801b03191691831691909117905590939092509050565b60006108cb82610d4c565b156108d857506000919050565b6104608242610cf9565b6001600160a01b038116600090815260016020526040812054600160801b90046001600160801b0316421015610460565b6040516001600160a01b0383811660248301526044820183905261097291859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180516001600160e01b038381831617835250505050610d7d565b505050565b6040805180820190915260008082526020820152815161099c906301dfe2009061124a565b6001600160801b031660208083018290528301516109b991611270565b6001600160801b03168152919050565b6109d16110c4565b8260000182815481106109e6576109e661129b565b6000918252602091829020604080518082018252600290930290910180546001600160801b03908116845282518084019093526001909101548082168352600160801b9004168184015291810191909152905092915050565b6000610a4e62093a80836112b1565b1592915050565b6040516001600160a01b038481166024830152838116604483015260648201839052610a8e9186918216906323b872dd90608401610940565b50505050565b6001600160a01b03831660009081526001602090815260408083208151808301909252546001600160801b038082168352600160801b909104169181019190915281610ade610779565b509050610af882602001516001600160801b031642101590565b610b72576000610b0783610977565b9050610b138282610de0565b602080830151858201516001600160801b03908116600090815260039093526040832080549496509193919291610b4c91859116611214565b92506101000a8154816001600160801b0302191690836001600160801b03160217905550505b60006040518060400160405280878560000151610b8f91906111ed565b6001600160801b03168152602001868560200151610bad91906111ed565b6001600160801b0316905290506000610bc582610977565b9050610bd18382610e35565b602080830151848201516001600160801b03908116600090815260039093526040832080549497509193919291610c0a918591166111ed565b82546101009290920a6001600160801b038181021990931691831602179091558451602080870151918316600160801b92841683021760009081556001600160a01b038d1681526001825260408082208851898501519087169616909402949094179092556005905220610c7f915082610e76565b610c88816108c0565b98975050505050505050565b600061075642610fa3565b6040805180820190915260008082526020820152828460200151610cc39190611214565b6001600160801b03166020820152610cdb8284611270565b8451610ce79190611214565b6001600160801b031681529392505050565b600082600001516001600160801b0316828460200151610d199190611270565b6001600160801b03161115610d3057506000610460565b818360200151610d409190611270565b83516104909190611214565b600081600001516001600160801b0316428360200151610d6c9190611270565b6001600160801b0316101592915050565b6000610d926001600160a01b03841683610fbd565b90508051600014158015610db7575080806020019051810190610db591906112c5565b155b1561097257604051635274afe760e01b81526001600160a01b03841660048201526024016104d0565b604080518082019091526000808252602082015281518351610e029190611214565b6001600160801b0316815260208083015190840151610e219190611214565b6001600160801b0316602082015292915050565b604080518082019091526000808252602082015281518351610e5791906111ed565b6001600160801b0316815260208083015190840151610e2191906111ed565b81548015801590610ecb5750610e8a610c94565b6001600160801b031683610e9f6001846112e7565b81548110610eaf57610eaf61129b565b60009182526020909120600290910201546001600160801b0316145b15610f2a578183610edd6001846112e7565b81548110610eed57610eed61129b565b6000918252602091829020835193909201516001600160801b03908116600160801b02931692909217600160029093029091019190910155505050565b826000016040518060400160405280610f41610c94565b6001600160801b0390811682526020918201869052835460018181018655600095865294839020845160029092020180549183166001600160801b03199092169190911781559282015180519201518116600160801b02911617910155505050565b600062093a80610fb3818461124a565b6104609190611270565b60606104908383600084600080856001600160a01b03168486604051610fe391906112fa565b60006040518083038185875af1925050503d8060008114611020576040519150601f19603f3d011682016040523d82523d6000602084013e611025565b606091505b509150915061103586838361103f565b9695505050505050565b6060826110545761104f8261109b565b610490565b815115801561106b57506001600160a01b0384163b155b1561109457604051639996b31560e01b81526001600160a01b03851660048201526024016104d0565b5080610490565b8051156110ab5780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b604051806040016040528060006001600160801b031681526020016110f9604080518082019091526000808252602082015290565b905290565b80356001600160a01b038116811461111557600080fd5b919050565b60006020828403121561112c57600080fd5b610490826110fe565b6000806040838503121561114857600080fd5b611151836110fe565b946020939093013593505050565b80356001600160801b038116811461111557600080fd5b60006020828403121561118857600080fd5b6104908261115f565b600080604083850312156111a457600080fd5b6111ad8361115f565b91506111bb6020840161115f565b90509250929050565b634e487b7160e01b600052601160045260246000fd5b80820180821115610460576104606111c4565b6001600160801b0381811683821601908082111561120d5761120d6111c4565b5092915050565b6001600160801b0382811682821603908082111561120d5761120d6111c4565b634e487b7160e01b600052601260045260246000fd5b60006001600160801b038084168061126457611264611234565b92169190910492915050565b6001600160801b03818116838216028082169190828114611293576112936111c4565b505092915050565b634e487b7160e01b600052603260045260246000fd5b6000826112c0576112c0611234565b500690565b6000602082840312156112d757600080fd5b8151801515811461049057600080fd5b81810381811115610460576104606111c4565b6000825160005b8181101561131b5760208186018101518583015201611301565b50600092019182525091905056fea2646970667358221220e21017e34e6f71381833a2060ffffbf8eddcf5b91566b1175c02892322efe5c664736f6c63430008160033000000000000000000000000c71b5f631354be6853efe9c3ab6b9590f8302e81