0 txs
1 call
constructor
constructor(address correlatedToken, address underlyingToken, address resilientOracle, uint256 annualGrowthRate, uint256 _snapshotInterval, uint256 initialSnapshotMaxExchangeRate, uint256 initialSnapshotTimestamp, address accessControlManager, uint256 _snapshotGap)
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)
ONE_CORRELATED_TOKEN
viewfunction ONE_CORRELATED_TOKEN() view returns (uint256)
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)
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
InvalidGrowthRate
error InvalidGrowthRate()
InvalidInitialSnapshot
error InvalidInitialSnapshot()
InvalidSnapshotMaxExchangeRate
error InvalidSnapshotMaxExchangeRate()
InvalidTokenAddress
error InvalidTokenAddress()
Unauthorized
error Unauthorized(address sender, address calledContract, string methodSignature)
ZeroAddressNotAllowed
error ZeroAddressNotAllowed()
creation bytecode
0x610120604052348015610010575f80fd5b5060405161109938038061109983398101604081905261002f916101d2565b8888888888888888886100466301e1338087610265565b5f81905515801561005657505f85115b8061006a57505f805411801561006a575084155b15610088576040516353b7e64560e11b815260040160405180910390fd5b831580610093575082155b801561009e57505f85115b156100bc5760405163b8a5589b60e01b815260040160405180910390fd5b6100c58961018d565b6100ce8861018d565b6100d78761018d565b6100e08261018d565b6001600160a01b0398891660805296881660a05294871660c052600192909255600255600355506004918255821660e0526040805163313ce56760e01b81529051928c169263313ce567928281019260209291908290030181865afa15801561014b573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061016f9190610284565b61017a90600a61038d565b610100525061039b975050505050505050565b6001600160a01b0381166101b4576040516342bcdf7f60e11b815260040160405180910390fd5b50565b80516001600160a01b03811681146101cd575f80fd5b919050565b5f805f805f805f805f6101208a8c0312156101eb575f80fd5b6101f48a6101b7565b985061020260208b016101b7565b975061021060408b016101b7565b965060608a0151955060808a0151945060a08a0151935060c08a0151925061023a60e08b016101b7565b91506101008a015190509295985092959850929598565b634e487b7160e01b5f52601160045260245ffd5b5f8261027f57634e487b7160e01b5f52601260045260245ffd5b500490565b5f60208284031215610294575f80fd5b815160ff811681146102a4575f80fd5b9392505050565b600181815b808511156102e557815f19048211156102cb576102cb610251565b808516156102d857918102915b93841c93908002906102b0565b509250929050565b5f826102fb57506001610387565b8161030757505f610387565b816001811461031d576002811461032757610343565b6001915050610387565b60ff84111561033857610338610251565b50506001821b610387565b5060208310610133831016604e8410600b8410161715610366575081810a610387565b61037083836102ab565b805f190482111561038357610383610251565b0290505b92915050565b5f6102a460ff8416836102ed565b60805160a05160c05160e05161010051610c826104175f395f818161024301526106b001525f8181610191015261090b01525f81816102730152818161059c01526107de01525f81816101360152818161057401526107b201525f8181610209015281816102b0015281816106d8015261084c0152610c825ff3fe608060405234801561000f575f80fd5b5060043610610111575f3560e01c8063692404261161009e5780639c43eb541161006e5780639c43eb5414610265578063a4edcd4c1461026e578063abb8561314610295578063ac5a693e1461029d578063bdf13af2146102a5575f80fd5b806369240426146101fc57806369818a35146102045780637fc4e4a01461022b57806386f23a751461023e575f80fd5b806345be2dc7116100e457806345be2dc71461018c5780635213f9c8146101b3578063596efe6f146101c8578063643d813d146101d1578063671528d4146101e4575f80fd5b806307d0413c1461011557806329db1be6146101315780634169d2451461017057806341976e0914610179575b5f80fd5b61011e60015481565b6040519081526020015b60405180910390f35b6101587f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610128565b61011e60045481565b61011e6101873660046109b4565b6102ad565b6101587f000000000000000000000000000000000000000000000000000000000000000081565b6101c66101c13660046109da565b61035e565b005b61011e60025481565b6101c66101df3660046109f1565b6103cf565b6101ec6104a5565b6040519015158152602001610128565b6101c66104e0565b6101587f000000000000000000000000000000000000000000000000000000000000000081565b6101c66102393660046109f1565b610629565b61011e7f000000000000000000000000000000000000000000000000000000000000000081565b61011e60035481565b6101587f000000000000000000000000000000000000000000000000000000000000000081565b61011e6106a1565b61011e5f5481565b61011e61074e565b5f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b03161461030057604051630f58058360e11b815260040160405180910390fd5b5f6103096106a1565b90506001545f036103245761031d8161079b565b9392505050565b5f61032d61074e565b90505f818311801561033e57508115155b610348578261034a565b815b90506103558161079b565b95945050505050565b61039c6040518060400160405280601781526020017f736574536e617073686f744761702875696e74323536290000000000000000008152506108f2565b6004546040518291907feb3716d3f8388c182853c1dc98b18931f3a600bbab31f2ff48631f6412e4997f905f90a3600455565b61040d6040518060400160405280601e81526020017f73657447726f777468526174652875696e743235362c75696e743235362900008152506108f2565b5f5461041d6301e1338084610a25565b5f81905515801561042d57505f82115b8061044157505f8054118015610441575081155b1561045f576040516353b7e64560e11b815260040160405180910390fd5b6001545f54827fa65cbeb0e28a8803a912daac67c472c160aa01e2c988755fa424f290321de6088560405161049691815260200190565b60405180910390a45060015550565b5f6001545f036104b457505f90565b5f6104bd61074e565b9050805f036104cd575f91505090565b5f6104d66106a1565b9190911192915050565b6001546003546104f09042610a44565b10806104fc5750600154155b1561050357565b5f61050c6106a1565b90505f61051761074e565b9050600454818311610529578261052b565b815b6105359190610a5d565b6002819055426003555f0361055d57604051635f18388760e01b815260040160405180910390fd5b60405163b62cad6960e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063b62cad69906024015f604051808303815f87803b1580156105dd575f80fd5b505af11580156105ef573d5f803e3d5ffd5b505050506003546002547f2c8c8fcb8c77a0ca21dcc3ab8fc0ade761557e76b1240cb40ebbef9fcee00f7d60405160405180910390a35050565b6106676040518060400160405280601c81526020017f736574536e617073686f742875696e743235362c75696e7432353629000000008152506108f2565b60028290556003819055604051819083907f2c8c8fcb8c77a0ca21dcc3ab8fc0ade761557e76b1240cb40ebbef9fcee00f7d905f90a35050565b6040516303d1689d60e11b81527f000000000000000000000000000000000000000000000000000000000000000060048201525f907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906307a2d13a90602401602060405180830381865afa158015610725573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107499190610a70565b905090565b5f806003544261075e9190610a44565b90505f670de0b6b3a7640000825f5460025461077a9190610a87565b6107849190610a87565b61078e9190610a25565b60025461031d9190610a5d565b6040516341976e0960e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811660048301525f9182917f000000000000000000000000000000000000000000000000000000000000000016906341976e0990602401602060405180830381865afa158015610823573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108479190610a70565b90505f7f000000000000000000000000000000000000000000000000000000000000000090505f816001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa1580156108aa573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108ce9190610a9e565b60ff1690506108de81600a610b9e565b6108e88487610a87565b6103559190610a25565b6040516318c5e8ab60e01b81525f906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906318c5e8ab906109429033908690600401610bd7565b602060405180830381865afa15801561095d573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906109819190610c02565b9050806109b057333083604051634a3fa29360e01b81526004016109a793929190610c21565b60405180910390fd5b5050565b5f602082840312156109c4575f80fd5b81356001600160a01b038116811461031d575f80fd5b5f602082840312156109ea575f80fd5b5035919050565b5f8060408385031215610a02575f80fd5b50508035926020909101359150565b634e487b7160e01b5f52601160045260245ffd5b5f82610a3f57634e487b7160e01b5f52601260045260245ffd5b500490565b81810381811115610a5757610a57610a11565b92915050565b80820180821115610a5757610a57610a11565b5f60208284031215610a80575f80fd5b5051919050565b8082028115828204841417610a5757610a57610a11565b5f60208284031215610aae575f80fd5b815160ff8116811461031d575f80fd5b600181815b80851115610af857815f1904821115610ade57610ade610a11565b80851615610aeb57918102915b93841c9390800290610ac3565b509250929050565b5f82610b0e57506001610a57565b81610b1a57505f610a57565b8160018114610b305760028114610b3a57610b56565b6001915050610a57565b60ff841115610b4b57610b4b610a11565b50506001821b610a57565b5060208310610133831016604e8410600b8410161715610b79575081810a610a57565b610b838383610abe565b805f1904821115610b9657610b96610a11565b029392505050565b5f61031d8383610b00565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b6001600160a01b03831681526040602082018190525f90610bfa90830184610ba9565b949350505050565b5f60208284031215610c12575f80fd5b8151801515811461031d575f80fd5b6001600160a01b038481168252831660208201526060604082018190525f9061035590830184610ba956fea2646970667358221220769bd4507ee4baa59dc1ffbb2b118f4231d4085409ae12a75a4688ff934c134f64736f6c634300081900330000000000000000000000009d39a5de30e57443bff2a8307a4256c8797a34970000000000000000000000004c9edd5852cd905f086c759e8383e09bff1e68b3000000000000000000000000d2ce3fb018805ef92b8c5976cb31f84b4e295f940000000000000000000000000000000000000000000000000214e8348c4f0000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000001042b8c2b00d9611000000000000000000000000000000000000000000000000000000006825b8af000000000000000000000000230058da2d23eb8836ec5db7037ef7250c56e25e0000000000000000000000000000000000000000000000000000000000000000