0 txs
4 calls
constructor
constructor((address market, address ptOracle, uint8 rateKind, address ptToken, address underlyingToken, address resilientOracle, uint32 twapDuration, uint256 annualGrowthRate, uint256 snapshotInterval, uint256 initialSnapshotMaxExchangeRate, uint256 initialSnapshotTimestamp, address accessControlManager, uint256 snapshotGap) params)
functions
ACCESS_CONTROL_MANAGER
viewfunction ACCESS_CONTROL_MANAGER() view returns (address)
CORRELATED_TOKEN
viewfunction CORRELATED_TOKEN() view returns (address)
getMaxAllowedExchangeRate
viewfunction getMaxAllowedExchangeRate() view returns (uint256)
getPrice
viewfunction getPrice(address asset) view returns (uint256)
getUnderlyingAmount
viewfunction getUnderlyingAmount() view returns (uint256)
growthRatePerSecond
viewfunction growthRatePerSecond() view returns (uint256)
isCapped
viewfunction isCapped() view returns (bool)
MARKET
viewfunction MARKET() view returns (address)
PT_ORACLE
viewfunction PT_ORACLE() view returns (address)
RATE_KIND
viewfunction RATE_KIND() view returns (uint8)
RESILIENT_ORACLE
viewfunction RESILIENT_ORACLE() view returns (address)
snapshotGap
viewfunction snapshotGap() view returns (uint256)
snapshotInterval
viewfunction snapshotInterval() view returns (uint256)
snapshotMaxExchangeRate
viewfunction snapshotMaxExchangeRate() view returns (uint256)
snapshotTimestamp
viewfunction snapshotTimestamp() view returns (uint256)
TWAP_DURATION
viewfunction TWAP_DURATION() view returns (uint32)
UNDERLYING_DECIMALS
viewfunction UNDERLYING_DECIMALS() view returns (uint8)
UNDERLYING_TOKEN
viewfunction UNDERLYING_TOKEN() view returns (address)
setGrowthRate
nonpayablefunction setGrowthRate(uint256 _annualGrowthRate, uint256 _snapshotInterval)
setSnapshot
nonpayablefunction setSnapshot(uint256 _snapshotMaxExchangeRate, uint256 _snapshotTimestamp)
setSnapshotGap
nonpayablefunction setSnapshotGap(uint256 _snapshotGap)
updateSnapshot
nonpayablefunction updateSnapshot()
events
GrowthRateUpdated
event GrowthRateUpdated(uint256 indexed oldGrowthRatePerSecond, uint256 indexed newGrowthRatePerSecond, uint256 indexed oldSnapshotInterval, uint256 newSnapshotInterval)
SnapshotGapUpdated
event SnapshotGapUpdated(uint256 indexed oldSnapshotGap, uint256 indexed newSnapshotGap)
SnapshotUpdated
event SnapshotUpdated(uint256 indexed maxExchangeRate, uint256 indexed timestamp)
errors
InvalidDuration
error InvalidDuration()
InvalidGrowthRate
error InvalidGrowthRate()
InvalidInitialSnapshot
error InvalidInitialSnapshot()
InvalidSnapshotMaxExchangeRate
error InvalidSnapshotMaxExchangeRate()
InvalidTokenAddress
error InvalidTokenAddress()
Unauthorized
error Unauthorized(address sender, address calledContract, string methodSignature)
ZeroAddressNotAllowed
error ZeroAddressNotAllowed()
ZeroValueNotAllowed
error ZeroValueNotAllowed()
creation bytecode
0x6101a0604052348015610010575f80fd5b5060405161155938038061155983398101604081905261002f916103a6565b6060810151608082015160a083015160e084015161010085015161012086015161014087015161016088015161018089015161006f6301e1338087610481565b5f81905515801561007f57505f85115b8061009357505f8054118015610093575084155b156100b1576040516353b7e64560e11b815260040160405180910390fd5b8315806100bc575082155b80156100c757505f85115b156100e55760405163b8a5589b60e01b815260040160405180910390fd5b6100ee896102eb565b6100f7886102eb565b610100876102eb565b610109826102eb565b6001600160a01b0398891660805296881660a05294871660c052600192909255600255600355506004919091551660e0528051610145906102eb565b6020810151610153906102eb565b60c08101516101679063ffffffff16610315565b80516001600160a01b03908116610140526020820151166101005260408101516001811115610198576101986104a0565b6101208160018111156101ad576101ad6104a0565b815250508060c0015163ffffffff166101608163ffffffff168152505060a0516001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015610208573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061022c91906104b4565b60ff166101805261010051610140516101605160405162439f4b60e91b81526001600160a01b03928316600482015263ffffffff90911660248201525f928392169063873e960090604401606060405180830381865afa158015610292573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906102b691906104ea565b925050915081806102c5575080155b156102e357604051637616640160e01b815260040160405180910390fd5b505050610532565b6001600160a01b038116610312576040516342bcdf7f60e11b815260040160405180910390fd5b50565b805f036103125760405163273e150360e21b815260040160405180910390fd5b6040516101a081016001600160401b038111828210171561036457634e487b7160e01b5f52604160045260245ffd5b60405290565b80516001600160a01b0381168114610380575f80fd5b919050565b805160028110610380575f80fd5b805163ffffffff81168114610380575f80fd5b5f6101a082840312156103b7575f80fd5b6103bf610335565b6103c88361036a565b81526103d66020840161036a565b60208201526103e760408401610385565b60408201526103f86060840161036a565b60608201526104096080840161036a565b608082015261041a60a0840161036a565b60a082015261042b60c08401610393565b60c082015260e0838101519082015261010080840151908201526101208084015190820152610140808401519082015261016061046981850161036a565b90820152610180928301519281019290925250919050565b5f8261049b57634e487b7160e01b5f52601260045260245ffd5b500490565b634e487b7160e01b5f52602160045260245ffd5b5f602082840312156104c4575f80fd5b815160ff811681146104d4575f80fd5b9392505050565b80518015158114610380575f80fd5b5f805f606084860312156104fc575f80fd5b610505846104db565b9250602084015161ffff8116811461051b575f80fd5b9150610529604085016104db565b90509250925092565b60805160a05160c05160e0516101005161012051610140516101605161018051610f596106005f395f81816101d9015261099d01525f81816103070152818161081b01526108f601525f818161038b015281816107f301526108ce01525f818161014601526107a701525f81816102e001528181610847015261092201525f818161022e0152610b9a01525f818161034c0152818161069c0152610a6d01525f818161019a015281816106740152610a4101525f81816102a6015281816103b00152610adb0152610f595ff3fe608060405234801561000f575f80fd5b506004361061013d575f3560e01c806369240426116100b45780639c43eb54116100795780639c43eb541461033e578063a4edcd4c14610347578063abb856131461036e578063ac5a693e14610376578063bdf13af21461037e578063f46f16c214610386575f80fd5b8063692404261461029957806369818a35146102a15780637fc4e4a0146102c8578063809d7b31146102db578063879ac8f814610302575f80fd5b806341976e091161010557806341976e091461021657806345be2dc7146102295780635213f9c814610250578063596efe6f14610265578063643d813d1461026e578063671528d414610281575f80fd5b806302125d091461014157806307d0413c1461017e57806329db1be6146101955780633dae7c22146101d45780634169d2451461020d575b5f80fd5b6101687f000000000000000000000000000000000000000000000000000000000000000081565b6040516101759190610c57565b60405180910390f35b61018760015481565b604051908152602001610175565b6101bc7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610175565b6101fb7f000000000000000000000000000000000000000000000000000000000000000081565b60405160ff9091168152602001610175565b61018760045481565b610187610224366004610c7d565b6103ad565b6101bc7f000000000000000000000000000000000000000000000000000000000000000081565b61026361025e366004610ca3565b61045e565b005b61018760025481565b61026361027c366004610cba565b6104cf565b6102896105a5565b6040519015158152602001610175565b6102636105e0565b6101bc7f000000000000000000000000000000000000000000000000000000000000000081565b6102636102d6366004610cba565b610729565b6101bc7f000000000000000000000000000000000000000000000000000000000000000081565b6103297f000000000000000000000000000000000000000000000000000000000000000081565b60405163ffffffff9091168152602001610175565b61018760035481565b6101bc7f000000000000000000000000000000000000000000000000000000000000000081565b6101876107a1565b6101875f5481565b6101876109dd565b6101bc7f000000000000000000000000000000000000000000000000000000000000000081565b5f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b03161461040057604051630f58058360e11b815260040160405180910390fd5b5f6104096107a1565b90506001545f036104245761041d81610a2a565b9392505050565b5f61042d6109dd565b90505f818311801561043e57508115155b610448578261044a565b815b905061045581610a2a565b95945050505050565b61049c6040518060400160405280601781526020017f736574536e617073686f744761702875696e7432353629000000000000000000815250610b81565b6004546040518291907feb3716d3f8388c182853c1dc98b18931f3a600bbab31f2ff48631f6412e4997f905f90a3600455565b61050d6040518060400160405280601e81526020017f73657447726f777468526174652875696e743235362c75696e74323536290000815250610b81565b5f5461051d6301e1338084610cee565b5f81905515801561052d57505f82115b8061054157505f8054118015610541575081155b1561055f576040516353b7e64560e11b815260040160405180910390fd5b6001545f54827fa65cbeb0e28a8803a912daac67c472c160aa01e2c988755fa424f290321de6088560405161059691815260200190565b60405180910390a45060015550565b5f6001545f036105b457505f90565b5f6105bd6109dd565b9050805f036105cd575f91505090565b5f6105d66107a1565b9190911192915050565b6001546003546105f09042610d0d565b10806105fc5750600154155b1561060357565b5f61060c6107a1565b90505f6106176109dd565b9050600454818311610629578261062b565b815b6106359190610d26565b6002819055426003555f0361065d57604051635f18388760e01b815260040160405180910390fd5b60405163b62cad6960e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063b62cad69906024015f604051808303815f87803b1580156106dd575f80fd5b505af11580156106ef573d5f803e3d5ffd5b505050506003546002547f2c8c8fcb8c77a0ca21dcc3ab8fc0ade761557e76b1240cb40ebbef9fcee00f7d60405160405180910390a35050565b6107676040518060400160405280601c81526020017f736574536e617073686f742875696e743235362c75696e743235362900000000815250610b81565b60028290556003819055604051819083907f2c8c8fcb8c77a0ca21dcc3ab8fc0ade761557e76b1240cb40ebbef9fcee00f7d905f90a35050565b5f8060017f000000000000000000000000000000000000000000000000000000000000000060018111156107d7576107d7610c43565b036108b75760405163a31426d160e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811660048301527f000000000000000000000000000000000000000000000000000000000000000063ffffffff1660248301527f0000000000000000000000000000000000000000000000000000000000000000169063a31426d190604401602060405180830381865afa15801561088c573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108b09190610d39565b905061098e565b60405163abca0eab60e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811660048301527f000000000000000000000000000000000000000000000000000000000000000063ffffffff1660248301527f0000000000000000000000000000000000000000000000000000000000000000169063abca0eab90604401602060405180830381865afa158015610967573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061098b9190610d39565b90505b670de0b6b3a7640000816109c37f0000000000000000000000000000000000000000000000000000000000000000600a610e30565b6109cd9190610e3e565b6109d79190610cee565b91505090565b5f80600354426109ed9190610d0d565b90505f670de0b6b3a7640000825f54600254610a099190610e3e565b610a139190610e3e565b610a1d9190610cee565b60025461041d9190610d26565b6040516341976e0960e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811660048301525f9182917f000000000000000000000000000000000000000000000000000000000000000016906341976e0990602401602060405180830381865afa158015610ab2573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610ad69190610d39565b90505f7f000000000000000000000000000000000000000000000000000000000000000090505f816001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b39573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610b5d9190610e55565b60ff169050610b6d81600a610e75565b610b778487610e3e565b6104559190610cee565b6040516318c5e8ab60e01b81525f906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906318c5e8ab90610bd19033908690600401610eae565b602060405180830381865afa158015610bec573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610c109190610ed9565b905080610c3f57333083604051634a3fa29360e01b8152600401610c3693929190610ef8565b60405180910390fd5b5050565b634e487b7160e01b5f52602160045260245ffd5b6020810160028310610c7757634e487b7160e01b5f52602160045260245ffd5b91905290565b5f60208284031215610c8d575f80fd5b81356001600160a01b038116811461041d575f80fd5b5f60208284031215610cb3575f80fd5b5035919050565b5f8060408385031215610ccb575f80fd5b50508035926020909101359150565b634e487b7160e01b5f52601160045260245ffd5b5f82610d0857634e487b7160e01b5f52601260045260245ffd5b500490565b81810381811115610d2057610d20610cda565b92915050565b80820180821115610d2057610d20610cda565b5f60208284031215610d49575f80fd5b5051919050565b600181815b80851115610d8a57815f1904821115610d7057610d70610cda565b80851615610d7d57918102915b93841c9390800290610d55565b509250929050565b5f82610da057506001610d20565b81610dac57505f610d20565b8160018114610dc25760028114610dcc57610de8565b6001915050610d20565b60ff841115610ddd57610ddd610cda565b50506001821b610d20565b5060208310610133831016604e8410600b8410161715610e0b575081810a610d20565b610e158383610d50565b805f1904821115610e2857610e28610cda565b029392505050565b5f61041d60ff841683610d92565b8082028115828204841417610d2057610d20610cda565b5f60208284031215610e65575f80fd5b815160ff8116811461041d575f80fd5b5f61041d8383610d92565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b6001600160a01b03831681526040602082018190525f90610ed190830184610e80565b949350505050565b5f60208284031215610ee9575f80fd5b8151801515811461041d575f80fd5b6001600160a01b038481168252831660208201526060604082018190525f9061045590830184610e8056fea2646970667358221220dd4434cf5ec982b81a2a3a25f96ea3d5d76d95704500f208da19253bd6abc73b64736f6c634300081900330000000000000000000000007d372819240d14fb477f17b964f95f33beb4c7040000000000000000000000009a9fa8338dd5e5b2188006f1cd2ef26d921650c200000000000000000000000000000000000000000000000000000000000000000000000000000000000000006ee2b5e19ecba773a352e5b21415dc419a700d1d000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000d2ce3fb018805ef92b8c5976cb31f84b4e295f9400000000000000000000000000000000000000000000000000000000000007080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000230058da2d23eb8836ec5db7037ef7250c56e25e0000000000000000000000000000000000000000000000000000000000000000