{"matchId":"8774858","creationMatch":"match","runtimeMatch":"match","verifiedAt":"2025-08-12T07:14:21Z","creationBytecode":{"onchainBytecode":"0x6101406040523480156200001257600080fd5b5060405162005c9438038062005c94833981016040819052620000359162000252565b85858484846001600160a01b0385166200007f5760405162461bcd60e51b8152602060048201526006602482015265042beeecae8d60d31b60448201526064015b60405180910390fd5b6001600160a01b038416620000c05760405162461bcd60e51b8152602060048201526006602482015265215f7573646360d01b604482015260640162000076565b6001600160a01b038116620001095760405162461bcd60e51b815260206004820152600e60248201526d0857dcddd85c10dbdb9d1c9858dd60921b604482015260640162000076565b6001600160a01b038316620001555760405162461bcd60e51b815260206004820152601160248201527010afb3b0b6b6b0a1b7b73a3937b63632b960791b604482015260640162000076565b6001600160a01b0382166200019c5760405162461bcd60e51b815260206004820152600c60248201526b0857db585c99da5b941bdbdb60a21b604482015260640162000076565b6001600160601b0319606095861b811660805293851b841660a05291841b831660c052831b821660e05290911b16610100526001600160a01b038416620002185760405162461bcd60e51b815260206004820152600f60248201526e215f6f546f6b656e466163746f727960881b604482015260640162000076565b50505060601b6001600160601b0319166101205250620002d29050565b80516001600160a01b03811681146200024d57600080fd5b919050565b60008060008060008060c087890312156200026b578182fd5b620002768762000235565b9550620002866020880162000235565b9450620002966040880162000235565b9350620002a66060880162000235565b9250620002b66080880162000235565b9150620002c660a0880162000235565b90509295509295509295565b60805160601c60a05160601c60c05160601c60e05160601c6101005160601c6101205160601c61590c6200038860003960008181610f2a0152612d60015260008181610ea001528181611a4c0152613c200152600081816108ac015261220e0152600081816105610152818161193c015281816121e60152613d58015260008181610af60152612d85015260008181610db601528181612a3d01528181612ae9015281816132eb0152613328015261590c6000f3fe6080604052600436106104945760003560e01c80638b10cc7c11610260578063ca59409411610144578063e74b981b116100c1578063f756fa2111610085578063f756fa211461105a578063f87c7d931461106f578063f957a06714611084578063f9a0be68146110a4578063fba7dc61146110c5578063fe56e232146110e657600080fd5b8063e74b981b14610fbd578063f001382714610fdd578063f2fde38b14610ffd578063f6326fb31461101d578063f656ba511461102557600080fd5b8063db006a7511610108578063db006a7514610ef8578063db43e86214610f18578063dd62ed3e14610f4c578063e278fe6f14610f92578063e73c63d514610fa757600080fd5b8063ca59409414610e59578063ce7c2ac214610e6e578063cf3afa5114610e8e578063d164cc1514610ec2578063d5f2638214610ee257600080fd5b8063a457c2d7116101dd578063ad5c4648116101a1578063ad5c464814610da4578063ad7a672f14610dd8578063afa6626414610ded578063b4d1d79514610e0d578063b6b55f2514610e24578063b9f8092b14610e4457600080fd5b8063a457c2d714610d0e578063a694fc3a14610d2e578063a6f7f5d614610d4e578063a9059cbb14610d64578063aced166114610d8457600080fd5b80639be43daa116102245780639be43daa14610b9f5780639fcc2d7514610bbf578063a083ff1714610c6b578063a285c9e814610cce578063a2db9d8314610cf057600080fd5b80638b10cc7c14610b185780638da5cb5b14610b36578063947061b514610b5457806395d89b4114610b7557806399530b0614610b8a57600080fd5b806347786d371161038757806369b41170116103045780637a9262a2116102c85780637a9262a214610a075780637e108d5214610a6b57806383536ff314610a8b57806387153eb114610aa15780638778878214610ace57806389a3027114610ae457600080fd5b806369b41170146109725780636f31ab341461098757806370897b231461099c57806370a08231146109bc578063715018a6146109f257600080fd5b80635ea8cd121161034b5780635ea8cd1214610865578063600a2cfb14610885578063650cce8a1461089a5780636719b2ee146108ce578063692308681461095257600080fd5b806347786d37146107d85780634b2431d9146107f8578063503c70aa1461080f57806355489bb214610825578063573f0d6e1461084557600080fd5b8063313ce567116104155780633f23bb73116103d95780633f23bb73146107445780633f90916a14610764578063432833a6146107825780634603c0aa1461079857806346904840146107b857600080fd5b8063313ce5671461068e578063355274ea146106b857806336efd16f146106d657806339509351146106f65780633ec143d31461071657600080fd5b80631a92f6c21161045c5780631a92f6c21461054f57806323b872dd1461059b5780632728f333146105bb5780632775d01c1461064e57806330630da41461066e57600080fd5b8063048bf0851461049957806306fdde03146104bb578063095ea7b3146104e65780630cbf54c81461051657806318160ddd1461053a575b600080fd5b3480156104a557600080fd5b506104b96104b4366004614e83565b611106565b005b3480156104c757600080fd5b506104d061115c565b6040516104dd9190615267565b60405180910390f35b3480156104f257600080fd5b50610506610501366004614f17565b6111ee565b60405190151581526020016104dd565b34801561052257600080fd5b5061052c60fb5481565b6040519081526020016104dd565b34801561054657600080fd5b5060995461052c565b34801561055b57600080fd5b506105837f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016104dd565b3480156105a757600080fd5b506105066105b6366004614ed7565b611205565b3480156105c757600080fd5b5060cf5460d0546106099161ffff8116916001600160681b03620100008304811692600160781b900416906001600160801b0380821691600160801b90041685565b6040805161ffff90961686526001600160681b03948516602087015293909216928401929092526001600160801b03918216606084015216608082015260a0016104dd565b34801561065a57600080fd5b506104b9610669366004615088565b6112b1565b34801561067a57600080fd5b506104b9610689366004614e83565b611454565b34801561069a57600080fd5b5060cc54610100900460ff1660405160ff90911681526020016104dd565b3480156106c457600080fd5b5060ce546001600160681b031661052c565b3480156106e257600080fd5b506104b96106f13660046150b8565b6114ec565b34801561070257600080fd5b50610506610711366004614f17565b611574565b34801561072257600080fd5b5060f9546107319061ffff1681565b60405161ffff90911681526020016104dd565b34801561075057600080fd5b5061052c61075f366004614e83565b6115b0565b34801561077057600080fd5b5060d0546001600160801b031661052c565b34801561078e57600080fd5b5061052c60fc5481565b3480156107a457600080fd5b506104b96107b3366004614e83565b611603565b3480156107c457600080fd5b5060d354610583906001600160a01b031681565b3480156107e457600080fd5b506104b96107f3366004615088565b6116a5565b34801561080457600080fd5b5061052c6101025481565b34801561081b57600080fd5b5061052c60fd5481565b34801561083157600080fd5b506104b9610840366004615061565b611780565b34801561085157600080fd5b506104b9610860366004614e83565b611818565b34801561087157600080fd5b506104b9610880366004615088565b611865565b34801561089157600080fd5b506104b96118d0565b3480156108a657600080fd5b506105837f000000000000000000000000000000000000000000000000000000000000000081565b3480156108da57600080fd5b506109216108e9366004614e83565b60c96020526000908152604090205461ffff8116906201000081046001600160681b031690600160781b90046001600160801b031683565b6040805161ffff90941684526001600160681b0390921660208401526001600160801b0316908201526060016104dd565b34801561095e57600080fd5b506104b961096d366004614f78565b6119e0565b34801561097e57600080fd5b5061052c600081565b34801561099357600080fd5b506104b9611abe565b3480156109a857600080fd5b506104b96109b7366004615088565b611afb565b3480156109c857600080fd5b5061052c6109d7366004614e83565b6001600160a01b031660009081526097602052604090205490565b3480156109fe57600080fd5b506104b9611bc2565b348015610a1357600080fd5b50610a49610a22366004614e83565b60cb6020526000908152604090205461ffff8116906201000090046001600160801b031682565b6040805161ffff90931683526001600160801b039091166020830152016104dd565b348015610a7757600080fd5b506104b9610a86366004615088565b611bf8565b348015610a9757600080fd5b5061052c60f75481565b348015610aad57600080fd5b5061052c610abc366004615088565b60ca6020526000908152604090205481565b348015610ada57600080fd5b5061052c60d55481565b348015610af057600080fd5b506105837f000000000000000000000000000000000000000000000000000000000000000081565b348015610b2457600080fd5b5060d2546001600160a01b0316610583565b348015610b4257600080fd5b506065546001600160a01b0316610583565b348015610b6057600080fd5b5061010354610583906001600160a01b031681565b348015610b8157600080fd5b506104d0611c42565b348015610b9657600080fd5b5061052c611c51565b348015610bab57600080fd5b506104b9610bba366004615088565b611c8b565b348015610bcb57600080fd5b5060cc5460cd5460ce54610c1b9260ff808216936101008304909116926001600160a01b036201000090930483169282169166ffffffffffffff600160a01b90910416906001600160681b031686565b60408051961515875260ff90951660208701526001600160a01b03938416948601949094529116606084015266ffffffffffffff1660808301526001600160681b031660a082015260c0016104dd565b348015610c7757600080fd5b5060d15460d254610ca2916001600160a01b039081169190811690600160a01b900463ffffffff1683565b604080516001600160a01b03948516815293909216602084015263ffffffff16908201526060016104dd565b348015610cda57600080fd5b5060d254600160a01b900463ffffffff1661052c565b348015610cfc57600080fd5b5060d1546001600160a01b0316610583565b348015610d1a57600080fd5b50610506610d29366004614f17565b611d85565b348015610d3a57600080fd5b506104b9610d49366004615088565b611e1e565b348015610d5a57600080fd5b5061052c60d65481565b348015610d7057600080fd5b50610506610d7f366004614f17565b611f1c565b348015610d9057600080fd5b5060d454610583906001600160a01b031681565b348015610db057600080fd5b506105837f000000000000000000000000000000000000000000000000000000000000000081565b348015610de457600080fd5b5061052c611f29565b348015610df957600080fd5b5060f554610583906001600160a01b031681565b348015610e1957600080fd5b5061052c62093a8081565b348015610e3057600080fd5b506104b9610e3f366004615088565b612057565b348015610e5057600080fd5b506104b96120c4565b348015610e6557600080fd5b506104b96122ba565b348015610e7a57600080fd5b5061052c610e89366004614e83565b61235d565b348015610e9a57600080fd5b506105837f000000000000000000000000000000000000000000000000000000000000000081565b348015610ece57600080fd5b506104b9610edd366004614e83565b61237a565b348015610eee57600080fd5b5061052c60f85481565b348015610f0457600080fd5b506104b9610f13366004615088565b612409565b348015610f2457600080fd5b506105837f000000000000000000000000000000000000000000000000000000000000000081565b348015610f5857600080fd5b5061052c610f67366004614e9f565b6001600160a01b03918216600090815260986020908152604080832093909416825291909152205490565b348015610f9e57600080fd5b506104b9612476565b348015610fb357600080fd5b5061052c60fa5481565b348015610fc957600080fd5b506104b9610fd8366004614e83565b61262a565b348015610fe957600080fd5b506104b9610ff8366004615005565b61271d565b34801561100957600080fd5b506104b9611018366004614e83565b612975565b6104b9612a10565b34801561103157600080fd5b50611045611040366004614e83565b612b61565b604080519283526020830191909152016104dd565b34801561106657600080fd5b506104b9612c44565b34801561107b57600080fd5b506104b9612c99565b34801561109057600080fd5b5060f654610583906001600160a01b031681565b3480156110b057600080fd5b5061010054610583906001600160a01b031681565b3480156110d157600080fd5b5061010154610583906001600160a01b031681565b3480156110f257600080fd5b506104b9611101366004615088565b612ef2565b6065546001600160a01b031633146111395760405162461bcd60e51b8152600401611130906152e9565b60405180910390fd5b61010080546001600160a01b0319166001600160a01b0392909216919091179055565b6060609a805461116b906156d6565b80601f0160208091040260200160405190810160405280929190818152602001828054611197906156d6565b80156111e45780601f106111b9576101008083540402835291602001916111e4565b820191906000526020600020905b8154815290600101906020018083116111c757829003601f168201915b5050505050905090565b60006111fb338484612fd3565b5060015b92915050565b60006112128484846130f8565b6001600160a01b0384166000908152609860209081526040808320338452909152902054828110156112975760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b6064820152608401611130565b6112a48533858403612fd3565b60019150505b9392505050565b600260015414156112d45760405162461bcd60e51b81526004016111309061533f565b600260015533600090815260c96020526040902060cf5461ffff168261130c5760405162461bcd60e51b81526004016111309061531e565b815461ffff1681146113505760405162461bcd60e51b815260206004820152600d60248201526c125b9d985b1a59081c9bdd5b99609a1b6044820152606401611130565b81546201000090046001600160681b0316838110156113a15760405162461bcd60e51b815260206004820152600d60248201526c115e18d9595908185b5bdd5b9d609a1b6044820152606401611130565b6113ab81856132c8565b83546001600160681b0391909116620100000262010000600160781b031990911617835560d0546113e5906001600160801b0316856132c8565b60d080546001600160801b0319166001600160801b0392909216919091179055604080518581526020810184905233917fab2daf3c146ca6416cbccd2a86ed2ba995e171ef6319df14a38aef01403a9c96910160405180910390a261144a33856132d4565b5050600180555050565b6065546001600160a01b0316331461147e5760405162461bcd60e51b8152600401611130906152e9565b6001600160a01b0381166114ca5760405162461bcd60e51b815260206004820152601360248201527210b732bba9ba3934b5b2a9b2b632b1ba34b7b760691b6044820152606401611130565b60f680546001600160a01b0319166001600160a01b0392909216919091179055565b6002600154141561150f5760405162461bcd60e51b81526004016111309061533f565b6002600155816115315760405162461bcd60e51b81526004016111309061531e565b6001600160a01b03811661154457600080fd5b61154e8282613435565b60cc5461156c906201000090046001600160a01b03163330856136c7565b505060018055565b3360008181526098602090815260408083206001600160a01b038716845290915281205490916111fb9185906115ab908690615551565b612fd3565b60cc5460009060ff61010090910416816115e66115cc60995490565b6115d4611f29565b60d0546001600160801b031685613732565b90506115fb6115f48561235d565b8284613772565b949350505050565b6065546001600160a01b0316331461162d5760405162461bcd60e51b8152600401611130906152e9565b6001600160a01b0381166116835760405162461bcd60e51b815260206004820152601860248201527f216e65774f7074696f6e735072656d69756d50726963657200000000000000006044820152606401611130565b60f580546001600160a01b0319166001600160a01b0392909216919091179055565b6065546001600160a01b031633146116cf5760405162461bcd60e51b8152600401611130906152e9565b600081116117095760405162461bcd60e51b81526020600482015260076024820152660216e65774361760cc1b6044820152606401611130565b611712816137d4565b60ce54604080516001600160681b039092168252602082018390527f5f86edbb9d92228a9edc3f0ebc0f001bda1ea345ac7335e0eeef3504b31d1a1c910160405180910390a160ce80546cffffffffffffffffffffffffff19166001600160681b0392909216919091179055565b6065546001600160a01b031633146117aa5760405162461bcd60e51b8152600401611130906152e9565b6000816001600160801b0316116117f25760405162461bcd60e51b815260206004820152600c60248201526b21737472696b65507269636560a01b6044820152606401611130565b6001600160801b031660fa5560cf5460f9805461ffff191661ffff909216919091179055565b6065546001600160a01b031633146118425760405162461bcd60e51b8152600401611130906152e9565b61010380546001600160a01b0319166001600160a01b0392909216919091179055565b60d4546001600160a01b0316331461188f5760405162461bcd60e51b81526004016111309061527a565b600081116118cb5760405162461bcd60e51b8152602060048201526009602482015268216d696e507269636560b81b6044820152606401611130565b60f855565b60d4546001600160a01b031633146118fa5760405162461bcd60e51b81526004016111309061527a565b6002600154141561191d5760405162461bcd60e51b81526004016111309061533f565b600260015560d2546040516358ffbb3d60e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081166004830152909116602482015273f7f4260943db50eee7e917330c35b460ff70ad54906358ffbb3d9060440160206040518083038186803b1580156119a157600080fd5b505af41580156119b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119d991906150a0565b5060018055565b60d4546001600160a01b03163314611a0a5760405162461bcd60e51b81526004016111309061527a565b60026001541415611a2d5760405162461bcd60e51b81526004016111309061533f565b600260015560fc54604051633545cbf360e21b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163d5172fcc91611a84919086908690600401615449565b600060405180830381600087803b158015611a9e57600080fd5b505af1158015611ab2573d6000803e3d6000fd5b50506001805550505050565b60026001541415611ae15760405162461bcd60e51b81526004016111309061533f565b6002600181905550611af56000600161381e565b60018055565b6065546001600160a01b03163314611b255760405162461bcd60e51b8152600401611130906152e9565b611b33620f42406064615674565b8110611b815760405162461bcd60e51b815260206004820152601760248201527f496e76616c696420706572666f726d616e6365206665650000000000000000006044820152606401611130565b60d55460408051918252602082018390527f24867dfb6fcb9970a07be21024956524abe7a1837faa903ff0e99aaa40cf893e910160405180910390a160d555565b6065546001600160a01b03163314611bec5760405162461bcd60e51b8152600401611130906152e9565b611bf660006139cd565b565b60026001541415611c1b5760405162461bcd60e51b81526004016111309061533f565b6002600155611c2981613a1f565b61010254611c379082613be6565b610102555060018055565b6060609b805461116b906156d6565b6000611c86611c5f60995490565b611c67611f29565b60d05460cc546001600160801b0390911690610100900460ff16613732565b905090565b60026001541415611cae5760405162461bcd60e51b81526004016111309061533f565b600260015580611ced5760405162461bcd60e51b815260206004820152600a602482015269216e756d526f756e647360b01b6044820152606401611130565b60cf5461ffff1660005b82811015611d7c576000611d0b8284615551565b600081815260ca602052604090205490915015611d585760405162461bcd60e51b815260206004820152600b60248201526a125b9a5d1a585b1a5e995960aa1b6044820152606401611130565b600090815260ca602052604090206001905580611d7481615711565b915050611cf7565b50506001805550565b3360009081526098602090815260408083206001600160a01b038616845290915281205482811015611e075760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401611130565b611e143385858403612fd3565b5060019392505050565b60026001541415611e415760405162461bcd60e51b81526004016111309061533f565b6002600155610100546001600160a01b031680611e5d57600080fd5b60008211611e6a57600080fd5b3360009081526097602052604090205482811015611e9657611e96611e8f84836132c8565b600061381e565b611ea13330856130f8565b611eac308385612fd3565b6040516383df674760e01b815260048101849052336024820152600060448201526001600160a01b038316906383df674790606401600060405180830381600087803b158015611efb57600080fd5b505af1158015611f0f573d6000803e3d6000fd5b5050600180555050505050565b60006111fb3384846130f8565b60d2546000906001600160a01b0316611fbc5760cc546040516370a0823160e01b8152306004820152620100009091046001600160a01b0316906370a082319060240160206040518083038186803b158015611f8457600080fd5b505afa158015611f98573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c8691906150a0565b60cc546040516370a0823160e01b8152306004820152611c86916201000090046001600160a01b0316906370a082319060240160206040518083038186803b15801561200757600080fd5b505afa15801561201b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061203f91906150a0565b60cf546201000090046001600160681b031690613be6565b6002600154141561207a5760405162461bcd60e51b81526004016111309061533f565b60026001558061209c5760405162461bcd60e51b81526004016111309061531e565b6120a68133613435565b60cc546119d9906201000090046001600160a01b03163330846136c7565b60d4546001600160a01b031633146120ee5760405162461bcd60e51b81526004016111309061527a565b600260015414156121115760405162461bcd60e51b81526004016111309061533f565b600260015560d1546001600160a01b03168061215d5760405162461bcd60e51b815260206004820152600b60248201526a10b732bc3a27b83a34b7b760a91b6044820152606401611130565b60d280546001600160a01b03199081166001600160a01b03841690811790925560d18054909116905560cf54604051620100009091046001600160681b03168082529133917f045c558fdce4714c5816d53820d27420f4cd860892df203fe636384d8d19aa019060200160405180910390a3604051632904c23960e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811660048301527f000000000000000000000000000000000000000000000000000000000000000081166024830152831660448201526064810182905273f7f4260943db50eee7e917330c35b460ff70ad5490632904c2399060840160206040518083038186803b15801561227957600080fd5b505af415801561228d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122b191906150a0565b5061156c613bf2565b610103546001600160a01b0316806122d157600080fd5b6122dd6000600161381e565b33600081815260976020526040902054906122f9908383612fd3565b60405163c9c2d4f560e01b8152336004820152602481018290526001600160a01b0383169063c9c2d4f590604401600060405180830381600087803b15801561234157600080fd5b505af1158015612355573d6000803e3d6000fd5b505050505050565b600080600061236b84612b61565b90925090506115fb8282613be6565b6065546001600160a01b031633146123a45760405162461bcd60e51b8152600401611130906152e9565b6001600160a01b0381166123e75760405162461bcd60e51b815260206004820152600a60248201526910b732bba5b2b2b832b960b11b6044820152606401611130565b60d480546001600160a01b0319166001600160a01b0392909216919091179055565b6002600154141561242c5760405162461bcd60e51b81526004016111309061533f565b60026001558061246b5760405162461bcd60e51b815260206004820152600a602482015269216e756d53686172657360b01b6044820152606401611130565b6119d981600061381e565b600260015414156124995760405162461bcd60e51b81526004016111309061533f565b600260015560d2546001600160a01b0316801515806124be575060cf5461ffff166001145b6124f95760405162461bcd60e51b815260206004820152600c60248201526b149bdd5b990818db1bdcd95960a21b6044820152606401611130565b61250281613cc4565b600061010254905060008061251960fd5484613e3a565b60fd81905560d054919350915060009061254390600160801b90046001600160801b031685613be6565b905061254e816140c1565b60d080546001600160801b03808416600160801b029116179055600061010255612577836137d4565b60cf805462010000600160781b031916620100006001600160681b0386160217905560006125a54282613be6565b905063ffffffff8111156125fb5760405162461bcd60e51b815260206004820152601860248201527f4f766572666c6f77206e6578744f7074696f6e526561647900000000000000006044820152606401611130565b60d2805463ffffffff909216600160a01b0263ffffffff60a01b19909216919091179055505060018055505050565b6065546001600160a01b031633146126545760405162461bcd60e51b8152600401611130906152e9565b6001600160a01b03811661269d5760405162461bcd60e51b815260206004820152601060248201526f085b995dd19959549958da5c1a595b9d60821b6044820152606401611130565b60d3546001600160a01b03828116911614156126fb5760405162461bcd60e51b815260206004820152601860248201527f4d757374206265206e657720666565526563697069656e7400000000000000006044820152606401611130565b60d380546001600160a01b0319166001600160a01b0392909216919091179055565b600054610100900460ff1680612736575060005460ff16155b6127525760405162461bcd60e51b81526004016111309061529b565b600054610100900460ff16158015612774576000805461ffff19166101011790555b6128396127846020850185614e83565b6127946040860160208701614e83565b6127a46060870160408801614e83565b606087013560808801356127bb60a08a018a61550c565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506127fd9250505060c08b018b61550c565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508c925061410b915050565b600061284c610100850160e08601614e83565b6001600160a01b0316141561289c5760405162461bcd60e51b815260206004820152601660248201527510afb7b83a34b7b739a83932b6b4bab6a83934b1b2b960511b6044820152606401611130565b60006128b061012085016101008601614e83565b6001600160a01b031614156128fb5760405162461bcd60e51b815260206004820152601160248201527010afb9ba3934b5b2a9b2b632b1ba34b7b760791b6044820152606401611130565b61290c610100840160e08501614e83565b60f580546001600160a01b0319166001600160a01b039290921691909117905561293e61012084016101008501614e83565b60f680546001600160a01b0319166001600160a01b03929092169190911790558015612970576000805461ff00191690555b505050565b6065546001600160a01b0316331461299f5760405162461bcd60e51b8152600401611130906152e9565b6001600160a01b038116612a045760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401611130565b612a0d816139cd565b50565b60026001541415612a335760405162461bcd60e51b81526004016111309061533f565b600260015560cc547f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03908116620100009092041614612aa45760405162461bcd60e51b8152602060048201526005602482015264042ae8aa8960db1b6044820152606401611130565b60003411612add5760405162461bcd60e51b81526020600482015260066024820152652176616c756560d01b6044820152606401611130565b612ae73433613435565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b158015612b4257600080fd5b505af1158015612b56573d6000803e3d6000fd5b505060018055505050565b6001600160a01b038116600090815260c9602090815260408083208151606081018352905461ffff81168083526201000082046001600160681b031694830194909452600160781b90046001600160801b031691810191909152829160011115612be3575050506001600160a01b031660009081526097602052604081205491565b60cf54815161ffff908116600090815260ca602052604081205460cc549193612c1993869391169190610100900460ff1661434a565b9050612c3a856001600160a01b031660009081526097602052604090205490565b9590945092505050565b60026001541415612c675760405162461bcd60e51b81526004016111309061533f565b60026001556000612c766143bb565b60fd54909150612c8690826132c8565b6001600160801b031660fd555060018055565b60d4546001600160a01b03163314612cc35760405162461bcd60e51b81526004016111309061527a565b60026001541415612ce65760405162461bcd60e51b81526004016111309061533f565b600260015560d2546001600160a01b031680158015612d0c575060cf5461ffff16600114155b612d4b5760405162461bcd60e51b815260206004820152601060248201526f149bdd5b99081b9bdd0818db1bdcd95960821b6044820152606401611130565b60408051610120810182526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811682527f00000000000000000000000000000000000000000000000000000000000000008116602083015260cc8054620100009004821683850152848216606084015260006080840181905260f95461ffff1660a085015260fa5460c085015260f654831660e085015260f55490921661010084015292516377e3ce0d60e11b8152919290918291829173f7f4260943db50eee7e917330c35b460ff70ad549163efc79c1a91612e3791889160cf90600401615376565b60606040518083038186803b158015612e4f57600080fd5b505af4158015612e63573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e879190614f42565b604080518381526020810183905293965091945092507fa217999b1c125c2a996f712c5f26a28addad7167bd8a67d5bd5b2a751148abb0910160405180910390a1505060d180546001600160a01b0319166001600160a01b0392909216919091179055505060018055565b6065546001600160a01b03163314612f1c5760405162461bcd60e51b8152600401611130906152e9565b612f2a620f42406064615674565b8110612f715760405162461bcd60e51b8152602060048201526016602482015275496e76616c6964206d616e6167656d656e742066656560501b6044820152606401611130565b6000612f8e63031ba309612f8884620f4240614578565b90614584565b60d65460408051918252602082018590529192507f4e874b007ab14f7e263baefd44951834c8266f4f224d1092e49e9c254354cc54910160405180910390a160d65550565b6001600160a01b0383166130355760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401611130565b6001600160a01b0382166130965760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401611130565b6001600160a01b0383811660008181526098602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b6001600160a01b03831661315c5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401611130565b6001600160a01b0382166131be5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401611130565b6001600160a01b038316600090815260976020526040902054818110156132365760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401611130565b6001600160a01b0380851660009081526097602052604080822085850390559185168152908120805484929061326d908490615551565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516132b991815260200190565b60405180910390a35b50505050565b60006112aa8284615693565b60cc546001600160a01b03620100009091048116907f00000000000000000000000000000000000000000000000000000000000000001681141561342157604051632e1a7d4d60e01b8152600481018390527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690632e1a7d4d90602401600060405180830381600087803b15801561337457600080fd5b505af1158015613388573d6000803e3d6000fd5b505050506000836001600160a01b03168360405160006040518083038185875af1925050503d80600081146133d9576040519150601f19603f3d011682016040523d82523d6000602084013e6133de565b606091505b50509050806132c25760405162461bcd60e51b815260206004820152600f60248201526e151c985b9cd9995c8819985a5b1959608a1b6044820152606401611130565b6129706001600160a01b0382168484614590565b60cf5461ffff1660006134508461344a611f29565b90613be6565b60ce549091506001600160681b031681111561349b5760405162461bcd60e51b815260206004820152600a6024820152690457863656564206361760b41b6044820152606401611130565b60cd54600160a01b900466ffffffffffffff168110156134f45760405162461bcd60e51b8152602060048201526014602482015273496e73756666696369656e742062616c616e636560601b6044820152606401611130565b60408051858152602081018490526001600160a01b038516917f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a15910160405180910390a26001600160a01b038316600090815260c9602090815260408083208151606081018352905461ffff81168083526201000082046001600160681b031683860152600160781b9091046001600160801b031682840152845260ca90925282205460cc549192916135b3918491879190610100900460ff1661434a565b8251909150869061ffff168514156135e45760208301516000906135e0906001600160681b031689613be6565b9150505b6135ed816137d4565b6040805160608101825261ffff80881682526001600160681b0380851660208085019182526001600160801b038089168688019081526001600160a01b038e16600090815260c990935296822095518654935197518216600160781b02600160781b600160f81b03199890951662010000026effffffffffffffffffffffffffffff1990941695169490941791909117949094161790915560d054613693911689613be6565b905061369e816140c1565b60d080546001600160801b0319166001600160801b039290921691909117905550505050505050565b6040516001600160a01b03808516602483015283166044820152606481018290526132c29085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526145c0565b60008061374083600a6155cc565b9050600086116137505780613768565b61376886612f8861376188886132c8565b8490614578565b9695505050505050565b6000600183116137bc5760405162461bcd60e51b8152602060048201526015602482015274496e76616c6964206173736574506572536861726560581b6044820152606401611130565b6115fb6137ca83600a6155cc565b612f888686614578565b6001600160681b03811115612a0d5760405162461bcd60e51b815260206004820152601060248201526f13dd995c999b1bddc81d5a5b9d0c4c0d60821b6044820152606401611130565b33600090815260c9602090815260408083208151606081018352905461ffff8082168084526201000083046001600160681b031684870152600160781b9092046001600160801b03168385015260cf5491865260ca9094529184205460cc54919492909316926138999185918591610100900460ff1661434a565b9050836138a657846138a8565b805b9450846138b6575050505050565b808511156138fa5760405162461bcd60e51b81526020600482015260116024820152704578636565647320617661696c61626c6560781b6044820152606401611130565b825161ffff168211156139275733600090815260c960205260409020805462010000600160781b03191690555b613930856140c1565b61393a81866132c8565b33600081815260c960205260409081902080546001600160801b0394909416600160781b02600160781b600160f81b0319909416939093179092558451915190917fe5b754fb1abb7f01b499791d0b820ae3b6af3424ac1c59768edb53f4ec31a929916139b39189825261ffff16602082015260400190565b60405180910390a26139c63033876130f8565b5050505050565b606580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60008111613a5c5760405162461bcd60e51b815260206004820152600a602482015269216e756d53686172657360b01b6044820152606401611130565b33600090815260c960205260409020546201000090046001600160681b0316151580613aa6575033600090815260c96020526040902054600160781b90046001600160801b031615155b15613ab757613ab76000600161381e565b60cf5433600081815260cb60209081526040918290208054835187815261ffff96871693810184905292959194911685149290917f0c53c82ad07e2d592d88ece3b066777dd60f1118e2a081b380efc4358f0d9e2a910160405180910390a281546201000090046001600160801b031660008215613b4057613b398287613be6565b9050613ba3565b8115613b825760405162461bcd60e51b81526020600482015260116024820152704578697374696e6720776974686472617760781b6044820152606401611130565b5033600090815260cb60205260409020805461ffff191661ffff8616179055845b613bac816140c1565b33600081815260cb60205260409020805462010000600160901b031916620100006001600160801b038516021790556123559030886130f8565b60006112aa8284615551565b60d25460f8546040516301c6654960e21b81526001600160a01b0392831660048201819052602482018390527f0000000000000000000000000000000000000000000000000000000000000000909316604482015260cc606482015273f7f4260943db50eee7e917330c35b460ff70ad549063071995249060840160206040518083038186803b158015613c8557600080fd5b505af4158015613c99573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613cbd91906150a0565b60fc555050565b60cf546201000090046001600160681b03166001600160a01b03821615613d105760cf80546cffffffffffffffffffffffffff60781b1916600160781b6001600160681b038416021790555b60cf805462010000600160781b031916905560d280546001600160a01b03191690556001600160a01b03821615613e3657604051636c6fe87f60e11b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016600482015260009073f7f4260943db50eee7e917330c35b460ff70ad549063d8dfd0fe9060240160206040518083038186803b158015613db757600080fd5b505af4158015613dcb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613def91906150a0565b9050336001600160a01b0316836001600160a01b03167f7e830f7c1771deb1bdb35c4a7e6051bbac32b376f7f4e4976b8618b0b11997f7836040516130eb91815260200190565b5050565b60d3546040805160e08101825260cc54610100810460ff16825291516370a0823160e01b815230600482015260009384936001600160a01b0391821693859384938493849373f7f4260943db50eee7e917330c35b460ff70ad549363d9b874389360cf93602084019262010000909104909116906370a082319060240160206040518083038186803b158015613ecf57600080fd5b505afa158015613ee3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613f0791906150a0565b8152602001613f1560995490565b81526020018d815260200160d554815260200160d65481526020018c8152506040518363ffffffff1660e01b8152600401613fa292919060006101008201905083825282516020830152602083015160408301526040830151606083015260608301516080830152608083015160a083015260a083015160c083015260c083015160e08301529392505050565b60c06040518083038186803b158015613fba57600080fd5b505af4158015613fce573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613ff291906150dc565b60cf5461ffff16600081815260ca60209081526040918290208790558151858152908101849052908101829052969d50949b50919850965094509250906001600160a01b038716907f0a242f7ecaf711036ca770774ceffae28e60ef042ac113ddd187f2631db0c0069060600160405180910390a260d080546001600160801b0319169055614082816001615551565b60cf805461ffff191661ffff92909216919091179055506140a590503084614692565b80156140b5576140b584826132d4565b505050505b9250929050565b6001600160801b03811115612a0d5760405162461bcd60e51b815260206004820152601060248201526f09eeccae4ccd8deee40ead2dce86264760831b6044820152606401611130565b600054610100900460ff1680614124575060005460ff16155b6141405760405162461bcd60e51b81526004016111309061529b565b600054610100900460ff16158015614162576000805461ffff19166101011790555b60405163c72733f760e01b815273f7f4260943db50eee7e917330c35b460ff70ad549063c72733f7906141a7908c908c908c908b908d908c908c908c9060040161516d565b60006040518083038186803b1580156141bf57600080fd5b505af41580156141d3573d6000803e3d6000fd5b505050506141df614771565b6141e984846147e4565b6141f1614863565b6141fa89612975565b60d480546001600160a01b03808b166001600160a01b03199283161790925560d38054928a169290911691909117905560d585905561424463031ba309612f8888620f4240614578565b60d6558160cc6142548282615769565b505060cc546040516370a0823160e01b81523060048201526000916201000090046001600160a01b0316906370a082319060240160206040518083038186803b1580156142a057600080fd5b505afa1580156142b4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906142d891906150a0565b90506142e3816137d4565b60cf805461ffff196001600160681b03909316600160781b02929092167fffffffff00000000000000000000000000ffffffffffffffffffffffffff0000909216919091176001179055801561433f576000805461ff00191690555b505050505050505050565b835160009061ffff16158015906143655750845161ffff1684115b156143a757600061438486602001516001600160681b031685856148ca565b604087015190915061439f906001600160801b031682613be6565b9150506115fb565b50505050604001516001600160801b031690565b33600090815260cb6020526040812080546001600160801b03620100008204169061ffff168161441d5760405162461bcd60e51b815260206004820152600d60248201526c139bdd081a5b9a5d1a585d1959609a1b6044820152606401611130565b60cf5461ffff1681106144655760405162461bcd60e51b815260206004820152601060248201526f149bdd5b99081b9bdd0818db1bdcd95960821b6044820152606401611130565b33600090815260cb60205260409020805462010000600160901b031916905560d0546144a190600160801b90046001600160801b0316836132c8565b60d080546001600160801b03928316600160801b029216919091179055600081815260ca602052604081205460cc546144e491859160ff61010090910416613772565b604080518281526020810186905291925033917ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b568910160405180910390a261452c308461492d565b6000811161456e5760405162461bcd60e51b815260206004820152600f60248201526e085dda5d1a191c985dd05b5bdd5b9d608a1b6044820152606401611130565b6115fb33826132d4565b60006112aa8284615674565b60006112aa8284615569565b6040516001600160a01b03831660248201526044810182905261297090849063a9059cbb60e01b906064016136fb565b6000614615826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316614a7b9092919063ffffffff16565b80519091501561297057808060200190518101906146339190614fe9565b6129705760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401611130565b6001600160a01b0382166146e85760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401611130565b80609960008282546146fa9190615551565b90915550506001600160a01b03821660009081526097602052604081208054839290614727908490615551565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b600054610100900460ff168061478a575060005460ff16155b6147a65760405162461bcd60e51b81526004016111309061529b565b600054610100900460ff161580156147c8576000805461ffff19166101011790555b6147d0614a8a565b8015612a0d576000805461ff001916905550565b600054610100900460ff16806147fd575060005460ff16155b6148195760405162461bcd60e51b81526004016111309061529b565b600054610100900460ff1615801561483b576000805461ffff19166101011790555b614843614af9565b61484d8383614b63565b8015612970576000805461ff0019169055505050565b600054610100900460ff168061487c575060005460ff16155b6148985760405162461bcd60e51b81526004016111309061529b565b600054610100900460ff161580156148ba576000805461ffff19166101011790555b6148c2614af9565b6147d0614bf8565b6000600183116149145760405162461bcd60e51b8152602060048201526015602482015274496e76616c6964206173736574506572536861726560581b6044820152606401611130565b6115fb83612f8861492685600a6155cc565b8790614578565b6001600160a01b03821661498d5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401611130565b6001600160a01b03821660009081526097602052604090205481811015614a015760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401611130565b6001600160a01b0383166000908152609760205260408120838303905560998054849290614a30908490615693565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b60606115fb8484600085614c58565b600054610100900460ff1680614aa3575060005460ff16155b614abf5760405162461bcd60e51b81526004016111309061529b565b600054610100900460ff16158015614ae1576000805461ffff19166101011790555b600180558015612a0d576000805461ff001916905550565b600054610100900460ff1680614b12575060005460ff16155b614b2e5760405162461bcd60e51b81526004016111309061529b565b600054610100900460ff161580156147d0576000805461ffff19166101011790558015612a0d576000805461ff001916905550565b600054610100900460ff1680614b7c575060005460ff16155b614b985760405162461bcd60e51b81526004016111309061529b565b600054610100900460ff16158015614bba576000805461ffff19166101011790555b8251614bcd90609a906020860190614db9565b508151614be190609b906020850190614db9565b508015612970576000805461ff0019169055505050565b600054610100900460ff1680614c11575060005460ff16155b614c2d5760405162461bcd60e51b81526004016111309061529b565b600054610100900460ff16158015614c4f576000805461ffff19166101011790555b6147d0336139cd565b606082471015614cb95760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401611130565b843b614d075760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401611130565b600080866001600160a01b03168587604051614d239190615151565b60006040518083038185875af1925050503d8060008114614d60576040519150601f19603f3d011682016040523d82523d6000602084013e614d65565b606091505b5091509150614d75828286614d80565b979650505050505050565b60608315614d8f5750816112aa565b825115614d9f5782518084602001fd5b8160405162461bcd60e51b81526004016111309190615267565b828054614dc5906156d6565b90600052602060002090601f016020900481019282614de75760008555614e2d565b82601f10614e0057805160ff1916838001178555614e2d565b82800160010185558215614e2d579182015b82811115614e2d578251825591602001919060010190614e12565b50614e39929150614e3d565b5090565b5b80821115614e395760008155600101614e3e565b8035614e5d8161587a565b919050565b8035614e5d8161589d565b8035614e5d816158b2565b8035614e5d816158c7565b600060208284031215614e94578081fd5b81356112aa8161587a565b60008060408385031215614eb1578081fd5b8235614ebc8161587a565b91506020830135614ecc8161587a565b809150509250929050565b600080600060608486031215614eeb578081fd5b8335614ef68161587a565b92506020840135614f068161587a565b929592945050506040919091013590565b60008060408385031215614f29578182fd5b8235614f348161587a565b946020939093013593505050565b600080600060608486031215614f56578283fd5b8351614f618161587a565b602085015160409095015190969495509392505050565b60008060208385031215614f8a578182fd5b823567ffffffffffffffff80821115614fa1578384fd5b818501915085601f830112614fb4578384fd5b813581811115614fc2578485fd5b86602061012083028501011115614fd7578485fd5b60209290920196919550909350505050565b600060208284031215614ffa578081fd5b81516112aa8161588f565b60008082840360e0811215615018578283fd5b833567ffffffffffffffff81111561502e578384fd5b84016101208187031215615040578384fd5b925060c0601f1982011215615053578182fd5b506020830190509250929050565b600060208284031215615072578081fd5b81356001600160801b03811681146112aa578182fd5b600060208284031215615099578081fd5b5035919050565b6000602082840312156150b1578081fd5b5051919050565b600080604083850312156150ca578182fd5b823591506020830135614ecc8161587a565b60008060008060008060c087890312156150f4578384fd5b865195506020870151945060408701519350606087015192506080870151915060a087015190509295509295509295565b6000815180845261513d8160208601602086016156aa565b601f01601f19169290920160200192915050565b600082516151638184602087016156aa565b9190910192915050565b60006101a060018060a01b03808c168452808b166020850152808a1660408501528860608501528760808501528160a08501526151ac82850188615125565b915083820360c08501526151c08287615125565b9250843591506151cf8261588f565b90151560e08401526020840135906151e6826158c7565b60ff8216610100850152604085013591506152008261587a565b1661012083015261521360608401614e52565b6001600160a01b031661014083015261522e60808401614e6d565b66ffffffffffffff1661016083015261524960a08401614e62565b6001600160681b038116610180840152509998505050505050505050565b6020815260006112aa6020830184615125565b60208082526007908201526610b5b2b2b832b960c91b604082015260600190565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526007908201526608585b5bdd5b9d60ca1b604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b83516001600160a01b031681526020808501516101608301916153a3908401826001600160a01b03169052565b5060408501516153be60408401826001600160a01b03169052565b5060608501516153d960608401826001600160a01b03169052565b506080850151608083015260a08501516153f960a084018261ffff169052565b5060c085015160c083015260e085015161541e60e08401826001600160a01b03169052565b50610100858101516001600160a01b0381168483015250506101208201939093526101400152919050565b838152604060208083018290528282018490526000919060609081850187855b888110156154fd57813583528382013584840152615488868301614e52565b6001600160a01b03168684015284820135858401526080808301359084015260a06154b4818401614e52565b6001600160a01b03169084015260c06154ce838201614e78565b60ff169084015260e0828101359084015261010080830135908401526101209283019290910190600101615469565b50909998505050505050505050565b6000808335601e19843603018112615522578283fd5b83018035915067ffffffffffffffff82111561553c578283fd5b6020019150368190038213156140ba57600080fd5b600082198211156155645761556461572c565b500190565b60008261558457634e487b7160e01b81526012600452602481fd5b500490565b600181815b808511156155c45781600019048211156155aa576155aa61572c565b808516156155b757918102915b93841c939080029061558e565b509250929050565b60006112aa83836000826155e2575060016111ff565b816155ef575060006111ff565b8160018114615605576002811461560f5761562b565b60019150506111ff565b60ff8411156156205761562061572c565b50506001821b6111ff565b5060208310610133831016604e8410600b841016171561564e575081810a6111ff565b6156588383615589565b806000190482111561566c5761566c61572c565b029392505050565b600081600019048311821515161561568e5761568e61572c565b500290565b6000828210156156a5576156a561572c565b500390565b60005b838110156156c55781810151838201526020016156ad565b838111156132c25750506000910152565b600181811c908216806156ea57607f821691505b6020821081141561570b57634e487b7160e01b600052602260045260246000fd5b50919050565b60006000198214156157255761572561572c565b5060010190565b634e487b7160e01b600052601160045260246000fd5b600081356111ff8161587a565b600081356111ff8161589d565b600081356111ff816158b2565b81356157748161588f565b815460ff19811691151560ff1691821783556020840135615794816158c7565b61ff008160081b169050808361ffff1984161717845560408501356157b88161587a565b6001600160b01b0319929092169092179190911760109190911b62010000600160b01b0316178155600181016158106157f360608501615742565b82546001600160a01b0319166001600160a01b0391909116178255565b61584961581f6080850161575c565b82805466ffffffffffffff60a01b191660a09290921b66ffffffffffffff60a01b16919091179055565b50613e3661585960a0840161574f565b600283016001600160681b0382166001600160681b03198254161781555050565b6001600160a01b0381168114612a0d57600080fd5b8015158114612a0d57600080fd5b6001600160681b0381168114612a0d57600080fd5b66ffffffffffffff81168114612a0d57600080fd5b60ff81168114612a0d57600080fdfea26469706673582212200782aab6ab851c7f09062424f1b9bdf0ad5e99b5e151b65fb4cb09011bc2d81664736f6c63430008040033000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb480000000000000000000000004114b7c04bbba682130cae2ba26fc5d2473b4ddc0000000000000000000000004bec71a4ac41ee9761440f6921dd17ba1c1213b10000000000000000000000003c212a044760de5a529b3ba59363ddeccc2210be000000000000000000000000eb8cab2f4663247db8eafb556f498c861bb4e161","recompiledBytecode":"0x6101406040523480156200001257600080fd5b5060405162005c9438038062005c94833981016040819052620000359162000252565b85858484846001600160a01b0385166200007f5760405162461bcd60e51b8152602060048201526006602482015265042beeecae8d60d31b60448201526064015b60405180910390fd5b6001600160a01b038416620000c05760405162461bcd60e51b8152602060048201526006602482015265215f7573646360d01b604482015260640162000076565b6001600160a01b038116620001095760405162461bcd60e51b815260206004820152600e60248201526d0857dcddd85c10dbdb9d1c9858dd60921b604482015260640162000076565b6001600160a01b038316620001555760405162461bcd60e51b815260206004820152601160248201527010afb3b0b6b6b0a1b7b73a3937b63632b960791b604482015260640162000076565b6001600160a01b0382166200019c5760405162461bcd60e51b815260206004820152600c60248201526b0857db585c99da5b941bdbdb60a21b604482015260640162000076565b6001600160601b0319606095861b811660805293851b841660a05291841b831660c052831b821660e05290911b16610100526001600160a01b038416620002185760405162461bcd60e51b815260206004820152600f60248201526e215f6f546f6b656e466163746f727960881b604482015260640162000076565b50505060601b6001600160601b0319166101205250620002d29050565b80516001600160a01b03811681146200024d57600080fd5b919050565b60008060008060008060c087890312156200026b578182fd5b620002768762000235565b9550620002866020880162000235565b9450620002966040880162000235565b9350620002a66060880162000235565b9250620002b66080880162000235565b9150620002c660a0880162000235565b90509295509295509295565b60805160601c60a05160601c60c05160601c60e05160601c6101005160601c6101205160601c61590c6200038860003960008181610f2a0152612d60015260008181610ea001528181611a4c0152613c200152600081816108ac015261220e0152600081816105610152818161193c015281816121e60152613d58015260008181610af60152612d85015260008181610db601528181612a3d01528181612ae9015281816132eb0152613328015261590c6000f3fe6080604052600436106104945760003560e01c80638b10cc7c11610260578063ca59409411610144578063e74b981b116100c1578063f756fa2111610085578063f756fa211461105a578063f87c7d931461106f578063f957a06714611084578063f9a0be68146110a4578063fba7dc61146110c5578063fe56e232146110e657600080fd5b8063e74b981b14610fbd578063f001382714610fdd578063f2fde38b14610ffd578063f6326fb31461101d578063f656ba511461102557600080fd5b8063db006a7511610108578063db006a7514610ef8578063db43e86214610f18578063dd62ed3e14610f4c578063e278fe6f14610f92578063e73c63d514610fa757600080fd5b8063ca59409414610e59578063ce7c2ac214610e6e578063cf3afa5114610e8e578063d164cc1514610ec2578063d5f2638214610ee257600080fd5b8063a457c2d7116101dd578063ad5c4648116101a1578063ad5c464814610da4578063ad7a672f14610dd8578063afa6626414610ded578063b4d1d79514610e0d578063b6b55f2514610e24578063b9f8092b14610e4457600080fd5b8063a457c2d714610d0e578063a694fc3a14610d2e578063a6f7f5d614610d4e578063a9059cbb14610d64578063aced166114610d8457600080fd5b80639be43daa116102245780639be43daa14610b9f5780639fcc2d7514610bbf578063a083ff1714610c6b578063a285c9e814610cce578063a2db9d8314610cf057600080fd5b80638b10cc7c14610b185780638da5cb5b14610b36578063947061b514610b5457806395d89b4114610b7557806399530b0614610b8a57600080fd5b806347786d371161038757806369b41170116103045780637a9262a2116102c85780637a9262a214610a075780637e108d5214610a6b57806383536ff314610a8b57806387153eb114610aa15780638778878214610ace57806389a3027114610ae457600080fd5b806369b41170146109725780636f31ab341461098757806370897b231461099c57806370a08231146109bc578063715018a6146109f257600080fd5b80635ea8cd121161034b5780635ea8cd1214610865578063600a2cfb14610885578063650cce8a1461089a5780636719b2ee146108ce578063692308681461095257600080fd5b806347786d37146107d85780634b2431d9146107f8578063503c70aa1461080f57806355489bb214610825578063573f0d6e1461084557600080fd5b8063313ce567116104155780633f23bb73116103d95780633f23bb73146107445780633f90916a14610764578063432833a6146107825780634603c0aa1461079857806346904840146107b857600080fd5b8063313ce5671461068e578063355274ea146106b857806336efd16f146106d657806339509351146106f65780633ec143d31461071657600080fd5b80631a92f6c21161045c5780631a92f6c21461054f57806323b872dd1461059b5780632728f333146105bb5780632775d01c1461064e57806330630da41461066e57600080fd5b8063048bf0851461049957806306fdde03146104bb578063095ea7b3146104e65780630cbf54c81461051657806318160ddd1461053a575b600080fd5b3480156104a557600080fd5b506104b96104b4366004614e83565b611106565b005b3480156104c757600080fd5b506104d061115c565b6040516104dd9190615267565b60405180910390f35b3480156104f257600080fd5b50610506610501366004614f17565b6111ee565b60405190151581526020016104dd565b34801561052257600080fd5b5061052c60fb5481565b6040519081526020016104dd565b34801561054657600080fd5b5060995461052c565b34801561055b57600080fd5b506105837f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016104dd565b3480156105a757600080fd5b506105066105b6366004614ed7565b611205565b3480156105c757600080fd5b5060cf5460d0546106099161ffff8116916001600160681b03620100008304811692600160781b900416906001600160801b0380821691600160801b90041685565b6040805161ffff90961686526001600160681b03948516602087015293909216928401929092526001600160801b03918216606084015216608082015260a0016104dd565b34801561065a57600080fd5b506104b9610669366004615088565b6112b1565b34801561067a57600080fd5b506104b9610689366004614e83565b611454565b34801561069a57600080fd5b5060cc54610100900460ff1660405160ff90911681526020016104dd565b3480156106c457600080fd5b5060ce546001600160681b031661052c565b3480156106e257600080fd5b506104b96106f13660046150b8565b6114ec565b34801561070257600080fd5b50610506610711366004614f17565b611574565b34801561072257600080fd5b5060f9546107319061ffff1681565b60405161ffff90911681526020016104dd565b34801561075057600080fd5b5061052c61075f366004614e83565b6115b0565b34801561077057600080fd5b5060d0546001600160801b031661052c565b34801561078e57600080fd5b5061052c60fc5481565b3480156107a457600080fd5b506104b96107b3366004614e83565b611603565b3480156107c457600080fd5b5060d354610583906001600160a01b031681565b3480156107e457600080fd5b506104b96107f3366004615088565b6116a5565b34801561080457600080fd5b5061052c6101025481565b34801561081b57600080fd5b5061052c60fd5481565b34801561083157600080fd5b506104b9610840366004615061565b611780565b34801561085157600080fd5b506104b9610860366004614e83565b611818565b34801561087157600080fd5b506104b9610880366004615088565b611865565b34801561089157600080fd5b506104b96118d0565b3480156108a657600080fd5b506105837f000000000000000000000000000000000000000000000000000000000000000081565b3480156108da57600080fd5b506109216108e9366004614e83565b60c96020526000908152604090205461ffff8116906201000081046001600160681b031690600160781b90046001600160801b031683565b6040805161ffff90941684526001600160681b0390921660208401526001600160801b0316908201526060016104dd565b34801561095e57600080fd5b506104b961096d366004614f78565b6119e0565b34801561097e57600080fd5b5061052c600081565b34801561099357600080fd5b506104b9611abe565b3480156109a857600080fd5b506104b96109b7366004615088565b611afb565b3480156109c857600080fd5b5061052c6109d7366004614e83565b6001600160a01b031660009081526097602052604090205490565b3480156109fe57600080fd5b506104b9611bc2565b348015610a1357600080fd5b50610a49610a22366004614e83565b60cb6020526000908152604090205461ffff8116906201000090046001600160801b031682565b6040805161ffff90931683526001600160801b039091166020830152016104dd565b348015610a7757600080fd5b506104b9610a86366004615088565b611bf8565b348015610a9757600080fd5b5061052c60f75481565b348015610aad57600080fd5b5061052c610abc366004615088565b60ca6020526000908152604090205481565b348015610ada57600080fd5b5061052c60d55481565b348015610af057600080fd5b506105837f000000000000000000000000000000000000000000000000000000000000000081565b348015610b2457600080fd5b5060d2546001600160a01b0316610583565b348015610b4257600080fd5b506065546001600160a01b0316610583565b348015610b6057600080fd5b5061010354610583906001600160a01b031681565b348015610b8157600080fd5b506104d0611c42565b348015610b9657600080fd5b5061052c611c51565b348015610bab57600080fd5b506104b9610bba366004615088565b611c8b565b348015610bcb57600080fd5b5060cc5460cd5460ce54610c1b9260ff808216936101008304909116926001600160a01b036201000090930483169282169166ffffffffffffff600160a01b90910416906001600160681b031686565b60408051961515875260ff90951660208701526001600160a01b03938416948601949094529116606084015266ffffffffffffff1660808301526001600160681b031660a082015260c0016104dd565b348015610c7757600080fd5b5060d15460d254610ca2916001600160a01b039081169190811690600160a01b900463ffffffff1683565b604080516001600160a01b03948516815293909216602084015263ffffffff16908201526060016104dd565b348015610cda57600080fd5b5060d254600160a01b900463ffffffff1661052c565b348015610cfc57600080fd5b5060d1546001600160a01b0316610583565b348015610d1a57600080fd5b50610506610d29366004614f17565b611d85565b348015610d3a57600080fd5b506104b9610d49366004615088565b611e1e565b348015610d5a57600080fd5b5061052c60d65481565b348015610d7057600080fd5b50610506610d7f366004614f17565b611f1c565b348015610d9057600080fd5b5060d454610583906001600160a01b031681565b348015610db057600080fd5b506105837f000000000000000000000000000000000000000000000000000000000000000081565b348015610de457600080fd5b5061052c611f29565b348015610df957600080fd5b5060f554610583906001600160a01b031681565b348015610e1957600080fd5b5061052c62093a8081565b348015610e3057600080fd5b506104b9610e3f366004615088565b612057565b348015610e5057600080fd5b506104b96120c4565b348015610e6557600080fd5b506104b96122ba565b348015610e7a57600080fd5b5061052c610e89366004614e83565b61235d565b348015610e9a57600080fd5b506105837f000000000000000000000000000000000000000000000000000000000000000081565b348015610ece57600080fd5b506104b9610edd366004614e83565b61237a565b348015610eee57600080fd5b5061052c60f85481565b348015610f0457600080fd5b506104b9610f13366004615088565b612409565b348015610f2457600080fd5b506105837f000000000000000000000000000000000000000000000000000000000000000081565b348015610f5857600080fd5b5061052c610f67366004614e9f565b6001600160a01b03918216600090815260986020908152604080832093909416825291909152205490565b348015610f9e57600080fd5b506104b9612476565b348015610fb357600080fd5b5061052c60fa5481565b348015610fc957600080fd5b506104b9610fd8366004614e83565b61262a565b348015610fe957600080fd5b506104b9610ff8366004615005565b61271d565b34801561100957600080fd5b506104b9611018366004614e83565b612975565b6104b9612a10565b34801561103157600080fd5b50611045611040366004614e83565b612b61565b604080519283526020830191909152016104dd565b34801561106657600080fd5b506104b9612c44565b34801561107b57600080fd5b506104b9612c99565b34801561109057600080fd5b5060f654610583906001600160a01b031681565b3480156110b057600080fd5b5061010054610583906001600160a01b031681565b3480156110d157600080fd5b5061010154610583906001600160a01b031681565b3480156110f257600080fd5b506104b9611101366004615088565b612ef2565b6065546001600160a01b031633146111395760405162461bcd60e51b8152600401611130906152e9565b60405180910390fd5b61010080546001600160a01b0319166001600160a01b0392909216919091179055565b6060609a805461116b906156d6565b80601f0160208091040260200160405190810160405280929190818152602001828054611197906156d6565b80156111e45780601f106111b9576101008083540402835291602001916111e4565b820191906000526020600020905b8154815290600101906020018083116111c757829003601f168201915b5050505050905090565b60006111fb338484612fd3565b5060015b92915050565b60006112128484846130f8565b6001600160a01b0384166000908152609860209081526040808320338452909152902054828110156112975760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b6064820152608401611130565b6112a48533858403612fd3565b60019150505b9392505050565b600260015414156112d45760405162461bcd60e51b81526004016111309061533f565b600260015533600090815260c96020526040902060cf5461ffff168261130c5760405162461bcd60e51b81526004016111309061531e565b815461ffff1681146113505760405162461bcd60e51b815260206004820152600d60248201526c125b9d985b1a59081c9bdd5b99609a1b6044820152606401611130565b81546201000090046001600160681b0316838110156113a15760405162461bcd60e51b815260206004820152600d60248201526c115e18d9595908185b5bdd5b9d609a1b6044820152606401611130565b6113ab81856132c8565b83546001600160681b0391909116620100000262010000600160781b031990911617835560d0546113e5906001600160801b0316856132c8565b60d080546001600160801b0319166001600160801b0392909216919091179055604080518581526020810184905233917fab2daf3c146ca6416cbccd2a86ed2ba995e171ef6319df14a38aef01403a9c96910160405180910390a261144a33856132d4565b5050600180555050565b6065546001600160a01b0316331461147e5760405162461bcd60e51b8152600401611130906152e9565b6001600160a01b0381166114ca5760405162461bcd60e51b815260206004820152601360248201527210b732bba9ba3934b5b2a9b2b632b1ba34b7b760691b6044820152606401611130565b60f680546001600160a01b0319166001600160a01b0392909216919091179055565b6002600154141561150f5760405162461bcd60e51b81526004016111309061533f565b6002600155816115315760405162461bcd60e51b81526004016111309061531e565b6001600160a01b03811661154457600080fd5b61154e8282613435565b60cc5461156c906201000090046001600160a01b03163330856136c7565b505060018055565b3360008181526098602090815260408083206001600160a01b038716845290915281205490916111fb9185906115ab908690615551565b612fd3565b60cc5460009060ff61010090910416816115e66115cc60995490565b6115d4611f29565b60d0546001600160801b031685613732565b90506115fb6115f48561235d565b8284613772565b949350505050565b6065546001600160a01b0316331461162d5760405162461bcd60e51b8152600401611130906152e9565b6001600160a01b0381166116835760405162461bcd60e51b815260206004820152601860248201527f216e65774f7074696f6e735072656d69756d50726963657200000000000000006044820152606401611130565b60f580546001600160a01b0319166001600160a01b0392909216919091179055565b6065546001600160a01b031633146116cf5760405162461bcd60e51b8152600401611130906152e9565b600081116117095760405162461bcd60e51b81526020600482015260076024820152660216e65774361760cc1b6044820152606401611130565b611712816137d4565b60ce54604080516001600160681b039092168252602082018390527f5f86edbb9d92228a9edc3f0ebc0f001bda1ea345ac7335e0eeef3504b31d1a1c910160405180910390a160ce80546cffffffffffffffffffffffffff19166001600160681b0392909216919091179055565b6065546001600160a01b031633146117aa5760405162461bcd60e51b8152600401611130906152e9565b6000816001600160801b0316116117f25760405162461bcd60e51b815260206004820152600c60248201526b21737472696b65507269636560a01b6044820152606401611130565b6001600160801b031660fa5560cf5460f9805461ffff191661ffff909216919091179055565b6065546001600160a01b031633146118425760405162461bcd60e51b8152600401611130906152e9565b61010380546001600160a01b0319166001600160a01b0392909216919091179055565b60d4546001600160a01b0316331461188f5760405162461bcd60e51b81526004016111309061527a565b600081116118cb5760405162461bcd60e51b8152602060048201526009602482015268216d696e507269636560b81b6044820152606401611130565b60f855565b60d4546001600160a01b031633146118fa5760405162461bcd60e51b81526004016111309061527a565b6002600154141561191d5760405162461bcd60e51b81526004016111309061533f565b600260015560d2546040516358ffbb3d60e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081166004830152909116602482015273f7f4260943db50eee7e917330c35b460ff70ad54906358ffbb3d9060440160206040518083038186803b1580156119a157600080fd5b505af41580156119b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119d991906150a0565b5060018055565b60d4546001600160a01b03163314611a0a5760405162461bcd60e51b81526004016111309061527a565b60026001541415611a2d5760405162461bcd60e51b81526004016111309061533f565b600260015560fc54604051633545cbf360e21b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163d5172fcc91611a84919086908690600401615449565b600060405180830381600087803b158015611a9e57600080fd5b505af1158015611ab2573d6000803e3d6000fd5b50506001805550505050565b60026001541415611ae15760405162461bcd60e51b81526004016111309061533f565b6002600181905550611af56000600161381e565b60018055565b6065546001600160a01b03163314611b255760405162461bcd60e51b8152600401611130906152e9565b611b33620f42406064615674565b8110611b815760405162461bcd60e51b815260206004820152601760248201527f496e76616c696420706572666f726d616e6365206665650000000000000000006044820152606401611130565b60d55460408051918252602082018390527f24867dfb6fcb9970a07be21024956524abe7a1837faa903ff0e99aaa40cf893e910160405180910390a160d555565b6065546001600160a01b03163314611bec5760405162461bcd60e51b8152600401611130906152e9565b611bf660006139cd565b565b60026001541415611c1b5760405162461bcd60e51b81526004016111309061533f565b6002600155611c2981613a1f565b61010254611c379082613be6565b610102555060018055565b6060609b805461116b906156d6565b6000611c86611c5f60995490565b611c67611f29565b60d05460cc546001600160801b0390911690610100900460ff16613732565b905090565b60026001541415611cae5760405162461bcd60e51b81526004016111309061533f565b600260015580611ced5760405162461bcd60e51b815260206004820152600a602482015269216e756d526f756e647360b01b6044820152606401611130565b60cf5461ffff1660005b82811015611d7c576000611d0b8284615551565b600081815260ca602052604090205490915015611d585760405162461bcd60e51b815260206004820152600b60248201526a125b9a5d1a585b1a5e995960aa1b6044820152606401611130565b600090815260ca602052604090206001905580611d7481615711565b915050611cf7565b50506001805550565b3360009081526098602090815260408083206001600160a01b038616845290915281205482811015611e075760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401611130565b611e143385858403612fd3565b5060019392505050565b60026001541415611e415760405162461bcd60e51b81526004016111309061533f565b6002600155610100546001600160a01b031680611e5d57600080fd5b60008211611e6a57600080fd5b3360009081526097602052604090205482811015611e9657611e96611e8f84836132c8565b600061381e565b611ea13330856130f8565b611eac308385612fd3565b6040516383df674760e01b815260048101849052336024820152600060448201526001600160a01b038316906383df674790606401600060405180830381600087803b158015611efb57600080fd5b505af1158015611f0f573d6000803e3d6000fd5b5050600180555050505050565b60006111fb3384846130f8565b60d2546000906001600160a01b0316611fbc5760cc546040516370a0823160e01b8152306004820152620100009091046001600160a01b0316906370a082319060240160206040518083038186803b158015611f8457600080fd5b505afa158015611f98573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c8691906150a0565b60cc546040516370a0823160e01b8152306004820152611c86916201000090046001600160a01b0316906370a082319060240160206040518083038186803b15801561200757600080fd5b505afa15801561201b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061203f91906150a0565b60cf546201000090046001600160681b031690613be6565b6002600154141561207a5760405162461bcd60e51b81526004016111309061533f565b60026001558061209c5760405162461bcd60e51b81526004016111309061531e565b6120a68133613435565b60cc546119d9906201000090046001600160a01b03163330846136c7565b60d4546001600160a01b031633146120ee5760405162461bcd60e51b81526004016111309061527a565b600260015414156121115760405162461bcd60e51b81526004016111309061533f565b600260015560d1546001600160a01b03168061215d5760405162461bcd60e51b815260206004820152600b60248201526a10b732bc3a27b83a34b7b760a91b6044820152606401611130565b60d280546001600160a01b03199081166001600160a01b03841690811790925560d18054909116905560cf54604051620100009091046001600160681b03168082529133917f045c558fdce4714c5816d53820d27420f4cd860892df203fe636384d8d19aa019060200160405180910390a3604051632904c23960e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811660048301527f000000000000000000000000000000000000000000000000000000000000000081166024830152831660448201526064810182905273f7f4260943db50eee7e917330c35b460ff70ad5490632904c2399060840160206040518083038186803b15801561227957600080fd5b505af415801561228d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122b191906150a0565b5061156c613bf2565b610103546001600160a01b0316806122d157600080fd5b6122dd6000600161381e565b33600081815260976020526040902054906122f9908383612fd3565b60405163c9c2d4f560e01b8152336004820152602481018290526001600160a01b0383169063c9c2d4f590604401600060405180830381600087803b15801561234157600080fd5b505af1158015612355573d6000803e3d6000fd5b505050505050565b600080600061236b84612b61565b90925090506115fb8282613be6565b6065546001600160a01b031633146123a45760405162461bcd60e51b8152600401611130906152e9565b6001600160a01b0381166123e75760405162461bcd60e51b815260206004820152600a60248201526910b732bba5b2b2b832b960b11b6044820152606401611130565b60d480546001600160a01b0319166001600160a01b0392909216919091179055565b6002600154141561242c5760405162461bcd60e51b81526004016111309061533f565b60026001558061246b5760405162461bcd60e51b815260206004820152600a602482015269216e756d53686172657360b01b6044820152606401611130565b6119d981600061381e565b600260015414156124995760405162461bcd60e51b81526004016111309061533f565b600260015560d2546001600160a01b0316801515806124be575060cf5461ffff166001145b6124f95760405162461bcd60e51b815260206004820152600c60248201526b149bdd5b990818db1bdcd95960a21b6044820152606401611130565b61250281613cc4565b600061010254905060008061251960fd5484613e3a565b60fd81905560d054919350915060009061254390600160801b90046001600160801b031685613be6565b905061254e816140c1565b60d080546001600160801b03808416600160801b029116179055600061010255612577836137d4565b60cf805462010000600160781b031916620100006001600160681b0386160217905560006125a54282613be6565b905063ffffffff8111156125fb5760405162461bcd60e51b815260206004820152601860248201527f4f766572666c6f77206e6578744f7074696f6e526561647900000000000000006044820152606401611130565b60d2805463ffffffff909216600160a01b0263ffffffff60a01b19909216919091179055505060018055505050565b6065546001600160a01b031633146126545760405162461bcd60e51b8152600401611130906152e9565b6001600160a01b03811661269d5760405162461bcd60e51b815260206004820152601060248201526f085b995dd19959549958da5c1a595b9d60821b6044820152606401611130565b60d3546001600160a01b03828116911614156126fb5760405162461bcd60e51b815260206004820152601860248201527f4d757374206265206e657720666565526563697069656e7400000000000000006044820152606401611130565b60d380546001600160a01b0319166001600160a01b0392909216919091179055565b600054610100900460ff1680612736575060005460ff16155b6127525760405162461bcd60e51b81526004016111309061529b565b600054610100900460ff16158015612774576000805461ffff19166101011790555b6128396127846020850185614e83565b6127946040860160208701614e83565b6127a46060870160408801614e83565b606087013560808801356127bb60a08a018a61550c565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506127fd9250505060c08b018b61550c565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508c925061410b915050565b600061284c610100850160e08601614e83565b6001600160a01b0316141561289c5760405162461bcd60e51b815260206004820152601660248201527510afb7b83a34b7b739a83932b6b4bab6a83934b1b2b960511b6044820152606401611130565b60006128b061012085016101008601614e83565b6001600160a01b031614156128fb5760405162461bcd60e51b815260206004820152601160248201527010afb9ba3934b5b2a9b2b632b1ba34b7b760791b6044820152606401611130565b61290c610100840160e08501614e83565b60f580546001600160a01b0319166001600160a01b039290921691909117905561293e61012084016101008501614e83565b60f680546001600160a01b0319166001600160a01b03929092169190911790558015612970576000805461ff00191690555b505050565b6065546001600160a01b0316331461299f5760405162461bcd60e51b8152600401611130906152e9565b6001600160a01b038116612a045760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401611130565b612a0d816139cd565b50565b60026001541415612a335760405162461bcd60e51b81526004016111309061533f565b600260015560cc547f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03908116620100009092041614612aa45760405162461bcd60e51b8152602060048201526005602482015264042ae8aa8960db1b6044820152606401611130565b60003411612add5760405162461bcd60e51b81526020600482015260066024820152652176616c756560d01b6044820152606401611130565b612ae73433613435565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b158015612b4257600080fd5b505af1158015612b56573d6000803e3d6000fd5b505060018055505050565b6001600160a01b038116600090815260c9602090815260408083208151606081018352905461ffff81168083526201000082046001600160681b031694830194909452600160781b90046001600160801b031691810191909152829160011115612be3575050506001600160a01b031660009081526097602052604081205491565b60cf54815161ffff908116600090815260ca602052604081205460cc549193612c1993869391169190610100900460ff1661434a565b9050612c3a856001600160a01b031660009081526097602052604090205490565b9590945092505050565b60026001541415612c675760405162461bcd60e51b81526004016111309061533f565b60026001556000612c766143bb565b60fd54909150612c8690826132c8565b6001600160801b031660fd555060018055565b60d4546001600160a01b03163314612cc35760405162461bcd60e51b81526004016111309061527a565b60026001541415612ce65760405162461bcd60e51b81526004016111309061533f565b600260015560d2546001600160a01b031680158015612d0c575060cf5461ffff16600114155b612d4b5760405162461bcd60e51b815260206004820152601060248201526f149bdd5b99081b9bdd0818db1bdcd95960821b6044820152606401611130565b60408051610120810182526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811682527f00000000000000000000000000000000000000000000000000000000000000008116602083015260cc8054620100009004821683850152848216606084015260006080840181905260f95461ffff1660a085015260fa5460c085015260f654831660e085015260f55490921661010084015292516377e3ce0d60e11b8152919290918291829173f7f4260943db50eee7e917330c35b460ff70ad549163efc79c1a91612e3791889160cf90600401615376565b60606040518083038186803b158015612e4f57600080fd5b505af4158015612e63573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e879190614f42565b604080518381526020810183905293965091945092507fa217999b1c125c2a996f712c5f26a28addad7167bd8a67d5bd5b2a751148abb0910160405180910390a1505060d180546001600160a01b0319166001600160a01b0392909216919091179055505060018055565b6065546001600160a01b03163314612f1c5760405162461bcd60e51b8152600401611130906152e9565b612f2a620f42406064615674565b8110612f715760405162461bcd60e51b8152602060048201526016602482015275496e76616c6964206d616e6167656d656e742066656560501b6044820152606401611130565b6000612f8e63031ba309612f8884620f4240614578565b90614584565b60d65460408051918252602082018590529192507f4e874b007ab14f7e263baefd44951834c8266f4f224d1092e49e9c254354cc54910160405180910390a160d65550565b6001600160a01b0383166130355760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401611130565b6001600160a01b0382166130965760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401611130565b6001600160a01b0383811660008181526098602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b6001600160a01b03831661315c5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401611130565b6001600160a01b0382166131be5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401611130565b6001600160a01b038316600090815260976020526040902054818110156132365760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401611130565b6001600160a01b0380851660009081526097602052604080822085850390559185168152908120805484929061326d908490615551565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516132b991815260200190565b60405180910390a35b50505050565b60006112aa8284615693565b60cc546001600160a01b03620100009091048116907f00000000000000000000000000000000000000000000000000000000000000001681141561342157604051632e1a7d4d60e01b8152600481018390527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690632e1a7d4d90602401600060405180830381600087803b15801561337457600080fd5b505af1158015613388573d6000803e3d6000fd5b505050506000836001600160a01b03168360405160006040518083038185875af1925050503d80600081146133d9576040519150601f19603f3d011682016040523d82523d6000602084013e6133de565b606091505b50509050806132c25760405162461bcd60e51b815260206004820152600f60248201526e151c985b9cd9995c8819985a5b1959608a1b6044820152606401611130565b6129706001600160a01b0382168484614590565b60cf5461ffff1660006134508461344a611f29565b90613be6565b60ce549091506001600160681b031681111561349b5760405162461bcd60e51b815260206004820152600a6024820152690457863656564206361760b41b6044820152606401611130565b60cd54600160a01b900466ffffffffffffff168110156134f45760405162461bcd60e51b8152602060048201526014602482015273496e73756666696369656e742062616c616e636560601b6044820152606401611130565b60408051858152602081018490526001600160a01b038516917f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a15910160405180910390a26001600160a01b038316600090815260c9602090815260408083208151606081018352905461ffff81168083526201000082046001600160681b031683860152600160781b9091046001600160801b031682840152845260ca90925282205460cc549192916135b3918491879190610100900460ff1661434a565b8251909150869061ffff168514156135e45760208301516000906135e0906001600160681b031689613be6565b9150505b6135ed816137d4565b6040805160608101825261ffff80881682526001600160681b0380851660208085019182526001600160801b038089168688019081526001600160a01b038e16600090815260c990935296822095518654935197518216600160781b02600160781b600160f81b03199890951662010000026effffffffffffffffffffffffffffff1990941695169490941791909117949094161790915560d054613693911689613be6565b905061369e816140c1565b60d080546001600160801b0319166001600160801b039290921691909117905550505050505050565b6040516001600160a01b03808516602483015283166044820152606481018290526132c29085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526145c0565b60008061374083600a6155cc565b9050600086116137505780613768565b61376886612f8861376188886132c8565b8490614578565b9695505050505050565b6000600183116137bc5760405162461bcd60e51b8152602060048201526015602482015274496e76616c6964206173736574506572536861726560581b6044820152606401611130565b6115fb6137ca83600a6155cc565b612f888686614578565b6001600160681b03811115612a0d5760405162461bcd60e51b815260206004820152601060248201526f13dd995c999b1bddc81d5a5b9d0c4c0d60821b6044820152606401611130565b33600090815260c9602090815260408083208151606081018352905461ffff8082168084526201000083046001600160681b031684870152600160781b9092046001600160801b03168385015260cf5491865260ca9094529184205460cc54919492909316926138999185918591610100900460ff1661434a565b9050836138a657846138a8565b805b9450846138b6575050505050565b808511156138fa5760405162461bcd60e51b81526020600482015260116024820152704578636565647320617661696c61626c6560781b6044820152606401611130565b825161ffff168211156139275733600090815260c960205260409020805462010000600160781b03191690555b613930856140c1565b61393a81866132c8565b33600081815260c960205260409081902080546001600160801b0394909416600160781b02600160781b600160f81b0319909416939093179092558451915190917fe5b754fb1abb7f01b499791d0b820ae3b6af3424ac1c59768edb53f4ec31a929916139b39189825261ffff16602082015260400190565b60405180910390a26139c63033876130f8565b5050505050565b606580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60008111613a5c5760405162461bcd60e51b815260206004820152600a602482015269216e756d53686172657360b01b6044820152606401611130565b33600090815260c960205260409020546201000090046001600160681b0316151580613aa6575033600090815260c96020526040902054600160781b90046001600160801b031615155b15613ab757613ab76000600161381e565b60cf5433600081815260cb60209081526040918290208054835187815261ffff96871693810184905292959194911685149290917f0c53c82ad07e2d592d88ece3b066777dd60f1118e2a081b380efc4358f0d9e2a910160405180910390a281546201000090046001600160801b031660008215613b4057613b398287613be6565b9050613ba3565b8115613b825760405162461bcd60e51b81526020600482015260116024820152704578697374696e6720776974686472617760781b6044820152606401611130565b5033600090815260cb60205260409020805461ffff191661ffff8616179055845b613bac816140c1565b33600081815260cb60205260409020805462010000600160901b031916620100006001600160801b038516021790556123559030886130f8565b60006112aa8284615551565b60d25460f8546040516301c6654960e21b81526001600160a01b0392831660048201819052602482018390527f0000000000000000000000000000000000000000000000000000000000000000909316604482015260cc606482015273f7f4260943db50eee7e917330c35b460ff70ad549063071995249060840160206040518083038186803b158015613c8557600080fd5b505af4158015613c99573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613cbd91906150a0565b60fc555050565b60cf546201000090046001600160681b03166001600160a01b03821615613d105760cf80546cffffffffffffffffffffffffff60781b1916600160781b6001600160681b038416021790555b60cf805462010000600160781b031916905560d280546001600160a01b03191690556001600160a01b03821615613e3657604051636c6fe87f60e11b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016600482015260009073f7f4260943db50eee7e917330c35b460ff70ad549063d8dfd0fe9060240160206040518083038186803b158015613db757600080fd5b505af4158015613dcb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613def91906150a0565b9050336001600160a01b0316836001600160a01b03167f7e830f7c1771deb1bdb35c4a7e6051bbac32b376f7f4e4976b8618b0b11997f7836040516130eb91815260200190565b5050565b60d3546040805160e08101825260cc54610100810460ff16825291516370a0823160e01b815230600482015260009384936001600160a01b0391821693859384938493849373f7f4260943db50eee7e917330c35b460ff70ad549363d9b874389360cf93602084019262010000909104909116906370a082319060240160206040518083038186803b158015613ecf57600080fd5b505afa158015613ee3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613f0791906150a0565b8152602001613f1560995490565b81526020018d815260200160d554815260200160d65481526020018c8152506040518363ffffffff1660e01b8152600401613fa292919060006101008201905083825282516020830152602083015160408301526040830151606083015260608301516080830152608083015160a083015260a083015160c083015260c083015160e08301529392505050565b60c06040518083038186803b158015613fba57600080fd5b505af4158015613fce573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613ff291906150dc565b60cf5461ffff16600081815260ca60209081526040918290208790558151858152908101849052908101829052969d50949b50919850965094509250906001600160a01b038716907f0a242f7ecaf711036ca770774ceffae28e60ef042ac113ddd187f2631db0c0069060600160405180910390a260d080546001600160801b0319169055614082816001615551565b60cf805461ffff191661ffff92909216919091179055506140a590503084614692565b80156140b5576140b584826132d4565b505050505b9250929050565b6001600160801b03811115612a0d5760405162461bcd60e51b815260206004820152601060248201526f09eeccae4ccd8deee40ead2dce86264760831b6044820152606401611130565b600054610100900460ff1680614124575060005460ff16155b6141405760405162461bcd60e51b81526004016111309061529b565b600054610100900460ff16158015614162576000805461ffff19166101011790555b60405163c72733f760e01b815273f7f4260943db50eee7e917330c35b460ff70ad549063c72733f7906141a7908c908c908c908b908d908c908c908c9060040161516d565b60006040518083038186803b1580156141bf57600080fd5b505af41580156141d3573d6000803e3d6000fd5b505050506141df614771565b6141e984846147e4565b6141f1614863565b6141fa89612975565b60d480546001600160a01b03808b166001600160a01b03199283161790925560d38054928a169290911691909117905560d585905561424463031ba309612f8888620f4240614578565b60d6558160cc6142548282615769565b505060cc546040516370a0823160e01b81523060048201526000916201000090046001600160a01b0316906370a082319060240160206040518083038186803b1580156142a057600080fd5b505afa1580156142b4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906142d891906150a0565b90506142e3816137d4565b60cf805461ffff196001600160681b03909316600160781b02929092167fffffffff00000000000000000000000000ffffffffffffffffffffffffff0000909216919091176001179055801561433f576000805461ff00191690555b505050505050505050565b835160009061ffff16158015906143655750845161ffff1684115b156143a757600061438486602001516001600160681b031685856148ca565b604087015190915061439f906001600160801b031682613be6565b9150506115fb565b50505050604001516001600160801b031690565b33600090815260cb6020526040812080546001600160801b03620100008204169061ffff168161441d5760405162461bcd60e51b815260206004820152600d60248201526c139bdd081a5b9a5d1a585d1959609a1b6044820152606401611130565b60cf5461ffff1681106144655760405162461bcd60e51b815260206004820152601060248201526f149bdd5b99081b9bdd0818db1bdcd95960821b6044820152606401611130565b33600090815260cb60205260409020805462010000600160901b031916905560d0546144a190600160801b90046001600160801b0316836132c8565b60d080546001600160801b03928316600160801b029216919091179055600081815260ca602052604081205460cc546144e491859160ff61010090910416613772565b604080518281526020810186905291925033917ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b568910160405180910390a261452c308461492d565b6000811161456e5760405162461bcd60e51b815260206004820152600f60248201526e085dda5d1a191c985dd05b5bdd5b9d608a1b6044820152606401611130565b6115fb33826132d4565b60006112aa8284615674565b60006112aa8284615569565b6040516001600160a01b03831660248201526044810182905261297090849063a9059cbb60e01b906064016136fb565b6000614615826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316614a7b9092919063ffffffff16565b80519091501561297057808060200190518101906146339190614fe9565b6129705760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401611130565b6001600160a01b0382166146e85760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401611130565b80609960008282546146fa9190615551565b90915550506001600160a01b03821660009081526097602052604081208054839290614727908490615551565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b600054610100900460ff168061478a575060005460ff16155b6147a65760405162461bcd60e51b81526004016111309061529b565b600054610100900460ff161580156147c8576000805461ffff19166101011790555b6147d0614a8a565b8015612a0d576000805461ff001916905550565b600054610100900460ff16806147fd575060005460ff16155b6148195760405162461bcd60e51b81526004016111309061529b565b600054610100900460ff1615801561483b576000805461ffff19166101011790555b614843614af9565b61484d8383614b63565b8015612970576000805461ff0019169055505050565b600054610100900460ff168061487c575060005460ff16155b6148985760405162461bcd60e51b81526004016111309061529b565b600054610100900460ff161580156148ba576000805461ffff19166101011790555b6148c2614af9565b6147d0614bf8565b6000600183116149145760405162461bcd60e51b8152602060048201526015602482015274496e76616c6964206173736574506572536861726560581b6044820152606401611130565b6115fb83612f8861492685600a6155cc565b8790614578565b6001600160a01b03821661498d5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401611130565b6001600160a01b03821660009081526097602052604090205481811015614a015760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401611130565b6001600160a01b0383166000908152609760205260408120838303905560998054849290614a30908490615693565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b60606115fb8484600085614c58565b600054610100900460ff1680614aa3575060005460ff16155b614abf5760405162461bcd60e51b81526004016111309061529b565b600054610100900460ff16158015614ae1576000805461ffff19166101011790555b600180558015612a0d576000805461ff001916905550565b600054610100900460ff1680614b12575060005460ff16155b614b2e5760405162461bcd60e51b81526004016111309061529b565b600054610100900460ff161580156147d0576000805461ffff19166101011790558015612a0d576000805461ff001916905550565b600054610100900460ff1680614b7c575060005460ff16155b614b985760405162461bcd60e51b81526004016111309061529b565b600054610100900460ff16158015614bba576000805461ffff19166101011790555b8251614bcd90609a906020860190614db9565b508151614be190609b906020850190614db9565b508015612970576000805461ff0019169055505050565b600054610100900460ff1680614c11575060005460ff16155b614c2d5760405162461bcd60e51b81526004016111309061529b565b600054610100900460ff16158015614c4f576000805461ffff19166101011790555b6147d0336139cd565b606082471015614cb95760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401611130565b843b614d075760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401611130565b600080866001600160a01b03168587604051614d239190615151565b60006040518083038185875af1925050503d8060008114614d60576040519150601f19603f3d011682016040523d82523d6000602084013e614d65565b606091505b5091509150614d75828286614d80565b979650505050505050565b60608315614d8f5750816112aa565b825115614d9f5782518084602001fd5b8160405162461bcd60e51b81526004016111309190615267565b828054614dc5906156d6565b90600052602060002090601f016020900481019282614de75760008555614e2d565b82601f10614e0057805160ff1916838001178555614e2d565b82800160010185558215614e2d579182015b82811115614e2d578251825591602001919060010190614e12565b50614e39929150614e3d565b5090565b5b80821115614e395760008155600101614e3e565b8035614e5d8161587a565b919050565b8035614e5d8161589d565b8035614e5d816158b2565b8035614e5d816158c7565b600060208284031215614e94578081fd5b81356112aa8161587a565b60008060408385031215614eb1578081fd5b8235614ebc8161587a565b91506020830135614ecc8161587a565b809150509250929050565b600080600060608486031215614eeb578081fd5b8335614ef68161587a565b92506020840135614f068161587a565b929592945050506040919091013590565b60008060408385031215614f29578182fd5b8235614f348161587a565b946020939093013593505050565b600080600060608486031215614f56578283fd5b8351614f618161587a565b602085015160409095015190969495509392505050565b60008060208385031215614f8a578182fd5b823567ffffffffffffffff80821115614fa1578384fd5b818501915085601f830112614fb4578384fd5b813581811115614fc2578485fd5b86602061012083028501011115614fd7578485fd5b60209290920196919550909350505050565b600060208284031215614ffa578081fd5b81516112aa8161588f565b60008082840360e0811215615018578283fd5b833567ffffffffffffffff81111561502e578384fd5b84016101208187031215615040578384fd5b925060c0601f1982011215615053578182fd5b506020830190509250929050565b600060208284031215615072578081fd5b81356001600160801b03811681146112aa578182fd5b600060208284031215615099578081fd5b5035919050565b6000602082840312156150b1578081fd5b5051919050565b600080604083850312156150ca578182fd5b823591506020830135614ecc8161587a565b60008060008060008060c087890312156150f4578384fd5b865195506020870151945060408701519350606087015192506080870151915060a087015190509295509295509295565b6000815180845261513d8160208601602086016156aa565b601f01601f19169290920160200192915050565b600082516151638184602087016156aa565b9190910192915050565b60006101a060018060a01b03808c168452808b166020850152808a1660408501528860608501528760808501528160a08501526151ac82850188615125565b915083820360c08501526151c08287615125565b9250843591506151cf8261588f565b90151560e08401526020840135906151e6826158c7565b60ff8216610100850152604085013591506152008261587a565b1661012083015261521360608401614e52565b6001600160a01b031661014083015261522e60808401614e6d565b66ffffffffffffff1661016083015261524960a08401614e62565b6001600160681b038116610180840152509998505050505050505050565b6020815260006112aa6020830184615125565b60208082526007908201526610b5b2b2b832b960c91b604082015260600190565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526007908201526608585b5bdd5b9d60ca1b604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b83516001600160a01b031681526020808501516101608301916153a3908401826001600160a01b03169052565b5060408501516153be60408401826001600160a01b03169052565b5060608501516153d960608401826001600160a01b03169052565b506080850151608083015260a08501516153f960a084018261ffff169052565b5060c085015160c083015260e085015161541e60e08401826001600160a01b03169052565b50610100858101516001600160a01b0381168483015250506101208201939093526101400152919050565b838152604060208083018290528282018490526000919060609081850187855b888110156154fd57813583528382013584840152615488868301614e52565b6001600160a01b03168684015284820135858401526080808301359084015260a06154b4818401614e52565b6001600160a01b03169084015260c06154ce838201614e78565b60ff169084015260e0828101359084015261010080830135908401526101209283019290910190600101615469565b50909998505050505050505050565b6000808335601e19843603018112615522578283fd5b83018035915067ffffffffffffffff82111561553c578283fd5b6020019150368190038213156140ba57600080fd5b600082198211156155645761556461572c565b500190565b60008261558457634e487b7160e01b81526012600452602481fd5b500490565b600181815b808511156155c45781600019048211156155aa576155aa61572c565b808516156155b757918102915b93841c939080029061558e565b509250929050565b60006112aa83836000826155e2575060016111ff565b816155ef575060006111ff565b8160018114615605576002811461560f5761562b565b60019150506111ff565b60ff8411156156205761562061572c565b50506001821b6111ff565b5060208310610133831016604e8410600b841016171561564e575081810a6111ff565b6156588383615589565b806000190482111561566c5761566c61572c565b029392505050565b600081600019048311821515161561568e5761568e61572c565b500290565b6000828210156156a5576156a561572c565b500390565b60005b838110156156c55781810151838201526020016156ad565b838111156132c25750506000910152565b600181811c908216806156ea57607f821691505b6020821081141561570b57634e487b7160e01b600052602260045260246000fd5b50919050565b60006000198214156157255761572561572c565b5060010190565b634e487b7160e01b600052601160045260246000fd5b600081356111ff8161587a565b600081356111ff8161589d565b600081356111ff816158b2565b81356157748161588f565b815460ff19811691151560ff1691821783556020840135615794816158c7565b61ff008160081b169050808361ffff1984161717845560408501356157b88161587a565b6001600160b01b0319929092169092179190911760109190911b62010000600160b01b0316178155600181016158106157f360608501615742565b82546001600160a01b0319166001600160a01b0391909116178255565b61584961581f6080850161575c565b82805466ffffffffffffff60a01b191660a09290921b66ffffffffffffff60a01b16919091179055565b50613e3661585960a0840161574f565b600283016001600160681b0382166001600160681b03198254161781555050565b6001600160a01b0381168114612a0d57600080fd5b8015158114612a0d57600080fd5b6001600160681b0381168114612a0d57600080fd5b66ffffffffffffff81168114612a0d57600080fd5b60ff81168114612a0d57600080fdfea2646970667358221220d57d9363a2549d4d8bb447473f2ccf1f500aa870e9b3845b5f87898379dcf8d964736f6c63430008040033","sourceMap":"1132:15154:27:-:0;;;4370:376;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;4572:5;4579;4586:16;4604:11;4617:13;-1:-1:-1;;;;;6337:19:28;;6329:38;;;;-1:-1:-1;;;6329:38:28;;1395:2:30;6329:38:28;;;1377:21:30;1434:1;1414:18;;;1407:29;-1:-1:-1;;;1452:18:30;;;1445:36;1498:18;;6329:38:28;;;;;;;;;-1:-1:-1;;;;;6385:19:28;;6377:38;;;;-1:-1:-1;;;6377:38:28;;2757:2:30;6377:38:28;;;2739:21:30;2796:1;2776:18;;;2769:29;-1:-1:-1;;;2814:18:30;;;2807:36;2860:18;;6377:38:28;2729:155:30;6377:38:28;-1:-1:-1;;;;;6433:27:28;;6425:54;;;;-1:-1:-1;;;6425:54:28;;1729:2:30;6425:54:28;;;1711:21:30;1768:2;1748:18;;;1741:30;-1:-1:-1;;;1787:18:30;;;1780:44;1841:18;;6425:54:28;1701:164:30;6425:54:28;-1:-1:-1;;;;;6497:30:28;;6489:60;;;;-1:-1:-1;;;6489:60:28;;1049:2:30;6489:60:28;;;1031:21:30;1088:2;1068:18;;;1061:30;-1:-1:-1;;;1107:18:30;;;1100:47;1164:18;;6489:60:28;1021:167:30;6489:60:28;-1:-1:-1;;;;;6567:25:28;;6559:50;;;;-1:-1:-1;;;6559:50:28;;2416:2:30;6559:50:28;;;2398:21:30;2455:2;2435:18;;;2428:30;-1:-1:-1;;;2474:18:30;;;2467:42;2526:18;;6559:50:28;2388:162:30;6559:50:28;-1:-1:-1;;;;;;6620:12:28;;;;;;;;6642;;;;;;;6664:35;;;;;;;6709:25;;;;;;6744:29;;;;;;-1:-1:-1;;;;;4650:28:27;::::1;4642:56;;;::::0;-1:-1:-1;;;4642:56:27;;2072:2:30;4642:56:27::1;::::0;::::1;2054:21:30::0;2111:2;2091:18;;;2084:30;-1:-1:-1;;;2130:18:30;;;2123:45;2185:18;;4642:56:27::1;2044:165:30::0;4642:56:27::1;-1:-1:-1::0;;;4708:31:27::1;::::0;-1:-1:-1;;;;;;4708:31:27;::::1;::::0;-1:-1:-1;1132:15154:27;;-1:-1:-1;1132:15154:27;14:177:30;93:13;;-1:-1:-1;;;;;135:31:30;;125:42;;115:2;;181:1;178;171:12;115:2;74:117;;;:::o;196:646::-;311:6;319;327;335;343;351;404:3;392:9;383:7;379:23;375:33;372:2;;;426:6;418;411:22;372:2;454:40;484:9;454:40;:::i;:::-;444:50;;513:49;558:2;547:9;543:18;513:49;:::i;:::-;503:59;;581:49;626:2;615:9;611:18;581:49;:::i;:::-;571:59;;649:49;694:2;683:9;679:18;649:49;:::i;:::-;639:59;;717:50;762:3;751:9;747:19;717:50;:::i;:::-;707:60;;786:50;831:3;820:9;816:19;786:50;:::i;:::-;776:60;;362:480;;;;;;;;:::o;2729:155::-;1132:15154:27;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","linkReferences":{},"cborAuxdata":{"1":{"value":"0xa2646970667358221220d57d9363a2549d4d8bb447473f2ccf1f500aa870e9b3845b5f87898379dcf8d964736f6c63430008040033","offset":23647}},"transformations":[{"id":"1","type":"replace","offset":23647,"reason":"cborAuxdata"},{"type":"insert","offset":23700,"reason":"constructorArguments"}],"transformationValues":{"cborAuxdata":{"1":"0xa26469706673582212200782aab6ab851c7f09062424f1b9bdf0ad5e99b5e151b65fb4cb09011bc2d81664736f6c63430008040033"},"constructorArguments":"0x000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb480000000000000000000000004114b7c04bbba682130cae2ba26fc5d2473b4ddc0000000000000000000000004bec71a4ac41ee9761440f6921dd17ba1c1213b10000000000000000000000003c212a044760de5a529b3ba59363ddeccc2210be000000000000000000000000eb8cab2f4663247db8eafb556f498c861bb4e161"}},"runtimeBytecode":{"onchainBytecode":"0x6080604052600436106104945760003560e01c80638b10cc7c11610260578063ca59409411610144578063e74b981b116100c1578063f756fa2111610085578063f756fa211461105a578063f87c7d931461106f578063f957a06714611084578063f9a0be68146110a4578063fba7dc61146110c5578063fe56e232146110e657600080fd5b8063e74b981b14610fbd578063f001382714610fdd578063f2fde38b14610ffd578063f6326fb31461101d578063f656ba511461102557600080fd5b8063db006a7511610108578063db006a7514610ef8578063db43e86214610f18578063dd62ed3e14610f4c578063e278fe6f14610f92578063e73c63d514610fa757600080fd5b8063ca59409414610e59578063ce7c2ac214610e6e578063cf3afa5114610e8e578063d164cc1514610ec2578063d5f2638214610ee257600080fd5b8063a457c2d7116101dd578063ad5c4648116101a1578063ad5c464814610da4578063ad7a672f14610dd8578063afa6626414610ded578063b4d1d79514610e0d578063b6b55f2514610e24578063b9f8092b14610e4457600080fd5b8063a457c2d714610d0e578063a694fc3a14610d2e578063a6f7f5d614610d4e578063a9059cbb14610d64578063aced166114610d8457600080fd5b80639be43daa116102245780639be43daa14610b9f5780639fcc2d7514610bbf578063a083ff1714610c6b578063a285c9e814610cce578063a2db9d8314610cf057600080fd5b80638b10cc7c14610b185780638da5cb5b14610b36578063947061b514610b5457806395d89b4114610b7557806399530b0614610b8a57600080fd5b806347786d371161038757806369b41170116103045780637a9262a2116102c85780637a9262a214610a075780637e108d5214610a6b57806383536ff314610a8b57806387153eb114610aa15780638778878214610ace57806389a3027114610ae457600080fd5b806369b41170146109725780636f31ab341461098757806370897b231461099c57806370a08231146109bc578063715018a6146109f257600080fd5b80635ea8cd121161034b5780635ea8cd1214610865578063600a2cfb14610885578063650cce8a1461089a5780636719b2ee146108ce578063692308681461095257600080fd5b806347786d37146107d85780634b2431d9146107f8578063503c70aa1461080f57806355489bb214610825578063573f0d6e1461084557600080fd5b8063313ce567116104155780633f23bb73116103d95780633f23bb73146107445780633f90916a14610764578063432833a6146107825780634603c0aa1461079857806346904840146107b857600080fd5b8063313ce5671461068e578063355274ea146106b857806336efd16f146106d657806339509351146106f65780633ec143d31461071657600080fd5b80631a92f6c21161045c5780631a92f6c21461054f57806323b872dd1461059b5780632728f333146105bb5780632775d01c1461064e57806330630da41461066e57600080fd5b8063048bf0851461049957806306fdde03146104bb578063095ea7b3146104e65780630cbf54c81461051657806318160ddd1461053a575b600080fd5b3480156104a557600080fd5b506104b96104b4366004614e83565b611106565b005b3480156104c757600080fd5b506104d061115c565b6040516104dd9190615267565b60405180910390f35b3480156104f257600080fd5b50610506610501366004614f17565b6111ee565b60405190151581526020016104dd565b34801561052257600080fd5b5061052c60fb5481565b6040519081526020016104dd565b34801561054657600080fd5b5060995461052c565b34801561055b57600080fd5b506105837f0000000000000000000000004bec71a4ac41ee9761440f6921dd17ba1c1213b181565b6040516001600160a01b0390911681526020016104dd565b3480156105a757600080fd5b506105066105b6366004614ed7565b611205565b3480156105c757600080fd5b5060cf5460d0546106099161ffff8116916001600160681b03620100008304811692600160781b900416906001600160801b0380821691600160801b90041685565b6040805161ffff90961686526001600160681b03948516602087015293909216928401929092526001600160801b03918216606084015216608082015260a0016104dd565b34801561065a57600080fd5b506104b9610669366004615088565b6112b1565b34801561067a57600080fd5b506104b9610689366004614e83565b611454565b34801561069a57600080fd5b5060cc54610100900460ff1660405160ff90911681526020016104dd565b3480156106c457600080fd5b5060ce546001600160681b031661052c565b3480156106e257600080fd5b506104b96106f13660046150b8565b6114ec565b34801561070257600080fd5b50610506610711366004614f17565b611574565b34801561072257600080fd5b5060f9546107319061ffff1681565b60405161ffff90911681526020016104dd565b34801561075057600080fd5b5061052c61075f366004614e83565b6115b0565b34801561077057600080fd5b5060d0546001600160801b031661052c565b34801561078e57600080fd5b5061052c60fc5481565b3480156107a457600080fd5b506104b96107b3366004614e83565b611603565b3480156107c457600080fd5b5060d354610583906001600160a01b031681565b3480156107e457600080fd5b506104b96107f3366004615088565b6116a5565b34801561080457600080fd5b5061052c6101025481565b34801561081b57600080fd5b5061052c60fd5481565b34801561083157600080fd5b506104b9610840366004615061565b611780565b34801561085157600080fd5b506104b9610860366004614e83565b611818565b34801561087157600080fd5b506104b9610880366004615088565b611865565b34801561089157600080fd5b506104b96118d0565b3480156108a657600080fd5b506105837f0000000000000000000000003c212a044760de5a529b3ba59363ddeccc2210be81565b3480156108da57600080fd5b506109216108e9366004614e83565b60c96020526000908152604090205461ffff8116906201000081046001600160681b031690600160781b90046001600160801b031683565b6040805161ffff90941684526001600160681b0390921660208401526001600160801b0316908201526060016104dd565b34801561095e57600080fd5b506104b961096d366004614f78565b6119e0565b34801561097e57600080fd5b5061052c600081565b34801561099357600080fd5b506104b9611abe565b3480156109a857600080fd5b506104b96109b7366004615088565b611afb565b3480156109c857600080fd5b5061052c6109d7366004614e83565b6001600160a01b031660009081526097602052604090205490565b3480156109fe57600080fd5b506104b9611bc2565b348015610a1357600080fd5b50610a49610a22366004614e83565b60cb6020526000908152604090205461ffff8116906201000090046001600160801b031682565b6040805161ffff90931683526001600160801b039091166020830152016104dd565b348015610a7757600080fd5b506104b9610a86366004615088565b611bf8565b348015610a9757600080fd5b5061052c60f75481565b348015610aad57600080fd5b5061052c610abc366004615088565b60ca6020526000908152604090205481565b348015610ada57600080fd5b5061052c60d55481565b348015610af057600080fd5b506105837f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4881565b348015610b2457600080fd5b5060d2546001600160a01b0316610583565b348015610b4257600080fd5b506065546001600160a01b0316610583565b348015610b6057600080fd5b5061010354610583906001600160a01b031681565b348015610b8157600080fd5b506104d0611c42565b348015610b9657600080fd5b5061052c611c51565b348015610bab57600080fd5b506104b9610bba366004615088565b611c8b565b348015610bcb57600080fd5b5060cc5460cd5460ce54610c1b9260ff808216936101008304909116926001600160a01b036201000090930483169282169166ffffffffffffff600160a01b90910416906001600160681b031686565b60408051961515875260ff90951660208701526001600160a01b03938416948601949094529116606084015266ffffffffffffff1660808301526001600160681b031660a082015260c0016104dd565b348015610c7757600080fd5b5060d15460d254610ca2916001600160a01b039081169190811690600160a01b900463ffffffff1683565b604080516001600160a01b03948516815293909216602084015263ffffffff16908201526060016104dd565b348015610cda57600080fd5b5060d254600160a01b900463ffffffff1661052c565b348015610cfc57600080fd5b5060d1546001600160a01b0316610583565b348015610d1a57600080fd5b50610506610d29366004614f17565b611d85565b348015610d3a57600080fd5b506104b9610d49366004615088565b611e1e565b348015610d5a57600080fd5b5061052c60d65481565b348015610d7057600080fd5b50610506610d7f366004614f17565b611f1c565b348015610d9057600080fd5b5060d454610583906001600160a01b031681565b348015610db057600080fd5b506105837f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b348015610de457600080fd5b5061052c611f29565b348015610df957600080fd5b5060f554610583906001600160a01b031681565b348015610e1957600080fd5b5061052c62093a8081565b348015610e3057600080fd5b506104b9610e3f366004615088565b612057565b348015610e5057600080fd5b506104b96120c4565b348015610e6557600080fd5b506104b96122ba565b348015610e7a57600080fd5b5061052c610e89366004614e83565b61235d565b348015610e9a57600080fd5b506105837f000000000000000000000000eb8cab2f4663247db8eafb556f498c861bb4e16181565b348015610ece57600080fd5b506104b9610edd366004614e83565b61237a565b348015610eee57600080fd5b5061052c60f85481565b348015610f0457600080fd5b506104b9610f13366004615088565b612409565b348015610f2457600080fd5b506105837f0000000000000000000000004114b7c04bbba682130cae2ba26fc5d2473b4ddc81565b348015610f5857600080fd5b5061052c610f67366004614e9f565b6001600160a01b03918216600090815260986020908152604080832093909416825291909152205490565b348015610f9e57600080fd5b506104b9612476565b348015610fb357600080fd5b5061052c60fa5481565b348015610fc957600080fd5b506104b9610fd8366004614e83565b61262a565b348015610fe957600080fd5b506104b9610ff8366004615005565b61271d565b34801561100957600080fd5b506104b9611018366004614e83565b612975565b6104b9612a10565b34801561103157600080fd5b50611045611040366004614e83565b612b61565b604080519283526020830191909152016104dd565b34801561106657600080fd5b506104b9612c44565b34801561107b57600080fd5b506104b9612c99565b34801561109057600080fd5b5060f654610583906001600160a01b031681565b3480156110b057600080fd5b5061010054610583906001600160a01b031681565b3480156110d157600080fd5b5061010154610583906001600160a01b031681565b3480156110f257600080fd5b506104b9611101366004615088565b612ef2565b6065546001600160a01b031633146111395760405162461bcd60e51b8152600401611130906152e9565b60405180910390fd5b61010080546001600160a01b0319166001600160a01b0392909216919091179055565b6060609a805461116b906156d6565b80601f0160208091040260200160405190810160405280929190818152602001828054611197906156d6565b80156111e45780601f106111b9576101008083540402835291602001916111e4565b820191906000526020600020905b8154815290600101906020018083116111c757829003601f168201915b5050505050905090565b60006111fb338484612fd3565b5060015b92915050565b60006112128484846130f8565b6001600160a01b0384166000908152609860209081526040808320338452909152902054828110156112975760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b6064820152608401611130565b6112a48533858403612fd3565b60019150505b9392505050565b600260015414156112d45760405162461bcd60e51b81526004016111309061533f565b600260015533600090815260c96020526040902060cf5461ffff168261130c5760405162461bcd60e51b81526004016111309061531e565b815461ffff1681146113505760405162461bcd60e51b815260206004820152600d60248201526c125b9d985b1a59081c9bdd5b99609a1b6044820152606401611130565b81546201000090046001600160681b0316838110156113a15760405162461bcd60e51b815260206004820152600d60248201526c115e18d9595908185b5bdd5b9d609a1b6044820152606401611130565b6113ab81856132c8565b83546001600160681b0391909116620100000262010000600160781b031990911617835560d0546113e5906001600160801b0316856132c8565b60d080546001600160801b0319166001600160801b0392909216919091179055604080518581526020810184905233917fab2daf3c146ca6416cbccd2a86ed2ba995e171ef6319df14a38aef01403a9c96910160405180910390a261144a33856132d4565b5050600180555050565b6065546001600160a01b0316331461147e5760405162461bcd60e51b8152600401611130906152e9565b6001600160a01b0381166114ca5760405162461bcd60e51b815260206004820152601360248201527210b732bba9ba3934b5b2a9b2b632b1ba34b7b760691b6044820152606401611130565b60f680546001600160a01b0319166001600160a01b0392909216919091179055565b6002600154141561150f5760405162461bcd60e51b81526004016111309061533f565b6002600155816115315760405162461bcd60e51b81526004016111309061531e565b6001600160a01b03811661154457600080fd5b61154e8282613435565b60cc5461156c906201000090046001600160a01b03163330856136c7565b505060018055565b3360008181526098602090815260408083206001600160a01b038716845290915281205490916111fb9185906115ab908690615551565b612fd3565b60cc5460009060ff61010090910416816115e66115cc60995490565b6115d4611f29565b60d0546001600160801b031685613732565b90506115fb6115f48561235d565b8284613772565b949350505050565b6065546001600160a01b0316331461162d5760405162461bcd60e51b8152600401611130906152e9565b6001600160a01b0381166116835760405162461bcd60e51b815260206004820152601860248201527f216e65774f7074696f6e735072656d69756d50726963657200000000000000006044820152606401611130565b60f580546001600160a01b0319166001600160a01b0392909216919091179055565b6065546001600160a01b031633146116cf5760405162461bcd60e51b8152600401611130906152e9565b600081116117095760405162461bcd60e51b81526020600482015260076024820152660216e65774361760cc1b6044820152606401611130565b611712816137d4565b60ce54604080516001600160681b039092168252602082018390527f5f86edbb9d92228a9edc3f0ebc0f001bda1ea345ac7335e0eeef3504b31d1a1c910160405180910390a160ce80546cffffffffffffffffffffffffff19166001600160681b0392909216919091179055565b6065546001600160a01b031633146117aa5760405162461bcd60e51b8152600401611130906152e9565b6000816001600160801b0316116117f25760405162461bcd60e51b815260206004820152600c60248201526b21737472696b65507269636560a01b6044820152606401611130565b6001600160801b031660fa5560cf5460f9805461ffff191661ffff909216919091179055565b6065546001600160a01b031633146118425760405162461bcd60e51b8152600401611130906152e9565b61010380546001600160a01b0319166001600160a01b0392909216919091179055565b60d4546001600160a01b0316331461188f5760405162461bcd60e51b81526004016111309061527a565b600081116118cb5760405162461bcd60e51b8152602060048201526009602482015268216d696e507269636560b81b6044820152606401611130565b60f855565b60d4546001600160a01b031633146118fa5760405162461bcd60e51b81526004016111309061527a565b6002600154141561191d5760405162461bcd60e51b81526004016111309061533f565b600260015560d2546040516358ffbb3d60e01b81526001600160a01b037f0000000000000000000000004bec71a4ac41ee9761440f6921dd17ba1c1213b181166004830152909116602482015273f7f4260943db50eee7e917330c35b460ff70ad54906358ffbb3d9060440160206040518083038186803b1580156119a157600080fd5b505af41580156119b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119d991906150a0565b5060018055565b60d4546001600160a01b03163314611a0a5760405162461bcd60e51b81526004016111309061527a565b60026001541415611a2d5760405162461bcd60e51b81526004016111309061533f565b600260015560fc54604051633545cbf360e21b81526001600160a01b037f000000000000000000000000eb8cab2f4663247db8eafb556f498c861bb4e161169163d5172fcc91611a84919086908690600401615449565b600060405180830381600087803b158015611a9e57600080fd5b505af1158015611ab2573d6000803e3d6000fd5b50506001805550505050565b60026001541415611ae15760405162461bcd60e51b81526004016111309061533f565b6002600181905550611af56000600161381e565b60018055565b6065546001600160a01b03163314611b255760405162461bcd60e51b8152600401611130906152e9565b611b33620f42406064615674565b8110611b815760405162461bcd60e51b815260206004820152601760248201527f496e76616c696420706572666f726d616e6365206665650000000000000000006044820152606401611130565b60d55460408051918252602082018390527f24867dfb6fcb9970a07be21024956524abe7a1837faa903ff0e99aaa40cf893e910160405180910390a160d555565b6065546001600160a01b03163314611bec5760405162461bcd60e51b8152600401611130906152e9565b611bf660006139cd565b565b60026001541415611c1b5760405162461bcd60e51b81526004016111309061533f565b6002600155611c2981613a1f565b61010254611c379082613be6565b610102555060018055565b6060609b805461116b906156d6565b6000611c86611c5f60995490565b611c67611f29565b60d05460cc546001600160801b0390911690610100900460ff16613732565b905090565b60026001541415611cae5760405162461bcd60e51b81526004016111309061533f565b600260015580611ced5760405162461bcd60e51b815260206004820152600a602482015269216e756d526f756e647360b01b6044820152606401611130565b60cf5461ffff1660005b82811015611d7c576000611d0b8284615551565b600081815260ca602052604090205490915015611d585760405162461bcd60e51b815260206004820152600b60248201526a125b9a5d1a585b1a5e995960aa1b6044820152606401611130565b600090815260ca602052604090206001905580611d7481615711565b915050611cf7565b50506001805550565b3360009081526098602090815260408083206001600160a01b038616845290915281205482811015611e075760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401611130565b611e143385858403612fd3565b5060019392505050565b60026001541415611e415760405162461bcd60e51b81526004016111309061533f565b6002600155610100546001600160a01b031680611e5d57600080fd5b60008211611e6a57600080fd5b3360009081526097602052604090205482811015611e9657611e96611e8f84836132c8565b600061381e565b611ea13330856130f8565b611eac308385612fd3565b6040516383df674760e01b815260048101849052336024820152600060448201526001600160a01b038316906383df674790606401600060405180830381600087803b158015611efb57600080fd5b505af1158015611f0f573d6000803e3d6000fd5b5050600180555050505050565b60006111fb3384846130f8565b60d2546000906001600160a01b0316611fbc5760cc546040516370a0823160e01b8152306004820152620100009091046001600160a01b0316906370a082319060240160206040518083038186803b158015611f8457600080fd5b505afa158015611f98573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c8691906150a0565b60cc546040516370a0823160e01b8152306004820152611c86916201000090046001600160a01b0316906370a082319060240160206040518083038186803b15801561200757600080fd5b505afa15801561201b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061203f91906150a0565b60cf546201000090046001600160681b031690613be6565b6002600154141561207a5760405162461bcd60e51b81526004016111309061533f565b60026001558061209c5760405162461bcd60e51b81526004016111309061531e565b6120a68133613435565b60cc546119d9906201000090046001600160a01b03163330846136c7565b60d4546001600160a01b031633146120ee5760405162461bcd60e51b81526004016111309061527a565b600260015414156121115760405162461bcd60e51b81526004016111309061533f565b600260015560d1546001600160a01b03168061215d5760405162461bcd60e51b815260206004820152600b60248201526a10b732bc3a27b83a34b7b760a91b6044820152606401611130565b60d280546001600160a01b03199081166001600160a01b03841690811790925560d18054909116905560cf54604051620100009091046001600160681b03168082529133917f045c558fdce4714c5816d53820d27420f4cd860892df203fe636384d8d19aa019060200160405180910390a3604051632904c23960e01b81526001600160a01b037f0000000000000000000000004bec71a4ac41ee9761440f6921dd17ba1c1213b1811660048301527f0000000000000000000000003c212a044760de5a529b3ba59363ddeccc2210be81166024830152831660448201526064810182905273f7f4260943db50eee7e917330c35b460ff70ad5490632904c2399060840160206040518083038186803b15801561227957600080fd5b505af415801561228d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122b191906150a0565b5061156c613bf2565b610103546001600160a01b0316806122d157600080fd5b6122dd6000600161381e565b33600081815260976020526040902054906122f9908383612fd3565b60405163c9c2d4f560e01b8152336004820152602481018290526001600160a01b0383169063c9c2d4f590604401600060405180830381600087803b15801561234157600080fd5b505af1158015612355573d6000803e3d6000fd5b505050505050565b600080600061236b84612b61565b90925090506115fb8282613be6565b6065546001600160a01b031633146123a45760405162461bcd60e51b8152600401611130906152e9565b6001600160a01b0381166123e75760405162461bcd60e51b815260206004820152600a60248201526910b732bba5b2b2b832b960b11b6044820152606401611130565b60d480546001600160a01b0319166001600160a01b0392909216919091179055565b6002600154141561242c5760405162461bcd60e51b81526004016111309061533f565b60026001558061246b5760405162461bcd60e51b815260206004820152600a602482015269216e756d53686172657360b01b6044820152606401611130565b6119d981600061381e565b600260015414156124995760405162461bcd60e51b81526004016111309061533f565b600260015560d2546001600160a01b0316801515806124be575060cf5461ffff166001145b6124f95760405162461bcd60e51b815260206004820152600c60248201526b149bdd5b990818db1bdcd95960a21b6044820152606401611130565b61250281613cc4565b600061010254905060008061251960fd5484613e3a565b60fd81905560d054919350915060009061254390600160801b90046001600160801b031685613be6565b905061254e816140c1565b60d080546001600160801b03808416600160801b029116179055600061010255612577836137d4565b60cf805462010000600160781b031916620100006001600160681b0386160217905560006125a54282613be6565b905063ffffffff8111156125fb5760405162461bcd60e51b815260206004820152601860248201527f4f766572666c6f77206e6578744f7074696f6e526561647900000000000000006044820152606401611130565b60d2805463ffffffff909216600160a01b0263ffffffff60a01b19909216919091179055505060018055505050565b6065546001600160a01b031633146126545760405162461bcd60e51b8152600401611130906152e9565b6001600160a01b03811661269d5760405162461bcd60e51b815260206004820152601060248201526f085b995dd19959549958da5c1a595b9d60821b6044820152606401611130565b60d3546001600160a01b03828116911614156126fb5760405162461bcd60e51b815260206004820152601860248201527f4d757374206265206e657720666565526563697069656e7400000000000000006044820152606401611130565b60d380546001600160a01b0319166001600160a01b0392909216919091179055565b600054610100900460ff1680612736575060005460ff16155b6127525760405162461bcd60e51b81526004016111309061529b565b600054610100900460ff16158015612774576000805461ffff19166101011790555b6128396127846020850185614e83565b6127946040860160208701614e83565b6127a46060870160408801614e83565b606087013560808801356127bb60a08a018a61550c565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506127fd9250505060c08b018b61550c565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508c925061410b915050565b600061284c610100850160e08601614e83565b6001600160a01b0316141561289c5760405162461bcd60e51b815260206004820152601660248201527510afb7b83a34b7b739a83932b6b4bab6a83934b1b2b960511b6044820152606401611130565b60006128b061012085016101008601614e83565b6001600160a01b031614156128fb5760405162461bcd60e51b815260206004820152601160248201527010afb9ba3934b5b2a9b2b632b1ba34b7b760791b6044820152606401611130565b61290c610100840160e08501614e83565b60f580546001600160a01b0319166001600160a01b039290921691909117905561293e61012084016101008501614e83565b60f680546001600160a01b0319166001600160a01b03929092169190911790558015612970576000805461ff00191690555b505050565b6065546001600160a01b0316331461299f5760405162461bcd60e51b8152600401611130906152e9565b6001600160a01b038116612a045760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401611130565b612a0d816139cd565b50565b60026001541415612a335760405162461bcd60e51b81526004016111309061533f565b600260015560cc547f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26001600160a01b03908116620100009092041614612aa45760405162461bcd60e51b8152602060048201526005602482015264042ae8aa8960db1b6044820152606401611130565b60003411612add5760405162461bcd60e51b81526020600482015260066024820152652176616c756560d01b6044820152606401611130565b612ae73433613435565b7f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26001600160a01b031663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b158015612b4257600080fd5b505af1158015612b56573d6000803e3d6000fd5b505060018055505050565b6001600160a01b038116600090815260c9602090815260408083208151606081018352905461ffff81168083526201000082046001600160681b031694830194909452600160781b90046001600160801b031691810191909152829160011115612be3575050506001600160a01b031660009081526097602052604081205491565b60cf54815161ffff908116600090815260ca602052604081205460cc549193612c1993869391169190610100900460ff1661434a565b9050612c3a856001600160a01b031660009081526097602052604090205490565b9590945092505050565b60026001541415612c675760405162461bcd60e51b81526004016111309061533f565b60026001556000612c766143bb565b60fd54909150612c8690826132c8565b6001600160801b031660fd555060018055565b60d4546001600160a01b03163314612cc35760405162461bcd60e51b81526004016111309061527a565b60026001541415612ce65760405162461bcd60e51b81526004016111309061533f565b600260015560d2546001600160a01b031680158015612d0c575060cf5461ffff16600114155b612d4b5760405162461bcd60e51b815260206004820152601060248201526f149bdd5b99081b9bdd0818db1bdcd95960821b6044820152606401611130565b60408051610120810182526001600160a01b037f0000000000000000000000004114b7c04bbba682130cae2ba26fc5d2473b4ddc811682527f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb488116602083015260cc8054620100009004821683850152848216606084015260006080840181905260f95461ffff1660a085015260fa5460c085015260f654831660e085015260f55490921661010084015292516377e3ce0d60e11b8152919290918291829173f7f4260943db50eee7e917330c35b460ff70ad549163efc79c1a91612e3791889160cf90600401615376565b60606040518083038186803b158015612e4f57600080fd5b505af4158015612e63573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e879190614f42565b604080518381526020810183905293965091945092507fa217999b1c125c2a996f712c5f26a28addad7167bd8a67d5bd5b2a751148abb0910160405180910390a1505060d180546001600160a01b0319166001600160a01b0392909216919091179055505060018055565b6065546001600160a01b03163314612f1c5760405162461bcd60e51b8152600401611130906152e9565b612f2a620f42406064615674565b8110612f715760405162461bcd60e51b8152602060048201526016602482015275496e76616c6964206d616e6167656d656e742066656560501b6044820152606401611130565b6000612f8e63031ba309612f8884620f4240614578565b90614584565b60d65460408051918252602082018590529192507f4e874b007ab14f7e263baefd44951834c8266f4f224d1092e49e9c254354cc54910160405180910390a160d65550565b6001600160a01b0383166130355760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401611130565b6001600160a01b0382166130965760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401611130565b6001600160a01b0383811660008181526098602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b6001600160a01b03831661315c5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401611130565b6001600160a01b0382166131be5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401611130565b6001600160a01b038316600090815260976020526040902054818110156132365760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401611130565b6001600160a01b0380851660009081526097602052604080822085850390559185168152908120805484929061326d908490615551565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516132b991815260200190565b60405180910390a35b50505050565b60006112aa8284615693565b60cc546001600160a01b03620100009091048116907f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc21681141561342157604051632e1a7d4d60e01b8152600481018390527f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26001600160a01b031690632e1a7d4d90602401600060405180830381600087803b15801561337457600080fd5b505af1158015613388573d6000803e3d6000fd5b505050506000836001600160a01b03168360405160006040518083038185875af1925050503d80600081146133d9576040519150601f19603f3d011682016040523d82523d6000602084013e6133de565b606091505b50509050806132c25760405162461bcd60e51b815260206004820152600f60248201526e151c985b9cd9995c8819985a5b1959608a1b6044820152606401611130565b6129706001600160a01b0382168484614590565b60cf5461ffff1660006134508461344a611f29565b90613be6565b60ce549091506001600160681b031681111561349b5760405162461bcd60e51b815260206004820152600a6024820152690457863656564206361760b41b6044820152606401611130565b60cd54600160a01b900466ffffffffffffff168110156134f45760405162461bcd60e51b8152602060048201526014602482015273496e73756666696369656e742062616c616e636560601b6044820152606401611130565b60408051858152602081018490526001600160a01b038516917f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a15910160405180910390a26001600160a01b038316600090815260c9602090815260408083208151606081018352905461ffff81168083526201000082046001600160681b031683860152600160781b9091046001600160801b031682840152845260ca90925282205460cc549192916135b3918491879190610100900460ff1661434a565b8251909150869061ffff168514156135e45760208301516000906135e0906001600160681b031689613be6565b9150505b6135ed816137d4565b6040805160608101825261ffff80881682526001600160681b0380851660208085019182526001600160801b038089168688019081526001600160a01b038e16600090815260c990935296822095518654935197518216600160781b02600160781b600160f81b03199890951662010000026effffffffffffffffffffffffffffff1990941695169490941791909117949094161790915560d054613693911689613be6565b905061369e816140c1565b60d080546001600160801b0319166001600160801b039290921691909117905550505050505050565b6040516001600160a01b03808516602483015283166044820152606481018290526132c29085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526145c0565b60008061374083600a6155cc565b9050600086116137505780613768565b61376886612f8861376188886132c8565b8490614578565b9695505050505050565b6000600183116137bc5760405162461bcd60e51b8152602060048201526015602482015274496e76616c6964206173736574506572536861726560581b6044820152606401611130565b6115fb6137ca83600a6155cc565b612f888686614578565b6001600160681b03811115612a0d5760405162461bcd60e51b815260206004820152601060248201526f13dd995c999b1bddc81d5a5b9d0c4c0d60821b6044820152606401611130565b33600090815260c9602090815260408083208151606081018352905461ffff8082168084526201000083046001600160681b031684870152600160781b9092046001600160801b03168385015260cf5491865260ca9094529184205460cc54919492909316926138999185918591610100900460ff1661434a565b9050836138a657846138a8565b805b9450846138b6575050505050565b808511156138fa5760405162461bcd60e51b81526020600482015260116024820152704578636565647320617661696c61626c6560781b6044820152606401611130565b825161ffff168211156139275733600090815260c960205260409020805462010000600160781b03191690555b613930856140c1565b61393a81866132c8565b33600081815260c960205260409081902080546001600160801b0394909416600160781b02600160781b600160f81b0319909416939093179092558451915190917fe5b754fb1abb7f01b499791d0b820ae3b6af3424ac1c59768edb53f4ec31a929916139b39189825261ffff16602082015260400190565b60405180910390a26139c63033876130f8565b5050505050565b606580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60008111613a5c5760405162461bcd60e51b815260206004820152600a602482015269216e756d53686172657360b01b6044820152606401611130565b33600090815260c960205260409020546201000090046001600160681b0316151580613aa6575033600090815260c96020526040902054600160781b90046001600160801b031615155b15613ab757613ab76000600161381e565b60cf5433600081815260cb60209081526040918290208054835187815261ffff96871693810184905292959194911685149290917f0c53c82ad07e2d592d88ece3b066777dd60f1118e2a081b380efc4358f0d9e2a910160405180910390a281546201000090046001600160801b031660008215613b4057613b398287613be6565b9050613ba3565b8115613b825760405162461bcd60e51b81526020600482015260116024820152704578697374696e6720776974686472617760781b6044820152606401611130565b5033600090815260cb60205260409020805461ffff191661ffff8616179055845b613bac816140c1565b33600081815260cb60205260409020805462010000600160901b031916620100006001600160801b038516021790556123559030886130f8565b60006112aa8284615551565b60d25460f8546040516301c6654960e21b81526001600160a01b0392831660048201819052602482018390527f000000000000000000000000eb8cab2f4663247db8eafb556f498c861bb4e161909316604482015260cc606482015273f7f4260943db50eee7e917330c35b460ff70ad549063071995249060840160206040518083038186803b158015613c8557600080fd5b505af4158015613c99573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613cbd91906150a0565b60fc555050565b60cf546201000090046001600160681b03166001600160a01b03821615613d105760cf80546cffffffffffffffffffffffffff60781b1916600160781b6001600160681b038416021790555b60cf805462010000600160781b031916905560d280546001600160a01b03191690556001600160a01b03821615613e3657604051636c6fe87f60e11b81526001600160a01b037f0000000000000000000000004bec71a4ac41ee9761440f6921dd17ba1c1213b116600482015260009073f7f4260943db50eee7e917330c35b460ff70ad549063d8dfd0fe9060240160206040518083038186803b158015613db757600080fd5b505af4158015613dcb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613def91906150a0565b9050336001600160a01b0316836001600160a01b03167f7e830f7c1771deb1bdb35c4a7e6051bbac32b376f7f4e4976b8618b0b11997f7836040516130eb91815260200190565b5050565b60d3546040805160e08101825260cc54610100810460ff16825291516370a0823160e01b815230600482015260009384936001600160a01b0391821693859384938493849373f7f4260943db50eee7e917330c35b460ff70ad549363d9b874389360cf93602084019262010000909104909116906370a082319060240160206040518083038186803b158015613ecf57600080fd5b505afa158015613ee3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613f0791906150a0565b8152602001613f1560995490565b81526020018d815260200160d554815260200160d65481526020018c8152506040518363ffffffff1660e01b8152600401613fa292919060006101008201905083825282516020830152602083015160408301526040830151606083015260608301516080830152608083015160a083015260a083015160c083015260c083015160e08301529392505050565b60c06040518083038186803b158015613fba57600080fd5b505af4158015613fce573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613ff291906150dc565b60cf5461ffff16600081815260ca60209081526040918290208790558151858152908101849052908101829052969d50949b50919850965094509250906001600160a01b038716907f0a242f7ecaf711036ca770774ceffae28e60ef042ac113ddd187f2631db0c0069060600160405180910390a260d080546001600160801b0319169055614082816001615551565b60cf805461ffff191661ffff92909216919091179055506140a590503084614692565b80156140b5576140b584826132d4565b505050505b9250929050565b6001600160801b03811115612a0d5760405162461bcd60e51b815260206004820152601060248201526f09eeccae4ccd8deee40ead2dce86264760831b6044820152606401611130565b600054610100900460ff1680614124575060005460ff16155b6141405760405162461bcd60e51b81526004016111309061529b565b600054610100900460ff16158015614162576000805461ffff19166101011790555b60405163c72733f760e01b815273f7f4260943db50eee7e917330c35b460ff70ad549063c72733f7906141a7908c908c908c908b908d908c908c908c9060040161516d565b60006040518083038186803b1580156141bf57600080fd5b505af41580156141d3573d6000803e3d6000fd5b505050506141df614771565b6141e984846147e4565b6141f1614863565b6141fa89612975565b60d480546001600160a01b03808b166001600160a01b03199283161790925560d38054928a169290911691909117905560d585905561424463031ba309612f8888620f4240614578565b60d6558160cc6142548282615769565b505060cc546040516370a0823160e01b81523060048201526000916201000090046001600160a01b0316906370a082319060240160206040518083038186803b1580156142a057600080fd5b505afa1580156142b4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906142d891906150a0565b90506142e3816137d4565b60cf805461ffff196001600160681b03909316600160781b02929092167fffffffff00000000000000000000000000ffffffffffffffffffffffffff0000909216919091176001179055801561433f576000805461ff00191690555b505050505050505050565b835160009061ffff16158015906143655750845161ffff1684115b156143a757600061438486602001516001600160681b031685856148ca565b604087015190915061439f906001600160801b031682613be6565b9150506115fb565b50505050604001516001600160801b031690565b33600090815260cb6020526040812080546001600160801b03620100008204169061ffff168161441d5760405162461bcd60e51b815260206004820152600d60248201526c139bdd081a5b9a5d1a585d1959609a1b6044820152606401611130565b60cf5461ffff1681106144655760405162461bcd60e51b815260206004820152601060248201526f149bdd5b99081b9bdd0818db1bdcd95960821b6044820152606401611130565b33600090815260cb60205260409020805462010000600160901b031916905560d0546144a190600160801b90046001600160801b0316836132c8565b60d080546001600160801b03928316600160801b029216919091179055600081815260ca602052604081205460cc546144e491859160ff61010090910416613772565b604080518281526020810186905291925033917ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b568910160405180910390a261452c308461492d565b6000811161456e5760405162461bcd60e51b815260206004820152600f60248201526e085dda5d1a191c985dd05b5bdd5b9d608a1b6044820152606401611130565b6115fb33826132d4565b60006112aa8284615674565b60006112aa8284615569565b6040516001600160a01b03831660248201526044810182905261297090849063a9059cbb60e01b906064016136fb565b6000614615826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316614a7b9092919063ffffffff16565b80519091501561297057808060200190518101906146339190614fe9565b6129705760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401611130565b6001600160a01b0382166146e85760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401611130565b80609960008282546146fa9190615551565b90915550506001600160a01b03821660009081526097602052604081208054839290614727908490615551565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b600054610100900460ff168061478a575060005460ff16155b6147a65760405162461bcd60e51b81526004016111309061529b565b600054610100900460ff161580156147c8576000805461ffff19166101011790555b6147d0614a8a565b8015612a0d576000805461ff001916905550565b600054610100900460ff16806147fd575060005460ff16155b6148195760405162461bcd60e51b81526004016111309061529b565b600054610100900460ff1615801561483b576000805461ffff19166101011790555b614843614af9565b61484d8383614b63565b8015612970576000805461ff0019169055505050565b600054610100900460ff168061487c575060005460ff16155b6148985760405162461bcd60e51b81526004016111309061529b565b600054610100900460ff161580156148ba576000805461ffff19166101011790555b6148c2614af9565b6147d0614bf8565b6000600183116149145760405162461bcd60e51b8152602060048201526015602482015274496e76616c6964206173736574506572536861726560581b6044820152606401611130565b6115fb83612f8861492685600a6155cc565b8790614578565b6001600160a01b03821661498d5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401611130565b6001600160a01b03821660009081526097602052604090205481811015614a015760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401611130565b6001600160a01b0383166000908152609760205260408120838303905560998054849290614a30908490615693565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b60606115fb8484600085614c58565b600054610100900460ff1680614aa3575060005460ff16155b614abf5760405162461bcd60e51b81526004016111309061529b565b600054610100900460ff16158015614ae1576000805461ffff19166101011790555b600180558015612a0d576000805461ff001916905550565b600054610100900460ff1680614b12575060005460ff16155b614b2e5760405162461bcd60e51b81526004016111309061529b565b600054610100900460ff161580156147d0576000805461ffff19166101011790558015612a0d576000805461ff001916905550565b600054610100900460ff1680614b7c575060005460ff16155b614b985760405162461bcd60e51b81526004016111309061529b565b600054610100900460ff16158015614bba576000805461ffff19166101011790555b8251614bcd90609a906020860190614db9565b508151614be190609b906020850190614db9565b508015612970576000805461ff0019169055505050565b600054610100900460ff1680614c11575060005460ff16155b614c2d5760405162461bcd60e51b81526004016111309061529b565b600054610100900460ff16158015614c4f576000805461ffff19166101011790555b6147d0336139cd565b606082471015614cb95760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401611130565b843b614d075760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401611130565b600080866001600160a01b03168587604051614d239190615151565b60006040518083038185875af1925050503d8060008114614d60576040519150601f19603f3d011682016040523d82523d6000602084013e614d65565b606091505b5091509150614d75828286614d80565b979650505050505050565b60608315614d8f5750816112aa565b825115614d9f5782518084602001fd5b8160405162461bcd60e51b81526004016111309190615267565b828054614dc5906156d6565b90600052602060002090601f016020900481019282614de75760008555614e2d565b82601f10614e0057805160ff1916838001178555614e2d565b82800160010185558215614e2d579182015b82811115614e2d578251825591602001919060010190614e12565b50614e39929150614e3d565b5090565b5b80821115614e395760008155600101614e3e565b8035614e5d8161587a565b919050565b8035614e5d8161589d565b8035614e5d816158b2565b8035614e5d816158c7565b600060208284031215614e94578081fd5b81356112aa8161587a565b60008060408385031215614eb1578081fd5b8235614ebc8161587a565b91506020830135614ecc8161587a565b809150509250929050565b600080600060608486031215614eeb578081fd5b8335614ef68161587a565b92506020840135614f068161587a565b929592945050506040919091013590565b60008060408385031215614f29578182fd5b8235614f348161587a565b946020939093013593505050565b600080600060608486031215614f56578283fd5b8351614f618161587a565b602085015160409095015190969495509392505050565b60008060208385031215614f8a578182fd5b823567ffffffffffffffff80821115614fa1578384fd5b818501915085601f830112614fb4578384fd5b813581811115614fc2578485fd5b86602061012083028501011115614fd7578485fd5b60209290920196919550909350505050565b600060208284031215614ffa578081fd5b81516112aa8161588f565b60008082840360e0811215615018578283fd5b833567ffffffffffffffff81111561502e578384fd5b84016101208187031215615040578384fd5b925060c0601f1982011215615053578182fd5b506020830190509250929050565b600060208284031215615072578081fd5b81356001600160801b03811681146112aa578182fd5b600060208284031215615099578081fd5b5035919050565b6000602082840312156150b1578081fd5b5051919050565b600080604083850312156150ca578182fd5b823591506020830135614ecc8161587a565b60008060008060008060c087890312156150f4578384fd5b865195506020870151945060408701519350606087015192506080870151915060a087015190509295509295509295565b6000815180845261513d8160208601602086016156aa565b601f01601f19169290920160200192915050565b600082516151638184602087016156aa565b9190910192915050565b60006101a060018060a01b03808c168452808b166020850152808a1660408501528860608501528760808501528160a08501526151ac82850188615125565b915083820360c08501526151c08287615125565b9250843591506151cf8261588f565b90151560e08401526020840135906151e6826158c7565b60ff8216610100850152604085013591506152008261587a565b1661012083015261521360608401614e52565b6001600160a01b031661014083015261522e60808401614e6d565b66ffffffffffffff1661016083015261524960a08401614e62565b6001600160681b038116610180840152509998505050505050505050565b6020815260006112aa6020830184615125565b60208082526007908201526610b5b2b2b832b960c91b604082015260600190565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526007908201526608585b5bdd5b9d60ca1b604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b83516001600160a01b031681526020808501516101608301916153a3908401826001600160a01b03169052565b5060408501516153be60408401826001600160a01b03169052565b5060608501516153d960608401826001600160a01b03169052565b506080850151608083015260a08501516153f960a084018261ffff169052565b5060c085015160c083015260e085015161541e60e08401826001600160a01b03169052565b50610100858101516001600160a01b0381168483015250506101208201939093526101400152919050565b838152604060208083018290528282018490526000919060609081850187855b888110156154fd57813583528382013584840152615488868301614e52565b6001600160a01b03168684015284820135858401526080808301359084015260a06154b4818401614e52565b6001600160a01b03169084015260c06154ce838201614e78565b60ff169084015260e0828101359084015261010080830135908401526101209283019290910190600101615469565b50909998505050505050505050565b6000808335601e19843603018112615522578283fd5b83018035915067ffffffffffffffff82111561553c578283fd5b6020019150368190038213156140ba57600080fd5b600082198211156155645761556461572c565b500190565b60008261558457634e487b7160e01b81526012600452602481fd5b500490565b600181815b808511156155c45781600019048211156155aa576155aa61572c565b808516156155b757918102915b93841c939080029061558e565b509250929050565b60006112aa83836000826155e2575060016111ff565b816155ef575060006111ff565b8160018114615605576002811461560f5761562b565b60019150506111ff565b60ff8411156156205761562061572c565b50506001821b6111ff565b5060208310610133831016604e8410600b841016171561564e575081810a6111ff565b6156588383615589565b806000190482111561566c5761566c61572c565b029392505050565b600081600019048311821515161561568e5761568e61572c565b500290565b6000828210156156a5576156a561572c565b500390565b60005b838110156156c55781810151838201526020016156ad565b838111156132c25750506000910152565b600181811c908216806156ea57607f821691505b6020821081141561570b57634e487b7160e01b600052602260045260246000fd5b50919050565b60006000198214156157255761572561572c565b5060010190565b634e487b7160e01b600052601160045260246000fd5b600081356111ff8161587a565b600081356111ff8161589d565b600081356111ff816158b2565b81356157748161588f565b815460ff19811691151560ff1691821783556020840135615794816158c7565b61ff008160081b169050808361ffff1984161717845560408501356157b88161587a565b6001600160b01b0319929092169092179190911760109190911b62010000600160b01b0316178155600181016158106157f360608501615742565b82546001600160a01b0319166001600160a01b0391909116178255565b61584961581f6080850161575c565b82805466ffffffffffffff60a01b191660a09290921b66ffffffffffffff60a01b16919091179055565b50613e3661585960a0840161574f565b600283016001600160681b0382166001600160681b03198254161781555050565b6001600160a01b0381168114612a0d57600080fd5b8015158114612a0d57600080fd5b6001600160681b0381168114612a0d57600080fd5b66ffffffffffffff81168114612a0d57600080fd5b60ff81168114612a0d57600080fdfea26469706673582212200782aab6ab851c7f09062424f1b9bdf0ad5e99b5e151b65fb4cb09011bc2d81664736f6c63430008040033","recompiledBytecode":"0x6080604052600436106104945760003560e01c80638b10cc7c11610260578063ca59409411610144578063e74b981b116100c1578063f756fa2111610085578063f756fa211461105a578063f87c7d931461106f578063f957a06714611084578063f9a0be68146110a4578063fba7dc61146110c5578063fe56e232146110e657600080fd5b8063e74b981b14610fbd578063f001382714610fdd578063f2fde38b14610ffd578063f6326fb31461101d578063f656ba511461102557600080fd5b8063db006a7511610108578063db006a7514610ef8578063db43e86214610f18578063dd62ed3e14610f4c578063e278fe6f14610f92578063e73c63d514610fa757600080fd5b8063ca59409414610e59578063ce7c2ac214610e6e578063cf3afa5114610e8e578063d164cc1514610ec2578063d5f2638214610ee257600080fd5b8063a457c2d7116101dd578063ad5c4648116101a1578063ad5c464814610da4578063ad7a672f14610dd8578063afa6626414610ded578063b4d1d79514610e0d578063b6b55f2514610e24578063b9f8092b14610e4457600080fd5b8063a457c2d714610d0e578063a694fc3a14610d2e578063a6f7f5d614610d4e578063a9059cbb14610d64578063aced166114610d8457600080fd5b80639be43daa116102245780639be43daa14610b9f5780639fcc2d7514610bbf578063a083ff1714610c6b578063a285c9e814610cce578063a2db9d8314610cf057600080fd5b80638b10cc7c14610b185780638da5cb5b14610b36578063947061b514610b5457806395d89b4114610b7557806399530b0614610b8a57600080fd5b806347786d371161038757806369b41170116103045780637a9262a2116102c85780637a9262a214610a075780637e108d5214610a6b57806383536ff314610a8b57806387153eb114610aa15780638778878214610ace57806389a3027114610ae457600080fd5b806369b41170146109725780636f31ab341461098757806370897b231461099c57806370a08231146109bc578063715018a6146109f257600080fd5b80635ea8cd121161034b5780635ea8cd1214610865578063600a2cfb14610885578063650cce8a1461089a5780636719b2ee146108ce578063692308681461095257600080fd5b806347786d37146107d85780634b2431d9146107f8578063503c70aa1461080f57806355489bb214610825578063573f0d6e1461084557600080fd5b8063313ce567116104155780633f23bb73116103d95780633f23bb73146107445780633f90916a14610764578063432833a6146107825780634603c0aa1461079857806346904840146107b857600080fd5b8063313ce5671461068e578063355274ea146106b857806336efd16f146106d657806339509351146106f65780633ec143d31461071657600080fd5b80631a92f6c21161045c5780631a92f6c21461054f57806323b872dd1461059b5780632728f333146105bb5780632775d01c1461064e57806330630da41461066e57600080fd5b8063048bf0851461049957806306fdde03146104bb578063095ea7b3146104e65780630cbf54c81461051657806318160ddd1461053a575b600080fd5b3480156104a557600080fd5b506104b96104b4366004614e83565b611106565b005b3480156104c757600080fd5b506104d061115c565b6040516104dd9190615267565b60405180910390f35b3480156104f257600080fd5b50610506610501366004614f17565b6111ee565b60405190151581526020016104dd565b34801561052257600080fd5b5061052c60fb5481565b6040519081526020016104dd565b34801561054657600080fd5b5060995461052c565b34801561055b57600080fd5b506105837f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016104dd565b3480156105a757600080fd5b506105066105b6366004614ed7565b611205565b3480156105c757600080fd5b5060cf5460d0546106099161ffff8116916001600160681b03620100008304811692600160781b900416906001600160801b0380821691600160801b90041685565b6040805161ffff90961686526001600160681b03948516602087015293909216928401929092526001600160801b03918216606084015216608082015260a0016104dd565b34801561065a57600080fd5b506104b9610669366004615088565b6112b1565b34801561067a57600080fd5b506104b9610689366004614e83565b611454565b34801561069a57600080fd5b5060cc54610100900460ff1660405160ff90911681526020016104dd565b3480156106c457600080fd5b5060ce546001600160681b031661052c565b3480156106e257600080fd5b506104b96106f13660046150b8565b6114ec565b34801561070257600080fd5b50610506610711366004614f17565b611574565b34801561072257600080fd5b5060f9546107319061ffff1681565b60405161ffff90911681526020016104dd565b34801561075057600080fd5b5061052c61075f366004614e83565b6115b0565b34801561077057600080fd5b5060d0546001600160801b031661052c565b34801561078e57600080fd5b5061052c60fc5481565b3480156107a457600080fd5b506104b96107b3366004614e83565b611603565b3480156107c457600080fd5b5060d354610583906001600160a01b031681565b3480156107e457600080fd5b506104b96107f3366004615088565b6116a5565b34801561080457600080fd5b5061052c6101025481565b34801561081b57600080fd5b5061052c60fd5481565b34801561083157600080fd5b506104b9610840366004615061565b611780565b34801561085157600080fd5b506104b9610860366004614e83565b611818565b34801561087157600080fd5b506104b9610880366004615088565b611865565b34801561089157600080fd5b506104b96118d0565b3480156108a657600080fd5b506105837f000000000000000000000000000000000000000000000000000000000000000081565b3480156108da57600080fd5b506109216108e9366004614e83565b60c96020526000908152604090205461ffff8116906201000081046001600160681b031690600160781b90046001600160801b031683565b6040805161ffff90941684526001600160681b0390921660208401526001600160801b0316908201526060016104dd565b34801561095e57600080fd5b506104b961096d366004614f78565b6119e0565b34801561097e57600080fd5b5061052c600081565b34801561099357600080fd5b506104b9611abe565b3480156109a857600080fd5b506104b96109b7366004615088565b611afb565b3480156109c857600080fd5b5061052c6109d7366004614e83565b6001600160a01b031660009081526097602052604090205490565b3480156109fe57600080fd5b506104b9611bc2565b348015610a1357600080fd5b50610a49610a22366004614e83565b60cb6020526000908152604090205461ffff8116906201000090046001600160801b031682565b6040805161ffff90931683526001600160801b039091166020830152016104dd565b348015610a7757600080fd5b506104b9610a86366004615088565b611bf8565b348015610a9757600080fd5b5061052c60f75481565b348015610aad57600080fd5b5061052c610abc366004615088565b60ca6020526000908152604090205481565b348015610ada57600080fd5b5061052c60d55481565b348015610af057600080fd5b506105837f000000000000000000000000000000000000000000000000000000000000000081565b348015610b2457600080fd5b5060d2546001600160a01b0316610583565b348015610b4257600080fd5b506065546001600160a01b0316610583565b348015610b6057600080fd5b5061010354610583906001600160a01b031681565b348015610b8157600080fd5b506104d0611c42565b348015610b9657600080fd5b5061052c611c51565b348015610bab57600080fd5b506104b9610bba366004615088565b611c8b565b348015610bcb57600080fd5b5060cc5460cd5460ce54610c1b9260ff808216936101008304909116926001600160a01b036201000090930483169282169166ffffffffffffff600160a01b90910416906001600160681b031686565b60408051961515875260ff90951660208701526001600160a01b03938416948601949094529116606084015266ffffffffffffff1660808301526001600160681b031660a082015260c0016104dd565b348015610c7757600080fd5b5060d15460d254610ca2916001600160a01b039081169190811690600160a01b900463ffffffff1683565b604080516001600160a01b03948516815293909216602084015263ffffffff16908201526060016104dd565b348015610cda57600080fd5b5060d254600160a01b900463ffffffff1661052c565b348015610cfc57600080fd5b5060d1546001600160a01b0316610583565b348015610d1a57600080fd5b50610506610d29366004614f17565b611d85565b348015610d3a57600080fd5b506104b9610d49366004615088565b611e1e565b348015610d5a57600080fd5b5061052c60d65481565b348015610d7057600080fd5b50610506610d7f366004614f17565b611f1c565b348015610d9057600080fd5b5060d454610583906001600160a01b031681565b348015610db057600080fd5b506105837f000000000000000000000000000000000000000000000000000000000000000081565b348015610de457600080fd5b5061052c611f29565b348015610df957600080fd5b5060f554610583906001600160a01b031681565b348015610e1957600080fd5b5061052c62093a8081565b348015610e3057600080fd5b506104b9610e3f366004615088565b612057565b348015610e5057600080fd5b506104b96120c4565b348015610e6557600080fd5b506104b96122ba565b348015610e7a57600080fd5b5061052c610e89366004614e83565b61235d565b348015610e9a57600080fd5b506105837f000000000000000000000000000000000000000000000000000000000000000081565b348015610ece57600080fd5b506104b9610edd366004614e83565b61237a565b348015610eee57600080fd5b5061052c60f85481565b348015610f0457600080fd5b506104b9610f13366004615088565b612409565b348015610f2457600080fd5b506105837f000000000000000000000000000000000000000000000000000000000000000081565b348015610f5857600080fd5b5061052c610f67366004614e9f565b6001600160a01b03918216600090815260986020908152604080832093909416825291909152205490565b348015610f9e57600080fd5b506104b9612476565b348015610fb357600080fd5b5061052c60fa5481565b348015610fc957600080fd5b506104b9610fd8366004614e83565b61262a565b348015610fe957600080fd5b506104b9610ff8366004615005565b61271d565b34801561100957600080fd5b506104b9611018366004614e83565b612975565b6104b9612a10565b34801561103157600080fd5b50611045611040366004614e83565b612b61565b604080519283526020830191909152016104dd565b34801561106657600080fd5b506104b9612c44565b34801561107b57600080fd5b506104b9612c99565b34801561109057600080fd5b5060f654610583906001600160a01b031681565b3480156110b057600080fd5b5061010054610583906001600160a01b031681565b3480156110d157600080fd5b5061010154610583906001600160a01b031681565b3480156110f257600080fd5b506104b9611101366004615088565b612ef2565b6065546001600160a01b031633146111395760405162461bcd60e51b8152600401611130906152e9565b60405180910390fd5b61010080546001600160a01b0319166001600160a01b0392909216919091179055565b6060609a805461116b906156d6565b80601f0160208091040260200160405190810160405280929190818152602001828054611197906156d6565b80156111e45780601f106111b9576101008083540402835291602001916111e4565b820191906000526020600020905b8154815290600101906020018083116111c757829003601f168201915b5050505050905090565b60006111fb338484612fd3565b5060015b92915050565b60006112128484846130f8565b6001600160a01b0384166000908152609860209081526040808320338452909152902054828110156112975760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b6064820152608401611130565b6112a48533858403612fd3565b60019150505b9392505050565b600260015414156112d45760405162461bcd60e51b81526004016111309061533f565b600260015533600090815260c96020526040902060cf5461ffff168261130c5760405162461bcd60e51b81526004016111309061531e565b815461ffff1681146113505760405162461bcd60e51b815260206004820152600d60248201526c125b9d985b1a59081c9bdd5b99609a1b6044820152606401611130565b81546201000090046001600160681b0316838110156113a15760405162461bcd60e51b815260206004820152600d60248201526c115e18d9595908185b5bdd5b9d609a1b6044820152606401611130565b6113ab81856132c8565b83546001600160681b0391909116620100000262010000600160781b031990911617835560d0546113e5906001600160801b0316856132c8565b60d080546001600160801b0319166001600160801b0392909216919091179055604080518581526020810184905233917fab2daf3c146ca6416cbccd2a86ed2ba995e171ef6319df14a38aef01403a9c96910160405180910390a261144a33856132d4565b5050600180555050565b6065546001600160a01b0316331461147e5760405162461bcd60e51b8152600401611130906152e9565b6001600160a01b0381166114ca5760405162461bcd60e51b815260206004820152601360248201527210b732bba9ba3934b5b2a9b2b632b1ba34b7b760691b6044820152606401611130565b60f680546001600160a01b0319166001600160a01b0392909216919091179055565b6002600154141561150f5760405162461bcd60e51b81526004016111309061533f565b6002600155816115315760405162461bcd60e51b81526004016111309061531e565b6001600160a01b03811661154457600080fd5b61154e8282613435565b60cc5461156c906201000090046001600160a01b03163330856136c7565b505060018055565b3360008181526098602090815260408083206001600160a01b038716845290915281205490916111fb9185906115ab908690615551565b612fd3565b60cc5460009060ff61010090910416816115e66115cc60995490565b6115d4611f29565b60d0546001600160801b031685613732565b90506115fb6115f48561235d565b8284613772565b949350505050565b6065546001600160a01b0316331461162d5760405162461bcd60e51b8152600401611130906152e9565b6001600160a01b0381166116835760405162461bcd60e51b815260206004820152601860248201527f216e65774f7074696f6e735072656d69756d50726963657200000000000000006044820152606401611130565b60f580546001600160a01b0319166001600160a01b0392909216919091179055565b6065546001600160a01b031633146116cf5760405162461bcd60e51b8152600401611130906152e9565b600081116117095760405162461bcd60e51b81526020600482015260076024820152660216e65774361760cc1b6044820152606401611130565b611712816137d4565b60ce54604080516001600160681b039092168252602082018390527f5f86edbb9d92228a9edc3f0ebc0f001bda1ea345ac7335e0eeef3504b31d1a1c910160405180910390a160ce80546cffffffffffffffffffffffffff19166001600160681b0392909216919091179055565b6065546001600160a01b031633146117aa5760405162461bcd60e51b8152600401611130906152e9565b6000816001600160801b0316116117f25760405162461bcd60e51b815260206004820152600c60248201526b21737472696b65507269636560a01b6044820152606401611130565b6001600160801b031660fa5560cf5460f9805461ffff191661ffff909216919091179055565b6065546001600160a01b031633146118425760405162461bcd60e51b8152600401611130906152e9565b61010380546001600160a01b0319166001600160a01b0392909216919091179055565b60d4546001600160a01b0316331461188f5760405162461bcd60e51b81526004016111309061527a565b600081116118cb5760405162461bcd60e51b8152602060048201526009602482015268216d696e507269636560b81b6044820152606401611130565b60f855565b60d4546001600160a01b031633146118fa5760405162461bcd60e51b81526004016111309061527a565b6002600154141561191d5760405162461bcd60e51b81526004016111309061533f565b600260015560d2546040516358ffbb3d60e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081166004830152909116602482015273f7f4260943db50eee7e917330c35b460ff70ad54906358ffbb3d9060440160206040518083038186803b1580156119a157600080fd5b505af41580156119b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119d991906150a0565b5060018055565b60d4546001600160a01b03163314611a0a5760405162461bcd60e51b81526004016111309061527a565b60026001541415611a2d5760405162461bcd60e51b81526004016111309061533f565b600260015560fc54604051633545cbf360e21b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163d5172fcc91611a84919086908690600401615449565b600060405180830381600087803b158015611a9e57600080fd5b505af1158015611ab2573d6000803e3d6000fd5b50506001805550505050565b60026001541415611ae15760405162461bcd60e51b81526004016111309061533f565b6002600181905550611af56000600161381e565b60018055565b6065546001600160a01b03163314611b255760405162461bcd60e51b8152600401611130906152e9565b611b33620f42406064615674565b8110611b815760405162461bcd60e51b815260206004820152601760248201527f496e76616c696420706572666f726d616e6365206665650000000000000000006044820152606401611130565b60d55460408051918252602082018390527f24867dfb6fcb9970a07be21024956524abe7a1837faa903ff0e99aaa40cf893e910160405180910390a160d555565b6065546001600160a01b03163314611bec5760405162461bcd60e51b8152600401611130906152e9565b611bf660006139cd565b565b60026001541415611c1b5760405162461bcd60e51b81526004016111309061533f565b6002600155611c2981613a1f565b61010254611c379082613be6565b610102555060018055565b6060609b805461116b906156d6565b6000611c86611c5f60995490565b611c67611f29565b60d05460cc546001600160801b0390911690610100900460ff16613732565b905090565b60026001541415611cae5760405162461bcd60e51b81526004016111309061533f565b600260015580611ced5760405162461bcd60e51b815260206004820152600a602482015269216e756d526f756e647360b01b6044820152606401611130565b60cf5461ffff1660005b82811015611d7c576000611d0b8284615551565b600081815260ca602052604090205490915015611d585760405162461bcd60e51b815260206004820152600b60248201526a125b9a5d1a585b1a5e995960aa1b6044820152606401611130565b600090815260ca602052604090206001905580611d7481615711565b915050611cf7565b50506001805550565b3360009081526098602090815260408083206001600160a01b038616845290915281205482811015611e075760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401611130565b611e143385858403612fd3565b5060019392505050565b60026001541415611e415760405162461bcd60e51b81526004016111309061533f565b6002600155610100546001600160a01b031680611e5d57600080fd5b60008211611e6a57600080fd5b3360009081526097602052604090205482811015611e9657611e96611e8f84836132c8565b600061381e565b611ea13330856130f8565b611eac308385612fd3565b6040516383df674760e01b815260048101849052336024820152600060448201526001600160a01b038316906383df674790606401600060405180830381600087803b158015611efb57600080fd5b505af1158015611f0f573d6000803e3d6000fd5b5050600180555050505050565b60006111fb3384846130f8565b60d2546000906001600160a01b0316611fbc5760cc546040516370a0823160e01b8152306004820152620100009091046001600160a01b0316906370a082319060240160206040518083038186803b158015611f8457600080fd5b505afa158015611f98573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c8691906150a0565b60cc546040516370a0823160e01b8152306004820152611c86916201000090046001600160a01b0316906370a082319060240160206040518083038186803b15801561200757600080fd5b505afa15801561201b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061203f91906150a0565b60cf546201000090046001600160681b031690613be6565b6002600154141561207a5760405162461bcd60e51b81526004016111309061533f565b60026001558061209c5760405162461bcd60e51b81526004016111309061531e565b6120a68133613435565b60cc546119d9906201000090046001600160a01b03163330846136c7565b60d4546001600160a01b031633146120ee5760405162461bcd60e51b81526004016111309061527a565b600260015414156121115760405162461bcd60e51b81526004016111309061533f565b600260015560d1546001600160a01b03168061215d5760405162461bcd60e51b815260206004820152600b60248201526a10b732bc3a27b83a34b7b760a91b6044820152606401611130565b60d280546001600160a01b03199081166001600160a01b03841690811790925560d18054909116905560cf54604051620100009091046001600160681b03168082529133917f045c558fdce4714c5816d53820d27420f4cd860892df203fe636384d8d19aa019060200160405180910390a3604051632904c23960e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811660048301527f000000000000000000000000000000000000000000000000000000000000000081166024830152831660448201526064810182905273f7f4260943db50eee7e917330c35b460ff70ad5490632904c2399060840160206040518083038186803b15801561227957600080fd5b505af415801561228d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122b191906150a0565b5061156c613bf2565b610103546001600160a01b0316806122d157600080fd5b6122dd6000600161381e565b33600081815260976020526040902054906122f9908383612fd3565b60405163c9c2d4f560e01b8152336004820152602481018290526001600160a01b0383169063c9c2d4f590604401600060405180830381600087803b15801561234157600080fd5b505af1158015612355573d6000803e3d6000fd5b505050505050565b600080600061236b84612b61565b90925090506115fb8282613be6565b6065546001600160a01b031633146123a45760405162461bcd60e51b8152600401611130906152e9565b6001600160a01b0381166123e75760405162461bcd60e51b815260206004820152600a60248201526910b732bba5b2b2b832b960b11b6044820152606401611130565b60d480546001600160a01b0319166001600160a01b0392909216919091179055565b6002600154141561242c5760405162461bcd60e51b81526004016111309061533f565b60026001558061246b5760405162461bcd60e51b815260206004820152600a602482015269216e756d53686172657360b01b6044820152606401611130565b6119d981600061381e565b600260015414156124995760405162461bcd60e51b81526004016111309061533f565b600260015560d2546001600160a01b0316801515806124be575060cf5461ffff166001145b6124f95760405162461bcd60e51b815260206004820152600c60248201526b149bdd5b990818db1bdcd95960a21b6044820152606401611130565b61250281613cc4565b600061010254905060008061251960fd5484613e3a565b60fd81905560d054919350915060009061254390600160801b90046001600160801b031685613be6565b905061254e816140c1565b60d080546001600160801b03808416600160801b029116179055600061010255612577836137d4565b60cf805462010000600160781b031916620100006001600160681b0386160217905560006125a54282613be6565b905063ffffffff8111156125fb5760405162461bcd60e51b815260206004820152601860248201527f4f766572666c6f77206e6578744f7074696f6e526561647900000000000000006044820152606401611130565b60d2805463ffffffff909216600160a01b0263ffffffff60a01b19909216919091179055505060018055505050565b6065546001600160a01b031633146126545760405162461bcd60e51b8152600401611130906152e9565b6001600160a01b03811661269d5760405162461bcd60e51b815260206004820152601060248201526f085b995dd19959549958da5c1a595b9d60821b6044820152606401611130565b60d3546001600160a01b03828116911614156126fb5760405162461bcd60e51b815260206004820152601860248201527f4d757374206265206e657720666565526563697069656e7400000000000000006044820152606401611130565b60d380546001600160a01b0319166001600160a01b0392909216919091179055565b600054610100900460ff1680612736575060005460ff16155b6127525760405162461bcd60e51b81526004016111309061529b565b600054610100900460ff16158015612774576000805461ffff19166101011790555b6128396127846020850185614e83565b6127946040860160208701614e83565b6127a46060870160408801614e83565b606087013560808801356127bb60a08a018a61550c565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506127fd9250505060c08b018b61550c565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508c925061410b915050565b600061284c610100850160e08601614e83565b6001600160a01b0316141561289c5760405162461bcd60e51b815260206004820152601660248201527510afb7b83a34b7b739a83932b6b4bab6a83934b1b2b960511b6044820152606401611130565b60006128b061012085016101008601614e83565b6001600160a01b031614156128fb5760405162461bcd60e51b815260206004820152601160248201527010afb9ba3934b5b2a9b2b632b1ba34b7b760791b6044820152606401611130565b61290c610100840160e08501614e83565b60f580546001600160a01b0319166001600160a01b039290921691909117905561293e61012084016101008501614e83565b60f680546001600160a01b0319166001600160a01b03929092169190911790558015612970576000805461ff00191690555b505050565b6065546001600160a01b0316331461299f5760405162461bcd60e51b8152600401611130906152e9565b6001600160a01b038116612a045760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401611130565b612a0d816139cd565b50565b60026001541415612a335760405162461bcd60e51b81526004016111309061533f565b600260015560cc547f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03908116620100009092041614612aa45760405162461bcd60e51b8152602060048201526005602482015264042ae8aa8960db1b6044820152606401611130565b60003411612add5760405162461bcd60e51b81526020600482015260066024820152652176616c756560d01b6044820152606401611130565b612ae73433613435565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b158015612b4257600080fd5b505af1158015612b56573d6000803e3d6000fd5b505060018055505050565b6001600160a01b038116600090815260c9602090815260408083208151606081018352905461ffff81168083526201000082046001600160681b031694830194909452600160781b90046001600160801b031691810191909152829160011115612be3575050506001600160a01b031660009081526097602052604081205491565b60cf54815161ffff908116600090815260ca602052604081205460cc549193612c1993869391169190610100900460ff1661434a565b9050612c3a856001600160a01b031660009081526097602052604090205490565b9590945092505050565b60026001541415612c675760405162461bcd60e51b81526004016111309061533f565b60026001556000612c766143bb565b60fd54909150612c8690826132c8565b6001600160801b031660fd555060018055565b60d4546001600160a01b03163314612cc35760405162461bcd60e51b81526004016111309061527a565b60026001541415612ce65760405162461bcd60e51b81526004016111309061533f565b600260015560d2546001600160a01b031680158015612d0c575060cf5461ffff16600114155b612d4b5760405162461bcd60e51b815260206004820152601060248201526f149bdd5b99081b9bdd0818db1bdcd95960821b6044820152606401611130565b60408051610120810182526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811682527f00000000000000000000000000000000000000000000000000000000000000008116602083015260cc8054620100009004821683850152848216606084015260006080840181905260f95461ffff1660a085015260fa5460c085015260f654831660e085015260f55490921661010084015292516377e3ce0d60e11b8152919290918291829173f7f4260943db50eee7e917330c35b460ff70ad549163efc79c1a91612e3791889160cf90600401615376565b60606040518083038186803b158015612e4f57600080fd5b505af4158015612e63573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e879190614f42565b604080518381526020810183905293965091945092507fa217999b1c125c2a996f712c5f26a28addad7167bd8a67d5bd5b2a751148abb0910160405180910390a1505060d180546001600160a01b0319166001600160a01b0392909216919091179055505060018055565b6065546001600160a01b03163314612f1c5760405162461bcd60e51b8152600401611130906152e9565b612f2a620f42406064615674565b8110612f715760405162461bcd60e51b8152602060048201526016602482015275496e76616c6964206d616e6167656d656e742066656560501b6044820152606401611130565b6000612f8e63031ba309612f8884620f4240614578565b90614584565b60d65460408051918252602082018590529192507f4e874b007ab14f7e263baefd44951834c8266f4f224d1092e49e9c254354cc54910160405180910390a160d65550565b6001600160a01b0383166130355760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401611130565b6001600160a01b0382166130965760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401611130565b6001600160a01b0383811660008181526098602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b6001600160a01b03831661315c5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401611130565b6001600160a01b0382166131be5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401611130565b6001600160a01b038316600090815260976020526040902054818110156132365760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401611130565b6001600160a01b0380851660009081526097602052604080822085850390559185168152908120805484929061326d908490615551565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516132b991815260200190565b60405180910390a35b50505050565b60006112aa8284615693565b60cc546001600160a01b03620100009091048116907f00000000000000000000000000000000000000000000000000000000000000001681141561342157604051632e1a7d4d60e01b8152600481018390527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690632e1a7d4d90602401600060405180830381600087803b15801561337457600080fd5b505af1158015613388573d6000803e3d6000fd5b505050506000836001600160a01b03168360405160006040518083038185875af1925050503d80600081146133d9576040519150601f19603f3d011682016040523d82523d6000602084013e6133de565b606091505b50509050806132c25760405162461bcd60e51b815260206004820152600f60248201526e151c985b9cd9995c8819985a5b1959608a1b6044820152606401611130565b6129706001600160a01b0382168484614590565b60cf5461ffff1660006134508461344a611f29565b90613be6565b60ce549091506001600160681b031681111561349b5760405162461bcd60e51b815260206004820152600a6024820152690457863656564206361760b41b6044820152606401611130565b60cd54600160a01b900466ffffffffffffff168110156134f45760405162461bcd60e51b8152602060048201526014602482015273496e73756666696369656e742062616c616e636560601b6044820152606401611130565b60408051858152602081018490526001600160a01b038516917f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a15910160405180910390a26001600160a01b038316600090815260c9602090815260408083208151606081018352905461ffff81168083526201000082046001600160681b031683860152600160781b9091046001600160801b031682840152845260ca90925282205460cc549192916135b3918491879190610100900460ff1661434a565b8251909150869061ffff168514156135e45760208301516000906135e0906001600160681b031689613be6565b9150505b6135ed816137d4565b6040805160608101825261ffff80881682526001600160681b0380851660208085019182526001600160801b038089168688019081526001600160a01b038e16600090815260c990935296822095518654935197518216600160781b02600160781b600160f81b03199890951662010000026effffffffffffffffffffffffffffff1990941695169490941791909117949094161790915560d054613693911689613be6565b905061369e816140c1565b60d080546001600160801b0319166001600160801b039290921691909117905550505050505050565b6040516001600160a01b03808516602483015283166044820152606481018290526132c29085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526145c0565b60008061374083600a6155cc565b9050600086116137505780613768565b61376886612f8861376188886132c8565b8490614578565b9695505050505050565b6000600183116137bc5760405162461bcd60e51b8152602060048201526015602482015274496e76616c6964206173736574506572536861726560581b6044820152606401611130565b6115fb6137ca83600a6155cc565b612f888686614578565b6001600160681b03811115612a0d5760405162461bcd60e51b815260206004820152601060248201526f13dd995c999b1bddc81d5a5b9d0c4c0d60821b6044820152606401611130565b33600090815260c9602090815260408083208151606081018352905461ffff8082168084526201000083046001600160681b031684870152600160781b9092046001600160801b03168385015260cf5491865260ca9094529184205460cc54919492909316926138999185918591610100900460ff1661434a565b9050836138a657846138a8565b805b9450846138b6575050505050565b808511156138fa5760405162461bcd60e51b81526020600482015260116024820152704578636565647320617661696c61626c6560781b6044820152606401611130565b825161ffff168211156139275733600090815260c960205260409020805462010000600160781b03191690555b613930856140c1565b61393a81866132c8565b33600081815260c960205260409081902080546001600160801b0394909416600160781b02600160781b600160f81b0319909416939093179092558451915190917fe5b754fb1abb7f01b499791d0b820ae3b6af3424ac1c59768edb53f4ec31a929916139b39189825261ffff16602082015260400190565b60405180910390a26139c63033876130f8565b5050505050565b606580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60008111613a5c5760405162461bcd60e51b815260206004820152600a602482015269216e756d53686172657360b01b6044820152606401611130565b33600090815260c960205260409020546201000090046001600160681b0316151580613aa6575033600090815260c96020526040902054600160781b90046001600160801b031615155b15613ab757613ab76000600161381e565b60cf5433600081815260cb60209081526040918290208054835187815261ffff96871693810184905292959194911685149290917f0c53c82ad07e2d592d88ece3b066777dd60f1118e2a081b380efc4358f0d9e2a910160405180910390a281546201000090046001600160801b031660008215613b4057613b398287613be6565b9050613ba3565b8115613b825760405162461bcd60e51b81526020600482015260116024820152704578697374696e6720776974686472617760781b6044820152606401611130565b5033600090815260cb60205260409020805461ffff191661ffff8616179055845b613bac816140c1565b33600081815260cb60205260409020805462010000600160901b031916620100006001600160801b038516021790556123559030886130f8565b60006112aa8284615551565b60d25460f8546040516301c6654960e21b81526001600160a01b0392831660048201819052602482018390527f0000000000000000000000000000000000000000000000000000000000000000909316604482015260cc606482015273f7f4260943db50eee7e917330c35b460ff70ad549063071995249060840160206040518083038186803b158015613c8557600080fd5b505af4158015613c99573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613cbd91906150a0565b60fc555050565b60cf546201000090046001600160681b03166001600160a01b03821615613d105760cf80546cffffffffffffffffffffffffff60781b1916600160781b6001600160681b038416021790555b60cf805462010000600160781b031916905560d280546001600160a01b03191690556001600160a01b03821615613e3657604051636c6fe87f60e11b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016600482015260009073f7f4260943db50eee7e917330c35b460ff70ad549063d8dfd0fe9060240160206040518083038186803b158015613db757600080fd5b505af4158015613dcb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613def91906150a0565b9050336001600160a01b0316836001600160a01b03167f7e830f7c1771deb1bdb35c4a7e6051bbac32b376f7f4e4976b8618b0b11997f7836040516130eb91815260200190565b5050565b60d3546040805160e08101825260cc54610100810460ff16825291516370a0823160e01b815230600482015260009384936001600160a01b0391821693859384938493849373f7f4260943db50eee7e917330c35b460ff70ad549363d9b874389360cf93602084019262010000909104909116906370a082319060240160206040518083038186803b158015613ecf57600080fd5b505afa158015613ee3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613f0791906150a0565b8152602001613f1560995490565b81526020018d815260200160d554815260200160d65481526020018c8152506040518363ffffffff1660e01b8152600401613fa292919060006101008201905083825282516020830152602083015160408301526040830151606083015260608301516080830152608083015160a083015260a083015160c083015260c083015160e08301529392505050565b60c06040518083038186803b158015613fba57600080fd5b505af4158015613fce573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613ff291906150dc565b60cf5461ffff16600081815260ca60209081526040918290208790558151858152908101849052908101829052969d50949b50919850965094509250906001600160a01b038716907f0a242f7ecaf711036ca770774ceffae28e60ef042ac113ddd187f2631db0c0069060600160405180910390a260d080546001600160801b0319169055614082816001615551565b60cf805461ffff191661ffff92909216919091179055506140a590503084614692565b80156140b5576140b584826132d4565b505050505b9250929050565b6001600160801b03811115612a0d5760405162461bcd60e51b815260206004820152601060248201526f09eeccae4ccd8deee40ead2dce86264760831b6044820152606401611130565b600054610100900460ff1680614124575060005460ff16155b6141405760405162461bcd60e51b81526004016111309061529b565b600054610100900460ff16158015614162576000805461ffff19166101011790555b60405163c72733f760e01b815273f7f4260943db50eee7e917330c35b460ff70ad549063c72733f7906141a7908c908c908c908b908d908c908c908c9060040161516d565b60006040518083038186803b1580156141bf57600080fd5b505af41580156141d3573d6000803e3d6000fd5b505050506141df614771565b6141e984846147e4565b6141f1614863565b6141fa89612975565b60d480546001600160a01b03808b166001600160a01b03199283161790925560d38054928a169290911691909117905560d585905561424463031ba309612f8888620f4240614578565b60d6558160cc6142548282615769565b505060cc546040516370a0823160e01b81523060048201526000916201000090046001600160a01b0316906370a082319060240160206040518083038186803b1580156142a057600080fd5b505afa1580156142b4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906142d891906150a0565b90506142e3816137d4565b60cf805461ffff196001600160681b03909316600160781b02929092167fffffffff00000000000000000000000000ffffffffffffffffffffffffff0000909216919091176001179055801561433f576000805461ff00191690555b505050505050505050565b835160009061ffff16158015906143655750845161ffff1684115b156143a757600061438486602001516001600160681b031685856148ca565b604087015190915061439f906001600160801b031682613be6565b9150506115fb565b50505050604001516001600160801b031690565b33600090815260cb6020526040812080546001600160801b03620100008204169061ffff168161441d5760405162461bcd60e51b815260206004820152600d60248201526c139bdd081a5b9a5d1a585d1959609a1b6044820152606401611130565b60cf5461ffff1681106144655760405162461bcd60e51b815260206004820152601060248201526f149bdd5b99081b9bdd0818db1bdcd95960821b6044820152606401611130565b33600090815260cb60205260409020805462010000600160901b031916905560d0546144a190600160801b90046001600160801b0316836132c8565b60d080546001600160801b03928316600160801b029216919091179055600081815260ca602052604081205460cc546144e491859160ff61010090910416613772565b604080518281526020810186905291925033917ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b568910160405180910390a261452c308461492d565b6000811161456e5760405162461bcd60e51b815260206004820152600f60248201526e085dda5d1a191c985dd05b5bdd5b9d608a1b6044820152606401611130565b6115fb33826132d4565b60006112aa8284615674565b60006112aa8284615569565b6040516001600160a01b03831660248201526044810182905261297090849063a9059cbb60e01b906064016136fb565b6000614615826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316614a7b9092919063ffffffff16565b80519091501561297057808060200190518101906146339190614fe9565b6129705760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401611130565b6001600160a01b0382166146e85760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401611130565b80609960008282546146fa9190615551565b90915550506001600160a01b03821660009081526097602052604081208054839290614727908490615551565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b600054610100900460ff168061478a575060005460ff16155b6147a65760405162461bcd60e51b81526004016111309061529b565b600054610100900460ff161580156147c8576000805461ffff19166101011790555b6147d0614a8a565b8015612a0d576000805461ff001916905550565b600054610100900460ff16806147fd575060005460ff16155b6148195760405162461bcd60e51b81526004016111309061529b565b600054610100900460ff1615801561483b576000805461ffff19166101011790555b614843614af9565b61484d8383614b63565b8015612970576000805461ff0019169055505050565b600054610100900460ff168061487c575060005460ff16155b6148985760405162461bcd60e51b81526004016111309061529b565b600054610100900460ff161580156148ba576000805461ffff19166101011790555b6148c2614af9565b6147d0614bf8565b6000600183116149145760405162461bcd60e51b8152602060048201526015602482015274496e76616c6964206173736574506572536861726560581b6044820152606401611130565b6115fb83612f8861492685600a6155cc565b8790614578565b6001600160a01b03821661498d5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401611130565b6001600160a01b03821660009081526097602052604090205481811015614a015760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401611130565b6001600160a01b0383166000908152609760205260408120838303905560998054849290614a30908490615693565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b60606115fb8484600085614c58565b600054610100900460ff1680614aa3575060005460ff16155b614abf5760405162461bcd60e51b81526004016111309061529b565b600054610100900460ff16158015614ae1576000805461ffff19166101011790555b600180558015612a0d576000805461ff001916905550565b600054610100900460ff1680614b12575060005460ff16155b614b2e5760405162461bcd60e51b81526004016111309061529b565b600054610100900460ff161580156147d0576000805461ffff19166101011790558015612a0d576000805461ff001916905550565b600054610100900460ff1680614b7c575060005460ff16155b614b985760405162461bcd60e51b81526004016111309061529b565b600054610100900460ff16158015614bba576000805461ffff19166101011790555b8251614bcd90609a906020860190614db9565b508151614be190609b906020850190614db9565b508015612970576000805461ff0019169055505050565b600054610100900460ff1680614c11575060005460ff16155b614c2d5760405162461bcd60e51b81526004016111309061529b565b600054610100900460ff16158015614c4f576000805461ffff19166101011790555b6147d0336139cd565b606082471015614cb95760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401611130565b843b614d075760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401611130565b600080866001600160a01b03168587604051614d239190615151565b60006040518083038185875af1925050503d8060008114614d60576040519150601f19603f3d011682016040523d82523d6000602084013e614d65565b606091505b5091509150614d75828286614d80565b979650505050505050565b60608315614d8f5750816112aa565b825115614d9f5782518084602001fd5b8160405162461bcd60e51b81526004016111309190615267565b828054614dc5906156d6565b90600052602060002090601f016020900481019282614de75760008555614e2d565b82601f10614e0057805160ff1916838001178555614e2d565b82800160010185558215614e2d579182015b82811115614e2d578251825591602001919060010190614e12565b50614e39929150614e3d565b5090565b5b80821115614e395760008155600101614e3e565b8035614e5d8161587a565b919050565b8035614e5d8161589d565b8035614e5d816158b2565b8035614e5d816158c7565b600060208284031215614e94578081fd5b81356112aa8161587a565b60008060408385031215614eb1578081fd5b8235614ebc8161587a565b91506020830135614ecc8161587a565b809150509250929050565b600080600060608486031215614eeb578081fd5b8335614ef68161587a565b92506020840135614f068161587a565b929592945050506040919091013590565b60008060408385031215614f29578182fd5b8235614f348161587a565b946020939093013593505050565b600080600060608486031215614f56578283fd5b8351614f618161587a565b602085015160409095015190969495509392505050565b60008060208385031215614f8a578182fd5b823567ffffffffffffffff80821115614fa1578384fd5b818501915085601f830112614fb4578384fd5b813581811115614fc2578485fd5b86602061012083028501011115614fd7578485fd5b60209290920196919550909350505050565b600060208284031215614ffa578081fd5b81516112aa8161588f565b60008082840360e0811215615018578283fd5b833567ffffffffffffffff81111561502e578384fd5b84016101208187031215615040578384fd5b925060c0601f1982011215615053578182fd5b506020830190509250929050565b600060208284031215615072578081fd5b81356001600160801b03811681146112aa578182fd5b600060208284031215615099578081fd5b5035919050565b6000602082840312156150b1578081fd5b5051919050565b600080604083850312156150ca578182fd5b823591506020830135614ecc8161587a565b60008060008060008060c087890312156150f4578384fd5b865195506020870151945060408701519350606087015192506080870151915060a087015190509295509295509295565b6000815180845261513d8160208601602086016156aa565b601f01601f19169290920160200192915050565b600082516151638184602087016156aa565b9190910192915050565b60006101a060018060a01b03808c168452808b166020850152808a1660408501528860608501528760808501528160a08501526151ac82850188615125565b915083820360c08501526151c08287615125565b9250843591506151cf8261588f565b90151560e08401526020840135906151e6826158c7565b60ff8216610100850152604085013591506152008261587a565b1661012083015261521360608401614e52565b6001600160a01b031661014083015261522e60808401614e6d565b66ffffffffffffff1661016083015261524960a08401614e62565b6001600160681b038116610180840152509998505050505050505050565b6020815260006112aa6020830184615125565b60208082526007908201526610b5b2b2b832b960c91b604082015260600190565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526007908201526608585b5bdd5b9d60ca1b604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b83516001600160a01b031681526020808501516101608301916153a3908401826001600160a01b03169052565b5060408501516153be60408401826001600160a01b03169052565b5060608501516153d960608401826001600160a01b03169052565b506080850151608083015260a08501516153f960a084018261ffff169052565b5060c085015160c083015260e085015161541e60e08401826001600160a01b03169052565b50610100858101516001600160a01b0381168483015250506101208201939093526101400152919050565b838152604060208083018290528282018490526000919060609081850187855b888110156154fd57813583528382013584840152615488868301614e52565b6001600160a01b03168684015284820135858401526080808301359084015260a06154b4818401614e52565b6001600160a01b03169084015260c06154ce838201614e78565b60ff169084015260e0828101359084015261010080830135908401526101209283019290910190600101615469565b50909998505050505050505050565b6000808335601e19843603018112615522578283fd5b83018035915067ffffffffffffffff82111561553c578283fd5b6020019150368190038213156140ba57600080fd5b600082198211156155645761556461572c565b500190565b60008261558457634e487b7160e01b81526012600452602481fd5b500490565b600181815b808511156155c45781600019048211156155aa576155aa61572c565b808516156155b757918102915b93841c939080029061558e565b509250929050565b60006112aa83836000826155e2575060016111ff565b816155ef575060006111ff565b8160018114615605576002811461560f5761562b565b60019150506111ff565b60ff8411156156205761562061572c565b50506001821b6111ff565b5060208310610133831016604e8410600b841016171561564e575081810a6111ff565b6156588383615589565b806000190482111561566c5761566c61572c565b029392505050565b600081600019048311821515161561568e5761568e61572c565b500290565b6000828210156156a5576156a561572c565b500390565b60005b838110156156c55781810151838201526020016156ad565b838111156132c25750506000910152565b600181811c908216806156ea57607f821691505b6020821081141561570b57634e487b7160e01b600052602260045260246000fd5b50919050565b60006000198214156157255761572561572c565b5060010190565b634e487b7160e01b600052601160045260246000fd5b600081356111ff8161587a565b600081356111ff8161589d565b600081356111ff816158b2565b81356157748161588f565b815460ff19811691151560ff1691821783556020840135615794816158c7565b61ff008160081b169050808361ffff1984161717845560408501356157b88161587a565b6001600160b01b0319929092169092179190911760109190911b62010000600160b01b0316178155600181016158106157f360608501615742565b82546001600160a01b0319166001600160a01b0391909116178255565b61584961581f6080850161575c565b82805466ffffffffffffff60a01b191660a09290921b66ffffffffffffff60a01b16919091179055565b50613e3661585960a0840161574f565b600283016001600160681b0382166001600160681b03198254161781555050565b6001600160a01b0381168114612a0d57600080fd5b8015158114612a0d57600080fd5b6001600160681b0381168114612a0d57600080fd5b66ffffffffffffff81168114612a0d57600080fd5b60ff81168114612a0d57600080fdfea2646970667358221220d57d9363a2549d4d8bb447473f2ccf1f500aa870e9b3845b5f87898379dcf8d964736f6c63430008040033","sourceMap":"1132:15154:27:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7388:124;;;;;;;;;;-1:-1:-1;7388:124:27;;;;;:::i;:::-;;:::i;:::-;;2447:98:3;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;4544:166;;;;;;;;;;-1:-1:-1;4544:166:3;;;;;:::i;:::-;;:::i;:::-;;;11417:14:30;;11410:22;11392:41;;11380:2;11365:18;4544:166:3;11347:92:30;684:30:26;;;;;;;;;;;;;;;;;;;35093:25:30;;;35081:2;35066:18;684:30:26;35048:76:30;3535:106:3;;;;;;;;;;-1:-1:-1;3622:12:3;;3535:106;;4251:41:28;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;6961:32:30;;;6943:51;;6931:2;6916:18;4251:41:28;6898:102:30;5177:478:3;;;;;;;;;;-1:-1:-1;5177:478:3;;;;;:::i;:::-;;:::i;1944:34:28:-;;;;;;;;;;-1:-1:-1;1944:34:28;;;;;;;;;;-1:-1:-1;;;;;1944:34:28;;;;;;-1:-1:-1;;;1944:34:28;;;;-1:-1:-1;;;;;1944:34:28;;;;-1:-1:-1;;;1944:34:28;;;;;;;;;33903:6:30;33891:19;;;33873:38;;-1:-1:-1;;;;;33994:15:30;;;33989:2;33974:18;;33967:43;34046:15;;;;34026:18;;;34019:43;;;;-1:-1:-1;;;;;34151:15:30;;;34146:2;34131:18;;34124:43;34204:15;34198:3;34183:19;;34176:44;33860:3;33845:19;1944:34:28;33827:399:30;8365:815:27;;;;;;;;;;-1:-1:-1;8365:815:27;;;;;:::i;:::-;;:::i;6100:202::-;;;;;;;;;;-1:-1:-1;6100:202:27;;;;;:::i;:::-;;:::i;26262:101:28:-;;;;;;;;;;-1:-1:-1;26336:11:28;:20;;;;;;26262:101;;38101:4:30;38089:17;;;38071:36;;38059:2;38044:18;26262:101:28;38026:87:30;26369:86:28;;;;;;;;;;-1:-1:-1;26433:15:28;;-1:-1:-1;;;;;26433:15:28;26369:86;;11851:423;;;;;;;;;;-1:-1:-1;11851:423:28;;;;;:::i;:::-;;:::i;6050:212:3:-;;;;;;;;;;-1:-1:-1;6050:212:3;;;;;:::i;:::-;;:::i;532:37:26:-;;;;;;;;;;-1:-1:-1;532:37:26;;;;;;;;;;;33597:6:30;33585:19;;;33567:38;;33555:2;33540:18;532:37:26;33522:89:30;23219:472:28;;;;;;;;;;-1:-1:-1;23219:472:28;;;;;:::i;:::-;;:::i;26799:103::-;;;;;;;;;;-1:-1:-1;26872:23:28;;-1:-1:-1;;;;;26872:23:28;26799:103;;756:30:26;;;;;;;;;;;;;;;;6474:286:27;;;;;;;;;;-1:-1:-1;6474:286:27;;;;;:::i;:::-;;:::i;2174:27:28:-;;;;;;;;;;-1:-1:-1;2174:27:28;;;;-1:-1:-1;;;;;2174:27:28;;;10325:228;;;;;;;;;;-1:-1:-1;10325:228:28;;;;;:::i;:::-;;:::i;1529:42:26:-;;;;;;;;;;;;;;;;899:39;;;;;;;;;;;;;;;;6999:218:27;;;;;;;;;;-1:-1:-1;6999:218:27;;;;;:::i;:::-;;:::i;7955:112::-;;;;;;;;;;-1:-1:-1;7955:112:27;;;;;:::i;:::-;;:::i;7641:151::-;;;;;;;;;;-1:-1:-1;7641:151:27;;;;;:::i;:::-;;:::i;15563:195::-;;;;;;;;;;;;;:::i;4523:36:28:-;;;;;;;;;;;;;;;1316:63;;;;;;;;;;-1:-1:-1;1316:63:28;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;1316:63:28;;-1:-1:-1;;;1316:63:28;;-1:-1:-1;;;;;1316:63:28;;;;;;;34461:6:30;34449:19;;;34431:38;;-1:-1:-1;;;;;34505:41:30;;;34500:2;34485:18;;34478:69;-1:-1:-1;;;;;34583:47:30;34563:18;;;34556:75;34419:2;34404:18;1316:63:28;34386:251:30;15308:181:27;;;;;;;;;;-1:-1:-1;15308:181:27;;;;;:::i;:::-;;:::i;3635:33:28:-;;;;;;;;;;;;3667:1;3635:33;;17311:76;;;;;;;;;;;;;:::i;9892:319::-;;;;;;;;;;-1:-1:-1;9892:319:28;;;;;:::i;:::-;;:::i;3699:125:3:-;;;;;;;;;;-1:-1:-1;3699:125:3;;;;;:::i;:::-;-1:-1:-1;;;;;3799:18:3;3773:7;3799:18;;;:9;:18;;;;;;;3699:125;1871:92:0;;;;;;;;;;;;;:::i;1715:55:28:-;;;;;;;;;;-1:-1:-1;1715:55:28;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;1715:55:28;;;;;;;34844:6:30;34832:19;;;34814:38;;-1:-1:-1;;;;;34888:47:30;;;34883:2;34868:18;;34861:75;34787:18;1715:55:28;34769:173:30;9347:216:27;;;;;;;;;;-1:-1:-1;9347:216:27;;;;;:::i;:::-;;:::i;360:30:26:-;;;;;;;;;;;;;;;;1607:53:28;;;;;;;;;;-1:-1:-1;1607:53:28;;;;;:::i;:::-;;;;;;;;;;;;;;2503:29;;;;;;;;;;;;;;;;3508;;;;;;;;;;;;;;;26581:106;;;;;;;;;;-1:-1:-1;26655:25:28;;-1:-1:-1;;;;;26655:25:28;26581:106;;1239:85:0;;;;;;;;;;-1:-1:-1;1311:6:0;;-1:-1:-1;;;;;1311:6:0;1239:85;;1669:26:26;;;;;;;;;;-1:-1:-1;1669:26:26;;;;-1:-1:-1;;;;;1669:26:26;;;2658:102:3;;;;;;;;;;;;;:::i;25145:272:28:-;;;;;;;;;;;;;:::i;19594:429::-;;;;;;;;;;-1:-1:-1;19594:429:28;;;;;:::i;:::-;;:::i;1831:36::-;;;;;;;;;;-1:-1:-1;1831:36:28;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;1831:36:28;;;;;;;;;;;-1:-1:-1;;;1831:36:28;;;;;-1:-1:-1;;;;;1831:36:28;;;;;;;11744:14:30;;11737:22;11719:41;;11808:4;11796:17;;;11791:2;11776:18;;11769:45;-1:-1:-1;;;;;11888:15:30;;;11868:18;;;11861:43;;;;11940:15;;11935:2;11920:18;;11913:43;12005:16;11993:29;11987:3;11972:19;;11965:58;-1:-1:-1;;;;;12060:41:30;11841:3;12039:19;;12032:70;11706:3;11691:19;1831:36:28;11673:435:30;2061:36:28;;;;;;;;;;-1:-1:-1;2061:36:28;;;;;;-1:-1:-1;;;;;2061:36:28;;;;;;;;-1:-1:-1;;;2061:36:28;;;;;;;;;;-1:-1:-1;;;;;10348:15:30;;;10330:34;;10400:15;;;;10395:2;10380:18;;10373:43;10464:10;10452:23;10432:18;;;10425:51;10280:2;10265:18;2061:36:28;10247:235:30;26461:114:28;;;;;;;;;;-1:-1:-1;26539:29:28;;-1:-1:-1;;;26539:29:28;;;;26461:114;;26693:100;;;;;;;;;;-1:-1:-1;26764:11:28;:22;-1:-1:-1;;;;;26764:22:28;26693:100;;6749:405:3;;;;;;;;;;-1:-1:-1;6749:405:3;;;;;:::i;:::-;;:::i;10039:605:27:-;;;;;;;;;;-1:-1:-1;10039:605:27;;;;;:::i;:::-;;:::i;2649:28:28:-;;;;;;;;;;;;;;;;4027:172:3;;;;;;;;;;-1:-1:-1;4027:172:3;;;;;:::i;:::-;;:::i;2359:21:28:-;;;;;;;;;;-1:-1:-1;2359:21:28;;;;-1:-1:-1;;;;;2359:21:28;;;3408:29;;;;;;;;;;;;;;;25637:561;;;;;;;;;;;;;:::i;151:35:26:-;;;;;;;;;;-1:-1:-1;151:35:26;;;;-1:-1:-1;;;;;151:35:26;;;3731:39:28;;;;;;;;;;;;3764:6;3731:39;;11198:343;;;;;;;;;;-1:-1:-1;11198:343:28;;;;;:::i;:::-;;:::i;14330:575:27:-;;;;;;;;;;;;;:::i;15825:459::-;;;;;;;;;;;;;:::i;23903:196:28:-;;;;;;;;;;-1:-1:-1;23903:196:28;;;;;:::i;:::-;;:::i;4727:38::-;;;;;;;;;;;;;;;8516:151;;;;;;;;;;-1:-1:-1;8516:151:28;;;;;:::i;:::-;;:::i;426:35:26:-;;;;;;;;;;;;;;;;17057:145:28;;;;;;;;;;-1:-1:-1;17057:145:28;;;;;:::i;:::-;;:::i;1564:39:27:-;;;;;;;;;;;;;;;4257:149:3;;;;;;;;;;-1:-1:-1;4257:149:3;;;;;:::i;:::-;-1:-1:-1;;;;;4372:18:3;;;4346:7;4372:18;;;:11;:18;;;;;;;;:27;;;;;;;;;;;;;4257:149;11086:1266:27;;;;;;;;;;;;;:::i;618:36:26:-;;;;;;;;;;;;;;;;8801:262:28;;;;;;;;;;-1:-1:-1;8801:262:28;;;;;:::i;:::-;;:::i;4986:828:27:-;;;;;;;;;;-1:-1:-1;4986:828:27;;;;;:::i;:::-;;:::i;2112:189:0:-;;;;;;;;;;-1:-1:-1;2112:189:0;;;;;:::i;:::-;;:::i;10817:249:28:-;;;:::i;24428:624::-;;;;;;;;;;-1:-1:-1;24428:624:28;;;;;:::i;:::-;;:::i;:::-;;;;37526:25:30;;;37582:2;37567:18;;37560:34;;;;37499:18;24428:624:28;37481:119:30;9685:232:27;;;;;;;;;;;;;:::i;13060:1159::-;;;;;;;;;;;;;:::i;243:30:26:-;;;;;;;;;;-1:-1:-1;243:30:26;;;;-1:-1:-1;;;;;243:30:26;;;1246:29;;;;;;;;;;-1:-1:-1;1246:29:26;;;;-1:-1:-1;;;;;1246:29:26;;;1387:35;;;;;;;;;;-1:-1:-1;1387:35:26;;;;-1:-1:-1;;;;;1387:35:26;;;9226:498:28;;;;;;;;;;-1:-1:-1;9226:498:28;;;;;:::i;:::-;;:::i;7388:124:27:-;1311:6:0;;-1:-1:-1;;;;;1311:6:0;902:10:6;1451:23:0;1443:68;;;;-1:-1:-1;;;1443:68:0;;;;;;;:::i;:::-;;;;;;;;;7471:14:27::1;:34:::0;;-1:-1:-1;;;;;;7471:34:27::1;-1:-1:-1::0;;;;;7471:34:27;;;::::1;::::0;;;::::1;::::0;;7388:124::o;2447:98:3:-;2501:13;2533:5;2526:12;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2447:98;:::o;4544:166::-;4627:4;4643:39;902:10:6;4666:7:3;4675:6;4643:8;:39::i;:::-;-1:-1:-1;4699:4:3;4544:166;;;;;:::o;5177:478::-;5313:4;5329:36;5339:6;5347:9;5358:6;5329:9;:36::i;:::-;-1:-1:-1;;;;;5403:19:3;;5376:24;5403:19;;;:11;:19;;;;;;;;902:10:6;5403:33:3;;;;;;;;5454:26;;;;5446:79;;;;-1:-1:-1;;;5446:79:3;;22244:2:30;5446:79:3;;;22226:21:30;22283:2;22263:18;;;22256:30;22322:34;22302:18;;;22295:62;-1:-1:-1;;;22373:18:30;;;22366:38;22421:19;;5446:79:3;22216:230:30;5446:79:3;5559:57;5568:6;902:10:6;5609:6:3;5590:16;:25;5559:8;:57::i;:::-;5644:4;5637:11;;;5177:478;;;;;;:::o;8365:815:27:-;1751:1:2;2493:7;;:19;;2485:63;;;;-1:-1:-1;;;2485:63:2;;;;;;;:::i;:::-;1751:1;2623:7;:18;8514:10:27::1;8440:43;8498:27:::0;;;:15:::1;:27;::::0;;;;8559:10:::1;:16:::0;::::1;;8593:10:::0;8585:30:::1;;;;-1:-1:-1::0;;;8585:30:27::1;;;;;;;:::i;:::-;8633:20:::0;;::::1;;:36:::0;::::1;8625:62;;;::::0;-1:-1:-1;;;8625:62:27;;18334:2:30;8625:62:27::1;::::0;::::1;18316:21:30::0;18373:2;18353:18;;;18346:30;-1:-1:-1;;;18392:18:30;;;18385:43;18445:18;;8625:62:27::1;18306:163:30::0;8625:62:27::1;8722:21:::0;;;;::::1;-1:-1:-1::0;;;;;8722:21:27::1;8761:23:::0;;::::1;;8753:49;;;::::0;-1:-1:-1;;;8753:49:27;;26244:2:30;8753:49:27::1;::::0;::::1;26226:21:30::0;26283:2;26263:18;;;26256:30;-1:-1:-1;;;26302:18:30;;;26295:43;26355:18;;8753:49:27::1;26216:163:30::0;8753:49:27::1;8927:25;:13:::0;8945:6;8927:17:::1;:25::i;:::-;8895:58:::0;;-1:-1:-1;;;;;8895:58:27;;;::::1;::::0;::::1;-1:-1:-1::0;;;;;;8895:58:27;;::::1;;::::0;;9018:23;;9010:44:::1;::::0;-1:-1:-1;;;;;9018:23:27::1;9047:6:::0;9010:36:::1;:44::i;:::-;8963:23:::0;:101;;-1:-1:-1;;;;;;8963:101:27::1;-1:-1:-1::0;;;;;8963:101:27;;;::::1;::::0;;;::::1;::::0;;9080:49:::1;::::0;;37526:25:30;;;37582:2;37567:18;;37560:34;;;9096:10:27::1;::::0;9080:49:::1;::::0;37499:18:30;9080:49:27::1;;;;;;;9140:33;9154:10;9166:6;9140:13;:33::i;:::-;-1:-1:-1::0;;1708:1:2;2796:22;;-1:-1:-1;;8365:815:27:o;6100:202::-;1311:6:0;;-1:-1:-1;;;;;1311:6:0;902:10:6;1451:23:0;1443:68;;;;-1:-1:-1;;;1443:68:0;;;;;;;:::i;:::-;-1:-1:-1;;;;;6193:32:27;::::1;6185:64;;;::::0;-1:-1:-1;;;6185:64:27;;17240:2:30;6185:64:27::1;::::0;::::1;17222:21:30::0;17279:2;17259:18;;;17252:30;-1:-1:-1;;;17298:18:30;;;17291:49;17357:18;;6185:64:27::1;17212:169:30::0;6185:64:27::1;6259:15;:36:::0;;-1:-1:-1;;;;;;6259:36:27::1;-1:-1:-1::0;;;;;6259:36:27;;;::::1;::::0;;;::::1;::::0;;6100:202::o;11851:423:28:-;1751:1:2;2493:7;;:19;;2485:63;;;;-1:-1:-1;;;2485:63:2;;;;;;;:::i;:::-;1751:1;2623:7;:18;11965:10:28;11957:30:::1;;;;-1:-1:-1::0;;;11957:30:28::1;;;;;;;:::i;:::-;-1:-1:-1::0;;;;;12005:22:28;::::1;11997:31;;;::::0;::::1;;12039:29;12051:6;12059:8;12039:11;:29::i;:::-;12151:11;:17:::0;12144:123:::1;::::0;12151:17;;::::1;-1:-1:-1::0;;;;;12151:17:28::1;12200:10;12232:4;12251:6:::0;12144:42:::1;:123::i;:::-;-1:-1:-1::0;;1708:1:2;2796:22;;11851:423:28:o;6050:212:3:-;902:10:6;6138:4:3;6186:25;;;:11;:25;;;;;;;;-1:-1:-1;;;;;6186:34:3;;;;;;;;;;6138:4;;6154:80;;6177:7;;6186:47;;6223:10;;6186:47;:::i;:::-;6154:8;:80::i;23219:472:28:-;23355:11;:20;23312:7;;23355:20;;;;;;23312:7;23421:168;23462:13;3622:12:3;;;3535:106;23462:13:28;23493:14;:12;:14::i;:::-;23525:23;;-1:-1:-1;;;;;23525:23:28;23566:9;23421:23;:168::i;:::-;23385:204;;23618:66;23642:15;23649:7;23642:6;:15::i;:::-;23659:13;23674:9;23618:23;:66::i;:::-;23599:85;23219:472;-1:-1:-1;;;;23219:472:28:o;6474:286:27:-;1311:6:0;;-1:-1:-1;;;;;1311:6:0;902:10:6;1451:23:0;1443:68;;;;-1:-1:-1;;;1443:68:0;;;;;;;:::i;:::-;-1:-1:-1;;;;;6610:37:27;::::1;6589:108;;;::::0;-1:-1:-1;;;6589:108:27;;30930:2:30;6589:108:27::1;::::0;::::1;30912:21:30::0;30969:2;30949:18;;;30942:30;31008:26;30988:18;;;30981:54;31052:18;;6589:108:27::1;30902:174:30::0;6589:108:27::1;6707:20;:46:::0;;-1:-1:-1;;;;;;6707:46:27::1;-1:-1:-1::0;;;;;6707:46:27;;;::::1;::::0;;;::::1;::::0;;6474:286::o;10325:228:28:-;1311:6:0;;-1:-1:-1;;;;;1311:6:0;902:10:6;1451:23:0;1443:68;;;;-1:-1:-1;;;1443:68:0;;;;;;;:::i;:::-;10403:1:28::1;10394:6;:10;10386:30;;;::::0;-1:-1:-1;;;10386:30:28;;23356:2:30;10386:30:28::1;::::0;::::1;23338:21:30::0;23395:1;23375:18;;;23368:29;-1:-1:-1;;;23413:18:30;;;23406:37;23460:18;;10386:30:28::1;23328:156:30::0;10386:30:28::1;10426:31;10450:6;10426:23;:31::i;:::-;10479:15:::0;;10472:31:::1;::::0;;-1:-1:-1;;;;;10479:15:28;;::::1;33309:60:30::0;;33400:2;33385:18;;33378:34;;;10472:31:28::1;::::0;33282:18:30;10472:31:28::1;;;;;;;10513:15:::0;:33;;-1:-1:-1;;10513:33:28::1;-1:-1:-1::0;;;;;10513:33:28;;;::::1;::::0;;;::::1;::::0;;10325:228::o;6999:218:27:-;1311:6:0;;-1:-1:-1;;;;;1311:6:0;902:10:6;1451:23:0;1443:68;;;;-1:-1:-1;;;1443:68:0;;;;;;;:::i;:::-;7095:1:27::1;7081:11;-1:-1:-1::0;;;;;7081:15:27::1;;7073:40;;;::::0;-1:-1:-1;;;7073:40:27;;25497:2:30;7073:40:27::1;::::0;::::1;25479:21:30::0;25536:2;25516:18;;;25509:30;-1:-1:-1;;;25555:18:30;;;25548:42;25607:18;;7073:40:27::1;25469:162:30::0;7073:40:27::1;-1:-1:-1::0;;;;;7123:35:27::1;:21;:35:::0;7194:10:::1;:16:::0;7168:23:::1;:42:::0;;-1:-1:-1;;7168:42:27::1;7194:16;::::0;;::::1;7168:42:::0;;;::::1;::::0;;6999:218::o;7955:112::-;1311:6:0;;-1:-1:-1;;;;;1311:6:0;902:10:6;1451:23:0;1443:68;;;;-1:-1:-1;;;1443:68:0;;;;;;;:::i;:::-;8032:11:27::1;:28:::0;;-1:-1:-1;;;;;;8032:28:27::1;-1:-1:-1::0;;;;;8032:28:27;;;::::1;::::0;;;::::1;::::0;;7955:112::o;7641:151::-;8241:6:28;;-1:-1:-1;;;;;8241:6:28;8227:10;:20;8219:40;;;;-1:-1:-1;;;8219:40:28;;;;;;;:::i;:::-;7729:1:27::1;7718:8;:12;7710:34;;;::::0;-1:-1:-1;;;7710:34:27;;16903:2:30;7710:34:27::1;::::0;::::1;16885:21:30::0;16942:1;16922:18;;;16915:29;-1:-1:-1;;;16960:18:30;;;16953:39;17009:18;;7710:34:27::1;16875:158:30::0;7710:34:27::1;7754:20;:31:::0;7641:151::o;15563:195::-;8241:6:28;;-1:-1:-1;;;;;8241:6:28;8227:10;:20;8219:40;;;;-1:-1:-1;;;8219:40:28;;;;;;;:::i;:::-;1751:1:2::1;2493:7;;:19;;2485:63;;;;-1:-1:-1::0;;;2485:63:2::1;;;;;;;:::i;:::-;1751:1;2623:7;:18:::0;15716:25:27;;15638:113:::2;::::0;-1:-1:-1;;;15638:113:27;;-1:-1:-1;;;;;15686:16:27::2;7451:15:30::0;;15638:113:27::2;::::0;::::2;7433:34:30::0;15716:25:27;;::::2;7483:18:30::0;;;7476:43;15638:22:27::2;::::0;:34:::2;::::0;7368:18:30;;15638:113:27::2;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1::0;1708:1:2::1;2796:22:::0;;15563:195:27:o;15308:181::-;8241:6:28;;-1:-1:-1;;;;;8241:6:28;8227:10;:20;8219:40;;;;-1:-1:-1;;;8219:40:28;;;;;;;:::i;:::-;1751:1:2::1;2493:7;;:19;;2485:63;;;;-1:-1:-1::0;;;2485:63:2::1;;;;;;;:::i;:::-;1751:1;2623:7;:18:::0;15460:15:27::2;::::0;15427:55:::2;::::0;-1:-1:-1;;;15427:55:27;;-1:-1:-1;;;;;15433:13:27::2;15427:32;::::0;::::2;::::0;:55:::2;::::0;15460:15;15477:4;;;;15427:55:::2;;;:::i;:::-;;;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;-1:-1:-1::0;;1708:1:2::1;2796:22:::0;;-1:-1:-1;;;;15308:181:27:o;17311:76:28:-;1751:1:2;2493:7;;:19;;2485:63;;;;-1:-1:-1;;;2485:63:2;;;;;;;:::i;:::-;1751:1;2623:7;:18;;;;17364:16:28::1;17372:1;17375:4;17364:7;:16::i;:::-;1708:1:2::0;2796:22;;17311:76:28:o;9892:319::-;1311:6:0;;-1:-1:-1;;;;;1311:6:0;902:10:6;1451:23:0;1443:68;;;;-1:-1:-1;;;1443:68:0;;;;;;;:::i;:::-;10016:26:28::1;324:5:24;10016:3:28;:26;:::i;:::-;9996:17;:46;9975:116;;;::::0;-1:-1:-1;;;9975:116:28;;23691:2:30;9975:116:28::1;::::0;::::1;23673:21:30::0;23730:2;23710:18;;;23703:30;23769:25;23749:18;;;23742:53;23812:18;;9975:116:28::1;23663:173:30::0;9975:116:28::1;10125:14;::::0;10107:52:::1;::::0;;37526:25:30;;;37582:2;37567:18;;37560:34;;;10107:52:28::1;::::0;37499:18:30;10107:52:28::1;;;;;;;10170:14;:34:::0;9892:319::o;1871:92:0:-;1311:6;;-1:-1:-1;;;;;1311:6:0;902:10:6;1451:23:0;1443:68;;;;-1:-1:-1;;;1443:68:0;;;;;;;:::i;:::-;1935:21:::1;1953:1;1935:9;:21::i;:::-;1871:92::o:0;9347:216:27:-;1751:1:2;2493:7;;:19;;2485:63;;;;-1:-1:-1;;;2485:63:2;;;;;;;:::i;:::-;1751:1;2623:7;:18;9424:28:27::1;9442:9:::0;9424:17:::1;:28::i;:::-;9492:27;::::0;:64:::1;::::0;9537:9;9492:31:::1;:64::i;:::-;9462:27;:94:::0;-1:-1:-1;1708:1:2;2796:22;;9347:216:27:o;2658:102:3:-;2714:13;2746:7;2739:14;;;;;:::i;25145:272:28:-;25193:7;25231:179;25272:13;3622:12:3;;;3535:106;25272:13:28;25303:14;:12;:14::i;:::-;25335:23;;25376:11;:20;-1:-1:-1;;;;;25335:23:28;;;;;25376:20;;;;25231:23;:179::i;:::-;25212:198;;25145:272;:::o;19594:429::-;1751:1:2;2493:7;;:19;;2485:63;;;;-1:-1:-1;;;2485:63:2;;;;;;;:::i;:::-;1751:1;2623:7;:18;19673:13:28;19665:36:::1;;;::::0;-1:-1:-1;;;19665:36:28;;16564:2:30;19665:36:28::1;::::0;::::1;16546:21:30::0;16603:2;16583:18;;;16576:30;-1:-1:-1;;;16622:18:30;;;16615:40;16672:18;;19665:36:28::1;16536:160:30::0;19665:36:28::1;19729:10;:16:::0;::::1;;19712:14;19755:262;19779:9;19775:1;:13;19755:262;;;19809:13;19825:10;19834:1:::0;19825:6;:10:::1;:::i;:::-;19857:25;::::0;;;:18:::1;:25;::::0;;;;;19809:26;;-1:-1:-1;19857:30:28;19849:54:::1;;;::::0;-1:-1:-1;;;19849:54:28;;27695:2:30;19849:54:28::1;::::0;::::1;27677:21:30::0;27734:2;27714:18;;;27707:30;-1:-1:-1;;;27753:18:30;;;27746:41;27804:18;;19849:54:28::1;27667:161:30::0;19849:54:28::1;19952:25;::::0;;;:18:::1;:25;::::0;;;;269:1:22::1;19952:54:28::0;;19790:3;::::1;::::0;::::1;:::i;:::-;;;;19755:262;;;-1:-1:-1::0;;1708:1:2;2796:22;;-1:-1:-1;19594:429:28:o;6749:405:3:-;902:10:6;6842:4:3;6885:25;;;:11;:25;;;;;;;;-1:-1:-1;;;;;6885:34:3;;;;;;;;;;6937:35;;;;6929:85;;;;-1:-1:-1;;;6929:85:3;;29824:2:30;6929:85:3;;;29806:21:30;29863:2;29843:18;;;29836:30;29902:34;29882:18;;;29875:62;-1:-1:-1;;;29953:18:30;;;29946:35;29998:19;;6929:85:3;29796:227:30;6929:85:3;7048:67;902:10:6;7071:7:3;7099:15;7080:16;:34;7048:8;:67::i;:::-;-1:-1:-1;7143:4:3;;6749:405;-1:-1:-1;;;6749:405:3:o;10039:605:27:-;1751:1:2;2493:7;;:19;;2485:63;;;;-1:-1:-1;;;2485:63:2;;;;;;;:::i;:::-;1751:1;2623:7;:18;10131:14:27::1;::::0;-1:-1:-1;;;;;10131:14:27::1;10163:29:::0;10155:38:::1;;;::::0;::::1;;10273:1;10261:9;:13;10253:22;;;::::0;::::1;;10319:10;10285:21;3799:18:3::0;;;:9;:18;;;;;;10344:25:27;;::::1;10340:100;;;10385:44;10393:28;:9:::0;10407:13;10393::::1;:28::i;:::-;10423:5;10385:7;:44::i;:::-;10449:47;10459:10;10479:4;10486:9;10449;:47::i;:::-;10506:51;10523:4;10530:15;10547:9;10506:8;:51::i;:::-;10567:70;::::0;-1:-1:-1;;;10567:70:27;;::::1;::::0;::::1;35325:25:30::0;;;10619:10:27::1;35366:18:30::0;;;35359:60;10631:5:27::1;35435:18:30::0;;;35428:50;-1:-1:-1;;;;;10567:40:27;::::1;::::0;::::1;::::0;35298:18:30;;10567:70:27::1;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;-1:-1:-1::0;;1708:1:2;2796:22;;-1:-1:-1;;;;;10039:605:27:o;4027:172:3:-;4113:4;4129:42;902:10:6;4153:9:3;4164:6;4129:9;:42::i;25637:561:28:-;25938:25;;25682:7;;-1:-1:-1;;;;;25938:25:28;:253;;26148:11;:17;26141:50;;-1:-1:-1;;;26141:50:28;;26185:4;26141:50;;;6943:51:30;26148:17:28;;;;-1:-1:-1;;;;;26148:17:28;;26141:35;;6916:18:30;;26141:50:28;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;25938:253::-;26061:11;:17;26054:50;;-1:-1:-1;;;26054:50:28;;26098:4;26054:50;;;6943:51:30;25996:126:28;;26061:17;;;-1:-1:-1;;;;;26061:17:28;;26054:35;;6916:18:30;;26054:50:28;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;26004:10;:23;;;;-1:-1:-1;;;;;26004:23:28;;25996:36;:126::i;11198:343::-;1751:1:2;2493:7;;:19;;2485:63;;;;-1:-1:-1;;;2485:63:2;;;;;;;:::i;:::-;1751:1;2623:7;:18;11271:10:28;11263:30:::1;;;;-1:-1:-1::0;;;11263:30:28::1;;;;;;;:::i;:::-;11304:31;11316:6;11324:10;11304:11;:31::i;:::-;11418:11;:17:::0;11411:123:::1;::::0;11418:17;;::::1;-1:-1:-1::0;;;;;11418:17:28::1;11467:10;11499:4;11518:6:::0;11411:42:::1;:123::i;14330:575:27:-:0;8241:6:28;;-1:-1:-1;;;;;8241:6:28;8227:10;:20;8219:40;;;;-1:-1:-1;;;8219:40:28;;;;;;;:::i;:::-;1751:1:2::1;2493:7;;:19;;2485:63;;;;-1:-1:-1::0;;;2485:63:2::1;;;;;;;:::i;:::-;1751:1;2623:7;:18:::0;14421:11:27::2;:22:::0;-1:-1:-1;;;;;14421:22:27::2;14461:23:::0;14453:47:::2;;;::::0;-1:-1:-1;;;14453:47:27;;30230:2:30;14453:47:27::2;::::0;::::2;30212:21:30::0;30269:2;30249:18;;;30242:30;-1:-1:-1;;;30288:18:30;;;30281:41;30339:18;;14453:47:27::2;30202:161:30::0;14453:47:27::2;14511:25:::0;:37;;-1:-1:-1;;;;;;14511:37:27;;::::2;-1:-1:-1::0;;;;;14511:37:27;::::2;::::0;;::::2;::::0;;;:11:::2;14558:35:::0;;;;::::2;::::0;;14627:10:::2;:23:::0;14666:47:::2;::::0;14627:23;;;::::2;-1:-1:-1::0;;;;;14627:23:27::2;35093:25:30::0;;;14627:23:27;14702:10:::2;::::0;14666:47:::2;::::0;35081:2:30;35066:18;14666:47:27::2;;;;;;;14724:149;::::0;-1:-1:-1;;;14724:149:27;;-1:-1:-1;;;;;14772:16:27::2;7825:15:30::0;;14724:149:27::2;::::0;::::2;7807:34:30::0;14802:11:27::2;7877:15:30::0;;7857:18;;;7850:43;7929:15;;7909:18;;;7902:43;7961:18;;;7954:34;;;14724:22:27::2;::::0;:34:::2;::::0;7741:19:30;;14724:149:27::2;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;14884:14;:12;:14::i;15825:459::-:0;15899:11;;-1:-1:-1;;;;;15899:11:27;15928:33;15920:42;;;;;;16022:16;16030:1;16033:4;16022:7;:16::i;:::-;16082:10;16048:21;3799:18:3;;;:9;:18;;;;;;;16103:56:27;;16124:19;3799:18:3;16103:8:27;:56::i;:::-;16169:108;;-1:-1:-1;;;16169:108:27;;16230:10;16169:108;;;10661:51:30;10728:18;;;10721:34;;;-1:-1:-1;;;;;16169:47:27;;;;;10634:18:30;;16169:108:27;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;15825:459;;:::o;23903:196:28:-;23957:7;23977:21;24000:19;24023:22;24037:7;24023:13;:22::i;:::-;23976:69;;-1:-1:-1;23976:69:28;-1:-1:-1;24062:30:28;23976:69;;24062:17;:30::i;8516:151::-;1311:6:0;;-1:-1:-1;;;;;1311:6:0;902:10:6;1451:23:0;1443:68;;;;-1:-1:-1;;;1443:68:0;;;;;;;:::i;:::-;-1:-1:-1;;;;;8594:23:28;::::1;8586:46;;;::::0;-1:-1:-1;;;8586:46:28;;28781:2:30;8586:46:28::1;::::0;::::1;28763:21:30::0;28820:2;28800:18;;;28793:30;-1:-1:-1;;;28839:18:30;;;28832:40;28889:18;;8586:46:28::1;28753:160:30::0;8586:46:28::1;8642:6;:18:::0;;-1:-1:-1;;;;;;8642:18:28::1;-1:-1:-1::0;;;;;8642:18:28;;;::::1;::::0;;;::::1;::::0;;8516:151::o;17057:145::-;1751:1:2;2493:7;;:19;;2485:63;;;;-1:-1:-1;;;2485:63:2;;;;;;;:::i;:::-;1751:1;2623:7;:18;17132:13:28;17124:36:::1;;;::::0;-1:-1:-1;;;17124:36:28;;17995:2:30;17124:36:28::1;::::0;::::1;17977:21:30::0;18034:2;18014:18;;;18007:30;-1:-1:-1;;;18053:18:30;;;18046:40;18103:18;;17124:36:28::1;17967:160:30::0;17124:36:28::1;17170:25;17178:9;17189:5;17170:7;:25::i;11086:1266:27:-:0;1751:1:2;2493:7;;:19;;2485:63;;;;-1:-1:-1;;;2485:63:2;;;;;;;:::i;:::-;1751:1;2623:7;:18;11160:25:27;;-1:-1:-1;;;;;11160:25:27::1;11216:23:::0;;::::1;::::0;:48:::1;;-1:-1:-1::0;11243:10:27::1;:16:::0;::::1;;::::0;:21:::1;11216:48;11195:107;;;::::0;-1:-1:-1;;;11195:107:27;;21558:2:30;11195:107:27::1;::::0;::::1;21540:21:30::0;21597:2;21577:18;;;21570:30;-1:-1:-1;;;21616:18:30;;;21609:42;21668:18;;11195:107:27::1;21530:162:30::0;11195:107:27::1;11312:22;11324:9;11312:11;:22::i;:::-;11345:32;11380:27;;11345:62;;11418:21;11441:28:::0;11485:118:::1;11522:24;;11565;11485:11;:118::i;:::-;11614:24;:47:::0;;;11726:31;;11417:186;;-1:-1:-1;11614:47:27;-1:-1:-1;11672:31:27::1;::::0;11718:100:::1;::::0;-1:-1:-1;;;11726:31:27;::::1;-1:-1:-1::0;;;;;11726:31:27::1;11780:24:::0;11718:44:::1;:100::i;:::-;11672:146;;11828:48;11852:23;11828;:48::i;:::-;11886:31:::0;:66;;-1:-1:-1;;;;;11886:66:27;;::::1;-1:-1:-1::0;;;11886:66:27::1;::::0;::::1;;::::0;;-1:-1:-1;11963:27:27::1;:31:::0;12005:38:::1;12029:13:::0;12005:23:::1;:38::i;:::-;12053:10;:48:::0;;-1:-1:-1;;;;;;12053:48:27::1;::::0;-1:-1:-1;;;;;12053:48:27;::::1;;;::::0;;-1:-1:-1;12138:26:27::1;:15;-1:-1:-1::0;12138:19:27::1;:26::i;:::-;12112:52:::0;-1:-1:-1;12214:16:27::1;12195:35:::0;::::1;;12174:106;;;::::0;-1:-1:-1;;;12174:106:27;;15865:2:30;12174:106:27::1;::::0;::::1;15847:21:30::0;15904:2;15884:18;;;15877:30;15943:26;15923:18;;;15916:54;15987:18;;12174:106:27::1;15837:174:30::0;12174:106:27::1;12290:29:::0;:55;;::::1;::::0;;::::1;-1:-1:-1::0;;;12290:55:27::1;-1:-1:-1::0;;;;12290:55:27;;::::1;::::0;;;::::1;::::0;;-1:-1:-1;;12290:29:27::1;2796:22:2::0;;-1:-1:-1;;;11086:1266:27:o;8801:262:28:-;1311:6:0;;-1:-1:-1;;;;;1311:6:0;902:10:6;1451:23:0;1443:68;;;;-1:-1:-1;;;1443:68:0;;;;;;;:::i;:::-;-1:-1:-1;;;;;8888:29:28;::::1;8880:58;;;::::0;-1:-1:-1;;;8880:58:28;;20130:2:30;8880:58:28::1;::::0;::::1;20112:21:30::0;20169:2;20149:18;;;20142:30;-1:-1:-1;;;20188:18:30;;;20181:46;20244:18;;8880:58:28::1;20102:166:30::0;8880:58:28::1;8975:12;::::0;-1:-1:-1;;;;;8956:31:28;;::::1;8975:12:::0;::::1;8956:31;;8948:68;;;::::0;-1:-1:-1;;;8948:68:28;;19025:2:30;8948:68:28::1;::::0;::::1;19007:21:30::0;19064:2;19044:18;;;19037:30;19103:26;19083:18;;;19076:54;19147:18;;8948:68:28::1;18997:174:30::0;8948:68:28::1;9026:12;:30:::0;;-1:-1:-1;;;;;;9026:30:28::1;-1:-1:-1::0;;;;;9026:30:28;;;::::1;::::0;;;::::1;::::0;;8801:262::o;4986:828:27:-;1409:13:1;;;;;;;;:30;;-1:-1:-1;1427:12:1;;;;1426:13;1409:30;1401:89;;;;-1:-1:-1;;;1401:89:1;;;;;;;:::i;:::-;1501:19;1524:13;;;;;;1523:14;1547:98;;;;1581:13;:20;;-1:-1:-1;;1615:19:1;;;;;1547:98;5133:309:27::1;5161:18;;::::0;::::1;:11:::0;:18:::1;:::i;:::-;5193:19;::::0;;;::::1;::::0;::::1;;:::i;:::-;5226:25;::::0;;;::::1;::::0;::::1;;:::i;:::-;5265:26;::::0;::::1;;5305:27;::::0;::::1;;5346:22;;::::0;::::1;5265:11:::0;5346:22:::1;:::i;:::-;5133:309;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;::::0;;;;-1:-1:-1;5382:24:27::1;::::0;-1:-1:-1;;;5382:24:27::1;::::0;::::1;::::0;::::1;:::i;:::-;5133:309;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;::::0;;;;-1:-1:-1;5420:12:27;;-1:-1:-1;5133:14:27::1;::::0;-1:-1:-1;;5133:309:27:i:1;:::-;5518:1;5473:33;::::0;;;::::1;::::0;::::1;;:::i;:::-;-1:-1:-1::0;;;;;5473:47:27::1;;;5452:116;;;::::0;-1:-1:-1;;;5452:116:27;;25146:2:30;5452:116:27::1;::::0;::::1;25128:21:30::0;25185:2;25165:18;;;25158:30;-1:-1:-1;;;25204:18:30;;;25197:52;25266:18;;5452:116:27::1;25118:172:30::0;5452:116:27::1;5639:1;5599:28;::::0;;;::::1;::::0;::::1;;:::i;:::-;-1:-1:-1::0;;;;;5599:42:27::1;;;5578:106;;;::::0;-1:-1:-1;;;5578:106:27;;12944:2:30;5578:106:27::1;::::0;::::1;12926:21:30::0;12983:2;12963:18;;;12956:30;-1:-1:-1;;;13002:18:30;;;12995:47;13059:18;;5578:106:27::1;12916:167:30::0;5578:106:27::1;5718:33;::::0;;;::::1;::::0;::::1;;:::i;:::-;5695:20;:56:::0;;-1:-1:-1;;;;;;5695:56:27::1;-1:-1:-1::0;;;;;5695:56:27;;;::::1;::::0;;;::::1;::::0;;5779:28:::1;::::0;;;5695:56:::1;5779:28:::0;::::1;;:::i;:::-;5761:15;:46:::0;;-1:-1:-1;;;;;;5761:46:27::1;-1:-1:-1::0;;;;;5761:46:27;;;::::1;::::0;;;::::1;::::0;;1667:66:1;;;;1717:5;1701:21;;-1:-1:-1;;1701:21:1;;;1667:66;4986:828:27;;;:::o;2112:189:0:-;1311:6;;-1:-1:-1;;;;;1311:6:0;902:10:6;1451:23:0;1443:68;;;;-1:-1:-1;;;1443:68:0;;;;;;;:::i;:::-;-1:-1:-1;;;;;2200:22:0;::::1;2192:73;;;::::0;-1:-1:-1;;;2192:73:0;;14366:2:30;2192:73:0::1;::::0;::::1;14348:21:30::0;14405:2;14385:18;;;14378:30;14444:34;14424:18;;;14417:62;-1:-1:-1;;;14495:18:30;;;14488:36;14541:19;;2192:73:0::1;14338:228:30::0;2192:73:0::1;2275:19;2285:8;2275:9;:19::i;:::-;2112:189:::0;:::o;10817:249:28:-;1751:1:2;2493:7;;:19;;2485:63;;;;-1:-1:-1;;;2485:63:2;;;;;;;:::i;:::-;1751:1;2623:7;:18;10887:11:28::1;:17:::0;10908:4:::1;-1:-1:-1::0;;;;;10887:25:28;;::::1;:17:::0;;;::::1;;:25;10879:43;;;::::0;-1:-1:-1;;;10879:43:28;;20810:2:30;10879:43:28::1;::::0;::::1;20792:21:30::0;20849:1;20829:18;;;20822:29;-1:-1:-1;;;20867:18:30;;;20860:35;20912:18;;10879:43:28::1;20782:154:30::0;10879:43:28::1;10952:1;10940:9;:13;10932:32;;;::::0;-1:-1:-1;;;10932:32:28;;14032:2:30;10932:32:28::1;::::0;::::1;14014:21:30::0;14071:1;14051:18;;;14044:29;-1:-1:-1;;;14089:18:30;;;14082:36;14135:18;;10932:32:28::1;14004:155:30::0;10932:32:28::1;10975:34;10987:9;10998:10;10975:11;:34::i;:::-;11026:4;-1:-1:-1::0;;;;;11020:19:28::1;;11047:9;11020:39;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;-1:-1:-1::0;;1708:1:2;2796:22;;-1:-1:-1;;;10817:249:28:o;24428:624::-;-1:-1:-1;;;;;24616:24:28;;24513:21;24616:24;;;:15;:24;;;;;;;;24571:69;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;24571:69:28;;;;;;;;-1:-1:-1;;;24571:69:28;;-1:-1:-1;;;;;24571:69:28;;;;;;;;24513:21;;24571:69;-1:-1:-1;24651:110:28;;;-1:-1:-1;;;;;;;;3799:18:3;3773:7;3799:18;;;:9;:18;;;;;;;24428:624:28:o;24651:110::-;24863:10;:16;24916:20;;24863:16;24897:40;;;24771:24;24897:40;;;:18;:40;;;;;;24955:11;:20;24771:24;;24810:179;;24916:20;;24863:16;;;24897:40;24863:16;24955:20;;;;24810:35;:179::i;:::-;24771:218;;25008:18;25018:7;-1:-1:-1;;;;;3799:18:3;3773:7;3799:18;;;:9;:18;;;;;;;3699:125;25008:18:28;25000:45;25028:16;;-1:-1:-1;24428:624:28;-1:-1:-1;;;24428:624:28:o;9685:232:27:-;1751:1:2;2493:7;;:19;;2485:63;;;;-1:-1:-1;;;2485:63:2;;;;;;;:::i;:::-;1751:1;2623:7;:18;9745:22:27::1;9770:19;:17;:19::i;:::-;9855:24;::::0;9745:44;;-1:-1:-1;9847:53:27::1;::::0;9745:44;9847:37:::1;:53::i;:::-;-1:-1:-1::0;;;;;9799:111:27::1;:24;:111:::0;-1:-1:-1;1708:1:2;2796:22;;9685:232:27:o;13060:1159::-;8241:6:28;;-1:-1:-1;;;;;8241:6:28;8227:10;:20;8219:40;;;;-1:-1:-1;;;8219:40:28;;;;;;;:::i;:::-;1751:1:2::1;2493:7;;:19;;2485:63;;;;-1:-1:-1::0;;;2485:63:2::1;;;;;;;:::i;:::-;1751:1;2623:7;:18:::0;13155:25:27;;-1:-1:-1;;;;;13155:25:27::2;13211:27:::0;;:52;::::2;;;-1:-1:-1::0;13242:10:27::2;:16:::0;::::2;;::::0;:21:::2;;13211:52;13190:115;;;::::0;-1:-1:-1;;;13190:115:27;;19378:2:30;13190:115:27::2;::::0;::::2;19360:21:30::0;19417:2;19397:18;;;19390:30;-1:-1:-1;;;19436:18:30;;;19429:46;19492:18;;13190:115:27::2;19350:166:30::0;13190:115:27::2;13386:493;::::0;;::::2;::::0;::::2;::::0;;-1:-1:-1;;;;;13456:14:27::2;13386:493:::0;::::2;::::0;;13494:4:::2;13386:493:::0;::::2;;::::0;::::2;::::0;13533:11:::2;:17:::0;;;;::::2;::::0;::::2;13386:493:::0;;;;;;::::2;::::0;;;;13316:55:::2;13386:493:::0;;;;;;13669:23:::2;::::0;::::2;;13386:493:::0;;;;13733:21:::2;::::0;13386:493;;;;13789:15:::2;::::0;;::::2;13386:493:::0;;;;13844:20:::2;::::0;;;::::2;13533:17;13386:493:::0;;;13964:140;;-1:-1:-1;;;13964:140:27;;13386:493;;13316:55;;;;;;13964:22:::2;::::0;:39:::2;::::0;:140:::2;::::0;13386:493;;14080:10:::2;::::0;13964:140:::2;;;:::i;:::-;;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;14120:43;::::0;;37526:25:30;;;37582:2;37567:18;;37560:34;;;13890:214:27;;-1:-1:-1;13890:214:27;;-1:-1:-1;13890:214:27;-1:-1:-1;14120:43:27::2;::::0;37499:18:30;14120:43:27::2;;;;;;;-1:-1:-1::0;;14174:11:27::2;:38:::0;;-1:-1:-1;;;;;;14174:38:27::2;-1:-1:-1::0;;;;;14174:38:27;;;::::2;::::0;;;::::2;::::0;;-1:-1:-1;;;2796:22:2;;13060:1159:27:o;9226:498:28:-;1311:6:0;;-1:-1:-1;;;;;1311:6:0;902:10:6;1451:23:0;1443:68;;;;-1:-1:-1;;;1443:68:0;;;;;;;:::i;:::-;9347:26:28::1;324:5:24;9347:3:28;:26;:::i;:::-;9328:16;:45;9307:114;;;::::0;-1:-1:-1;;;9307:114:28;;24795:2:30;9307:114:28::1;::::0;::::1;24777:21:30::0;24834:2;24814:18;;;24807:30;-1:-1:-1;;;24853:18:30;;;24846:52;24915:18;;9307:114:28::1;24767:172:30::0;9307:114:28::1;9508:24;9547:62;3990:8;9547:42;:16:::0;324:5:24::1;9547:20:28;:42::i;:::-;:46:::0;::::1;:62::i;:::-;9642:13;::::0;9625:49:::1;::::0;;37526:25:30;;;37582:2;37567:18;;37560:34;;;9508:101:28;;-1:-1:-1;9625:49:28::1;::::0;37499:18:30;9625:49:28::1;;;;;;;9685:13;:32:::0;-1:-1:-1;9226:498:28:o;10325:370:3:-;-1:-1:-1;;;;;10456:19:3;;10448:68;;;;-1:-1:-1;;;10448:68:3;;26932:2:30;10448:68:3;;;26914:21:30;26971:2;26951:18;;;26944:30;27010:34;26990:18;;;26983:62;-1:-1:-1;;;27061:18:30;;;27054:34;27105:19;;10448:68:3;26904:226:30;10448:68:3;-1:-1:-1;;;;;10534:21:3;;10526:68;;;;-1:-1:-1;;;10526:68:3;;14773:2:30;10526:68:3;;;14755:21:30;14812:2;14792:18;;;14785:30;14851:34;14831:18;;;14824:62;-1:-1:-1;;;14902:18:30;;;14895:32;14944:19;;10526:68:3;14745:224:30;10526:68:3;-1:-1:-1;;;;;10605:18:3;;;;;;;:11;:18;;;;;;;;:27;;;;;;;;;;;;;:36;;;10656:32;;35093:25:30;;;10656:32:3;;35066:18:30;10656:32:3;;;;;;;;10325:370;;;:::o;7628:713::-;-1:-1:-1;;;;;7763:20:3;;7755:70;;;;-1:-1:-1;;;7755:70:3;;25838:2:30;7755:70:3;;;25820:21:30;25877:2;25857:18;;;25850:30;25916:34;25896:18;;;25889:62;-1:-1:-1;;;25967:18:30;;;25960:35;26012:19;;7755:70:3;25810:227:30;7755:70:3;-1:-1:-1;;;;;7843:23:3;;7835:71;;;;-1:-1:-1;;;7835:71:3;;12540:2:30;7835:71:3;;;12522:21:30;12579:2;12559:18;;;12552:30;12618:34;12598:18;;;12591:62;-1:-1:-1;;;12669:18:30;;;12662:33;12712:19;;7835:71:3;12512:225:30;7835:71:3;-1:-1:-1;;;;;7999:17:3;;7975:21;7999:17;;;:9;:17;;;;;;8034:23;;;;8026:74;;;;-1:-1:-1;;;8026:74:3;;17588:2:30;8026:74:3;;;17570:21:30;17627:2;17607:18;;;17600:30;17666:34;17646:18;;;17639:62;-1:-1:-1;;;17717:18:30;;;17710:36;17763:19;;8026:74:3;17560:228:30;8026:74:3;-1:-1:-1;;;;;8134:17:3;;;;;;;:9;:17;;;;;;8154:22;;;8134:42;;8196:20;;;;;;;;:30;;8170:6;;8134:17;8196:30;;8170:6;;8196:30;:::i;:::-;;;;;;;;8259:9;-1:-1:-1;;;;;8242:35:3;8251:6;-1:-1:-1;;;;;8242:35:3;;8270:6;8242:35;;;;35093:25:30;;35081:2;35066:18;;35048:76;8242:35:3;;;;;;;;8288:46;7628:713;;;;:::o;3039:96:10:-;3097:7;3123:5;3127:1;3123;:5;:::i;22477:388:28:-;22570:11;:17;-1:-1:-1;;;;;22570:17:28;;;;;;;22610:4;22601:13;;;22597:207;;;22630:28;;-1:-1:-1;;;22630:28:28;;;;;35093:25:30;;;22636:4:28;-1:-1:-1;;;;;22630:20:28;;;;35066:18:30;;22630:28:28;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;22673:12;22691:9;-1:-1:-1;;;;;22691:14:28;22713:6;22691:33;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;22672:52;;;22746:7;22738:35;;;;-1:-1:-1;;;22738:35:28;;15176:2:30;22738:35:28;;;15158:21:30;15215:2;15195:18;;;15188:30;-1:-1:-1;;;15234:18:30;;;15227:45;15289:18;;22738:35:28;15148:165:30;22597:207:28;22813:45;-1:-1:-1;;;;;22813:26:28;;22840:9;22851:6;22813:26;:45::i;12468:1628::-;12564:10;:16;;;12541:20;12625:26;12644:6;12625:14;:12;:14::i;:::-;:18;;:26::i;:::-;12698:15;;12590:61;;-1:-1:-1;;;;;;12698:15:28;12670:43;;;12662:66;;;;-1:-1:-1;;;12662:66:28;;13693:2:30;12662:66:28;;;13675:21:30;13732:2;13712:18;;;13705:30;-1:-1:-1;;;13751:18:30;;;13744:40;13801:18;;12662:66:28;13665:160:30;12662:66:28;12787:25;;-1:-1:-1;;;12787:25:28;;;;12759:53;;;12738:120;;;;-1:-1:-1;;;12738:120:28;;18676:2:30;12738:120:28;;;18658:21:30;18715:2;18695:18;;;18688:30;-1:-1:-1;;;18734:18:30;;;18727:50;18794:18;;12738:120:28;18648:170:30;12738:120:28;12874:39;;;37526:25:30;;;37582:2;37567:18;;37560:34;;;-1:-1:-1;;;;;12874:39:28;;;;;37499:18:30;12874:39:28;;;;;;;-1:-1:-1;;;;;12969:25:28;;12924:42;12969:25;;;:15;:25;;;;;;;;12924:70;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;12924:70:28;;;;;-1:-1:-1;;;12924:70:28;;;-1:-1:-1;;;;;12924:70:28;;;;;13229:40;;:18;:40;;;;;;13287:11;:20;12924:70;;:42;13146:175;;12924:70;;13199:12;;13229:40;12924:70;13287:20;;;;13146:35;:175::i;:::-;13488:20;;13107:214;;-1:-1:-1;13356:6:28;;13472:36;;;;13468:168;;;13552:21;;;;13524:17;;13544:42;;-1:-1:-1;;;;;13544:30:28;13579:6;13544:34;:42::i;:::-;13524:62;-1:-1:-1;;13468:168:28;13646:38;13670:13;13646:23;:38::i;:::-;13723:174;;;;;;;;;;;;;;-1:-1:-1;;;;;13723:174:28;;;;;;;;;;-1:-1:-1;;;;;13723:174:28;;;;;;;;;-1:-1:-1;;;;;13695:25:28;;-1:-1:-1;13695:25:28;;;:15;:25;;;;;;:202;;;;;;;;;;-1:-1:-1;;;13695:202:28;-1:-1:-1;;;;;;;;13695:202:28;;;;;;-1:-1:-1;;13695:202:28;;;;;;;;;;;;;;;;;;;;;13942:23;;13934:44;;13942:23;13971:6;13934:36;:44::i;:::-;13908:70;;13988:40;14012:15;13988:23;:40::i;:::-;14039:23;:50;;-1:-1:-1;;;;;;14039:50:28;-1:-1:-1;;;;;14039:50:28;;;;;;;;;;-1:-1:-1;;;;;;;12468:1628:28:o;845:241:8:-;1010:68;;-1:-1:-1;;;;;9970:15:30;;;1010:68:8;;;9952:34:30;10022:15;;10002:18;;;9995:43;10054:18;;;10047:34;;;983:96:8;;1003:5;;-1:-1:-1;;;1033:27:8;9887:18:30;;1010:68:8;;;;-1:-1:-1;;1010:68:8;;;;;;;;;;;;;;-1:-1:-1;;;;;1010:68:8;-1:-1:-1;;;;;;1010:68:8;;;;;;;;;;983:19;:96::i;2396:424:22:-;2564:7;;2605:12;2609:8;2605:2;:12;:::i;:::-;2583:34;;2660:1;2646:11;:15;:167;;2802:11;2646:167;;;2680:103;2754:11;2680:48;2696:31;:12;2713:13;2696:16;:31::i;:::-;2680:11;;:15;:48::i;:103::-;2627:186;2396:424;-1:-1:-1;;;;;;2396:424:22:o;828:535::-;961:7;269:1;1237:13;:32;1229:66;;;;-1:-1:-1;;;1229:66:22;;24043:2:30;1229:66:22;;;24025:21:30;24082:2;24062:18;;;24055:30;-1:-1:-1;;;24101:18:30;;;24094:51;24162:18;;1229:66:22;24015:171:30;1229:66:22;1313:43;1343:12;1347:8;1343:2;:12;:::i;:::-;1313:25;:6;1324:13;1313:10;:25::i;2951:120::-;-1:-1:-1;;;;;3019:24:22;;;3011:53;;;;-1:-1:-1;;;3011:53:22;;21899:2:30;3011:53:22;;;21881:21:30;21938:2;21918:18;;;21911:30;-1:-1:-1;;;21957:18:30;;;21950:46;22013:18;;3011:53:22;21871:166:30;17619:1419:28;17759:10;17686:42;17743:27;;;:15;:27;;;;;;;;17686:84;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;17686:84:28;;;;;-1:-1:-1;;;17686:84:28;;;-1:-1:-1;;;;;17686:84:28;;;;;17931:10;:16;18080:40;;;:18;:40;;;;;;;18138:11;:20;17686:84;;17931:16;;;;;17997:175;;17686:84;;17931:16;;17686:84;18138:20;;;;17997:35;:175::i;:::-;17958:214;;18195:5;:36;;18222:9;18195:36;;;18203:16;18195:36;18183:48;-1:-1:-1;18245:14:28;18241:51;;18275:7;;;17619:1419;;:::o;18241:51::-;18322:16;18309:9;:29;;18301:59;;;;-1:-1:-1;;;18301:59:28;;16218:2:30;18301:59:28;;;16200:21:30;16257:2;16237:18;;;16230:30;-1:-1:-1;;;16276:18:30;;;16269:47;16333:18;;18301:59:28;16190:167:30;18301:59:28;18643:20;;:35;;;-1:-1:-1;18639:104:28;;;18710:10;18731:1;18694:27;;;:15;:27;;;;;:38;;-1:-1:-1;;;;;;18694:38:28;;;18639:104;18753:34;18777:9;18753:23;:34::i;:::-;18865:31;:16;18886:9;18865:20;:31::i;:::-;18813:10;18797:27;;;;:15;:27;;;;;;;:109;;-1:-1:-1;;;;;18797:109:28;;;;-1:-1:-1;;;18797:109:28;-1:-1:-1;;;;;;;;18797:109:28;;;;;;;;;;18952:20;;18922:51;;18813:10;;18922:51;;;;18941:9;37260:25:30;;37333:6;37321:19;37316:2;37301:18;;37294:47;37248:2;37233:18;;37215:132;18922:51:28;;;;;;;;18984:47;19002:4;19009:10;19021:9;18984;:47::i;:::-;17619:1419;;;;;:::o;2307:169:0:-;2381:6;;;-1:-1:-1;;;;;2397:17:0;;;-1:-1:-1;;;;;;2397:17:0;;;;;;;2429:40;;2381:6;;;2397:17;2381:6;;2429:40;;2362:16;;2429:40;2307:169;;:::o;14263:1316:28:-;14348:1;14336:9;:13;14328:36;;;;-1:-1:-1;;;14328:36:28;;17995:2:30;14328:36:28;;;17977:21:30;18034:2;18014:18;;;18007:30;-1:-1:-1;;;18053:18:30;;;18046:40;18103:18;;14328:36:28;17967:160:30;14328:36:28;14535:10;14556:1;14519:27;;;:15;:27;;;;;:34;;;;-1:-1:-1;;;;;14519:34:28;:38;;;:102;;-1:-1:-1;14589:10:28;14620:1;14573:27;;;:15;:27;;;;;:44;-1:-1:-1;;;14573:44:28;;-1:-1:-1;;;;;14573:44:28;:48;;14519:102;14502:171;;;14646:16;14654:1;14657:4;14646:7;:16::i;:::-;14772:10;:16;14848:10;14749:20;14836:23;;;:11;:23;;;;;;;;;14899:16;;14947:53;;37526:25:30;;;14772:16:28;;;;37567:18:30;;;37560:34;;;14772:16:28;;14836:23;;14899:16;;:32;;;14848:10;;14947:53;;37499:18:30;14947:53:28;;;;;;;15044:17;;;;;-1:-1:-1;;;;;15044:17:28;15011:22;15107:288;;;;15167:29;:14;15186:9;15167:18;:29::i;:::-;15148:48;;15107:288;;;15235:19;;15227:49;;;;-1:-1:-1;;;15227:49:28;;26586:2:30;15227:49:28;;;26568:21:30;26625:2;26605:18;;;26598:30;-1:-1:-1;;;26644:18:30;;;26637:47;26701:18;;15227:49:28;26558:167:30;15227:49:28;-1:-1:-1;15344:10:28;15332:23;;;;:11;:23;;;;;:52;;-1:-1:-1;;15332:52:28;;;;;;;15309:9;15107:288;15405:41;15429:16;15405:23;:41::i;:::-;15468:10;15456:23;;;;:11;:23;;;;;:58;;-1:-1:-1;;;;;;15456:58:28;;-1:-1:-1;;;;;15456:58:28;;;;;;15525:47;;15555:4;15562:9;15525;:47::i;2672:96:10:-;2730:7;2756:5;2760:1;2756;:5;:::i;14911:339:27:-;14977:25;;15040:20;;15089:154;;-1:-1:-1;;;15089:154:27;;-1:-1:-1;;;;;14977:25:27;;;15089:154;;;11069:34:30;;;11119:18;;;11112:34;;;15195:13:27;11182:15:30;;;11162:18;;;11155:43;15222:11:27;11214:18:30;;;11207:34;15089:22:27;;:34;;11003:19:30;;15089:154:27;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;15071:15;:172;-1:-1:-1;;14911:339:27:o;12439:536::-;12520:10;:23;;;;-1:-1:-1;;;;;12520:23:27;-1:-1:-1;;;;;12557:23:27;;;12553:105;;12596:10;:51;;-1:-1:-1;;;;12596:51:27;-1:-1:-1;;;;;;;;12596:51:27;;;;;;12553:105;12667:10;:27;;-1:-1:-1;;;;;;12667:27:27;;;12705:25;:38;;-1:-1:-1;;;;;;12705:38:27;;;-1:-1:-1;;;;;12758:23:27;;;12754:215;;12838:52;;-1:-1:-1;;;12838:52:27;;-1:-1:-1;;;;;12873:16:27;6961:32:30;12838:52:27;;;6943:51:30;12797:22:27;;12838;;:34;;6916:18:30;;12838:52:27;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;12797:93;;12947:10;-1:-1:-1;;;;;12909:49:27;12920:9;-1:-1:-1;;;;;12909:49:27;;12931:14;12909:49;;;;35093:25:30;;35081:2;35066:18;;35048:76;12754:215:27;12439:536;;:::o;20535:1747:28:-;20750:12;;21219:367;;;;;;;;21275:11;:20;20750:12;21275:20;;;;21219:367;;21317:50;;-1:-1:-1;;;21317:50:28;;21361:4;21317:50;;;6943:51:30;-1:-1:-1;;;;;;;;;20750:12:28;;;;-1:-1:-1;;;;;;;;21140:22:28;;:33;;21191:10;;21219:367;;;;21324:17;;;;;;;;21317:35;;6916:18:30;;21317:50:28;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;21219:367;;;;21389:13;3622:12:3;;;3535:106;21389:13:28;21219:367;;;;21424:24;21219:367;;;;21470:14;;21219:367;;;;21506:13;;21219:367;;;;21541:27;21219:367;;;21140:460;;;;;;;;;;;;;;;32633:4:30;32675:3;32664:9;32660:19;32652:27;;32706:6;32695:9;32688:25;32755:6;32749:13;32744:2;32733:9;32729:18;32722:41;32817:2;32809:6;32805:15;32799:22;32794:2;32783:9;32779:18;32772:50;32876:2;32868:6;32864:15;32858:22;32853:2;32842:9;32838:18;32831:50;32936:2;32928:6;32924:15;32918:22;32912:3;32901:9;32897:19;32890:51;32996:3;32988:6;32984:16;32978:23;32972:3;32961:9;32957:19;32950:52;33057:3;33049:6;33045:16;33039:23;33033:3;33022:9;33018:19;33011:52;33118:3;33110:6;33106:16;33100:23;33094:3;33083:9;33079:19;33072:52;32642:488;;;;;;21140:460:28;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;21704:10;:16;;;21681:20;21734:32;;;:18;:32;;;;;;;;;:51;;;21805:157;;37807:25:30;;;37848:18;;;37841:34;;;37891:18;;;37884:34;;;20922:678:28;;-1:-1:-1;20922:678:28;;-1:-1:-1;20922:678:28;;-1:-1:-1;20922:678:28;-1:-1:-1;20922:678:28;-1:-1:-1;21734:51:28;-1:-1:-1;21704:16:28;-1:-1:-1;;;;;21805:157:28;;;;;37795:2:30;37780:18;21805:157:28;;;;;;;21977:23;:27;;-1:-1:-1;;;;;;21977:27:28;;;22044:16;:12;21977:23;22044:16;:::i;:::-;22018:10;:43;;-1:-1:-1;;22018:43:28;;;;;;;;;;;;-1:-1:-1;22082:32:28;;-1:-1:-1;22096:4:28;22103:10;22082:5;:32::i;:::-;22129:17;;22125:96;;22162:48;22184:9;22196:13;22162;:48::i;:::-;22231:44;;;;20535:1747;;;;;;:::o;3077:120:22:-;-1:-1:-1;;;;;3145:24:22;;;3137:53;;;;-1:-1:-1;;;3137:53:22;;15520:2:30;3137:53:22;;;15502:21:30;15559:2;15539:18;;;15532:30;-1:-1:-1;;;15578:18:30;;;15571:46;15634:18;;3137:53:22;15492:166:30;6878:1220:28;1409:13:1;;;;;;;;:30;;-1:-1:-1;1427:12:1;;;;1426:13;1409:30;1401:89;;;;-1:-1:-1;;;1401:89:1;;;;;;;:::i;:::-;1501:19;1524:13;;;;;;1523:14;1547:98;;;;1581:13;:20;;-1:-1:-1;;1615:19:1;;;;;1547:98;7203:257:28::1;::::0;-1:-1:-1;;;7203:257:28;;:22:::1;::::0;:46:::1;::::0;:257:::1;::::0;7263:6;;7283:7;;7304:13;;7331:15;;7360:14;;7388:10;;7412:12;;7438;;7203:257:::1;;;:::i;:::-;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;7471:24;:22;:24::i;:::-;7505:38;7518:10;7530:12;7505;:38::i;:::-;7553:16;:14;:16::i;:::-;7579:25;7597:6;7579:17;:25::i;:::-;7615:6;:16:::0;;-1:-1:-1;;;;;7615:16:28;;::::1;-1:-1:-1::0;;;;;;7615:16:28;;::::1;;::::0;;;7642:12:::1;:28:::0;;;;::::1;::::0;;;::::1;::::0;;;::::1;::::0;;7680:14:::1;:32:::0;;;7738:82:::1;3990:8;7738:40;:14:::0;324:5:24::1;7738:18:28;:40::i;:82::-;7722:13;:98:::0;7844:12;7830:11:::1;:26;7844:12:::0;7830:11;:26:::1;:::i;:::-;-1:-1:-1::0;;7909:11:28::1;:17:::0;7902:50:::1;::::0;-1:-1:-1;;;7902:50:28;;7946:4:::1;7902:50;::::0;::::1;6943:51:30::0;7867:20:28::1;::::0;7909:17;;::::1;-1:-1:-1::0;;;;;7909:17:28::1;::::0;7902:35:::1;::::0;6916:18:30;;7902:50:28::1;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;7867:85;;7962:37;7986:12;7962:23;:37::i;:::-;8009:10;:51:::0;;-1:-1:-1;;;;;;;8009:51:28;;::::1;-1:-1:-1::0;;;8009:51:28::1;8071:20:::0;;;;;;;;;;;;-1:-1:-1;8071:20:28::1;::::0;;1667:66:1;;;;1717:5;1701:21;;-1:-1:-1;;1701:21:1;;;1667:66;6878:1220:28;;;;;;;;;:::o;1806:584:22:-;2044:20;;2004:24;;2044;;;;;;:63;;-1:-1:-1;2072:20:22;;:35;;;-1:-1:-1;2044:63:22;2040:296;;;2123:23;2165:61;2179:14;:21;;;-1:-1:-1;;;;;2165:61:22;2202:13;2217:8;2165:13;:61::i;:::-;2272:31;;;;2123:103;;-1:-1:-1;2264:61:22;;-1:-1:-1;;;;;2264:40:22;2123:103;2264:44;:61::i;:::-;2241:84;;;;;2040:296;-1:-1:-1;;;;2352:31:22;;;-1:-1:-1;;;;;2345:38:22;;1806:584::o;15761:1157:28:-;15877:10;15808:7;15865:23;;;:11;:23;;;;;15926:17;;-1:-1:-1;;;;;15926:17:28;;;;;15979:16;;16062:20;16054:46;;;;-1:-1:-1;;;16054:46:28;;22653:2:30;16054:46:28;;;22635:21:30;22692:2;22672:18;;;22665:30;-1:-1:-1;;;22711:18:30;;;22704:43;22764:18;;16054:46:28;22625:163:30;16054:46:28;16137:10;:16;;;16119:34;;16111:63;;;;-1:-1:-1;;;16111:63:28;;19378:2:30;16111:63:28;;;19360:21:30;19417:2;19397:18;;;19390:30;-1:-1:-1;;;19436:18:30;;;19429:46;19492:18;;16111:63:28;19350:166:30;16111:63:28;16283:10;16304:1;16271:23;;;:11;:23;;;;;:34;;-1:-1:-1;;;;;;16271:34:28;;;16378:31;;16370:62;;-1:-1:-1;;;16378:31:28;;-1:-1:-1;;;;;16378:31:28;16415:16;16370:44;:62::i;:::-;16315:31;:127;;-1:-1:-1;;;;;16315:127:28;;;-1:-1:-1;;;16315:127:28;;;;;;;;;-1:-1:-1;16565:35:28;;;:18;:35;;;;;;16618:11;:20;16490:162;;16531:16;;16618:20;16315:127;16618:20;;;;16490:23;:162::i;:::-;16668:54;;;37526:25:30;;;37582:2;37567:18;;37560:34;;;16453:199:28;;-1:-1:-1;16677:10:28;;16668:54;;37499:18:30;16668:54:28;;;;;;;16733:38;16747:4;16754:16;16733:5;:38::i;:::-;16807:1;16790:14;:18;16782:46;;;;-1:-1:-1;;;16782:46:28;;29480:2:30;16782:46:28;;;29462:21:30;29519:2;29499:18;;;29492:30;-1:-1:-1;;;29538:18:30;;;29531:45;29593:18;;16782:46:28;29452:165:30;16782:46:28;16838:41;16852:10;16864:14;16838:13;:41::i;3382:96:10:-;3440:7;3466:5;3470:1;3466;:5;:::i;3767:96::-;3825:7;3851:5;3855:1;3851;:5;:::i;634:205:8:-;773:58;;-1:-1:-1;;;;;10679:32:30;;773:58:8;;;10661:51:30;10728:18;;;10721:34;;;746:86:8;;766:5;;-1:-1:-1;;;796:23:8;10634:18:30;;773:58:8;10616:145:30;3140:706:8;3559:23;3585:69;3613:4;3585:69;;;;;;;;;;;;;;;;;3593:5;-1:-1:-1;;;;;3585:27:8;;;:69;;;;;:::i;:::-;3668:17;;3559:95;;-1:-1:-1;3668:21:8;3664:176;;3763:10;3752:30;;;;;;;;;;;;:::i;:::-;3744:85;;;;-1:-1:-1;;;3744:85:8;;28370:2:30;3744:85:8;;;28352:21:30;28409:2;28389:18;;;28382:30;28448:34;28428:18;;;28421:62;-1:-1:-1;;;28499:18:30;;;28492:40;28549:19;;3744:85:8;28342:232:30;8617:389:3;-1:-1:-1;;;;;8700:21:3;;8692:65;;;;-1:-1:-1;;;8692:65:3;;30570:2:30;8692:65:3;;;30552:21:30;30609:2;30589:18;;;30582:30;30648:33;30628:18;;;30621:61;30699:18;;8692:65:3;30542:181:30;8692:65:3;8844:6;8828:12;;:22;;;;;;;:::i;:::-;;;;-1:-1:-1;;;;;;;8860:18:3;;;;;;:9;:18;;;;;:28;;8882:6;;8860:18;:28;;8882:6;;8860:28;:::i;:::-;;;;-1:-1:-1;;8903:37:3;;35093:25:30;;;-1:-1:-1;;;;;8903:37:3;;;8920:1;;8903:37;;35081:2:30;35066:18;8903:37:3;;;;;;;12439:536:27;;:::o;1789:106:2:-;1409:13:1;;;;;;;;:30;;-1:-1:-1;1427:12:1;;;;1426:13;1409:30;1401:89;;;;-1:-1:-1;;;1401:89:1;;;;;;;:::i;:::-;1501:19;1524:13;;;;;;1523:14;1547:98;;;;1581:13;:20;;-1:-1:-1;;1615:19:1;;;;;1547:98;1854:34:2::1;:32;:34::i;:::-;1671:14:1::0;1667:66;;;1717:5;1701:21;;-1:-1:-1;;1701:21:1;;;1789:106:2;:::o;2044:178:3:-;1409:13:1;;;;;;;;:30;;-1:-1:-1;1427:12:1;;;;1426:13;1409:30;1401:89;;;;-1:-1:-1;;;1401:89:1;;;;;;;:::i;:::-;1501:19;1524:13;;;;;;1523:14;1547:98;;;;1581:13;:20;;-1:-1:-1;;1615:19:1;;;;;1547:98;2141:26:3::1;:24;:26::i;:::-;2177:38;2200:5;2207:7;2177:22;:38::i;:::-;1671:14:1::0;1667:66;;;1717:5;1701:21;;-1:-1:-1;;1701:21:1;;;2044:178:3;;;:::o;934:126:0:-;1409:13:1;;;;;;;;:30;;-1:-1:-1;1427:12:1;;;;1426:13;1409:30;1401:89;;;;-1:-1:-1;;;1401:89:1;;;;;;;:::i;:::-;1501:19;1524:13;;;;;;1523:14;1547:98;;;;1581:13;:20;;-1:-1:-1;;1615:19:1;;;;;1547:98;991:26:0::1;:24;:26::i;:::-;1027;:24;:26::i;277:545:22:-:0;415:7;269:1;691:13;:32;683:66;;;;-1:-1:-1;;;683:66:22;;24043:2:30;683:66:22;;;24025:21:30;24082:2;24062:18;;;24055:30;-1:-1:-1;;;24101:18:30;;;24094:51;24162:18;;683:66:22;24015:171:30;683:66:22;767:48;801:13;767:29;783:12;787:8;783:2;:12;:::i;:::-;767:11;;:15;:29::i;9326:576:3:-;-1:-1:-1;;;;;9409:21:3;;9401:67;;;;-1:-1:-1;;;9401:67:3;;24393:2:30;9401:67:3;;;24375:21:30;24432:2;24412:18;;;24405:30;24471:34;24451:18;;;24444:62;-1:-1:-1;;;24522:18:30;;;24515:31;24563:19;;9401:67:3;24365:223:30;9401:67:3;-1:-1:-1;;;;;9564:18:3;;9539:22;9564:18;;;:9;:18;;;;;;9600:24;;;;9592:71;;;;-1:-1:-1;;;9592:71:3;;13290:2:30;9592:71:3;;;13272:21:30;13329:2;13309:18;;;13302:30;13368:34;13348:18;;;13341:62;-1:-1:-1;;;13419:18:30;;;13412:32;13461:19;;9592:71:3;13262:224:30;9592:71:3;-1:-1:-1;;;;;9697:18:3;;;;;;:9;:18;;;;;9718:23;;;9697:44;;9761:12;:22;;9735:6;;9697:18;9761:22;;9735:6;;9761:22;:::i;:::-;;;;-1:-1:-1;;9799:37:3;;35093:25:30;;;9825:1:3;;-1:-1:-1;;;;;9799:37:3;;;;;35081:2:30;35066:18;9799:37:3;;;;;;;4986:828:27;;;:::o;3461:223:9:-;3594:12;3625:52;3647:6;3655:4;3661:1;3664:12;3625:21;:52::i;1901:104:2:-;1409:13:1;;;;;;;;:30;;-1:-1:-1;1427:12:1;;;;1426:13;1409:30;1401:89;;;;-1:-1:-1;;;1401:89:1;;;;;;;:::i;:::-;1501:19;1524:13;;;;;;1523:14;1547:98;;;;1581:13;:20;;-1:-1:-1;;1615:19:1;;;;;1547:98;1708:1:2::1;1976:22:::0;;1667:66:1;;;;1717:5;1701:21;;-1:-1:-1;;1701:21:1;;;1901:104:2;:::o;754:64:6:-;1409:13:1;;;;;;;;:30;;-1:-1:-1;1427:12:1;;;;1426:13;1409:30;1401:89;;;;-1:-1:-1;;;1401:89:1;;;;;;;:::i;:::-;1501:19;1524:13;;;;;;1523:14;1547:98;;;;1581:13;:20;;-1:-1:-1;;1615:19:1;;;;;1667:66;;;;1717:5;1701:21;;-1:-1:-1;;1701:21:1;;;754:64:6;:::o;2228:154:3:-;1409:13:1;;;;;;;;:30;;-1:-1:-1;1427:12:1;;;;1426:13;1409:30;1401:89;;;;-1:-1:-1;;;1401:89:1;;;;;;;:::i;:::-;1501:19;1524:13;;;;;;1523:14;1547:98;;;;1581:13;:20;;-1:-1:-1;;1615:19:1;;;;;1547:98;2335:13:3;;::::1;::::0;:5:::1;::::0;:13:::1;::::0;::::1;::::0;::::1;:::i;:::-;-1:-1:-1::0;2358:17:3;;::::1;::::0;:7:::1;::::0;:17:::1;::::0;::::1;::::0;::::1;:::i;:::-;;1671:14:1::0;1667:66;;;1717:5;1701:21;;-1:-1:-1;;1701:21:1;;;2228:154:3;;;:::o;1066:97:0:-;1409:13:1;;;;;;;;:30;;-1:-1:-1;1427:12:1;;;;1426:13;1409:30;1401:89;;;;-1:-1:-1;;;1401:89:1;;;;;;;:::i;:::-;1501:19;1524:13;;;;;;1523:14;1547:98;;;;1581:13;:20;;-1:-1:-1;;1615:19:1;;;;;1547:98;1133:23:0::1;902:10:6::0;1133:9:0::1;:23::i;4548:499:9:-:0;4713:12;4770:5;4745:21;:30;;4737:81;;;;-1:-1:-1;;;4737:81:9;;19723:2:30;4737:81:9;;;19705:21:30;19762:2;19742:18;;;19735:30;19801:34;19781:18;;;19774:62;-1:-1:-1;;;19852:18:30;;;19845:36;19898:19;;4737:81:9;19695:228:30;4737:81:9;1034:20;;4828:60;;;;-1:-1:-1;;;4828:60:9;;27337:2:30;4828:60:9;;;27319:21:30;27376:2;27356:18;;;27349:30;27415:31;27395:18;;;27388:59;27464:18;;4828:60:9;27309:179:30;4828:60:9;4900:12;4914:23;4941:6;-1:-1:-1;;;;;4941:11:9;4960:5;4967:4;4941:31;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4899:73;;;;4989:51;5006:7;5015:10;5027:12;4989:16;:51::i;:::-;4982:58;4548:499;-1:-1:-1;;;;;;;4548:499:9:o;7161:692::-;7307:12;7335:7;7331:516;;;-1:-1:-1;7365:10:9;7358:17;;7331:516;7476:17;;:21;7472:365;;7670:10;7664:17;7730:15;7717:10;7713:2;7709:19;7702:44;7619:145;7809:12;7802:20;;-1:-1:-1;;;7802:20:9;;;;;;;;:::i;-1:-1:-1:-;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;14:134:30;82:20;;111:31;82:20;111:31;:::i;:::-;63:85;;;:::o;153:134::-;221:20;;250:31;221:20;250:31;:::i;292:132::-;359:20;;388:30;359:20;388:30;:::i;429:130::-;495:20;;524:29;495:20;524:29;:::i;564:257::-;623:6;676:2;664:9;655:7;651:23;647:32;644:2;;;697:6;689;682:22;644:2;741:9;728:23;760:31;785:5;760:31;:::i;826:398::-;894:6;902;955:2;943:9;934:7;930:23;926:32;923:2;;;976:6;968;961:22;923:2;1020:9;1007:23;1039:31;1064:5;1039:31;:::i;:::-;1089:5;-1:-1:-1;1146:2:30;1131:18;;1118:32;1159:33;1118:32;1159:33;:::i;:::-;1211:7;1201:17;;;913:311;;;;;:::o;1229:466::-;1306:6;1314;1322;1375:2;1363:9;1354:7;1350:23;1346:32;1343:2;;;1396:6;1388;1381:22;1343:2;1440:9;1427:23;1459:31;1484:5;1459:31;:::i;:::-;1509:5;-1:-1:-1;1566:2:30;1551:18;;1538:32;1579:33;1538:32;1579:33;:::i;:::-;1333:362;;1631:7;;-1:-1:-1;;;1685:2:30;1670:18;;;;1657:32;;1333:362::o;1700:325::-;1768:6;1776;1829:2;1817:9;1808:7;1804:23;1800:32;1797:2;;;1850:6;1842;1835:22;1797:2;1894:9;1881:23;1913:31;1938:5;1913:31;:::i;:::-;1963:5;2015:2;2000:18;;;;1987:32;;-1:-1:-1;;;1787:238:30:o;2030:383::-;2118:6;2126;2134;2187:2;2175:9;2166:7;2162:23;2158:32;2155:2;;;2208:6;2200;2193:22;2155:2;2245:9;2239:16;2264:31;2289:5;2264:31;:::i;:::-;2359:2;2344:18;;2338:25;2403:2;2388:18;;;2382:25;2314:5;;2338:25;;-1:-1:-1;2382:25:30;2145:268;-1:-1:-1;;;2145:268:30:o;2418:693::-;2527:6;2535;2588:2;2576:9;2567:7;2563:23;2559:32;2556:2;;;2609:6;2601;2594:22;2556:2;2654:9;2641:23;2683:18;2724:2;2716:6;2713:14;2710:2;;;2745:6;2737;2730:22;2710:2;2788:6;2777:9;2773:22;2763:32;;2833:7;2826:4;2822:2;2818:13;2814:27;2804:2;;2860:6;2852;2845:22;2804:2;2905;2892:16;2931:2;2923:6;2920:14;2917:2;;;2952:6;2944;2937:22;2917:2;3015:7;3010:2;3000:6;2992;2988:19;2984:2;2980:28;2976:37;2973:50;2970:2;;;3041:6;3033;3026:22;2970:2;3077;3069:11;;;;;3099:6;;-1:-1:-1;2546:565:30;;-1:-1:-1;;;;2546:565:30:o;3116:255::-;3183:6;3236:2;3224:9;3215:7;3211:23;3207:32;3204:2;;;3257:6;3249;3242:22;3204:2;3294:9;3288:16;3313:28;3335:5;3313:28;:::i;3376:592::-;3505:6;3513;3557:9;3548:7;3544:23;3587:3;3583:2;3579:12;3576:2;;;3609:6;3601;3594:22;3576:2;3654:9;3641:23;3687:18;3679:6;3676:30;3673:2;;;3724:6;3716;3709:22;3673:2;3752:22;;3808:3;3790:16;;;3786:26;3783:2;;;3830:6;3822;3815:22;3783:2;3858;-1:-1:-1;3894:3:30;-1:-1:-1;;3876:16:30;;3872:26;3869:2;;;3916:6;3908;3901:22;3869:2;;3959;3948:9;3944:18;3934:28;;3524:444;;;;;:::o;3973:321::-;4032:6;4085:2;4073:9;4064:7;4060:23;4056:32;4053:2;;;4106:6;4098;4091:22;4053:2;4150:9;4137:23;-1:-1:-1;;;;;4193:5:30;4189:46;4182:5;4179:57;4169:2;;4255:6;4247;4240:22;4299:190;4358:6;4411:2;4399:9;4390:7;4386:23;4382:32;4379:2;;;4432:6;4424;4417:22;4379:2;-1:-1:-1;4460:23:30;;4369:120;-1:-1:-1;4369:120:30:o;4494:194::-;4564:6;4617:2;4605:9;4596:7;4592:23;4588:32;4585:2;;;4638:6;4630;4623:22;4585:2;-1:-1:-1;4666:16:30;;4575:113;-1:-1:-1;4575:113:30:o;4693:325::-;4761:6;4769;4822:2;4810:9;4801:7;4797:23;4793:32;4790:2;;;4843:6;4835;4828:22;4790:2;4884:9;4871:23;4861:33;;4944:2;4933:9;4929:18;4916:32;4957:31;4982:5;4957:31;:::i;5023:502::-;5138:6;5146;5154;5162;5170;5178;5231:3;5219:9;5210:7;5206:23;5202:33;5199:2;;;5253:6;5245;5238:22;5199:2;5287:9;5281:16;5271:26;;5337:2;5326:9;5322:18;5316:25;5306:35;;5381:2;5370:9;5366:18;5360:25;5350:35;;5425:2;5414:9;5410:18;5404:25;5394:35;;5469:3;5458:9;5454:19;5448:26;5438:36;;5514:3;5503:9;5499:19;5493:26;5483:36;;5189:336;;;;;;;;:::o;5639:258::-;5681:3;5719:5;5713:12;5746:6;5741:3;5734:19;5762:63;5818:6;5811:4;5806:3;5802:14;5795:4;5788:5;5784:16;5762:63;:::i;:::-;5879:2;5858:15;-1:-1:-1;;5854:29:30;5845:39;;;;5886:4;5841:50;;5689:208;-1:-1:-1;;5689:208:30:o;6300:274::-;6429:3;6467:6;6461:13;6483:53;6529:6;6524:3;6517:4;6509:6;6505:17;6483:53;:::i;:::-;6552:16;;;;;6437:137;-1:-1:-1;;6437:137:30:o;7999:1708::-;8395:4;8424:3;8463:1;8459;8454:3;8450:11;8446:19;8504:2;8496:6;8492:15;8481:9;8474:34;8556:2;8548:6;8544:15;8539:2;8528:9;8524:18;8517:43;8608:2;8600:6;8596:15;8591:2;8580:9;8576:18;8569:43;8648:6;8643:2;8632:9;8628:18;8621:34;8692:6;8686:3;8675:9;8671:19;8664:35;8736:2;8730:3;8719:9;8715:19;8708:31;8762:45;8803:2;8792:9;8788:18;8780:6;8762:45;:::i;:::-;8748:59;;8856:9;8848:6;8844:22;8838:3;8827:9;8823:19;8816:51;8884:33;8910:6;8902;8884:33;:::i;:::-;8876:41;;8952:6;8939:20;8926:33;;8968:28;8990:5;8968:28;:::i;:::-;9040:13;;9033:21;9027:3;9012:19;;9005:50;9104:2;9092:15;;9079:29;;9117:31;9079:29;9117:31;:::i;:::-;9198:4;9189:7;9185:18;9179:3;9168:9;9164:19;9157:47;9253:2;9245:6;9241:15;9228:29;9213:44;;9266:33;9291:7;9266:33;:::i;:::-;9336:16;9330:3;9315:19;;9308:45;9377:35;9408:2;9396:15;;9377:35;:::i;:::-;-1:-1:-1;;;;;5596:31:30;9464:3;9449:19;;5584:44;9493:35;9523:3;9511:16;;9493:35;:::i;:::-;6191:16;6180:28;9579:3;9564:19;;6168:41;9608:36;9639:3;9627:16;;9608:36;:::i;:::-;-1:-1:-1;;;;;5968:40:30;;9696:3;9681:19;;5956:53;9653:48;8404:1303;;;;;;;;;;;:::o;12113:220::-;12262:2;12251:9;12244:21;12225:4;12282:45;12323:2;12312:9;12308:18;12300:6;12282:45;:::i;20273:330::-;20475:2;20457:21;;;20514:1;20494:18;;;20487:29;-1:-1:-1;;;20547:2:30;20532:18;;20525:37;20594:2;20579:18;;20447:156::o;20941:410::-;21143:2;21125:21;;;21182:2;21162:18;;;21155:30;21221:34;21216:2;21201:18;;21194:62;-1:-1:-1;;;21287:2:30;21272:18;;21265:44;21341:3;21326:19;;21115:236::o;22793:356::-;22995:2;22977:21;;;23014:18;;;23007:30;23073:34;23068:2;23053:18;;23046:62;23140:2;23125:18;;22967:182::o;27833:330::-;28035:2;28017:21;;;28074:1;28054:18;;;28047:29;-1:-1:-1;;;28107:2:30;28092:18;;28085:37;28154:2;28139:18;;28007:156::o;28918:355::-;29120:2;29102:21;;;29159:2;29139:18;;;29132:30;29198:33;29193:2;29178:18;;29171:61;29264:2;29249:18;;29092:181::o;31081:1336::-;31425:13;;-1:-1:-1;;;;;31421:39:30;31403:58;;31508:4;31496:17;;;31490:24;31390:3;31375:19;;;31523:54;;31556:20;;31490:24;-1:-1:-1;;;;;5596:31:30;5584:44;;5574:60;31523:54;;31626:4;31618:6;31614:17;31608:24;31641:56;31691:4;31680:9;31676:20;31660:14;-1:-1:-1;;;;;5596:31:30;5584:44;;5574:60;31641:56;;31746:4;31738:6;31734:17;31728:24;31761:56;31811:4;31800:9;31796:20;31780:14;-1:-1:-1;;;;;5596:31:30;5584:44;;5574:60;31761:56;;31873:4;31865:6;31861:17;31855:24;31848:4;31837:9;31833:20;31826:54;31929:4;31921:6;31917:17;31911:24;31944:55;31993:4;31982:9;31978:20;31962:14;6096:6;6085:18;6073:31;;6063:47;31944:55;;32055:4;32047:6;32043:17;32037:24;32030:4;32019:9;32015:20;32008:54;32111:4;32103:6;32099:17;32093:24;32126:56;32176:4;32165:9;32161:20;32145:14;-1:-1:-1;;;;;5596:31:30;5584:44;;5574:60;32126:56;-1:-1:-1;32201:6:30;32244:15;;;32238:22;-1:-1:-1;;;;;5596:31:30;;32304:18;;;5584:44;-1:-1:-1;;32354:3:30;32339:19;;32332:35;;;;32398:3;32383:19;32376:35;31357:1060;;-1:-1:-1;31357:1060:30:o;35489:1593::-;35794:25;;;35742:2;35838;35856:18;;;35849:30;;;35767:18;;;35914:22;;;35713:4;;35742:2;35955;;35973:18;;;36014:6;35713:4;36051:1005;36065:6;36062:1;36059:13;36051:1005;;;36139:6;36126:20;36121:3;36114:33;36206:2;36198:6;36194:15;36181:29;36176:2;36171:3;36167:12;36160:51;36237:35;36268:2;36260:6;36256:15;36237:35;:::i;:::-;-1:-1:-1;;;;;5596:31:30;36311:12;;;5584:44;36371:15;;;36358:29;36344:12;;;36337:51;36411:4;36462:15;;;36449:29;36435:12;;;36428:51;36502:4;36534:35;36553:15;;;36534:35;:::i;:::-;-1:-1:-1;;;;;5596:31:30;36610:12;;;5584:44;36646:4;36678:33;36695:15;;;36678:33;:::i;:::-;6287:4;6276:16;36750:12;;;6264:29;36786:4;36837:15;;;36824:29;36810:12;;;36803:51;36877:6;36930:15;;;36917:29;36903:12;;;36896:51;36970:6;36996:12;;;;37031:15;;;;36087:1;36080:9;36051:1005;;;-1:-1:-1;37073:3:30;;35722:1360;-1:-1:-1;;;;;;;;;35722:1360:30:o;38118:534::-;38196:4;38202:6;38262:11;38249:25;38356:2;38352:7;38341:8;38325:14;38321:29;38317:43;38297:18;38293:68;38283:2;;38378:4;38372;38365:18;38283:2;38408:33;;38460:20;;;-1:-1:-1;38503:18:30;38492:30;;38489:2;;;38538:4;38532;38525:18;38489:2;38574:4;38562:17;;-1:-1:-1;38605:14:30;38601:27;;;38591:38;;38588:2;;;38642:1;38639;38632:12;38657:128;38697:3;38728:1;38724:6;38721:1;38718:13;38715:2;;;38734:18;;:::i;:::-;-1:-1:-1;38770:9:30;;38705:80::o;38790:217::-;38830:1;38856;38846:2;;-1:-1:-1;;;38881:31:30;;38935:4;38932:1;38925:15;38963:4;38888:1;38953:15;38846:2;-1:-1:-1;38992:9:30;;38836:171::o;39012:422::-;39101:1;39144:5;39101:1;39158:270;39179:7;39169:8;39166:21;39158:270;;;39238:4;39234:1;39230:6;39226:17;39220:4;39217:27;39214:2;;;39247:18;;:::i;:::-;39297:7;39287:8;39283:22;39280:2;;;39317:16;;;;39280:2;39396:22;;;;39356:15;;;;39158:270;;;39162:3;39076:358;;;;;:::o;39439:131::-;39499:5;39528:36;39555:8;39549:4;39624:5;39654:8;39644:2;;-1:-1:-1;39695:1:30;39709:5;;39644:2;39743:4;39733:2;;-1:-1:-1;39780:1:30;39794:5;;39733:2;39825:4;39843:1;39838:59;;;;39911:1;39906:130;;;;39818:218;;39838:59;39868:1;39859:10;;39882:5;;;39906:130;39943:3;39933:8;39930:17;39927:2;;;39950:18;;:::i;:::-;-1:-1:-1;;40006:1:30;39992:16;;40021:5;;39818:218;;40120:2;40110:8;40107:16;40101:3;40095:4;40092:13;40088:36;40082:2;40072:8;40069:16;40064:2;40058:4;40055:12;40051:35;40048:77;40045:2;;;-1:-1:-1;40157:19:30;;;40189:5;;40045:2;40236:34;40261:8;40255:4;40236:34;:::i;:::-;40306:6;40302:1;40298:6;40294:19;40285:7;40282:32;40279:2;;;40317:18;;:::i;:::-;40355:20;;39634:747;-1:-1:-1;;;39634:747:30:o;40386:168::-;40426:7;40492:1;40488;40484:6;40480:14;40477:1;40474:21;40469:1;40462:9;40455:17;40451:45;40448:2;;;40499:18;;:::i;:::-;-1:-1:-1;40539:9:30;;40438:116::o;40559:125::-;40599:4;40627:1;40624;40621:8;40618:2;;;40632:18;;:::i;:::-;-1:-1:-1;40669:9:30;;40608:76::o;40689:258::-;40761:1;40771:113;40785:6;40782:1;40779:13;40771:113;;;40861:11;;;40855:18;40842:11;;;40835:39;40807:2;40800:10;40771:113;;;40902:6;40899:1;40896:13;40893:2;;;-1:-1:-1;;40937:1:30;40919:16;;40912:27;40742:205::o;40952:380::-;41031:1;41027:12;;;;41074;;;41095:2;;41149:4;41141:6;41137:17;41127:27;;41095:2;41202;41194:6;41191:14;41171:18;41168:38;41165:2;;;41248:10;41243:3;41239:20;41236:1;41229:31;41283:4;41280:1;41273:15;41311:4;41308:1;41301:15;41165:2;;41007:325;;;:::o;41337:135::-;41376:3;-1:-1:-1;;41397:17:30;;41394:2;;;41417:18;;:::i;:::-;-1:-1:-1;41464:1:30;41453:13;;41384:88::o;41477:127::-;41538:10;41533:3;41529:20;41526:1;41519:31;41569:4;41566:1;41559:15;41593:4;41590:1;41583:15;41609:176;41654:11;41706:3;41693:17;41719:31;41744:5;41719:31;:::i;41790:176::-;41835:11;41887:3;41874:17;41900:31;41925:5;41900:31;:::i;41971:174::-;42015:11;42067:3;42054:17;42080:30;42104:5;42080:30;:::i;42350:1155::-;42523:5;42510:19;42538:30;42560:7;42538:30;:::i;:::-;42587:11;;-1:-1:-1;;42675:17:30;;42628:15;;42621:23;42646:3;42617:33;42672:25;;;42659:39;;42746:2;42735:14;;42722:28;42759:31;42722:28;42759:31;:::i;:::-;42830:5;42820:7;42817:1;42813:15;42809:27;42799:37;;42890:2;42885;42876:5;42872:10;42868:2;42864:19;42861:27;42858:35;42852:4;42845:49;42942:2;42935:5;42931:14;42918:28;42955:33;42980:7;42955:33;:::i;:::-;-1:-1:-1;;;;;;43023:41:30;;;;43020:49;;;43013:57;;;;43080:2;43076:16;;;;-1:-1:-1;;;;;43072:46:30;43010:109;42997:123;;43107:1;43147:12;;43168:104;43228:43;43267:2;43256:14;;43228:43;:::i;:::-;42254:11;;-1:-1:-1;;;;;;42250:54:30;-1:-1:-1;;;;;42306:31:30;;;;42247:91;42234:105;;42224:121;43168:104;43281:102;43339:43;43377:3;43370:5;43366:15;43339:43;:::i;:::-;43327:10;43808:11;;-1:-1:-1;;;;43844:40:30;43911:3;43890:15;;;;-1:-1:-1;;;43886:48:30;43841:94;;;;43828:108;;43788:154;43281:102;;43392:107;43454:44;43493:3;43486:5;43482:15;43454:44;:::i;:::-;43450:1;43444:4;43440:12;-1:-1:-1;;;;;43667:5:30;43663:40;-1:-1:-1;;;;;43627:33:30;43620:4;43614:11;43610:51;43607:97;43601:4;43594:111;43584:127;;;43947:131;-1:-1:-1;;;;;44022:31:30;;44012:42;;44002:2;;44068:1;44065;44058:12;44083:118;44169:5;44162:13;44155:21;44148:5;44145:32;44135:2;;44191:1;44188;44181:12;44206:140;-1:-1:-1;;;;;44285:5:30;44281:40;44274:5;44271:51;44261:2;;44336:1;44333;44326:12;44351:127;44436:16;44429:5;44425:28;44418:5;44415:39;44405:2;;44468:1;44465;44458:12;44483:114;44567:4;44560:5;44556:16;44549:5;44546:27;44536:2;;44587:1;44584;44577:12","linkReferences":{},"cborAuxdata":{"1":{"value":"0xa2646970667358221220d57d9363a2549d4d8bb447473f2ccf1f500aa870e9b3845b5f87898379dcf8d964736f6c63430008040033","offset":22743}},"immutableReferences":{"5711":[{"start":3882,"length":32},{"start":11616,"length":32}],"6737":[{"start":3510,"length":32},{"start":10813,"length":32},{"start":10985,"length":32},{"start":13035,"length":32},{"start":13096,"length":32}],"6740":[{"start":2806,"length":32},{"start":11653,"length":32}],"6753":[{"start":1377,"length":32},{"start":6460,"length":32},{"start":8678,"length":32},{"start":15704,"length":32}],"6755":[{"start":2220,"length":32},{"start":8718,"length":32}],"6757":[{"start":3744,"length":32},{"start":6732,"length":32},{"start":15392,"length":32}]},"transformations":[{"id":"5711","type":"replace","offset":3882,"reason":"immutable"},{"id":"5711","type":"replace","offset":11616,"reason":"immutable"},{"id":"6737","type":"replace","offset":3510,"reason":"immutable"},{"id":"6737","type":"replace","offset":10813,"reason":"immutable"},{"id":"6737","type":"replace","offset":10985,"reason":"immutable"},{"id":"6737","type":"replace","offset":13035,"reason":"immutable"},{"id":"6737","type":"replace","offset":13096,"reason":"immutable"},{"id":"6740","type":"replace","offset":2806,"reason":"immutable"},{"id":"6740","type":"replace","offset":11653,"reason":"immutable"},{"id":"6753","type":"replace","offset":1377,"reason":"immutable"},{"id":"6753","type":"replace","offset":6460,"reason":"immutable"},{"id":"6753","type":"replace","offset":8678,"reason":"immutable"},{"id":"6753","type":"replace","offset":15704,"reason":"immutable"},{"id":"6755","type":"replace","offset":2220,"reason":"immutable"},{"id":"6755","type":"replace","offset":8718,"reason":"immutable"},{"id":"6757","type":"replace","offset":3744,"reason":"immutable"},{"id":"6757","type":"replace","offset":6732,"reason":"immutable"},{"id":"6757","type":"replace","offset":15392,"reason":"immutable"},{"id":"1","type":"replace","offset":22743,"reason":"cborAuxdata"}],"transformationValues":{"immutables":{"5711":"0x0000000000000000000000004114b7c04bbba682130cae2ba26fc5d2473b4ddc","6737":"0x000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2","6740":"0x000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48","6753":"0x0000000000000000000000004bec71a4ac41ee9761440f6921dd17ba1c1213b1","6755":"0x0000000000000000000000003c212a044760de5a529b3ba59363ddeccc2210be","6757":"0x000000000000000000000000eb8cab2f4663247db8eafb556f498c861bb4e161"},"cborAuxdata":{"1":"0xa26469706673582212200782aab6ab851c7f09062424f1b9bdf0ad5e99b5e151b65fb4cb09011bc2d81664736f6c63430008040033"}}},"deployment":{"transactionHash":"0xdb4c02fc5b2b096a63f7676d5cf9c552cae0ed5f2d42d29620223ad3b20724c8","blockNumber":"22994743","transactionIndex":"124","deployer":"0xF8368119Bb1073Cf01B841848725d81b542A4c19"},"sources":{"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity =0.8.4;\n\nimport {SafeMath} from \"@openzeppelin/contracts/utils/math/SafeMath.sol\";\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport {\n    SafeERC20\n} from \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\n\nimport {ISwap} from \"../../interfaces/ISwap.sol\";\nimport {\n    RibbonThetaVaultStorage\n} from \"../../storage/RibbonThetaVaultStorage.sol\";\nimport {Vault} from \"../../libraries/Vault.sol\";\nimport {\n    VaultLifecycleWithSwap\n} from \"../../libraries/VaultLifecycleWithSwap.sol\";\nimport {ShareMath} from \"../../libraries/ShareMath.sol\";\nimport {ILiquidityGauge} from \"../../interfaces/ILiquidityGauge.sol\";\nimport {RibbonVault} from \"./base/RibbonVault.sol\";\nimport {IVaultPauser} from \"../../interfaces/IVaultPauser.sol\";\n\n/**\n * UPGRADEABILITY: Since we use the upgradeable proxy pattern, we must observe\n * the inheritance chain closely.\n * Any changes/appends in storage variable needs to happen in RibbonThetaVaultStorage.\n * RibbonThetaVault should not inherit from any other contract aside from RibbonVault, RibbonThetaVaultStorage\n */\ncontract RibbonThetaVaultWithSwap is RibbonVault, RibbonThetaVaultStorage {\n    using SafeERC20 for IERC20;\n    using SafeMath for uint256;\n    using ShareMath for Vault.DepositReceipt;\n\n    /************************************************\n     *  IMMUTABLES & CONSTANTS\n     ***********************************************/\n\n    /// @notice oTokenFactory is the factory contract used to spawn otokens. Used to lookup otokens.\n    address public immutable OTOKEN_FACTORY;\n\n    // The minimum duration for an option auction.\n    uint256 private constant MIN_AUCTION_DURATION = 5 minutes;\n\n    /************************************************\n     *  EVENTS\n     ***********************************************/\n\n    event OpenShort(\n        address indexed options,\n        uint256 depositAmount,\n        address indexed manager\n    );\n\n    event CloseShort(\n        address indexed options,\n        uint256 withdrawAmount,\n        address indexed manager\n    );\n\n    event NewOptionStrikeSelected(uint256 strikePrice, uint256 delta);\n\n    event AuctionDurationSet(\n        uint256 auctionDuration,\n        uint256 newAuctionDuration\n    );\n\n    event InstantWithdraw(\n        address indexed account,\n        uint256 amount,\n        uint256 round\n    );\n\n    event NewOffer(\n        uint256 swapId,\n        address seller,\n        address oToken,\n        address biddingToken,\n        uint256 minPrice,\n        uint256 minBidSize,\n        uint256 totalSize\n    );\n\n    /************************************************\n     *  STRUCTS\n     ***********************************************/\n\n    /**\n     * @notice Initialization parameters for the vault.\n     * @param _owner is the owner of the vault with critical permissions\n     * @param _feeRecipient is the address to recieve vault performance and management fees\n     * @param _managementFee is the management fee pct.\n     * @param _performanceFee is the perfomance fee pct.\n     * @param _tokenName is the name of the token\n     * @param _tokenSymbol is the symbol of the token\n     * @param _optionsPremiumPricer is the address of the contract with the\n       black-scholes premium calculation logic\n     * @param _strikeSelection is the address of the contract with strike selection logic\n     */\n    struct InitParams {\n        address _owner;\n        address _keeper;\n        address _feeRecipient;\n        uint256 _managementFee;\n        uint256 _performanceFee;\n        string _tokenName;\n        string _tokenSymbol;\n        address _optionsPremiumPricer;\n        address _strikeSelection;\n    }\n\n    /************************************************\n     *  CONSTRUCTOR & INITIALIZATION\n     ***********************************************/\n\n    /**\n     * @notice Initializes the contract with immutable variables\n     * @param _weth is the Wrapped Ether contract\n     * @param _usdc is the USDC contract\n     * @param _oTokenFactory is the contract address for minting new opyn option types (strikes, asset, expiry)\n     * @param _gammaController is the contract address for opyn actions\n     * @param _marginPool is the contract address for providing collateral to opyn\n     * @param _swapContract is the contract address that facilitates bids settlement\n     */\n    constructor(\n        address _weth,\n        address _usdc,\n        address _oTokenFactory,\n        address _gammaController,\n        address _marginPool,\n        address _swapContract\n    ) RibbonVault(_weth, _usdc, _gammaController, _marginPool, _swapContract) {\n        require(_oTokenFactory != address(0), \"!_oTokenFactory\");\n        OTOKEN_FACTORY = _oTokenFactory;\n    }\n\n    /**\n     * @notice Initializes the OptionVault contract with storage variables.\n     * @param _initParams is the struct with vault initialization parameters\n     * @param _vaultParams is the struct with vault general data\n     */\n    function initialize(\n        InitParams calldata _initParams,\n        Vault.VaultParams calldata _vaultParams\n    ) external initializer {\n        baseInitialize(\n            _initParams._owner,\n            _initParams._keeper,\n            _initParams._feeRecipient,\n            _initParams._managementFee,\n            _initParams._performanceFee,\n            _initParams._tokenName,\n            _initParams._tokenSymbol,\n            _vaultParams\n        );\n        require(\n            _initParams._optionsPremiumPricer != address(0),\n            \"!_optionsPremiumPricer\"\n        );\n        require(\n            _initParams._strikeSelection != address(0),\n            \"!_strikeSelection\"\n        );\n\n        optionsPremiumPricer = _initParams._optionsPremiumPricer;\n        strikeSelection = _initParams._strikeSelection;\n    }\n\n    /************************************************\n     *  SETTERS\n     ***********************************************/\n\n    /**\n     * @notice Sets the new strike selection contract\n     * @param newStrikeSelection is the address of the new strike selection contract\n     */\n    function setStrikeSelection(address newStrikeSelection) external onlyOwner {\n        require(newStrikeSelection != address(0), \"!newStrikeSelection\");\n        strikeSelection = newStrikeSelection;\n    }\n\n    /**\n     * @notice Sets the new options premium pricer contract\n     * @param newOptionsPremiumPricer is the address of the new strike selection contract\n     */\n    function setOptionsPremiumPricer(address newOptionsPremiumPricer)\n        external\n        onlyOwner\n    {\n        require(\n            newOptionsPremiumPricer != address(0),\n            \"!newOptionsPremiumPricer\"\n        );\n        optionsPremiumPricer = newOptionsPremiumPricer;\n    }\n\n    /**\n     * @notice Optionality to set strike price manually\n     * Should be called after closeRound if we are setting current week's strike\n     * @param strikePrice is the strike price of the new oTokens (decimals = 8)\n     */\n    function setStrikePrice(uint128 strikePrice) external onlyOwner {\n        require(strikePrice > 0, \"!strikePrice\");\n        overriddenStrikePrice = strikePrice;\n        lastStrikeOverrideRound = vaultState.round;\n    }\n\n    /**\n     * @notice Sets the new liquidityGauge contract for this vault\n     * @param newLiquidityGauge is the address of the new liquidityGauge contract\n     */\n    function setLiquidityGauge(address newLiquidityGauge) external onlyOwner {\n        liquidityGauge = newLiquidityGauge;\n    }\n\n    /**\n     * @notice Sets oToken Premium\n     * @param minPrice is the new oToken Premium in the units of 10**18\n     */\n    function setMinPrice(uint256 minPrice) external onlyKeeper {\n        require(minPrice > 0, \"!minPrice\");\n        currentOtokenPremium = minPrice;\n    }\n\n    /**\n     * @notice Sets the new Vault Pauser contract for this vault\n     * @param newVaultPauser is the address of the new vaultPauser contract\n     */\n    function setVaultPauser(address newVaultPauser) external onlyOwner {\n        vaultPauser = newVaultPauser;\n    }\n\n    /************************************************\n     *  VAULT OPERATIONS\n     ***********************************************/\n\n    /**\n     * @notice Withdraws the assets on the vault using the outstanding `DepositReceipt.amount`\n     * @param amount is the amount to withdraw\n     */\n    function withdrawInstantly(uint256 amount) external nonReentrant {\n        Vault.DepositReceipt storage depositReceipt =\n            depositReceipts[msg.sender];\n\n        uint256 currentRound = vaultState.round;\n        require(amount > 0, \"!amount\");\n        require(depositReceipt.round == currentRound, \"Invalid round\");\n\n        uint256 receiptAmount = depositReceipt.amount;\n        require(receiptAmount >= amount, \"Exceed amount\");\n\n        // Subtraction underflow checks already ensure it is smaller than uint104\n        depositReceipt.amount = uint104(receiptAmount.sub(amount));\n        vaultState.totalPending = uint128(\n            uint256(vaultState.totalPending).sub(amount)\n        );\n\n        emit InstantWithdraw(msg.sender, amount, currentRound);\n\n        transferAsset(msg.sender, amount);\n    }\n\n    /**\n     * @notice Initiates a withdrawal that can be processed once the round completes\n     * @param numShares is the number of shares to withdraw\n     */\n    function initiateWithdraw(uint256 numShares) external nonReentrant {\n        _initiateWithdraw(numShares);\n        currentQueuedWithdrawShares = currentQueuedWithdrawShares.add(\n            numShares\n        );\n    }\n\n    /**\n     * @notice Completes a scheduled withdrawal from a past round. Uses finalized pps for the round\n     */\n    function completeWithdraw() external nonReentrant {\n        uint256 withdrawAmount = _completeWithdraw();\n        lastQueuedWithdrawAmount = uint128(\n            uint256(lastQueuedWithdrawAmount).sub(withdrawAmount)\n        );\n    }\n\n    /**\n     * @notice Stakes a users vault shares\n     * @param numShares is the number of shares to stake\n     */\n    function stake(uint256 numShares) external nonReentrant {\n        address _liquidityGauge = liquidityGauge;\n        require(_liquidityGauge != address(0)); // Removed revert msgs due to contract size limit\n        require(numShares > 0);\n        uint256 heldByAccount = balanceOf(msg.sender);\n        if (heldByAccount < numShares) {\n            _redeem(numShares.sub(heldByAccount), false);\n        }\n        _transfer(msg.sender, address(this), numShares);\n        _approve(address(this), _liquidityGauge, numShares);\n        ILiquidityGauge(_liquidityGauge).deposit(numShares, msg.sender, false);\n    }\n\n    /**\n     * @notice Closes the existing short and calculate the shares to mint, new price per share &\n      amount of funds to re-allocate as collateral for the new round\n     * Since we are incrementing the round here, the options are sold in the beginning of a round\n     * instead of at the end of the round. For example, at round 1, we don't sell any options. We\n     * start selling options at the beginning of round 2.\n     */\n    function closeRound() external nonReentrant {\n        address oldOption = optionState.currentOption;\n        require(\n            oldOption != address(0) || vaultState.round == 1,\n            \"Round closed\"\n        );\n        _closeShort(oldOption);\n\n        uint256 currQueuedWithdrawShares = currentQueuedWithdrawShares;\n        (uint256 lockedBalance, uint256 queuedWithdrawAmount) =\n            _closeRound(\n                uint256(lastQueuedWithdrawAmount),\n                currQueuedWithdrawShares\n            );\n\n        lastQueuedWithdrawAmount = queuedWithdrawAmount;\n\n        uint256 newQueuedWithdrawShares =\n            uint256(vaultState.queuedWithdrawShares).add(\n                currQueuedWithdrawShares\n            );\n        ShareMath.assertUint128(newQueuedWithdrawShares);\n        vaultState.queuedWithdrawShares = uint128(newQueuedWithdrawShares);\n\n        currentQueuedWithdrawShares = 0;\n\n        ShareMath.assertUint104(lockedBalance);\n        vaultState.lockedAmount = uint104(lockedBalance);\n\n        uint256 nextOptionReady = block.timestamp.add(DELAY);\n        require(\n            nextOptionReady <= type(uint32).max,\n            \"Overflow nextOptionReady\"\n        );\n        optionState.nextOptionReadyAt = uint32(nextOptionReady);\n    }\n\n    /**\n     * @notice Closes the existing short position for the vault.\n     */\n    function _closeShort(address oldOption) private {\n        uint256 lockedAmount = vaultState.lockedAmount;\n        if (oldOption != address(0)) {\n            vaultState.lastLockedAmount = uint104(lockedAmount);\n        }\n        vaultState.lockedAmount = 0;\n\n        optionState.currentOption = address(0);\n\n        if (oldOption != address(0)) {\n            uint256 withdrawAmount =\n                VaultLifecycleWithSwap.settleShort(GAMMA_CONTROLLER);\n            emit CloseShort(oldOption, withdrawAmount, msg.sender);\n        }\n    }\n\n    /**\n     * @notice Sets the next option the vault will be shorting\n     */\n    function commitNextOption() external onlyKeeper nonReentrant {\n        address currentOption = optionState.currentOption;\n        require(\n            currentOption == address(0) && vaultState.round != 1,\n            \"Round not closed\"\n        );\n\n        VaultLifecycleWithSwap.CommitParams memory commitParams =\n            VaultLifecycleWithSwap.CommitParams({\n                OTOKEN_FACTORY: OTOKEN_FACTORY,\n                USDC: USDC,\n                collateralAsset: vaultParams.asset,\n                currentOption: currentOption,\n                delay: DELAY,\n                lastStrikeOverrideRound: lastStrikeOverrideRound,\n                overriddenStrikePrice: overriddenStrikePrice,\n                strikeSelection: strikeSelection,\n                optionsPremiumPricer: optionsPremiumPricer\n            });\n\n        (address otokenAddress, uint256 strikePrice, uint256 delta) =\n            VaultLifecycleWithSwap.commitNextOption(\n                commitParams,\n                vaultParams,\n                vaultState\n            );\n\n        emit NewOptionStrikeSelected(strikePrice, delta);\n\n        optionState.nextOption = otokenAddress;\n    }\n\n    /**\n     * @notice Rolls the vault's funds into a new short position and create a new offer.\n     */\n    function rollToNextOption() external onlyKeeper nonReentrant {\n        address newOption = optionState.nextOption;\n        require(newOption != address(0), \"!nextOption\");\n\n        optionState.currentOption = newOption;\n        optionState.nextOption = address(0);\n        uint256 lockedBalance = vaultState.lockedAmount;\n\n        emit OpenShort(newOption, lockedBalance, msg.sender);\n\n        VaultLifecycleWithSwap.createShort(\n            GAMMA_CONTROLLER,\n            MARGIN_POOL,\n            newOption,\n            lockedBalance\n        );\n\n        _createOffer();\n    }\n\n    function _createOffer() private {\n        address currentOtoken = optionState.currentOption;\n        uint256 currOtokenPremium = currentOtokenPremium;\n\n        optionAuctionID = VaultLifecycleWithSwap.createOffer(\n            currentOtoken,\n            currOtokenPremium,\n            SWAP_CONTRACT,\n            vaultParams\n        );\n    }\n\n    /**\n     * @notice Settle current offer\n     */\n    function settleOffer(ISwap.Bid[] calldata bids)\n        external\n        onlyKeeper\n        nonReentrant\n    {\n        ISwap(SWAP_CONTRACT).settleOffer(optionAuctionID, bids);\n    }\n\n    /**\n     * @notice Burn the remaining oTokens left over\n     */\n    function burnRemainingOTokens() external onlyKeeper nonReentrant {\n        VaultLifecycleWithSwap.burnOtokens(\n            GAMMA_CONTROLLER,\n            optionState.currentOption\n        );\n    }\n\n    /**\n     * @notice pause a user's vault position\n     */\n    function pausePosition() external {\n        address _vaultPauserAddress = vaultPauser;\n        require(_vaultPauserAddress != address(0)); // Removed revert msgs due to contract size limit\n        _redeem(0, true);\n        uint256 heldByAccount = balanceOf(msg.sender);\n        _approve(msg.sender, _vaultPauserAddress, heldByAccount);\n        IVaultPauser(_vaultPauserAddress).pausePosition(\n            msg.sender,\n            heldByAccount\n        );\n    }\n}\n"},"@openzeppelin/contracts/utils/math/SafeMath.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n// CAUTION\n// This version of SafeMath should only be used with Solidity 0.8 or later,\n// because it relies on the compiler's built in overflow checks.\n\n/**\n * @dev Wrappers over Solidity's arithmetic operations.\n *\n * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler\n * now has built in overflow checking.\n */\nlibrary SafeMath {\n    /**\n     * @dev Returns the addition of two unsigned integers, with an overflow flag.\n     *\n     * _Available since v3.4._\n     */\n    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n        unchecked {\n            uint256 c = a + b;\n            if (c < a) return (false, 0);\n            return (true, c);\n        }\n    }\n\n    /**\n     * @dev Returns the substraction of two unsigned integers, with an overflow flag.\n     *\n     * _Available since v3.4._\n     */\n    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n        unchecked {\n            if (b > a) return (false, 0);\n            return (true, a - b);\n        }\n    }\n\n    /**\n     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\n     *\n     * _Available since v3.4._\n     */\n    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n        unchecked {\n            // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\n            // benefit is lost if 'b' is also tested.\n            // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\n            if (a == 0) return (true, 0);\n            uint256 c = a * b;\n            if (c / a != b) return (false, 0);\n            return (true, c);\n        }\n    }\n\n    /**\n     * @dev Returns the division of two unsigned integers, with a division by zero flag.\n     *\n     * _Available since v3.4._\n     */\n    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n        unchecked {\n            if (b == 0) return (false, 0);\n            return (true, a / b);\n        }\n    }\n\n    /**\n     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\n     *\n     * _Available since v3.4._\n     */\n    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n        unchecked {\n            if (b == 0) return (false, 0);\n            return (true, a % b);\n        }\n    }\n\n    /**\n     * @dev Returns the addition of two unsigned integers, reverting on\n     * overflow.\n     *\n     * Counterpart to Solidity's `+` operator.\n     *\n     * Requirements:\n     *\n     * - Addition cannot overflow.\n     */\n    function add(uint256 a, uint256 b) internal pure returns (uint256) {\n        return a + b;\n    }\n\n    /**\n     * @dev Returns the subtraction of two unsigned integers, reverting on\n     * overflow (when the result is negative).\n     *\n     * Counterpart to Solidity's `-` operator.\n     *\n     * Requirements:\n     *\n     * - Subtraction cannot overflow.\n     */\n    function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n        return a - b;\n    }\n\n    /**\n     * @dev Returns the multiplication of two unsigned integers, reverting on\n     * overflow.\n     *\n     * Counterpart to Solidity's `*` operator.\n     *\n     * Requirements:\n     *\n     * - Multiplication cannot overflow.\n     */\n    function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n        return a * b;\n    }\n\n    /**\n     * @dev Returns the integer division of two unsigned integers, reverting on\n     * division by zero. The result is rounded towards zero.\n     *\n     * Counterpart to Solidity's `/` operator.\n     *\n     * Requirements:\n     *\n     * - The divisor cannot be zero.\n     */\n    function div(uint256 a, uint256 b) internal pure returns (uint256) {\n        return a / b;\n    }\n\n    /**\n     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n     * reverting when dividing by zero.\n     *\n     * Counterpart to Solidity's `%` operator. This function uses a `revert`\n     * opcode (which leaves remaining gas untouched) while Solidity uses an\n     * invalid opcode to revert (consuming all remaining gas).\n     *\n     * Requirements:\n     *\n     * - The divisor cannot be zero.\n     */\n    function mod(uint256 a, uint256 b) internal pure returns (uint256) {\n        return a % b;\n    }\n\n    /**\n     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\n     * overflow (when the result is negative).\n     *\n     * CAUTION: This function is deprecated because it requires allocating memory for the error\n     * message unnecessarily. For custom revert reasons use {trySub}.\n     *\n     * Counterpart to Solidity's `-` operator.\n     *\n     * Requirements:\n     *\n     * - Subtraction cannot overflow.\n     */\n    function sub(\n        uint256 a,\n        uint256 b,\n        string memory errorMessage\n    ) internal pure returns (uint256) {\n        unchecked {\n            require(b <= a, errorMessage);\n            return a - b;\n        }\n    }\n\n    /**\n     * @dev Returns the integer division of two unsigned integers, reverting with custom message on\n     * division by zero. The result is rounded towards zero.\n     *\n     * Counterpart to Solidity's `/` operator. Note: this function uses a\n     * `revert` opcode (which leaves remaining gas untouched) while Solidity\n     * uses an invalid opcode to revert (consuming all remaining gas).\n     *\n     * Requirements:\n     *\n     * - The divisor cannot be zero.\n     */\n    function div(\n        uint256 a,\n        uint256 b,\n        string memory errorMessage\n    ) internal pure returns (uint256) {\n        unchecked {\n            require(b > 0, errorMessage);\n            return a / b;\n        }\n    }\n\n    /**\n     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n     * reverting with custom message when dividing by zero.\n     *\n     * CAUTION: This function is deprecated because it requires allocating memory for the error\n     * message unnecessarily. For custom revert reasons use {tryMod}.\n     *\n     * Counterpart to Solidity's `%` operator. This function uses a `revert`\n     * opcode (which leaves remaining gas untouched) while Solidity uses an\n     * invalid opcode to revert (consuming all remaining gas).\n     *\n     * Requirements:\n     *\n     * - The divisor cannot be zero.\n     */\n    function mod(\n        uint256 a,\n        uint256 b,\n        string memory errorMessage\n    ) internal pure returns (uint256) {\n        unchecked {\n            require(b > 0, errorMessage);\n            return a % b;\n        }\n    }\n}\n"},"@openzeppelin/contracts/token/ERC20/IERC20.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n    /**\n     * @dev Returns the amount of tokens in existence.\n     */\n    function totalSupply() external view returns (uint256);\n\n    /**\n     * @dev Returns the amount of tokens owned by `account`.\n     */\n    function balanceOf(address account) external view returns (uint256);\n\n    /**\n     * @dev Moves `amount` tokens from the caller's account to `recipient`.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transfer(address recipient, uint256 amount) external returns (bool);\n\n    /**\n     * @dev Returns the remaining number of tokens that `spender` will be\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\n     * zero by default.\n     *\n     * This value changes when {approve} or {transferFrom} are called.\n     */\n    function allowance(address owner, address spender) external view returns (uint256);\n\n    /**\n     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\n     * that someone may use both the old and the new allowance by unfortunate\n     * transaction ordering. One possible solution to mitigate this race\n     * condition is to first reduce the spender's allowance to 0 and set the\n     * desired value afterwards:\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n     *\n     * Emits an {Approval} event.\n     */\n    function approve(address spender, uint256 amount) external returns (bool);\n\n    /**\n     * @dev Moves `amount` tokens from `sender` to `recipient` using the\n     * allowance mechanism. `amount` is then deducted from the caller's\n     * allowance.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transferFrom(\n        address sender,\n        address recipient,\n        uint256 amount\n    ) external returns (bool);\n\n    /**\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\n     * another (`to`).\n     *\n     * Note that `value` may be zero.\n     */\n    event Transfer(address indexed from, address indexed to, uint256 value);\n\n    /**\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n     * a call to {approve}. `value` is the new allowance.\n     */\n    event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n"},"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20.sol\";\nimport \"../../../utils/Address.sol\";\n\n/**\n * @title SafeERC20\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\n * contract returns false). Tokens that return no value (and instead revert or\n * throw on failure) are also supported, non-reverting calls are assumed to be\n * successful.\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\n */\nlibrary SafeERC20 {\n    using Address for address;\n\n    function safeTransfer(\n        IERC20 token,\n        address to,\n        uint256 value\n    ) internal {\n        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\n    }\n\n    function safeTransferFrom(\n        IERC20 token,\n        address from,\n        address to,\n        uint256 value\n    ) internal {\n        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\n    }\n\n    /**\n     * @dev Deprecated. This function has issues similar to the ones found in\n     * {IERC20-approve}, and its usage is discouraged.\n     *\n     * Whenever possible, use {safeIncreaseAllowance} and\n     * {safeDecreaseAllowance} instead.\n     */\n    function safeApprove(\n        IERC20 token,\n        address spender,\n        uint256 value\n    ) internal {\n        // safeApprove should only be called when setting an initial allowance,\n        // or when resetting it to zero. To increase and decrease it, use\n        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\n        require(\n            (value == 0) || (token.allowance(address(this), spender) == 0),\n            \"SafeERC20: approve from non-zero to non-zero allowance\"\n        );\n        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\n    }\n\n    function safeIncreaseAllowance(\n        IERC20 token,\n        address spender,\n        uint256 value\n    ) internal {\n        uint256 newAllowance = token.allowance(address(this), spender) + value;\n        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n    }\n\n    function safeDecreaseAllowance(\n        IERC20 token,\n        address spender,\n        uint256 value\n    ) internal {\n        unchecked {\n            uint256 oldAllowance = token.allowance(address(this), spender);\n            require(oldAllowance >= value, \"SafeERC20: decreased allowance below zero\");\n            uint256 newAllowance = oldAllowance - value;\n            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n        }\n    }\n\n    /**\n     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n     * on the return value: the return value is optional (but if data is returned, it must not be false).\n     * @param token The token targeted by the call.\n     * @param data The call data (encoded using abi.encode or one of its variants).\n     */\n    function _callOptionalReturn(IERC20 token, bytes memory data) private {\n        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\n        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that\n        // the target address contains contract code and also asserts for success in the low-level call.\n\n        bytes memory returndata = address(token).functionCall(data, \"SafeERC20: low-level call failed\");\n        if (returndata.length > 0) {\n            // Return data is optional\n            require(abi.decode(returndata, (bool)), \"SafeERC20: ERC20 operation did not succeed\");\n        }\n    }\n}\n"},"contracts/interfaces/ISwap.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity =0.8.4;\n\ninterface ISwap {\n    struct Offer {\n        // 32 byte slot 1, partial fill\n        // Seller wallet address\n        address seller;\n        // 32 byte slot 2\n        // Addess of oToken\n        address oToken;\n        // Price per oToken denominated in biddingToken\n        uint96 minPrice;\n        // 32 byte slot 3\n        // ERC20 Token to bid for oToken\n        address biddingToken;\n        // Minimum oToken amount acceptable for a single bid\n        uint96 minBidSize;\n        // 32 byte slot 4\n        // Total available oToken amount\n        uint128 totalSize;\n        // Remaining available oToken amount\n        // This figure is updated after each successfull swap\n        uint128 availableSize;\n        // 32 byte slot 5\n        // Amount of biddingToken received\n        // This figure is updated after each successfull swap\n        uint256 totalSales;\n    }\n\n    struct Bid {\n        // ID assigned to offers\n        uint256 swapId;\n        // Number only used once for each wallet\n        uint256 nonce;\n        // Signer wallet address\n        address signerWallet;\n        // Amount of biddingToken offered by signer\n        uint256 sellAmount;\n        // Amount of oToken requested by signer\n        uint256 buyAmount;\n        // Referrer wallet address\n        address referrer;\n        // Signature recovery id\n        uint8 v;\n        // r portion of the ECSDA signature\n        bytes32 r;\n        // s portion of the ECSDA signature\n        bytes32 s;\n    }\n\n    struct OfferDetails {\n        // Seller wallet address\n        address seller;\n        // Addess of oToken\n        address oToken;\n        // Price per oToken denominated in biddingToken\n        uint256 minPrice;\n        // ERC20 Token to bid for oToken\n        address biddingToken;\n        // Minimum oToken amount acceptable for a single bid\n        uint256 minBidSize;\n    }\n\n    event Swap(\n        uint256 indexed swapId,\n        uint256 nonce,\n        address indexed signerWallet,\n        uint256 signerAmount,\n        uint256 sellerAmount,\n        address referrer,\n        uint256 feeAmount\n    );\n\n    event NewOffer(\n        uint256 swapId,\n        address seller,\n        address oToken,\n        address biddingToken,\n        uint256 minPrice,\n        uint256 minBidSize,\n        uint256 totalSize\n    );\n\n    event SetFee(address referrer, uint256 fee);\n\n    event SetPriceFeed(address asset, address aggregator);\n\n    event SettleOffer(uint256 swapId);\n\n    event Cancel(uint256 indexed nonce, address indexed signerWallet);\n\n    event Authorize(address indexed signer, address indexed signerWallet);\n\n    event Revoke(address indexed signer, address indexed signerWallet);\n\n    function createOffer(\n        address oToken,\n        address biddingToken,\n        uint96 minPrice,\n        uint96 minBidSize,\n        uint128 totalSize\n    ) external returns (uint256 swapId);\n\n    function settleOffer(uint256 swapId, Bid[] calldata bids) external;\n\n    function cancelNonce(uint256[] calldata nonces) external;\n\n    function check(Bid calldata bid)\n        external\n        view\n        returns (uint256, bytes32[] memory);\n\n    function averagePriceForOffer(uint256 swapId)\n        external\n        view\n        returns (uint256);\n\n    function authorize(address sender) external;\n\n    function revoke() external;\n\n    function nonceUsed(address, uint256) external view returns (bool);\n}\n"},"contracts/storage/RibbonThetaVaultStorage.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity =0.8.4;\n\nabstract contract RibbonThetaVaultStorageV1 {\n    // Logic contract used to price options\n    address public optionsPremiumPricer;\n    // Logic contract used to select strike prices\n    address public strikeSelection;\n    // Premium discount on options we are selling (thousandths place: 000 - 999)\n    uint256 public premiumDiscount;\n    // Current oToken premium\n    uint256 public currentOtokenPremium;\n    // Last round id at which the strike was manually overridden\n    uint16 public lastStrikeOverrideRound;\n    // Price last overridden strike set to\n    uint256 public overriddenStrikePrice;\n    // Auction duration\n    uint256 public auctionDuration;\n    // Auction id of current option\n    uint256 public optionAuctionID;\n}\n\nabstract contract RibbonThetaVaultStorageV2 {\n    // Amount locked for scheduled withdrawals last week;\n    uint256 public lastQueuedWithdrawAmount;\n}\n\nabstract contract RibbonThetaVaultStorageV3 {\n    // DEPRECATED: Auction will be denominated in USDC if true\n    bool private _isUsdcAuction;\n    // DEPRECATED: Path for swaps\n    bytes private _swapPath;\n}\n\nabstract contract RibbonThetaVaultStorageV4 {\n    // LiquidityGauge contract for the vault\n    address public liquidityGauge;\n}\n\nabstract contract RibbonThetaVaultStorageV5 {\n    // OptionsPurchaseQueue contract for selling options\n    address public optionsPurchaseQueue;\n}\n\nabstract contract RibbonThetaVaultStorageV6 {\n    // Queued withdraw shares for the current round\n    uint256 public currentQueuedWithdrawShares;\n}\n\nabstract contract RibbonThetaVaultStorageV7 {\n    // Vault Pauser Contract for the vault\n    address public vaultPauser;\n}\n\nabstract contract RibbonThetaVaultStorageV8 {\n    // DEPRECATED: Executor role for Swap offers\n    address private _offerExecutor;\n}\n\n// We are following Compound's method of upgrading new contract implementations\n// When we need to add new storage variables, we create a new version of RibbonThetaVaultStorage\n// e.g. RibbonThetaVaultStorage<versionNumber>, so finally it would look like\n// contract RibbonThetaVaultStorage is RibbonThetaVaultStorageV1, RibbonThetaVaultStorageV2\nabstract contract RibbonThetaVaultStorage is\n    RibbonThetaVaultStorageV1,\n    RibbonThetaVaultStorageV2,\n    RibbonThetaVaultStorageV3,\n    RibbonThetaVaultStorageV4,\n    RibbonThetaVaultStorageV5,\n    RibbonThetaVaultStorageV6,\n    RibbonThetaVaultStorageV7,\n    RibbonThetaVaultStorageV8\n{\n\n}\n"},"contracts/libraries/Vault.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity =0.8.4;\n\nlibrary Vault {\n    /************************************************\n     *  IMMUTABLES & CONSTANTS\n     ***********************************************/\n\n    // Fees are 6-decimal places. For example: 20 * 10**6 = 20%\n    uint256 internal constant FEE_MULTIPLIER = 10**6;\n\n    // Premium discount has 1-decimal place. For example: 80 * 10**1 = 80%. Which represents a 20% discount.\n    uint256 internal constant PREMIUM_DISCOUNT_MULTIPLIER = 10;\n\n    // Otokens have 8 decimal places.\n    uint256 internal constant OTOKEN_DECIMALS = 8;\n\n    // Percentage of funds allocated to options is 2 decimal places. 10 * 10**2 = 10%\n    uint256 internal constant OPTION_ALLOCATION_MULTIPLIER = 10**2;\n\n    // Placeholder uint value to prevent cold writes\n    uint256 internal constant PLACEHOLDER_UINT = 1;\n\n    struct VaultParams {\n        // Option type the vault is selling\n        bool isPut;\n        // Token decimals for vault shares\n        uint8 decimals;\n        // Asset used in Theta / Delta Vault\n        address asset;\n        // Underlying asset of the options sold by vault\n        address underlying;\n        // Minimum supply of the vault shares issued, for ETH it's 10**10\n        uint56 minimumSupply;\n        // Vault cap\n        uint104 cap;\n    }\n\n    struct OptionState {\n        // Option that the vault is shorting / longing in the next cycle\n        address nextOption;\n        // Option that the vault is currently shorting / longing\n        address currentOption;\n        // The timestamp when the `nextOption` can be used by the vault\n        uint32 nextOptionReadyAt;\n    }\n\n    struct VaultState {\n        // 32 byte slot 1\n        //  Current round number. `round` represents the number of `period`s elapsed.\n        uint16 round;\n        // Amount that is currently locked for selling options\n        uint104 lockedAmount;\n        // Amount that was locked for selling options in the previous round\n        // used for calculating performance fee deduction\n        uint104 lastLockedAmount;\n        // 32 byte slot 2\n        // Stores the total tally of how much of `asset` there is\n        // to be used to mint rTHETA tokens\n        uint128 totalPending;\n        // Total amount of queued withdrawal shares from previous rounds (doesn't include the current round)\n        uint128 queuedWithdrawShares;\n    }\n\n    struct DepositReceipt {\n        // Maximum of 65535 rounds. Assuming 1 round is 7 days, maximum is 1256 years.\n        uint16 round;\n        // Deposit amount, max 20,282,409,603,651 or 20 trillion ETH deposit\n        uint104 amount;\n        // Unredeemed shares balance\n        uint128 unredeemedShares;\n    }\n\n    struct Withdrawal {\n        // Maximum of 65535 rounds. Assuming 1 round is 7 days, maximum is 1256 years.\n        uint16 round;\n        // Number of shares withdrawn\n        uint128 shares;\n    }\n\n    struct AuctionSellOrder {\n        // Amount of `asset` token offered in auction\n        uint96 sellAmount;\n        // Amount of oToken requested in auction\n        uint96 buyAmount;\n        // User Id of delta vault in latest gnosis auction\n        uint64 userId;\n    }\n}\n"},"contracts/libraries/VaultLifecycleWithSwap.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity =0.8.4;\n\nimport {SafeMath} from \"@openzeppelin/contracts/utils/math/SafeMath.sol\";\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport {\n    SafeERC20\n} from \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\nimport {Vault} from \"./Vault.sol\";\nimport {ShareMath} from \"./ShareMath.sol\";\nimport {IStrikeSelection} from \"../interfaces/IRibbon.sol\";\nimport {GnosisAuction} from \"./GnosisAuction.sol\";\nimport {\n    IOtokenFactory,\n    IOtoken,\n    IController,\n    GammaTypes\n} from \"../interfaces/GammaInterface.sol\";\nimport {IERC20Detailed} from \"../interfaces/IERC20Detailed.sol\";\nimport {ISwap} from \"../interfaces/ISwap.sol\";\nimport {IOptionsPurchaseQueue} from \"../interfaces/IOptionsPurchaseQueue.sol\";\nimport {SupportsNonCompliantERC20} from \"./SupportsNonCompliantERC20.sol\";\nimport {IOptionsPremiumPricer} from \"../interfaces/IRibbon.sol\";\n\nlibrary VaultLifecycleWithSwap {\n    using SafeMath for uint256;\n    using SupportsNonCompliantERC20 for IERC20;\n    using SafeERC20 for IERC20;\n\n    struct CommitParams {\n        address OTOKEN_FACTORY;\n        address USDC;\n        address collateralAsset;\n        address currentOption;\n        uint256 delay;\n        uint16 lastStrikeOverrideRound;\n        uint256 overriddenStrikePrice;\n        address strikeSelection;\n        address optionsPremiumPricer;\n    }\n\n    /**\n     * @notice Sets the next option the vault will be shorting, and calculates its premium for the auction\n     * @param commitParams is the struct with details on previous option and strike selection details\n     * @param vaultParams is the struct with vault general data\n     * @param vaultState is the struct with vault accounting state\n     * @return otokenAddress is the address of the new option\n     * @return strikePrice is the strike price of the new option\n     * @return delta is the delta of the new option\n     */\n    function commitNextOption(\n        CommitParams calldata commitParams,\n        Vault.VaultParams storage vaultParams,\n        Vault.VaultState storage vaultState\n    )\n        external\n        returns (\n            address otokenAddress,\n            uint256 strikePrice,\n            uint256 delta\n        )\n    {\n        uint256 expiry = getNextExpiry(commitParams.currentOption);\n\n        IStrikeSelection selection =\n            IStrikeSelection(commitParams.strikeSelection);\n\n        bool isPut = vaultParams.isPut;\n        address underlying = vaultParams.underlying;\n\n        (strikePrice, delta) = commitParams.lastStrikeOverrideRound ==\n            vaultState.round\n            ? (commitParams.overriddenStrikePrice, selection.delta())\n            : selection.getStrikePrice(expiry, isPut);\n\n        require(strikePrice != 0, \"!strikePrice\");\n\n        // retrieve address if option already exists, or deploy it\n        otokenAddress = getOrDeployOtoken(\n            commitParams,\n            vaultParams,\n            underlying,\n            strikePrice,\n            expiry,\n            isPut\n        );\n\n        return (otokenAddress, strikePrice, delta);\n    }\n\n    /**\n     * @notice Verify the otoken has the correct parameters to prevent vulnerability to opyn contract changes\n     * @param otokenAddress is the address of the otoken\n     * @param vaultParams is the struct with vault general data\n     * @param collateralAsset is the address of the collateral asset\n     * @param USDC is the address of usdc\n     * @param delay is the delay between commitAndClose and rollToNextOption\n     */\n    function verifyOtoken(\n        address otokenAddress,\n        Vault.VaultParams storage vaultParams,\n        address collateralAsset,\n        address USDC,\n        uint256 delay\n    ) private view {\n        require(otokenAddress != address(0), \"!otokenAddress\");\n\n        IOtoken otoken = IOtoken(otokenAddress);\n        require(otoken.isPut() == vaultParams.isPut, \"Type mismatch\");\n        require(\n            otoken.underlyingAsset() == vaultParams.underlying,\n            \"Wrong underlyingAsset\"\n        );\n        require(\n            otoken.collateralAsset() == collateralAsset,\n            \"Wrong collateralAsset\"\n        );\n\n        // we just assume all options use USDC as the strike\n        require(otoken.strikeAsset() == USDC, \"strikeAsset != USDC\");\n\n        uint256 readyAt = block.timestamp.add(delay);\n        require(otoken.expiryTimestamp() >= readyAt, \"Expiry before delay\");\n    }\n\n    /**\n     * @param decimals is the decimals of the asset\n     * @param totalBalance is the vault's total asset balance\n     * @param currentShareSupply is the supply of the shares invoked with totalSupply()\n     * @param lastQueuedWithdrawAmount is the amount queued for withdrawals from last round\n     * @param performanceFee is the perf fee percent to charge on premiums\n     * @param managementFee is the management fee percent to charge on the AUM\n     */\n    struct CloseParams {\n        uint256 decimals;\n        uint256 totalBalance;\n        uint256 currentShareSupply;\n        uint256 lastQueuedWithdrawAmount;\n        uint256 performanceFee;\n        uint256 managementFee;\n        uint256 currentQueuedWithdrawShares;\n    }\n\n    /**\n     * @notice Calculate the shares to mint, new price per share, and\n      amount of funds to re-allocate as collateral for the new round\n     * @param vaultState is the storage variable vaultState passed from RibbonVault\n     * @param params is the rollover parameters passed to compute the next state\n     * @return newLockedAmount is the amount of funds to allocate for the new round\n     * @return queuedWithdrawAmount is the amount of funds set aside for withdrawal\n     * @return newPricePerShare is the price per share of the new round\n     * @return mintShares is the amount of shares to mint from deposits\n     * @return performanceFeeInAsset is the performance fee charged by vault\n     * @return totalVaultFee is the total amount of fee charged by vault\n     */\n    function closeRound(\n        Vault.VaultState storage vaultState,\n        CloseParams calldata params\n    )\n        external\n        view\n        returns (\n            uint256 newLockedAmount,\n            uint256 queuedWithdrawAmount,\n            uint256 newPricePerShare,\n            uint256 mintShares,\n            uint256 performanceFeeInAsset,\n            uint256 totalVaultFee\n        )\n    {\n        uint256 currentBalance = params.totalBalance;\n        uint256 pendingAmount = vaultState.totalPending;\n        // Total amount of queued withdrawal shares from previous rounds (doesn't include the current round)\n        uint256 lastQueuedWithdrawShares = vaultState.queuedWithdrawShares;\n\n        // Deduct older queued withdraws so we don't charge fees on them\n        uint256 balanceForVaultFees =\n            currentBalance.sub(params.lastQueuedWithdrawAmount);\n\n        {\n            (performanceFeeInAsset, , totalVaultFee) = getVaultFees(\n                balanceForVaultFees,\n                vaultState.lastLockedAmount,\n                vaultState.totalPending,\n                params.performanceFee,\n                params.managementFee\n            );\n        }\n\n        // Take into account the fee\n        // so we can calculate the newPricePerShare\n        currentBalance = currentBalance.sub(totalVaultFee);\n\n        {\n            newPricePerShare = ShareMath.pricePerShare(\n                params.currentShareSupply.sub(lastQueuedWithdrawShares),\n                currentBalance.sub(params.lastQueuedWithdrawAmount),\n                pendingAmount,\n                params.decimals\n            );\n\n            queuedWithdrawAmount = params.lastQueuedWithdrawAmount.add(\n                ShareMath.sharesToAsset(\n                    params.currentQueuedWithdrawShares,\n                    newPricePerShare,\n                    params.decimals\n                )\n            );\n\n            // After closing the short, if the options expire in-the-money\n            // vault pricePerShare would go down because vault's asset balance decreased.\n            // This ensures that the newly-minted shares do not take on the loss.\n            mintShares = ShareMath.assetToShares(\n                pendingAmount,\n                newPricePerShare,\n                params.decimals\n            );\n        }\n\n        return (\n            currentBalance.sub(queuedWithdrawAmount), // new locked balance subtracts the queued withdrawals\n            queuedWithdrawAmount,\n            newPricePerShare,\n            mintShares,\n            performanceFeeInAsset,\n            totalVaultFee\n        );\n    }\n\n    /**\n     * @notice Creates the actual Opyn short position by depositing collateral and minting otokens\n     * @param gammaController is the address of the opyn controller contract\n     * @param marginPool is the address of the opyn margin contract which holds the collateral\n     * @param oTokenAddress is the address of the otoken to mint\n     * @param depositAmount is the amount of collateral to deposit\n     * @return the otoken mint amount\n     */\n    function createShort(\n        address gammaController,\n        address marginPool,\n        address oTokenAddress,\n        uint256 depositAmount\n    ) external returns (uint256) {\n        IController controller = IController(gammaController);\n        uint256 newVaultID =\n            (controller.getAccountVaultCounter(address(this))).add(1);\n\n        // An otoken's collateralAsset is the vault's `asset`\n        // So in the context of performing Opyn short operations we call them collateralAsset\n        IOtoken oToken = IOtoken(oTokenAddress);\n        address collateralAsset = oToken.collateralAsset();\n\n        uint256 collateralDecimals =\n            uint256(IERC20Detailed(collateralAsset).decimals());\n        uint256 mintAmount;\n\n        if (oToken.isPut()) {\n            // For minting puts, there will be instances where the full depositAmount will not be used for minting.\n            // This is because of an issue with precision.\n            //\n            // For ETH put options, we are calculating the mintAmount (10**8 decimals) using\n            // the depositAmount (10**18 decimals), which will result in truncation of decimals when scaling down.\n            // As a result, there will be tiny amounts of dust left behind in the Opyn vault when minting put otokens.\n            //\n            // For simplicity's sake, we do not refund the dust back to the address(this) on minting otokens.\n            // We retain the dust in the vault so the calling contract can withdraw the\n            // actual locked amount + dust at settlement.\n            //\n            // To test this behavior, we can console.log\n            // MarginCalculatorInterface(0x7A48d10f372b3D7c60f6c9770B91398e4ccfd3C7).getExcessCollateral(vault)\n            // to see how much dust (or excess collateral) is left behind.\n            mintAmount = depositAmount\n                .mul(10**Vault.OTOKEN_DECIMALS)\n                .mul(10**18) // we use 10**18 to give extra precision\n                .div(oToken.strikePrice().mul(10**(10 + collateralDecimals)));\n        } else {\n            mintAmount = depositAmount;\n\n            if (collateralDecimals > 8) {\n                uint256 scaleBy = 10**(collateralDecimals.sub(8)); // oTokens have 8 decimals\n                if (mintAmount > scaleBy) {\n                    mintAmount = depositAmount.div(scaleBy); // scale down from 10**18 to 10**8\n                }\n            }\n        }\n\n        // double approve to fix non-compliant ERC20s\n        IERC20 collateralToken = IERC20(collateralAsset);\n        collateralToken.safeApproveNonCompliant(marginPool, depositAmount);\n\n        IController.ActionArgs[] memory actions =\n            new IController.ActionArgs[](3);\n\n        actions[0] = IController.ActionArgs(\n            IController.ActionType.OpenVault,\n            address(this), // owner\n            address(this), // receiver\n            address(0), // asset, otoken\n            newVaultID, // vaultId\n            0, // amount\n            0, //index\n            \"\" //data\n        );\n\n        actions[1] = IController.ActionArgs(\n            IController.ActionType.DepositCollateral,\n            address(this), // owner\n            address(this), // address to transfer from\n            collateralAsset, // deposited asset\n            newVaultID, // vaultId\n            depositAmount, // amount\n            0, //index\n            \"\" //data\n        );\n\n        actions[2] = IController.ActionArgs(\n            IController.ActionType.MintShortOption,\n            address(this), // owner\n            address(this), // address to transfer to\n            oTokenAddress, // option address\n            newVaultID, // vaultId\n            mintAmount, // amount\n            0, //index\n            \"\" //data\n        );\n\n        controller.operate(actions);\n\n        return mintAmount;\n    }\n\n    /**\n     * @notice Close the existing short otoken position. Currently this implementation is simple.\n     * It closes the most recent vault opened by the contract. This assumes that the contract will\n     * only have a single vault open at any given time. Since calling `_closeShort` deletes vaults by\n     calling SettleVault action, this assumption should hold.\n     * @param gammaController is the address of the opyn controller contract\n     * @return amount of collateral redeemed from the vault\n     */\n    function settleShort(address gammaController) external returns (uint256) {\n        IController controller = IController(gammaController);\n\n        // gets the currently active vault ID\n        uint256 vaultID = controller.getAccountVaultCounter(address(this));\n\n        GammaTypes.Vault memory vault =\n            controller.getVault(address(this), vaultID);\n\n        require(vault.shortOtokens.length > 0, \"No short\");\n\n        // An otoken's collateralAsset is the vault's `asset`\n        // So in the context of performing Opyn short operations we call them collateralAsset\n        IERC20 collateralToken = IERC20(vault.collateralAssets[0]);\n\n        // The short position has been previously closed, or all the otokens have been burned.\n        // So we return early.\n        if (address(collateralToken) == address(0)) {\n            return 0;\n        }\n\n        // This is equivalent to doing IERC20(vault.asset).balanceOf(address(this))\n        uint256 startCollateralBalance =\n            collateralToken.balanceOf(address(this));\n\n        // If it is after expiry, we need to settle the short position using the normal way\n        // Delete the vault and withdraw all remaining collateral from the vault\n        IController.ActionArgs[] memory actions =\n            new IController.ActionArgs[](1);\n\n        actions[0] = IController.ActionArgs(\n            IController.ActionType.SettleVault,\n            address(this), // owner\n            address(this), // address to transfer to\n            address(0), // not used\n            vaultID, // vaultId\n            0, // not used\n            0, // not used\n            \"\" // not used\n        );\n\n        controller.operate(actions);\n\n        uint256 endCollateralBalance = collateralToken.balanceOf(address(this));\n\n        return endCollateralBalance.sub(startCollateralBalance);\n    }\n\n    /**\n     * @notice Exercises the ITM option using existing long otoken position. Currently this implementation is simple.\n     * It calls the `Redeem` action to claim the payout.\n     * @param gammaController is the address of the opyn controller contract\n     * @param oldOption is the address of the old option\n     * @param asset is the address of the vault's asset\n     * @return amount of asset received by exercising the option\n     */\n    function settleLong(\n        address gammaController,\n        address oldOption,\n        address asset\n    ) external returns (uint256) {\n        IController controller = IController(gammaController);\n\n        uint256 oldOptionBalance = IERC20(oldOption).balanceOf(address(this));\n\n        if (controller.getPayout(oldOption, oldOptionBalance) == 0) {\n            return 0;\n        }\n\n        uint256 startAssetBalance = IERC20(asset).balanceOf(address(this));\n\n        // If it is after expiry, we need to redeem the profits\n        IController.ActionArgs[] memory actions =\n            new IController.ActionArgs[](1);\n\n        actions[0] = IController.ActionArgs(\n            IController.ActionType.Redeem,\n            address(0), // not used\n            address(this), // address to send profits to\n            oldOption, // address of otoken\n            0, // not used\n            oldOptionBalance, // otoken balance\n            0, // not used\n            \"\" // not used\n        );\n\n        controller.operate(actions);\n\n        uint256 endAssetBalance = IERC20(asset).balanceOf(address(this));\n\n        return endAssetBalance.sub(startAssetBalance);\n    }\n\n    /**\n     * @notice Burn the remaining oTokens left over from auction. Currently this implementation is simple.\n     * It burns oTokens from the most recent vault opened by the contract. This assumes that the contract will\n     * only have a single vault open at any given time.\n     * @param gammaController is the address of the opyn controller contract\n     * @param currentOption is the address of the current option\n     * @return amount of collateral redeemed by burning otokens\n     */\n    function burnOtokens(address gammaController, address currentOption)\n        external\n        returns (uint256)\n    {\n        uint256 numOTokensToBurn =\n            IERC20(currentOption).balanceOf(address(this));\n\n        require(numOTokensToBurn > 0, \"No oTokens to burn\");\n\n        IController controller = IController(gammaController);\n\n        // gets the currently active vault ID\n        uint256 vaultID = controller.getAccountVaultCounter(address(this));\n\n        GammaTypes.Vault memory vault =\n            controller.getVault(address(this), vaultID);\n\n        require(vault.shortOtokens.length > 0, \"No short\");\n\n        IERC20 collateralToken = IERC20(vault.collateralAssets[0]);\n\n        uint256 startCollateralBalance =\n            collateralToken.balanceOf(address(this));\n\n        // Burning `amount` of oTokens from the ribbon vault,\n        // then withdrawing the corresponding collateral amount from the vault\n        IController.ActionArgs[] memory actions =\n            new IController.ActionArgs[](2);\n\n        actions[0] = IController.ActionArgs(\n            IController.ActionType.BurnShortOption,\n            address(this), // owner\n            address(this), // address to transfer from\n            address(vault.shortOtokens[0]), // otoken address\n            vaultID, // vaultId\n            numOTokensToBurn, // amount\n            0, //index\n            \"\" //data\n        );\n\n        actions[1] = IController.ActionArgs(\n            IController.ActionType.WithdrawCollateral,\n            address(this), // owner\n            address(this), // address to transfer to\n            address(collateralToken), // withdrawn asset\n            vaultID, // vaultId\n            vault.collateralAmounts[0].mul(numOTokensToBurn).div(\n                vault.shortAmounts[0]\n            ), // amount\n            0, //index\n            \"\" //data\n        );\n\n        controller.operate(actions);\n\n        uint256 endCollateralBalance = collateralToken.balanceOf(address(this));\n\n        return endCollateralBalance.sub(startCollateralBalance);\n    }\n\n    /**\n     * @notice Calculates the performance and management fee for this week's round\n     * @param currentBalance is the balance of funds held on the vault after closing short\n     * @param lastLockedAmount is the amount of funds locked from the previous round\n     * @param pendingAmount is the pending deposit amount\n     * @param performanceFeePercent is the performance fee pct.\n     * @param managementFeePercent is the management fee pct.\n     * @return performanceFeeInAsset is the performance fee\n     * @return managementFeeInAsset is the management fee\n     * @return vaultFee is the total fees\n     */\n    function getVaultFees(\n        uint256 currentBalance,\n        uint256 lastLockedAmount,\n        uint256 pendingAmount,\n        uint256 performanceFeePercent,\n        uint256 managementFeePercent\n    )\n        internal\n        pure\n        returns (\n            uint256 performanceFeeInAsset,\n            uint256 managementFeeInAsset,\n            uint256 vaultFee\n        )\n    {\n        // At the first round, currentBalance=0, pendingAmount>0\n        // so we just do not charge anything on the first round\n        uint256 lockedBalanceSansPending =\n            currentBalance > pendingAmount\n                ? currentBalance.sub(pendingAmount)\n                : 0;\n\n        uint256 _performanceFeeInAsset;\n        uint256 _managementFeeInAsset;\n        uint256 _vaultFee;\n\n        // Take performance fee and management fee ONLY if difference between\n        // last week and this week's vault deposits, taking into account pending\n        // deposits and withdrawals, is positive. If it is negative, last week's\n        // option expired ITM past breakeven, and the vault took a loss so we\n        // do not collect performance fee for last week\n        if (lockedBalanceSansPending > lastLockedAmount) {\n            _performanceFeeInAsset = performanceFeePercent > 0\n                ? lockedBalanceSansPending\n                    .sub(lastLockedAmount)\n                    .mul(performanceFeePercent)\n                    .div(100 * Vault.FEE_MULTIPLIER)\n                : 0;\n            _managementFeeInAsset = managementFeePercent > 0\n                ? lockedBalanceSansPending.mul(managementFeePercent).div(\n                    100 * Vault.FEE_MULTIPLIER\n                )\n                : 0;\n\n            _vaultFee = _performanceFeeInAsset.add(_managementFeeInAsset);\n        }\n\n        return (_performanceFeeInAsset, _managementFeeInAsset, _vaultFee);\n    }\n\n    /**\n     * @notice Either retrieves the option token if it already exists, or deploy it\n     * @param commitParams is the struct with details on previous option and strike selection details\n     * @param vaultParams is the struct with vault general data\n     * @param underlying is the address of the underlying asset of the option\n     * @param strikePrice is the strike price of the option\n     * @param expiry is the expiry timestamp of the option\n     * @param isPut is whether the option is a put\n     * @return the address of the option\n     */\n    function getOrDeployOtoken(\n        CommitParams calldata commitParams,\n        Vault.VaultParams storage vaultParams,\n        address underlying,\n        uint256 strikePrice,\n        uint256 expiry,\n        bool isPut\n    ) internal returns (address) {\n        IOtokenFactory factory = IOtokenFactory(commitParams.OTOKEN_FACTORY);\n\n        address otokenFromFactory =\n            factory.getOtoken(\n                underlying,\n                commitParams.USDC,\n                commitParams.collateralAsset,\n                strikePrice,\n                expiry,\n                isPut\n            );\n\n        if (otokenFromFactory != address(0)) {\n            return otokenFromFactory;\n        }\n\n        address otoken =\n            factory.createOtoken(\n                underlying,\n                commitParams.USDC,\n                commitParams.collateralAsset,\n                strikePrice,\n                expiry,\n                isPut\n            );\n\n        verifyOtoken(\n            otoken,\n            vaultParams,\n            commitParams.collateralAsset,\n            commitParams.USDC,\n            commitParams.delay\n        );\n\n        return otoken;\n    }\n\n    /**\n     * @notice Creates an offer in the Swap Contract\n     * @param currentOtoken is the current otoken address\n     * @param currOtokenPremium is premium for each otoken\n     * @param swapContract the address of the swap contract\n     * @param vaultParams is the struct with vault general data\n     * @return optionAuctionID auction id of the newly created offer\n     */\n    function createOffer(\n        address currentOtoken,\n        uint256 currOtokenPremium,\n        address swapContract,\n        Vault.VaultParams storage vaultParams\n    ) external returns (uint256 optionAuctionID) {\n        require(\n            currOtokenPremium <= type(uint96).max,\n            \"currentOtokenPremium > type(uint96) max value!\"\n        );\n        require(currOtokenPremium > 0, \"!currentOtokenPremium\");\n\n        uint256 oTokenBalance = IERC20(currentOtoken).balanceOf(address(this));\n        require(\n            oTokenBalance <= type(uint128).max,\n            \"oTokenBalance > type(uint128) max value!\"\n        );\n\n        // Use safeIncrease instead of safeApproval because safeApproval is only used for initial\n        // approval and cannot be called again. Using safeIncrease allow us to call _createOffer\n        // even when we are approving the same oTokens we have used before. This might happen if\n        // we accidentally burn the oTokens before settlement.\n        uint256 allowance =\n            IERC20(currentOtoken).allowance(address(this), swapContract);\n\n        if (allowance < oTokenBalance) {\n            IERC20(currentOtoken).safeIncreaseAllowance(\n                swapContract,\n                oTokenBalance.sub(allowance)\n            );\n        }\n\n        uint256 decimals = vaultParams.decimals;\n\n        // If total size is larger than 1, set minimum bid as 1\n        // Otherwise, set minimum bid to one tenth the total size\n        uint256 minBidSize =\n            oTokenBalance > 10**decimals ? 10**decimals : oTokenBalance.div(10);\n\n        require(\n            minBidSize <= type(uint96).max,\n            \"minBidSize > type(uint96) max value!\"\n        );\n\n        currOtokenPremium = decimals > 18\n            ? currOtokenPremium.mul(10**(decimals.sub(18)))\n            : currOtokenPremium.div(10**(uint256(18).sub(decimals)));\n\n        optionAuctionID = ISwap(swapContract).createOffer(\n            currentOtoken,\n            vaultParams.asset,\n            uint96(currOtokenPremium),\n            uint96(minBidSize),\n            uint128(oTokenBalance)\n        );\n    }\n\n    /**\n     * @notice Allocates the vault's minted options to the OptionsPurchaseQueue contract\n     * @dev Skipped if the optionsPurchaseQueue doesn't exist\n     * @param optionsPurchaseQueue is the OptionsPurchaseQueue contract\n     * @param option is the minted option\n     * @param optionsAmount is the amount of options minted\n     * @param optionAllocation is the maximum % of options to allocate towards the purchase queue (will only allocate\n     *  up to the amount that is on the queue)\n     * @return allocatedOptions is the amount of options that ended up getting allocated to the OptionsPurchaseQueue\n     */\n    function allocateOptions(\n        address optionsPurchaseQueue,\n        address option,\n        uint256 optionsAmount,\n        uint256 optionAllocation\n    ) external returns (uint256 allocatedOptions) {\n        // Skip if optionsPurchaseQueue is address(0)\n        if (optionsPurchaseQueue != address(0)) {\n            allocatedOptions = optionsAmount.mul(optionAllocation).div(\n                100 * Vault.OPTION_ALLOCATION_MULTIPLIER\n            );\n            allocatedOptions = IOptionsPurchaseQueue(optionsPurchaseQueue)\n                .getOptionsAllocation(address(this), allocatedOptions);\n\n            if (allocatedOptions != 0) {\n                IERC20(option).approve(optionsPurchaseQueue, allocatedOptions);\n                IOptionsPurchaseQueue(optionsPurchaseQueue).allocateOptions(\n                    allocatedOptions\n                );\n            }\n        }\n\n        return allocatedOptions;\n    }\n\n    /**\n     * @notice Sell the allocated options to the purchase queue post auction settlement\n     * @dev Reverts if the auction hasn't settled yet\n     * @param optionsPurchaseQueue is the OptionsPurchaseQueue contract\n     * @param swapContract The address of the swap settlement contract\n     * @return totalPremiums Total premiums earnt by the vault\n     */\n    function sellOptionsToQueue(\n        address optionsPurchaseQueue,\n        address swapContract,\n        uint256 optionAuctionID\n    ) external returns (uint256) {\n        uint256 settlementPrice =\n            getAuctionSettlementPrice(swapContract, optionAuctionID);\n        require(settlementPrice != 0, \"!settlementPrice\");\n\n        return\n            IOptionsPurchaseQueue(optionsPurchaseQueue).sellToBuyers(\n                settlementPrice\n            );\n    }\n\n    /**\n     * @notice Gets the settlement price of a settled auction\n     * @param swapContract The address of the swap settlement contract\n     * @param optionAuctionID is the offer ID\n     * @return settlementPrice Auction settlement price\n     */\n    function getAuctionSettlementPrice(\n        address swapContract,\n        uint256 optionAuctionID\n    ) public view returns (uint256) {\n        return ISwap(swapContract).averagePriceForOffer(optionAuctionID);\n    }\n\n    /**\n     * @notice Verify the constructor params satisfy requirements\n     * @param owner is the owner of the vault with critical permissions\n     * @param feeRecipient is the address to recieve vault performance and management fees\n     * @param performanceFee is the perfomance fee pct.\n     * @param tokenName is the name of the token\n     * @param tokenSymbol is the symbol of the token\n     * @param _vaultParams is the struct with vault general data\n     */\n    function verifyInitializerParams(\n        address owner,\n        address keeper,\n        address feeRecipient,\n        uint256 performanceFee,\n        uint256 managementFee,\n        string calldata tokenName,\n        string calldata tokenSymbol,\n        Vault.VaultParams calldata _vaultParams\n    ) external pure {\n        require(owner != address(0), \"!owner\");\n        require(keeper != address(0), \"!keeper\");\n        require(feeRecipient != address(0), \"!feeRecipient\");\n        require(\n            performanceFee < 100 * Vault.FEE_MULTIPLIER,\n            \"performanceFee >= 100%\"\n        );\n        require(\n            managementFee < 100 * Vault.FEE_MULTIPLIER,\n            \"managementFee >= 100%\"\n        );\n        require(bytes(tokenName).length > 0, \"!tokenName\");\n        require(bytes(tokenSymbol).length > 0, \"!tokenSymbol\");\n\n        require(_vaultParams.asset != address(0), \"!asset\");\n        require(_vaultParams.underlying != address(0), \"!underlying\");\n        require(_vaultParams.minimumSupply > 0, \"!minimumSupply\");\n        require(_vaultParams.cap > 0, \"!cap\");\n        require(\n            _vaultParams.cap > _vaultParams.minimumSupply,\n            \"cap has to be higher than minimumSupply\"\n        );\n    }\n\n    /**\n     * @notice Gets the next option expiry timestamp\n     * @param currentOption is the otoken address that the vault is currently writing\n     */\n    function getNextExpiry(address currentOption)\n        internal\n        view\n        returns (uint256)\n    {\n        // uninitialized state\n        if (currentOption == address(0)) {\n            return getNextFriday(block.timestamp);\n        }\n        uint256 currentExpiry = IOtoken(currentOption).expiryTimestamp();\n\n        // After options expiry if no options are written for >1 week\n        // We need to give the ability continue writing options\n        if (block.timestamp > currentExpiry + 7 days) {\n            return getNextFriday(block.timestamp);\n        }\n        return getNextFriday(currentExpiry);\n    }\n\n    /**\n     * @notice Gets the next options expiry timestamp\n     * @param timestamp is the expiry timestamp of the current option\n     * Reference: https://codereview.stackexchange.com/a/33532\n     * Examples:\n     * getNextFriday(week 1 thursday) -> week 1 friday\n     * getNextFriday(week 1 friday) -> week 2 friday\n     * getNextFriday(week 1 saturday) -> week 2 friday\n     */\n    function getNextFriday(uint256 timestamp) internal pure returns (uint256) {\n        // dayOfWeek = 0 (sunday) - 6 (saturday)\n        uint256 dayOfWeek = ((timestamp / 1 days) + 4) % 7;\n        uint256 nextFriday = timestamp + ((7 + 5 - dayOfWeek) % 7) * 1 days;\n        uint256 friday8am = nextFriday - (nextFriday % (24 hours)) + (8 hours);\n\n        // If the passed timestamp is day=Friday hour>8am, we simply increment it by a week to next Friday\n        if (timestamp >= friday8am) {\n            friday8am += 7 days;\n        }\n        return friday8am;\n    }\n}\n"},"contracts/libraries/ShareMath.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity =0.8.4;\n\nimport {SafeMath} from \"@openzeppelin/contracts/utils/math/SafeMath.sol\";\nimport {Vault} from \"./Vault.sol\";\n\nlibrary ShareMath {\n    using SafeMath for uint256;\n\n    uint256 internal constant PLACEHOLDER_UINT = 1;\n\n    function assetToShares(\n        uint256 assetAmount,\n        uint256 assetPerShare,\n        uint256 decimals\n    ) internal pure returns (uint256) {\n        // If this throws, it means that vault's roundPricePerShare[currentRound] has not been set yet\n        // which should never happen.\n        // Has to be larger than 1 because `1` is used in `initRoundPricePerShares` to prevent cold writes.\n        require(assetPerShare > PLACEHOLDER_UINT, \"Invalid assetPerShare\");\n\n        return assetAmount.mul(10**decimals).div(assetPerShare);\n    }\n\n    function sharesToAsset(\n        uint256 shares,\n        uint256 assetPerShare,\n        uint256 decimals\n    ) internal pure returns (uint256) {\n        // If this throws, it means that vault's roundPricePerShare[currentRound] has not been set yet\n        // which should never happen.\n        // Has to be larger than 1 because `1` is used in `initRoundPricePerShares` to prevent cold writes.\n        require(assetPerShare > PLACEHOLDER_UINT, \"Invalid assetPerShare\");\n\n        return shares.mul(assetPerShare).div(10**decimals);\n    }\n\n    /**\n     * @notice Returns the shares unredeemed by the user given their DepositReceipt\n     * @param depositReceipt is the user's deposit receipt\n     * @param currentRound is the `round` stored on the vault\n     * @param assetPerShare is the price in asset per share\n     * @param decimals is the number of decimals the asset/shares use\n     * @return unredeemedShares is the user's virtual balance of shares that are owed\n     */\n    function getSharesFromReceipt(\n        Vault.DepositReceipt memory depositReceipt,\n        uint256 currentRound,\n        uint256 assetPerShare,\n        uint256 decimals\n    ) internal pure returns (uint256 unredeemedShares) {\n        if (depositReceipt.round > 0 && depositReceipt.round < currentRound) {\n            uint256 sharesFromRound =\n                assetToShares(depositReceipt.amount, assetPerShare, decimals);\n\n            return\n                uint256(depositReceipt.unredeemedShares).add(sharesFromRound);\n        }\n        return depositReceipt.unredeemedShares;\n    }\n\n    function pricePerShare(\n        uint256 totalSupply,\n        uint256 totalBalance,\n        uint256 pendingAmount,\n        uint256 decimals\n    ) internal pure returns (uint256) {\n        uint256 singleShare = 10**decimals;\n        return\n            totalSupply > 0\n                ? singleShare.mul(totalBalance.sub(pendingAmount)).div(\n                    totalSupply\n                )\n                : singleShare;\n    }\n\n    /************************************************\n     *  HELPERS\n     ***********************************************/\n\n    function assertUint104(uint256 num) internal pure {\n        require(num <= type(uint104).max, \"Overflow uint104\");\n    }\n\n    function assertUint128(uint256 num) internal pure {\n        require(num <= type(uint128).max, \"Overflow uint128\");\n    }\n}\n"},"contracts/interfaces/ILiquidityGauge.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity =0.8.4;\n\ninterface ILiquidityGauge {\n    function balanceOf(address) external view returns (uint256);\n\n    function deposit(\n        uint256 _value,\n        address _addr,\n        bool _claim_rewards\n    ) external;\n\n    function withdraw(uint256 _value) external;\n}\n"},"contracts/vaults/BaseVaultWithSwap/base/RibbonVault.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity =0.8.4;\n\nimport {SafeMath} from \"@openzeppelin/contracts/utils/math/SafeMath.sol\";\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport {\n    SafeERC20\n} from \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\nimport {\n    ReentrancyGuardUpgradeable\n} from \"@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol\";\nimport {\n    OwnableUpgradeable\n} from \"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\";\nimport {\n    ERC20Upgradeable\n} from \"@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol\";\n\nimport {Vault} from \"../../../libraries/Vault.sol\";\nimport {\n    VaultLifecycleWithSwap\n} from \"../../../libraries/VaultLifecycleWithSwap.sol\";\nimport {ShareMath} from \"../../../libraries/ShareMath.sol\";\nimport {IWETH} from \"../../../interfaces/IWETH.sol\";\n\ncontract RibbonVault is\n    ReentrancyGuardUpgradeable,\n    OwnableUpgradeable,\n    ERC20Upgradeable\n{\n    using SafeERC20 for IERC20;\n    using SafeMath for uint256;\n    using ShareMath for Vault.DepositReceipt;\n\n    /************************************************\n     *  NON UPGRADEABLE STORAGE\n     ***********************************************/\n\n    /// @notice Stores the user's pending deposit for the round\n    mapping(address => Vault.DepositReceipt) public depositReceipts;\n\n    /// @notice On every round's close, the pricePerShare value of an rTHETA token is stored\n    /// This is used to determine the number of shares to be returned\n    /// to a user with their DepositReceipt.depositAmount\n    mapping(uint256 => uint256) public roundPricePerShare;\n\n    /// @notice Stores pending user withdrawals\n    mapping(address => Vault.Withdrawal) public withdrawals;\n\n    /// @notice Vault's parameters like cap, decimals\n    Vault.VaultParams public vaultParams;\n\n    /// @notice Vault's lifecycle state like round and locked amounts\n    Vault.VaultState public vaultState;\n\n    /// @notice Vault's state of the options sold and the timelocked option\n    Vault.OptionState public optionState;\n\n    /// @notice Fee recipient for the performance and management fees\n    address public feeRecipient;\n\n    /// @notice role in charge of weekly vault operations such as rollToNextOption and burnRemainingOTokens\n    // no access to critical vault changes\n    address public keeper;\n\n    /// @notice Performance fee charged on premiums earned in rollToNextOption. Only charged when there is no loss.\n    uint256 public performanceFee;\n\n    /// @notice Management fee charged on entire AUM in rollToNextOption. Only charged when there is no loss.\n    uint256 public managementFee;\n\n    // Gap is left to avoid storage collisions. Though RibbonVault is not upgradeable, we add this as a safety measure.\n    uint256[30] private ____gap;\n\n    // *IMPORTANT* NO NEW STORAGE VARIABLES SHOULD BE ADDED HERE\n    // This is to prevent storage collisions. All storage variables should be appended to RibbonThetaVaultStorage\n    // or RibbonDeltaVaultStorage instead. Read this documentation to learn more:\n    // https://docs.openzeppelin.com/upgrades-plugins/1.x/writing-upgradeable#modifying-your-contracts\n\n    /************************************************\n     *  IMMUTABLES & CONSTANTS\n     ***********************************************/\n\n    /// @notice WETH9 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n    address public immutable WETH;\n\n    /// @notice USDC 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\n    address public immutable USDC;\n\n    /// @notice Deprecated: 15 minute timelock between commitAndClose and rollToNexOption.\n    uint256 public constant DELAY = 0;\n\n    /// @notice 7 day period between each options sale.\n    uint256 public constant PERIOD = 7 days;\n\n    // Number of weeks per year = 52.142857 weeks * FEE_MULTIPLIER = 52142857\n    // Dividing by weeks per year requires doing num.mul(FEE_MULTIPLIER).div(WEEKS_PER_YEAR)\n    uint256 private constant WEEKS_PER_YEAR = 52142857;\n\n    // GAMMA_CONTROLLER is the top-level contract in Gamma protocol\n    // which allows users to perform multiple actions on their vaults\n    // and positions https://github.com/opynfinance/GammaProtocol/blob/master/contracts/core/Controller.sol\n    address public immutable GAMMA_CONTROLLER;\n\n    // MARGIN_POOL is Gamma protocol's collateral pool.\n    // Needed to approve collateral.safeTransferFrom for minting otokens.\n    // https://github.com/opynfinance/GammaProtocol/blob/master/contracts/core/MarginPool.sol\n    address public immutable MARGIN_POOL;\n\n    // SWAP_CONTRACT is a contract for settling bids via signed messages\n    // https://github.com/ribbon-finance/ribbon-v2/blob/master/contracts/utils/Swap.sol\n    address public immutable SWAP_CONTRACT;\n\n    /************************************************\n     *  EVENTS\n     ***********************************************/\n\n    event Deposit(address indexed account, uint256 amount, uint256 round);\n\n    event InitiateWithdraw(\n        address indexed account,\n        uint256 shares,\n        uint256 round\n    );\n\n    event Redeem(address indexed account, uint256 share, uint256 round);\n\n    event ManagementFeeSet(uint256 managementFee, uint256 newManagementFee);\n\n    event PerformanceFeeSet(uint256 performanceFee, uint256 newPerformanceFee);\n\n    event CapSet(uint256 oldCap, uint256 newCap);\n\n    event Withdraw(address indexed account, uint256 amount, uint256 shares);\n\n    event CollectVaultFees(\n        uint256 performanceFee,\n        uint256 vaultFee,\n        uint256 round,\n        address indexed feeRecipient\n    );\n\n    /************************************************\n     *  CONSTRUCTOR & INITIALIZATION\n     ***********************************************/\n\n    /**\n     * @notice Initializes the contract with immutable variables\n     * @param _weth is the Wrapped Ether contract\n     * @param _usdc is the USDC contract\n     * @param _gammaController is the contract address for opyn actions\n     * @param _marginPool is the contract address for providing collateral to opyn\n     * @param _swapContract is the contract address that facilitates bids settlement\n     */\n    constructor(\n        address _weth,\n        address _usdc,\n        address _gammaController,\n        address _marginPool,\n        address _swapContract\n    ) {\n        require(_weth != address(0), \"!_weth\");\n        require(_usdc != address(0), \"!_usdc\");\n        require(_swapContract != address(0), \"!_swapContract\");\n        require(_gammaController != address(0), \"!_gammaController\");\n        require(_marginPool != address(0), \"!_marginPool\");\n\n        WETH = _weth;\n        USDC = _usdc;\n        GAMMA_CONTROLLER = _gammaController;\n        MARGIN_POOL = _marginPool;\n        SWAP_CONTRACT = _swapContract;\n    }\n\n    /**\n     * @notice Initializes the OptionVault contract with storage variables.\n     */\n    function baseInitialize(\n        address _owner,\n        address _keeper,\n        address _feeRecipient,\n        uint256 _managementFee,\n        uint256 _performanceFee,\n        string memory _tokenName,\n        string memory _tokenSymbol,\n        Vault.VaultParams calldata _vaultParams\n    ) internal initializer {\n        VaultLifecycleWithSwap.verifyInitializerParams(\n            _owner,\n            _keeper,\n            _feeRecipient,\n            _performanceFee,\n            _managementFee,\n            _tokenName,\n            _tokenSymbol,\n            _vaultParams\n        );\n\n        __ReentrancyGuard_init();\n        __ERC20_init(_tokenName, _tokenSymbol);\n        __Ownable_init();\n        transferOwnership(_owner);\n\n        keeper = _keeper;\n\n        feeRecipient = _feeRecipient;\n        performanceFee = _performanceFee;\n        managementFee = _managementFee.mul(Vault.FEE_MULTIPLIER).div(\n            WEEKS_PER_YEAR\n        );\n        vaultParams = _vaultParams;\n\n        uint256 assetBalance =\n            IERC20(vaultParams.asset).balanceOf(address(this));\n        ShareMath.assertUint104(assetBalance);\n        vaultState.lastLockedAmount = uint104(assetBalance);\n\n        vaultState.round = 1;\n    }\n\n    /**\n     * @dev Throws if called by any account other than the keeper.\n     */\n    modifier onlyKeeper() {\n        require(msg.sender == keeper, \"!keeper\");\n        _;\n    }\n\n    /************************************************\n     *  SETTERS\n     ***********************************************/\n\n    /**\n     * @notice Sets the new keeper\n     * @param newKeeper is the address of the new keeper\n     */\n    function setNewKeeper(address newKeeper) external onlyOwner {\n        require(newKeeper != address(0), \"!newKeeper\");\n        keeper = newKeeper;\n    }\n\n    /**\n     * @notice Sets the new fee recipient\n     * @param newFeeRecipient is the address of the new fee recipient\n     */\n    function setFeeRecipient(address newFeeRecipient) external onlyOwner {\n        require(newFeeRecipient != address(0), \"!newFeeRecipient\");\n        require(newFeeRecipient != feeRecipient, \"Must be new feeRecipient\");\n        feeRecipient = newFeeRecipient;\n    }\n\n    /**\n     * @notice Sets the management fee for the vault\n     * @param newManagementFee is the management fee (6 decimals). ex: 2 * 10 ** 6 = 2%\n     */\n    function setManagementFee(uint256 newManagementFee) external onlyOwner {\n        require(\n            newManagementFee < 100 * Vault.FEE_MULTIPLIER,\n            \"Invalid management fee\"\n        );\n\n        // We are dividing annualized management fee by num weeks in a year\n        uint256 tmpManagementFee =\n            newManagementFee.mul(Vault.FEE_MULTIPLIER).div(WEEKS_PER_YEAR);\n\n        emit ManagementFeeSet(managementFee, newManagementFee);\n\n        managementFee = tmpManagementFee;\n    }\n\n    /**\n     * @notice Sets the performance fee for the vault\n     * @param newPerformanceFee is the performance fee (6 decimals). ex: 20 * 10 ** 6 = 20%\n     */\n    function setPerformanceFee(uint256 newPerformanceFee) external onlyOwner {\n        require(\n            newPerformanceFee < 100 * Vault.FEE_MULTIPLIER,\n            \"Invalid performance fee\"\n        );\n\n        emit PerformanceFeeSet(performanceFee, newPerformanceFee);\n\n        performanceFee = newPerformanceFee;\n    }\n\n    /**\n     * @notice Sets a new cap for deposits\n     * @param newCap is the new cap for deposits\n     */\n    function setCap(uint256 newCap) external onlyOwner {\n        require(newCap > 0, \"!newCap\");\n        ShareMath.assertUint104(newCap);\n        emit CapSet(vaultParams.cap, newCap);\n        vaultParams.cap = uint104(newCap);\n    }\n\n    /************************************************\n     *  DEPOSIT & WITHDRAWALS\n     ***********************************************/\n\n    /**\n     * @notice Deposits ETH into the contract and mint vault shares. Reverts if the asset is not WETH.\n     */\n    function depositETH() external payable nonReentrant {\n        require(vaultParams.asset == WETH, \"!WETH\");\n        require(msg.value > 0, \"!value\");\n\n        _depositFor(msg.value, msg.sender);\n\n        IWETH(WETH).deposit{value: msg.value}();\n    }\n\n    /**\n     * @notice Deposits the `asset` from msg.sender.\n     * @param amount is the amount of `asset` to deposit\n     */\n    function deposit(uint256 amount) external nonReentrant {\n        require(amount > 0, \"!amount\");\n\n        _depositFor(amount, msg.sender);\n\n        // An approve() by the msg.sender is required beforehand\n        IERC20(vaultParams.asset).safeTransferFrom(\n            msg.sender,\n            address(this),\n            amount\n        );\n    }\n\n    /**\n     * @notice Deposits the `asset` from msg.sender added to `creditor`'s deposit.\n     * @notice Used for vault -> vault deposits on the user's behalf\n     * @param amount is the amount of `asset` to deposit\n     * @param creditor is the address that can claim/withdraw deposited amount\n     */\n    function depositFor(uint256 amount, address creditor)\n        external\n        nonReentrant\n    {\n        require(amount > 0, \"!amount\");\n        require(creditor != address(0));\n\n        _depositFor(amount, creditor);\n\n        // An approve() by the msg.sender is required beforehand\n        IERC20(vaultParams.asset).safeTransferFrom(\n            msg.sender,\n            address(this),\n            amount\n        );\n    }\n\n    /**\n     * @notice Mints the vault shares to the creditor\n     * @param amount is the amount of `asset` deposited\n     * @param creditor is the address to receieve the deposit\n     */\n    function _depositFor(uint256 amount, address creditor) private {\n        uint256 currentRound = vaultState.round;\n        uint256 totalWithDepositedAmount = totalBalance().add(amount);\n\n        require(totalWithDepositedAmount <= vaultParams.cap, \"Exceed cap\");\n        require(\n            totalWithDepositedAmount >= vaultParams.minimumSupply,\n            \"Insufficient balance\"\n        );\n\n        emit Deposit(creditor, amount, currentRound);\n\n        Vault.DepositReceipt memory depositReceipt = depositReceipts[creditor];\n\n        // If we have an unprocessed pending deposit from the previous rounds, we have to process it.\n        uint256 unredeemedShares =\n            depositReceipt.getSharesFromReceipt(\n                currentRound,\n                roundPricePerShare[depositReceipt.round],\n                vaultParams.decimals\n            );\n\n        uint256 depositAmount = amount;\n\n        // If we have a pending deposit in the current round, we add on to the pending deposit\n        if (currentRound == depositReceipt.round) {\n            uint256 newAmount = uint256(depositReceipt.amount).add(amount);\n            depositAmount = newAmount;\n        }\n\n        ShareMath.assertUint104(depositAmount);\n\n        depositReceipts[creditor] = Vault.DepositReceipt({\n            round: uint16(currentRound),\n            amount: uint104(depositAmount),\n            unredeemedShares: uint128(unredeemedShares)\n        });\n\n        uint256 newTotalPending = uint256(vaultState.totalPending).add(amount);\n        ShareMath.assertUint128(newTotalPending);\n\n        vaultState.totalPending = uint128(newTotalPending);\n    }\n\n    /**\n     * @notice Initiates a withdrawal that can be processed once the round completes\n     * @param numShares is the number of shares to withdraw\n     */\n    function _initiateWithdraw(uint256 numShares) internal {\n        require(numShares > 0, \"!numShares\");\n\n        // We do a max redeem before initiating a withdrawal\n        // But we check if they must first have unredeemed shares\n        if (\n            depositReceipts[msg.sender].amount > 0 ||\n            depositReceipts[msg.sender].unredeemedShares > 0\n        ) {\n            _redeem(0, true);\n        }\n\n        // This caches the `round` variable used in shareBalances\n        uint256 currentRound = vaultState.round;\n        Vault.Withdrawal storage withdrawal = withdrawals[msg.sender];\n\n        bool withdrawalIsSameRound = withdrawal.round == currentRound;\n\n        emit InitiateWithdraw(msg.sender, numShares, currentRound);\n\n        uint256 existingShares = uint256(withdrawal.shares);\n\n        uint256 withdrawalShares;\n        if (withdrawalIsSameRound) {\n            withdrawalShares = existingShares.add(numShares);\n        } else {\n            require(existingShares == 0, \"Existing withdraw\");\n            withdrawalShares = numShares;\n            withdrawals[msg.sender].round = uint16(currentRound);\n        }\n\n        ShareMath.assertUint128(withdrawalShares);\n        withdrawals[msg.sender].shares = uint128(withdrawalShares);\n\n        _transfer(msg.sender, address(this), numShares);\n    }\n\n    /**\n     * @notice Completes a scheduled withdrawal from a past round. Uses finalized pps for the round\n     * @return withdrawAmount the current withdrawal amount\n     */\n    function _completeWithdraw() internal returns (uint256) {\n        Vault.Withdrawal storage withdrawal = withdrawals[msg.sender];\n\n        uint256 withdrawalShares = withdrawal.shares;\n        uint256 withdrawalRound = withdrawal.round;\n\n        // This checks if there is a withdrawal\n        require(withdrawalShares > 0, \"Not initiated\");\n\n        require(withdrawalRound < vaultState.round, \"Round not closed\");\n\n        // We leave the round number as non-zero to save on gas for subsequent writes\n        withdrawals[msg.sender].shares = 0;\n        vaultState.queuedWithdrawShares = uint128(\n            uint256(vaultState.queuedWithdrawShares).sub(withdrawalShares)\n        );\n\n        uint256 withdrawAmount =\n            ShareMath.sharesToAsset(\n                withdrawalShares,\n                roundPricePerShare[withdrawalRound],\n                vaultParams.decimals\n            );\n\n        emit Withdraw(msg.sender, withdrawAmount, withdrawalShares);\n\n        _burn(address(this), withdrawalShares);\n\n        require(withdrawAmount > 0, \"!withdrawAmount\");\n        transferAsset(msg.sender, withdrawAmount);\n\n        return withdrawAmount;\n    }\n\n    /**\n     * @notice Redeems shares that are owed to the account\n     * @param numShares is the number of shares to redeem\n     */\n    function redeem(uint256 numShares) external nonReentrant {\n        require(numShares > 0, \"!numShares\");\n        _redeem(numShares, false);\n    }\n\n    /**\n     * @notice Redeems the entire unredeemedShares balance that is owed to the account\n     */\n    function maxRedeem() external nonReentrant {\n        _redeem(0, true);\n    }\n\n    /**\n     * @notice Redeems shares that are owed to the account\n     * @param numShares is the number of shares to redeem, could be 0 when isMax=true\n     * @param isMax is flag for when callers do a max redemption\n     */\n    function _redeem(uint256 numShares, bool isMax) internal {\n        Vault.DepositReceipt memory depositReceipt =\n            depositReceipts[msg.sender];\n\n        // This handles the null case when depositReceipt.round = 0\n        // Because we start with round = 1 at `initialize`\n        uint256 currentRound = vaultState.round;\n\n        uint256 unredeemedShares =\n            depositReceipt.getSharesFromReceipt(\n                currentRound,\n                roundPricePerShare[depositReceipt.round],\n                vaultParams.decimals\n            );\n\n        numShares = isMax ? unredeemedShares : numShares;\n        if (numShares == 0) {\n            return;\n        }\n        require(numShares <= unredeemedShares, \"Exceeds available\");\n\n        // If we have a depositReceipt on the same round, BUT we have some unredeemed shares\n        // we debit from the unredeemedShares, but leave the amount field intact\n        // If the round has past, with no new deposits, we just zero it out for new deposits.\n        if (depositReceipt.round < currentRound) {\n            depositReceipts[msg.sender].amount = 0;\n        }\n\n        ShareMath.assertUint128(numShares);\n        depositReceipts[msg.sender].unredeemedShares = uint128(\n            unredeemedShares.sub(numShares)\n        );\n\n        emit Redeem(msg.sender, numShares, depositReceipt.round);\n\n        _transfer(address(this), msg.sender, numShares);\n    }\n\n    /************************************************\n     *  VAULT OPERATIONS\n     ***********************************************/\n\n    /**\n     * @notice Helper function that helps to save gas for writing values into the roundPricePerShare map.\n     *         Writing `1` into the map makes subsequent writes warm, reducing the gas from 20k to 5k.\n     *         Having 1 initialized beforehand will not be an issue as long as we round down share calculations to 0.\n     * @param numRounds is the number of rounds to initialize in the map\n     */\n    function initRounds(uint256 numRounds) external nonReentrant {\n        require(numRounds > 0, \"!numRounds\");\n\n        uint256 _round = vaultState.round;\n        for (uint256 i = 0; i < numRounds; i++) {\n            uint256 index = _round + i;\n            require(roundPricePerShare[index] == 0, \"Initialized\"); // AVOID OVERWRITING ACTUAL VALUES\n            roundPricePerShare[index] = ShareMath.PLACEHOLDER_UINT;\n        }\n    }\n\n    /**\n     * @notice Helper function that performs most administrative tasks\n     * such as minting new shares, getting vault fees, etc.\n     * @param lastQueuedWithdrawAmount is old queued withdraw amount\n     * @param currentQueuedWithdrawShares is the queued withdraw shares for the current round\n     * @return lockedBalance is the new balance used to calculate next option purchase size or collateral size\n     * @return queuedWithdrawAmount is the new queued withdraw amount for this round\n     */\n    function _closeRound(\n        uint256 lastQueuedWithdrawAmount,\n        uint256 currentQueuedWithdrawShares\n    ) internal returns (uint256 lockedBalance, uint256 queuedWithdrawAmount) {\n        address recipient = feeRecipient;\n        uint256 mintShares;\n        uint256 performanceFeeInAsset;\n        uint256 totalVaultFee;\n        {\n            uint256 newPricePerShare;\n            (\n                lockedBalance,\n                queuedWithdrawAmount,\n                newPricePerShare,\n                mintShares,\n                performanceFeeInAsset,\n                totalVaultFee\n            ) = VaultLifecycleWithSwap.closeRound(\n                vaultState,\n                VaultLifecycleWithSwap.CloseParams(\n                    vaultParams.decimals,\n                    IERC20(vaultParams.asset).balanceOf(address(this)),\n                    totalSupply(),\n                    lastQueuedWithdrawAmount,\n                    performanceFee,\n                    managementFee,\n                    currentQueuedWithdrawShares\n                )\n            );\n\n            // Finalize the pricePerShare at the end of the round\n            uint256 currentRound = vaultState.round;\n            roundPricePerShare[currentRound] = newPricePerShare;\n\n            emit CollectVaultFees(\n                performanceFeeInAsset,\n                totalVaultFee,\n                currentRound,\n                recipient\n            );\n\n            vaultState.totalPending = 0;\n            vaultState.round = uint16(currentRound + 1);\n        }\n\n        _mint(address(this), mintShares);\n\n        if (totalVaultFee > 0) {\n            transferAsset(payable(recipient), totalVaultFee);\n        }\n\n        return (lockedBalance, queuedWithdrawAmount);\n    }\n\n    /**\n     * @notice Helper function to make either an ETH transfer or ERC20 transfer\n     * @param recipient is the receiving address\n     * @param amount is the transfer amount\n     */\n    function transferAsset(address recipient, uint256 amount) internal {\n        address asset = vaultParams.asset;\n        if (asset == WETH) {\n            IWETH(WETH).withdraw(amount);\n            (bool success, ) = recipient.call{value: amount}(\"\");\n            require(success, \"Transfer failed\");\n            return;\n        }\n        IERC20(asset).safeTransfer(recipient, amount);\n    }\n\n    /************************************************\n     *  GETTERS\n     ***********************************************/\n\n    /**\n     * @notice Returns the asset balance held on the vault for the account\n     * @param account is the address to lookup balance for\n     * @return the amount of `asset` custodied by the vault for the user\n     */\n    function accountVaultBalance(address account)\n        external\n        view\n        returns (uint256)\n    {\n        uint256 _decimals = vaultParams.decimals;\n        uint256 assetPerShare =\n            ShareMath.pricePerShare(\n                totalSupply(),\n                totalBalance(),\n                vaultState.totalPending,\n                _decimals\n            );\n        return\n            ShareMath.sharesToAsset(shares(account), assetPerShare, _decimals);\n    }\n\n    /**\n     * @notice Getter for returning the account's share balance including unredeemed shares\n     * @param account is the account to lookup share balance for\n     * @return the share balance\n     */\n    function shares(address account) public view returns (uint256) {\n        (uint256 heldByAccount, uint256 heldByVault) = shareBalances(account);\n        return heldByAccount.add(heldByVault);\n    }\n\n    /**\n     * @notice Getter for returning the account's share balance split between account and vault holdings\n     * @param account is the account to lookup share balance for\n     * @return heldByAccount is the shares held by account\n     * @return heldByVault is the shares held on the vault (unredeemedShares)\n     */\n    function shareBalances(address account)\n        public\n        view\n        returns (uint256 heldByAccount, uint256 heldByVault)\n    {\n        Vault.DepositReceipt memory depositReceipt = depositReceipts[account];\n\n        if (depositReceipt.round < ShareMath.PLACEHOLDER_UINT) {\n            return (balanceOf(account), 0);\n        }\n\n        uint256 unredeemedShares =\n            depositReceipt.getSharesFromReceipt(\n                vaultState.round,\n                roundPricePerShare[depositReceipt.round],\n                vaultParams.decimals\n            );\n\n        return (balanceOf(account), unredeemedShares);\n    }\n\n    /**\n     * @notice The price of a unit of share denominated in the `asset`\n     */\n    function pricePerShare() external view returns (uint256) {\n        return\n            ShareMath.pricePerShare(\n                totalSupply(),\n                totalBalance(),\n                vaultState.totalPending,\n                vaultParams.decimals\n            );\n    }\n\n    /**\n     * @notice Returns the vault's total balance, including the amounts locked into a short position\n     * @return total balance of the vault, including the amounts locked in third party protocols\n     */\n    function totalBalance() public view returns (uint256) {\n        // After calling closeRound, current option is set to none\n        // We also commit the lockedAmount but do not deposit into Opyn\n        // which results in double counting of asset balance and lockedAmount\n\n        return\n            optionState.currentOption != address(0)\n                ? uint256(vaultState.lockedAmount).add(\n                    IERC20(vaultParams.asset).balanceOf(address(this))\n                )\n                : IERC20(vaultParams.asset).balanceOf(address(this));\n    }\n\n    /**\n     * @notice Returns the token decimals\n     */\n    function decimals() public view override returns (uint8) {\n        return vaultParams.decimals;\n    }\n\n    function cap() external view returns (uint256) {\n        return vaultParams.cap;\n    }\n\n    function nextOptionReadyAt() external view returns (uint256) {\n        return optionState.nextOptionReadyAt;\n    }\n\n    function currentOption() external view returns (address) {\n        return optionState.currentOption;\n    }\n\n    function nextOption() external view returns (address) {\n        return optionState.nextOption;\n    }\n\n    function totalPending() external view returns (uint256) {\n        return vaultState.totalPending;\n    }\n}\n"},"contracts/interfaces/IVaultPauser.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity =0.8.4;\n\ninterface IVaultPauser {\n    /// @notice pause vault position of an account with max amount\n    /// @param _account the address of user\n    /// @param _amount amount of shares\n    function pausePosition(address _account, uint256 _amount) external;\n\n    /// @notice resume vault position of an account with max amount\n    /// @param _vaultAddress the address of vault\n    function resumePosition(address _vaultAddress) external;\n}\n"},"@openzeppelin/contracts/utils/Address.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n    /**\n     * @dev Returns true if `account` is a contract.\n     *\n     * [IMPORTANT]\n     * ====\n     * It is unsafe to assume that an address for which this function returns\n     * false is an externally-owned account (EOA) and not a contract.\n     *\n     * Among others, `isContract` will return false for the following\n     * types of addresses:\n     *\n     *  - an externally-owned account\n     *  - a contract in construction\n     *  - an address where a contract will be created\n     *  - an address where a contract lived, but was destroyed\n     * ====\n     */\n    function isContract(address account) internal view returns (bool) {\n        // This method relies on extcodesize, which returns 0 for contracts in\n        // construction, since the code is only stored at the end of the\n        // constructor execution.\n\n        uint256 size;\n        assembly {\n            size := extcodesize(account)\n        }\n        return size > 0;\n    }\n\n    /**\n     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n     * `recipient`, forwarding all available gas and reverting on errors.\n     *\n     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n     * of certain opcodes, possibly making contracts go over the 2300 gas limit\n     * imposed by `transfer`, making them unable to receive funds via\n     * `transfer`. {sendValue} removes this limitation.\n     *\n     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n     *\n     * IMPORTANT: because control is transferred to `recipient`, care must be\n     * taken to not create reentrancy vulnerabilities. Consider using\n     * {ReentrancyGuard} or the\n     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n     */\n    function sendValue(address payable recipient, uint256 amount) internal {\n        require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n        (bool success, ) = recipient.call{value: amount}(\"\");\n        require(success, \"Address: unable to send value, recipient may have reverted\");\n    }\n\n    /**\n     * @dev Performs a Solidity function call using a low level `call`. A\n     * plain `call` is an unsafe replacement for a function call: use this\n     * function instead.\n     *\n     * If `target` reverts with a revert reason, it is bubbled up by this\n     * function (like regular Solidity function calls).\n     *\n     * Returns the raw returned data. To convert to the expected return value,\n     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n     *\n     * Requirements:\n     *\n     * - `target` must be a contract.\n     * - calling `target` with `data` must not revert.\n     *\n     * _Available since v3.1._\n     */\n    function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n        return functionCall(target, data, \"Address: low-level call failed\");\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n     * `errorMessage` as a fallback revert reason when `target` reverts.\n     *\n     * _Available since v3.1._\n     */\n    function functionCall(\n        address target,\n        bytes memory data,\n        string memory errorMessage\n    ) internal returns (bytes memory) {\n        return functionCallWithValue(target, data, 0, errorMessage);\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n     * but also transferring `value` wei to `target`.\n     *\n     * Requirements:\n     *\n     * - the calling contract must have an ETH balance of at least `value`.\n     * - the called Solidity function must be `payable`.\n     *\n     * _Available since v3.1._\n     */\n    function functionCallWithValue(\n        address target,\n        bytes memory data,\n        uint256 value\n    ) internal returns (bytes memory) {\n        return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n     * with `errorMessage` as a fallback revert reason when `target` reverts.\n     *\n     * _Available since v3.1._\n     */\n    function functionCallWithValue(\n        address target,\n        bytes memory data,\n        uint256 value,\n        string memory errorMessage\n    ) internal returns (bytes memory) {\n        require(address(this).balance >= value, \"Address: insufficient balance for call\");\n        require(isContract(target), \"Address: call to non-contract\");\n\n        (bool success, bytes memory returndata) = target.call{value: value}(data);\n        return verifyCallResult(success, returndata, errorMessage);\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n     * but performing a static call.\n     *\n     * _Available since v3.3._\n     */\n    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n        return functionStaticCall(target, data, \"Address: low-level static call failed\");\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n     * but performing a static call.\n     *\n     * _Available since v3.3._\n     */\n    function functionStaticCall(\n        address target,\n        bytes memory data,\n        string memory errorMessage\n    ) internal view returns (bytes memory) {\n        require(isContract(target), \"Address: static call to non-contract\");\n\n        (bool success, bytes memory returndata) = target.staticcall(data);\n        return verifyCallResult(success, returndata, errorMessage);\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n     * but performing a delegate call.\n     *\n     * _Available since v3.4._\n     */\n    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n        return functionDelegateCall(target, data, \"Address: low-level delegate call failed\");\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n     * but performing a delegate call.\n     *\n     * _Available since v3.4._\n     */\n    function functionDelegateCall(\n        address target,\n        bytes memory data,\n        string memory errorMessage\n    ) internal returns (bytes memory) {\n        require(isContract(target), \"Address: delegate call to non-contract\");\n\n        (bool success, bytes memory returndata) = target.delegatecall(data);\n        return verifyCallResult(success, returndata, errorMessage);\n    }\n\n    /**\n     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\n     * revert reason using the provided one.\n     *\n     * _Available since v4.3._\n     */\n    function verifyCallResult(\n        bool success,\n        bytes memory returndata,\n        string memory errorMessage\n    ) internal pure returns (bytes memory) {\n        if (success) {\n            return returndata;\n        } else {\n            // Look for revert reason and bubble it up if present\n            if (returndata.length > 0) {\n                // The easiest way to bubble the revert reason is using memory via assembly\n\n                assembly {\n                    let returndata_size := mload(returndata)\n                    revert(add(32, returndata), returndata_size)\n                }\n            } else {\n                revert(errorMessage);\n            }\n        }\n    }\n}\n"},"contracts/interfaces/IRibbon.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity =0.8.4;\nimport {Vault} from \"../libraries/Vault.sol\";\n\ninterface IRibbonVault {\n    function deposit(uint256 amount) external;\n\n    function depositETH() external payable;\n\n    function cap() external view returns (uint256);\n\n    function depositFor(uint256 amount, address creditor) external;\n\n    function vaultParams() external view returns (Vault.VaultParams memory);\n}\n\ninterface IStrikeSelection {\n    function getStrikePrice(uint256 expiryTimestamp, bool isPut)\n        external\n        view\n        returns (uint256, uint256);\n\n    function delta() external view returns (uint256);\n}\n\ninterface IOptionsPremiumPricer {\n    function getPremium(\n        uint256 strikePrice,\n        uint256 timeToExpiry,\n        bool isPut\n    ) external view returns (uint256);\n\n    function getPremiumInStables(\n        uint256 strikePrice,\n        uint256 timeToExpiry,\n        bool isPut\n    ) external view returns (uint256);\n\n    function getOptionDelta(\n        uint256 spotPrice,\n        uint256 strikePrice,\n        uint256 volatility,\n        uint256 expiryTimestamp\n    ) external view returns (uint256 delta);\n\n    function getUnderlyingPrice() external view returns (uint256);\n\n    function priceOracle() external view returns (address);\n\n    function volatilityOracle() external view returns (address);\n\n    function optionId() external view returns (bytes32);\n}\n"},"contracts/libraries/GnosisAuction.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity =0.8.4;\n\nimport {SafeMath} from \"@openzeppelin/contracts/utils/math/SafeMath.sol\";\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport {\n    SafeERC20\n} from \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\nimport {DSMath} from \"../vendor/DSMath.sol\";\nimport {IGnosisAuction} from \"../interfaces/IGnosisAuction.sol\";\nimport {IOtoken} from \"../interfaces/GammaInterface.sol\";\nimport {IOptionsPremiumPricer} from \"../interfaces/IRibbon.sol\";\nimport {Vault} from \"./Vault.sol\";\nimport {IRibbonThetaVault} from \"../interfaces/IRibbonThetaVault.sol\";\n\nlibrary GnosisAuction {\n    using SafeMath for uint256;\n    using SafeERC20 for IERC20;\n\n    event InitiateGnosisAuction(\n        address indexed auctioningToken,\n        address indexed biddingToken,\n        uint256 auctionCounter,\n        address indexed manager\n    );\n\n    event PlaceAuctionBid(\n        uint256 auctionId,\n        address indexed auctioningToken,\n        uint256 sellAmount,\n        uint256 buyAmount,\n        address indexed bidder\n    );\n\n    struct AuctionDetails {\n        address oTokenAddress;\n        address gnosisEasyAuction;\n        address asset;\n        uint256 assetDecimals;\n        uint256 oTokenPremium;\n        uint256 duration;\n    }\n\n    struct BidDetails {\n        address oTokenAddress;\n        address gnosisEasyAuction;\n        address asset;\n        uint256 assetDecimals;\n        uint256 auctionId;\n        uint256 lockedBalance;\n        uint256 optionAllocation;\n        uint256 optionPremium;\n        address bidder;\n    }\n\n    function startAuction(AuctionDetails calldata auctionDetails)\n        internal\n        returns (uint256 auctionID)\n    {\n        uint256 oTokenSellAmount =\n            getOTokenSellAmount(auctionDetails.oTokenAddress);\n        require(oTokenSellAmount > 0, \"No otokens to sell\");\n\n        IERC20(auctionDetails.oTokenAddress).safeApprove(\n            auctionDetails.gnosisEasyAuction,\n            IERC20(auctionDetails.oTokenAddress).balanceOf(address(this))\n        );\n\n        // minBidAmount is total oTokens to sell * premium per oToken\n        // shift decimals to correspond to decimals of USDC for puts\n        // and underlying for calls\n        uint256 minBidAmount =\n            DSMath.wmul(\n                oTokenSellAmount.mul(10**10),\n                auctionDetails.oTokenPremium\n            );\n\n        minBidAmount = auctionDetails.assetDecimals > 18\n            ? minBidAmount.mul(10**(auctionDetails.assetDecimals.sub(18)))\n            : minBidAmount.div(\n                10**(uint256(18).sub(auctionDetails.assetDecimals))\n            );\n\n        require(\n            minBidAmount <= type(uint96).max,\n            \"optionPremium * oTokenSellAmount > type(uint96) max value!\"\n        );\n\n        uint256 auctionEnd = block.timestamp.add(auctionDetails.duration);\n\n        auctionID = IGnosisAuction(auctionDetails.gnosisEasyAuction)\n            .initiateAuction(\n            // address of oToken we minted and are selling\n            auctionDetails.oTokenAddress,\n            // address of asset we want in exchange for oTokens. Should match vault `asset`\n            auctionDetails.asset,\n            // orders can be cancelled at any time during the auction\n            auctionEnd,\n            // order will last for `duration`\n            auctionEnd,\n            // we are selling all of the otokens minus a fee taken by gnosis\n            uint96(oTokenSellAmount),\n            // the minimum we are willing to sell all the oTokens for. A discount is applied on black-scholes price\n            uint96(minBidAmount),\n            // the minimum bidding amount must be 1 * 10 ** -assetDecimals\n            1,\n            // the min funding threshold\n            0,\n            // no atomic closure\n            false,\n            // access manager contract\n            address(0),\n            // bytes for storing info like a whitelist for who can bid\n            bytes(\"\")\n        );\n\n        emit InitiateGnosisAuction(\n            auctionDetails.oTokenAddress,\n            auctionDetails.asset,\n            auctionID,\n            msg.sender\n        );\n    }\n\n    function placeBid(BidDetails calldata bidDetails)\n        internal\n        returns (\n            uint256 sellAmount,\n            uint256 buyAmount,\n            uint64 userId\n        )\n    {\n        // calculate how much to allocate\n        sellAmount = bidDetails\n            .lockedBalance\n            .mul(bidDetails.optionAllocation)\n            .div(100 * Vault.OPTION_ALLOCATION_MULTIPLIER);\n\n        // divide the `asset` sellAmount by the target premium per oToken to\n        // get the number of oTokens to buy (8 decimals)\n        buyAmount = sellAmount\n            .mul(10**(bidDetails.assetDecimals.add(Vault.OTOKEN_DECIMALS)))\n            .div(bidDetails.optionPremium)\n            .div(10**bidDetails.assetDecimals);\n\n        require(\n            sellAmount <= type(uint96).max,\n            \"sellAmount > type(uint96) max value!\"\n        );\n        require(\n            buyAmount <= type(uint96).max,\n            \"buyAmount > type(uint96) max value!\"\n        );\n\n        // approve that amount\n        IERC20(bidDetails.asset).safeApprove(\n            bidDetails.gnosisEasyAuction,\n            sellAmount\n        );\n\n        uint96[] memory _minBuyAmounts = new uint96[](1);\n        uint96[] memory _sellAmounts = new uint96[](1);\n        bytes32[] memory _prevSellOrders = new bytes32[](1);\n        _minBuyAmounts[0] = uint96(buyAmount);\n        _sellAmounts[0] = uint96(sellAmount);\n        _prevSellOrders[\n            0\n        ] = 0x0000000000000000000000000000000000000000000000000000000000000001;\n\n        // place sell order with that amount\n        userId = IGnosisAuction(bidDetails.gnosisEasyAuction).placeSellOrders(\n            bidDetails.auctionId,\n            _minBuyAmounts,\n            _sellAmounts,\n            _prevSellOrders,\n            \"0x\"\n        );\n\n        emit PlaceAuctionBid(\n            bidDetails.auctionId,\n            bidDetails.oTokenAddress,\n            sellAmount,\n            buyAmount,\n            bidDetails.bidder\n        );\n\n        return (sellAmount, buyAmount, userId);\n    }\n\n    function claimAuctionOtokens(\n        Vault.AuctionSellOrder calldata auctionSellOrder,\n        address gnosisEasyAuction,\n        address counterpartyThetaVault\n    ) internal {\n        bytes32 order =\n            encodeOrder(\n                auctionSellOrder.userId,\n                auctionSellOrder.buyAmount,\n                auctionSellOrder.sellAmount\n            );\n        bytes32[] memory orders = new bytes32[](1);\n        orders[0] = order;\n        IGnosisAuction(gnosisEasyAuction).claimFromParticipantOrder(\n            IRibbonThetaVault(counterpartyThetaVault).optionAuctionID(),\n            orders\n        );\n    }\n\n    function getOTokenSellAmount(address oTokenAddress)\n        internal\n        view\n        returns (uint256)\n    {\n        // We take our current oToken balance. That will be our sell amount\n        // but otokens will be transferred to gnosis.\n        uint256 oTokenSellAmount =\n            IERC20(oTokenAddress).balanceOf(address(this));\n\n        require(\n            oTokenSellAmount <= type(uint96).max,\n            \"oTokenSellAmount > type(uint96) max value!\"\n        );\n\n        return oTokenSellAmount;\n    }\n\n    function getOTokenPremiumInStables(\n        address oTokenAddress,\n        address optionsPremiumPricer,\n        uint256 premiumDiscount\n    ) internal view returns (uint256) {\n        IOtoken newOToken = IOtoken(oTokenAddress);\n        IOptionsPremiumPricer premiumPricer =\n            IOptionsPremiumPricer(optionsPremiumPricer);\n\n        // Apply black-scholes formula (from rvol library) to option given its features\n        // and get price for 100 contracts denominated USDC for both call and put options\n        uint256 optionPremium =\n            premiumPricer.getPremiumInStables(\n                newOToken.strikePrice(),\n                newOToken.expiryTimestamp(),\n                newOToken.isPut()\n            );\n\n        // Apply a discount to incentivize arbitraguers\n        optionPremium = optionPremium.mul(premiumDiscount).div(\n            100 * Vault.PREMIUM_DISCOUNT_MULTIPLIER\n        );\n\n        require(\n            optionPremium <= type(uint96).max,\n            \"optionPremium > type(uint96) max value!\"\n        );\n\n        return optionPremium;\n    }\n\n    function encodeOrder(\n        uint64 userId,\n        uint96 buyAmount,\n        uint96 sellAmount\n    ) internal pure returns (bytes32) {\n        return\n            bytes32(\n                (uint256(userId) << 192) +\n                    (uint256(buyAmount) << 96) +\n                    uint256(sellAmount)\n            );\n    }\n}\n"},"contracts/interfaces/GammaInterface.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity =0.8.4;\n\nlibrary GammaTypes {\n    // vault is a struct of 6 arrays that describe a position a user has, a user can have multiple vaults.\n    struct Vault {\n        // addresses of oTokens a user has shorted (i.e. written) against this vault\n        address[] shortOtokens;\n        // addresses of oTokens a user has bought and deposited in this vault\n        // user can be long oTokens without opening a vault (e.g. by buying on a DEX)\n        // generally, long oTokens will be 'deposited' in vaults to act as collateral\n        // in order to write oTokens against (i.e. in spreads)\n        address[] longOtokens;\n        // addresses of other ERC-20s a user has deposited as collateral in this vault\n        address[] collateralAssets;\n        // quantity of oTokens minted/written for each oToken address in shortOtokens\n        uint256[] shortAmounts;\n        // quantity of oTokens owned and held in the vault for each oToken address in longOtokens\n        uint256[] longAmounts;\n        // quantity of ERC-20 deposited as collateral in the vault for each ERC-20 address in collateralAssets\n        uint256[] collateralAmounts;\n    }\n}\n\ninterface IOtoken {\n    function underlyingAsset() external view returns (address);\n\n    function strikeAsset() external view returns (address);\n\n    function collateralAsset() external view returns (address);\n\n    function strikePrice() external view returns (uint256);\n\n    function expiryTimestamp() external view returns (uint256);\n\n    function isPut() external view returns (bool);\n\n    function balanceOf(address) external view returns (uint256);\n\n    function totalSupply() external view returns (uint256);\n\n    function transfer(address, uint256) external;\n}\n\ninterface IOtokenFactory {\n    function getOtoken(\n        address _underlyingAsset,\n        address _strikeAsset,\n        address _collateralAsset,\n        uint256 _strikePrice,\n        uint256 _expiry,\n        bool _isPut\n    ) external view returns (address);\n\n    function createOtoken(\n        address _underlyingAsset,\n        address _strikeAsset,\n        address _collateralAsset,\n        uint256 _strikePrice,\n        uint256 _expiry,\n        bool _isPut\n    ) external returns (address);\n\n    function getTargetOtokenAddress(\n        address _underlyingAsset,\n        address _strikeAsset,\n        address _collateralAsset,\n        uint256 _strikePrice,\n        uint256 _expiry,\n        bool _isPut\n    ) external view returns (address);\n\n    event OtokenCreated(\n        address tokenAddress,\n        address creator,\n        address indexed underlying,\n        address indexed strike,\n        address indexed collateral,\n        uint256 strikePrice,\n        uint256 expiry,\n        bool isPut\n    );\n}\n\ninterface IController {\n    // possible actions that can be performed\n    enum ActionType {\n        OpenVault,\n        MintShortOption,\n        BurnShortOption,\n        DepositLongOption,\n        WithdrawLongOption,\n        DepositCollateral,\n        WithdrawCollateral,\n        SettleVault,\n        Redeem,\n        Call,\n        Liquidate\n    }\n\n    struct ActionArgs {\n        // type of action that is being performed on the system\n        ActionType actionType;\n        // address of the account owner\n        address owner;\n        // address which we move assets from or to (depending on the action type)\n        address secondAddress;\n        // asset that is to be transfered\n        address asset;\n        // index of the vault that is to be modified (if any)\n        uint256 vaultId;\n        // amount of asset that is to be transfered\n        uint256 amount;\n        // each vault can hold multiple short / long / collateral assets\n        // but we are restricting the scope to only 1 of each in this version\n        // in future versions this would be the index of the short / long / collateral asset that needs to be modified\n        uint256 index;\n        // any other data that needs to be passed in for arbitrary function calls\n        bytes data;\n    }\n\n    struct RedeemArgs {\n        // address to which we pay out the oToken proceeds\n        address receiver;\n        // oToken that is to be redeemed\n        address otoken;\n        // amount of oTokens that is to be redeemed\n        uint256 amount;\n    }\n\n    function getPayout(address _otoken, uint256 _amount)\n        external\n        view\n        returns (uint256);\n\n    function operate(ActionArgs[] calldata _actions) external;\n\n    function getAccountVaultCounter(address owner)\n        external\n        view\n        returns (uint256);\n\n    function oracle() external view returns (address);\n\n    function getVault(address _owner, uint256 _vaultId)\n        external\n        view\n        returns (GammaTypes.Vault memory);\n\n    function getProceed(address _owner, uint256 _vaultId)\n        external\n        view\n        returns (uint256);\n\n    function isSettlementAllowed(\n        address _underlying,\n        address _strike,\n        address _collateral,\n        uint256 _expiry\n    ) external view returns (bool);\n}\n\ninterface IOracle {\n    function setAssetPricer(address _asset, address _pricer) external;\n\n    function updateAssetPricer(address _asset, address _pricer) external;\n\n    function getPrice(address _asset) external view returns (uint256);\n\n    function getExpiryPrice(address _asset, uint256 _expiryTimestamp)\n        external\n        view\n        returns (uint256);\n}\n"},"contracts/interfaces/IERC20Detailed.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity =0.8.4;\n\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\n\ninterface IERC20Detailed is IERC20 {\n    function decimals() external view returns (uint8);\n\n    function symbol() external view returns (string calldata);\n\n    function name() external view returns (string calldata);\n}\n"},"contracts/interfaces/IOptionsPurchaseQueue.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity >=0.8.0;\n\ninterface IOptionsPurchaseQueue {\n    /**\n     * @dev Contains purchase request info\n     * @param optionsAmount Amount of options to purchase\n     * @param premiums Total premiums the buyer is spending to purchase the options (optionsAmount * ceilingPrice)\n     *  We need to track the premiums here since the ceilingPrice could change between the time the purchase was\n     *  requested and when the options are sold\n     * @param buyer The buyer requesting this purchase\n     */\n    struct Purchase {\n        uint128 optionsAmount; // Slot 0\n        uint128 premiums;\n        address buyer; // Slot 1\n    }\n\n    function purchases(address, uint256)\n        external\n        view\n        returns (\n            uint128,\n            uint128,\n            address\n        );\n\n    function totalOptionsAmount(address) external view returns (uint256);\n\n    function vaultAllocatedOptions(address) external view returns (uint256);\n\n    function whitelistedBuyer(address) external view returns (bool);\n\n    function minPurchaseAmount(address) external view returns (uint256);\n\n    function ceilingPrice(address) external view returns (uint256);\n\n    function getPurchases(address vault)\n        external\n        view\n        returns (Purchase[] memory);\n\n    function getPremiums(address vault, uint256 optionsAmount)\n        external\n        view\n        returns (uint256);\n\n    function getOptionsAllocation(address vault, uint256 allocatedOptions)\n        external\n        view\n        returns (uint256);\n\n    function requestPurchase(address vault, uint256 optionsAmount)\n        external\n        returns (uint256);\n\n    function allocateOptions(uint256 allocatedOptions)\n        external\n        returns (uint256);\n\n    function sellToBuyers(uint256 settlementPrice) external returns (uint256);\n\n    function cancelAllPurchases(address vault) external;\n\n    function addWhitelist(address buyer) external;\n\n    function removeWhitelist(address buyer) external;\n\n    function setCeilingPrice(address vault, uint256 price) external;\n\n    function setMinPurchaseAmount(address vault, uint256 amount) external;\n}\n"},"contracts/libraries/SupportsNonCompliantERC20.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity =0.8.4;\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport {\n    SafeERC20\n} from \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\n\n/**\n * This library supports ERC20s that have quirks in their behavior.\n * One such ERC20 is USDT, which requires allowance to be 0 before calling approve.\n * We plan to update this library with ERC20s that display such idiosyncratic behavior.\n */\nlibrary SupportsNonCompliantERC20 {\n    address private constant USDT = 0xdAC17F958D2ee523a2206206994597C13D831ec7;\n\n    function safeApproveNonCompliant(\n        IERC20 token,\n        address spender,\n        uint256 amount\n    ) internal {\n        if (address(token) == USDT) {\n            SafeERC20.safeApprove(token, spender, 0);\n        }\n        SafeERC20.safeApprove(token, spender, amount);\n    }\n}\n"},"contracts/vendor/DSMath.sol":{"content":"// SPDX-License-Identifier: MIT\n\n/// math.sol -- mixin for inline numerical wizardry\n\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\npragma solidity >0.4.13;\n\nlibrary DSMath {\n    function add(uint256 x, uint256 y) internal pure returns (uint256 z) {\n        require((z = x + y) >= x, \"ds-math-add-overflow\");\n    }\n\n    function sub(uint256 x, uint256 y) internal pure returns (uint256 z) {\n        require((z = x - y) <= x, \"ds-math-sub-underflow\");\n    }\n\n    function mul(uint256 x, uint256 y) internal pure returns (uint256 z) {\n        require(y == 0 || (z = x * y) / y == x, \"ds-math-mul-overflow\");\n    }\n\n    function min(uint256 x, uint256 y) internal pure returns (uint256 z) {\n        return x <= y ? x : y;\n    }\n\n    function max(uint256 x, uint256 y) internal pure returns (uint256 z) {\n        return x >= y ? x : y;\n    }\n\n    function imin(int256 x, int256 y) internal pure returns (int256 z) {\n        return x <= y ? x : y;\n    }\n\n    function imax(int256 x, int256 y) internal pure returns (int256 z) {\n        return x >= y ? x : y;\n    }\n\n    uint256 constant WAD = 10**18;\n    uint256 constant RAY = 10**27;\n\n    //rounds to zero if x*y < WAD / 2\n    function wmul(uint256 x, uint256 y) internal pure returns (uint256 z) {\n        z = add(mul(x, y), WAD / 2) / WAD;\n    }\n\n    //rounds to zero if x*y < WAD / 2\n    function rmul(uint256 x, uint256 y) internal pure returns (uint256 z) {\n        z = add(mul(x, y), RAY / 2) / RAY;\n    }\n\n    //rounds to zero if x*y < WAD / 2\n    function wdiv(uint256 x, uint256 y) internal pure returns (uint256 z) {\n        z = add(mul(x, WAD), y / 2) / y;\n    }\n\n    //rounds to zero if x*y < RAY / 2\n    function rdiv(uint256 x, uint256 y) internal pure returns (uint256 z) {\n        z = add(mul(x, RAY), y / 2) / y;\n    }\n\n    // This famous algorithm is called \"exponentiation by squaring\"\n    // and calculates x^n with x as fixed-point and n as regular unsigned.\n    //\n    // It's O(log n), instead of O(n) for naive repeated multiplication.\n    //\n    // These facts are why it works:\n    //\n    //  If n is even, then x^n = (x^2)^(n/2).\n    //  If n is odd,  then x^n = x * x^(n-1),\n    //   and applying the equation for even x gives\n    //    x^n = x * (x^2)^((n-1) / 2).\n    //\n    //  Also, EVM division is flooring and\n    //    floor[(n-1) / 2] = floor[n / 2].\n    //\n    function rpow(uint256 x, uint256 n) internal pure returns (uint256 z) {\n        z = n % 2 != 0 ? x : RAY;\n\n        for (n /= 2; n != 0; n /= 2) {\n            x = rmul(x, x);\n\n            if (n % 2 != 0) {\n                z = rmul(z, x);\n            }\n        }\n    }\n}\n"},"contracts/interfaces/IGnosisAuction.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity =0.8.4;\n\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\n\nlibrary AuctionType {\n    struct AuctionData {\n        IERC20 auctioningToken;\n        IERC20 biddingToken;\n        uint256 orderCancellationEndDate;\n        uint256 auctionEndDate;\n        bytes32 initialAuctionOrder;\n        uint256 minimumBiddingAmountPerOrder;\n        uint256 interimSumBidAmount;\n        bytes32 interimOrder;\n        bytes32 clearingPriceOrder;\n        uint96 volumeClearingPriceOrder;\n        bool minFundingThresholdNotReached;\n        bool isAtomicClosureAllowed;\n        uint256 feeNumerator;\n        uint256 minFundingThreshold;\n    }\n}\n\ninterface IGnosisAuction {\n    function initiateAuction(\n        address _auctioningToken,\n        address _biddingToken,\n        uint256 orderCancellationEndDate,\n        uint256 auctionEndDate,\n        uint96 _auctionedSellAmount,\n        uint96 _minBuyAmount,\n        uint256 minimumBiddingAmountPerOrder,\n        uint256 minFundingThreshold,\n        bool isAtomicClosureAllowed,\n        address accessManagerContract,\n        bytes memory accessManagerContractData\n    ) external returns (uint256);\n\n    function auctionCounter() external view returns (uint256);\n\n    function auctionData(uint256 auctionId)\n        external\n        view\n        returns (AuctionType.AuctionData memory);\n\n    function auctionAccessManager(uint256 auctionId)\n        external\n        view\n        returns (address);\n\n    function auctionAccessData(uint256 auctionId)\n        external\n        view\n        returns (bytes memory);\n\n    function FEE_DENOMINATOR() external view returns (uint256);\n\n    function feeNumerator() external view returns (uint256);\n\n    function settleAuction(uint256 auctionId) external returns (bytes32);\n\n    function placeSellOrders(\n        uint256 auctionId,\n        uint96[] memory _minBuyAmounts,\n        uint96[] memory _sellAmounts,\n        bytes32[] memory _prevSellOrders,\n        bytes calldata allowListCallData\n    ) external returns (uint64);\n\n    function claimFromParticipantOrder(\n        uint256 auctionId,\n        bytes32[] memory orders\n    ) external returns (uint256, uint256);\n}\n"},"contracts/interfaces/IRibbonThetaVault.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity =0.8.4;\n\nimport {Vault} from \"../libraries/Vault.sol\";\n\ninterface IRibbonThetaVault {\n    function GAMMA_CONTROLLER() external view returns (address);\n\n    function currentOption() external view returns (address);\n\n    function nextOption() external view returns (address);\n\n    function vaultParams() external view returns (Vault.VaultParams memory);\n\n    function vaultState() external view returns (Vault.VaultState memory);\n\n    function optionState() external view returns (Vault.OptionState memory);\n\n    function optionAuctionID() external view returns (uint256);\n\n    function pricePerShare() external view returns (uint256);\n\n    function roundPricePerShare(uint256) external view returns (uint256);\n\n    function symbol() external view returns (string calldata);\n\n    function depositFor(uint256 amount, address creditor) external;\n\n    function initiateWithdraw(uint256 numShares) external;\n\n    function completeWithdraw() external;\n\n    function maxRedeem() external;\n\n    function commitAndClose() external;\n\n    function burnRemainingOTokens() external;\n}\n\ninterface IRibbonTreasuryVault is IRibbonThetaVault {\n    function period() external view returns (uint256);\n}\n\ninterface IRibbonSTETHVault is IRibbonThetaVault {\n    function depositYieldTokenFor(uint256 amount, address creditor) external;\n}\n"},"@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module that helps prevent reentrant calls to a function.\n *\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\n * available, which can be applied to functions to make sure there are no nested\n * (reentrant) calls to them.\n *\n * Note that because there is a single `nonReentrant` guard, functions marked as\n * `nonReentrant` may not call one another. This can be worked around by making\n * those functions `private`, and then adding `external` `nonReentrant` entry\n * points to them.\n *\n * TIP: If you would like to learn more about reentrancy and alternative ways\n * to protect against it, check out our blog post\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\n */\nabstract contract ReentrancyGuardUpgradeable is Initializable {\n    // Booleans are more expensive than uint256 or any type that takes up a full\n    // word because each write operation emits an extra SLOAD to first read the\n    // slot's contents, replace the bits taken up by the boolean, and then write\n    // back. This is the compiler's defense against contract upgrades and\n    // pointer aliasing, and it cannot be disabled.\n\n    // The values being non-zero value makes deployment a bit more expensive,\n    // but in exchange the refund on every call to nonReentrant will be lower in\n    // amount. Since refunds are capped to a percentage of the total\n    // transaction's gas, it is best to keep them low in cases like this one, to\n    // increase the likelihood of the full refund coming into effect.\n    uint256 private constant _NOT_ENTERED = 1;\n    uint256 private constant _ENTERED = 2;\n\n    uint256 private _status;\n\n    function __ReentrancyGuard_init() internal initializer {\n        __ReentrancyGuard_init_unchained();\n    }\n\n    function __ReentrancyGuard_init_unchained() internal initializer {\n        _status = _NOT_ENTERED;\n    }\n\n    /**\n     * @dev Prevents a contract from calling itself, directly or indirectly.\n     * Calling a `nonReentrant` function from another `nonReentrant`\n     * function is not supported. It is possible to prevent this from happening\n     * by making the `nonReentrant` function external, and make it call a\n     * `private` function that does the actual work.\n     */\n    modifier nonReentrant() {\n        // On the first call to nonReentrant, _notEntered will be true\n        require(_status != _ENTERED, \"ReentrancyGuard: reentrant call\");\n\n        // Any calls to nonReentrant after this point will fail\n        _status = _ENTERED;\n\n        _;\n\n        // By storing the original value once again, a refund is triggered (see\n        // https://eips.ethereum.org/EIPS/eip-2200)\n        _status = _NOT_ENTERED;\n    }\n    uint256[49] private __gap;\n}\n"},"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../utils/ContextUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\n    address private _owner;\n\n    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n    /**\n     * @dev Initializes the contract setting the deployer as the initial owner.\n     */\n    function __Ownable_init() internal initializer {\n        __Context_init_unchained();\n        __Ownable_init_unchained();\n    }\n\n    function __Ownable_init_unchained() internal initializer {\n        _setOwner(_msgSender());\n    }\n\n    /**\n     * @dev Returns the address of the current owner.\n     */\n    function owner() public view virtual returns (address) {\n        return _owner;\n    }\n\n    /**\n     * @dev Throws if called by any account other than the owner.\n     */\n    modifier onlyOwner() {\n        require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n        _;\n    }\n\n    /**\n     * @dev Leaves the contract without owner. It will not be possible to call\n     * `onlyOwner` functions anymore. Can only be called by the current owner.\n     *\n     * NOTE: Renouncing ownership will leave the contract without an owner,\n     * thereby removing any functionality that is only available to the owner.\n     */\n    function renounceOwnership() public virtual onlyOwner {\n        _setOwner(address(0));\n    }\n\n    /**\n     * @dev Transfers ownership of the contract to a new account (`newOwner`).\n     * Can only be called by the current owner.\n     */\n    function transferOwnership(address newOwner) public virtual onlyOwner {\n        require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n        _setOwner(newOwner);\n    }\n\n    function _setOwner(address newOwner) private {\n        address oldOwner = _owner;\n        _owner = newOwner;\n        emit OwnershipTransferred(oldOwner, newOwner);\n    }\n    uint256[49] private __gap;\n}\n"},"@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./IERC20Upgradeable.sol\";\nimport \"./extensions/IERC20MetadataUpgradeable.sol\";\nimport \"../../utils/ContextUpgradeable.sol\";\nimport \"../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Implementation of the {IERC20} interface.\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n * For a generic mechanism see {ERC20PresetMinterPauser}.\n *\n * TIP: For a detailed writeup see our guide\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\n *\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\n * instead returning `false` on failure. This behavior is nonetheless\n * conventional and does not conflict with the expectations of ERC20\n * applications.\n *\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\n * This allows applications to reconstruct the allowance for all accounts just\n * by listening to said events. Other implementations of the EIP may not emit\n * these events, as it isn't required by the specification.\n *\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\n * functions have been added to mitigate the well-known issues around setting\n * allowances. See {IERC20-approve}.\n */\ncontract ERC20Upgradeable is Initializable, ContextUpgradeable, IERC20Upgradeable, IERC20MetadataUpgradeable {\n    mapping(address => uint256) private _balances;\n\n    mapping(address => mapping(address => uint256)) private _allowances;\n\n    uint256 private _totalSupply;\n\n    string private _name;\n    string private _symbol;\n\n    /**\n     * @dev Sets the values for {name} and {symbol}.\n     *\n     * The default value of {decimals} is 18. To select a different value for\n     * {decimals} you should overload it.\n     *\n     * All two of these values are immutable: they can only be set once during\n     * construction.\n     */\n    function __ERC20_init(string memory name_, string memory symbol_) internal initializer {\n        __Context_init_unchained();\n        __ERC20_init_unchained(name_, symbol_);\n    }\n\n    function __ERC20_init_unchained(string memory name_, string memory symbol_) internal initializer {\n        _name = name_;\n        _symbol = symbol_;\n    }\n\n    /**\n     * @dev Returns the name of the token.\n     */\n    function name() public view virtual override returns (string memory) {\n        return _name;\n    }\n\n    /**\n     * @dev Returns the symbol of the token, usually a shorter version of the\n     * name.\n     */\n    function symbol() public view virtual override returns (string memory) {\n        return _symbol;\n    }\n\n    /**\n     * @dev Returns the number of decimals used to get its user representation.\n     * For example, if `decimals` equals `2`, a balance of `505` tokens should\n     * be displayed to a user as `5.05` (`505 / 10 ** 2`).\n     *\n     * Tokens usually opt for a value of 18, imitating the relationship between\n     * Ether and Wei. This is the value {ERC20} uses, unless this function is\n     * overridden;\n     *\n     * NOTE: This information is only used for _display_ purposes: it in\n     * no way affects any of the arithmetic of the contract, including\n     * {IERC20-balanceOf} and {IERC20-transfer}.\n     */\n    function decimals() public view virtual override returns (uint8) {\n        return 18;\n    }\n\n    /**\n     * @dev See {IERC20-totalSupply}.\n     */\n    function totalSupply() public view virtual override returns (uint256) {\n        return _totalSupply;\n    }\n\n    /**\n     * @dev See {IERC20-balanceOf}.\n     */\n    function balanceOf(address account) public view virtual override returns (uint256) {\n        return _balances[account];\n    }\n\n    /**\n     * @dev See {IERC20-transfer}.\n     *\n     * Requirements:\n     *\n     * - `recipient` cannot be the zero address.\n     * - the caller must have a balance of at least `amount`.\n     */\n    function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\n        _transfer(_msgSender(), recipient, amount);\n        return true;\n    }\n\n    /**\n     * @dev See {IERC20-allowance}.\n     */\n    function allowance(address owner, address spender) public view virtual override returns (uint256) {\n        return _allowances[owner][spender];\n    }\n\n    /**\n     * @dev See {IERC20-approve}.\n     *\n     * Requirements:\n     *\n     * - `spender` cannot be the zero address.\n     */\n    function approve(address spender, uint256 amount) public virtual override returns (bool) {\n        _approve(_msgSender(), spender, amount);\n        return true;\n    }\n\n    /**\n     * @dev See {IERC20-transferFrom}.\n     *\n     * Emits an {Approval} event indicating the updated allowance. This is not\n     * required by the EIP. See the note at the beginning of {ERC20}.\n     *\n     * Requirements:\n     *\n     * - `sender` and `recipient` cannot be the zero address.\n     * - `sender` must have a balance of at least `amount`.\n     * - the caller must have allowance for ``sender``'s tokens of at least\n     * `amount`.\n     */\n    function transferFrom(\n        address sender,\n        address recipient,\n        uint256 amount\n    ) public virtual override returns (bool) {\n        _transfer(sender, recipient, amount);\n\n        uint256 currentAllowance = _allowances[sender][_msgSender()];\n        require(currentAllowance >= amount, \"ERC20: transfer amount exceeds allowance\");\n        unchecked {\n            _approve(sender, _msgSender(), currentAllowance - amount);\n        }\n\n        return true;\n    }\n\n    /**\n     * @dev Atomically increases the allowance granted to `spender` by the caller.\n     *\n     * This is an alternative to {approve} that can be used as a mitigation for\n     * problems described in {IERC20-approve}.\n     *\n     * Emits an {Approval} event indicating the updated allowance.\n     *\n     * Requirements:\n     *\n     * - `spender` cannot be the zero address.\n     */\n    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\n        _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue);\n        return true;\n    }\n\n    /**\n     * @dev Atomically decreases the allowance granted to `spender` by the caller.\n     *\n     * This is an alternative to {approve} that can be used as a mitigation for\n     * problems described in {IERC20-approve}.\n     *\n     * Emits an {Approval} event indicating the updated allowance.\n     *\n     * Requirements:\n     *\n     * - `spender` cannot be the zero address.\n     * - `spender` must have allowance for the caller of at least\n     * `subtractedValue`.\n     */\n    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\n        uint256 currentAllowance = _allowances[_msgSender()][spender];\n        require(currentAllowance >= subtractedValue, \"ERC20: decreased allowance below zero\");\n        unchecked {\n            _approve(_msgSender(), spender, currentAllowance - subtractedValue);\n        }\n\n        return true;\n    }\n\n    /**\n     * @dev Moves `amount` of tokens from `sender` to `recipient`.\n     *\n     * This internal function is equivalent to {transfer}, and can be used to\n     * e.g. implement automatic token fees, slashing mechanisms, etc.\n     *\n     * Emits a {Transfer} event.\n     *\n     * Requirements:\n     *\n     * - `sender` cannot be the zero address.\n     * - `recipient` cannot be the zero address.\n     * - `sender` must have a balance of at least `amount`.\n     */\n    function _transfer(\n        address sender,\n        address recipient,\n        uint256 amount\n    ) internal virtual {\n        require(sender != address(0), \"ERC20: transfer from the zero address\");\n        require(recipient != address(0), \"ERC20: transfer to the zero address\");\n\n        _beforeTokenTransfer(sender, recipient, amount);\n\n        uint256 senderBalance = _balances[sender];\n        require(senderBalance >= amount, \"ERC20: transfer amount exceeds balance\");\n        unchecked {\n            _balances[sender] = senderBalance - amount;\n        }\n        _balances[recipient] += amount;\n\n        emit Transfer(sender, recipient, amount);\n\n        _afterTokenTransfer(sender, recipient, amount);\n    }\n\n    /** @dev Creates `amount` tokens and assigns them to `account`, increasing\n     * the total supply.\n     *\n     * Emits a {Transfer} event with `from` set to the zero address.\n     *\n     * Requirements:\n     *\n     * - `account` cannot be the zero address.\n     */\n    function _mint(address account, uint256 amount) internal virtual {\n        require(account != address(0), \"ERC20: mint to the zero address\");\n\n        _beforeTokenTransfer(address(0), account, amount);\n\n        _totalSupply += amount;\n        _balances[account] += amount;\n        emit Transfer(address(0), account, amount);\n\n        _afterTokenTransfer(address(0), account, amount);\n    }\n\n    /**\n     * @dev Destroys `amount` tokens from `account`, reducing the\n     * total supply.\n     *\n     * Emits a {Transfer} event with `to` set to the zero address.\n     *\n     * Requirements:\n     *\n     * - `account` cannot be the zero address.\n     * - `account` must have at least `amount` tokens.\n     */\n    function _burn(address account, uint256 amount) internal virtual {\n        require(account != address(0), \"ERC20: burn from the zero address\");\n\n        _beforeTokenTransfer(account, address(0), amount);\n\n        uint256 accountBalance = _balances[account];\n        require(accountBalance >= amount, \"ERC20: burn amount exceeds balance\");\n        unchecked {\n            _balances[account] = accountBalance - amount;\n        }\n        _totalSupply -= amount;\n\n        emit Transfer(account, address(0), amount);\n\n        _afterTokenTransfer(account, address(0), amount);\n    }\n\n    /**\n     * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\n     *\n     * This internal function is equivalent to `approve`, and can be used to\n     * e.g. set automatic allowances for certain subsystems, etc.\n     *\n     * Emits an {Approval} event.\n     *\n     * Requirements:\n     *\n     * - `owner` cannot be the zero address.\n     * - `spender` cannot be the zero address.\n     */\n    function _approve(\n        address owner,\n        address spender,\n        uint256 amount\n    ) internal virtual {\n        require(owner != address(0), \"ERC20: approve from the zero address\");\n        require(spender != address(0), \"ERC20: approve to the zero address\");\n\n        _allowances[owner][spender] = amount;\n        emit Approval(owner, spender, amount);\n    }\n\n    /**\n     * @dev Hook that is called before any transfer of tokens. This includes\n     * minting and burning.\n     *\n     * Calling conditions:\n     *\n     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n     * will be transferred to `to`.\n     * - when `from` is zero, `amount` tokens will be minted for `to`.\n     * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\n     * - `from` and `to` are never both zero.\n     *\n     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n     */\n    function _beforeTokenTransfer(\n        address from,\n        address to,\n        uint256 amount\n    ) internal virtual {}\n\n    /**\n     * @dev Hook that is called after any transfer of tokens. This includes\n     * minting and burning.\n     *\n     * Calling conditions:\n     *\n     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n     * has been transferred to `to`.\n     * - when `from` is zero, `amount` tokens have been minted for `to`.\n     * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\n     * - `from` and `to` are never both zero.\n     *\n     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n     */\n    function _afterTokenTransfer(\n        address from,\n        address to,\n        uint256 amount\n    ) internal virtual {}\n    uint256[45] private __gap;\n}\n"},"contracts/interfaces/IWETH.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity =0.8.4;\n\ninterface IWETH {\n    function deposit() external payable;\n\n    function withdraw(uint256) external;\n\n    function balanceOf(address account) external view returns (uint256);\n\n    function transfer(address recipient, uint256 amount)\n        external\n        returns (bool);\n\n    function allowance(address owner, address spender)\n        external\n        view\n        returns (uint256);\n\n    function approve(address spender, uint256 amount) external returns (bool);\n\n    function transferFrom(\n        address sender,\n        address recipient,\n        uint256 amount\n    ) external returns (bool);\n\n    function decimals() external view returns (uint256);\n}\n"},"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\n * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\n *\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\n *\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\n */\nabstract contract Initializable {\n    /**\n     * @dev Indicates that the contract has been initialized.\n     */\n    bool private _initialized;\n\n    /**\n     * @dev Indicates that the contract is in the process of being initialized.\n     */\n    bool private _initializing;\n\n    /**\n     * @dev Modifier to protect an initializer function from being invoked twice.\n     */\n    modifier initializer() {\n        require(_initializing || !_initialized, \"Initializable: contract is already initialized\");\n\n        bool isTopLevelCall = !_initializing;\n        if (isTopLevelCall) {\n            _initializing = true;\n            _initialized = true;\n        }\n\n        _;\n\n        if (isTopLevelCall) {\n            _initializing = false;\n        }\n    }\n}\n"},"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract ContextUpgradeable is Initializable {\n    function __Context_init() internal initializer {\n        __Context_init_unchained();\n    }\n\n    function __Context_init_unchained() internal initializer {\n    }\n    function _msgSender() internal view virtual returns (address) {\n        return msg.sender;\n    }\n\n    function _msgData() internal view virtual returns (bytes calldata) {\n        return msg.data;\n    }\n    uint256[50] private __gap;\n}\n"},"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20Upgradeable {\n    /**\n     * @dev Returns the amount of tokens in existence.\n     */\n    function totalSupply() external view returns (uint256);\n\n    /**\n     * @dev Returns the amount of tokens owned by `account`.\n     */\n    function balanceOf(address account) external view returns (uint256);\n\n    /**\n     * @dev Moves `amount` tokens from the caller's account to `recipient`.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transfer(address recipient, uint256 amount) external returns (bool);\n\n    /**\n     * @dev Returns the remaining number of tokens that `spender` will be\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\n     * zero by default.\n     *\n     * This value changes when {approve} or {transferFrom} are called.\n     */\n    function allowance(address owner, address spender) external view returns (uint256);\n\n    /**\n     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\n     * that someone may use both the old and the new allowance by unfortunate\n     * transaction ordering. One possible solution to mitigate this race\n     * condition is to first reduce the spender's allowance to 0 and set the\n     * desired value afterwards:\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n     *\n     * Emits an {Approval} event.\n     */\n    function approve(address spender, uint256 amount) external returns (bool);\n\n    /**\n     * @dev Moves `amount` tokens from `sender` to `recipient` using the\n     * allowance mechanism. `amount` is then deducted from the caller's\n     * allowance.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transferFrom(\n        address sender,\n        address recipient,\n        uint256 amount\n    ) external returns (bool);\n\n    /**\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\n     * another (`to`).\n     *\n     * Note that `value` may be zero.\n     */\n    event Transfer(address indexed from, address indexed to, uint256 value);\n\n    /**\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n     * a call to {approve}. `value` is the new allowance.\n     */\n    event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n"},"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20MetadataUpgradeable.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20Upgradeable.sol\";\n\n/**\n * @dev Interface for the optional metadata functions from the ERC20 standard.\n *\n * _Available since v4.1._\n */\ninterface IERC20MetadataUpgradeable is IERC20Upgradeable {\n    /**\n     * @dev Returns the name of the token.\n     */\n    function name() external view returns (string memory);\n\n    /**\n     * @dev Returns the symbol of the token.\n     */\n    function symbol() external view returns (string memory);\n\n    /**\n     * @dev Returns the decimals places of the token.\n     */\n    function decimals() external view returns (uint8);\n}\n"}},"compilation":{"language":"Solidity","compiler":"solc","compilerVersion":"0.8.4+commit.c7e474f2","compilerSettings":{"metadata":{"useLiteralContent":true},"libraries":{"contracts/libraries/VaultLifecycleWithSwap.sol":{"VaultLifecycleWithSwap":"0xf7f4260943db50eee7e917330c35b460ff70ad54"}},"optimizer":{"runs":200,"enabled":true}},"name":"RibbonThetaVaultWithSwap","fullyQualifiedName":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},"abi":[{"type":"constructor","inputs":[{"name":"_weth","type":"address","internalType":"address"},{"name":"_usdc","type":"address","internalType":"address"},{"name":"_oTokenFactory","type":"address","internalType":"address"},{"name":"_gammaController","type":"address","internalType":"address"},{"name":"_marginPool","type":"address","internalType":"address"},{"name":"_swapContract","type":"address","internalType":"address"}],"stateMutability":"nonpayable"},{"name":"Approval","type":"event","inputs":[{"name":"owner","type":"address","indexed":true,"internalType":"address"},{"name":"spender","type":"address","indexed":true,"internalType":"address"},{"name":"value","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"name":"AuctionDurationSet","type":"event","inputs":[{"name":"auctionDuration","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"newAuctionDuration","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"name":"CapSet","type":"event","inputs":[{"name":"oldCap","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"newCap","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"name":"CloseShort","type":"event","inputs":[{"name":"options","type":"address","indexed":true,"internalType":"address"},{"name":"withdrawAmount","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"manager","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"name":"CollectVaultFees","type":"event","inputs":[{"name":"performanceFee","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"vaultFee","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"round","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"feeRecipient","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"name":"Deposit","type":"event","inputs":[{"name":"account","type":"address","indexed":true,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"round","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"name":"InitiateWithdraw","type":"event","inputs":[{"name":"account","type":"address","indexed":true,"internalType":"address"},{"name":"shares","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"round","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"name":"InstantWithdraw","type":"event","inputs":[{"name":"account","type":"address","indexed":true,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"round","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"name":"ManagementFeeSet","type":"event","inputs":[{"name":"managementFee","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"newManagementFee","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"name":"NewOffer","type":"event","inputs":[{"name":"swapId","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"seller","type":"address","indexed":false,"internalType":"address"},{"name":"oToken","type":"address","indexed":false,"internalType":"address"},{"name":"biddingToken","type":"address","indexed":false,"internalType":"address"},{"name":"minPrice","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"minBidSize","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"totalSize","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"name":"NewOptionStrikeSelected","type":"event","inputs":[{"name":"strikePrice","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"delta","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"name":"OpenShort","type":"event","inputs":[{"name":"options","type":"address","indexed":true,"internalType":"address"},{"name":"depositAmount","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"manager","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"name":"OwnershipTransferred","type":"event","inputs":[{"name":"previousOwner","type":"address","indexed":true,"internalType":"address"},{"name":"newOwner","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"name":"PerformanceFeeSet","type":"event","inputs":[{"name":"performanceFee","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"newPerformanceFee","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"name":"Redeem","type":"event","inputs":[{"name":"account","type":"address","indexed":true,"internalType":"address"},{"name":"share","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"round","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"name":"Transfer","type":"event","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"},{"name":"value","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"name":"Withdraw","type":"event","inputs":[{"name":"account","type":"address","indexed":true,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"shares","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"name":"DELAY","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"GAMMA_CONTROLLER","type":"function","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"name":"MARGIN_POOL","type":"function","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"name":"OTOKEN_FACTORY","type":"function","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"name":"PERIOD","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"SWAP_CONTRACT","type":"function","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"name":"USDC","type":"function","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"name":"WETH","type":"function","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"name":"accountVaultBalance","type":"function","inputs":[{"name":"account","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"allowance","type":"function","inputs":[{"name":"owner","type":"address","internalType":"address"},{"name":"spender","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"approve","type":"function","inputs":[{"name":"spender","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"name":"auctionDuration","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"balanceOf","type":"function","inputs":[{"name":"account","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"burnRemainingOTokens","type":"function","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"name":"cap","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"closeRound","type":"function","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"name":"commitNextOption","type":"function","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"name":"completeWithdraw","type":"function","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"name":"currentOption","type":"function","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"name":"currentOtokenPremium","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"currentQueuedWithdrawShares","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"decimals","type":"function","inputs":[],"outputs":[{"name":"","type":"uint8","internalType":"uint8"}],"stateMutability":"view"},{"name":"decreaseAllowance","type":"function","inputs":[{"name":"spender","type":"address","internalType":"address"},{"name":"subtractedValue","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"name":"deposit","type":"function","inputs":[{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"depositETH","type":"function","inputs":[],"outputs":[],"stateMutability":"payable"},{"name":"depositFor","type":"function","inputs":[{"name":"amount","type":"uint256","internalType":"uint256"},{"name":"creditor","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"depositReceipts","type":"function","inputs":[{"name":"","type":"address","internalType":"address"}],"outputs":[{"name":"round","type":"uint16","internalType":"uint16"},{"name":"amount","type":"uint104","internalType":"uint104"},{"name":"unredeemedShares","type":"uint128","internalType":"uint128"}],"stateMutability":"view"},{"name":"feeRecipient","type":"function","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"name":"increaseAllowance","type":"function","inputs":[{"name":"spender","type":"address","internalType":"address"},{"name":"addedValue","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"name":"initRounds","type":"function","inputs":[{"name":"numRounds","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"initialize","type":"function","inputs":[{"name":"_initParams","type":"tuple","components":[{"name":"_owner","type":"address","internalType":"address"},{"name":"_keeper","type":"address","internalType":"address"},{"name":"_feeRecipient","type":"address","internalType":"address"},{"name":"_managementFee","type":"uint256","internalType":"uint256"},{"name":"_performanceFee","type":"uint256","internalType":"uint256"},{"name":"_tokenName","type":"string","internalType":"string"},{"name":"_tokenSymbol","type":"string","internalType":"string"},{"name":"_optionsPremiumPricer","type":"address","internalType":"address"},{"name":"_strikeSelection","type":"address","internalType":"address"}],"internalType":"struct RibbonThetaVaultWithSwap.InitParams"},{"name":"_vaultParams","type":"tuple","components":[{"name":"isPut","type":"bool","internalType":"bool"},{"name":"decimals","type":"uint8","internalType":"uint8"},{"name":"asset","type":"address","internalType":"address"},{"name":"underlying","type":"address","internalType":"address"},{"name":"minimumSupply","type":"uint56","internalType":"uint56"},{"name":"cap","type":"uint104","internalType":"uint104"}],"internalType":"struct Vault.VaultParams"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"initiateWithdraw","type":"function","inputs":[{"name":"numShares","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"keeper","type":"function","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"name":"lastQueuedWithdrawAmount","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"lastStrikeOverrideRound","type":"function","inputs":[],"outputs":[{"name":"","type":"uint16","internalType":"uint16"}],"stateMutability":"view"},{"name":"liquidityGauge","type":"function","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"name":"managementFee","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"maxRedeem","type":"function","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"name":"name","type":"function","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"view"},{"name":"nextOption","type":"function","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"name":"nextOptionReadyAt","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"optionAuctionID","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"optionState","type":"function","inputs":[],"outputs":[{"name":"nextOption","type":"address","internalType":"address"},{"name":"currentOption","type":"address","internalType":"address"},{"name":"nextOptionReadyAt","type":"uint32","internalType":"uint32"}],"stateMutability":"view"},{"name":"optionsPremiumPricer","type":"function","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"name":"optionsPurchaseQueue","type":"function","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"name":"overriddenStrikePrice","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"owner","type":"function","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"name":"pausePosition","type":"function","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"name":"performanceFee","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"premiumDiscount","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"pricePerShare","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"redeem","type":"function","inputs":[{"name":"numShares","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"renounceOwnership","type":"function","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"name":"rollToNextOption","type":"function","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"name":"roundPricePerShare","type":"function","inputs":[{"name":"","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"setCap","type":"function","inputs":[{"name":"newCap","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"setFeeRecipient","type":"function","inputs":[{"name":"newFeeRecipient","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"setLiquidityGauge","type":"function","inputs":[{"name":"newLiquidityGauge","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"setManagementFee","type":"function","inputs":[{"name":"newManagementFee","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"setMinPrice","type":"function","inputs":[{"name":"minPrice","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"setNewKeeper","type":"function","inputs":[{"name":"newKeeper","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"setOptionsPremiumPricer","type":"function","inputs":[{"name":"newOptionsPremiumPricer","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"setPerformanceFee","type":"function","inputs":[{"name":"newPerformanceFee","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"setStrikePrice","type":"function","inputs":[{"name":"strikePrice","type":"uint128","internalType":"uint128"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"setStrikeSelection","type":"function","inputs":[{"name":"newStrikeSelection","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"setVaultPauser","type":"function","inputs":[{"name":"newVaultPauser","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"settleOffer","type":"function","inputs":[{"name":"bids","type":"tuple[]","components":[{"name":"swapId","type":"uint256","internalType":"uint256"},{"name":"nonce","type":"uint256","internalType":"uint256"},{"name":"signerWallet","type":"address","internalType":"address"},{"name":"sellAmount","type":"uint256","internalType":"uint256"},{"name":"buyAmount","type":"uint256","internalType":"uint256"},{"name":"referrer","type":"address","internalType":"address"},{"name":"v","type":"uint8","internalType":"uint8"},{"name":"r","type":"bytes32","internalType":"bytes32"},{"name":"s","type":"bytes32","internalType":"bytes32"}],"internalType":"struct ISwap.Bid[]"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"shareBalances","type":"function","inputs":[{"name":"account","type":"address","internalType":"address"}],"outputs":[{"name":"heldByAccount","type":"uint256","internalType":"uint256"},{"name":"heldByVault","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"shares","type":"function","inputs":[{"name":"account","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"stake","type":"function","inputs":[{"name":"numShares","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"strikeSelection","type":"function","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"name":"symbol","type":"function","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"view"},{"name":"totalBalance","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"totalPending","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"totalSupply","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"transfer","type":"function","inputs":[{"name":"recipient","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"name":"transferFrom","type":"function","inputs":[{"name":"sender","type":"address","internalType":"address"},{"name":"recipient","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"name":"transferOwnership","type":"function","inputs":[{"name":"newOwner","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"vaultParams","type":"function","inputs":[],"outputs":[{"name":"isPut","type":"bool","internalType":"bool"},{"name":"decimals","type":"uint8","internalType":"uint8"},{"name":"asset","type":"address","internalType":"address"},{"name":"underlying","type":"address","internalType":"address"},{"name":"minimumSupply","type":"uint56","internalType":"uint56"},{"name":"cap","type":"uint104","internalType":"uint104"}],"stateMutability":"view"},{"name":"vaultPauser","type":"function","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"name":"vaultState","type":"function","inputs":[],"outputs":[{"name":"round","type":"uint16","internalType":"uint16"},{"name":"lockedAmount","type":"uint104","internalType":"uint104"},{"name":"lastLockedAmount","type":"uint104","internalType":"uint104"},{"name":"totalPending","type":"uint128","internalType":"uint128"},{"name":"queuedWithdrawShares","type":"uint128","internalType":"uint128"}],"stateMutability":"view"},{"name":"withdrawInstantly","type":"function","inputs":[{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"withdrawals","type":"function","inputs":[{"name":"","type":"address","internalType":"address"}],"outputs":[{"name":"round","type":"uint16","internalType":"uint16"},{"name":"shares","type":"uint128","internalType":"uint128"}],"stateMutability":"view"}],"metadata":{"compiler":{"version":"0.8.4+commit.c7e474f2"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"address","name":"_weth","type":"address"},{"internalType":"address","name":"_usdc","type":"address"},{"internalType":"address","name":"_oTokenFactory","type":"address"},{"internalType":"address","name":"_gammaController","type":"address"},{"internalType":"address","name":"_marginPool","type":"address"},{"internalType":"address","name":"_swapContract","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"auctionDuration","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newAuctionDuration","type":"uint256"}],"name":"AuctionDurationSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldCap","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newCap","type":"uint256"}],"name":"CapSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"options","type":"address"},{"indexed":false,"internalType":"uint256","name":"withdrawAmount","type":"uint256"},{"indexed":true,"internalType":"address","name":"manager","type":"address"}],"name":"CloseShort","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"performanceFee","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"vaultFee","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"round","type":"uint256"},{"indexed":true,"internalType":"address","name":"feeRecipient","type":"address"}],"name":"CollectVaultFees","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"round","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"shares","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"round","type":"uint256"}],"name":"InitiateWithdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"round","type":"uint256"}],"name":"InstantWithdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"managementFee","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newManagementFee","type":"uint256"}],"name":"ManagementFeeSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"swapId","type":"uint256"},{"indexed":false,"internalType":"address","name":"seller","type":"address"},{"indexed":false,"internalType":"address","name":"oToken","type":"address"},{"indexed":false,"internalType":"address","name":"biddingToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"minPrice","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"minBidSize","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"totalSize","type":"uint256"}],"name":"NewOffer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"strikePrice","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"delta","type":"uint256"}],"name":"NewOptionStrikeSelected","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"options","type":"address"},{"indexed":false,"internalType":"uint256","name":"depositAmount","type":"uint256"},{"indexed":true,"internalType":"address","name":"manager","type":"address"}],"name":"OpenShort","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"performanceFee","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newPerformanceFee","type":"uint256"}],"name":"PerformanceFeeSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"share","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"round","type":"uint256"}],"name":"Redeem","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"shares","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"DELAY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"GAMMA_CONTROLLER","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MARGIN_POOL","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OTOKEN_FACTORY","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PERIOD","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SWAP_CONTRACT","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"USDC","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WETH","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"accountVaultBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"auctionDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"burnRemainingOTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"cap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"closeRound","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"commitNextOption","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"completeWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"currentOption","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currentOtokenPremium","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currentQueuedWithdrawShares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"depositETH","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"creditor","type":"address"}],"name":"depositFor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"depositReceipts","outputs":[{"internalType":"uint16","name":"round","type":"uint16"},{"internalType":"uint104","name":"amount","type":"uint104"},{"internalType":"uint128","name":"unredeemedShares","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feeRecipient","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"numRounds","type":"uint256"}],"name":"initRounds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_keeper","type":"address"},{"internalType":"address","name":"_feeRecipient","type":"address"},{"internalType":"uint256","name":"_managementFee","type":"uint256"},{"internalType":"uint256","name":"_performanceFee","type":"uint256"},{"internalType":"string","name":"_tokenName","type":"string"},{"internalType":"string","name":"_tokenSymbol","type":"string"},{"internalType":"address","name":"_optionsPremiumPricer","type":"address"},{"internalType":"address","name":"_strikeSelection","type":"address"}],"internalType":"struct RibbonThetaVaultWithSwap.InitParams","name":"_initParams","type":"tuple"},{"components":[{"internalType":"bool","name":"isPut","type":"bool"},{"internalType":"uint8","name":"decimals","type":"uint8"},{"internalType":"address","name":"asset","type":"address"},{"internalType":"address","name":"underlying","type":"address"},{"internalType":"uint56","name":"minimumSupply","type":"uint56"},{"internalType":"uint104","name":"cap","type":"uint104"}],"internalType":"struct Vault.VaultParams","name":"_vaultParams","type":"tuple"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"numShares","type":"uint256"}],"name":"initiateWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"keeper","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastQueuedWithdrawAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastStrikeOverrideRound","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"liquidityGauge","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"managementFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxRedeem","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nextOption","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nextOptionReadyAt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"optionAuctionID","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"optionState","outputs":[{"internalType":"address","name":"nextOption","type":"address"},{"internalType":"address","name":"currentOption","type":"address"},{"internalType":"uint32","name":"nextOptionReadyAt","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"optionsPremiumPricer","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"optionsPurchaseQueue","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"overriddenStrikePrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pausePosition","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"performanceFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"premiumDiscount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pricePerShare","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"numShares","type":"uint256"}],"name":"redeem","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rollToNextOption","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"roundPricePerShare","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"newCap","type":"uint256"}],"name":"setCap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newFeeRecipient","type":"address"}],"name":"setFeeRecipient","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newLiquidityGauge","type":"address"}],"name":"setLiquidityGauge","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newManagementFee","type":"uint256"}],"name":"setManagementFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"minPrice","type":"uint256"}],"name":"setMinPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newKeeper","type":"address"}],"name":"setNewKeeper","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOptionsPremiumPricer","type":"address"}],"name":"setOptionsPremiumPricer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newPerformanceFee","type":"uint256"}],"name":"setPerformanceFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint128","name":"strikePrice","type":"uint128"}],"name":"setStrikePrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newStrikeSelection","type":"address"}],"name":"setStrikeSelection","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newVaultPauser","type":"address"}],"name":"setVaultPauser","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"swapId","type":"uint256"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"address","name":"signerWallet","type":"address"},{"internalType":"uint256","name":"sellAmount","type":"uint256"},{"internalType":"uint256","name":"buyAmount","type":"uint256"},{"internalType":"address","name":"referrer","type":"address"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"internalType":"struct ISwap.Bid[]","name":"bids","type":"tuple[]"}],"name":"settleOffer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"shareBalances","outputs":[{"internalType":"uint256","name":"heldByAccount","type":"uint256"},{"internalType":"uint256","name":"heldByVault","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"shares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"numShares","type":"uint256"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"strikeSelection","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalPending","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"vaultParams","outputs":[{"internalType":"bool","name":"isPut","type":"bool"},{"internalType":"uint8","name":"decimals","type":"uint8"},{"internalType":"address","name":"asset","type":"address"},{"internalType":"address","name":"underlying","type":"address"},{"internalType":"uint56","name":"minimumSupply","type":"uint56"},{"internalType":"uint104","name":"cap","type":"uint104"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vaultPauser","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vaultState","outputs":[{"internalType":"uint16","name":"round","type":"uint16"},{"internalType":"uint104","name":"lockedAmount","type":"uint104"},{"internalType":"uint104","name":"lastLockedAmount","type":"uint104"},{"internalType":"uint128","name":"totalPending","type":"uint128"},{"internalType":"uint128","name":"queuedWithdrawShares","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawInstantly","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"withdrawals","outputs":[{"internalType":"uint16","name":"round","type":"uint16"},{"internalType":"uint128","name":"shares","type":"uint128"}],"stateMutability":"view","type":"function"}],"devdoc":{"kind":"dev","methods":{"accountVaultBalance(address)":{"params":{"account":"is the address to lookup balance for"},"returns":{"_0":"the amount of `asset` custodied by the vault for the user"}},"allowance(address,address)":{"details":"See {IERC20-allowance}."},"approve(address,uint256)":{"details":"See {IERC20-approve}. Requirements: - `spender` cannot be the zero address."},"balanceOf(address)":{"details":"See {IERC20-balanceOf}."},"constructor":{"params":{"_gammaController":"is the contract address for opyn actions","_marginPool":"is the contract address for providing collateral to opyn","_oTokenFactory":"is the contract address for minting new opyn option types (strikes, asset, expiry)","_swapContract":"is the contract address that facilitates bids settlement","_usdc":"is the USDC contract","_weth":"is the Wrapped Ether contract"}},"decreaseAllowance(address,uint256)":{"details":"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`."},"deposit(uint256)":{"params":{"amount":"is the amount of `asset` to deposit"}},"depositFor(uint256,address)":{"params":{"amount":"is the amount of `asset` to deposit","creditor":"is the address that can claim/withdraw deposited amount"}},"increaseAllowance(address,uint256)":{"details":"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address."},"initRounds(uint256)":{"params":{"numRounds":"is the number of rounds to initialize in the map"}},"initialize((address,address,address,uint256,uint256,string,string,address,address),(bool,uint8,address,address,uint56,uint104))":{"params":{"_initParams":"is the struct with vault initialization parameters","_vaultParams":"is the struct with vault general data"}},"initiateWithdraw(uint256)":{"params":{"numShares":"is the number of shares to withdraw"}},"name()":{"details":"Returns the name of the token."},"owner()":{"details":"Returns the address of the current owner."},"redeem(uint256)":{"params":{"numShares":"is the number of shares to redeem"}},"renounceOwnership()":{"details":"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner."},"setCap(uint256)":{"params":{"newCap":"is the new cap for deposits"}},"setFeeRecipient(address)":{"params":{"newFeeRecipient":"is the address of the new fee recipient"}},"setLiquidityGauge(address)":{"params":{"newLiquidityGauge":"is the address of the new liquidityGauge contract"}},"setManagementFee(uint256)":{"params":{"newManagementFee":"is the management fee (6 decimals). ex: 2 * 10 ** 6 = 2%"}},"setMinPrice(uint256)":{"params":{"minPrice":"is the new oToken Premium in the units of 10**18"}},"setNewKeeper(address)":{"params":{"newKeeper":"is the address of the new keeper"}},"setOptionsPremiumPricer(address)":{"params":{"newOptionsPremiumPricer":"is the address of the new strike selection contract"}},"setPerformanceFee(uint256)":{"params":{"newPerformanceFee":"is the performance fee (6 decimals). ex: 20 * 10 ** 6 = 20%"}},"setStrikePrice(uint128)":{"params":{"strikePrice":"is the strike price of the new oTokens (decimals = 8)"}},"setStrikeSelection(address)":{"params":{"newStrikeSelection":"is the address of the new strike selection contract"}},"setVaultPauser(address)":{"params":{"newVaultPauser":"is the address of the new vaultPauser contract"}},"shareBalances(address)":{"params":{"account":"is the account to lookup share balance for"},"returns":{"heldByAccount":"is the shares held by account","heldByVault":"is the shares held on the vault (unredeemedShares)"}},"shares(address)":{"params":{"account":"is the account to lookup share balance for"},"returns":{"_0":"the share balance"}},"stake(uint256)":{"params":{"numShares":"is the number of shares to stake"}},"symbol()":{"details":"Returns the symbol of the token, usually a shorter version of the name."},"totalBalance()":{"returns":{"_0":"total balance of the vault, including the amounts locked in third party protocols"}},"totalSupply()":{"details":"See {IERC20-totalSupply}."},"transfer(address,uint256)":{"details":"See {IERC20-transfer}. Requirements: - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`."},"transferFrom(address,address,uint256)":{"details":"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for ``sender``'s tokens of at least `amount`."},"transferOwnership(address)":{"details":"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner."},"withdrawInstantly(uint256)":{"params":{"amount":"is the amount to withdraw"}}},"version":1},"userdoc":{"kind":"user","methods":{"DELAY()":{"notice":"Deprecated: 15 minute timelock between commitAndClose and rollToNexOption."},"OTOKEN_FACTORY()":{"notice":"oTokenFactory is the factory contract used to spawn otokens. Used to lookup otokens."},"PERIOD()":{"notice":"7 day period between each options sale."},"USDC()":{"notice":"USDC 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"},"WETH()":{"notice":"WETH9 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"},"accountVaultBalance(address)":{"notice":"Returns the asset balance held on the vault for the account"},"burnRemainingOTokens()":{"notice":"Burn the remaining oTokens left over"},"closeRound()":{"notice":"Closes the existing short and calculate the shares to mint, new price per share & amount of funds to re-allocate as collateral for the new round Since we are incrementing the round here, the options are sold in the beginning of a round instead of at the end of the round. For example, at round 1, we don't sell any options. We start selling options at the beginning of round 2."},"commitNextOption()":{"notice":"Sets the next option the vault will be shorting"},"completeWithdraw()":{"notice":"Completes a scheduled withdrawal from a past round. Uses finalized pps for the round"},"constructor":{"notice":"Initializes the contract with immutable variables"},"decimals()":{"notice":"Returns the token decimals"},"deposit(uint256)":{"notice":"Deposits the `asset` from msg.sender."},"depositETH()":{"notice":"Deposits ETH into the contract and mint vault shares. Reverts if the asset is not WETH."},"depositFor(uint256,address)":{"notice":"Deposits the `asset` from msg.sender added to `creditor`'s deposit.Used for vault -> vault deposits on the user's behalf"},"depositReceipts(address)":{"notice":"Stores the user's pending deposit for the round"},"feeRecipient()":{"notice":"Fee recipient for the performance and management fees"},"initRounds(uint256)":{"notice":"Helper function that helps to save gas for writing values into the roundPricePerShare map.         Writing `1` into the map makes subsequent writes warm, reducing the gas from 20k to 5k.         Having 1 initialized beforehand will not be an issue as long as we round down share calculations to 0."},"initialize((address,address,address,uint256,uint256,string,string,address,address),(bool,uint8,address,address,uint56,uint104))":{"notice":"Initializes the OptionVault contract with storage variables."},"initiateWithdraw(uint256)":{"notice":"Initiates a withdrawal that can be processed once the round completes"},"keeper()":{"notice":"role in charge of weekly vault operations such as rollToNextOption and burnRemainingOTokens"},"managementFee()":{"notice":"Management fee charged on entire AUM in rollToNextOption. Only charged when there is no loss."},"maxRedeem()":{"notice":"Redeems the entire unredeemedShares balance that is owed to the account"},"optionState()":{"notice":"Vault's state of the options sold and the timelocked option"},"pausePosition()":{"notice":"pause a user's vault position"},"performanceFee()":{"notice":"Performance fee charged on premiums earned in rollToNextOption. Only charged when there is no loss."},"pricePerShare()":{"notice":"The price of a unit of share denominated in the `asset`"},"redeem(uint256)":{"notice":"Redeems shares that are owed to the account"},"rollToNextOption()":{"notice":"Rolls the vault's funds into a new short position and create a new offer."},"roundPricePerShare(uint256)":{"notice":"On every round's close, the pricePerShare value of an rTHETA token is stored This is used to determine the number of shares to be returned to a user with their DepositReceipt.depositAmount"},"setCap(uint256)":{"notice":"Sets a new cap for deposits"},"setFeeRecipient(address)":{"notice":"Sets the new fee recipient"},"setLiquidityGauge(address)":{"notice":"Sets the new liquidityGauge contract for this vault"},"setManagementFee(uint256)":{"notice":"Sets the management fee for the vault"},"setMinPrice(uint256)":{"notice":"Sets oToken Premium"},"setNewKeeper(address)":{"notice":"Sets the new keeper"},"setOptionsPremiumPricer(address)":{"notice":"Sets the new options premium pricer contract"},"setPerformanceFee(uint256)":{"notice":"Sets the performance fee for the vault"},"setStrikePrice(uint128)":{"notice":"Optionality to set strike price manually Should be called after closeRound if we are setting current week's strike"},"setStrikeSelection(address)":{"notice":"Sets the new strike selection contract"},"setVaultPauser(address)":{"notice":"Sets the new Vault Pauser contract for this vault"},"settleOffer((uint256,uint256,address,uint256,uint256,address,uint8,bytes32,bytes32)[])":{"notice":"Settle current offer"},"shareBalances(address)":{"notice":"Getter for returning the account's share balance split between account and vault holdings"},"shares(address)":{"notice":"Getter for returning the account's share balance including unredeemed shares"},"stake(uint256)":{"notice":"Stakes a users vault shares"},"totalBalance()":{"notice":"Returns the vault's total balance, including the amounts locked into a short position"},"vaultParams()":{"notice":"Vault's parameters like cap, decimals"},"vaultState()":{"notice":"Vault's lifecycle state like round and locked amounts"},"withdrawInstantly(uint256)":{"notice":"Withdraws the assets on the vault using the outstanding `DepositReceipt.amount`"},"withdrawals(address)":{"notice":"Stores pending user withdrawals"}},"notice":"UPGRADEABILITY: Since we use the upgradeable proxy pattern, we must observe the inheritance chain closely. Any changes/appends in storage variable needs to happen in RibbonThetaVaultStorage. RibbonThetaVault should not inherit from any other contract aside from RibbonVault, RibbonThetaVaultStorage","version":1}},"settings":{"compilationTarget":{"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol":"RibbonThetaVaultWithSwap"},"evmVersion":"istanbul","libraries":{"contracts/libraries/VaultLifecycleWithSwap.sol:VaultLifecycleWithSwap":"0xf7f4260943db50eee7e917330c35b460ff70ad54"},"metadata":{"bytecodeHash":"ipfs","useLiteralContent":true},"optimizer":{"enabled":true,"runs":200},"remappings":[]},"sources":{"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../utils/ContextUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\n    address private _owner;\n\n    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n    /**\n     * @dev Initializes the contract setting the deployer as the initial owner.\n     */\n    function __Ownable_init() internal initializer {\n        __Context_init_unchained();\n        __Ownable_init_unchained();\n    }\n\n    function __Ownable_init_unchained() internal initializer {\n        _setOwner(_msgSender());\n    }\n\n    /**\n     * @dev Returns the address of the current owner.\n     */\n    function owner() public view virtual returns (address) {\n        return _owner;\n    }\n\n    /**\n     * @dev Throws if called by any account other than the owner.\n     */\n    modifier onlyOwner() {\n        require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n        _;\n    }\n\n    /**\n     * @dev Leaves the contract without owner. It will not be possible to call\n     * `onlyOwner` functions anymore. Can only be called by the current owner.\n     *\n     * NOTE: Renouncing ownership will leave the contract without an owner,\n     * thereby removing any functionality that is only available to the owner.\n     */\n    function renounceOwnership() public virtual onlyOwner {\n        _setOwner(address(0));\n    }\n\n    /**\n     * @dev Transfers ownership of the contract to a new account (`newOwner`).\n     * Can only be called by the current owner.\n     */\n    function transferOwnership(address newOwner) public virtual onlyOwner {\n        require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n        _setOwner(newOwner);\n    }\n\n    function _setOwner(address newOwner) private {\n        address oldOwner = _owner;\n        _owner = newOwner;\n        emit OwnershipTransferred(oldOwner, newOwner);\n    }\n    uint256[49] private __gap;\n}\n","keccak256":"0x35b09b69aca3bc2633da8f47382a81ecf367efe57167a2114f60f9ec81988afa","license":"MIT"},"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\n * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\n *\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\n *\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\n */\nabstract contract Initializable {\n    /**\n     * @dev Indicates that the contract has been initialized.\n     */\n    bool private _initialized;\n\n    /**\n     * @dev Indicates that the contract is in the process of being initialized.\n     */\n    bool private _initializing;\n\n    /**\n     * @dev Modifier to protect an initializer function from being invoked twice.\n     */\n    modifier initializer() {\n        require(_initializing || !_initialized, \"Initializable: contract is already initialized\");\n\n        bool isTopLevelCall = !_initializing;\n        if (isTopLevelCall) {\n            _initializing = true;\n            _initialized = true;\n        }\n\n        _;\n\n        if (isTopLevelCall) {\n            _initializing = false;\n        }\n    }\n}\n","keccak256":"0x8b2abd85d0ece7e866e100e9d47ca9cbec93c87cf71a8d267b2b93eb81f7d5e9","license":"MIT"},"@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module that helps prevent reentrant calls to a function.\n *\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\n * available, which can be applied to functions to make sure there are no nested\n * (reentrant) calls to them.\n *\n * Note that because there is a single `nonReentrant` guard, functions marked as\n * `nonReentrant` may not call one another. This can be worked around by making\n * those functions `private`, and then adding `external` `nonReentrant` entry\n * points to them.\n *\n * TIP: If you would like to learn more about reentrancy and alternative ways\n * to protect against it, check out our blog post\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\n */\nabstract contract ReentrancyGuardUpgradeable is Initializable {\n    // Booleans are more expensive than uint256 or any type that takes up a full\n    // word because each write operation emits an extra SLOAD to first read the\n    // slot's contents, replace the bits taken up by the boolean, and then write\n    // back. This is the compiler's defense against contract upgrades and\n    // pointer aliasing, and it cannot be disabled.\n\n    // The values being non-zero value makes deployment a bit more expensive,\n    // but in exchange the refund on every call to nonReentrant will be lower in\n    // amount. Since refunds are capped to a percentage of the total\n    // transaction's gas, it is best to keep them low in cases like this one, to\n    // increase the likelihood of the full refund coming into effect.\n    uint256 private constant _NOT_ENTERED = 1;\n    uint256 private constant _ENTERED = 2;\n\n    uint256 private _status;\n\n    function __ReentrancyGuard_init() internal initializer {\n        __ReentrancyGuard_init_unchained();\n    }\n\n    function __ReentrancyGuard_init_unchained() internal initializer {\n        _status = _NOT_ENTERED;\n    }\n\n    /**\n     * @dev Prevents a contract from calling itself, directly or indirectly.\n     * Calling a `nonReentrant` function from another `nonReentrant`\n     * function is not supported. It is possible to prevent this from happening\n     * by making the `nonReentrant` function external, and make it call a\n     * `private` function that does the actual work.\n     */\n    modifier nonReentrant() {\n        // On the first call to nonReentrant, _notEntered will be true\n        require(_status != _ENTERED, \"ReentrancyGuard: reentrant call\");\n\n        // Any calls to nonReentrant after this point will fail\n        _status = _ENTERED;\n\n        _;\n\n        // By storing the original value once again, a refund is triggered (see\n        // https://eips.ethereum.org/EIPS/eip-2200)\n        _status = _NOT_ENTERED;\n    }\n    uint256[49] private __gap;\n}\n","keccak256":"0x89fa60d14355f7ae06af11e28fce2bb90c5c6186645d681a30e1b36234a4c210","license":"MIT"},"@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./IERC20Upgradeable.sol\";\nimport \"./extensions/IERC20MetadataUpgradeable.sol\";\nimport \"../../utils/ContextUpgradeable.sol\";\nimport \"../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Implementation of the {IERC20} interface.\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n * For a generic mechanism see {ERC20PresetMinterPauser}.\n *\n * TIP: For a detailed writeup see our guide\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\n *\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\n * instead returning `false` on failure. This behavior is nonetheless\n * conventional and does not conflict with the expectations of ERC20\n * applications.\n *\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\n * This allows applications to reconstruct the allowance for all accounts just\n * by listening to said events. Other implementations of the EIP may not emit\n * these events, as it isn't required by the specification.\n *\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\n * functions have been added to mitigate the well-known issues around setting\n * allowances. See {IERC20-approve}.\n */\ncontract ERC20Upgradeable is Initializable, ContextUpgradeable, IERC20Upgradeable, IERC20MetadataUpgradeable {\n    mapping(address => uint256) private _balances;\n\n    mapping(address => mapping(address => uint256)) private _allowances;\n\n    uint256 private _totalSupply;\n\n    string private _name;\n    string private _symbol;\n\n    /**\n     * @dev Sets the values for {name} and {symbol}.\n     *\n     * The default value of {decimals} is 18. To select a different value for\n     * {decimals} you should overload it.\n     *\n     * All two of these values are immutable: they can only be set once during\n     * construction.\n     */\n    function __ERC20_init(string memory name_, string memory symbol_) internal initializer {\n        __Context_init_unchained();\n        __ERC20_init_unchained(name_, symbol_);\n    }\n\n    function __ERC20_init_unchained(string memory name_, string memory symbol_) internal initializer {\n        _name = name_;\n        _symbol = symbol_;\n    }\n\n    /**\n     * @dev Returns the name of the token.\n     */\n    function name() public view virtual override returns (string memory) {\n        return _name;\n    }\n\n    /**\n     * @dev Returns the symbol of the token, usually a shorter version of the\n     * name.\n     */\n    function symbol() public view virtual override returns (string memory) {\n        return _symbol;\n    }\n\n    /**\n     * @dev Returns the number of decimals used to get its user representation.\n     * For example, if `decimals` equals `2`, a balance of `505` tokens should\n     * be displayed to a user as `5.05` (`505 / 10 ** 2`).\n     *\n     * Tokens usually opt for a value of 18, imitating the relationship between\n     * Ether and Wei. This is the value {ERC20} uses, unless this function is\n     * overridden;\n     *\n     * NOTE: This information is only used for _display_ purposes: it in\n     * no way affects any of the arithmetic of the contract, including\n     * {IERC20-balanceOf} and {IERC20-transfer}.\n     */\n    function decimals() public view virtual override returns (uint8) {\n        return 18;\n    }\n\n    /**\n     * @dev See {IERC20-totalSupply}.\n     */\n    function totalSupply() public view virtual override returns (uint256) {\n        return _totalSupply;\n    }\n\n    /**\n     * @dev See {IERC20-balanceOf}.\n     */\n    function balanceOf(address account) public view virtual override returns (uint256) {\n        return _balances[account];\n    }\n\n    /**\n     * @dev See {IERC20-transfer}.\n     *\n     * Requirements:\n     *\n     * - `recipient` cannot be the zero address.\n     * - the caller must have a balance of at least `amount`.\n     */\n    function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\n        _transfer(_msgSender(), recipient, amount);\n        return true;\n    }\n\n    /**\n     * @dev See {IERC20-allowance}.\n     */\n    function allowance(address owner, address spender) public view virtual override returns (uint256) {\n        return _allowances[owner][spender];\n    }\n\n    /**\n     * @dev See {IERC20-approve}.\n     *\n     * Requirements:\n     *\n     * - `spender` cannot be the zero address.\n     */\n    function approve(address spender, uint256 amount) public virtual override returns (bool) {\n        _approve(_msgSender(), spender, amount);\n        return true;\n    }\n\n    /**\n     * @dev See {IERC20-transferFrom}.\n     *\n     * Emits an {Approval} event indicating the updated allowance. This is not\n     * required by the EIP. See the note at the beginning of {ERC20}.\n     *\n     * Requirements:\n     *\n     * - `sender` and `recipient` cannot be the zero address.\n     * - `sender` must have a balance of at least `amount`.\n     * - the caller must have allowance for ``sender``'s tokens of at least\n     * `amount`.\n     */\n    function transferFrom(\n        address sender,\n        address recipient,\n        uint256 amount\n    ) public virtual override returns (bool) {\n        _transfer(sender, recipient, amount);\n\n        uint256 currentAllowance = _allowances[sender][_msgSender()];\n        require(currentAllowance >= amount, \"ERC20: transfer amount exceeds allowance\");\n        unchecked {\n            _approve(sender, _msgSender(), currentAllowance - amount);\n        }\n\n        return true;\n    }\n\n    /**\n     * @dev Atomically increases the allowance granted to `spender` by the caller.\n     *\n     * This is an alternative to {approve} that can be used as a mitigation for\n     * problems described in {IERC20-approve}.\n     *\n     * Emits an {Approval} event indicating the updated allowance.\n     *\n     * Requirements:\n     *\n     * - `spender` cannot be the zero address.\n     */\n    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\n        _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue);\n        return true;\n    }\n\n    /**\n     * @dev Atomically decreases the allowance granted to `spender` by the caller.\n     *\n     * This is an alternative to {approve} that can be used as a mitigation for\n     * problems described in {IERC20-approve}.\n     *\n     * Emits an {Approval} event indicating the updated allowance.\n     *\n     * Requirements:\n     *\n     * - `spender` cannot be the zero address.\n     * - `spender` must have allowance for the caller of at least\n     * `subtractedValue`.\n     */\n    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\n        uint256 currentAllowance = _allowances[_msgSender()][spender];\n        require(currentAllowance >= subtractedValue, \"ERC20: decreased allowance below zero\");\n        unchecked {\n            _approve(_msgSender(), spender, currentAllowance - subtractedValue);\n        }\n\n        return true;\n    }\n\n    /**\n     * @dev Moves `amount` of tokens from `sender` to `recipient`.\n     *\n     * This internal function is equivalent to {transfer}, and can be used to\n     * e.g. implement automatic token fees, slashing mechanisms, etc.\n     *\n     * Emits a {Transfer} event.\n     *\n     * Requirements:\n     *\n     * - `sender` cannot be the zero address.\n     * - `recipient` cannot be the zero address.\n     * - `sender` must have a balance of at least `amount`.\n     */\n    function _transfer(\n        address sender,\n        address recipient,\n        uint256 amount\n    ) internal virtual {\n        require(sender != address(0), \"ERC20: transfer from the zero address\");\n        require(recipient != address(0), \"ERC20: transfer to the zero address\");\n\n        _beforeTokenTransfer(sender, recipient, amount);\n\n        uint256 senderBalance = _balances[sender];\n        require(senderBalance >= amount, \"ERC20: transfer amount exceeds balance\");\n        unchecked {\n            _balances[sender] = senderBalance - amount;\n        }\n        _balances[recipient] += amount;\n\n        emit Transfer(sender, recipient, amount);\n\n        _afterTokenTransfer(sender, recipient, amount);\n    }\n\n    /** @dev Creates `amount` tokens and assigns them to `account`, increasing\n     * the total supply.\n     *\n     * Emits a {Transfer} event with `from` set to the zero address.\n     *\n     * Requirements:\n     *\n     * - `account` cannot be the zero address.\n     */\n    function _mint(address account, uint256 amount) internal virtual {\n        require(account != address(0), \"ERC20: mint to the zero address\");\n\n        _beforeTokenTransfer(address(0), account, amount);\n\n        _totalSupply += amount;\n        _balances[account] += amount;\n        emit Transfer(address(0), account, amount);\n\n        _afterTokenTransfer(address(0), account, amount);\n    }\n\n    /**\n     * @dev Destroys `amount` tokens from `account`, reducing the\n     * total supply.\n     *\n     * Emits a {Transfer} event with `to` set to the zero address.\n     *\n     * Requirements:\n     *\n     * - `account` cannot be the zero address.\n     * - `account` must have at least `amount` tokens.\n     */\n    function _burn(address account, uint256 amount) internal virtual {\n        require(account != address(0), \"ERC20: burn from the zero address\");\n\n        _beforeTokenTransfer(account, address(0), amount);\n\n        uint256 accountBalance = _balances[account];\n        require(accountBalance >= amount, \"ERC20: burn amount exceeds balance\");\n        unchecked {\n            _balances[account] = accountBalance - amount;\n        }\n        _totalSupply -= amount;\n\n        emit Transfer(account, address(0), amount);\n\n        _afterTokenTransfer(account, address(0), amount);\n    }\n\n    /**\n     * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\n     *\n     * This internal function is equivalent to `approve`, and can be used to\n     * e.g. set automatic allowances for certain subsystems, etc.\n     *\n     * Emits an {Approval} event.\n     *\n     * Requirements:\n     *\n     * - `owner` cannot be the zero address.\n     * - `spender` cannot be the zero address.\n     */\n    function _approve(\n        address owner,\n        address spender,\n        uint256 amount\n    ) internal virtual {\n        require(owner != address(0), \"ERC20: approve from the zero address\");\n        require(spender != address(0), \"ERC20: approve to the zero address\");\n\n        _allowances[owner][spender] = amount;\n        emit Approval(owner, spender, amount);\n    }\n\n    /**\n     * @dev Hook that is called before any transfer of tokens. This includes\n     * minting and burning.\n     *\n     * Calling conditions:\n     *\n     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n     * will be transferred to `to`.\n     * - when `from` is zero, `amount` tokens will be minted for `to`.\n     * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\n     * - `from` and `to` are never both zero.\n     *\n     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n     */\n    function _beforeTokenTransfer(\n        address from,\n        address to,\n        uint256 amount\n    ) internal virtual {}\n\n    /**\n     * @dev Hook that is called after any transfer of tokens. This includes\n     * minting and burning.\n     *\n     * Calling conditions:\n     *\n     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n     * has been transferred to `to`.\n     * - when `from` is zero, `amount` tokens have been minted for `to`.\n     * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\n     * - `from` and `to` are never both zero.\n     *\n     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n     */\n    function _afterTokenTransfer(\n        address from,\n        address to,\n        uint256 amount\n    ) internal virtual {}\n    uint256[45] private __gap;\n}\n","keccak256":"0x891fbf39ac5b9524f417db912d33684f239195a0fc5c11db439659676e51aab6","license":"MIT"},"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20Upgradeable {\n    /**\n     * @dev Returns the amount of tokens in existence.\n     */\n    function totalSupply() external view returns (uint256);\n\n    /**\n     * @dev Returns the amount of tokens owned by `account`.\n     */\n    function balanceOf(address account) external view returns (uint256);\n\n    /**\n     * @dev Moves `amount` tokens from the caller's account to `recipient`.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transfer(address recipient, uint256 amount) external returns (bool);\n\n    /**\n     * @dev Returns the remaining number of tokens that `spender` will be\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\n     * zero by default.\n     *\n     * This value changes when {approve} or {transferFrom} are called.\n     */\n    function allowance(address owner, address spender) external view returns (uint256);\n\n    /**\n     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\n     * that someone may use both the old and the new allowance by unfortunate\n     * transaction ordering. One possible solution to mitigate this race\n     * condition is to first reduce the spender's allowance to 0 and set the\n     * desired value afterwards:\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n     *\n     * Emits an {Approval} event.\n     */\n    function approve(address spender, uint256 amount) external returns (bool);\n\n    /**\n     * @dev Moves `amount` tokens from `sender` to `recipient` using the\n     * allowance mechanism. `amount` is then deducted from the caller's\n     * allowance.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transferFrom(\n        address sender,\n        address recipient,\n        uint256 amount\n    ) external returns (bool);\n\n    /**\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\n     * another (`to`).\n     *\n     * Note that `value` may be zero.\n     */\n    event Transfer(address indexed from, address indexed to, uint256 value);\n\n    /**\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n     * a call to {approve}. `value` is the new allowance.\n     */\n    event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n","keccak256":"0xf449ca0a763d4b1b4462cf8706857074492f324020a2b9d099181b5383055ad3","license":"MIT"},"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20MetadataUpgradeable.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20Upgradeable.sol\";\n\n/**\n * @dev Interface for the optional metadata functions from the ERC20 standard.\n *\n * _Available since v4.1._\n */\ninterface IERC20MetadataUpgradeable is IERC20Upgradeable {\n    /**\n     * @dev Returns the name of the token.\n     */\n    function name() external view returns (string memory);\n\n    /**\n     * @dev Returns the symbol of the token.\n     */\n    function symbol() external view returns (string memory);\n\n    /**\n     * @dev Returns the decimals places of the token.\n     */\n    function decimals() external view returns (uint8);\n}\n","keccak256":"0x6795c369a4eefa78468e38966f7851fbc2dda5e5b9ccd3fa2b45970e2e4d3abd","license":"MIT"},"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract ContextUpgradeable is Initializable {\n    function __Context_init() internal initializer {\n        __Context_init_unchained();\n    }\n\n    function __Context_init_unchained() internal initializer {\n    }\n    function _msgSender() internal view virtual returns (address) {\n        return msg.sender;\n    }\n\n    function _msgData() internal view virtual returns (bytes calldata) {\n        return msg.data;\n    }\n    uint256[50] private __gap;\n}\n","keccak256":"0x062b5a0f7cc6b0528fa350033759f3a15ba42afb57423d7c593753860f2c82e0","license":"MIT"},"@openzeppelin/contracts/token/ERC20/IERC20.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n    /**\n     * @dev Returns the amount of tokens in existence.\n     */\n    function totalSupply() external view returns (uint256);\n\n    /**\n     * @dev Returns the amount of tokens owned by `account`.\n     */\n    function balanceOf(address account) external view returns (uint256);\n\n    /**\n     * @dev Moves `amount` tokens from the caller's account to `recipient`.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transfer(address recipient, uint256 amount) external returns (bool);\n\n    /**\n     * @dev Returns the remaining number of tokens that `spender` will be\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\n     * zero by default.\n     *\n     * This value changes when {approve} or {transferFrom} are called.\n     */\n    function allowance(address owner, address spender) external view returns (uint256);\n\n    /**\n     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\n     * that someone may use both the old and the new allowance by unfortunate\n     * transaction ordering. One possible solution to mitigate this race\n     * condition is to first reduce the spender's allowance to 0 and set the\n     * desired value afterwards:\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n     *\n     * Emits an {Approval} event.\n     */\n    function approve(address spender, uint256 amount) external returns (bool);\n\n    /**\n     * @dev Moves `amount` tokens from `sender` to `recipient` using the\n     * allowance mechanism. `amount` is then deducted from the caller's\n     * allowance.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transferFrom(\n        address sender,\n        address recipient,\n        uint256 amount\n    ) external returns (bool);\n\n    /**\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\n     * another (`to`).\n     *\n     * Note that `value` may be zero.\n     */\n    event Transfer(address indexed from, address indexed to, uint256 value);\n\n    /**\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n     * a call to {approve}. `value` is the new allowance.\n     */\n    event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n","keccak256":"0x027b891937d20ccf213fdb9c31531574256de774bda99d3a70ecef6e1913ed2a","license":"MIT"},"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20.sol\";\nimport \"../../../utils/Address.sol\";\n\n/**\n * @title SafeERC20\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\n * contract returns false). Tokens that return no value (and instead revert or\n * throw on failure) are also supported, non-reverting calls are assumed to be\n * successful.\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\n */\nlibrary SafeERC20 {\n    using Address for address;\n\n    function safeTransfer(\n        IERC20 token,\n        address to,\n        uint256 value\n    ) internal {\n        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\n    }\n\n    function safeTransferFrom(\n        IERC20 token,\n        address from,\n        address to,\n        uint256 value\n    ) internal {\n        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\n    }\n\n    /**\n     * @dev Deprecated. This function has issues similar to the ones found in\n     * {IERC20-approve}, and its usage is discouraged.\n     *\n     * Whenever possible, use {safeIncreaseAllowance} and\n     * {safeDecreaseAllowance} instead.\n     */\n    function safeApprove(\n        IERC20 token,\n        address spender,\n        uint256 value\n    ) internal {\n        // safeApprove should only be called when setting an initial allowance,\n        // or when resetting it to zero. To increase and decrease it, use\n        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\n        require(\n            (value == 0) || (token.allowance(address(this), spender) == 0),\n            \"SafeERC20: approve from non-zero to non-zero allowance\"\n        );\n        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\n    }\n\n    function safeIncreaseAllowance(\n        IERC20 token,\n        address spender,\n        uint256 value\n    ) internal {\n        uint256 newAllowance = token.allowance(address(this), spender) + value;\n        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n    }\n\n    function safeDecreaseAllowance(\n        IERC20 token,\n        address spender,\n        uint256 value\n    ) internal {\n        unchecked {\n            uint256 oldAllowance = token.allowance(address(this), spender);\n            require(oldAllowance >= value, \"SafeERC20: decreased allowance below zero\");\n            uint256 newAllowance = oldAllowance - value;\n            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n        }\n    }\n\n    /**\n     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n     * on the return value: the return value is optional (but if data is returned, it must not be false).\n     * @param token The token targeted by the call.\n     * @param data The call data (encoded using abi.encode or one of its variants).\n     */\n    function _callOptionalReturn(IERC20 token, bytes memory data) private {\n        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\n        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that\n        // the target address contains contract code and also asserts for success in the low-level call.\n\n        bytes memory returndata = address(token).functionCall(data, \"SafeERC20: low-level call failed\");\n        if (returndata.length > 0) {\n            // Return data is optional\n            require(abi.decode(returndata, (bool)), \"SafeERC20: ERC20 operation did not succeed\");\n        }\n    }\n}\n","keccak256":"0x02348b2e4b9f3200c7e3907c5c2661643a6d8520e9f79939fbb9b4005a54894d","license":"MIT"},"@openzeppelin/contracts/utils/Address.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n    /**\n     * @dev Returns true if `account` is a contract.\n     *\n     * [IMPORTANT]\n     * ====\n     * It is unsafe to assume that an address for which this function returns\n     * false is an externally-owned account (EOA) and not a contract.\n     *\n     * Among others, `isContract` will return false for the following\n     * types of addresses:\n     *\n     *  - an externally-owned account\n     *  - a contract in construction\n     *  - an address where a contract will be created\n     *  - an address where a contract lived, but was destroyed\n     * ====\n     */\n    function isContract(address account) internal view returns (bool) {\n        // This method relies on extcodesize, which returns 0 for contracts in\n        // construction, since the code is only stored at the end of the\n        // constructor execution.\n\n        uint256 size;\n        assembly {\n            size := extcodesize(account)\n        }\n        return size > 0;\n    }\n\n    /**\n     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n     * `recipient`, forwarding all available gas and reverting on errors.\n     *\n     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n     * of certain opcodes, possibly making contracts go over the 2300 gas limit\n     * imposed by `transfer`, making them unable to receive funds via\n     * `transfer`. {sendValue} removes this limitation.\n     *\n     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n     *\n     * IMPORTANT: because control is transferred to `recipient`, care must be\n     * taken to not create reentrancy vulnerabilities. Consider using\n     * {ReentrancyGuard} or the\n     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n     */\n    function sendValue(address payable recipient, uint256 amount) internal {\n        require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n        (bool success, ) = recipient.call{value: amount}(\"\");\n        require(success, \"Address: unable to send value, recipient may have reverted\");\n    }\n\n    /**\n     * @dev Performs a Solidity function call using a low level `call`. A\n     * plain `call` is an unsafe replacement for a function call: use this\n     * function instead.\n     *\n     * If `target` reverts with a revert reason, it is bubbled up by this\n     * function (like regular Solidity function calls).\n     *\n     * Returns the raw returned data. To convert to the expected return value,\n     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n     *\n     * Requirements:\n     *\n     * - `target` must be a contract.\n     * - calling `target` with `data` must not revert.\n     *\n     * _Available since v3.1._\n     */\n    function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n        return functionCall(target, data, \"Address: low-level call failed\");\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n     * `errorMessage` as a fallback revert reason when `target` reverts.\n     *\n     * _Available since v3.1._\n     */\n    function functionCall(\n        address target,\n        bytes memory data,\n        string memory errorMessage\n    ) internal returns (bytes memory) {\n        return functionCallWithValue(target, data, 0, errorMessage);\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n     * but also transferring `value` wei to `target`.\n     *\n     * Requirements:\n     *\n     * - the calling contract must have an ETH balance of at least `value`.\n     * - the called Solidity function must be `payable`.\n     *\n     * _Available since v3.1._\n     */\n    function functionCallWithValue(\n        address target,\n        bytes memory data,\n        uint256 value\n    ) internal returns (bytes memory) {\n        return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n     * with `errorMessage` as a fallback revert reason when `target` reverts.\n     *\n     * _Available since v3.1._\n     */\n    function functionCallWithValue(\n        address target,\n        bytes memory data,\n        uint256 value,\n        string memory errorMessage\n    ) internal returns (bytes memory) {\n        require(address(this).balance >= value, \"Address: insufficient balance for call\");\n        require(isContract(target), \"Address: call to non-contract\");\n\n        (bool success, bytes memory returndata) = target.call{value: value}(data);\n        return verifyCallResult(success, returndata, errorMessage);\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n     * but performing a static call.\n     *\n     * _Available since v3.3._\n     */\n    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n        return functionStaticCall(target, data, \"Address: low-level static call failed\");\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n     * but performing a static call.\n     *\n     * _Available since v3.3._\n     */\n    function functionStaticCall(\n        address target,\n        bytes memory data,\n        string memory errorMessage\n    ) internal view returns (bytes memory) {\n        require(isContract(target), \"Address: static call to non-contract\");\n\n        (bool success, bytes memory returndata) = target.staticcall(data);\n        return verifyCallResult(success, returndata, errorMessage);\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n     * but performing a delegate call.\n     *\n     * _Available since v3.4._\n     */\n    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n        return functionDelegateCall(target, data, \"Address: low-level delegate call failed\");\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n     * but performing a delegate call.\n     *\n     * _Available since v3.4._\n     */\n    function functionDelegateCall(\n        address target,\n        bytes memory data,\n        string memory errorMessage\n    ) internal returns (bytes memory) {\n        require(isContract(target), \"Address: delegate call to non-contract\");\n\n        (bool success, bytes memory returndata) = target.delegatecall(data);\n        return verifyCallResult(success, returndata, errorMessage);\n    }\n\n    /**\n     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\n     * revert reason using the provided one.\n     *\n     * _Available since v4.3._\n     */\n    function verifyCallResult(\n        bool success,\n        bytes memory returndata,\n        string memory errorMessage\n    ) internal pure returns (bytes memory) {\n        if (success) {\n            return returndata;\n        } else {\n            // Look for revert reason and bubble it up if present\n            if (returndata.length > 0) {\n                // The easiest way to bubble the revert reason is using memory via assembly\n\n                assembly {\n                    let returndata_size := mload(returndata)\n                    revert(add(32, returndata), returndata_size)\n                }\n            } else {\n                revert(errorMessage);\n            }\n        }\n    }\n}\n","keccak256":"0x3336baae5cf23e94274d75336e2d412193be508504aee185e61dc7d58cd05c8a","license":"MIT"},"@openzeppelin/contracts/utils/math/SafeMath.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n// CAUTION\n// This version of SafeMath should only be used with Solidity 0.8 or later,\n// because it relies on the compiler's built in overflow checks.\n\n/**\n * @dev Wrappers over Solidity's arithmetic operations.\n *\n * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler\n * now has built in overflow checking.\n */\nlibrary SafeMath {\n    /**\n     * @dev Returns the addition of two unsigned integers, with an overflow flag.\n     *\n     * _Available since v3.4._\n     */\n    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n        unchecked {\n            uint256 c = a + b;\n            if (c < a) return (false, 0);\n            return (true, c);\n        }\n    }\n\n    /**\n     * @dev Returns the substraction of two unsigned integers, with an overflow flag.\n     *\n     * _Available since v3.4._\n     */\n    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n        unchecked {\n            if (b > a) return (false, 0);\n            return (true, a - b);\n        }\n    }\n\n    /**\n     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\n     *\n     * _Available since v3.4._\n     */\n    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n        unchecked {\n            // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\n            // benefit is lost if 'b' is also tested.\n            // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\n            if (a == 0) return (true, 0);\n            uint256 c = a * b;\n            if (c / a != b) return (false, 0);\n            return (true, c);\n        }\n    }\n\n    /**\n     * @dev Returns the division of two unsigned integers, with a division by zero flag.\n     *\n     * _Available since v3.4._\n     */\n    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n        unchecked {\n            if (b == 0) return (false, 0);\n            return (true, a / b);\n        }\n    }\n\n    /**\n     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\n     *\n     * _Available since v3.4._\n     */\n    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n        unchecked {\n            if (b == 0) return (false, 0);\n            return (true, a % b);\n        }\n    }\n\n    /**\n     * @dev Returns the addition of two unsigned integers, reverting on\n     * overflow.\n     *\n     * Counterpart to Solidity's `+` operator.\n     *\n     * Requirements:\n     *\n     * - Addition cannot overflow.\n     */\n    function add(uint256 a, uint256 b) internal pure returns (uint256) {\n        return a + b;\n    }\n\n    /**\n     * @dev Returns the subtraction of two unsigned integers, reverting on\n     * overflow (when the result is negative).\n     *\n     * Counterpart to Solidity's `-` operator.\n     *\n     * Requirements:\n     *\n     * - Subtraction cannot overflow.\n     */\n    function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n        return a - b;\n    }\n\n    /**\n     * @dev Returns the multiplication of two unsigned integers, reverting on\n     * overflow.\n     *\n     * Counterpart to Solidity's `*` operator.\n     *\n     * Requirements:\n     *\n     * - Multiplication cannot overflow.\n     */\n    function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n        return a * b;\n    }\n\n    /**\n     * @dev Returns the integer division of two unsigned integers, reverting on\n     * division by zero. The result is rounded towards zero.\n     *\n     * Counterpart to Solidity's `/` operator.\n     *\n     * Requirements:\n     *\n     * - The divisor cannot be zero.\n     */\n    function div(uint256 a, uint256 b) internal pure returns (uint256) {\n        return a / b;\n    }\n\n    /**\n     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n     * reverting when dividing by zero.\n     *\n     * Counterpart to Solidity's `%` operator. This function uses a `revert`\n     * opcode (which leaves remaining gas untouched) while Solidity uses an\n     * invalid opcode to revert (consuming all remaining gas).\n     *\n     * Requirements:\n     *\n     * - The divisor cannot be zero.\n     */\n    function mod(uint256 a, uint256 b) internal pure returns (uint256) {\n        return a % b;\n    }\n\n    /**\n     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\n     * overflow (when the result is negative).\n     *\n     * CAUTION: This function is deprecated because it requires allocating memory for the error\n     * message unnecessarily. For custom revert reasons use {trySub}.\n     *\n     * Counterpart to Solidity's `-` operator.\n     *\n     * Requirements:\n     *\n     * - Subtraction cannot overflow.\n     */\n    function sub(\n        uint256 a,\n        uint256 b,\n        string memory errorMessage\n    ) internal pure returns (uint256) {\n        unchecked {\n            require(b <= a, errorMessage);\n            return a - b;\n        }\n    }\n\n    /**\n     * @dev Returns the integer division of two unsigned integers, reverting with custom message on\n     * division by zero. The result is rounded towards zero.\n     *\n     * Counterpart to Solidity's `/` operator. Note: this function uses a\n     * `revert` opcode (which leaves remaining gas untouched) while Solidity\n     * uses an invalid opcode to revert (consuming all remaining gas).\n     *\n     * Requirements:\n     *\n     * - The divisor cannot be zero.\n     */\n    function div(\n        uint256 a,\n        uint256 b,\n        string memory errorMessage\n    ) internal pure returns (uint256) {\n        unchecked {\n            require(b > 0, errorMessage);\n            return a / b;\n        }\n    }\n\n    /**\n     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n     * reverting with custom message when dividing by zero.\n     *\n     * CAUTION: This function is deprecated because it requires allocating memory for the error\n     * message unnecessarily. For custom revert reasons use {tryMod}.\n     *\n     * Counterpart to Solidity's `%` operator. This function uses a `revert`\n     * opcode (which leaves remaining gas untouched) while Solidity uses an\n     * invalid opcode to revert (consuming all remaining gas).\n     *\n     * Requirements:\n     *\n     * - The divisor cannot be zero.\n     */\n    function mod(\n        uint256 a,\n        uint256 b,\n        string memory errorMessage\n    ) internal pure returns (uint256) {\n        unchecked {\n            require(b > 0, errorMessage);\n            return a % b;\n        }\n    }\n}\n","keccak256":"0x8666f020bd8fc9dc14f07e2ebc52b5f236ab4cdde7c77679b08cb2f94730043b","license":"MIT"},"contracts/interfaces/GammaInterface.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity =0.8.4;\n\nlibrary GammaTypes {\n    // vault is a struct of 6 arrays that describe a position a user has, a user can have multiple vaults.\n    struct Vault {\n        // addresses of oTokens a user has shorted (i.e. written) against this vault\n        address[] shortOtokens;\n        // addresses of oTokens a user has bought and deposited in this vault\n        // user can be long oTokens without opening a vault (e.g. by buying on a DEX)\n        // generally, long oTokens will be 'deposited' in vaults to act as collateral\n        // in order to write oTokens against (i.e. in spreads)\n        address[] longOtokens;\n        // addresses of other ERC-20s a user has deposited as collateral in this vault\n        address[] collateralAssets;\n        // quantity of oTokens minted/written for each oToken address in shortOtokens\n        uint256[] shortAmounts;\n        // quantity of oTokens owned and held in the vault for each oToken address in longOtokens\n        uint256[] longAmounts;\n        // quantity of ERC-20 deposited as collateral in the vault for each ERC-20 address in collateralAssets\n        uint256[] collateralAmounts;\n    }\n}\n\ninterface IOtoken {\n    function underlyingAsset() external view returns (address);\n\n    function strikeAsset() external view returns (address);\n\n    function collateralAsset() external view returns (address);\n\n    function strikePrice() external view returns (uint256);\n\n    function expiryTimestamp() external view returns (uint256);\n\n    function isPut() external view returns (bool);\n\n    function balanceOf(address) external view returns (uint256);\n\n    function totalSupply() external view returns (uint256);\n\n    function transfer(address, uint256) external;\n}\n\ninterface IOtokenFactory {\n    function getOtoken(\n        address _underlyingAsset,\n        address _strikeAsset,\n        address _collateralAsset,\n        uint256 _strikePrice,\n        uint256 _expiry,\n        bool _isPut\n    ) external view returns (address);\n\n    function createOtoken(\n        address _underlyingAsset,\n        address _strikeAsset,\n        address _collateralAsset,\n        uint256 _strikePrice,\n        uint256 _expiry,\n        bool _isPut\n    ) external returns (address);\n\n    function getTargetOtokenAddress(\n        address _underlyingAsset,\n        address _strikeAsset,\n        address _collateralAsset,\n        uint256 _strikePrice,\n        uint256 _expiry,\n        bool _isPut\n    ) external view returns (address);\n\n    event OtokenCreated(\n        address tokenAddress,\n        address creator,\n        address indexed underlying,\n        address indexed strike,\n        address indexed collateral,\n        uint256 strikePrice,\n        uint256 expiry,\n        bool isPut\n    );\n}\n\ninterface IController {\n    // possible actions that can be performed\n    enum ActionType {\n        OpenVault,\n        MintShortOption,\n        BurnShortOption,\n        DepositLongOption,\n        WithdrawLongOption,\n        DepositCollateral,\n        WithdrawCollateral,\n        SettleVault,\n        Redeem,\n        Call,\n        Liquidate\n    }\n\n    struct ActionArgs {\n        // type of action that is being performed on the system\n        ActionType actionType;\n        // address of the account owner\n        address owner;\n        // address which we move assets from or to (depending on the action type)\n        address secondAddress;\n        // asset that is to be transfered\n        address asset;\n        // index of the vault that is to be modified (if any)\n        uint256 vaultId;\n        // amount of asset that is to be transfered\n        uint256 amount;\n        // each vault can hold multiple short / long / collateral assets\n        // but we are restricting the scope to only 1 of each in this version\n        // in future versions this would be the index of the short / long / collateral asset that needs to be modified\n        uint256 index;\n        // any other data that needs to be passed in for arbitrary function calls\n        bytes data;\n    }\n\n    struct RedeemArgs {\n        // address to which we pay out the oToken proceeds\n        address receiver;\n        // oToken that is to be redeemed\n        address otoken;\n        // amount of oTokens that is to be redeemed\n        uint256 amount;\n    }\n\n    function getPayout(address _otoken, uint256 _amount)\n        external\n        view\n        returns (uint256);\n\n    function operate(ActionArgs[] calldata _actions) external;\n\n    function getAccountVaultCounter(address owner)\n        external\n        view\n        returns (uint256);\n\n    function oracle() external view returns (address);\n\n    function getVault(address _owner, uint256 _vaultId)\n        external\n        view\n        returns (GammaTypes.Vault memory);\n\n    function getProceed(address _owner, uint256 _vaultId)\n        external\n        view\n        returns (uint256);\n\n    function isSettlementAllowed(\n        address _underlying,\n        address _strike,\n        address _collateral,\n        uint256 _expiry\n    ) external view returns (bool);\n}\n\ninterface IOracle {\n    function setAssetPricer(address _asset, address _pricer) external;\n\n    function updateAssetPricer(address _asset, address _pricer) external;\n\n    function getPrice(address _asset) external view returns (uint256);\n\n    function getExpiryPrice(address _asset, uint256 _expiryTimestamp)\n        external\n        view\n        returns (uint256);\n}\n","keccak256":"0x7f04fccbd7627de0133f3c0f71e09c789e6b691546b92da99dbce77046ba3c86","license":"MIT"},"contracts/interfaces/IERC20Detailed.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity =0.8.4;\n\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\n\ninterface IERC20Detailed is IERC20 {\n    function decimals() external view returns (uint8);\n\n    function symbol() external view returns (string calldata);\n\n    function name() external view returns (string calldata);\n}\n","keccak256":"0x90fd29862ecc4bc1f2ee3e4d5c42364c5fbcc0f43f907d2bb82665f93df0d218","license":"MIT"},"contracts/interfaces/IGnosisAuction.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity =0.8.4;\n\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\n\nlibrary AuctionType {\n    struct AuctionData {\n        IERC20 auctioningToken;\n        IERC20 biddingToken;\n        uint256 orderCancellationEndDate;\n        uint256 auctionEndDate;\n        bytes32 initialAuctionOrder;\n        uint256 minimumBiddingAmountPerOrder;\n        uint256 interimSumBidAmount;\n        bytes32 interimOrder;\n        bytes32 clearingPriceOrder;\n        uint96 volumeClearingPriceOrder;\n        bool minFundingThresholdNotReached;\n        bool isAtomicClosureAllowed;\n        uint256 feeNumerator;\n        uint256 minFundingThreshold;\n    }\n}\n\ninterface IGnosisAuction {\n    function initiateAuction(\n        address _auctioningToken,\n        address _biddingToken,\n        uint256 orderCancellationEndDate,\n        uint256 auctionEndDate,\n        uint96 _auctionedSellAmount,\n        uint96 _minBuyAmount,\n        uint256 minimumBiddingAmountPerOrder,\n        uint256 minFundingThreshold,\n        bool isAtomicClosureAllowed,\n        address accessManagerContract,\n        bytes memory accessManagerContractData\n    ) external returns (uint256);\n\n    function auctionCounter() external view returns (uint256);\n\n    function auctionData(uint256 auctionId)\n        external\n        view\n        returns (AuctionType.AuctionData memory);\n\n    function auctionAccessManager(uint256 auctionId)\n        external\n        view\n        returns (address);\n\n    function auctionAccessData(uint256 auctionId)\n        external\n        view\n        returns (bytes memory);\n\n    function FEE_DENOMINATOR() external view returns (uint256);\n\n    function feeNumerator() external view returns (uint256);\n\n    function settleAuction(uint256 auctionId) external returns (bytes32);\n\n    function placeSellOrders(\n        uint256 auctionId,\n        uint96[] memory _minBuyAmounts,\n        uint96[] memory _sellAmounts,\n        bytes32[] memory _prevSellOrders,\n        bytes calldata allowListCallData\n    ) external returns (uint64);\n\n    function claimFromParticipantOrder(\n        uint256 auctionId,\n        bytes32[] memory orders\n    ) external returns (uint256, uint256);\n}\n","keccak256":"0x226639ee48018ec78891a829816799c9b9f6bbec7e84c4ca43cdc7dc8a07628f","license":"MIT"},"contracts/interfaces/ILiquidityGauge.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity =0.8.4;\n\ninterface ILiquidityGauge {\n    function balanceOf(address) external view returns (uint256);\n\n    function deposit(\n        uint256 _value,\n        address _addr,\n        bool _claim_rewards\n    ) external;\n\n    function withdraw(uint256 _value) external;\n}\n","keccak256":"0x0865aecb52ae4467761aa81e48957cde1c5486e270b4a671f8ff07861b801105","license":"MIT"},"contracts/interfaces/IOptionsPurchaseQueue.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity >=0.8.0;\n\ninterface IOptionsPurchaseQueue {\n    /**\n     * @dev Contains purchase request info\n     * @param optionsAmount Amount of options to purchase\n     * @param premiums Total premiums the buyer is spending to purchase the options (optionsAmount * ceilingPrice)\n     *  We need to track the premiums here since the ceilingPrice could change between the time the purchase was\n     *  requested and when the options are sold\n     * @param buyer The buyer requesting this purchase\n     */\n    struct Purchase {\n        uint128 optionsAmount; // Slot 0\n        uint128 premiums;\n        address buyer; // Slot 1\n    }\n\n    function purchases(address, uint256)\n        external\n        view\n        returns (\n            uint128,\n            uint128,\n            address\n        );\n\n    function totalOptionsAmount(address) external view returns (uint256);\n\n    function vaultAllocatedOptions(address) external view returns (uint256);\n\n    function whitelistedBuyer(address) external view returns (bool);\n\n    function minPurchaseAmount(address) external view returns (uint256);\n\n    function ceilingPrice(address) external view returns (uint256);\n\n    function getPurchases(address vault)\n        external\n        view\n        returns (Purchase[] memory);\n\n    function getPremiums(address vault, uint256 optionsAmount)\n        external\n        view\n        returns (uint256);\n\n    function getOptionsAllocation(address vault, uint256 allocatedOptions)\n        external\n        view\n        returns (uint256);\n\n    function requestPurchase(address vault, uint256 optionsAmount)\n        external\n        returns (uint256);\n\n    function allocateOptions(uint256 allocatedOptions)\n        external\n        returns (uint256);\n\n    function sellToBuyers(uint256 settlementPrice) external returns (uint256);\n\n    function cancelAllPurchases(address vault) external;\n\n    function addWhitelist(address buyer) external;\n\n    function removeWhitelist(address buyer) external;\n\n    function setCeilingPrice(address vault, uint256 price) external;\n\n    function setMinPurchaseAmount(address vault, uint256 amount) external;\n}\n","keccak256":"0x3033ae23c42a0da011d8e43d911ec7d999ccbc18a73e24098dfd202a71000086","license":"MIT"},"contracts/interfaces/IRibbon.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity =0.8.4;\nimport {Vault} from \"../libraries/Vault.sol\";\n\ninterface IRibbonVault {\n    function deposit(uint256 amount) external;\n\n    function depositETH() external payable;\n\n    function cap() external view returns (uint256);\n\n    function depositFor(uint256 amount, address creditor) external;\n\n    function vaultParams() external view returns (Vault.VaultParams memory);\n}\n\ninterface IStrikeSelection {\n    function getStrikePrice(uint256 expiryTimestamp, bool isPut)\n        external\n        view\n        returns (uint256, uint256);\n\n    function delta() external view returns (uint256);\n}\n\ninterface IOptionsPremiumPricer {\n    function getPremium(\n        uint256 strikePrice,\n        uint256 timeToExpiry,\n        bool isPut\n    ) external view returns (uint256);\n\n    function getPremiumInStables(\n        uint256 strikePrice,\n        uint256 timeToExpiry,\n        bool isPut\n    ) external view returns (uint256);\n\n    function getOptionDelta(\n        uint256 spotPrice,\n        uint256 strikePrice,\n        uint256 volatility,\n        uint256 expiryTimestamp\n    ) external view returns (uint256 delta);\n\n    function getUnderlyingPrice() external view returns (uint256);\n\n    function priceOracle() external view returns (address);\n\n    function volatilityOracle() external view returns (address);\n\n    function optionId() external view returns (bytes32);\n}\n","keccak256":"0xd9ffea587ce992000d8a9f8d4b1bc8c40008633c35121b3d11ab8c6a7dd5ecbc","license":"MIT"},"contracts/interfaces/IRibbonThetaVault.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity =0.8.4;\n\nimport {Vault} from \"../libraries/Vault.sol\";\n\ninterface IRibbonThetaVault {\n    function GAMMA_CONTROLLER() external view returns (address);\n\n    function currentOption() external view returns (address);\n\n    function nextOption() external view returns (address);\n\n    function vaultParams() external view returns (Vault.VaultParams memory);\n\n    function vaultState() external view returns (Vault.VaultState memory);\n\n    function optionState() external view returns (Vault.OptionState memory);\n\n    function optionAuctionID() external view returns (uint256);\n\n    function pricePerShare() external view returns (uint256);\n\n    function roundPricePerShare(uint256) external view returns (uint256);\n\n    function symbol() external view returns (string calldata);\n\n    function depositFor(uint256 amount, address creditor) external;\n\n    function initiateWithdraw(uint256 numShares) external;\n\n    function completeWithdraw() external;\n\n    function maxRedeem() external;\n\n    function commitAndClose() external;\n\n    function burnRemainingOTokens() external;\n}\n\ninterface IRibbonTreasuryVault is IRibbonThetaVault {\n    function period() external view returns (uint256);\n}\n\ninterface IRibbonSTETHVault is IRibbonThetaVault {\n    function depositYieldTokenFor(uint256 amount, address creditor) external;\n}\n","keccak256":"0xbf5f4604ae539f792d52f67725230bd401339647ccd99d647f45c3d280afc4b4","license":"MIT"},"contracts/interfaces/ISwap.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity =0.8.4;\n\ninterface ISwap {\n    struct Offer {\n        // 32 byte slot 1, partial fill\n        // Seller wallet address\n        address seller;\n        // 32 byte slot 2\n        // Addess of oToken\n        address oToken;\n        // Price per oToken denominated in biddingToken\n        uint96 minPrice;\n        // 32 byte slot 3\n        // ERC20 Token to bid for oToken\n        address biddingToken;\n        // Minimum oToken amount acceptable for a single bid\n        uint96 minBidSize;\n        // 32 byte slot 4\n        // Total available oToken amount\n        uint128 totalSize;\n        // Remaining available oToken amount\n        // This figure is updated after each successfull swap\n        uint128 availableSize;\n        // 32 byte slot 5\n        // Amount of biddingToken received\n        // This figure is updated after each successfull swap\n        uint256 totalSales;\n    }\n\n    struct Bid {\n        // ID assigned to offers\n        uint256 swapId;\n        // Number only used once for each wallet\n        uint256 nonce;\n        // Signer wallet address\n        address signerWallet;\n        // Amount of biddingToken offered by signer\n        uint256 sellAmount;\n        // Amount of oToken requested by signer\n        uint256 buyAmount;\n        // Referrer wallet address\n        address referrer;\n        // Signature recovery id\n        uint8 v;\n        // r portion of the ECSDA signature\n        bytes32 r;\n        // s portion of the ECSDA signature\n        bytes32 s;\n    }\n\n    struct OfferDetails {\n        // Seller wallet address\n        address seller;\n        // Addess of oToken\n        address oToken;\n        // Price per oToken denominated in biddingToken\n        uint256 minPrice;\n        // ERC20 Token to bid for oToken\n        address biddingToken;\n        // Minimum oToken amount acceptable for a single bid\n        uint256 minBidSize;\n    }\n\n    event Swap(\n        uint256 indexed swapId,\n        uint256 nonce,\n        address indexed signerWallet,\n        uint256 signerAmount,\n        uint256 sellerAmount,\n        address referrer,\n        uint256 feeAmount\n    );\n\n    event NewOffer(\n        uint256 swapId,\n        address seller,\n        address oToken,\n        address biddingToken,\n        uint256 minPrice,\n        uint256 minBidSize,\n        uint256 totalSize\n    );\n\n    event SetFee(address referrer, uint256 fee);\n\n    event SetPriceFeed(address asset, address aggregator);\n\n    event SettleOffer(uint256 swapId);\n\n    event Cancel(uint256 indexed nonce, address indexed signerWallet);\n\n    event Authorize(address indexed signer, address indexed signerWallet);\n\n    event Revoke(address indexed signer, address indexed signerWallet);\n\n    function createOffer(\n        address oToken,\n        address biddingToken,\n        uint96 minPrice,\n        uint96 minBidSize,\n        uint128 totalSize\n    ) external returns (uint256 swapId);\n\n    function settleOffer(uint256 swapId, Bid[] calldata bids) external;\n\n    function cancelNonce(uint256[] calldata nonces) external;\n\n    function check(Bid calldata bid)\n        external\n        view\n        returns (uint256, bytes32[] memory);\n\n    function averagePriceForOffer(uint256 swapId)\n        external\n        view\n        returns (uint256);\n\n    function authorize(address sender) external;\n\n    function revoke() external;\n\n    function nonceUsed(address, uint256) external view returns (bool);\n}\n","keccak256":"0x63869f607e9d427034a928008e429ee2ffee0469717d05a64dc1fbb28db8e1e1","license":"MIT"},"contracts/interfaces/IVaultPauser.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity =0.8.4;\n\ninterface IVaultPauser {\n    /// @notice pause vault position of an account with max amount\n    /// @param _account the address of user\n    /// @param _amount amount of shares\n    function pausePosition(address _account, uint256 _amount) external;\n\n    /// @notice resume vault position of an account with max amount\n    /// @param _vaultAddress the address of vault\n    function resumePosition(address _vaultAddress) external;\n}\n","keccak256":"0x8327eccf3e134700dcf180baa109d55e2225fd3fa5bdfe0dcfc232973c7aa185","license":"MIT"},"contracts/interfaces/IWETH.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity =0.8.4;\n\ninterface IWETH {\n    function deposit() external payable;\n\n    function withdraw(uint256) external;\n\n    function balanceOf(address account) external view returns (uint256);\n\n    function transfer(address recipient, uint256 amount)\n        external\n        returns (bool);\n\n    function allowance(address owner, address spender)\n        external\n        view\n        returns (uint256);\n\n    function approve(address spender, uint256 amount) external returns (bool);\n\n    function transferFrom(\n        address sender,\n        address recipient,\n        uint256 amount\n    ) external returns (bool);\n\n    function decimals() external view returns (uint256);\n}\n","keccak256":"0x027f79659aea02845423eb96cfc4f926efb2214745463e3cbcfe4e4c24a065d9","license":"MIT"},"contracts/libraries/GnosisAuction.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity =0.8.4;\n\nimport {SafeMath} from \"@openzeppelin/contracts/utils/math/SafeMath.sol\";\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport {\n    SafeERC20\n} from \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\nimport {DSMath} from \"../vendor/DSMath.sol\";\nimport {IGnosisAuction} from \"../interfaces/IGnosisAuction.sol\";\nimport {IOtoken} from \"../interfaces/GammaInterface.sol\";\nimport {IOptionsPremiumPricer} from \"../interfaces/IRibbon.sol\";\nimport {Vault} from \"./Vault.sol\";\nimport {IRibbonThetaVault} from \"../interfaces/IRibbonThetaVault.sol\";\n\nlibrary GnosisAuction {\n    using SafeMath for uint256;\n    using SafeERC20 for IERC20;\n\n    event InitiateGnosisAuction(\n        address indexed auctioningToken,\n        address indexed biddingToken,\n        uint256 auctionCounter,\n        address indexed manager\n    );\n\n    event PlaceAuctionBid(\n        uint256 auctionId,\n        address indexed auctioningToken,\n        uint256 sellAmount,\n        uint256 buyAmount,\n        address indexed bidder\n    );\n\n    struct AuctionDetails {\n        address oTokenAddress;\n        address gnosisEasyAuction;\n        address asset;\n        uint256 assetDecimals;\n        uint256 oTokenPremium;\n        uint256 duration;\n    }\n\n    struct BidDetails {\n        address oTokenAddress;\n        address gnosisEasyAuction;\n        address asset;\n        uint256 assetDecimals;\n        uint256 auctionId;\n        uint256 lockedBalance;\n        uint256 optionAllocation;\n        uint256 optionPremium;\n        address bidder;\n    }\n\n    function startAuction(AuctionDetails calldata auctionDetails)\n        internal\n        returns (uint256 auctionID)\n    {\n        uint256 oTokenSellAmount =\n            getOTokenSellAmount(auctionDetails.oTokenAddress);\n        require(oTokenSellAmount > 0, \"No otokens to sell\");\n\n        IERC20(auctionDetails.oTokenAddress).safeApprove(\n            auctionDetails.gnosisEasyAuction,\n            IERC20(auctionDetails.oTokenAddress).balanceOf(address(this))\n        );\n\n        // minBidAmount is total oTokens to sell * premium per oToken\n        // shift decimals to correspond to decimals of USDC for puts\n        // and underlying for calls\n        uint256 minBidAmount =\n            DSMath.wmul(\n                oTokenSellAmount.mul(10**10),\n                auctionDetails.oTokenPremium\n            );\n\n        minBidAmount = auctionDetails.assetDecimals > 18\n            ? minBidAmount.mul(10**(auctionDetails.assetDecimals.sub(18)))\n            : minBidAmount.div(\n                10**(uint256(18).sub(auctionDetails.assetDecimals))\n            );\n\n        require(\n            minBidAmount <= type(uint96).max,\n            \"optionPremium * oTokenSellAmount > type(uint96) max value!\"\n        );\n\n        uint256 auctionEnd = block.timestamp.add(auctionDetails.duration);\n\n        auctionID = IGnosisAuction(auctionDetails.gnosisEasyAuction)\n            .initiateAuction(\n            // address of oToken we minted and are selling\n            auctionDetails.oTokenAddress,\n            // address of asset we want in exchange for oTokens. Should match vault `asset`\n            auctionDetails.asset,\n            // orders can be cancelled at any time during the auction\n            auctionEnd,\n            // order will last for `duration`\n            auctionEnd,\n            // we are selling all of the otokens minus a fee taken by gnosis\n            uint96(oTokenSellAmount),\n            // the minimum we are willing to sell all the oTokens for. A discount is applied on black-scholes price\n            uint96(minBidAmount),\n            // the minimum bidding amount must be 1 * 10 ** -assetDecimals\n            1,\n            // the min funding threshold\n            0,\n            // no atomic closure\n            false,\n            // access manager contract\n            address(0),\n            // bytes for storing info like a whitelist for who can bid\n            bytes(\"\")\n        );\n\n        emit InitiateGnosisAuction(\n            auctionDetails.oTokenAddress,\n            auctionDetails.asset,\n            auctionID,\n            msg.sender\n        );\n    }\n\n    function placeBid(BidDetails calldata bidDetails)\n        internal\n        returns (\n            uint256 sellAmount,\n            uint256 buyAmount,\n            uint64 userId\n        )\n    {\n        // calculate how much to allocate\n        sellAmount = bidDetails\n            .lockedBalance\n            .mul(bidDetails.optionAllocation)\n            .div(100 * Vault.OPTION_ALLOCATION_MULTIPLIER);\n\n        // divide the `asset` sellAmount by the target premium per oToken to\n        // get the number of oTokens to buy (8 decimals)\n        buyAmount = sellAmount\n            .mul(10**(bidDetails.assetDecimals.add(Vault.OTOKEN_DECIMALS)))\n            .div(bidDetails.optionPremium)\n            .div(10**bidDetails.assetDecimals);\n\n        require(\n            sellAmount <= type(uint96).max,\n            \"sellAmount > type(uint96) max value!\"\n        );\n        require(\n            buyAmount <= type(uint96).max,\n            \"buyAmount > type(uint96) max value!\"\n        );\n\n        // approve that amount\n        IERC20(bidDetails.asset).safeApprove(\n            bidDetails.gnosisEasyAuction,\n            sellAmount\n        );\n\n        uint96[] memory _minBuyAmounts = new uint96[](1);\n        uint96[] memory _sellAmounts = new uint96[](1);\n        bytes32[] memory _prevSellOrders = new bytes32[](1);\n        _minBuyAmounts[0] = uint96(buyAmount);\n        _sellAmounts[0] = uint96(sellAmount);\n        _prevSellOrders[\n            0\n        ] = 0x0000000000000000000000000000000000000000000000000000000000000001;\n\n        // place sell order with that amount\n        userId = IGnosisAuction(bidDetails.gnosisEasyAuction).placeSellOrders(\n            bidDetails.auctionId,\n            _minBuyAmounts,\n            _sellAmounts,\n            _prevSellOrders,\n            \"0x\"\n        );\n\n        emit PlaceAuctionBid(\n            bidDetails.auctionId,\n            bidDetails.oTokenAddress,\n            sellAmount,\n            buyAmount,\n            bidDetails.bidder\n        );\n\n        return (sellAmount, buyAmount, userId);\n    }\n\n    function claimAuctionOtokens(\n        Vault.AuctionSellOrder calldata auctionSellOrder,\n        address gnosisEasyAuction,\n        address counterpartyThetaVault\n    ) internal {\n        bytes32 order =\n            encodeOrder(\n                auctionSellOrder.userId,\n                auctionSellOrder.buyAmount,\n                auctionSellOrder.sellAmount\n            );\n        bytes32[] memory orders = new bytes32[](1);\n        orders[0] = order;\n        IGnosisAuction(gnosisEasyAuction).claimFromParticipantOrder(\n            IRibbonThetaVault(counterpartyThetaVault).optionAuctionID(),\n            orders\n        );\n    }\n\n    function getOTokenSellAmount(address oTokenAddress)\n        internal\n        view\n        returns (uint256)\n    {\n        // We take our current oToken balance. That will be our sell amount\n        // but otokens will be transferred to gnosis.\n        uint256 oTokenSellAmount =\n            IERC20(oTokenAddress).balanceOf(address(this));\n\n        require(\n            oTokenSellAmount <= type(uint96).max,\n            \"oTokenSellAmount > type(uint96) max value!\"\n        );\n\n        return oTokenSellAmount;\n    }\n\n    function getOTokenPremiumInStables(\n        address oTokenAddress,\n        address optionsPremiumPricer,\n        uint256 premiumDiscount\n    ) internal view returns (uint256) {\n        IOtoken newOToken = IOtoken(oTokenAddress);\n        IOptionsPremiumPricer premiumPricer =\n            IOptionsPremiumPricer(optionsPremiumPricer);\n\n        // Apply black-scholes formula (from rvol library) to option given its features\n        // and get price for 100 contracts denominated USDC for both call and put options\n        uint256 optionPremium =\n            premiumPricer.getPremiumInStables(\n                newOToken.strikePrice(),\n                newOToken.expiryTimestamp(),\n                newOToken.isPut()\n            );\n\n        // Apply a discount to incentivize arbitraguers\n        optionPremium = optionPremium.mul(premiumDiscount).div(\n            100 * Vault.PREMIUM_DISCOUNT_MULTIPLIER\n        );\n\n        require(\n            optionPremium <= type(uint96).max,\n            \"optionPremium > type(uint96) max value!\"\n        );\n\n        return optionPremium;\n    }\n\n    function encodeOrder(\n        uint64 userId,\n        uint96 buyAmount,\n        uint96 sellAmount\n    ) internal pure returns (bytes32) {\n        return\n            bytes32(\n                (uint256(userId) << 192) +\n                    (uint256(buyAmount) << 96) +\n                    uint256(sellAmount)\n            );\n    }\n}\n","keccak256":"0xfbe9e9b0da571d9b83545d3ae71827da0f91bd1c68c6b68955907e6e967e4972","license":"MIT"},"contracts/libraries/ShareMath.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity =0.8.4;\n\nimport {SafeMath} from \"@openzeppelin/contracts/utils/math/SafeMath.sol\";\nimport {Vault} from \"./Vault.sol\";\n\nlibrary ShareMath {\n    using SafeMath for uint256;\n\n    uint256 internal constant PLACEHOLDER_UINT = 1;\n\n    function assetToShares(\n        uint256 assetAmount,\n        uint256 assetPerShare,\n        uint256 decimals\n    ) internal pure returns (uint256) {\n        // If this throws, it means that vault's roundPricePerShare[currentRound] has not been set yet\n        // which should never happen.\n        // Has to be larger than 1 because `1` is used in `initRoundPricePerShares` to prevent cold writes.\n        require(assetPerShare > PLACEHOLDER_UINT, \"Invalid assetPerShare\");\n\n        return assetAmount.mul(10**decimals).div(assetPerShare);\n    }\n\n    function sharesToAsset(\n        uint256 shares,\n        uint256 assetPerShare,\n        uint256 decimals\n    ) internal pure returns (uint256) {\n        // If this throws, it means that vault's roundPricePerShare[currentRound] has not been set yet\n        // which should never happen.\n        // Has to be larger than 1 because `1` is used in `initRoundPricePerShares` to prevent cold writes.\n        require(assetPerShare > PLACEHOLDER_UINT, \"Invalid assetPerShare\");\n\n        return shares.mul(assetPerShare).div(10**decimals);\n    }\n\n    /**\n     * @notice Returns the shares unredeemed by the user given their DepositReceipt\n     * @param depositReceipt is the user's deposit receipt\n     * @param currentRound is the `round` stored on the vault\n     * @param assetPerShare is the price in asset per share\n     * @param decimals is the number of decimals the asset/shares use\n     * @return unredeemedShares is the user's virtual balance of shares that are owed\n     */\n    function getSharesFromReceipt(\n        Vault.DepositReceipt memory depositReceipt,\n        uint256 currentRound,\n        uint256 assetPerShare,\n        uint256 decimals\n    ) internal pure returns (uint256 unredeemedShares) {\n        if (depositReceipt.round > 0 && depositReceipt.round < currentRound) {\n            uint256 sharesFromRound =\n                assetToShares(depositReceipt.amount, assetPerShare, decimals);\n\n            return\n                uint256(depositReceipt.unredeemedShares).add(sharesFromRound);\n        }\n        return depositReceipt.unredeemedShares;\n    }\n\n    function pricePerShare(\n        uint256 totalSupply,\n        uint256 totalBalance,\n        uint256 pendingAmount,\n        uint256 decimals\n    ) internal pure returns (uint256) {\n        uint256 singleShare = 10**decimals;\n        return\n            totalSupply > 0\n                ? singleShare.mul(totalBalance.sub(pendingAmount)).div(\n                    totalSupply\n                )\n                : singleShare;\n    }\n\n    /************************************************\n     *  HELPERS\n     ***********************************************/\n\n    function assertUint104(uint256 num) internal pure {\n        require(num <= type(uint104).max, \"Overflow uint104\");\n    }\n\n    function assertUint128(uint256 num) internal pure {\n        require(num <= type(uint128).max, \"Overflow uint128\");\n    }\n}\n","keccak256":"0x90bc4b56ee48f314d1e326903bdb2926bed143fa4e6867a7d44975503106bf56","license":"MIT"},"contracts/libraries/SupportsNonCompliantERC20.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity =0.8.4;\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport {\n    SafeERC20\n} from \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\n\n/**\n * This library supports ERC20s that have quirks in their behavior.\n * One such ERC20 is USDT, which requires allowance to be 0 before calling approve.\n * We plan to update this library with ERC20s that display such idiosyncratic behavior.\n */\nlibrary SupportsNonCompliantERC20 {\n    address private constant USDT = 0xdAC17F958D2ee523a2206206994597C13D831ec7;\n\n    function safeApproveNonCompliant(\n        IERC20 token,\n        address spender,\n        uint256 amount\n    ) internal {\n        if (address(token) == USDT) {\n            SafeERC20.safeApprove(token, spender, 0);\n        }\n        SafeERC20.safeApprove(token, spender, amount);\n    }\n}\n","keccak256":"0xda967c8a0bcbdf15b1b60c4cba1d0b12aae75431570dfbb5fb06b64162c83cb0","license":"MIT"},"contracts/libraries/Vault.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity =0.8.4;\n\nlibrary Vault {\n    /************************************************\n     *  IMMUTABLES & CONSTANTS\n     ***********************************************/\n\n    // Fees are 6-decimal places. For example: 20 * 10**6 = 20%\n    uint256 internal constant FEE_MULTIPLIER = 10**6;\n\n    // Premium discount has 1-decimal place. For example: 80 * 10**1 = 80%. Which represents a 20% discount.\n    uint256 internal constant PREMIUM_DISCOUNT_MULTIPLIER = 10;\n\n    // Otokens have 8 decimal places.\n    uint256 internal constant OTOKEN_DECIMALS = 8;\n\n    // Percentage of funds allocated to options is 2 decimal places. 10 * 10**2 = 10%\n    uint256 internal constant OPTION_ALLOCATION_MULTIPLIER = 10**2;\n\n    // Placeholder uint value to prevent cold writes\n    uint256 internal constant PLACEHOLDER_UINT = 1;\n\n    struct VaultParams {\n        // Option type the vault is selling\n        bool isPut;\n        // Token decimals for vault shares\n        uint8 decimals;\n        // Asset used in Theta / Delta Vault\n        address asset;\n        // Underlying asset of the options sold by vault\n        address underlying;\n        // Minimum supply of the vault shares issued, for ETH it's 10**10\n        uint56 minimumSupply;\n        // Vault cap\n        uint104 cap;\n    }\n\n    struct OptionState {\n        // Option that the vault is shorting / longing in the next cycle\n        address nextOption;\n        // Option that the vault is currently shorting / longing\n        address currentOption;\n        // The timestamp when the `nextOption` can be used by the vault\n        uint32 nextOptionReadyAt;\n    }\n\n    struct VaultState {\n        // 32 byte slot 1\n        //  Current round number. `round` represents the number of `period`s elapsed.\n        uint16 round;\n        // Amount that is currently locked for selling options\n        uint104 lockedAmount;\n        // Amount that was locked for selling options in the previous round\n        // used for calculating performance fee deduction\n        uint104 lastLockedAmount;\n        // 32 byte slot 2\n        // Stores the total tally of how much of `asset` there is\n        // to be used to mint rTHETA tokens\n        uint128 totalPending;\n        // Total amount of queued withdrawal shares from previous rounds (doesn't include the current round)\n        uint128 queuedWithdrawShares;\n    }\n\n    struct DepositReceipt {\n        // Maximum of 65535 rounds. Assuming 1 round is 7 days, maximum is 1256 years.\n        uint16 round;\n        // Deposit amount, max 20,282,409,603,651 or 20 trillion ETH deposit\n        uint104 amount;\n        // Unredeemed shares balance\n        uint128 unredeemedShares;\n    }\n\n    struct Withdrawal {\n        // Maximum of 65535 rounds. Assuming 1 round is 7 days, maximum is 1256 years.\n        uint16 round;\n        // Number of shares withdrawn\n        uint128 shares;\n    }\n\n    struct AuctionSellOrder {\n        // Amount of `asset` token offered in auction\n        uint96 sellAmount;\n        // Amount of oToken requested in auction\n        uint96 buyAmount;\n        // User Id of delta vault in latest gnosis auction\n        uint64 userId;\n    }\n}\n","keccak256":"0x3119c096a02be6137015be605caf65412e0dd4b7df5f25e73bab4f88fddfa5d6","license":"MIT"},"contracts/libraries/VaultLifecycleWithSwap.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity =0.8.4;\n\nimport {SafeMath} from \"@openzeppelin/contracts/utils/math/SafeMath.sol\";\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport {\n    SafeERC20\n} from \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\nimport {Vault} from \"./Vault.sol\";\nimport {ShareMath} from \"./ShareMath.sol\";\nimport {IStrikeSelection} from \"../interfaces/IRibbon.sol\";\nimport {GnosisAuction} from \"./GnosisAuction.sol\";\nimport {\n    IOtokenFactory,\n    IOtoken,\n    IController,\n    GammaTypes\n} from \"../interfaces/GammaInterface.sol\";\nimport {IERC20Detailed} from \"../interfaces/IERC20Detailed.sol\";\nimport {ISwap} from \"../interfaces/ISwap.sol\";\nimport {IOptionsPurchaseQueue} from \"../interfaces/IOptionsPurchaseQueue.sol\";\nimport {SupportsNonCompliantERC20} from \"./SupportsNonCompliantERC20.sol\";\nimport {IOptionsPremiumPricer} from \"../interfaces/IRibbon.sol\";\n\nlibrary VaultLifecycleWithSwap {\n    using SafeMath for uint256;\n    using SupportsNonCompliantERC20 for IERC20;\n    using SafeERC20 for IERC20;\n\n    struct CommitParams {\n        address OTOKEN_FACTORY;\n        address USDC;\n        address collateralAsset;\n        address currentOption;\n        uint256 delay;\n        uint16 lastStrikeOverrideRound;\n        uint256 overriddenStrikePrice;\n        address strikeSelection;\n        address optionsPremiumPricer;\n    }\n\n    /**\n     * @notice Sets the next option the vault will be shorting, and calculates its premium for the auction\n     * @param commitParams is the struct with details on previous option and strike selection details\n     * @param vaultParams is the struct with vault general data\n     * @param vaultState is the struct with vault accounting state\n     * @return otokenAddress is the address of the new option\n     * @return strikePrice is the strike price of the new option\n     * @return delta is the delta of the new option\n     */\n    function commitNextOption(\n        CommitParams calldata commitParams,\n        Vault.VaultParams storage vaultParams,\n        Vault.VaultState storage vaultState\n    )\n        external\n        returns (\n            address otokenAddress,\n            uint256 strikePrice,\n            uint256 delta\n        )\n    {\n        uint256 expiry = getNextExpiry(commitParams.currentOption);\n\n        IStrikeSelection selection =\n            IStrikeSelection(commitParams.strikeSelection);\n\n        bool isPut = vaultParams.isPut;\n        address underlying = vaultParams.underlying;\n\n        (strikePrice, delta) = commitParams.lastStrikeOverrideRound ==\n            vaultState.round\n            ? (commitParams.overriddenStrikePrice, selection.delta())\n            : selection.getStrikePrice(expiry, isPut);\n\n        require(strikePrice != 0, \"!strikePrice\");\n\n        // retrieve address if option already exists, or deploy it\n        otokenAddress = getOrDeployOtoken(\n            commitParams,\n            vaultParams,\n            underlying,\n            strikePrice,\n            expiry,\n            isPut\n        );\n\n        return (otokenAddress, strikePrice, delta);\n    }\n\n    /**\n     * @notice Verify the otoken has the correct parameters to prevent vulnerability to opyn contract changes\n     * @param otokenAddress is the address of the otoken\n     * @param vaultParams is the struct with vault general data\n     * @param collateralAsset is the address of the collateral asset\n     * @param USDC is the address of usdc\n     * @param delay is the delay between commitAndClose and rollToNextOption\n     */\n    function verifyOtoken(\n        address otokenAddress,\n        Vault.VaultParams storage vaultParams,\n        address collateralAsset,\n        address USDC,\n        uint256 delay\n    ) private view {\n        require(otokenAddress != address(0), \"!otokenAddress\");\n\n        IOtoken otoken = IOtoken(otokenAddress);\n        require(otoken.isPut() == vaultParams.isPut, \"Type mismatch\");\n        require(\n            otoken.underlyingAsset() == vaultParams.underlying,\n            \"Wrong underlyingAsset\"\n        );\n        require(\n            otoken.collateralAsset() == collateralAsset,\n            \"Wrong collateralAsset\"\n        );\n\n        // we just assume all options use USDC as the strike\n        require(otoken.strikeAsset() == USDC, \"strikeAsset != USDC\");\n\n        uint256 readyAt = block.timestamp.add(delay);\n        require(otoken.expiryTimestamp() >= readyAt, \"Expiry before delay\");\n    }\n\n    /**\n     * @param decimals is the decimals of the asset\n     * @param totalBalance is the vault's total asset balance\n     * @param currentShareSupply is the supply of the shares invoked with totalSupply()\n     * @param lastQueuedWithdrawAmount is the amount queued for withdrawals from last round\n     * @param performanceFee is the perf fee percent to charge on premiums\n     * @param managementFee is the management fee percent to charge on the AUM\n     */\n    struct CloseParams {\n        uint256 decimals;\n        uint256 totalBalance;\n        uint256 currentShareSupply;\n        uint256 lastQueuedWithdrawAmount;\n        uint256 performanceFee;\n        uint256 managementFee;\n        uint256 currentQueuedWithdrawShares;\n    }\n\n    /**\n     * @notice Calculate the shares to mint, new price per share, and\n      amount of funds to re-allocate as collateral for the new round\n     * @param vaultState is the storage variable vaultState passed from RibbonVault\n     * @param params is the rollover parameters passed to compute the next state\n     * @return newLockedAmount is the amount of funds to allocate for the new round\n     * @return queuedWithdrawAmount is the amount of funds set aside for withdrawal\n     * @return newPricePerShare is the price per share of the new round\n     * @return mintShares is the amount of shares to mint from deposits\n     * @return performanceFeeInAsset is the performance fee charged by vault\n     * @return totalVaultFee is the total amount of fee charged by vault\n     */\n    function closeRound(\n        Vault.VaultState storage vaultState,\n        CloseParams calldata params\n    )\n        external\n        view\n        returns (\n            uint256 newLockedAmount,\n            uint256 queuedWithdrawAmount,\n            uint256 newPricePerShare,\n            uint256 mintShares,\n            uint256 performanceFeeInAsset,\n            uint256 totalVaultFee\n        )\n    {\n        uint256 currentBalance = params.totalBalance;\n        uint256 pendingAmount = vaultState.totalPending;\n        // Total amount of queued withdrawal shares from previous rounds (doesn't include the current round)\n        uint256 lastQueuedWithdrawShares = vaultState.queuedWithdrawShares;\n\n        // Deduct older queued withdraws so we don't charge fees on them\n        uint256 balanceForVaultFees =\n            currentBalance.sub(params.lastQueuedWithdrawAmount);\n\n        {\n            (performanceFeeInAsset, , totalVaultFee) = getVaultFees(\n                balanceForVaultFees,\n                vaultState.lastLockedAmount,\n                vaultState.totalPending,\n                params.performanceFee,\n                params.managementFee\n            );\n        }\n\n        // Take into account the fee\n        // so we can calculate the newPricePerShare\n        currentBalance = currentBalance.sub(totalVaultFee);\n\n        {\n            newPricePerShare = ShareMath.pricePerShare(\n                params.currentShareSupply.sub(lastQueuedWithdrawShares),\n                currentBalance.sub(params.lastQueuedWithdrawAmount),\n                pendingAmount,\n                params.decimals\n            );\n\n            queuedWithdrawAmount = params.lastQueuedWithdrawAmount.add(\n                ShareMath.sharesToAsset(\n                    params.currentQueuedWithdrawShares,\n                    newPricePerShare,\n                    params.decimals\n                )\n            );\n\n            // After closing the short, if the options expire in-the-money\n            // vault pricePerShare would go down because vault's asset balance decreased.\n            // This ensures that the newly-minted shares do not take on the loss.\n            mintShares = ShareMath.assetToShares(\n                pendingAmount,\n                newPricePerShare,\n                params.decimals\n            );\n        }\n\n        return (\n            currentBalance.sub(queuedWithdrawAmount), // new locked balance subtracts the queued withdrawals\n            queuedWithdrawAmount,\n            newPricePerShare,\n            mintShares,\n            performanceFeeInAsset,\n            totalVaultFee\n        );\n    }\n\n    /**\n     * @notice Creates the actual Opyn short position by depositing collateral and minting otokens\n     * @param gammaController is the address of the opyn controller contract\n     * @param marginPool is the address of the opyn margin contract which holds the collateral\n     * @param oTokenAddress is the address of the otoken to mint\n     * @param depositAmount is the amount of collateral to deposit\n     * @return the otoken mint amount\n     */\n    function createShort(\n        address gammaController,\n        address marginPool,\n        address oTokenAddress,\n        uint256 depositAmount\n    ) external returns (uint256) {\n        IController controller = IController(gammaController);\n        uint256 newVaultID =\n            (controller.getAccountVaultCounter(address(this))).add(1);\n\n        // An otoken's collateralAsset is the vault's `asset`\n        // So in the context of performing Opyn short operations we call them collateralAsset\n        IOtoken oToken = IOtoken(oTokenAddress);\n        address collateralAsset = oToken.collateralAsset();\n\n        uint256 collateralDecimals =\n            uint256(IERC20Detailed(collateralAsset).decimals());\n        uint256 mintAmount;\n\n        if (oToken.isPut()) {\n            // For minting puts, there will be instances where the full depositAmount will not be used for minting.\n            // This is because of an issue with precision.\n            //\n            // For ETH put options, we are calculating the mintAmount (10**8 decimals) using\n            // the depositAmount (10**18 decimals), which will result in truncation of decimals when scaling down.\n            // As a result, there will be tiny amounts of dust left behind in the Opyn vault when minting put otokens.\n            //\n            // For simplicity's sake, we do not refund the dust back to the address(this) on minting otokens.\n            // We retain the dust in the vault so the calling contract can withdraw the\n            // actual locked amount + dust at settlement.\n            //\n            // To test this behavior, we can console.log\n            // MarginCalculatorInterface(0x7A48d10f372b3D7c60f6c9770B91398e4ccfd3C7).getExcessCollateral(vault)\n            // to see how much dust (or excess collateral) is left behind.\n            mintAmount = depositAmount\n                .mul(10**Vault.OTOKEN_DECIMALS)\n                .mul(10**18) // we use 10**18 to give extra precision\n                .div(oToken.strikePrice().mul(10**(10 + collateralDecimals)));\n        } else {\n            mintAmount = depositAmount;\n\n            if (collateralDecimals > 8) {\n                uint256 scaleBy = 10**(collateralDecimals.sub(8)); // oTokens have 8 decimals\n                if (mintAmount > scaleBy) {\n                    mintAmount = depositAmount.div(scaleBy); // scale down from 10**18 to 10**8\n                }\n            }\n        }\n\n        // double approve to fix non-compliant ERC20s\n        IERC20 collateralToken = IERC20(collateralAsset);\n        collateralToken.safeApproveNonCompliant(marginPool, depositAmount);\n\n        IController.ActionArgs[] memory actions =\n            new IController.ActionArgs[](3);\n\n        actions[0] = IController.ActionArgs(\n            IController.ActionType.OpenVault,\n            address(this), // owner\n            address(this), // receiver\n            address(0), // asset, otoken\n            newVaultID, // vaultId\n            0, // amount\n            0, //index\n            \"\" //data\n        );\n\n        actions[1] = IController.ActionArgs(\n            IController.ActionType.DepositCollateral,\n            address(this), // owner\n            address(this), // address to transfer from\n            collateralAsset, // deposited asset\n            newVaultID, // vaultId\n            depositAmount, // amount\n            0, //index\n            \"\" //data\n        );\n\n        actions[2] = IController.ActionArgs(\n            IController.ActionType.MintShortOption,\n            address(this), // owner\n            address(this), // address to transfer to\n            oTokenAddress, // option address\n            newVaultID, // vaultId\n            mintAmount, // amount\n            0, //index\n            \"\" //data\n        );\n\n        controller.operate(actions);\n\n        return mintAmount;\n    }\n\n    /**\n     * @notice Close the existing short otoken position. Currently this implementation is simple.\n     * It closes the most recent vault opened by the contract. This assumes that the contract will\n     * only have a single vault open at any given time. Since calling `_closeShort` deletes vaults by\n     calling SettleVault action, this assumption should hold.\n     * @param gammaController is the address of the opyn controller contract\n     * @return amount of collateral redeemed from the vault\n     */\n    function settleShort(address gammaController) external returns (uint256) {\n        IController controller = IController(gammaController);\n\n        // gets the currently active vault ID\n        uint256 vaultID = controller.getAccountVaultCounter(address(this));\n\n        GammaTypes.Vault memory vault =\n            controller.getVault(address(this), vaultID);\n\n        require(vault.shortOtokens.length > 0, \"No short\");\n\n        // An otoken's collateralAsset is the vault's `asset`\n        // So in the context of performing Opyn short operations we call them collateralAsset\n        IERC20 collateralToken = IERC20(vault.collateralAssets[0]);\n\n        // The short position has been previously closed, or all the otokens have been burned.\n        // So we return early.\n        if (address(collateralToken) == address(0)) {\n            return 0;\n        }\n\n        // This is equivalent to doing IERC20(vault.asset).balanceOf(address(this))\n        uint256 startCollateralBalance =\n            collateralToken.balanceOf(address(this));\n\n        // If it is after expiry, we need to settle the short position using the normal way\n        // Delete the vault and withdraw all remaining collateral from the vault\n        IController.ActionArgs[] memory actions =\n            new IController.ActionArgs[](1);\n\n        actions[0] = IController.ActionArgs(\n            IController.ActionType.SettleVault,\n            address(this), // owner\n            address(this), // address to transfer to\n            address(0), // not used\n            vaultID, // vaultId\n            0, // not used\n            0, // not used\n            \"\" // not used\n        );\n\n        controller.operate(actions);\n\n        uint256 endCollateralBalance = collateralToken.balanceOf(address(this));\n\n        return endCollateralBalance.sub(startCollateralBalance);\n    }\n\n    /**\n     * @notice Exercises the ITM option using existing long otoken position. Currently this implementation is simple.\n     * It calls the `Redeem` action to claim the payout.\n     * @param gammaController is the address of the opyn controller contract\n     * @param oldOption is the address of the old option\n     * @param asset is the address of the vault's asset\n     * @return amount of asset received by exercising the option\n     */\n    function settleLong(\n        address gammaController,\n        address oldOption,\n        address asset\n    ) external returns (uint256) {\n        IController controller = IController(gammaController);\n\n        uint256 oldOptionBalance = IERC20(oldOption).balanceOf(address(this));\n\n        if (controller.getPayout(oldOption, oldOptionBalance) == 0) {\n            return 0;\n        }\n\n        uint256 startAssetBalance = IERC20(asset).balanceOf(address(this));\n\n        // If it is after expiry, we need to redeem the profits\n        IController.ActionArgs[] memory actions =\n            new IController.ActionArgs[](1);\n\n        actions[0] = IController.ActionArgs(\n            IController.ActionType.Redeem,\n            address(0), // not used\n            address(this), // address to send profits to\n            oldOption, // address of otoken\n            0, // not used\n            oldOptionBalance, // otoken balance\n            0, // not used\n            \"\" // not used\n        );\n\n        controller.operate(actions);\n\n        uint256 endAssetBalance = IERC20(asset).balanceOf(address(this));\n\n        return endAssetBalance.sub(startAssetBalance);\n    }\n\n    /**\n     * @notice Burn the remaining oTokens left over from auction. Currently this implementation is simple.\n     * It burns oTokens from the most recent vault opened by the contract. This assumes that the contract will\n     * only have a single vault open at any given time.\n     * @param gammaController is the address of the opyn controller contract\n     * @param currentOption is the address of the current option\n     * @return amount of collateral redeemed by burning otokens\n     */\n    function burnOtokens(address gammaController, address currentOption)\n        external\n        returns (uint256)\n    {\n        uint256 numOTokensToBurn =\n            IERC20(currentOption).balanceOf(address(this));\n\n        require(numOTokensToBurn > 0, \"No oTokens to burn\");\n\n        IController controller = IController(gammaController);\n\n        // gets the currently active vault ID\n        uint256 vaultID = controller.getAccountVaultCounter(address(this));\n\n        GammaTypes.Vault memory vault =\n            controller.getVault(address(this), vaultID);\n\n        require(vault.shortOtokens.length > 0, \"No short\");\n\n        IERC20 collateralToken = IERC20(vault.collateralAssets[0]);\n\n        uint256 startCollateralBalance =\n            collateralToken.balanceOf(address(this));\n\n        // Burning `amount` of oTokens from the ribbon vault,\n        // then withdrawing the corresponding collateral amount from the vault\n        IController.ActionArgs[] memory actions =\n            new IController.ActionArgs[](2);\n\n        actions[0] = IController.ActionArgs(\n            IController.ActionType.BurnShortOption,\n            address(this), // owner\n            address(this), // address to transfer from\n            address(vault.shortOtokens[0]), // otoken address\n            vaultID, // vaultId\n            numOTokensToBurn, // amount\n            0, //index\n            \"\" //data\n        );\n\n        actions[1] = IController.ActionArgs(\n            IController.ActionType.WithdrawCollateral,\n            address(this), // owner\n            address(this), // address to transfer to\n            address(collateralToken), // withdrawn asset\n            vaultID, // vaultId\n            vault.collateralAmounts[0].mul(numOTokensToBurn).div(\n                vault.shortAmounts[0]\n            ), // amount\n            0, //index\n            \"\" //data\n        );\n\n        controller.operate(actions);\n\n        uint256 endCollateralBalance = collateralToken.balanceOf(address(this));\n\n        return endCollateralBalance.sub(startCollateralBalance);\n    }\n\n    /**\n     * @notice Calculates the performance and management fee for this week's round\n     * @param currentBalance is the balance of funds held on the vault after closing short\n     * @param lastLockedAmount is the amount of funds locked from the previous round\n     * @param pendingAmount is the pending deposit amount\n     * @param performanceFeePercent is the performance fee pct.\n     * @param managementFeePercent is the management fee pct.\n     * @return performanceFeeInAsset is the performance fee\n     * @return managementFeeInAsset is the management fee\n     * @return vaultFee is the total fees\n     */\n    function getVaultFees(\n        uint256 currentBalance,\n        uint256 lastLockedAmount,\n        uint256 pendingAmount,\n        uint256 performanceFeePercent,\n        uint256 managementFeePercent\n    )\n        internal\n        pure\n        returns (\n            uint256 performanceFeeInAsset,\n            uint256 managementFeeInAsset,\n            uint256 vaultFee\n        )\n    {\n        // At the first round, currentBalance=0, pendingAmount>0\n        // so we just do not charge anything on the first round\n        uint256 lockedBalanceSansPending =\n            currentBalance > pendingAmount\n                ? currentBalance.sub(pendingAmount)\n                : 0;\n\n        uint256 _performanceFeeInAsset;\n        uint256 _managementFeeInAsset;\n        uint256 _vaultFee;\n\n        // Take performance fee and management fee ONLY if difference between\n        // last week and this week's vault deposits, taking into account pending\n        // deposits and withdrawals, is positive. If it is negative, last week's\n        // option expired ITM past breakeven, and the vault took a loss so we\n        // do not collect performance fee for last week\n        if (lockedBalanceSansPending > lastLockedAmount) {\n            _performanceFeeInAsset = performanceFeePercent > 0\n                ? lockedBalanceSansPending\n                    .sub(lastLockedAmount)\n                    .mul(performanceFeePercent)\n                    .div(100 * Vault.FEE_MULTIPLIER)\n                : 0;\n            _managementFeeInAsset = managementFeePercent > 0\n                ? lockedBalanceSansPending.mul(managementFeePercent).div(\n                    100 * Vault.FEE_MULTIPLIER\n                )\n                : 0;\n\n            _vaultFee = _performanceFeeInAsset.add(_managementFeeInAsset);\n        }\n\n        return (_performanceFeeInAsset, _managementFeeInAsset, _vaultFee);\n    }\n\n    /**\n     * @notice Either retrieves the option token if it already exists, or deploy it\n     * @param commitParams is the struct with details on previous option and strike selection details\n     * @param vaultParams is the struct with vault general data\n     * @param underlying is the address of the underlying asset of the option\n     * @param strikePrice is the strike price of the option\n     * @param expiry is the expiry timestamp of the option\n     * @param isPut is whether the option is a put\n     * @return the address of the option\n     */\n    function getOrDeployOtoken(\n        CommitParams calldata commitParams,\n        Vault.VaultParams storage vaultParams,\n        address underlying,\n        uint256 strikePrice,\n        uint256 expiry,\n        bool isPut\n    ) internal returns (address) {\n        IOtokenFactory factory = IOtokenFactory(commitParams.OTOKEN_FACTORY);\n\n        address otokenFromFactory =\n            factory.getOtoken(\n                underlying,\n                commitParams.USDC,\n                commitParams.collateralAsset,\n                strikePrice,\n                expiry,\n                isPut\n            );\n\n        if (otokenFromFactory != address(0)) {\n            return otokenFromFactory;\n        }\n\n        address otoken =\n            factory.createOtoken(\n                underlying,\n                commitParams.USDC,\n                commitParams.collateralAsset,\n                strikePrice,\n                expiry,\n                isPut\n            );\n\n        verifyOtoken(\n            otoken,\n            vaultParams,\n            commitParams.collateralAsset,\n            commitParams.USDC,\n            commitParams.delay\n        );\n\n        return otoken;\n    }\n\n    /**\n     * @notice Creates an offer in the Swap Contract\n     * @param currentOtoken is the current otoken address\n     * @param currOtokenPremium is premium for each otoken\n     * @param swapContract the address of the swap contract\n     * @param vaultParams is the struct with vault general data\n     * @return optionAuctionID auction id of the newly created offer\n     */\n    function createOffer(\n        address currentOtoken,\n        uint256 currOtokenPremium,\n        address swapContract,\n        Vault.VaultParams storage vaultParams\n    ) external returns (uint256 optionAuctionID) {\n        require(\n            currOtokenPremium <= type(uint96).max,\n            \"currentOtokenPremium > type(uint96) max value!\"\n        );\n        require(currOtokenPremium > 0, \"!currentOtokenPremium\");\n\n        uint256 oTokenBalance = IERC20(currentOtoken).balanceOf(address(this));\n        require(\n            oTokenBalance <= type(uint128).max,\n            \"oTokenBalance > type(uint128) max value!\"\n        );\n\n        // Use safeIncrease instead of safeApproval because safeApproval is only used for initial\n        // approval and cannot be called again. Using safeIncrease allow us to call _createOffer\n        // even when we are approving the same oTokens we have used before. This might happen if\n        // we accidentally burn the oTokens before settlement.\n        uint256 allowance =\n            IERC20(currentOtoken).allowance(address(this), swapContract);\n\n        if (allowance < oTokenBalance) {\n            IERC20(currentOtoken).safeIncreaseAllowance(\n                swapContract,\n                oTokenBalance.sub(allowance)\n            );\n        }\n\n        uint256 decimals = vaultParams.decimals;\n\n        // If total size is larger than 1, set minimum bid as 1\n        // Otherwise, set minimum bid to one tenth the total size\n        uint256 minBidSize =\n            oTokenBalance > 10**decimals ? 10**decimals : oTokenBalance.div(10);\n\n        require(\n            minBidSize <= type(uint96).max,\n            \"minBidSize > type(uint96) max value!\"\n        );\n\n        currOtokenPremium = decimals > 18\n            ? currOtokenPremium.mul(10**(decimals.sub(18)))\n            : currOtokenPremium.div(10**(uint256(18).sub(decimals)));\n\n        optionAuctionID = ISwap(swapContract).createOffer(\n            currentOtoken,\n            vaultParams.asset,\n            uint96(currOtokenPremium),\n            uint96(minBidSize),\n            uint128(oTokenBalance)\n        );\n    }\n\n    /**\n     * @notice Allocates the vault's minted options to the OptionsPurchaseQueue contract\n     * @dev Skipped if the optionsPurchaseQueue doesn't exist\n     * @param optionsPurchaseQueue is the OptionsPurchaseQueue contract\n     * @param option is the minted option\n     * @param optionsAmount is the amount of options minted\n     * @param optionAllocation is the maximum % of options to allocate towards the purchase queue (will only allocate\n     *  up to the amount that is on the queue)\n     * @return allocatedOptions is the amount of options that ended up getting allocated to the OptionsPurchaseQueue\n     */\n    function allocateOptions(\n        address optionsPurchaseQueue,\n        address option,\n        uint256 optionsAmount,\n        uint256 optionAllocation\n    ) external returns (uint256 allocatedOptions) {\n        // Skip if optionsPurchaseQueue is address(0)\n        if (optionsPurchaseQueue != address(0)) {\n            allocatedOptions = optionsAmount.mul(optionAllocation).div(\n                100 * Vault.OPTION_ALLOCATION_MULTIPLIER\n            );\n            allocatedOptions = IOptionsPurchaseQueue(optionsPurchaseQueue)\n                .getOptionsAllocation(address(this), allocatedOptions);\n\n            if (allocatedOptions != 0) {\n                IERC20(option).approve(optionsPurchaseQueue, allocatedOptions);\n                IOptionsPurchaseQueue(optionsPurchaseQueue).allocateOptions(\n                    allocatedOptions\n                );\n            }\n        }\n\n        return allocatedOptions;\n    }\n\n    /**\n     * @notice Sell the allocated options to the purchase queue post auction settlement\n     * @dev Reverts if the auction hasn't settled yet\n     * @param optionsPurchaseQueue is the OptionsPurchaseQueue contract\n     * @param swapContract The address of the swap settlement contract\n     * @return totalPremiums Total premiums earnt by the vault\n     */\n    function sellOptionsToQueue(\n        address optionsPurchaseQueue,\n        address swapContract,\n        uint256 optionAuctionID\n    ) external returns (uint256) {\n        uint256 settlementPrice =\n            getAuctionSettlementPrice(swapContract, optionAuctionID);\n        require(settlementPrice != 0, \"!settlementPrice\");\n\n        return\n            IOptionsPurchaseQueue(optionsPurchaseQueue).sellToBuyers(\n                settlementPrice\n            );\n    }\n\n    /**\n     * @notice Gets the settlement price of a settled auction\n     * @param swapContract The address of the swap settlement contract\n     * @param optionAuctionID is the offer ID\n     * @return settlementPrice Auction settlement price\n     */\n    function getAuctionSettlementPrice(\n        address swapContract,\n        uint256 optionAuctionID\n    ) public view returns (uint256) {\n        return ISwap(swapContract).averagePriceForOffer(optionAuctionID);\n    }\n\n    /**\n     * @notice Verify the constructor params satisfy requirements\n     * @param owner is the owner of the vault with critical permissions\n     * @param feeRecipient is the address to recieve vault performance and management fees\n     * @param performanceFee is the perfomance fee pct.\n     * @param tokenName is the name of the token\n     * @param tokenSymbol is the symbol of the token\n     * @param _vaultParams is the struct with vault general data\n     */\n    function verifyInitializerParams(\n        address owner,\n        address keeper,\n        address feeRecipient,\n        uint256 performanceFee,\n        uint256 managementFee,\n        string calldata tokenName,\n        string calldata tokenSymbol,\n        Vault.VaultParams calldata _vaultParams\n    ) external pure {\n        require(owner != address(0), \"!owner\");\n        require(keeper != address(0), \"!keeper\");\n        require(feeRecipient != address(0), \"!feeRecipient\");\n        require(\n            performanceFee < 100 * Vault.FEE_MULTIPLIER,\n            \"performanceFee >= 100%\"\n        );\n        require(\n            managementFee < 100 * Vault.FEE_MULTIPLIER,\n            \"managementFee >= 100%\"\n        );\n        require(bytes(tokenName).length > 0, \"!tokenName\");\n        require(bytes(tokenSymbol).length > 0, \"!tokenSymbol\");\n\n        require(_vaultParams.asset != address(0), \"!asset\");\n        require(_vaultParams.underlying != address(0), \"!underlying\");\n        require(_vaultParams.minimumSupply > 0, \"!minimumSupply\");\n        require(_vaultParams.cap > 0, \"!cap\");\n        require(\n            _vaultParams.cap > _vaultParams.minimumSupply,\n            \"cap has to be higher than minimumSupply\"\n        );\n    }\n\n    /**\n     * @notice Gets the next option expiry timestamp\n     * @param currentOption is the otoken address that the vault is currently writing\n     */\n    function getNextExpiry(address currentOption)\n        internal\n        view\n        returns (uint256)\n    {\n        // uninitialized state\n        if (currentOption == address(0)) {\n            return getNextFriday(block.timestamp);\n        }\n        uint256 currentExpiry = IOtoken(currentOption).expiryTimestamp();\n\n        // After options expiry if no options are written for >1 week\n        // We need to give the ability continue writing options\n        if (block.timestamp > currentExpiry + 7 days) {\n            return getNextFriday(block.timestamp);\n        }\n        return getNextFriday(currentExpiry);\n    }\n\n    /**\n     * @notice Gets the next options expiry timestamp\n     * @param timestamp is the expiry timestamp of the current option\n     * Reference: https://codereview.stackexchange.com/a/33532\n     * Examples:\n     * getNextFriday(week 1 thursday) -> week 1 friday\n     * getNextFriday(week 1 friday) -> week 2 friday\n     * getNextFriday(week 1 saturday) -> week 2 friday\n     */\n    function getNextFriday(uint256 timestamp) internal pure returns (uint256) {\n        // dayOfWeek = 0 (sunday) - 6 (saturday)\n        uint256 dayOfWeek = ((timestamp / 1 days) + 4) % 7;\n        uint256 nextFriday = timestamp + ((7 + 5 - dayOfWeek) % 7) * 1 days;\n        uint256 friday8am = nextFriday - (nextFriday % (24 hours)) + (8 hours);\n\n        // If the passed timestamp is day=Friday hour>8am, we simply increment it by a week to next Friday\n        if (timestamp >= friday8am) {\n            friday8am += 7 days;\n        }\n        return friday8am;\n    }\n}\n","keccak256":"0x8c46787cf244c61a0945101272977fd95a7e0ec2c70068561097b8f92ecb3c9a","license":"MIT"},"contracts/storage/RibbonThetaVaultStorage.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity =0.8.4;\n\nabstract contract RibbonThetaVaultStorageV1 {\n    // Logic contract used to price options\n    address public optionsPremiumPricer;\n    // Logic contract used to select strike prices\n    address public strikeSelection;\n    // Premium discount on options we are selling (thousandths place: 000 - 999)\n    uint256 public premiumDiscount;\n    // Current oToken premium\n    uint256 public currentOtokenPremium;\n    // Last round id at which the strike was manually overridden\n    uint16 public lastStrikeOverrideRound;\n    // Price last overridden strike set to\n    uint256 public overriddenStrikePrice;\n    // Auction duration\n    uint256 public auctionDuration;\n    // Auction id of current option\n    uint256 public optionAuctionID;\n}\n\nabstract contract RibbonThetaVaultStorageV2 {\n    // Amount locked for scheduled withdrawals last week;\n    uint256 public lastQueuedWithdrawAmount;\n}\n\nabstract contract RibbonThetaVaultStorageV3 {\n    // DEPRECATED: Auction will be denominated in USDC if true\n    bool private _isUsdcAuction;\n    // DEPRECATED: Path for swaps\n    bytes private _swapPath;\n}\n\nabstract contract RibbonThetaVaultStorageV4 {\n    // LiquidityGauge contract for the vault\n    address public liquidityGauge;\n}\n\nabstract contract RibbonThetaVaultStorageV5 {\n    // OptionsPurchaseQueue contract for selling options\n    address public optionsPurchaseQueue;\n}\n\nabstract contract RibbonThetaVaultStorageV6 {\n    // Queued withdraw shares for the current round\n    uint256 public currentQueuedWithdrawShares;\n}\n\nabstract contract RibbonThetaVaultStorageV7 {\n    // Vault Pauser Contract for the vault\n    address public vaultPauser;\n}\n\nabstract contract RibbonThetaVaultStorageV8 {\n    // DEPRECATED: Executor role for Swap offers\n    address private _offerExecutor;\n}\n\n// We are following Compound's method of upgrading new contract implementations\n// When we need to add new storage variables, we create a new version of RibbonThetaVaultStorage\n// e.g. RibbonThetaVaultStorage<versionNumber>, so finally it would look like\n// contract RibbonThetaVaultStorage is RibbonThetaVaultStorageV1, RibbonThetaVaultStorageV2\nabstract contract RibbonThetaVaultStorage is\n    RibbonThetaVaultStorageV1,\n    RibbonThetaVaultStorageV2,\n    RibbonThetaVaultStorageV3,\n    RibbonThetaVaultStorageV4,\n    RibbonThetaVaultStorageV5,\n    RibbonThetaVaultStorageV6,\n    RibbonThetaVaultStorageV7,\n    RibbonThetaVaultStorageV8\n{\n\n}\n","keccak256":"0x39b4f9471e42d509dff2e44f04de23b5e0bc67493110983153fe7e06e2d52c07","license":"MIT"},"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity =0.8.4;\n\nimport {SafeMath} from \"@openzeppelin/contracts/utils/math/SafeMath.sol\";\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport {\n    SafeERC20\n} from \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\n\nimport {ISwap} from \"../../interfaces/ISwap.sol\";\nimport {\n    RibbonThetaVaultStorage\n} from \"../../storage/RibbonThetaVaultStorage.sol\";\nimport {Vault} from \"../../libraries/Vault.sol\";\nimport {\n    VaultLifecycleWithSwap\n} from \"../../libraries/VaultLifecycleWithSwap.sol\";\nimport {ShareMath} from \"../../libraries/ShareMath.sol\";\nimport {ILiquidityGauge} from \"../../interfaces/ILiquidityGauge.sol\";\nimport {RibbonVault} from \"./base/RibbonVault.sol\";\nimport {IVaultPauser} from \"../../interfaces/IVaultPauser.sol\";\n\n/**\n * UPGRADEABILITY: Since we use the upgradeable proxy pattern, we must observe\n * the inheritance chain closely.\n * Any changes/appends in storage variable needs to happen in RibbonThetaVaultStorage.\n * RibbonThetaVault should not inherit from any other contract aside from RibbonVault, RibbonThetaVaultStorage\n */\ncontract RibbonThetaVaultWithSwap is RibbonVault, RibbonThetaVaultStorage {\n    using SafeERC20 for IERC20;\n    using SafeMath for uint256;\n    using ShareMath for Vault.DepositReceipt;\n\n    /************************************************\n     *  IMMUTABLES & CONSTANTS\n     ***********************************************/\n\n    /// @notice oTokenFactory is the factory contract used to spawn otokens. Used to lookup otokens.\n    address public immutable OTOKEN_FACTORY;\n\n    // The minimum duration for an option auction.\n    uint256 private constant MIN_AUCTION_DURATION = 5 minutes;\n\n    /************************************************\n     *  EVENTS\n     ***********************************************/\n\n    event OpenShort(\n        address indexed options,\n        uint256 depositAmount,\n        address indexed manager\n    );\n\n    event CloseShort(\n        address indexed options,\n        uint256 withdrawAmount,\n        address indexed manager\n    );\n\n    event NewOptionStrikeSelected(uint256 strikePrice, uint256 delta);\n\n    event AuctionDurationSet(\n        uint256 auctionDuration,\n        uint256 newAuctionDuration\n    );\n\n    event InstantWithdraw(\n        address indexed account,\n        uint256 amount,\n        uint256 round\n    );\n\n    event NewOffer(\n        uint256 swapId,\n        address seller,\n        address oToken,\n        address biddingToken,\n        uint256 minPrice,\n        uint256 minBidSize,\n        uint256 totalSize\n    );\n\n    /************************************************\n     *  STRUCTS\n     ***********************************************/\n\n    /**\n     * @notice Initialization parameters for the vault.\n     * @param _owner is the owner of the vault with critical permissions\n     * @param _feeRecipient is the address to recieve vault performance and management fees\n     * @param _managementFee is the management fee pct.\n     * @param _performanceFee is the perfomance fee pct.\n     * @param _tokenName is the name of the token\n     * @param _tokenSymbol is the symbol of the token\n     * @param _optionsPremiumPricer is the address of the contract with the\n       black-scholes premium calculation logic\n     * @param _strikeSelection is the address of the contract with strike selection logic\n     */\n    struct InitParams {\n        address _owner;\n        address _keeper;\n        address _feeRecipient;\n        uint256 _managementFee;\n        uint256 _performanceFee;\n        string _tokenName;\n        string _tokenSymbol;\n        address _optionsPremiumPricer;\n        address _strikeSelection;\n    }\n\n    /************************************************\n     *  CONSTRUCTOR & INITIALIZATION\n     ***********************************************/\n\n    /**\n     * @notice Initializes the contract with immutable variables\n     * @param _weth is the Wrapped Ether contract\n     * @param _usdc is the USDC contract\n     * @param _oTokenFactory is the contract address for minting new opyn option types (strikes, asset, expiry)\n     * @param _gammaController is the contract address for opyn actions\n     * @param _marginPool is the contract address for providing collateral to opyn\n     * @param _swapContract is the contract address that facilitates bids settlement\n     */\n    constructor(\n        address _weth,\n        address _usdc,\n        address _oTokenFactory,\n        address _gammaController,\n        address _marginPool,\n        address _swapContract\n    ) RibbonVault(_weth, _usdc, _gammaController, _marginPool, _swapContract) {\n        require(_oTokenFactory != address(0), \"!_oTokenFactory\");\n        OTOKEN_FACTORY = _oTokenFactory;\n    }\n\n    /**\n     * @notice Initializes the OptionVault contract with storage variables.\n     * @param _initParams is the struct with vault initialization parameters\n     * @param _vaultParams is the struct with vault general data\n     */\n    function initialize(\n        InitParams calldata _initParams,\n        Vault.VaultParams calldata _vaultParams\n    ) external initializer {\n        baseInitialize(\n            _initParams._owner,\n            _initParams._keeper,\n            _initParams._feeRecipient,\n            _initParams._managementFee,\n            _initParams._performanceFee,\n            _initParams._tokenName,\n            _initParams._tokenSymbol,\n            _vaultParams\n        );\n        require(\n            _initParams._optionsPremiumPricer != address(0),\n            \"!_optionsPremiumPricer\"\n        );\n        require(\n            _initParams._strikeSelection != address(0),\n            \"!_strikeSelection\"\n        );\n\n        optionsPremiumPricer = _initParams._optionsPremiumPricer;\n        strikeSelection = _initParams._strikeSelection;\n    }\n\n    /************************************************\n     *  SETTERS\n     ***********************************************/\n\n    /**\n     * @notice Sets the new strike selection contract\n     * @param newStrikeSelection is the address of the new strike selection contract\n     */\n    function setStrikeSelection(address newStrikeSelection) external onlyOwner {\n        require(newStrikeSelection != address(0), \"!newStrikeSelection\");\n        strikeSelection = newStrikeSelection;\n    }\n\n    /**\n     * @notice Sets the new options premium pricer contract\n     * @param newOptionsPremiumPricer is the address of the new strike selection contract\n     */\n    function setOptionsPremiumPricer(address newOptionsPremiumPricer)\n        external\n        onlyOwner\n    {\n        require(\n            newOptionsPremiumPricer != address(0),\n            \"!newOptionsPremiumPricer\"\n        );\n        optionsPremiumPricer = newOptionsPremiumPricer;\n    }\n\n    /**\n     * @notice Optionality to set strike price manually\n     * Should be called after closeRound if we are setting current week's strike\n     * @param strikePrice is the strike price of the new oTokens (decimals = 8)\n     */\n    function setStrikePrice(uint128 strikePrice) external onlyOwner {\n        require(strikePrice > 0, \"!strikePrice\");\n        overriddenStrikePrice = strikePrice;\n        lastStrikeOverrideRound = vaultState.round;\n    }\n\n    /**\n     * @notice Sets the new liquidityGauge contract for this vault\n     * @param newLiquidityGauge is the address of the new liquidityGauge contract\n     */\n    function setLiquidityGauge(address newLiquidityGauge) external onlyOwner {\n        liquidityGauge = newLiquidityGauge;\n    }\n\n    /**\n     * @notice Sets oToken Premium\n     * @param minPrice is the new oToken Premium in the units of 10**18\n     */\n    function setMinPrice(uint256 minPrice) external onlyKeeper {\n        require(minPrice > 0, \"!minPrice\");\n        currentOtokenPremium = minPrice;\n    }\n\n    /**\n     * @notice Sets the new Vault Pauser contract for this vault\n     * @param newVaultPauser is the address of the new vaultPauser contract\n     */\n    function setVaultPauser(address newVaultPauser) external onlyOwner {\n        vaultPauser = newVaultPauser;\n    }\n\n    /************************************************\n     *  VAULT OPERATIONS\n     ***********************************************/\n\n    /**\n     * @notice Withdraws the assets on the vault using the outstanding `DepositReceipt.amount`\n     * @param amount is the amount to withdraw\n     */\n    function withdrawInstantly(uint256 amount) external nonReentrant {\n        Vault.DepositReceipt storage depositReceipt =\n            depositReceipts[msg.sender];\n\n        uint256 currentRound = vaultState.round;\n        require(amount > 0, \"!amount\");\n        require(depositReceipt.round == currentRound, \"Invalid round\");\n\n        uint256 receiptAmount = depositReceipt.amount;\n        require(receiptAmount >= amount, \"Exceed amount\");\n\n        // Subtraction underflow checks already ensure it is smaller than uint104\n        depositReceipt.amount = uint104(receiptAmount.sub(amount));\n        vaultState.totalPending = uint128(\n            uint256(vaultState.totalPending).sub(amount)\n        );\n\n        emit InstantWithdraw(msg.sender, amount, currentRound);\n\n        transferAsset(msg.sender, amount);\n    }\n\n    /**\n     * @notice Initiates a withdrawal that can be processed once the round completes\n     * @param numShares is the number of shares to withdraw\n     */\n    function initiateWithdraw(uint256 numShares) external nonReentrant {\n        _initiateWithdraw(numShares);\n        currentQueuedWithdrawShares = currentQueuedWithdrawShares.add(\n            numShares\n        );\n    }\n\n    /**\n     * @notice Completes a scheduled withdrawal from a past round. Uses finalized pps for the round\n     */\n    function completeWithdraw() external nonReentrant {\n        uint256 withdrawAmount = _completeWithdraw();\n        lastQueuedWithdrawAmount = uint128(\n            uint256(lastQueuedWithdrawAmount).sub(withdrawAmount)\n        );\n    }\n\n    /**\n     * @notice Stakes a users vault shares\n     * @param numShares is the number of shares to stake\n     */\n    function stake(uint256 numShares) external nonReentrant {\n        address _liquidityGauge = liquidityGauge;\n        require(_liquidityGauge != address(0)); // Removed revert msgs due to contract size limit\n        require(numShares > 0);\n        uint256 heldByAccount = balanceOf(msg.sender);\n        if (heldByAccount < numShares) {\n            _redeem(numShares.sub(heldByAccount), false);\n        }\n        _transfer(msg.sender, address(this), numShares);\n        _approve(address(this), _liquidityGauge, numShares);\n        ILiquidityGauge(_liquidityGauge).deposit(numShares, msg.sender, false);\n    }\n\n    /**\n     * @notice Closes the existing short and calculate the shares to mint, new price per share &\n      amount of funds to re-allocate as collateral for the new round\n     * Since we are incrementing the round here, the options are sold in the beginning of a round\n     * instead of at the end of the round. For example, at round 1, we don't sell any options. We\n     * start selling options at the beginning of round 2.\n     */\n    function closeRound() external nonReentrant {\n        address oldOption = optionState.currentOption;\n        require(\n            oldOption != address(0) || vaultState.round == 1,\n            \"Round closed\"\n        );\n        _closeShort(oldOption);\n\n        uint256 currQueuedWithdrawShares = currentQueuedWithdrawShares;\n        (uint256 lockedBalance, uint256 queuedWithdrawAmount) =\n            _closeRound(\n                uint256(lastQueuedWithdrawAmount),\n                currQueuedWithdrawShares\n            );\n\n        lastQueuedWithdrawAmount = queuedWithdrawAmount;\n\n        uint256 newQueuedWithdrawShares =\n            uint256(vaultState.queuedWithdrawShares).add(\n                currQueuedWithdrawShares\n            );\n        ShareMath.assertUint128(newQueuedWithdrawShares);\n        vaultState.queuedWithdrawShares = uint128(newQueuedWithdrawShares);\n\n        currentQueuedWithdrawShares = 0;\n\n        ShareMath.assertUint104(lockedBalance);\n        vaultState.lockedAmount = uint104(lockedBalance);\n\n        uint256 nextOptionReady = block.timestamp.add(DELAY);\n        require(\n            nextOptionReady <= type(uint32).max,\n            \"Overflow nextOptionReady\"\n        );\n        optionState.nextOptionReadyAt = uint32(nextOptionReady);\n    }\n\n    /**\n     * @notice Closes the existing short position for the vault.\n     */\n    function _closeShort(address oldOption) private {\n        uint256 lockedAmount = vaultState.lockedAmount;\n        if (oldOption != address(0)) {\n            vaultState.lastLockedAmount = uint104(lockedAmount);\n        }\n        vaultState.lockedAmount = 0;\n\n        optionState.currentOption = address(0);\n\n        if (oldOption != address(0)) {\n            uint256 withdrawAmount =\n                VaultLifecycleWithSwap.settleShort(GAMMA_CONTROLLER);\n            emit CloseShort(oldOption, withdrawAmount, msg.sender);\n        }\n    }\n\n    /**\n     * @notice Sets the next option the vault will be shorting\n     */\n    function commitNextOption() external onlyKeeper nonReentrant {\n        address currentOption = optionState.currentOption;\n        require(\n            currentOption == address(0) && vaultState.round != 1,\n            \"Round not closed\"\n        );\n\n        VaultLifecycleWithSwap.CommitParams memory commitParams =\n            VaultLifecycleWithSwap.CommitParams({\n                OTOKEN_FACTORY: OTOKEN_FACTORY,\n                USDC: USDC,\n                collateralAsset: vaultParams.asset,\n                currentOption: currentOption,\n                delay: DELAY,\n                lastStrikeOverrideRound: lastStrikeOverrideRound,\n                overriddenStrikePrice: overriddenStrikePrice,\n                strikeSelection: strikeSelection,\n                optionsPremiumPricer: optionsPremiumPricer\n            });\n\n        (address otokenAddress, uint256 strikePrice, uint256 delta) =\n            VaultLifecycleWithSwap.commitNextOption(\n                commitParams,\n                vaultParams,\n                vaultState\n            );\n\n        emit NewOptionStrikeSelected(strikePrice, delta);\n\n        optionState.nextOption = otokenAddress;\n    }\n\n    /**\n     * @notice Rolls the vault's funds into a new short position and create a new offer.\n     */\n    function rollToNextOption() external onlyKeeper nonReentrant {\n        address newOption = optionState.nextOption;\n        require(newOption != address(0), \"!nextOption\");\n\n        optionState.currentOption = newOption;\n        optionState.nextOption = address(0);\n        uint256 lockedBalance = vaultState.lockedAmount;\n\n        emit OpenShort(newOption, lockedBalance, msg.sender);\n\n        VaultLifecycleWithSwap.createShort(\n            GAMMA_CONTROLLER,\n            MARGIN_POOL,\n            newOption,\n            lockedBalance\n        );\n\n        _createOffer();\n    }\n\n    function _createOffer() private {\n        address currentOtoken = optionState.currentOption;\n        uint256 currOtokenPremium = currentOtokenPremium;\n\n        optionAuctionID = VaultLifecycleWithSwap.createOffer(\n            currentOtoken,\n            currOtokenPremium,\n            SWAP_CONTRACT,\n            vaultParams\n        );\n    }\n\n    /**\n     * @notice Settle current offer\n     */\n    function settleOffer(ISwap.Bid[] calldata bids)\n        external\n        onlyKeeper\n        nonReentrant\n    {\n        ISwap(SWAP_CONTRACT).settleOffer(optionAuctionID, bids);\n    }\n\n    /**\n     * @notice Burn the remaining oTokens left over\n     */\n    function burnRemainingOTokens() external onlyKeeper nonReentrant {\n        VaultLifecycleWithSwap.burnOtokens(\n            GAMMA_CONTROLLER,\n            optionState.currentOption\n        );\n    }\n\n    /**\n     * @notice pause a user's vault position\n     */\n    function pausePosition() external {\n        address _vaultPauserAddress = vaultPauser;\n        require(_vaultPauserAddress != address(0)); // Removed revert msgs due to contract size limit\n        _redeem(0, true);\n        uint256 heldByAccount = balanceOf(msg.sender);\n        _approve(msg.sender, _vaultPauserAddress, heldByAccount);\n        IVaultPauser(_vaultPauserAddress).pausePosition(\n            msg.sender,\n            heldByAccount\n        );\n    }\n}\n","keccak256":"0xa91829d8d36f0e0e524b4a9a3dce3f2a579eecfc99a5f218fab82975e5c7ae57","license":"MIT"},"contracts/vaults/BaseVaultWithSwap/base/RibbonVault.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity =0.8.4;\n\nimport {SafeMath} from \"@openzeppelin/contracts/utils/math/SafeMath.sol\";\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport {\n    SafeERC20\n} from \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\nimport {\n    ReentrancyGuardUpgradeable\n} from \"@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol\";\nimport {\n    OwnableUpgradeable\n} from \"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\";\nimport {\n    ERC20Upgradeable\n} from \"@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol\";\n\nimport {Vault} from \"../../../libraries/Vault.sol\";\nimport {\n    VaultLifecycleWithSwap\n} from \"../../../libraries/VaultLifecycleWithSwap.sol\";\nimport {ShareMath} from \"../../../libraries/ShareMath.sol\";\nimport {IWETH} from \"../../../interfaces/IWETH.sol\";\n\ncontract RibbonVault is\n    ReentrancyGuardUpgradeable,\n    OwnableUpgradeable,\n    ERC20Upgradeable\n{\n    using SafeERC20 for IERC20;\n    using SafeMath for uint256;\n    using ShareMath for Vault.DepositReceipt;\n\n    /************************************************\n     *  NON UPGRADEABLE STORAGE\n     ***********************************************/\n\n    /// @notice Stores the user's pending deposit for the round\n    mapping(address => Vault.DepositReceipt) public depositReceipts;\n\n    /// @notice On every round's close, the pricePerShare value of an rTHETA token is stored\n    /// This is used to determine the number of shares to be returned\n    /// to a user with their DepositReceipt.depositAmount\n    mapping(uint256 => uint256) public roundPricePerShare;\n\n    /// @notice Stores pending user withdrawals\n    mapping(address => Vault.Withdrawal) public withdrawals;\n\n    /// @notice Vault's parameters like cap, decimals\n    Vault.VaultParams public vaultParams;\n\n    /// @notice Vault's lifecycle state like round and locked amounts\n    Vault.VaultState public vaultState;\n\n    /// @notice Vault's state of the options sold and the timelocked option\n    Vault.OptionState public optionState;\n\n    /// @notice Fee recipient for the performance and management fees\n    address public feeRecipient;\n\n    /// @notice role in charge of weekly vault operations such as rollToNextOption and burnRemainingOTokens\n    // no access to critical vault changes\n    address public keeper;\n\n    /// @notice Performance fee charged on premiums earned in rollToNextOption. Only charged when there is no loss.\n    uint256 public performanceFee;\n\n    /// @notice Management fee charged on entire AUM in rollToNextOption. Only charged when there is no loss.\n    uint256 public managementFee;\n\n    // Gap is left to avoid storage collisions. Though RibbonVault is not upgradeable, we add this as a safety measure.\n    uint256[30] private ____gap;\n\n    // *IMPORTANT* NO NEW STORAGE VARIABLES SHOULD BE ADDED HERE\n    // This is to prevent storage collisions. All storage variables should be appended to RibbonThetaVaultStorage\n    // or RibbonDeltaVaultStorage instead. Read this documentation to learn more:\n    // https://docs.openzeppelin.com/upgrades-plugins/1.x/writing-upgradeable#modifying-your-contracts\n\n    /************************************************\n     *  IMMUTABLES & CONSTANTS\n     ***********************************************/\n\n    /// @notice WETH9 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n    address public immutable WETH;\n\n    /// @notice USDC 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\n    address public immutable USDC;\n\n    /// @notice Deprecated: 15 minute timelock between commitAndClose and rollToNexOption.\n    uint256 public constant DELAY = 0;\n\n    /// @notice 7 day period between each options sale.\n    uint256 public constant PERIOD = 7 days;\n\n    // Number of weeks per year = 52.142857 weeks * FEE_MULTIPLIER = 52142857\n    // Dividing by weeks per year requires doing num.mul(FEE_MULTIPLIER).div(WEEKS_PER_YEAR)\n    uint256 private constant WEEKS_PER_YEAR = 52142857;\n\n    // GAMMA_CONTROLLER is the top-level contract in Gamma protocol\n    // which allows users to perform multiple actions on their vaults\n    // and positions https://github.com/opynfinance/GammaProtocol/blob/master/contracts/core/Controller.sol\n    address public immutable GAMMA_CONTROLLER;\n\n    // MARGIN_POOL is Gamma protocol's collateral pool.\n    // Needed to approve collateral.safeTransferFrom for minting otokens.\n    // https://github.com/opynfinance/GammaProtocol/blob/master/contracts/core/MarginPool.sol\n    address public immutable MARGIN_POOL;\n\n    // SWAP_CONTRACT is a contract for settling bids via signed messages\n    // https://github.com/ribbon-finance/ribbon-v2/blob/master/contracts/utils/Swap.sol\n    address public immutable SWAP_CONTRACT;\n\n    /************************************************\n     *  EVENTS\n     ***********************************************/\n\n    event Deposit(address indexed account, uint256 amount, uint256 round);\n\n    event InitiateWithdraw(\n        address indexed account,\n        uint256 shares,\n        uint256 round\n    );\n\n    event Redeem(address indexed account, uint256 share, uint256 round);\n\n    event ManagementFeeSet(uint256 managementFee, uint256 newManagementFee);\n\n    event PerformanceFeeSet(uint256 performanceFee, uint256 newPerformanceFee);\n\n    event CapSet(uint256 oldCap, uint256 newCap);\n\n    event Withdraw(address indexed account, uint256 amount, uint256 shares);\n\n    event CollectVaultFees(\n        uint256 performanceFee,\n        uint256 vaultFee,\n        uint256 round,\n        address indexed feeRecipient\n    );\n\n    /************************************************\n     *  CONSTRUCTOR & INITIALIZATION\n     ***********************************************/\n\n    /**\n     * @notice Initializes the contract with immutable variables\n     * @param _weth is the Wrapped Ether contract\n     * @param _usdc is the USDC contract\n     * @param _gammaController is the contract address for opyn actions\n     * @param _marginPool is the contract address for providing collateral to opyn\n     * @param _swapContract is the contract address that facilitates bids settlement\n     */\n    constructor(\n        address _weth,\n        address _usdc,\n        address _gammaController,\n        address _marginPool,\n        address _swapContract\n    ) {\n        require(_weth != address(0), \"!_weth\");\n        require(_usdc != address(0), \"!_usdc\");\n        require(_swapContract != address(0), \"!_swapContract\");\n        require(_gammaController != address(0), \"!_gammaController\");\n        require(_marginPool != address(0), \"!_marginPool\");\n\n        WETH = _weth;\n        USDC = _usdc;\n        GAMMA_CONTROLLER = _gammaController;\n        MARGIN_POOL = _marginPool;\n        SWAP_CONTRACT = _swapContract;\n    }\n\n    /**\n     * @notice Initializes the OptionVault contract with storage variables.\n     */\n    function baseInitialize(\n        address _owner,\n        address _keeper,\n        address _feeRecipient,\n        uint256 _managementFee,\n        uint256 _performanceFee,\n        string memory _tokenName,\n        string memory _tokenSymbol,\n        Vault.VaultParams calldata _vaultParams\n    ) internal initializer {\n        VaultLifecycleWithSwap.verifyInitializerParams(\n            _owner,\n            _keeper,\n            _feeRecipient,\n            _performanceFee,\n            _managementFee,\n            _tokenName,\n            _tokenSymbol,\n            _vaultParams\n        );\n\n        __ReentrancyGuard_init();\n        __ERC20_init(_tokenName, _tokenSymbol);\n        __Ownable_init();\n        transferOwnership(_owner);\n\n        keeper = _keeper;\n\n        feeRecipient = _feeRecipient;\n        performanceFee = _performanceFee;\n        managementFee = _managementFee.mul(Vault.FEE_MULTIPLIER).div(\n            WEEKS_PER_YEAR\n        );\n        vaultParams = _vaultParams;\n\n        uint256 assetBalance =\n            IERC20(vaultParams.asset).balanceOf(address(this));\n        ShareMath.assertUint104(assetBalance);\n        vaultState.lastLockedAmount = uint104(assetBalance);\n\n        vaultState.round = 1;\n    }\n\n    /**\n     * @dev Throws if called by any account other than the keeper.\n     */\n    modifier onlyKeeper() {\n        require(msg.sender == keeper, \"!keeper\");\n        _;\n    }\n\n    /************************************************\n     *  SETTERS\n     ***********************************************/\n\n    /**\n     * @notice Sets the new keeper\n     * @param newKeeper is the address of the new keeper\n     */\n    function setNewKeeper(address newKeeper) external onlyOwner {\n        require(newKeeper != address(0), \"!newKeeper\");\n        keeper = newKeeper;\n    }\n\n    /**\n     * @notice Sets the new fee recipient\n     * @param newFeeRecipient is the address of the new fee recipient\n     */\n    function setFeeRecipient(address newFeeRecipient) external onlyOwner {\n        require(newFeeRecipient != address(0), \"!newFeeRecipient\");\n        require(newFeeRecipient != feeRecipient, \"Must be new feeRecipient\");\n        feeRecipient = newFeeRecipient;\n    }\n\n    /**\n     * @notice Sets the management fee for the vault\n     * @param newManagementFee is the management fee (6 decimals). ex: 2 * 10 ** 6 = 2%\n     */\n    function setManagementFee(uint256 newManagementFee) external onlyOwner {\n        require(\n            newManagementFee < 100 * Vault.FEE_MULTIPLIER,\n            \"Invalid management fee\"\n        );\n\n        // We are dividing annualized management fee by num weeks in a year\n        uint256 tmpManagementFee =\n            newManagementFee.mul(Vault.FEE_MULTIPLIER).div(WEEKS_PER_YEAR);\n\n        emit ManagementFeeSet(managementFee, newManagementFee);\n\n        managementFee = tmpManagementFee;\n    }\n\n    /**\n     * @notice Sets the performance fee for the vault\n     * @param newPerformanceFee is the performance fee (6 decimals). ex: 20 * 10 ** 6 = 20%\n     */\n    function setPerformanceFee(uint256 newPerformanceFee) external onlyOwner {\n        require(\n            newPerformanceFee < 100 * Vault.FEE_MULTIPLIER,\n            \"Invalid performance fee\"\n        );\n\n        emit PerformanceFeeSet(performanceFee, newPerformanceFee);\n\n        performanceFee = newPerformanceFee;\n    }\n\n    /**\n     * @notice Sets a new cap for deposits\n     * @param newCap is the new cap for deposits\n     */\n    function setCap(uint256 newCap) external onlyOwner {\n        require(newCap > 0, \"!newCap\");\n        ShareMath.assertUint104(newCap);\n        emit CapSet(vaultParams.cap, newCap);\n        vaultParams.cap = uint104(newCap);\n    }\n\n    /************************************************\n     *  DEPOSIT & WITHDRAWALS\n     ***********************************************/\n\n    /**\n     * @notice Deposits ETH into the contract and mint vault shares. Reverts if the asset is not WETH.\n     */\n    function depositETH() external payable nonReentrant {\n        require(vaultParams.asset == WETH, \"!WETH\");\n        require(msg.value > 0, \"!value\");\n\n        _depositFor(msg.value, msg.sender);\n\n        IWETH(WETH).deposit{value: msg.value}();\n    }\n\n    /**\n     * @notice Deposits the `asset` from msg.sender.\n     * @param amount is the amount of `asset` to deposit\n     */\n    function deposit(uint256 amount) external nonReentrant {\n        require(amount > 0, \"!amount\");\n\n        _depositFor(amount, msg.sender);\n\n        // An approve() by the msg.sender is required beforehand\n        IERC20(vaultParams.asset).safeTransferFrom(\n            msg.sender,\n            address(this),\n            amount\n        );\n    }\n\n    /**\n     * @notice Deposits the `asset` from msg.sender added to `creditor`'s deposit.\n     * @notice Used for vault -> vault deposits on the user's behalf\n     * @param amount is the amount of `asset` to deposit\n     * @param creditor is the address that can claim/withdraw deposited amount\n     */\n    function depositFor(uint256 amount, address creditor)\n        external\n        nonReentrant\n    {\n        require(amount > 0, \"!amount\");\n        require(creditor != address(0));\n\n        _depositFor(amount, creditor);\n\n        // An approve() by the msg.sender is required beforehand\n        IERC20(vaultParams.asset).safeTransferFrom(\n            msg.sender,\n            address(this),\n            amount\n        );\n    }\n\n    /**\n     * @notice Mints the vault shares to the creditor\n     * @param amount is the amount of `asset` deposited\n     * @param creditor is the address to receieve the deposit\n     */\n    function _depositFor(uint256 amount, address creditor) private {\n        uint256 currentRound = vaultState.round;\n        uint256 totalWithDepositedAmount = totalBalance().add(amount);\n\n        require(totalWithDepositedAmount <= vaultParams.cap, \"Exceed cap\");\n        require(\n            totalWithDepositedAmount >= vaultParams.minimumSupply,\n            \"Insufficient balance\"\n        );\n\n        emit Deposit(creditor, amount, currentRound);\n\n        Vault.DepositReceipt memory depositReceipt = depositReceipts[creditor];\n\n        // If we have an unprocessed pending deposit from the previous rounds, we have to process it.\n        uint256 unredeemedShares =\n            depositReceipt.getSharesFromReceipt(\n                currentRound,\n                roundPricePerShare[depositReceipt.round],\n                vaultParams.decimals\n            );\n\n        uint256 depositAmount = amount;\n\n        // If we have a pending deposit in the current round, we add on to the pending deposit\n        if (currentRound == depositReceipt.round) {\n            uint256 newAmount = uint256(depositReceipt.amount).add(amount);\n            depositAmount = newAmount;\n        }\n\n        ShareMath.assertUint104(depositAmount);\n\n        depositReceipts[creditor] = Vault.DepositReceipt({\n            round: uint16(currentRound),\n            amount: uint104(depositAmount),\n            unredeemedShares: uint128(unredeemedShares)\n        });\n\n        uint256 newTotalPending = uint256(vaultState.totalPending).add(amount);\n        ShareMath.assertUint128(newTotalPending);\n\n        vaultState.totalPending = uint128(newTotalPending);\n    }\n\n    /**\n     * @notice Initiates a withdrawal that can be processed once the round completes\n     * @param numShares is the number of shares to withdraw\n     */\n    function _initiateWithdraw(uint256 numShares) internal {\n        require(numShares > 0, \"!numShares\");\n\n        // We do a max redeem before initiating a withdrawal\n        // But we check if they must first have unredeemed shares\n        if (\n            depositReceipts[msg.sender].amount > 0 ||\n            depositReceipts[msg.sender].unredeemedShares > 0\n        ) {\n            _redeem(0, true);\n        }\n\n        // This caches the `round` variable used in shareBalances\n        uint256 currentRound = vaultState.round;\n        Vault.Withdrawal storage withdrawal = withdrawals[msg.sender];\n\n        bool withdrawalIsSameRound = withdrawal.round == currentRound;\n\n        emit InitiateWithdraw(msg.sender, numShares, currentRound);\n\n        uint256 existingShares = uint256(withdrawal.shares);\n\n        uint256 withdrawalShares;\n        if (withdrawalIsSameRound) {\n            withdrawalShares = existingShares.add(numShares);\n        } else {\n            require(existingShares == 0, \"Existing withdraw\");\n            withdrawalShares = numShares;\n            withdrawals[msg.sender].round = uint16(currentRound);\n        }\n\n        ShareMath.assertUint128(withdrawalShares);\n        withdrawals[msg.sender].shares = uint128(withdrawalShares);\n\n        _transfer(msg.sender, address(this), numShares);\n    }\n\n    /**\n     * @notice Completes a scheduled withdrawal from a past round. Uses finalized pps for the round\n     * @return withdrawAmount the current withdrawal amount\n     */\n    function _completeWithdraw() internal returns (uint256) {\n        Vault.Withdrawal storage withdrawal = withdrawals[msg.sender];\n\n        uint256 withdrawalShares = withdrawal.shares;\n        uint256 withdrawalRound = withdrawal.round;\n\n        // This checks if there is a withdrawal\n        require(withdrawalShares > 0, \"Not initiated\");\n\n        require(withdrawalRound < vaultState.round, \"Round not closed\");\n\n        // We leave the round number as non-zero to save on gas for subsequent writes\n        withdrawals[msg.sender].shares = 0;\n        vaultState.queuedWithdrawShares = uint128(\n            uint256(vaultState.queuedWithdrawShares).sub(withdrawalShares)\n        );\n\n        uint256 withdrawAmount =\n            ShareMath.sharesToAsset(\n                withdrawalShares,\n                roundPricePerShare[withdrawalRound],\n                vaultParams.decimals\n            );\n\n        emit Withdraw(msg.sender, withdrawAmount, withdrawalShares);\n\n        _burn(address(this), withdrawalShares);\n\n        require(withdrawAmount > 0, \"!withdrawAmount\");\n        transferAsset(msg.sender, withdrawAmount);\n\n        return withdrawAmount;\n    }\n\n    /**\n     * @notice Redeems shares that are owed to the account\n     * @param numShares is the number of shares to redeem\n     */\n    function redeem(uint256 numShares) external nonReentrant {\n        require(numShares > 0, \"!numShares\");\n        _redeem(numShares, false);\n    }\n\n    /**\n     * @notice Redeems the entire unredeemedShares balance that is owed to the account\n     */\n    function maxRedeem() external nonReentrant {\n        _redeem(0, true);\n    }\n\n    /**\n     * @notice Redeems shares that are owed to the account\n     * @param numShares is the number of shares to redeem, could be 0 when isMax=true\n     * @param isMax is flag for when callers do a max redemption\n     */\n    function _redeem(uint256 numShares, bool isMax) internal {\n        Vault.DepositReceipt memory depositReceipt =\n            depositReceipts[msg.sender];\n\n        // This handles the null case when depositReceipt.round = 0\n        // Because we start with round = 1 at `initialize`\n        uint256 currentRound = vaultState.round;\n\n        uint256 unredeemedShares =\n            depositReceipt.getSharesFromReceipt(\n                currentRound,\n                roundPricePerShare[depositReceipt.round],\n                vaultParams.decimals\n            );\n\n        numShares = isMax ? unredeemedShares : numShares;\n        if (numShares == 0) {\n            return;\n        }\n        require(numShares <= unredeemedShares, \"Exceeds available\");\n\n        // If we have a depositReceipt on the same round, BUT we have some unredeemed shares\n        // we debit from the unredeemedShares, but leave the amount field intact\n        // If the round has past, with no new deposits, we just zero it out for new deposits.\n        if (depositReceipt.round < currentRound) {\n            depositReceipts[msg.sender].amount = 0;\n        }\n\n        ShareMath.assertUint128(numShares);\n        depositReceipts[msg.sender].unredeemedShares = uint128(\n            unredeemedShares.sub(numShares)\n        );\n\n        emit Redeem(msg.sender, numShares, depositReceipt.round);\n\n        _transfer(address(this), msg.sender, numShares);\n    }\n\n    /************************************************\n     *  VAULT OPERATIONS\n     ***********************************************/\n\n    /**\n     * @notice Helper function that helps to save gas for writing values into the roundPricePerShare map.\n     *         Writing `1` into the map makes subsequent writes warm, reducing the gas from 20k to 5k.\n     *         Having 1 initialized beforehand will not be an issue as long as we round down share calculations to 0.\n     * @param numRounds is the number of rounds to initialize in the map\n     */\n    function initRounds(uint256 numRounds) external nonReentrant {\n        require(numRounds > 0, \"!numRounds\");\n\n        uint256 _round = vaultState.round;\n        for (uint256 i = 0; i < numRounds; i++) {\n            uint256 index = _round + i;\n            require(roundPricePerShare[index] == 0, \"Initialized\"); // AVOID OVERWRITING ACTUAL VALUES\n            roundPricePerShare[index] = ShareMath.PLACEHOLDER_UINT;\n        }\n    }\n\n    /**\n     * @notice Helper function that performs most administrative tasks\n     * such as minting new shares, getting vault fees, etc.\n     * @param lastQueuedWithdrawAmount is old queued withdraw amount\n     * @param currentQueuedWithdrawShares is the queued withdraw shares for the current round\n     * @return lockedBalance is the new balance used to calculate next option purchase size or collateral size\n     * @return queuedWithdrawAmount is the new queued withdraw amount for this round\n     */\n    function _closeRound(\n        uint256 lastQueuedWithdrawAmount,\n        uint256 currentQueuedWithdrawShares\n    ) internal returns (uint256 lockedBalance, uint256 queuedWithdrawAmount) {\n        address recipient = feeRecipient;\n        uint256 mintShares;\n        uint256 performanceFeeInAsset;\n        uint256 totalVaultFee;\n        {\n            uint256 newPricePerShare;\n            (\n                lockedBalance,\n                queuedWithdrawAmount,\n                newPricePerShare,\n                mintShares,\n                performanceFeeInAsset,\n                totalVaultFee\n            ) = VaultLifecycleWithSwap.closeRound(\n                vaultState,\n                VaultLifecycleWithSwap.CloseParams(\n                    vaultParams.decimals,\n                    IERC20(vaultParams.asset).balanceOf(address(this)),\n                    totalSupply(),\n                    lastQueuedWithdrawAmount,\n                    performanceFee,\n                    managementFee,\n                    currentQueuedWithdrawShares\n                )\n            );\n\n            // Finalize the pricePerShare at the end of the round\n            uint256 currentRound = vaultState.round;\n            roundPricePerShare[currentRound] = newPricePerShare;\n\n            emit CollectVaultFees(\n                performanceFeeInAsset,\n                totalVaultFee,\n                currentRound,\n                recipient\n            );\n\n            vaultState.totalPending = 0;\n            vaultState.round = uint16(currentRound + 1);\n        }\n\n        _mint(address(this), mintShares);\n\n        if (totalVaultFee > 0) {\n            transferAsset(payable(recipient), totalVaultFee);\n        }\n\n        return (lockedBalance, queuedWithdrawAmount);\n    }\n\n    /**\n     * @notice Helper function to make either an ETH transfer or ERC20 transfer\n     * @param recipient is the receiving address\n     * @param amount is the transfer amount\n     */\n    function transferAsset(address recipient, uint256 amount) internal {\n        address asset = vaultParams.asset;\n        if (asset == WETH) {\n            IWETH(WETH).withdraw(amount);\n            (bool success, ) = recipient.call{value: amount}(\"\");\n            require(success, \"Transfer failed\");\n            return;\n        }\n        IERC20(asset).safeTransfer(recipient, amount);\n    }\n\n    /************************************************\n     *  GETTERS\n     ***********************************************/\n\n    /**\n     * @notice Returns the asset balance held on the vault for the account\n     * @param account is the address to lookup balance for\n     * @return the amount of `asset` custodied by the vault for the user\n     */\n    function accountVaultBalance(address account)\n        external\n        view\n        returns (uint256)\n    {\n        uint256 _decimals = vaultParams.decimals;\n        uint256 assetPerShare =\n            ShareMath.pricePerShare(\n                totalSupply(),\n                totalBalance(),\n                vaultState.totalPending,\n                _decimals\n            );\n        return\n            ShareMath.sharesToAsset(shares(account), assetPerShare, _decimals);\n    }\n\n    /**\n     * @notice Getter for returning the account's share balance including unredeemed shares\n     * @param account is the account to lookup share balance for\n     * @return the share balance\n     */\n    function shares(address account) public view returns (uint256) {\n        (uint256 heldByAccount, uint256 heldByVault) = shareBalances(account);\n        return heldByAccount.add(heldByVault);\n    }\n\n    /**\n     * @notice Getter for returning the account's share balance split between account and vault holdings\n     * @param account is the account to lookup share balance for\n     * @return heldByAccount is the shares held by account\n     * @return heldByVault is the shares held on the vault (unredeemedShares)\n     */\n    function shareBalances(address account)\n        public\n        view\n        returns (uint256 heldByAccount, uint256 heldByVault)\n    {\n        Vault.DepositReceipt memory depositReceipt = depositReceipts[account];\n\n        if (depositReceipt.round < ShareMath.PLACEHOLDER_UINT) {\n            return (balanceOf(account), 0);\n        }\n\n        uint256 unredeemedShares =\n            depositReceipt.getSharesFromReceipt(\n                vaultState.round,\n                roundPricePerShare[depositReceipt.round],\n                vaultParams.decimals\n            );\n\n        return (balanceOf(account), unredeemedShares);\n    }\n\n    /**\n     * @notice The price of a unit of share denominated in the `asset`\n     */\n    function pricePerShare() external view returns (uint256) {\n        return\n            ShareMath.pricePerShare(\n                totalSupply(),\n                totalBalance(),\n                vaultState.totalPending,\n                vaultParams.decimals\n            );\n    }\n\n    /**\n     * @notice Returns the vault's total balance, including the amounts locked into a short position\n     * @return total balance of the vault, including the amounts locked in third party protocols\n     */\n    function totalBalance() public view returns (uint256) {\n        // After calling closeRound, current option is set to none\n        // We also commit the lockedAmount but do not deposit into Opyn\n        // which results in double counting of asset balance and lockedAmount\n\n        return\n            optionState.currentOption != address(0)\n                ? uint256(vaultState.lockedAmount).add(\n                    IERC20(vaultParams.asset).balanceOf(address(this))\n                )\n                : IERC20(vaultParams.asset).balanceOf(address(this));\n    }\n\n    /**\n     * @notice Returns the token decimals\n     */\n    function decimals() public view override returns (uint8) {\n        return vaultParams.decimals;\n    }\n\n    function cap() external view returns (uint256) {\n        return vaultParams.cap;\n    }\n\n    function nextOptionReadyAt() external view returns (uint256) {\n        return optionState.nextOptionReadyAt;\n    }\n\n    function currentOption() external view returns (address) {\n        return optionState.currentOption;\n    }\n\n    function nextOption() external view returns (address) {\n        return optionState.nextOption;\n    }\n\n    function totalPending() external view returns (uint256) {\n        return vaultState.totalPending;\n    }\n}\n","keccak256":"0x8f1343955106461e349c4260d8b74e3e803b4583ce4350a39d3b67e5d0d733d3","license":"MIT"},"contracts/vendor/DSMath.sol":{"content":"// SPDX-License-Identifier: MIT\n\n/// math.sol -- mixin for inline numerical wizardry\n\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\npragma solidity >0.4.13;\n\nlibrary DSMath {\n    function add(uint256 x, uint256 y) internal pure returns (uint256 z) {\n        require((z = x + y) >= x, \"ds-math-add-overflow\");\n    }\n\n    function sub(uint256 x, uint256 y) internal pure returns (uint256 z) {\n        require((z = x - y) <= x, \"ds-math-sub-underflow\");\n    }\n\n    function mul(uint256 x, uint256 y) internal pure returns (uint256 z) {\n        require(y == 0 || (z = x * y) / y == x, \"ds-math-mul-overflow\");\n    }\n\n    function min(uint256 x, uint256 y) internal pure returns (uint256 z) {\n        return x <= y ? x : y;\n    }\n\n    function max(uint256 x, uint256 y) internal pure returns (uint256 z) {\n        return x >= y ? x : y;\n    }\n\n    function imin(int256 x, int256 y) internal pure returns (int256 z) {\n        return x <= y ? x : y;\n    }\n\n    function imax(int256 x, int256 y) internal pure returns (int256 z) {\n        return x >= y ? x : y;\n    }\n\n    uint256 constant WAD = 10**18;\n    uint256 constant RAY = 10**27;\n\n    //rounds to zero if x*y < WAD / 2\n    function wmul(uint256 x, uint256 y) internal pure returns (uint256 z) {\n        z = add(mul(x, y), WAD / 2) / WAD;\n    }\n\n    //rounds to zero if x*y < WAD / 2\n    function rmul(uint256 x, uint256 y) internal pure returns (uint256 z) {\n        z = add(mul(x, y), RAY / 2) / RAY;\n    }\n\n    //rounds to zero if x*y < WAD / 2\n    function wdiv(uint256 x, uint256 y) internal pure returns (uint256 z) {\n        z = add(mul(x, WAD), y / 2) / y;\n    }\n\n    //rounds to zero if x*y < RAY / 2\n    function rdiv(uint256 x, uint256 y) internal pure returns (uint256 z) {\n        z = add(mul(x, RAY), y / 2) / y;\n    }\n\n    // This famous algorithm is called \"exponentiation by squaring\"\n    // and calculates x^n with x as fixed-point and n as regular unsigned.\n    //\n    // It's O(log n), instead of O(n) for naive repeated multiplication.\n    //\n    // These facts are why it works:\n    //\n    //  If n is even, then x^n = (x^2)^(n/2).\n    //  If n is odd,  then x^n = x * x^(n-1),\n    //   and applying the equation for even x gives\n    //    x^n = x * (x^2)^((n-1) / 2).\n    //\n    //  Also, EVM division is flooring and\n    //    floor[(n-1) / 2] = floor[n / 2].\n    //\n    function rpow(uint256 x, uint256 n) internal pure returns (uint256 z) {\n        z = n % 2 != 0 ? x : RAY;\n\n        for (n /= 2; n != 0; n /= 2) {\n            x = rmul(x, x);\n\n            if (n % 2 != 0) {\n                z = rmul(z, x);\n            }\n        }\n    }\n}\n","keccak256":"0xe1c6bb5cff7c83c85792349f61b3f4faf6e22bb02fa95d7af7b269e59a3902b2","license":"MIT"}},"version":1},"storageLayout":{"types":{"t_bool":{"label":"bool","encoding":"inplace","numberOfBytes":"1"},"t_uint8":{"label":"uint8","encoding":"inplace","numberOfBytes":"1"},"t_uint16":{"label":"uint16","encoding":"inplace","numberOfBytes":"2"},"t_uint32":{"label":"uint32","encoding":"inplace","numberOfBytes":"4"},"t_uint56":{"label":"uint56","encoding":"inplace","numberOfBytes":"7"},"t_address":{"label":"address","encoding":"inplace","numberOfBytes":"20"},"t_uint104":{"label":"uint104","encoding":"inplace","numberOfBytes":"13"},"t_uint128":{"label":"uint128","encoding":"inplace","numberOfBytes":"16"},"t_uint256":{"label":"uint256","encoding":"inplace","numberOfBytes":"32"},"t_bytes_storage":{"label":"bytes","encoding":"bytes","numberOfBytes":"32"},"t_string_storage":{"label":"string","encoding":"bytes","numberOfBytes":"32"},"t_array(t_uint256)30_storage":{"base":"t_uint256","label":"uint256[30]","encoding":"inplace","numberOfBytes":"960"},"t_array(t_uint256)45_storage":{"base":"t_uint256","label":"uint256[45]","encoding":"inplace","numberOfBytes":"1440"},"t_array(t_uint256)49_storage":{"base":"t_uint256","label":"uint256[49]","encoding":"inplace","numberOfBytes":"1568"},"t_array(t_uint256)50_storage":{"base":"t_uint256","label":"uint256[50]","encoding":"inplace","numberOfBytes":"1600"},"t_mapping(t_address,t_uint256)":{"key":"t_address","label":"mapping(address => uint256)","value":"t_uint256","encoding":"mapping","numberOfBytes":"32"},"t_mapping(t_uint256,t_uint256)":{"key":"t_uint256","label":"mapping(uint256 => uint256)","value":"t_uint256","encoding":"mapping","numberOfBytes":"32"},"t_struct(VaultState)3798_storage":{"label":"struct Vault.VaultState","members":[{"slot":"0","type":"t_uint16","astId":3789,"label":"round","offset":0,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"0","type":"t_uint104","astId":3791,"label":"lockedAmount","offset":2,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"0","type":"t_uint104","astId":3793,"label":"lastLockedAmount","offset":15,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"1","type":"t_uint128","astId":3795,"label":"totalPending","offset":0,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"1","type":"t_uint128","astId":3797,"label":"queuedWithdrawShares","offset":16,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"}],"encoding":"inplace","numberOfBytes":"64"},"t_struct(Withdrawal)3810_storage":{"label":"struct Vault.Withdrawal","members":[{"slot":"0","type":"t_uint16","astId":3807,"label":"round","offset":0,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"0","type":"t_uint128","astId":3809,"label":"shares","offset":2,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"}],"encoding":"inplace","numberOfBytes":"32"},"t_struct(OptionState)3787_storage":{"label":"struct Vault.OptionState","members":[{"slot":"0","type":"t_address","astId":3782,"label":"nextOption","offset":0,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"1","type":"t_address","astId":3784,"label":"currentOption","offset":0,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"1","type":"t_uint32","astId":3786,"label":"nextOptionReadyAt","offset":20,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"}],"encoding":"inplace","numberOfBytes":"64"},"t_struct(VaultParams)3780_storage":{"label":"struct Vault.VaultParams","members":[{"slot":"0","type":"t_bool","astId":3769,"label":"isPut","offset":0,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"0","type":"t_uint8","astId":3771,"label":"decimals","offset":1,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"0","type":"t_address","astId":3773,"label":"asset","offset":2,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"1","type":"t_address","astId":3775,"label":"underlying","offset":0,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"1","type":"t_uint56","astId":3777,"label":"minimumSupply","offset":20,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"2","type":"t_uint104","astId":3779,"label":"cap","offset":0,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"}],"encoding":"inplace","numberOfBytes":"96"},"t_struct(DepositReceipt)3805_storage":{"label":"struct Vault.DepositReceipt","members":[{"slot":"0","type":"t_uint16","astId":3800,"label":"round","offset":0,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"0","type":"t_uint104","astId":3802,"label":"amount","offset":2,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"0","type":"t_uint128","astId":3804,"label":"unredeemedShares","offset":15,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"}],"encoding":"inplace","numberOfBytes":"32"},"t_mapping(t_address,t_mapping(t_address,t_uint256))":{"key":"t_address","label":"mapping(address => mapping(address => uint256))","value":"t_mapping(t_address,t_uint256)","encoding":"mapping","numberOfBytes":"32"},"t_mapping(t_address,t_struct(Withdrawal)3810_storage)":{"key":"t_address","label":"mapping(address => struct Vault.Withdrawal)","value":"t_struct(Withdrawal)3810_storage","encoding":"mapping","numberOfBytes":"32"},"t_mapping(t_address,t_struct(DepositReceipt)3805_storage)":{"key":"t_address","label":"mapping(address => struct Vault.DepositReceipt)","value":"t_struct(DepositReceipt)3805_storage","encoding":"mapping","numberOfBytes":"32"}},"storage":[{"slot":"0","type":"t_bool","astId":130,"label":"_initialized","offset":0,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"0","type":"t_bool","astId":133,"label":"_initializing","offset":1,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"1","type":"t_uint256","astId":184,"label":"_status","offset":0,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"2","type":"t_array(t_uint256)49_storage","astId":227,"label":"__gap","offset":0,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"51","type":"t_array(t_uint256)50_storage","astId":947,"label":"__gap","offset":0,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"101","type":"t_address","astId":10,"label":"_owner","offset":0,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"102","type":"t_array(t_uint256)49_storage","astId":123,"label":"__gap","offset":0,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"151","type":"t_mapping(t_address,t_uint256)","astId":247,"label":"_balances","offset":0,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"152","type":"t_mapping(t_address,t_mapping(t_address,t_uint256))","astId":253,"label":"_allowances","offset":0,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"153","type":"t_uint256","astId":255,"label":"_totalSupply","offset":0,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"154","type":"t_string_storage","astId":257,"label":"_name","offset":0,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"155","type":"t_string_storage","astId":259,"label":"_symbol","offset":0,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"156","type":"t_array(t_uint256)45_storage","astId":800,"label":"__gap","offset":0,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"201","type":"t_mapping(t_address,t_struct(DepositReceipt)3805_storage)","astId":6695,"label":"depositReceipts","offset":0,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"202","type":"t_mapping(t_uint256,t_uint256)","astId":6700,"label":"roundPricePerShare","offset":0,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"203","type":"t_mapping(t_address,t_struct(Withdrawal)3810_storage)","astId":6706,"label":"withdrawals","offset":0,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"204","type":"t_struct(VaultParams)3780_storage","astId":6710,"label":"vaultParams","offset":0,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"207","type":"t_struct(VaultState)3798_storage","astId":6714,"label":"vaultState","offset":0,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"209","type":"t_struct(OptionState)3787_storage","astId":6718,"label":"optionState","offset":0,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"211","type":"t_address","astId":6721,"label":"feeRecipient","offset":0,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"212","type":"t_address","astId":6724,"label":"keeper","offset":0,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"213","type":"t_uint256","astId":6727,"label":"performanceFee","offset":0,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"214","type":"t_uint256","astId":6730,"label":"managementFee","offset":0,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"215","type":"t_array(t_uint256)30_storage","astId":6734,"label":"____gap","offset":0,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"245","type":"t_address","astId":5613,"label":"optionsPremiumPricer","offset":0,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"246","type":"t_address","astId":5615,"label":"strikeSelection","offset":0,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"247","type":"t_uint256","astId":5617,"label":"premiumDiscount","offset":0,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"248","type":"t_uint256","astId":5619,"label":"currentOtokenPremium","offset":0,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"249","type":"t_uint16","astId":5621,"label":"lastStrikeOverrideRound","offset":0,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"250","type":"t_uint256","astId":5623,"label":"overriddenStrikePrice","offset":0,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"251","type":"t_uint256","astId":5625,"label":"auctionDuration","offset":0,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"252","type":"t_uint256","astId":5627,"label":"optionAuctionID","offset":0,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"253","type":"t_uint256","astId":5630,"label":"lastQueuedWithdrawAmount","offset":0,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"254","type":"t_bool","astId":5633,"label":"_isUsdcAuction","offset":0,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"255","type":"t_bytes_storage","astId":5635,"label":"_swapPath","offset":0,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"256","type":"t_address","astId":5638,"label":"liquidityGauge","offset":0,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"257","type":"t_address","astId":5641,"label":"optionsPurchaseQueue","offset":0,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"258","type":"t_uint256","astId":5644,"label":"currentQueuedWithdrawShares","offset":0,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"259","type":"t_address","astId":5647,"label":"vaultPauser","offset":0,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"260","type":"t_address","astId":5650,"label":"_offerExecutor","offset":0,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"}]},"transientStorageLayout":null,"userdoc":{"kind":"user","notice":"UPGRADEABILITY: Since we use the upgradeable proxy pattern, we must observe the inheritance chain closely. Any changes/appends in storage variable needs to happen in RibbonThetaVaultStorage. RibbonThetaVault should not inherit from any other contract aside from RibbonVault, RibbonThetaVaultStorage","methods":{"USDC()":{"notice":"USDC 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"},"WETH()":{"notice":"WETH9 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"},"DELAY()":{"notice":"Deprecated: 15 minute timelock between commitAndClose and rollToNexOption."},"PERIOD()":{"notice":"7 day period between each options sale."},"keeper()":{"notice":"role in charge of weekly vault operations such as rollToNextOption and burnRemainingOTokens"},"decimals()":{"notice":"Returns the token decimals"},"constructor":{"notice":"Initializes the contract with immutable variables"},"maxRedeem()":{"notice":"Redeems the entire unredeemedShares balance that is owed to the account"},"closeRound()":{"notice":"Closes the existing short and calculate the shares to mint, new price per share & amount of funds to re-allocate as collateral for the new round Since we are incrementing the round here, the options are sold in the beginning of a round instead of at the end of the round. For example, at round 1, we don't sell any options. We start selling options at the beginning of round 2."},"depositETH()":{"notice":"Deposits ETH into the contract and mint vault shares. Reverts if the asset is not WETH."},"vaultState()":{"notice":"Vault's lifecycle state like round and locked amounts"},"optionState()":{"notice":"Vault's state of the options sold and the timelocked option"},"vaultParams()":{"notice":"Vault's parameters like cap, decimals"},"feeRecipient()":{"notice":"Fee recipient for the performance and management fees"},"stake(uint256)":{"notice":"Stakes a users vault shares"},"totalBalance()":{"notice":"Returns the vault's total balance, including the amounts locked into a short position"},"managementFee()":{"notice":"Management fee charged on entire AUM in rollToNextOption. Only charged when there is no loss."},"pausePosition()":{"notice":"pause a user's vault position"},"pricePerShare()":{"notice":"The price of a unit of share denominated in the `asset`"},"redeem(uint256)":{"notice":"Redeems shares that are owed to the account"},"setCap(uint256)":{"notice":"Sets a new cap for deposits"},"shares(address)":{"notice":"Getter for returning the account's share balance including unredeemed shares"},"OTOKEN_FACTORY()":{"notice":"oTokenFactory is the factory contract used to spawn otokens. Used to lookup otokens."},"deposit(uint256)":{"notice":"Deposits the `asset` from msg.sender."},"performanceFee()":{"notice":"Performance fee charged on premiums earned in rollToNextOption. Only charged when there is no loss."},"commitNextOption()":{"notice":"Sets the next option the vault will be shorting"},"completeWithdraw()":{"notice":"Completes a scheduled withdrawal from a past round. Uses finalized pps for the round"},"rollToNextOption()":{"notice":"Rolls the vault's funds into a new short position and create a new offer."},"initRounds(uint256)":{"notice":"Helper function that helps to save gas for writing values into the roundPricePerShare map.         Writing `1` into the map makes subsequent writes warm, reducing the gas from 20k to 5k.         Having 1 initialized beforehand will not be an issue as long as we round down share calculations to 0."},"setMinPrice(uint256)":{"notice":"Sets oToken Premium"},"withdrawals(address)":{"notice":"Stores pending user withdrawals"},"setNewKeeper(address)":{"notice":"Sets the new keeper"},"burnRemainingOTokens()":{"notice":"Burn the remaining oTokens left over"},"shareBalances(address)":{"notice":"Getter for returning the account's share balance split between account and vault holdings"},"setStrikePrice(uint128)":{"notice":"Optionality to set strike price manually Should be called after closeRound if we are setting current week's strike"},"setVaultPauser(address)":{"notice":"Sets the new Vault Pauser contract for this vault"},"depositReceipts(address)":{"notice":"Stores the user's pending deposit for the round"},"setFeeRecipient(address)":{"notice":"Sets the new fee recipient"},"initiateWithdraw(uint256)":{"notice":"Initiates a withdrawal that can be processed once the round completes"},"setManagementFee(uint256)":{"notice":"Sets the management fee for the vault"},"setLiquidityGauge(address)":{"notice":"Sets the new liquidityGauge contract for this vault"},"setPerformanceFee(uint256)":{"notice":"Sets the performance fee for the vault"},"withdrawInstantly(uint256)":{"notice":"Withdraws the assets on the vault using the outstanding `DepositReceipt.amount`"},"depositFor(uint256,address)":{"notice":"Deposits the `asset` from msg.sender added to `creditor`'s deposit.Used for vault -> vault deposits on the user's behalf"},"roundPricePerShare(uint256)":{"notice":"On every round's close, the pricePerShare value of an rTHETA token is stored This is used to determine the number of shares to be returned to a user with their DepositReceipt.depositAmount"},"setStrikeSelection(address)":{"notice":"Sets the new strike selection contract"},"accountVaultBalance(address)":{"notice":"Returns the asset balance held on the vault for the account"},"setOptionsPremiumPricer(address)":{"notice":"Sets the new options premium pricer contract"},"settleOffer((uint256,uint256,address,uint256,uint256,address,uint8,bytes32,bytes32)[])":{"notice":"Settle current offer"},"initialize((address,address,address,uint256,uint256,string,string,address,address),(bool,uint8,address,address,uint56,uint104))":{"notice":"Initializes the OptionVault contract with storage variables."}},"version":1},"devdoc":{"kind":"dev","methods":{"name()":{"details":"Returns the name of the token."},"owner()":{"details":"Returns the address of the current owner."},"symbol()":{"details":"Returns the symbol of the token, usually a shorter version of the name."},"constructor":{"params":{"_usdc":"is the USDC contract","_weth":"is the Wrapped Ether contract","_marginPool":"is the contract address for providing collateral to opyn","_swapContract":"is the contract address that facilitates bids settlement","_oTokenFactory":"is the contract address for minting new opyn option types (strikes, asset, expiry)","_gammaController":"is the contract address for opyn actions"}},"totalSupply()":{"details":"See {IERC20-totalSupply}."},"stake(uint256)":{"params":{"numShares":"is the number of shares to stake"}},"totalBalance()":{"returns":{"_0":"total balance of the vault, including the amounts locked in third party protocols"}},"redeem(uint256)":{"params":{"numShares":"is the number of shares to redeem"}},"setCap(uint256)":{"params":{"newCap":"is the new cap for deposits"}},"shares(address)":{"params":{"account":"is the account to lookup share balance for"},"returns":{"_0":"the share balance"}},"deposit(uint256)":{"params":{"amount":"is the amount of `asset` to deposit"}},"balanceOf(address)":{"details":"See {IERC20-balanceOf}."},"initRounds(uint256)":{"params":{"numRounds":"is the number of rounds to initialize in the map"}},"renounceOwnership()":{"details":"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner."},"setMinPrice(uint256)":{"params":{"minPrice":"is the new oToken Premium in the units of 10**18"}},"setNewKeeper(address)":{"params":{"newKeeper":"is the address of the new keeper"}},"shareBalances(address)":{"params":{"account":"is the account to lookup share balance for"},"returns":{"heldByVault":"is the shares held on the vault (unredeemedShares)","heldByAccount":"is the shares held by account"}},"setStrikePrice(uint128)":{"params":{"strikePrice":"is the strike price of the new oTokens (decimals = 8)"}},"setVaultPauser(address)":{"params":{"newVaultPauser":"is the address of the new vaultPauser contract"}},"approve(address,uint256)":{"details":"See {IERC20-approve}. Requirements: - `spender` cannot be the zero address."},"setFeeRecipient(address)":{"params":{"newFeeRecipient":"is the address of the new fee recipient"}},"initiateWithdraw(uint256)":{"params":{"numShares":"is the number of shares to withdraw"}},"setManagementFee(uint256)":{"params":{"newManagementFee":"is the management fee (6 decimals). ex: 2 * 10 ** 6 = 2%"}},"transfer(address,uint256)":{"details":"See {IERC20-transfer}. Requirements: - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`."},"allowance(address,address)":{"details":"See {IERC20-allowance}."},"setLiquidityGauge(address)":{"params":{"newLiquidityGauge":"is the address of the new liquidityGauge contract"}},"setPerformanceFee(uint256)":{"params":{"newPerformanceFee":"is the performance fee (6 decimals). ex: 20 * 10 ** 6 = 20%"}},"transferOwnership(address)":{"details":"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner."},"withdrawInstantly(uint256)":{"params":{"amount":"is the amount to withdraw"}},"depositFor(uint256,address)":{"params":{"amount":"is the amount of `asset` to deposit","creditor":"is the address that can claim/withdraw deposited amount"}},"setStrikeSelection(address)":{"params":{"newStrikeSelection":"is the address of the new strike selection contract"}},"accountVaultBalance(address)":{"params":{"account":"is the address to lookup balance for"},"returns":{"_0":"the amount of `asset` custodied by the vault for the user"}},"setOptionsPremiumPricer(address)":{"params":{"newOptionsPremiumPricer":"is the address of the new strike selection contract"}},"decreaseAllowance(address,uint256)":{"details":"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`."},"increaseAllowance(address,uint256)":{"details":"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address."},"transferFrom(address,address,uint256)":{"details":"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for ``sender``'s tokens of at least `amount`."},"initialize((address,address,address,uint256,uint256,string,string,address,address),(bool,uint8,address,address,uint56,uint104))":{"params":{"_initParams":"is the struct with vault initialization parameters","_vaultParams":"is the struct with vault general data"}}},"version":1},"sourceIds":{"contracts/vendor/DSMath.sol":{"id":29},"contracts/libraries/Vault.sol":{"id":24},"contracts/interfaces/ISwap.sol":{"id":18},"contracts/interfaces/IWETH.sol":{"id":20},"contracts/interfaces/IRibbon.sol":{"id":16},"contracts/libraries/ShareMath.sol":{"id":22},"contracts/interfaces/IVaultPauser.sol":{"id":19},"contracts/libraries/GnosisAuction.sol":{"id":21},"contracts/interfaces/GammaInterface.sol":{"id":11},"contracts/interfaces/IERC20Detailed.sol":{"id":12},"contracts/interfaces/IGnosisAuction.sol":{"id":13},"contracts/interfaces/ILiquidityGauge.sol":{"id":14},"@openzeppelin/contracts/utils/Address.sol":{"id":9},"contracts/interfaces/IRibbonThetaVault.sol":{"id":17},"contracts/storage/RibbonThetaVaultStorage.sol":{"id":26},"@openzeppelin/contracts/token/ERC20/IERC20.sol":{"id":7},"contracts/interfaces/IOptionsPurchaseQueue.sol":{"id":15},"contracts/libraries/VaultLifecycleWithSwap.sol":{"id":25},"@openzeppelin/contracts/utils/math/SafeMath.sol":{"id":10},"contracts/libraries/SupportsNonCompliantERC20.sol":{"id":23},"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol":{"id":8},"contracts/vaults/BaseVaultWithSwap/base/RibbonVault.sol":{"id":28},"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol":{"id":27},"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol":{"id":6},"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol":{"id":0},"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol":{"id":1},"@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol":{"id":3},"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol":{"id":4},"@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol":{"id":2},"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20MetadataUpgradeable.sol":{"id":5}},"additionalInput":null,"stdJsonInput":{"sources":{"contracts/vendor/DSMath.sol":{"content":"// SPDX-License-Identifier: MIT\n\n/// math.sol -- mixin for inline numerical wizardry\n\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\npragma solidity >0.4.13;\n\nlibrary DSMath {\n    function add(uint256 x, uint256 y) internal pure returns (uint256 z) {\n        require((z = x + y) >= x, \"ds-math-add-overflow\");\n    }\n\n    function sub(uint256 x, uint256 y) internal pure returns (uint256 z) {\n        require((z = x - y) <= x, \"ds-math-sub-underflow\");\n    }\n\n    function mul(uint256 x, uint256 y) internal pure returns (uint256 z) {\n        require(y == 0 || (z = x * y) / y == x, \"ds-math-mul-overflow\");\n    }\n\n    function min(uint256 x, uint256 y) internal pure returns (uint256 z) {\n        return x <= y ? x : y;\n    }\n\n    function max(uint256 x, uint256 y) internal pure returns (uint256 z) {\n        return x >= y ? x : y;\n    }\n\n    function imin(int256 x, int256 y) internal pure returns (int256 z) {\n        return x <= y ? x : y;\n    }\n\n    function imax(int256 x, int256 y) internal pure returns (int256 z) {\n        return x >= y ? x : y;\n    }\n\n    uint256 constant WAD = 10**18;\n    uint256 constant RAY = 10**27;\n\n    //rounds to zero if x*y < WAD / 2\n    function wmul(uint256 x, uint256 y) internal pure returns (uint256 z) {\n        z = add(mul(x, y), WAD / 2) / WAD;\n    }\n\n    //rounds to zero if x*y < WAD / 2\n    function rmul(uint256 x, uint256 y) internal pure returns (uint256 z) {\n        z = add(mul(x, y), RAY / 2) / RAY;\n    }\n\n    //rounds to zero if x*y < WAD / 2\n    function wdiv(uint256 x, uint256 y) internal pure returns (uint256 z) {\n        z = add(mul(x, WAD), y / 2) / y;\n    }\n\n    //rounds to zero if x*y < RAY / 2\n    function rdiv(uint256 x, uint256 y) internal pure returns (uint256 z) {\n        z = add(mul(x, RAY), y / 2) / y;\n    }\n\n    // This famous algorithm is called \"exponentiation by squaring\"\n    // and calculates x^n with x as fixed-point and n as regular unsigned.\n    //\n    // It's O(log n), instead of O(n) for naive repeated multiplication.\n    //\n    // These facts are why it works:\n    //\n    //  If n is even, then x^n = (x^2)^(n/2).\n    //  If n is odd,  then x^n = x * x^(n-1),\n    //   and applying the equation for even x gives\n    //    x^n = x * (x^2)^((n-1) / 2).\n    //\n    //  Also, EVM division is flooring and\n    //    floor[(n-1) / 2] = floor[n / 2].\n    //\n    function rpow(uint256 x, uint256 n) internal pure returns (uint256 z) {\n        z = n % 2 != 0 ? x : RAY;\n\n        for (n /= 2; n != 0; n /= 2) {\n            x = rmul(x, x);\n\n            if (n % 2 != 0) {\n                z = rmul(z, x);\n            }\n        }\n    }\n}\n"},"contracts/libraries/Vault.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity =0.8.4;\n\nlibrary Vault {\n    /************************************************\n     *  IMMUTABLES & CONSTANTS\n     ***********************************************/\n\n    // Fees are 6-decimal places. For example: 20 * 10**6 = 20%\n    uint256 internal constant FEE_MULTIPLIER = 10**6;\n\n    // Premium discount has 1-decimal place. For example: 80 * 10**1 = 80%. Which represents a 20% discount.\n    uint256 internal constant PREMIUM_DISCOUNT_MULTIPLIER = 10;\n\n    // Otokens have 8 decimal places.\n    uint256 internal constant OTOKEN_DECIMALS = 8;\n\n    // Percentage of funds allocated to options is 2 decimal places. 10 * 10**2 = 10%\n    uint256 internal constant OPTION_ALLOCATION_MULTIPLIER = 10**2;\n\n    // Placeholder uint value to prevent cold writes\n    uint256 internal constant PLACEHOLDER_UINT = 1;\n\n    struct VaultParams {\n        // Option type the vault is selling\n        bool isPut;\n        // Token decimals for vault shares\n        uint8 decimals;\n        // Asset used in Theta / Delta Vault\n        address asset;\n        // Underlying asset of the options sold by vault\n        address underlying;\n        // Minimum supply of the vault shares issued, for ETH it's 10**10\n        uint56 minimumSupply;\n        // Vault cap\n        uint104 cap;\n    }\n\n    struct OptionState {\n        // Option that the vault is shorting / longing in the next cycle\n        address nextOption;\n        // Option that the vault is currently shorting / longing\n        address currentOption;\n        // The timestamp when the `nextOption` can be used by the vault\n        uint32 nextOptionReadyAt;\n    }\n\n    struct VaultState {\n        // 32 byte slot 1\n        //  Current round number. `round` represents the number of `period`s elapsed.\n        uint16 round;\n        // Amount that is currently locked for selling options\n        uint104 lockedAmount;\n        // Amount that was locked for selling options in the previous round\n        // used for calculating performance fee deduction\n        uint104 lastLockedAmount;\n        // 32 byte slot 2\n        // Stores the total tally of how much of `asset` there is\n        // to be used to mint rTHETA tokens\n        uint128 totalPending;\n        // Total amount of queued withdrawal shares from previous rounds (doesn't include the current round)\n        uint128 queuedWithdrawShares;\n    }\n\n    struct DepositReceipt {\n        // Maximum of 65535 rounds. Assuming 1 round is 7 days, maximum is 1256 years.\n        uint16 round;\n        // Deposit amount, max 20,282,409,603,651 or 20 trillion ETH deposit\n        uint104 amount;\n        // Unredeemed shares balance\n        uint128 unredeemedShares;\n    }\n\n    struct Withdrawal {\n        // Maximum of 65535 rounds. Assuming 1 round is 7 days, maximum is 1256 years.\n        uint16 round;\n        // Number of shares withdrawn\n        uint128 shares;\n    }\n\n    struct AuctionSellOrder {\n        // Amount of `asset` token offered in auction\n        uint96 sellAmount;\n        // Amount of oToken requested in auction\n        uint96 buyAmount;\n        // User Id of delta vault in latest gnosis auction\n        uint64 userId;\n    }\n}\n"},"contracts/interfaces/ISwap.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity =0.8.4;\n\ninterface ISwap {\n    struct Offer {\n        // 32 byte slot 1, partial fill\n        // Seller wallet address\n        address seller;\n        // 32 byte slot 2\n        // Addess of oToken\n        address oToken;\n        // Price per oToken denominated in biddingToken\n        uint96 minPrice;\n        // 32 byte slot 3\n        // ERC20 Token to bid for oToken\n        address biddingToken;\n        // Minimum oToken amount acceptable for a single bid\n        uint96 minBidSize;\n        // 32 byte slot 4\n        // Total available oToken amount\n        uint128 totalSize;\n        // Remaining available oToken amount\n        // This figure is updated after each successfull swap\n        uint128 availableSize;\n        // 32 byte slot 5\n        // Amount of biddingToken received\n        // This figure is updated after each successfull swap\n        uint256 totalSales;\n    }\n\n    struct Bid {\n        // ID assigned to offers\n        uint256 swapId;\n        // Number only used once for each wallet\n        uint256 nonce;\n        // Signer wallet address\n        address signerWallet;\n        // Amount of biddingToken offered by signer\n        uint256 sellAmount;\n        // Amount of oToken requested by signer\n        uint256 buyAmount;\n        // Referrer wallet address\n        address referrer;\n        // Signature recovery id\n        uint8 v;\n        // r portion of the ECSDA signature\n        bytes32 r;\n        // s portion of the ECSDA signature\n        bytes32 s;\n    }\n\n    struct OfferDetails {\n        // Seller wallet address\n        address seller;\n        // Addess of oToken\n        address oToken;\n        // Price per oToken denominated in biddingToken\n        uint256 minPrice;\n        // ERC20 Token to bid for oToken\n        address biddingToken;\n        // Minimum oToken amount acceptable for a single bid\n        uint256 minBidSize;\n    }\n\n    event Swap(\n        uint256 indexed swapId,\n        uint256 nonce,\n        address indexed signerWallet,\n        uint256 signerAmount,\n        uint256 sellerAmount,\n        address referrer,\n        uint256 feeAmount\n    );\n\n    event NewOffer(\n        uint256 swapId,\n        address seller,\n        address oToken,\n        address biddingToken,\n        uint256 minPrice,\n        uint256 minBidSize,\n        uint256 totalSize\n    );\n\n    event SetFee(address referrer, uint256 fee);\n\n    event SetPriceFeed(address asset, address aggregator);\n\n    event SettleOffer(uint256 swapId);\n\n    event Cancel(uint256 indexed nonce, address indexed signerWallet);\n\n    event Authorize(address indexed signer, address indexed signerWallet);\n\n    event Revoke(address indexed signer, address indexed signerWallet);\n\n    function createOffer(\n        address oToken,\n        address biddingToken,\n        uint96 minPrice,\n        uint96 minBidSize,\n        uint128 totalSize\n    ) external returns (uint256 swapId);\n\n    function settleOffer(uint256 swapId, Bid[] calldata bids) external;\n\n    function cancelNonce(uint256[] calldata nonces) external;\n\n    function check(Bid calldata bid)\n        external\n        view\n        returns (uint256, bytes32[] memory);\n\n    function averagePriceForOffer(uint256 swapId)\n        external\n        view\n        returns (uint256);\n\n    function authorize(address sender) external;\n\n    function revoke() external;\n\n    function nonceUsed(address, uint256) external view returns (bool);\n}\n"},"contracts/interfaces/IWETH.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity =0.8.4;\n\ninterface IWETH {\n    function deposit() external payable;\n\n    function withdraw(uint256) external;\n\n    function balanceOf(address account) external view returns (uint256);\n\n    function transfer(address recipient, uint256 amount)\n        external\n        returns (bool);\n\n    function allowance(address owner, address spender)\n        external\n        view\n        returns (uint256);\n\n    function approve(address spender, uint256 amount) external returns (bool);\n\n    function transferFrom(\n        address sender,\n        address recipient,\n        uint256 amount\n    ) external returns (bool);\n\n    function decimals() external view returns (uint256);\n}\n"},"contracts/interfaces/IRibbon.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity =0.8.4;\nimport {Vault} from \"../libraries/Vault.sol\";\n\ninterface IRibbonVault {\n    function deposit(uint256 amount) external;\n\n    function depositETH() external payable;\n\n    function cap() external view returns (uint256);\n\n    function depositFor(uint256 amount, address creditor) external;\n\n    function vaultParams() external view returns (Vault.VaultParams memory);\n}\n\ninterface IStrikeSelection {\n    function getStrikePrice(uint256 expiryTimestamp, bool isPut)\n        external\n        view\n        returns (uint256, uint256);\n\n    function delta() external view returns (uint256);\n}\n\ninterface IOptionsPremiumPricer {\n    function getPremium(\n        uint256 strikePrice,\n        uint256 timeToExpiry,\n        bool isPut\n    ) external view returns (uint256);\n\n    function getPremiumInStables(\n        uint256 strikePrice,\n        uint256 timeToExpiry,\n        bool isPut\n    ) external view returns (uint256);\n\n    function getOptionDelta(\n        uint256 spotPrice,\n        uint256 strikePrice,\n        uint256 volatility,\n        uint256 expiryTimestamp\n    ) external view returns (uint256 delta);\n\n    function getUnderlyingPrice() external view returns (uint256);\n\n    function priceOracle() external view returns (address);\n\n    function volatilityOracle() external view returns (address);\n\n    function optionId() external view returns (bytes32);\n}\n"},"contracts/libraries/ShareMath.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity =0.8.4;\n\nimport {SafeMath} from \"@openzeppelin/contracts/utils/math/SafeMath.sol\";\nimport {Vault} from \"./Vault.sol\";\n\nlibrary ShareMath {\n    using SafeMath for uint256;\n\n    uint256 internal constant PLACEHOLDER_UINT = 1;\n\n    function assetToShares(\n        uint256 assetAmount,\n        uint256 assetPerShare,\n        uint256 decimals\n    ) internal pure returns (uint256) {\n        // If this throws, it means that vault's roundPricePerShare[currentRound] has not been set yet\n        // which should never happen.\n        // Has to be larger than 1 because `1` is used in `initRoundPricePerShares` to prevent cold writes.\n        require(assetPerShare > PLACEHOLDER_UINT, \"Invalid assetPerShare\");\n\n        return assetAmount.mul(10**decimals).div(assetPerShare);\n    }\n\n    function sharesToAsset(\n        uint256 shares,\n        uint256 assetPerShare,\n        uint256 decimals\n    ) internal pure returns (uint256) {\n        // If this throws, it means that vault's roundPricePerShare[currentRound] has not been set yet\n        // which should never happen.\n        // Has to be larger than 1 because `1` is used in `initRoundPricePerShares` to prevent cold writes.\n        require(assetPerShare > PLACEHOLDER_UINT, \"Invalid assetPerShare\");\n\n        return shares.mul(assetPerShare).div(10**decimals);\n    }\n\n    /**\n     * @notice Returns the shares unredeemed by the user given their DepositReceipt\n     * @param depositReceipt is the user's deposit receipt\n     * @param currentRound is the `round` stored on the vault\n     * @param assetPerShare is the price in asset per share\n     * @param decimals is the number of decimals the asset/shares use\n     * @return unredeemedShares is the user's virtual balance of shares that are owed\n     */\n    function getSharesFromReceipt(\n        Vault.DepositReceipt memory depositReceipt,\n        uint256 currentRound,\n        uint256 assetPerShare,\n        uint256 decimals\n    ) internal pure returns (uint256 unredeemedShares) {\n        if (depositReceipt.round > 0 && depositReceipt.round < currentRound) {\n            uint256 sharesFromRound =\n                assetToShares(depositReceipt.amount, assetPerShare, decimals);\n\n            return\n                uint256(depositReceipt.unredeemedShares).add(sharesFromRound);\n        }\n        return depositReceipt.unredeemedShares;\n    }\n\n    function pricePerShare(\n        uint256 totalSupply,\n        uint256 totalBalance,\n        uint256 pendingAmount,\n        uint256 decimals\n    ) internal pure returns (uint256) {\n        uint256 singleShare = 10**decimals;\n        return\n            totalSupply > 0\n                ? singleShare.mul(totalBalance.sub(pendingAmount)).div(\n                    totalSupply\n                )\n                : singleShare;\n    }\n\n    /************************************************\n     *  HELPERS\n     ***********************************************/\n\n    function assertUint104(uint256 num) internal pure {\n        require(num <= type(uint104).max, \"Overflow uint104\");\n    }\n\n    function assertUint128(uint256 num) internal pure {\n        require(num <= type(uint128).max, \"Overflow uint128\");\n    }\n}\n"},"contracts/interfaces/IVaultPauser.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity =0.8.4;\n\ninterface IVaultPauser {\n    /// @notice pause vault position of an account with max amount\n    /// @param _account the address of user\n    /// @param _amount amount of shares\n    function pausePosition(address _account, uint256 _amount) external;\n\n    /// @notice resume vault position of an account with max amount\n    /// @param _vaultAddress the address of vault\n    function resumePosition(address _vaultAddress) external;\n}\n"},"contracts/libraries/GnosisAuction.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity =0.8.4;\n\nimport {SafeMath} from \"@openzeppelin/contracts/utils/math/SafeMath.sol\";\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport {\n    SafeERC20\n} from \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\nimport {DSMath} from \"../vendor/DSMath.sol\";\nimport {IGnosisAuction} from \"../interfaces/IGnosisAuction.sol\";\nimport {IOtoken} from \"../interfaces/GammaInterface.sol\";\nimport {IOptionsPremiumPricer} from \"../interfaces/IRibbon.sol\";\nimport {Vault} from \"./Vault.sol\";\nimport {IRibbonThetaVault} from \"../interfaces/IRibbonThetaVault.sol\";\n\nlibrary GnosisAuction {\n    using SafeMath for uint256;\n    using SafeERC20 for IERC20;\n\n    event InitiateGnosisAuction(\n        address indexed auctioningToken,\n        address indexed biddingToken,\n        uint256 auctionCounter,\n        address indexed manager\n    );\n\n    event PlaceAuctionBid(\n        uint256 auctionId,\n        address indexed auctioningToken,\n        uint256 sellAmount,\n        uint256 buyAmount,\n        address indexed bidder\n    );\n\n    struct AuctionDetails {\n        address oTokenAddress;\n        address gnosisEasyAuction;\n        address asset;\n        uint256 assetDecimals;\n        uint256 oTokenPremium;\n        uint256 duration;\n    }\n\n    struct BidDetails {\n        address oTokenAddress;\n        address gnosisEasyAuction;\n        address asset;\n        uint256 assetDecimals;\n        uint256 auctionId;\n        uint256 lockedBalance;\n        uint256 optionAllocation;\n        uint256 optionPremium;\n        address bidder;\n    }\n\n    function startAuction(AuctionDetails calldata auctionDetails)\n        internal\n        returns (uint256 auctionID)\n    {\n        uint256 oTokenSellAmount =\n            getOTokenSellAmount(auctionDetails.oTokenAddress);\n        require(oTokenSellAmount > 0, \"No otokens to sell\");\n\n        IERC20(auctionDetails.oTokenAddress).safeApprove(\n            auctionDetails.gnosisEasyAuction,\n            IERC20(auctionDetails.oTokenAddress).balanceOf(address(this))\n        );\n\n        // minBidAmount is total oTokens to sell * premium per oToken\n        // shift decimals to correspond to decimals of USDC for puts\n        // and underlying for calls\n        uint256 minBidAmount =\n            DSMath.wmul(\n                oTokenSellAmount.mul(10**10),\n                auctionDetails.oTokenPremium\n            );\n\n        minBidAmount = auctionDetails.assetDecimals > 18\n            ? minBidAmount.mul(10**(auctionDetails.assetDecimals.sub(18)))\n            : minBidAmount.div(\n                10**(uint256(18).sub(auctionDetails.assetDecimals))\n            );\n\n        require(\n            minBidAmount <= type(uint96).max,\n            \"optionPremium * oTokenSellAmount > type(uint96) max value!\"\n        );\n\n        uint256 auctionEnd = block.timestamp.add(auctionDetails.duration);\n\n        auctionID = IGnosisAuction(auctionDetails.gnosisEasyAuction)\n            .initiateAuction(\n            // address of oToken we minted and are selling\n            auctionDetails.oTokenAddress,\n            // address of asset we want in exchange for oTokens. Should match vault `asset`\n            auctionDetails.asset,\n            // orders can be cancelled at any time during the auction\n            auctionEnd,\n            // order will last for `duration`\n            auctionEnd,\n            // we are selling all of the otokens minus a fee taken by gnosis\n            uint96(oTokenSellAmount),\n            // the minimum we are willing to sell all the oTokens for. A discount is applied on black-scholes price\n            uint96(minBidAmount),\n            // the minimum bidding amount must be 1 * 10 ** -assetDecimals\n            1,\n            // the min funding threshold\n            0,\n            // no atomic closure\n            false,\n            // access manager contract\n            address(0),\n            // bytes for storing info like a whitelist for who can bid\n            bytes(\"\")\n        );\n\n        emit InitiateGnosisAuction(\n            auctionDetails.oTokenAddress,\n            auctionDetails.asset,\n            auctionID,\n            msg.sender\n        );\n    }\n\n    function placeBid(BidDetails calldata bidDetails)\n        internal\n        returns (\n            uint256 sellAmount,\n            uint256 buyAmount,\n            uint64 userId\n        )\n    {\n        // calculate how much to allocate\n        sellAmount = bidDetails\n            .lockedBalance\n            .mul(bidDetails.optionAllocation)\n            .div(100 * Vault.OPTION_ALLOCATION_MULTIPLIER);\n\n        // divide the `asset` sellAmount by the target premium per oToken to\n        // get the number of oTokens to buy (8 decimals)\n        buyAmount = sellAmount\n            .mul(10**(bidDetails.assetDecimals.add(Vault.OTOKEN_DECIMALS)))\n            .div(bidDetails.optionPremium)\n            .div(10**bidDetails.assetDecimals);\n\n        require(\n            sellAmount <= type(uint96).max,\n            \"sellAmount > type(uint96) max value!\"\n        );\n        require(\n            buyAmount <= type(uint96).max,\n            \"buyAmount > type(uint96) max value!\"\n        );\n\n        // approve that amount\n        IERC20(bidDetails.asset).safeApprove(\n            bidDetails.gnosisEasyAuction,\n            sellAmount\n        );\n\n        uint96[] memory _minBuyAmounts = new uint96[](1);\n        uint96[] memory _sellAmounts = new uint96[](1);\n        bytes32[] memory _prevSellOrders = new bytes32[](1);\n        _minBuyAmounts[0] = uint96(buyAmount);\n        _sellAmounts[0] = uint96(sellAmount);\n        _prevSellOrders[\n            0\n        ] = 0x0000000000000000000000000000000000000000000000000000000000000001;\n\n        // place sell order with that amount\n        userId = IGnosisAuction(bidDetails.gnosisEasyAuction).placeSellOrders(\n            bidDetails.auctionId,\n            _minBuyAmounts,\n            _sellAmounts,\n            _prevSellOrders,\n            \"0x\"\n        );\n\n        emit PlaceAuctionBid(\n            bidDetails.auctionId,\n            bidDetails.oTokenAddress,\n            sellAmount,\n            buyAmount,\n            bidDetails.bidder\n        );\n\n        return (sellAmount, buyAmount, userId);\n    }\n\n    function claimAuctionOtokens(\n        Vault.AuctionSellOrder calldata auctionSellOrder,\n        address gnosisEasyAuction,\n        address counterpartyThetaVault\n    ) internal {\n        bytes32 order =\n            encodeOrder(\n                auctionSellOrder.userId,\n                auctionSellOrder.buyAmount,\n                auctionSellOrder.sellAmount\n            );\n        bytes32[] memory orders = new bytes32[](1);\n        orders[0] = order;\n        IGnosisAuction(gnosisEasyAuction).claimFromParticipantOrder(\n            IRibbonThetaVault(counterpartyThetaVault).optionAuctionID(),\n            orders\n        );\n    }\n\n    function getOTokenSellAmount(address oTokenAddress)\n        internal\n        view\n        returns (uint256)\n    {\n        // We take our current oToken balance. That will be our sell amount\n        // but otokens will be transferred to gnosis.\n        uint256 oTokenSellAmount =\n            IERC20(oTokenAddress).balanceOf(address(this));\n\n        require(\n            oTokenSellAmount <= type(uint96).max,\n            \"oTokenSellAmount > type(uint96) max value!\"\n        );\n\n        return oTokenSellAmount;\n    }\n\n    function getOTokenPremiumInStables(\n        address oTokenAddress,\n        address optionsPremiumPricer,\n        uint256 premiumDiscount\n    ) internal view returns (uint256) {\n        IOtoken newOToken = IOtoken(oTokenAddress);\n        IOptionsPremiumPricer premiumPricer =\n            IOptionsPremiumPricer(optionsPremiumPricer);\n\n        // Apply black-scholes formula (from rvol library) to option given its features\n        // and get price for 100 contracts denominated USDC for both call and put options\n        uint256 optionPremium =\n            premiumPricer.getPremiumInStables(\n                newOToken.strikePrice(),\n                newOToken.expiryTimestamp(),\n                newOToken.isPut()\n            );\n\n        // Apply a discount to incentivize arbitraguers\n        optionPremium = optionPremium.mul(premiumDiscount).div(\n            100 * Vault.PREMIUM_DISCOUNT_MULTIPLIER\n        );\n\n        require(\n            optionPremium <= type(uint96).max,\n            \"optionPremium > type(uint96) max value!\"\n        );\n\n        return optionPremium;\n    }\n\n    function encodeOrder(\n        uint64 userId,\n        uint96 buyAmount,\n        uint96 sellAmount\n    ) internal pure returns (bytes32) {\n        return\n            bytes32(\n                (uint256(userId) << 192) +\n                    (uint256(buyAmount) << 96) +\n                    uint256(sellAmount)\n            );\n    }\n}\n"},"contracts/interfaces/GammaInterface.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity =0.8.4;\n\nlibrary GammaTypes {\n    // vault is a struct of 6 arrays that describe a position a user has, a user can have multiple vaults.\n    struct Vault {\n        // addresses of oTokens a user has shorted (i.e. written) against this vault\n        address[] shortOtokens;\n        // addresses of oTokens a user has bought and deposited in this vault\n        // user can be long oTokens without opening a vault (e.g. by buying on a DEX)\n        // generally, long oTokens will be 'deposited' in vaults to act as collateral\n        // in order to write oTokens against (i.e. in spreads)\n        address[] longOtokens;\n        // addresses of other ERC-20s a user has deposited as collateral in this vault\n        address[] collateralAssets;\n        // quantity of oTokens minted/written for each oToken address in shortOtokens\n        uint256[] shortAmounts;\n        // quantity of oTokens owned and held in the vault for each oToken address in longOtokens\n        uint256[] longAmounts;\n        // quantity of ERC-20 deposited as collateral in the vault for each ERC-20 address in collateralAssets\n        uint256[] collateralAmounts;\n    }\n}\n\ninterface IOtoken {\n    function underlyingAsset() external view returns (address);\n\n    function strikeAsset() external view returns (address);\n\n    function collateralAsset() external view returns (address);\n\n    function strikePrice() external view returns (uint256);\n\n    function expiryTimestamp() external view returns (uint256);\n\n    function isPut() external view returns (bool);\n\n    function balanceOf(address) external view returns (uint256);\n\n    function totalSupply() external view returns (uint256);\n\n    function transfer(address, uint256) external;\n}\n\ninterface IOtokenFactory {\n    function getOtoken(\n        address _underlyingAsset,\n        address _strikeAsset,\n        address _collateralAsset,\n        uint256 _strikePrice,\n        uint256 _expiry,\n        bool _isPut\n    ) external view returns (address);\n\n    function createOtoken(\n        address _underlyingAsset,\n        address _strikeAsset,\n        address _collateralAsset,\n        uint256 _strikePrice,\n        uint256 _expiry,\n        bool _isPut\n    ) external returns (address);\n\n    function getTargetOtokenAddress(\n        address _underlyingAsset,\n        address _strikeAsset,\n        address _collateralAsset,\n        uint256 _strikePrice,\n        uint256 _expiry,\n        bool _isPut\n    ) external view returns (address);\n\n    event OtokenCreated(\n        address tokenAddress,\n        address creator,\n        address indexed underlying,\n        address indexed strike,\n        address indexed collateral,\n        uint256 strikePrice,\n        uint256 expiry,\n        bool isPut\n    );\n}\n\ninterface IController {\n    // possible actions that can be performed\n    enum ActionType {\n        OpenVault,\n        MintShortOption,\n        BurnShortOption,\n        DepositLongOption,\n        WithdrawLongOption,\n        DepositCollateral,\n        WithdrawCollateral,\n        SettleVault,\n        Redeem,\n        Call,\n        Liquidate\n    }\n\n    struct ActionArgs {\n        // type of action that is being performed on the system\n        ActionType actionType;\n        // address of the account owner\n        address owner;\n        // address which we move assets from or to (depending on the action type)\n        address secondAddress;\n        // asset that is to be transfered\n        address asset;\n        // index of the vault that is to be modified (if any)\n        uint256 vaultId;\n        // amount of asset that is to be transfered\n        uint256 amount;\n        // each vault can hold multiple short / long / collateral assets\n        // but we are restricting the scope to only 1 of each in this version\n        // in future versions this would be the index of the short / long / collateral asset that needs to be modified\n        uint256 index;\n        // any other data that needs to be passed in for arbitrary function calls\n        bytes data;\n    }\n\n    struct RedeemArgs {\n        // address to which we pay out the oToken proceeds\n        address receiver;\n        // oToken that is to be redeemed\n        address otoken;\n        // amount of oTokens that is to be redeemed\n        uint256 amount;\n    }\n\n    function getPayout(address _otoken, uint256 _amount)\n        external\n        view\n        returns (uint256);\n\n    function operate(ActionArgs[] calldata _actions) external;\n\n    function getAccountVaultCounter(address owner)\n        external\n        view\n        returns (uint256);\n\n    function oracle() external view returns (address);\n\n    function getVault(address _owner, uint256 _vaultId)\n        external\n        view\n        returns (GammaTypes.Vault memory);\n\n    function getProceed(address _owner, uint256 _vaultId)\n        external\n        view\n        returns (uint256);\n\n    function isSettlementAllowed(\n        address _underlying,\n        address _strike,\n        address _collateral,\n        uint256 _expiry\n    ) external view returns (bool);\n}\n\ninterface IOracle {\n    function setAssetPricer(address _asset, address _pricer) external;\n\n    function updateAssetPricer(address _asset, address _pricer) external;\n\n    function getPrice(address _asset) external view returns (uint256);\n\n    function getExpiryPrice(address _asset, uint256 _expiryTimestamp)\n        external\n        view\n        returns (uint256);\n}\n"},"contracts/interfaces/IERC20Detailed.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity =0.8.4;\n\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\n\ninterface IERC20Detailed is IERC20 {\n    function decimals() external view returns (uint8);\n\n    function symbol() external view returns (string calldata);\n\n    function name() external view returns (string calldata);\n}\n"},"contracts/interfaces/IGnosisAuction.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity =0.8.4;\n\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\n\nlibrary AuctionType {\n    struct AuctionData {\n        IERC20 auctioningToken;\n        IERC20 biddingToken;\n        uint256 orderCancellationEndDate;\n        uint256 auctionEndDate;\n        bytes32 initialAuctionOrder;\n        uint256 minimumBiddingAmountPerOrder;\n        uint256 interimSumBidAmount;\n        bytes32 interimOrder;\n        bytes32 clearingPriceOrder;\n        uint96 volumeClearingPriceOrder;\n        bool minFundingThresholdNotReached;\n        bool isAtomicClosureAllowed;\n        uint256 feeNumerator;\n        uint256 minFundingThreshold;\n    }\n}\n\ninterface IGnosisAuction {\n    function initiateAuction(\n        address _auctioningToken,\n        address _biddingToken,\n        uint256 orderCancellationEndDate,\n        uint256 auctionEndDate,\n        uint96 _auctionedSellAmount,\n        uint96 _minBuyAmount,\n        uint256 minimumBiddingAmountPerOrder,\n        uint256 minFundingThreshold,\n        bool isAtomicClosureAllowed,\n        address accessManagerContract,\n        bytes memory accessManagerContractData\n    ) external returns (uint256);\n\n    function auctionCounter() external view returns (uint256);\n\n    function auctionData(uint256 auctionId)\n        external\n        view\n        returns (AuctionType.AuctionData memory);\n\n    function auctionAccessManager(uint256 auctionId)\n        external\n        view\n        returns (address);\n\n    function auctionAccessData(uint256 auctionId)\n        external\n        view\n        returns (bytes memory);\n\n    function FEE_DENOMINATOR() external view returns (uint256);\n\n    function feeNumerator() external view returns (uint256);\n\n    function settleAuction(uint256 auctionId) external returns (bytes32);\n\n    function placeSellOrders(\n        uint256 auctionId,\n        uint96[] memory _minBuyAmounts,\n        uint96[] memory _sellAmounts,\n        bytes32[] memory _prevSellOrders,\n        bytes calldata allowListCallData\n    ) external returns (uint64);\n\n    function claimFromParticipantOrder(\n        uint256 auctionId,\n        bytes32[] memory orders\n    ) external returns (uint256, uint256);\n}\n"},"contracts/interfaces/ILiquidityGauge.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity =0.8.4;\n\ninterface ILiquidityGauge {\n    function balanceOf(address) external view returns (uint256);\n\n    function deposit(\n        uint256 _value,\n        address _addr,\n        bool _claim_rewards\n    ) external;\n\n    function withdraw(uint256 _value) external;\n}\n"},"@openzeppelin/contracts/utils/Address.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n    /**\n     * @dev Returns true if `account` is a contract.\n     *\n     * [IMPORTANT]\n     * ====\n     * It is unsafe to assume that an address for which this function returns\n     * false is an externally-owned account (EOA) and not a contract.\n     *\n     * Among others, `isContract` will return false for the following\n     * types of addresses:\n     *\n     *  - an externally-owned account\n     *  - a contract in construction\n     *  - an address where a contract will be created\n     *  - an address where a contract lived, but was destroyed\n     * ====\n     */\n    function isContract(address account) internal view returns (bool) {\n        // This method relies on extcodesize, which returns 0 for contracts in\n        // construction, since the code is only stored at the end of the\n        // constructor execution.\n\n        uint256 size;\n        assembly {\n            size := extcodesize(account)\n        }\n        return size > 0;\n    }\n\n    /**\n     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n     * `recipient`, forwarding all available gas and reverting on errors.\n     *\n     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n     * of certain opcodes, possibly making contracts go over the 2300 gas limit\n     * imposed by `transfer`, making them unable to receive funds via\n     * `transfer`. {sendValue} removes this limitation.\n     *\n     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n     *\n     * IMPORTANT: because control is transferred to `recipient`, care must be\n     * taken to not create reentrancy vulnerabilities. Consider using\n     * {ReentrancyGuard} or the\n     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n     */\n    function sendValue(address payable recipient, uint256 amount) internal {\n        require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n        (bool success, ) = recipient.call{value: amount}(\"\");\n        require(success, \"Address: unable to send value, recipient may have reverted\");\n    }\n\n    /**\n     * @dev Performs a Solidity function call using a low level `call`. A\n     * plain `call` is an unsafe replacement for a function call: use this\n     * function instead.\n     *\n     * If `target` reverts with a revert reason, it is bubbled up by this\n     * function (like regular Solidity function calls).\n     *\n     * Returns the raw returned data. To convert to the expected return value,\n     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n     *\n     * Requirements:\n     *\n     * - `target` must be a contract.\n     * - calling `target` with `data` must not revert.\n     *\n     * _Available since v3.1._\n     */\n    function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n        return functionCall(target, data, \"Address: low-level call failed\");\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n     * `errorMessage` as a fallback revert reason when `target` reverts.\n     *\n     * _Available since v3.1._\n     */\n    function functionCall(\n        address target,\n        bytes memory data,\n        string memory errorMessage\n    ) internal returns (bytes memory) {\n        return functionCallWithValue(target, data, 0, errorMessage);\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n     * but also transferring `value` wei to `target`.\n     *\n     * Requirements:\n     *\n     * - the calling contract must have an ETH balance of at least `value`.\n     * - the called Solidity function must be `payable`.\n     *\n     * _Available since v3.1._\n     */\n    function functionCallWithValue(\n        address target,\n        bytes memory data,\n        uint256 value\n    ) internal returns (bytes memory) {\n        return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n     * with `errorMessage` as a fallback revert reason when `target` reverts.\n     *\n     * _Available since v3.1._\n     */\n    function functionCallWithValue(\n        address target,\n        bytes memory data,\n        uint256 value,\n        string memory errorMessage\n    ) internal returns (bytes memory) {\n        require(address(this).balance >= value, \"Address: insufficient balance for call\");\n        require(isContract(target), \"Address: call to non-contract\");\n\n        (bool success, bytes memory returndata) = target.call{value: value}(data);\n        return verifyCallResult(success, returndata, errorMessage);\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n     * but performing a static call.\n     *\n     * _Available since v3.3._\n     */\n    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n        return functionStaticCall(target, data, \"Address: low-level static call failed\");\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n     * but performing a static call.\n     *\n     * _Available since v3.3._\n     */\n    function functionStaticCall(\n        address target,\n        bytes memory data,\n        string memory errorMessage\n    ) internal view returns (bytes memory) {\n        require(isContract(target), \"Address: static call to non-contract\");\n\n        (bool success, bytes memory returndata) = target.staticcall(data);\n        return verifyCallResult(success, returndata, errorMessage);\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n     * but performing a delegate call.\n     *\n     * _Available since v3.4._\n     */\n    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n        return functionDelegateCall(target, data, \"Address: low-level delegate call failed\");\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n     * but performing a delegate call.\n     *\n     * _Available since v3.4._\n     */\n    function functionDelegateCall(\n        address target,\n        bytes memory data,\n        string memory errorMessage\n    ) internal returns (bytes memory) {\n        require(isContract(target), \"Address: delegate call to non-contract\");\n\n        (bool success, bytes memory returndata) = target.delegatecall(data);\n        return verifyCallResult(success, returndata, errorMessage);\n    }\n\n    /**\n     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\n     * revert reason using the provided one.\n     *\n     * _Available since v4.3._\n     */\n    function verifyCallResult(\n        bool success,\n        bytes memory returndata,\n        string memory errorMessage\n    ) internal pure returns (bytes memory) {\n        if (success) {\n            return returndata;\n        } else {\n            // Look for revert reason and bubble it up if present\n            if (returndata.length > 0) {\n                // The easiest way to bubble the revert reason is using memory via assembly\n\n                assembly {\n                    let returndata_size := mload(returndata)\n                    revert(add(32, returndata), returndata_size)\n                }\n            } else {\n                revert(errorMessage);\n            }\n        }\n    }\n}\n"},"contracts/interfaces/IRibbonThetaVault.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity =0.8.4;\n\nimport {Vault} from \"../libraries/Vault.sol\";\n\ninterface IRibbonThetaVault {\n    function GAMMA_CONTROLLER() external view returns (address);\n\n    function currentOption() external view returns (address);\n\n    function nextOption() external view returns (address);\n\n    function vaultParams() external view returns (Vault.VaultParams memory);\n\n    function vaultState() external view returns (Vault.VaultState memory);\n\n    function optionState() external view returns (Vault.OptionState memory);\n\n    function optionAuctionID() external view returns (uint256);\n\n    function pricePerShare() external view returns (uint256);\n\n    function roundPricePerShare(uint256) external view returns (uint256);\n\n    function symbol() external view returns (string calldata);\n\n    function depositFor(uint256 amount, address creditor) external;\n\n    function initiateWithdraw(uint256 numShares) external;\n\n    function completeWithdraw() external;\n\n    function maxRedeem() external;\n\n    function commitAndClose() external;\n\n    function burnRemainingOTokens() external;\n}\n\ninterface IRibbonTreasuryVault is IRibbonThetaVault {\n    function period() external view returns (uint256);\n}\n\ninterface IRibbonSTETHVault is IRibbonThetaVault {\n    function depositYieldTokenFor(uint256 amount, address creditor) external;\n}\n"},"contracts/storage/RibbonThetaVaultStorage.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity =0.8.4;\n\nabstract contract RibbonThetaVaultStorageV1 {\n    // Logic contract used to price options\n    address public optionsPremiumPricer;\n    // Logic contract used to select strike prices\n    address public strikeSelection;\n    // Premium discount on options we are selling (thousandths place: 000 - 999)\n    uint256 public premiumDiscount;\n    // Current oToken premium\n    uint256 public currentOtokenPremium;\n    // Last round id at which the strike was manually overridden\n    uint16 public lastStrikeOverrideRound;\n    // Price last overridden strike set to\n    uint256 public overriddenStrikePrice;\n    // Auction duration\n    uint256 public auctionDuration;\n    // Auction id of current option\n    uint256 public optionAuctionID;\n}\n\nabstract contract RibbonThetaVaultStorageV2 {\n    // Amount locked for scheduled withdrawals last week;\n    uint256 public lastQueuedWithdrawAmount;\n}\n\nabstract contract RibbonThetaVaultStorageV3 {\n    // DEPRECATED: Auction will be denominated in USDC if true\n    bool private _isUsdcAuction;\n    // DEPRECATED: Path for swaps\n    bytes private _swapPath;\n}\n\nabstract contract RibbonThetaVaultStorageV4 {\n    // LiquidityGauge contract for the vault\n    address public liquidityGauge;\n}\n\nabstract contract RibbonThetaVaultStorageV5 {\n    // OptionsPurchaseQueue contract for selling options\n    address public optionsPurchaseQueue;\n}\n\nabstract contract RibbonThetaVaultStorageV6 {\n    // Queued withdraw shares for the current round\n    uint256 public currentQueuedWithdrawShares;\n}\n\nabstract contract RibbonThetaVaultStorageV7 {\n    // Vault Pauser Contract for the vault\n    address public vaultPauser;\n}\n\nabstract contract RibbonThetaVaultStorageV8 {\n    // DEPRECATED: Executor role for Swap offers\n    address private _offerExecutor;\n}\n\n// We are following Compound's method of upgrading new contract implementations\n// When we need to add new storage variables, we create a new version of RibbonThetaVaultStorage\n// e.g. RibbonThetaVaultStorage<versionNumber>, so finally it would look like\n// contract RibbonThetaVaultStorage is RibbonThetaVaultStorageV1, RibbonThetaVaultStorageV2\nabstract contract RibbonThetaVaultStorage is\n    RibbonThetaVaultStorageV1,\n    RibbonThetaVaultStorageV2,\n    RibbonThetaVaultStorageV3,\n    RibbonThetaVaultStorageV4,\n    RibbonThetaVaultStorageV5,\n    RibbonThetaVaultStorageV6,\n    RibbonThetaVaultStorageV7,\n    RibbonThetaVaultStorageV8\n{\n\n}\n"},"@openzeppelin/contracts/token/ERC20/IERC20.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n    /**\n     * @dev Returns the amount of tokens in existence.\n     */\n    function totalSupply() external view returns (uint256);\n\n    /**\n     * @dev Returns the amount of tokens owned by `account`.\n     */\n    function balanceOf(address account) external view returns (uint256);\n\n    /**\n     * @dev Moves `amount` tokens from the caller's account to `recipient`.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transfer(address recipient, uint256 amount) external returns (bool);\n\n    /**\n     * @dev Returns the remaining number of tokens that `spender` will be\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\n     * zero by default.\n     *\n     * This value changes when {approve} or {transferFrom} are called.\n     */\n    function allowance(address owner, address spender) external view returns (uint256);\n\n    /**\n     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\n     * that someone may use both the old and the new allowance by unfortunate\n     * transaction ordering. One possible solution to mitigate this race\n     * condition is to first reduce the spender's allowance to 0 and set the\n     * desired value afterwards:\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n     *\n     * Emits an {Approval} event.\n     */\n    function approve(address spender, uint256 amount) external returns (bool);\n\n    /**\n     * @dev Moves `amount` tokens from `sender` to `recipient` using the\n     * allowance mechanism. `amount` is then deducted from the caller's\n     * allowance.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transferFrom(\n        address sender,\n        address recipient,\n        uint256 amount\n    ) external returns (bool);\n\n    /**\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\n     * another (`to`).\n     *\n     * Note that `value` may be zero.\n     */\n    event Transfer(address indexed from, address indexed to, uint256 value);\n\n    /**\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n     * a call to {approve}. `value` is the new allowance.\n     */\n    event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n"},"contracts/interfaces/IOptionsPurchaseQueue.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity >=0.8.0;\n\ninterface IOptionsPurchaseQueue {\n    /**\n     * @dev Contains purchase request info\n     * @param optionsAmount Amount of options to purchase\n     * @param premiums Total premiums the buyer is spending to purchase the options (optionsAmount * ceilingPrice)\n     *  We need to track the premiums here since the ceilingPrice could change between the time the purchase was\n     *  requested and when the options are sold\n     * @param buyer The buyer requesting this purchase\n     */\n    struct Purchase {\n        uint128 optionsAmount; // Slot 0\n        uint128 premiums;\n        address buyer; // Slot 1\n    }\n\n    function purchases(address, uint256)\n        external\n        view\n        returns (\n            uint128,\n            uint128,\n            address\n        );\n\n    function totalOptionsAmount(address) external view returns (uint256);\n\n    function vaultAllocatedOptions(address) external view returns (uint256);\n\n    function whitelistedBuyer(address) external view returns (bool);\n\n    function minPurchaseAmount(address) external view returns (uint256);\n\n    function ceilingPrice(address) external view returns (uint256);\n\n    function getPurchases(address vault)\n        external\n        view\n        returns (Purchase[] memory);\n\n    function getPremiums(address vault, uint256 optionsAmount)\n        external\n        view\n        returns (uint256);\n\n    function getOptionsAllocation(address vault, uint256 allocatedOptions)\n        external\n        view\n        returns (uint256);\n\n    function requestPurchase(address vault, uint256 optionsAmount)\n        external\n        returns (uint256);\n\n    function allocateOptions(uint256 allocatedOptions)\n        external\n        returns (uint256);\n\n    function sellToBuyers(uint256 settlementPrice) external returns (uint256);\n\n    function cancelAllPurchases(address vault) external;\n\n    function addWhitelist(address buyer) external;\n\n    function removeWhitelist(address buyer) external;\n\n    function setCeilingPrice(address vault, uint256 price) external;\n\n    function setMinPurchaseAmount(address vault, uint256 amount) external;\n}\n"},"contracts/libraries/VaultLifecycleWithSwap.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity =0.8.4;\n\nimport {SafeMath} from \"@openzeppelin/contracts/utils/math/SafeMath.sol\";\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport {\n    SafeERC20\n} from \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\nimport {Vault} from \"./Vault.sol\";\nimport {ShareMath} from \"./ShareMath.sol\";\nimport {IStrikeSelection} from \"../interfaces/IRibbon.sol\";\nimport {GnosisAuction} from \"./GnosisAuction.sol\";\nimport {\n    IOtokenFactory,\n    IOtoken,\n    IController,\n    GammaTypes\n} from \"../interfaces/GammaInterface.sol\";\nimport {IERC20Detailed} from \"../interfaces/IERC20Detailed.sol\";\nimport {ISwap} from \"../interfaces/ISwap.sol\";\nimport {IOptionsPurchaseQueue} from \"../interfaces/IOptionsPurchaseQueue.sol\";\nimport {SupportsNonCompliantERC20} from \"./SupportsNonCompliantERC20.sol\";\nimport {IOptionsPremiumPricer} from \"../interfaces/IRibbon.sol\";\n\nlibrary VaultLifecycleWithSwap {\n    using SafeMath for uint256;\n    using SupportsNonCompliantERC20 for IERC20;\n    using SafeERC20 for IERC20;\n\n    struct CommitParams {\n        address OTOKEN_FACTORY;\n        address USDC;\n        address collateralAsset;\n        address currentOption;\n        uint256 delay;\n        uint16 lastStrikeOverrideRound;\n        uint256 overriddenStrikePrice;\n        address strikeSelection;\n        address optionsPremiumPricer;\n    }\n\n    /**\n     * @notice Sets the next option the vault will be shorting, and calculates its premium for the auction\n     * @param commitParams is the struct with details on previous option and strike selection details\n     * @param vaultParams is the struct with vault general data\n     * @param vaultState is the struct with vault accounting state\n     * @return otokenAddress is the address of the new option\n     * @return strikePrice is the strike price of the new option\n     * @return delta is the delta of the new option\n     */\n    function commitNextOption(\n        CommitParams calldata commitParams,\n        Vault.VaultParams storage vaultParams,\n        Vault.VaultState storage vaultState\n    )\n        external\n        returns (\n            address otokenAddress,\n            uint256 strikePrice,\n            uint256 delta\n        )\n    {\n        uint256 expiry = getNextExpiry(commitParams.currentOption);\n\n        IStrikeSelection selection =\n            IStrikeSelection(commitParams.strikeSelection);\n\n        bool isPut = vaultParams.isPut;\n        address underlying = vaultParams.underlying;\n\n        (strikePrice, delta) = commitParams.lastStrikeOverrideRound ==\n            vaultState.round\n            ? (commitParams.overriddenStrikePrice, selection.delta())\n            : selection.getStrikePrice(expiry, isPut);\n\n        require(strikePrice != 0, \"!strikePrice\");\n\n        // retrieve address if option already exists, or deploy it\n        otokenAddress = getOrDeployOtoken(\n            commitParams,\n            vaultParams,\n            underlying,\n            strikePrice,\n            expiry,\n            isPut\n        );\n\n        return (otokenAddress, strikePrice, delta);\n    }\n\n    /**\n     * @notice Verify the otoken has the correct parameters to prevent vulnerability to opyn contract changes\n     * @param otokenAddress is the address of the otoken\n     * @param vaultParams is the struct with vault general data\n     * @param collateralAsset is the address of the collateral asset\n     * @param USDC is the address of usdc\n     * @param delay is the delay between commitAndClose and rollToNextOption\n     */\n    function verifyOtoken(\n        address otokenAddress,\n        Vault.VaultParams storage vaultParams,\n        address collateralAsset,\n        address USDC,\n        uint256 delay\n    ) private view {\n        require(otokenAddress != address(0), \"!otokenAddress\");\n\n        IOtoken otoken = IOtoken(otokenAddress);\n        require(otoken.isPut() == vaultParams.isPut, \"Type mismatch\");\n        require(\n            otoken.underlyingAsset() == vaultParams.underlying,\n            \"Wrong underlyingAsset\"\n        );\n        require(\n            otoken.collateralAsset() == collateralAsset,\n            \"Wrong collateralAsset\"\n        );\n\n        // we just assume all options use USDC as the strike\n        require(otoken.strikeAsset() == USDC, \"strikeAsset != USDC\");\n\n        uint256 readyAt = block.timestamp.add(delay);\n        require(otoken.expiryTimestamp() >= readyAt, \"Expiry before delay\");\n    }\n\n    /**\n     * @param decimals is the decimals of the asset\n     * @param totalBalance is the vault's total asset balance\n     * @param currentShareSupply is the supply of the shares invoked with totalSupply()\n     * @param lastQueuedWithdrawAmount is the amount queued for withdrawals from last round\n     * @param performanceFee is the perf fee percent to charge on premiums\n     * @param managementFee is the management fee percent to charge on the AUM\n     */\n    struct CloseParams {\n        uint256 decimals;\n        uint256 totalBalance;\n        uint256 currentShareSupply;\n        uint256 lastQueuedWithdrawAmount;\n        uint256 performanceFee;\n        uint256 managementFee;\n        uint256 currentQueuedWithdrawShares;\n    }\n\n    /**\n     * @notice Calculate the shares to mint, new price per share, and\n      amount of funds to re-allocate as collateral for the new round\n     * @param vaultState is the storage variable vaultState passed from RibbonVault\n     * @param params is the rollover parameters passed to compute the next state\n     * @return newLockedAmount is the amount of funds to allocate for the new round\n     * @return queuedWithdrawAmount is the amount of funds set aside for withdrawal\n     * @return newPricePerShare is the price per share of the new round\n     * @return mintShares is the amount of shares to mint from deposits\n     * @return performanceFeeInAsset is the performance fee charged by vault\n     * @return totalVaultFee is the total amount of fee charged by vault\n     */\n    function closeRound(\n        Vault.VaultState storage vaultState,\n        CloseParams calldata params\n    )\n        external\n        view\n        returns (\n            uint256 newLockedAmount,\n            uint256 queuedWithdrawAmount,\n            uint256 newPricePerShare,\n            uint256 mintShares,\n            uint256 performanceFeeInAsset,\n            uint256 totalVaultFee\n        )\n    {\n        uint256 currentBalance = params.totalBalance;\n        uint256 pendingAmount = vaultState.totalPending;\n        // Total amount of queued withdrawal shares from previous rounds (doesn't include the current round)\n        uint256 lastQueuedWithdrawShares = vaultState.queuedWithdrawShares;\n\n        // Deduct older queued withdraws so we don't charge fees on them\n        uint256 balanceForVaultFees =\n            currentBalance.sub(params.lastQueuedWithdrawAmount);\n\n        {\n            (performanceFeeInAsset, , totalVaultFee) = getVaultFees(\n                balanceForVaultFees,\n                vaultState.lastLockedAmount,\n                vaultState.totalPending,\n                params.performanceFee,\n                params.managementFee\n            );\n        }\n\n        // Take into account the fee\n        // so we can calculate the newPricePerShare\n        currentBalance = currentBalance.sub(totalVaultFee);\n\n        {\n            newPricePerShare = ShareMath.pricePerShare(\n                params.currentShareSupply.sub(lastQueuedWithdrawShares),\n                currentBalance.sub(params.lastQueuedWithdrawAmount),\n                pendingAmount,\n                params.decimals\n            );\n\n            queuedWithdrawAmount = params.lastQueuedWithdrawAmount.add(\n                ShareMath.sharesToAsset(\n                    params.currentQueuedWithdrawShares,\n                    newPricePerShare,\n                    params.decimals\n                )\n            );\n\n            // After closing the short, if the options expire in-the-money\n            // vault pricePerShare would go down because vault's asset balance decreased.\n            // This ensures that the newly-minted shares do not take on the loss.\n            mintShares = ShareMath.assetToShares(\n                pendingAmount,\n                newPricePerShare,\n                params.decimals\n            );\n        }\n\n        return (\n            currentBalance.sub(queuedWithdrawAmount), // new locked balance subtracts the queued withdrawals\n            queuedWithdrawAmount,\n            newPricePerShare,\n            mintShares,\n            performanceFeeInAsset,\n            totalVaultFee\n        );\n    }\n\n    /**\n     * @notice Creates the actual Opyn short position by depositing collateral and minting otokens\n     * @param gammaController is the address of the opyn controller contract\n     * @param marginPool is the address of the opyn margin contract which holds the collateral\n     * @param oTokenAddress is the address of the otoken to mint\n     * @param depositAmount is the amount of collateral to deposit\n     * @return the otoken mint amount\n     */\n    function createShort(\n        address gammaController,\n        address marginPool,\n        address oTokenAddress,\n        uint256 depositAmount\n    ) external returns (uint256) {\n        IController controller = IController(gammaController);\n        uint256 newVaultID =\n            (controller.getAccountVaultCounter(address(this))).add(1);\n\n        // An otoken's collateralAsset is the vault's `asset`\n        // So in the context of performing Opyn short operations we call them collateralAsset\n        IOtoken oToken = IOtoken(oTokenAddress);\n        address collateralAsset = oToken.collateralAsset();\n\n        uint256 collateralDecimals =\n            uint256(IERC20Detailed(collateralAsset).decimals());\n        uint256 mintAmount;\n\n        if (oToken.isPut()) {\n            // For minting puts, there will be instances where the full depositAmount will not be used for minting.\n            // This is because of an issue with precision.\n            //\n            // For ETH put options, we are calculating the mintAmount (10**8 decimals) using\n            // the depositAmount (10**18 decimals), which will result in truncation of decimals when scaling down.\n            // As a result, there will be tiny amounts of dust left behind in the Opyn vault when minting put otokens.\n            //\n            // For simplicity's sake, we do not refund the dust back to the address(this) on minting otokens.\n            // We retain the dust in the vault so the calling contract can withdraw the\n            // actual locked amount + dust at settlement.\n            //\n            // To test this behavior, we can console.log\n            // MarginCalculatorInterface(0x7A48d10f372b3D7c60f6c9770B91398e4ccfd3C7).getExcessCollateral(vault)\n            // to see how much dust (or excess collateral) is left behind.\n            mintAmount = depositAmount\n                .mul(10**Vault.OTOKEN_DECIMALS)\n                .mul(10**18) // we use 10**18 to give extra precision\n                .div(oToken.strikePrice().mul(10**(10 + collateralDecimals)));\n        } else {\n            mintAmount = depositAmount;\n\n            if (collateralDecimals > 8) {\n                uint256 scaleBy = 10**(collateralDecimals.sub(8)); // oTokens have 8 decimals\n                if (mintAmount > scaleBy) {\n                    mintAmount = depositAmount.div(scaleBy); // scale down from 10**18 to 10**8\n                }\n            }\n        }\n\n        // double approve to fix non-compliant ERC20s\n        IERC20 collateralToken = IERC20(collateralAsset);\n        collateralToken.safeApproveNonCompliant(marginPool, depositAmount);\n\n        IController.ActionArgs[] memory actions =\n            new IController.ActionArgs[](3);\n\n        actions[0] = IController.ActionArgs(\n            IController.ActionType.OpenVault,\n            address(this), // owner\n            address(this), // receiver\n            address(0), // asset, otoken\n            newVaultID, // vaultId\n            0, // amount\n            0, //index\n            \"\" //data\n        );\n\n        actions[1] = IController.ActionArgs(\n            IController.ActionType.DepositCollateral,\n            address(this), // owner\n            address(this), // address to transfer from\n            collateralAsset, // deposited asset\n            newVaultID, // vaultId\n            depositAmount, // amount\n            0, //index\n            \"\" //data\n        );\n\n        actions[2] = IController.ActionArgs(\n            IController.ActionType.MintShortOption,\n            address(this), // owner\n            address(this), // address to transfer to\n            oTokenAddress, // option address\n            newVaultID, // vaultId\n            mintAmount, // amount\n            0, //index\n            \"\" //data\n        );\n\n        controller.operate(actions);\n\n        return mintAmount;\n    }\n\n    /**\n     * @notice Close the existing short otoken position. Currently this implementation is simple.\n     * It closes the most recent vault opened by the contract. This assumes that the contract will\n     * only have a single vault open at any given time. Since calling `_closeShort` deletes vaults by\n     calling SettleVault action, this assumption should hold.\n     * @param gammaController is the address of the opyn controller contract\n     * @return amount of collateral redeemed from the vault\n     */\n    function settleShort(address gammaController) external returns (uint256) {\n        IController controller = IController(gammaController);\n\n        // gets the currently active vault ID\n        uint256 vaultID = controller.getAccountVaultCounter(address(this));\n\n        GammaTypes.Vault memory vault =\n            controller.getVault(address(this), vaultID);\n\n        require(vault.shortOtokens.length > 0, \"No short\");\n\n        // An otoken's collateralAsset is the vault's `asset`\n        // So in the context of performing Opyn short operations we call them collateralAsset\n        IERC20 collateralToken = IERC20(vault.collateralAssets[0]);\n\n        // The short position has been previously closed, or all the otokens have been burned.\n        // So we return early.\n        if (address(collateralToken) == address(0)) {\n            return 0;\n        }\n\n        // This is equivalent to doing IERC20(vault.asset).balanceOf(address(this))\n        uint256 startCollateralBalance =\n            collateralToken.balanceOf(address(this));\n\n        // If it is after expiry, we need to settle the short position using the normal way\n        // Delete the vault and withdraw all remaining collateral from the vault\n        IController.ActionArgs[] memory actions =\n            new IController.ActionArgs[](1);\n\n        actions[0] = IController.ActionArgs(\n            IController.ActionType.SettleVault,\n            address(this), // owner\n            address(this), // address to transfer to\n            address(0), // not used\n            vaultID, // vaultId\n            0, // not used\n            0, // not used\n            \"\" // not used\n        );\n\n        controller.operate(actions);\n\n        uint256 endCollateralBalance = collateralToken.balanceOf(address(this));\n\n        return endCollateralBalance.sub(startCollateralBalance);\n    }\n\n    /**\n     * @notice Exercises the ITM option using existing long otoken position. Currently this implementation is simple.\n     * It calls the `Redeem` action to claim the payout.\n     * @param gammaController is the address of the opyn controller contract\n     * @param oldOption is the address of the old option\n     * @param asset is the address of the vault's asset\n     * @return amount of asset received by exercising the option\n     */\n    function settleLong(\n        address gammaController,\n        address oldOption,\n        address asset\n    ) external returns (uint256) {\n        IController controller = IController(gammaController);\n\n        uint256 oldOptionBalance = IERC20(oldOption).balanceOf(address(this));\n\n        if (controller.getPayout(oldOption, oldOptionBalance) == 0) {\n            return 0;\n        }\n\n        uint256 startAssetBalance = IERC20(asset).balanceOf(address(this));\n\n        // If it is after expiry, we need to redeem the profits\n        IController.ActionArgs[] memory actions =\n            new IController.ActionArgs[](1);\n\n        actions[0] = IController.ActionArgs(\n            IController.ActionType.Redeem,\n            address(0), // not used\n            address(this), // address to send profits to\n            oldOption, // address of otoken\n            0, // not used\n            oldOptionBalance, // otoken balance\n            0, // not used\n            \"\" // not used\n        );\n\n        controller.operate(actions);\n\n        uint256 endAssetBalance = IERC20(asset).balanceOf(address(this));\n\n        return endAssetBalance.sub(startAssetBalance);\n    }\n\n    /**\n     * @notice Burn the remaining oTokens left over from auction. Currently this implementation is simple.\n     * It burns oTokens from the most recent vault opened by the contract. This assumes that the contract will\n     * only have a single vault open at any given time.\n     * @param gammaController is the address of the opyn controller contract\n     * @param currentOption is the address of the current option\n     * @return amount of collateral redeemed by burning otokens\n     */\n    function burnOtokens(address gammaController, address currentOption)\n        external\n        returns (uint256)\n    {\n        uint256 numOTokensToBurn =\n            IERC20(currentOption).balanceOf(address(this));\n\n        require(numOTokensToBurn > 0, \"No oTokens to burn\");\n\n        IController controller = IController(gammaController);\n\n        // gets the currently active vault ID\n        uint256 vaultID = controller.getAccountVaultCounter(address(this));\n\n        GammaTypes.Vault memory vault =\n            controller.getVault(address(this), vaultID);\n\n        require(vault.shortOtokens.length > 0, \"No short\");\n\n        IERC20 collateralToken = IERC20(vault.collateralAssets[0]);\n\n        uint256 startCollateralBalance =\n            collateralToken.balanceOf(address(this));\n\n        // Burning `amount` of oTokens from the ribbon vault,\n        // then withdrawing the corresponding collateral amount from the vault\n        IController.ActionArgs[] memory actions =\n            new IController.ActionArgs[](2);\n\n        actions[0] = IController.ActionArgs(\n            IController.ActionType.BurnShortOption,\n            address(this), // owner\n            address(this), // address to transfer from\n            address(vault.shortOtokens[0]), // otoken address\n            vaultID, // vaultId\n            numOTokensToBurn, // amount\n            0, //index\n            \"\" //data\n        );\n\n        actions[1] = IController.ActionArgs(\n            IController.ActionType.WithdrawCollateral,\n            address(this), // owner\n            address(this), // address to transfer to\n            address(collateralToken), // withdrawn asset\n            vaultID, // vaultId\n            vault.collateralAmounts[0].mul(numOTokensToBurn).div(\n                vault.shortAmounts[0]\n            ), // amount\n            0, //index\n            \"\" //data\n        );\n\n        controller.operate(actions);\n\n        uint256 endCollateralBalance = collateralToken.balanceOf(address(this));\n\n        return endCollateralBalance.sub(startCollateralBalance);\n    }\n\n    /**\n     * @notice Calculates the performance and management fee for this week's round\n     * @param currentBalance is the balance of funds held on the vault after closing short\n     * @param lastLockedAmount is the amount of funds locked from the previous round\n     * @param pendingAmount is the pending deposit amount\n     * @param performanceFeePercent is the performance fee pct.\n     * @param managementFeePercent is the management fee pct.\n     * @return performanceFeeInAsset is the performance fee\n     * @return managementFeeInAsset is the management fee\n     * @return vaultFee is the total fees\n     */\n    function getVaultFees(\n        uint256 currentBalance,\n        uint256 lastLockedAmount,\n        uint256 pendingAmount,\n        uint256 performanceFeePercent,\n        uint256 managementFeePercent\n    )\n        internal\n        pure\n        returns (\n            uint256 performanceFeeInAsset,\n            uint256 managementFeeInAsset,\n            uint256 vaultFee\n        )\n    {\n        // At the first round, currentBalance=0, pendingAmount>0\n        // so we just do not charge anything on the first round\n        uint256 lockedBalanceSansPending =\n            currentBalance > pendingAmount\n                ? currentBalance.sub(pendingAmount)\n                : 0;\n\n        uint256 _performanceFeeInAsset;\n        uint256 _managementFeeInAsset;\n        uint256 _vaultFee;\n\n        // Take performance fee and management fee ONLY if difference between\n        // last week and this week's vault deposits, taking into account pending\n        // deposits and withdrawals, is positive. If it is negative, last week's\n        // option expired ITM past breakeven, and the vault took a loss so we\n        // do not collect performance fee for last week\n        if (lockedBalanceSansPending > lastLockedAmount) {\n            _performanceFeeInAsset = performanceFeePercent > 0\n                ? lockedBalanceSansPending\n                    .sub(lastLockedAmount)\n                    .mul(performanceFeePercent)\n                    .div(100 * Vault.FEE_MULTIPLIER)\n                : 0;\n            _managementFeeInAsset = managementFeePercent > 0\n                ? lockedBalanceSansPending.mul(managementFeePercent).div(\n                    100 * Vault.FEE_MULTIPLIER\n                )\n                : 0;\n\n            _vaultFee = _performanceFeeInAsset.add(_managementFeeInAsset);\n        }\n\n        return (_performanceFeeInAsset, _managementFeeInAsset, _vaultFee);\n    }\n\n    /**\n     * @notice Either retrieves the option token if it already exists, or deploy it\n     * @param commitParams is the struct with details on previous option and strike selection details\n     * @param vaultParams is the struct with vault general data\n     * @param underlying is the address of the underlying asset of the option\n     * @param strikePrice is the strike price of the option\n     * @param expiry is the expiry timestamp of the option\n     * @param isPut is whether the option is a put\n     * @return the address of the option\n     */\n    function getOrDeployOtoken(\n        CommitParams calldata commitParams,\n        Vault.VaultParams storage vaultParams,\n        address underlying,\n        uint256 strikePrice,\n        uint256 expiry,\n        bool isPut\n    ) internal returns (address) {\n        IOtokenFactory factory = IOtokenFactory(commitParams.OTOKEN_FACTORY);\n\n        address otokenFromFactory =\n            factory.getOtoken(\n                underlying,\n                commitParams.USDC,\n                commitParams.collateralAsset,\n                strikePrice,\n                expiry,\n                isPut\n            );\n\n        if (otokenFromFactory != address(0)) {\n            return otokenFromFactory;\n        }\n\n        address otoken =\n            factory.createOtoken(\n                underlying,\n                commitParams.USDC,\n                commitParams.collateralAsset,\n                strikePrice,\n                expiry,\n                isPut\n            );\n\n        verifyOtoken(\n            otoken,\n            vaultParams,\n            commitParams.collateralAsset,\n            commitParams.USDC,\n            commitParams.delay\n        );\n\n        return otoken;\n    }\n\n    /**\n     * @notice Creates an offer in the Swap Contract\n     * @param currentOtoken is the current otoken address\n     * @param currOtokenPremium is premium for each otoken\n     * @param swapContract the address of the swap contract\n     * @param vaultParams is the struct with vault general data\n     * @return optionAuctionID auction id of the newly created offer\n     */\n    function createOffer(\n        address currentOtoken,\n        uint256 currOtokenPremium,\n        address swapContract,\n        Vault.VaultParams storage vaultParams\n    ) external returns (uint256 optionAuctionID) {\n        require(\n            currOtokenPremium <= type(uint96).max,\n            \"currentOtokenPremium > type(uint96) max value!\"\n        );\n        require(currOtokenPremium > 0, \"!currentOtokenPremium\");\n\n        uint256 oTokenBalance = IERC20(currentOtoken).balanceOf(address(this));\n        require(\n            oTokenBalance <= type(uint128).max,\n            \"oTokenBalance > type(uint128) max value!\"\n        );\n\n        // Use safeIncrease instead of safeApproval because safeApproval is only used for initial\n        // approval and cannot be called again. Using safeIncrease allow us to call _createOffer\n        // even when we are approving the same oTokens we have used before. This might happen if\n        // we accidentally burn the oTokens before settlement.\n        uint256 allowance =\n            IERC20(currentOtoken).allowance(address(this), swapContract);\n\n        if (allowance < oTokenBalance) {\n            IERC20(currentOtoken).safeIncreaseAllowance(\n                swapContract,\n                oTokenBalance.sub(allowance)\n            );\n        }\n\n        uint256 decimals = vaultParams.decimals;\n\n        // If total size is larger than 1, set minimum bid as 1\n        // Otherwise, set minimum bid to one tenth the total size\n        uint256 minBidSize =\n            oTokenBalance > 10**decimals ? 10**decimals : oTokenBalance.div(10);\n\n        require(\n            minBidSize <= type(uint96).max,\n            \"minBidSize > type(uint96) max value!\"\n        );\n\n        currOtokenPremium = decimals > 18\n            ? currOtokenPremium.mul(10**(decimals.sub(18)))\n            : currOtokenPremium.div(10**(uint256(18).sub(decimals)));\n\n        optionAuctionID = ISwap(swapContract).createOffer(\n            currentOtoken,\n            vaultParams.asset,\n            uint96(currOtokenPremium),\n            uint96(minBidSize),\n            uint128(oTokenBalance)\n        );\n    }\n\n    /**\n     * @notice Allocates the vault's minted options to the OptionsPurchaseQueue contract\n     * @dev Skipped if the optionsPurchaseQueue doesn't exist\n     * @param optionsPurchaseQueue is the OptionsPurchaseQueue contract\n     * @param option is the minted option\n     * @param optionsAmount is the amount of options minted\n     * @param optionAllocation is the maximum % of options to allocate towards the purchase queue (will only allocate\n     *  up to the amount that is on the queue)\n     * @return allocatedOptions is the amount of options that ended up getting allocated to the OptionsPurchaseQueue\n     */\n    function allocateOptions(\n        address optionsPurchaseQueue,\n        address option,\n        uint256 optionsAmount,\n        uint256 optionAllocation\n    ) external returns (uint256 allocatedOptions) {\n        // Skip if optionsPurchaseQueue is address(0)\n        if (optionsPurchaseQueue != address(0)) {\n            allocatedOptions = optionsAmount.mul(optionAllocation).div(\n                100 * Vault.OPTION_ALLOCATION_MULTIPLIER\n            );\n            allocatedOptions = IOptionsPurchaseQueue(optionsPurchaseQueue)\n                .getOptionsAllocation(address(this), allocatedOptions);\n\n            if (allocatedOptions != 0) {\n                IERC20(option).approve(optionsPurchaseQueue, allocatedOptions);\n                IOptionsPurchaseQueue(optionsPurchaseQueue).allocateOptions(\n                    allocatedOptions\n                );\n            }\n        }\n\n        return allocatedOptions;\n    }\n\n    /**\n     * @notice Sell the allocated options to the purchase queue post auction settlement\n     * @dev Reverts if the auction hasn't settled yet\n     * @param optionsPurchaseQueue is the OptionsPurchaseQueue contract\n     * @param swapContract The address of the swap settlement contract\n     * @return totalPremiums Total premiums earnt by the vault\n     */\n    function sellOptionsToQueue(\n        address optionsPurchaseQueue,\n        address swapContract,\n        uint256 optionAuctionID\n    ) external returns (uint256) {\n        uint256 settlementPrice =\n            getAuctionSettlementPrice(swapContract, optionAuctionID);\n        require(settlementPrice != 0, \"!settlementPrice\");\n\n        return\n            IOptionsPurchaseQueue(optionsPurchaseQueue).sellToBuyers(\n                settlementPrice\n            );\n    }\n\n    /**\n     * @notice Gets the settlement price of a settled auction\n     * @param swapContract The address of the swap settlement contract\n     * @param optionAuctionID is the offer ID\n     * @return settlementPrice Auction settlement price\n     */\n    function getAuctionSettlementPrice(\n        address swapContract,\n        uint256 optionAuctionID\n    ) public view returns (uint256) {\n        return ISwap(swapContract).averagePriceForOffer(optionAuctionID);\n    }\n\n    /**\n     * @notice Verify the constructor params satisfy requirements\n     * @param owner is the owner of the vault with critical permissions\n     * @param feeRecipient is the address to recieve vault performance and management fees\n     * @param performanceFee is the perfomance fee pct.\n     * @param tokenName is the name of the token\n     * @param tokenSymbol is the symbol of the token\n     * @param _vaultParams is the struct with vault general data\n     */\n    function verifyInitializerParams(\n        address owner,\n        address keeper,\n        address feeRecipient,\n        uint256 performanceFee,\n        uint256 managementFee,\n        string calldata tokenName,\n        string calldata tokenSymbol,\n        Vault.VaultParams calldata _vaultParams\n    ) external pure {\n        require(owner != address(0), \"!owner\");\n        require(keeper != address(0), \"!keeper\");\n        require(feeRecipient != address(0), \"!feeRecipient\");\n        require(\n            performanceFee < 100 * Vault.FEE_MULTIPLIER,\n            \"performanceFee >= 100%\"\n        );\n        require(\n            managementFee < 100 * Vault.FEE_MULTIPLIER,\n            \"managementFee >= 100%\"\n        );\n        require(bytes(tokenName).length > 0, \"!tokenName\");\n        require(bytes(tokenSymbol).length > 0, \"!tokenSymbol\");\n\n        require(_vaultParams.asset != address(0), \"!asset\");\n        require(_vaultParams.underlying != address(0), \"!underlying\");\n        require(_vaultParams.minimumSupply > 0, \"!minimumSupply\");\n        require(_vaultParams.cap > 0, \"!cap\");\n        require(\n            _vaultParams.cap > _vaultParams.minimumSupply,\n            \"cap has to be higher than minimumSupply\"\n        );\n    }\n\n    /**\n     * @notice Gets the next option expiry timestamp\n     * @param currentOption is the otoken address that the vault is currently writing\n     */\n    function getNextExpiry(address currentOption)\n        internal\n        view\n        returns (uint256)\n    {\n        // uninitialized state\n        if (currentOption == address(0)) {\n            return getNextFriday(block.timestamp);\n        }\n        uint256 currentExpiry = IOtoken(currentOption).expiryTimestamp();\n\n        // After options expiry if no options are written for >1 week\n        // We need to give the ability continue writing options\n        if (block.timestamp > currentExpiry + 7 days) {\n            return getNextFriday(block.timestamp);\n        }\n        return getNextFriday(currentExpiry);\n    }\n\n    /**\n     * @notice Gets the next options expiry timestamp\n     * @param timestamp is the expiry timestamp of the current option\n     * Reference: https://codereview.stackexchange.com/a/33532\n     * Examples:\n     * getNextFriday(week 1 thursday) -> week 1 friday\n     * getNextFriday(week 1 friday) -> week 2 friday\n     * getNextFriday(week 1 saturday) -> week 2 friday\n     */\n    function getNextFriday(uint256 timestamp) internal pure returns (uint256) {\n        // dayOfWeek = 0 (sunday) - 6 (saturday)\n        uint256 dayOfWeek = ((timestamp / 1 days) + 4) % 7;\n        uint256 nextFriday = timestamp + ((7 + 5 - dayOfWeek) % 7) * 1 days;\n        uint256 friday8am = nextFriday - (nextFriday % (24 hours)) + (8 hours);\n\n        // If the passed timestamp is day=Friday hour>8am, we simply increment it by a week to next Friday\n        if (timestamp >= friday8am) {\n            friday8am += 7 days;\n        }\n        return friday8am;\n    }\n}\n"},"@openzeppelin/contracts/utils/math/SafeMath.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n// CAUTION\n// This version of SafeMath should only be used with Solidity 0.8 or later,\n// because it relies on the compiler's built in overflow checks.\n\n/**\n * @dev Wrappers over Solidity's arithmetic operations.\n *\n * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler\n * now has built in overflow checking.\n */\nlibrary SafeMath {\n    /**\n     * @dev Returns the addition of two unsigned integers, with an overflow flag.\n     *\n     * _Available since v3.4._\n     */\n    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n        unchecked {\n            uint256 c = a + b;\n            if (c < a) return (false, 0);\n            return (true, c);\n        }\n    }\n\n    /**\n     * @dev Returns the substraction of two unsigned integers, with an overflow flag.\n     *\n     * _Available since v3.4._\n     */\n    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n        unchecked {\n            if (b > a) return (false, 0);\n            return (true, a - b);\n        }\n    }\n\n    /**\n     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\n     *\n     * _Available since v3.4._\n     */\n    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n        unchecked {\n            // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\n            // benefit is lost if 'b' is also tested.\n            // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\n            if (a == 0) return (true, 0);\n            uint256 c = a * b;\n            if (c / a != b) return (false, 0);\n            return (true, c);\n        }\n    }\n\n    /**\n     * @dev Returns the division of two unsigned integers, with a division by zero flag.\n     *\n     * _Available since v3.4._\n     */\n    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n        unchecked {\n            if (b == 0) return (false, 0);\n            return (true, a / b);\n        }\n    }\n\n    /**\n     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\n     *\n     * _Available since v3.4._\n     */\n    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n        unchecked {\n            if (b == 0) return (false, 0);\n            return (true, a % b);\n        }\n    }\n\n    /**\n     * @dev Returns the addition of two unsigned integers, reverting on\n     * overflow.\n     *\n     * Counterpart to Solidity's `+` operator.\n     *\n     * Requirements:\n     *\n     * - Addition cannot overflow.\n     */\n    function add(uint256 a, uint256 b) internal pure returns (uint256) {\n        return a + b;\n    }\n\n    /**\n     * @dev Returns the subtraction of two unsigned integers, reverting on\n     * overflow (when the result is negative).\n     *\n     * Counterpart to Solidity's `-` operator.\n     *\n     * Requirements:\n     *\n     * - Subtraction cannot overflow.\n     */\n    function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n        return a - b;\n    }\n\n    /**\n     * @dev Returns the multiplication of two unsigned integers, reverting on\n     * overflow.\n     *\n     * Counterpart to Solidity's `*` operator.\n     *\n     * Requirements:\n     *\n     * - Multiplication cannot overflow.\n     */\n    function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n        return a * b;\n    }\n\n    /**\n     * @dev Returns the integer division of two unsigned integers, reverting on\n     * division by zero. The result is rounded towards zero.\n     *\n     * Counterpart to Solidity's `/` operator.\n     *\n     * Requirements:\n     *\n     * - The divisor cannot be zero.\n     */\n    function div(uint256 a, uint256 b) internal pure returns (uint256) {\n        return a / b;\n    }\n\n    /**\n     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n     * reverting when dividing by zero.\n     *\n     * Counterpart to Solidity's `%` operator. This function uses a `revert`\n     * opcode (which leaves remaining gas untouched) while Solidity uses an\n     * invalid opcode to revert (consuming all remaining gas).\n     *\n     * Requirements:\n     *\n     * - The divisor cannot be zero.\n     */\n    function mod(uint256 a, uint256 b) internal pure returns (uint256) {\n        return a % b;\n    }\n\n    /**\n     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\n     * overflow (when the result is negative).\n     *\n     * CAUTION: This function is deprecated because it requires allocating memory for the error\n     * message unnecessarily. For custom revert reasons use {trySub}.\n     *\n     * Counterpart to Solidity's `-` operator.\n     *\n     * Requirements:\n     *\n     * - Subtraction cannot overflow.\n     */\n    function sub(\n        uint256 a,\n        uint256 b,\n        string memory errorMessage\n    ) internal pure returns (uint256) {\n        unchecked {\n            require(b <= a, errorMessage);\n            return a - b;\n        }\n    }\n\n    /**\n     * @dev Returns the integer division of two unsigned integers, reverting with custom message on\n     * division by zero. The result is rounded towards zero.\n     *\n     * Counterpart to Solidity's `/` operator. Note: this function uses a\n     * `revert` opcode (which leaves remaining gas untouched) while Solidity\n     * uses an invalid opcode to revert (consuming all remaining gas).\n     *\n     * Requirements:\n     *\n     * - The divisor cannot be zero.\n     */\n    function div(\n        uint256 a,\n        uint256 b,\n        string memory errorMessage\n    ) internal pure returns (uint256) {\n        unchecked {\n            require(b > 0, errorMessage);\n            return a / b;\n        }\n    }\n\n    /**\n     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n     * reverting with custom message when dividing by zero.\n     *\n     * CAUTION: This function is deprecated because it requires allocating memory for the error\n     * message unnecessarily. For custom revert reasons use {tryMod}.\n     *\n     * Counterpart to Solidity's `%` operator. This function uses a `revert`\n     * opcode (which leaves remaining gas untouched) while Solidity uses an\n     * invalid opcode to revert (consuming all remaining gas).\n     *\n     * Requirements:\n     *\n     * - The divisor cannot be zero.\n     */\n    function mod(\n        uint256 a,\n        uint256 b,\n        string memory errorMessage\n    ) internal pure returns (uint256) {\n        unchecked {\n            require(b > 0, errorMessage);\n            return a % b;\n        }\n    }\n}\n"},"contracts/libraries/SupportsNonCompliantERC20.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity =0.8.4;\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport {\n    SafeERC20\n} from \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\n\n/**\n * This library supports ERC20s that have quirks in their behavior.\n * One such ERC20 is USDT, which requires allowance to be 0 before calling approve.\n * We plan to update this library with ERC20s that display such idiosyncratic behavior.\n */\nlibrary SupportsNonCompliantERC20 {\n    address private constant USDT = 0xdAC17F958D2ee523a2206206994597C13D831ec7;\n\n    function safeApproveNonCompliant(\n        IERC20 token,\n        address spender,\n        uint256 amount\n    ) internal {\n        if (address(token) == USDT) {\n            SafeERC20.safeApprove(token, spender, 0);\n        }\n        SafeERC20.safeApprove(token, spender, amount);\n    }\n}\n"},"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20.sol\";\nimport \"../../../utils/Address.sol\";\n\n/**\n * @title SafeERC20\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\n * contract returns false). Tokens that return no value (and instead revert or\n * throw on failure) are also supported, non-reverting calls are assumed to be\n * successful.\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\n */\nlibrary SafeERC20 {\n    using Address for address;\n\n    function safeTransfer(\n        IERC20 token,\n        address to,\n        uint256 value\n    ) internal {\n        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\n    }\n\n    function safeTransferFrom(\n        IERC20 token,\n        address from,\n        address to,\n        uint256 value\n    ) internal {\n        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\n    }\n\n    /**\n     * @dev Deprecated. This function has issues similar to the ones found in\n     * {IERC20-approve}, and its usage is discouraged.\n     *\n     * Whenever possible, use {safeIncreaseAllowance} and\n     * {safeDecreaseAllowance} instead.\n     */\n    function safeApprove(\n        IERC20 token,\n        address spender,\n        uint256 value\n    ) internal {\n        // safeApprove should only be called when setting an initial allowance,\n        // or when resetting it to zero. To increase and decrease it, use\n        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\n        require(\n            (value == 0) || (token.allowance(address(this), spender) == 0),\n            \"SafeERC20: approve from non-zero to non-zero allowance\"\n        );\n        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\n    }\n\n    function safeIncreaseAllowance(\n        IERC20 token,\n        address spender,\n        uint256 value\n    ) internal {\n        uint256 newAllowance = token.allowance(address(this), spender) + value;\n        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n    }\n\n    function safeDecreaseAllowance(\n        IERC20 token,\n        address spender,\n        uint256 value\n    ) internal {\n        unchecked {\n            uint256 oldAllowance = token.allowance(address(this), spender);\n            require(oldAllowance >= value, \"SafeERC20: decreased allowance below zero\");\n            uint256 newAllowance = oldAllowance - value;\n            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n        }\n    }\n\n    /**\n     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n     * on the return value: the return value is optional (but if data is returned, it must not be false).\n     * @param token The token targeted by the call.\n     * @param data The call data (encoded using abi.encode or one of its variants).\n     */\n    function _callOptionalReturn(IERC20 token, bytes memory data) private {\n        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\n        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that\n        // the target address contains contract code and also asserts for success in the low-level call.\n\n        bytes memory returndata = address(token).functionCall(data, \"SafeERC20: low-level call failed\");\n        if (returndata.length > 0) {\n            // Return data is optional\n            require(abi.decode(returndata, (bool)), \"SafeERC20: ERC20 operation did not succeed\");\n        }\n    }\n}\n"},"contracts/vaults/BaseVaultWithSwap/base/RibbonVault.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity =0.8.4;\n\nimport {SafeMath} from \"@openzeppelin/contracts/utils/math/SafeMath.sol\";\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport {\n    SafeERC20\n} from \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\nimport {\n    ReentrancyGuardUpgradeable\n} from \"@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol\";\nimport {\n    OwnableUpgradeable\n} from \"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\";\nimport {\n    ERC20Upgradeable\n} from \"@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol\";\n\nimport {Vault} from \"../../../libraries/Vault.sol\";\nimport {\n    VaultLifecycleWithSwap\n} from \"../../../libraries/VaultLifecycleWithSwap.sol\";\nimport {ShareMath} from \"../../../libraries/ShareMath.sol\";\nimport {IWETH} from \"../../../interfaces/IWETH.sol\";\n\ncontract RibbonVault is\n    ReentrancyGuardUpgradeable,\n    OwnableUpgradeable,\n    ERC20Upgradeable\n{\n    using SafeERC20 for IERC20;\n    using SafeMath for uint256;\n    using ShareMath for Vault.DepositReceipt;\n\n    /************************************************\n     *  NON UPGRADEABLE STORAGE\n     ***********************************************/\n\n    /// @notice Stores the user's pending deposit for the round\n    mapping(address => Vault.DepositReceipt) public depositReceipts;\n\n    /// @notice On every round's close, the pricePerShare value of an rTHETA token is stored\n    /// This is used to determine the number of shares to be returned\n    /// to a user with their DepositReceipt.depositAmount\n    mapping(uint256 => uint256) public roundPricePerShare;\n\n    /// @notice Stores pending user withdrawals\n    mapping(address => Vault.Withdrawal) public withdrawals;\n\n    /// @notice Vault's parameters like cap, decimals\n    Vault.VaultParams public vaultParams;\n\n    /// @notice Vault's lifecycle state like round and locked amounts\n    Vault.VaultState public vaultState;\n\n    /// @notice Vault's state of the options sold and the timelocked option\n    Vault.OptionState public optionState;\n\n    /// @notice Fee recipient for the performance and management fees\n    address public feeRecipient;\n\n    /// @notice role in charge of weekly vault operations such as rollToNextOption and burnRemainingOTokens\n    // no access to critical vault changes\n    address public keeper;\n\n    /// @notice Performance fee charged on premiums earned in rollToNextOption. Only charged when there is no loss.\n    uint256 public performanceFee;\n\n    /// @notice Management fee charged on entire AUM in rollToNextOption. Only charged when there is no loss.\n    uint256 public managementFee;\n\n    // Gap is left to avoid storage collisions. Though RibbonVault is not upgradeable, we add this as a safety measure.\n    uint256[30] private ____gap;\n\n    // *IMPORTANT* NO NEW STORAGE VARIABLES SHOULD BE ADDED HERE\n    // This is to prevent storage collisions. All storage variables should be appended to RibbonThetaVaultStorage\n    // or RibbonDeltaVaultStorage instead. Read this documentation to learn more:\n    // https://docs.openzeppelin.com/upgrades-plugins/1.x/writing-upgradeable#modifying-your-contracts\n\n    /************************************************\n     *  IMMUTABLES & CONSTANTS\n     ***********************************************/\n\n    /// @notice WETH9 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n    address public immutable WETH;\n\n    /// @notice USDC 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\n    address public immutable USDC;\n\n    /// @notice Deprecated: 15 minute timelock between commitAndClose and rollToNexOption.\n    uint256 public constant DELAY = 0;\n\n    /// @notice 7 day period between each options sale.\n    uint256 public constant PERIOD = 7 days;\n\n    // Number of weeks per year = 52.142857 weeks * FEE_MULTIPLIER = 52142857\n    // Dividing by weeks per year requires doing num.mul(FEE_MULTIPLIER).div(WEEKS_PER_YEAR)\n    uint256 private constant WEEKS_PER_YEAR = 52142857;\n\n    // GAMMA_CONTROLLER is the top-level contract in Gamma protocol\n    // which allows users to perform multiple actions on their vaults\n    // and positions https://github.com/opynfinance/GammaProtocol/blob/master/contracts/core/Controller.sol\n    address public immutable GAMMA_CONTROLLER;\n\n    // MARGIN_POOL is Gamma protocol's collateral pool.\n    // Needed to approve collateral.safeTransferFrom for minting otokens.\n    // https://github.com/opynfinance/GammaProtocol/blob/master/contracts/core/MarginPool.sol\n    address public immutable MARGIN_POOL;\n\n    // SWAP_CONTRACT is a contract for settling bids via signed messages\n    // https://github.com/ribbon-finance/ribbon-v2/blob/master/contracts/utils/Swap.sol\n    address public immutable SWAP_CONTRACT;\n\n    /************************************************\n     *  EVENTS\n     ***********************************************/\n\n    event Deposit(address indexed account, uint256 amount, uint256 round);\n\n    event InitiateWithdraw(\n        address indexed account,\n        uint256 shares,\n        uint256 round\n    );\n\n    event Redeem(address indexed account, uint256 share, uint256 round);\n\n    event ManagementFeeSet(uint256 managementFee, uint256 newManagementFee);\n\n    event PerformanceFeeSet(uint256 performanceFee, uint256 newPerformanceFee);\n\n    event CapSet(uint256 oldCap, uint256 newCap);\n\n    event Withdraw(address indexed account, uint256 amount, uint256 shares);\n\n    event CollectVaultFees(\n        uint256 performanceFee,\n        uint256 vaultFee,\n        uint256 round,\n        address indexed feeRecipient\n    );\n\n    /************************************************\n     *  CONSTRUCTOR & INITIALIZATION\n     ***********************************************/\n\n    /**\n     * @notice Initializes the contract with immutable variables\n     * @param _weth is the Wrapped Ether contract\n     * @param _usdc is the USDC contract\n     * @param _gammaController is the contract address for opyn actions\n     * @param _marginPool is the contract address for providing collateral to opyn\n     * @param _swapContract is the contract address that facilitates bids settlement\n     */\n    constructor(\n        address _weth,\n        address _usdc,\n        address _gammaController,\n        address _marginPool,\n        address _swapContract\n    ) {\n        require(_weth != address(0), \"!_weth\");\n        require(_usdc != address(0), \"!_usdc\");\n        require(_swapContract != address(0), \"!_swapContract\");\n        require(_gammaController != address(0), \"!_gammaController\");\n        require(_marginPool != address(0), \"!_marginPool\");\n\n        WETH = _weth;\n        USDC = _usdc;\n        GAMMA_CONTROLLER = _gammaController;\n        MARGIN_POOL = _marginPool;\n        SWAP_CONTRACT = _swapContract;\n    }\n\n    /**\n     * @notice Initializes the OptionVault contract with storage variables.\n     */\n    function baseInitialize(\n        address _owner,\n        address _keeper,\n        address _feeRecipient,\n        uint256 _managementFee,\n        uint256 _performanceFee,\n        string memory _tokenName,\n        string memory _tokenSymbol,\n        Vault.VaultParams calldata _vaultParams\n    ) internal initializer {\n        VaultLifecycleWithSwap.verifyInitializerParams(\n            _owner,\n            _keeper,\n            _feeRecipient,\n            _performanceFee,\n            _managementFee,\n            _tokenName,\n            _tokenSymbol,\n            _vaultParams\n        );\n\n        __ReentrancyGuard_init();\n        __ERC20_init(_tokenName, _tokenSymbol);\n        __Ownable_init();\n        transferOwnership(_owner);\n\n        keeper = _keeper;\n\n        feeRecipient = _feeRecipient;\n        performanceFee = _performanceFee;\n        managementFee = _managementFee.mul(Vault.FEE_MULTIPLIER).div(\n            WEEKS_PER_YEAR\n        );\n        vaultParams = _vaultParams;\n\n        uint256 assetBalance =\n            IERC20(vaultParams.asset).balanceOf(address(this));\n        ShareMath.assertUint104(assetBalance);\n        vaultState.lastLockedAmount = uint104(assetBalance);\n\n        vaultState.round = 1;\n    }\n\n    /**\n     * @dev Throws if called by any account other than the keeper.\n     */\n    modifier onlyKeeper() {\n        require(msg.sender == keeper, \"!keeper\");\n        _;\n    }\n\n    /************************************************\n     *  SETTERS\n     ***********************************************/\n\n    /**\n     * @notice Sets the new keeper\n     * @param newKeeper is the address of the new keeper\n     */\n    function setNewKeeper(address newKeeper) external onlyOwner {\n        require(newKeeper != address(0), \"!newKeeper\");\n        keeper = newKeeper;\n    }\n\n    /**\n     * @notice Sets the new fee recipient\n     * @param newFeeRecipient is the address of the new fee recipient\n     */\n    function setFeeRecipient(address newFeeRecipient) external onlyOwner {\n        require(newFeeRecipient != address(0), \"!newFeeRecipient\");\n        require(newFeeRecipient != feeRecipient, \"Must be new feeRecipient\");\n        feeRecipient = newFeeRecipient;\n    }\n\n    /**\n     * @notice Sets the management fee for the vault\n     * @param newManagementFee is the management fee (6 decimals). ex: 2 * 10 ** 6 = 2%\n     */\n    function setManagementFee(uint256 newManagementFee) external onlyOwner {\n        require(\n            newManagementFee < 100 * Vault.FEE_MULTIPLIER,\n            \"Invalid management fee\"\n        );\n\n        // We are dividing annualized management fee by num weeks in a year\n        uint256 tmpManagementFee =\n            newManagementFee.mul(Vault.FEE_MULTIPLIER).div(WEEKS_PER_YEAR);\n\n        emit ManagementFeeSet(managementFee, newManagementFee);\n\n        managementFee = tmpManagementFee;\n    }\n\n    /**\n     * @notice Sets the performance fee for the vault\n     * @param newPerformanceFee is the performance fee (6 decimals). ex: 20 * 10 ** 6 = 20%\n     */\n    function setPerformanceFee(uint256 newPerformanceFee) external onlyOwner {\n        require(\n            newPerformanceFee < 100 * Vault.FEE_MULTIPLIER,\n            \"Invalid performance fee\"\n        );\n\n        emit PerformanceFeeSet(performanceFee, newPerformanceFee);\n\n        performanceFee = newPerformanceFee;\n    }\n\n    /**\n     * @notice Sets a new cap for deposits\n     * @param newCap is the new cap for deposits\n     */\n    function setCap(uint256 newCap) external onlyOwner {\n        require(newCap > 0, \"!newCap\");\n        ShareMath.assertUint104(newCap);\n        emit CapSet(vaultParams.cap, newCap);\n        vaultParams.cap = uint104(newCap);\n    }\n\n    /************************************************\n     *  DEPOSIT & WITHDRAWALS\n     ***********************************************/\n\n    /**\n     * @notice Deposits ETH into the contract and mint vault shares. Reverts if the asset is not WETH.\n     */\n    function depositETH() external payable nonReentrant {\n        require(vaultParams.asset == WETH, \"!WETH\");\n        require(msg.value > 0, \"!value\");\n\n        _depositFor(msg.value, msg.sender);\n\n        IWETH(WETH).deposit{value: msg.value}();\n    }\n\n    /**\n     * @notice Deposits the `asset` from msg.sender.\n     * @param amount is the amount of `asset` to deposit\n     */\n    function deposit(uint256 amount) external nonReentrant {\n        require(amount > 0, \"!amount\");\n\n        _depositFor(amount, msg.sender);\n\n        // An approve() by the msg.sender is required beforehand\n        IERC20(vaultParams.asset).safeTransferFrom(\n            msg.sender,\n            address(this),\n            amount\n        );\n    }\n\n    /**\n     * @notice Deposits the `asset` from msg.sender added to `creditor`'s deposit.\n     * @notice Used for vault -> vault deposits on the user's behalf\n     * @param amount is the amount of `asset` to deposit\n     * @param creditor is the address that can claim/withdraw deposited amount\n     */\n    function depositFor(uint256 amount, address creditor)\n        external\n        nonReentrant\n    {\n        require(amount > 0, \"!amount\");\n        require(creditor != address(0));\n\n        _depositFor(amount, creditor);\n\n        // An approve() by the msg.sender is required beforehand\n        IERC20(vaultParams.asset).safeTransferFrom(\n            msg.sender,\n            address(this),\n            amount\n        );\n    }\n\n    /**\n     * @notice Mints the vault shares to the creditor\n     * @param amount is the amount of `asset` deposited\n     * @param creditor is the address to receieve the deposit\n     */\n    function _depositFor(uint256 amount, address creditor) private {\n        uint256 currentRound = vaultState.round;\n        uint256 totalWithDepositedAmount = totalBalance().add(amount);\n\n        require(totalWithDepositedAmount <= vaultParams.cap, \"Exceed cap\");\n        require(\n            totalWithDepositedAmount >= vaultParams.minimumSupply,\n            \"Insufficient balance\"\n        );\n\n        emit Deposit(creditor, amount, currentRound);\n\n        Vault.DepositReceipt memory depositReceipt = depositReceipts[creditor];\n\n        // If we have an unprocessed pending deposit from the previous rounds, we have to process it.\n        uint256 unredeemedShares =\n            depositReceipt.getSharesFromReceipt(\n                currentRound,\n                roundPricePerShare[depositReceipt.round],\n                vaultParams.decimals\n            );\n\n        uint256 depositAmount = amount;\n\n        // If we have a pending deposit in the current round, we add on to the pending deposit\n        if (currentRound == depositReceipt.round) {\n            uint256 newAmount = uint256(depositReceipt.amount).add(amount);\n            depositAmount = newAmount;\n        }\n\n        ShareMath.assertUint104(depositAmount);\n\n        depositReceipts[creditor] = Vault.DepositReceipt({\n            round: uint16(currentRound),\n            amount: uint104(depositAmount),\n            unredeemedShares: uint128(unredeemedShares)\n        });\n\n        uint256 newTotalPending = uint256(vaultState.totalPending).add(amount);\n        ShareMath.assertUint128(newTotalPending);\n\n        vaultState.totalPending = uint128(newTotalPending);\n    }\n\n    /**\n     * @notice Initiates a withdrawal that can be processed once the round completes\n     * @param numShares is the number of shares to withdraw\n     */\n    function _initiateWithdraw(uint256 numShares) internal {\n        require(numShares > 0, \"!numShares\");\n\n        // We do a max redeem before initiating a withdrawal\n        // But we check if they must first have unredeemed shares\n        if (\n            depositReceipts[msg.sender].amount > 0 ||\n            depositReceipts[msg.sender].unredeemedShares > 0\n        ) {\n            _redeem(0, true);\n        }\n\n        // This caches the `round` variable used in shareBalances\n        uint256 currentRound = vaultState.round;\n        Vault.Withdrawal storage withdrawal = withdrawals[msg.sender];\n\n        bool withdrawalIsSameRound = withdrawal.round == currentRound;\n\n        emit InitiateWithdraw(msg.sender, numShares, currentRound);\n\n        uint256 existingShares = uint256(withdrawal.shares);\n\n        uint256 withdrawalShares;\n        if (withdrawalIsSameRound) {\n            withdrawalShares = existingShares.add(numShares);\n        } else {\n            require(existingShares == 0, \"Existing withdraw\");\n            withdrawalShares = numShares;\n            withdrawals[msg.sender].round = uint16(currentRound);\n        }\n\n        ShareMath.assertUint128(withdrawalShares);\n        withdrawals[msg.sender].shares = uint128(withdrawalShares);\n\n        _transfer(msg.sender, address(this), numShares);\n    }\n\n    /**\n     * @notice Completes a scheduled withdrawal from a past round. Uses finalized pps for the round\n     * @return withdrawAmount the current withdrawal amount\n     */\n    function _completeWithdraw() internal returns (uint256) {\n        Vault.Withdrawal storage withdrawal = withdrawals[msg.sender];\n\n        uint256 withdrawalShares = withdrawal.shares;\n        uint256 withdrawalRound = withdrawal.round;\n\n        // This checks if there is a withdrawal\n        require(withdrawalShares > 0, \"Not initiated\");\n\n        require(withdrawalRound < vaultState.round, \"Round not closed\");\n\n        // We leave the round number as non-zero to save on gas for subsequent writes\n        withdrawals[msg.sender].shares = 0;\n        vaultState.queuedWithdrawShares = uint128(\n            uint256(vaultState.queuedWithdrawShares).sub(withdrawalShares)\n        );\n\n        uint256 withdrawAmount =\n            ShareMath.sharesToAsset(\n                withdrawalShares,\n                roundPricePerShare[withdrawalRound],\n                vaultParams.decimals\n            );\n\n        emit Withdraw(msg.sender, withdrawAmount, withdrawalShares);\n\n        _burn(address(this), withdrawalShares);\n\n        require(withdrawAmount > 0, \"!withdrawAmount\");\n        transferAsset(msg.sender, withdrawAmount);\n\n        return withdrawAmount;\n    }\n\n    /**\n     * @notice Redeems shares that are owed to the account\n     * @param numShares is the number of shares to redeem\n     */\n    function redeem(uint256 numShares) external nonReentrant {\n        require(numShares > 0, \"!numShares\");\n        _redeem(numShares, false);\n    }\n\n    /**\n     * @notice Redeems the entire unredeemedShares balance that is owed to the account\n     */\n    function maxRedeem() external nonReentrant {\n        _redeem(0, true);\n    }\n\n    /**\n     * @notice Redeems shares that are owed to the account\n     * @param numShares is the number of shares to redeem, could be 0 when isMax=true\n     * @param isMax is flag for when callers do a max redemption\n     */\n    function _redeem(uint256 numShares, bool isMax) internal {\n        Vault.DepositReceipt memory depositReceipt =\n            depositReceipts[msg.sender];\n\n        // This handles the null case when depositReceipt.round = 0\n        // Because we start with round = 1 at `initialize`\n        uint256 currentRound = vaultState.round;\n\n        uint256 unredeemedShares =\n            depositReceipt.getSharesFromReceipt(\n                currentRound,\n                roundPricePerShare[depositReceipt.round],\n                vaultParams.decimals\n            );\n\n        numShares = isMax ? unredeemedShares : numShares;\n        if (numShares == 0) {\n            return;\n        }\n        require(numShares <= unredeemedShares, \"Exceeds available\");\n\n        // If we have a depositReceipt on the same round, BUT we have some unredeemed shares\n        // we debit from the unredeemedShares, but leave the amount field intact\n        // If the round has past, with no new deposits, we just zero it out for new deposits.\n        if (depositReceipt.round < currentRound) {\n            depositReceipts[msg.sender].amount = 0;\n        }\n\n        ShareMath.assertUint128(numShares);\n        depositReceipts[msg.sender].unredeemedShares = uint128(\n            unredeemedShares.sub(numShares)\n        );\n\n        emit Redeem(msg.sender, numShares, depositReceipt.round);\n\n        _transfer(address(this), msg.sender, numShares);\n    }\n\n    /************************************************\n     *  VAULT OPERATIONS\n     ***********************************************/\n\n    /**\n     * @notice Helper function that helps to save gas for writing values into the roundPricePerShare map.\n     *         Writing `1` into the map makes subsequent writes warm, reducing the gas from 20k to 5k.\n     *         Having 1 initialized beforehand will not be an issue as long as we round down share calculations to 0.\n     * @param numRounds is the number of rounds to initialize in the map\n     */\n    function initRounds(uint256 numRounds) external nonReentrant {\n        require(numRounds > 0, \"!numRounds\");\n\n        uint256 _round = vaultState.round;\n        for (uint256 i = 0; i < numRounds; i++) {\n            uint256 index = _round + i;\n            require(roundPricePerShare[index] == 0, \"Initialized\"); // AVOID OVERWRITING ACTUAL VALUES\n            roundPricePerShare[index] = ShareMath.PLACEHOLDER_UINT;\n        }\n    }\n\n    /**\n     * @notice Helper function that performs most administrative tasks\n     * such as minting new shares, getting vault fees, etc.\n     * @param lastQueuedWithdrawAmount is old queued withdraw amount\n     * @param currentQueuedWithdrawShares is the queued withdraw shares for the current round\n     * @return lockedBalance is the new balance used to calculate next option purchase size or collateral size\n     * @return queuedWithdrawAmount is the new queued withdraw amount for this round\n     */\n    function _closeRound(\n        uint256 lastQueuedWithdrawAmount,\n        uint256 currentQueuedWithdrawShares\n    ) internal returns (uint256 lockedBalance, uint256 queuedWithdrawAmount) {\n        address recipient = feeRecipient;\n        uint256 mintShares;\n        uint256 performanceFeeInAsset;\n        uint256 totalVaultFee;\n        {\n            uint256 newPricePerShare;\n            (\n                lockedBalance,\n                queuedWithdrawAmount,\n                newPricePerShare,\n                mintShares,\n                performanceFeeInAsset,\n                totalVaultFee\n            ) = VaultLifecycleWithSwap.closeRound(\n                vaultState,\n                VaultLifecycleWithSwap.CloseParams(\n                    vaultParams.decimals,\n                    IERC20(vaultParams.asset).balanceOf(address(this)),\n                    totalSupply(),\n                    lastQueuedWithdrawAmount,\n                    performanceFee,\n                    managementFee,\n                    currentQueuedWithdrawShares\n                )\n            );\n\n            // Finalize the pricePerShare at the end of the round\n            uint256 currentRound = vaultState.round;\n            roundPricePerShare[currentRound] = newPricePerShare;\n\n            emit CollectVaultFees(\n                performanceFeeInAsset,\n                totalVaultFee,\n                currentRound,\n                recipient\n            );\n\n            vaultState.totalPending = 0;\n            vaultState.round = uint16(currentRound + 1);\n        }\n\n        _mint(address(this), mintShares);\n\n        if (totalVaultFee > 0) {\n            transferAsset(payable(recipient), totalVaultFee);\n        }\n\n        return (lockedBalance, queuedWithdrawAmount);\n    }\n\n    /**\n     * @notice Helper function to make either an ETH transfer or ERC20 transfer\n     * @param recipient is the receiving address\n     * @param amount is the transfer amount\n     */\n    function transferAsset(address recipient, uint256 amount) internal {\n        address asset = vaultParams.asset;\n        if (asset == WETH) {\n            IWETH(WETH).withdraw(amount);\n            (bool success, ) = recipient.call{value: amount}(\"\");\n            require(success, \"Transfer failed\");\n            return;\n        }\n        IERC20(asset).safeTransfer(recipient, amount);\n    }\n\n    /************************************************\n     *  GETTERS\n     ***********************************************/\n\n    /**\n     * @notice Returns the asset balance held on the vault for the account\n     * @param account is the address to lookup balance for\n     * @return the amount of `asset` custodied by the vault for the user\n     */\n    function accountVaultBalance(address account)\n        external\n        view\n        returns (uint256)\n    {\n        uint256 _decimals = vaultParams.decimals;\n        uint256 assetPerShare =\n            ShareMath.pricePerShare(\n                totalSupply(),\n                totalBalance(),\n                vaultState.totalPending,\n                _decimals\n            );\n        return\n            ShareMath.sharesToAsset(shares(account), assetPerShare, _decimals);\n    }\n\n    /**\n     * @notice Getter for returning the account's share balance including unredeemed shares\n     * @param account is the account to lookup share balance for\n     * @return the share balance\n     */\n    function shares(address account) public view returns (uint256) {\n        (uint256 heldByAccount, uint256 heldByVault) = shareBalances(account);\n        return heldByAccount.add(heldByVault);\n    }\n\n    /**\n     * @notice Getter for returning the account's share balance split between account and vault holdings\n     * @param account is the account to lookup share balance for\n     * @return heldByAccount is the shares held by account\n     * @return heldByVault is the shares held on the vault (unredeemedShares)\n     */\n    function shareBalances(address account)\n        public\n        view\n        returns (uint256 heldByAccount, uint256 heldByVault)\n    {\n        Vault.DepositReceipt memory depositReceipt = depositReceipts[account];\n\n        if (depositReceipt.round < ShareMath.PLACEHOLDER_UINT) {\n            return (balanceOf(account), 0);\n        }\n\n        uint256 unredeemedShares =\n            depositReceipt.getSharesFromReceipt(\n                vaultState.round,\n                roundPricePerShare[depositReceipt.round],\n                vaultParams.decimals\n            );\n\n        return (balanceOf(account), unredeemedShares);\n    }\n\n    /**\n     * @notice The price of a unit of share denominated in the `asset`\n     */\n    function pricePerShare() external view returns (uint256) {\n        return\n            ShareMath.pricePerShare(\n                totalSupply(),\n                totalBalance(),\n                vaultState.totalPending,\n                vaultParams.decimals\n            );\n    }\n\n    /**\n     * @notice Returns the vault's total balance, including the amounts locked into a short position\n     * @return total balance of the vault, including the amounts locked in third party protocols\n     */\n    function totalBalance() public view returns (uint256) {\n        // After calling closeRound, current option is set to none\n        // We also commit the lockedAmount but do not deposit into Opyn\n        // which results in double counting of asset balance and lockedAmount\n\n        return\n            optionState.currentOption != address(0)\n                ? uint256(vaultState.lockedAmount).add(\n                    IERC20(vaultParams.asset).balanceOf(address(this))\n                )\n                : IERC20(vaultParams.asset).balanceOf(address(this));\n    }\n\n    /**\n     * @notice Returns the token decimals\n     */\n    function decimals() public view override returns (uint8) {\n        return vaultParams.decimals;\n    }\n\n    function cap() external view returns (uint256) {\n        return vaultParams.cap;\n    }\n\n    function nextOptionReadyAt() external view returns (uint256) {\n        return optionState.nextOptionReadyAt;\n    }\n\n    function currentOption() external view returns (address) {\n        return optionState.currentOption;\n    }\n\n    function nextOption() external view returns (address) {\n        return optionState.nextOption;\n    }\n\n    function totalPending() external view returns (uint256) {\n        return vaultState.totalPending;\n    }\n}\n"},"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity =0.8.4;\n\nimport {SafeMath} from \"@openzeppelin/contracts/utils/math/SafeMath.sol\";\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport {\n    SafeERC20\n} from \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\n\nimport {ISwap} from \"../../interfaces/ISwap.sol\";\nimport {\n    RibbonThetaVaultStorage\n} from \"../../storage/RibbonThetaVaultStorage.sol\";\nimport {Vault} from \"../../libraries/Vault.sol\";\nimport {\n    VaultLifecycleWithSwap\n} from \"../../libraries/VaultLifecycleWithSwap.sol\";\nimport {ShareMath} from \"../../libraries/ShareMath.sol\";\nimport {ILiquidityGauge} from \"../../interfaces/ILiquidityGauge.sol\";\nimport {RibbonVault} from \"./base/RibbonVault.sol\";\nimport {IVaultPauser} from \"../../interfaces/IVaultPauser.sol\";\n\n/**\n * UPGRADEABILITY: Since we use the upgradeable proxy pattern, we must observe\n * the inheritance chain closely.\n * Any changes/appends in storage variable needs to happen in RibbonThetaVaultStorage.\n * RibbonThetaVault should not inherit from any other contract aside from RibbonVault, RibbonThetaVaultStorage\n */\ncontract RibbonThetaVaultWithSwap is RibbonVault, RibbonThetaVaultStorage {\n    using SafeERC20 for IERC20;\n    using SafeMath for uint256;\n    using ShareMath for Vault.DepositReceipt;\n\n    /************************************************\n     *  IMMUTABLES & CONSTANTS\n     ***********************************************/\n\n    /// @notice oTokenFactory is the factory contract used to spawn otokens. Used to lookup otokens.\n    address public immutable OTOKEN_FACTORY;\n\n    // The minimum duration for an option auction.\n    uint256 private constant MIN_AUCTION_DURATION = 5 minutes;\n\n    /************************************************\n     *  EVENTS\n     ***********************************************/\n\n    event OpenShort(\n        address indexed options,\n        uint256 depositAmount,\n        address indexed manager\n    );\n\n    event CloseShort(\n        address indexed options,\n        uint256 withdrawAmount,\n        address indexed manager\n    );\n\n    event NewOptionStrikeSelected(uint256 strikePrice, uint256 delta);\n\n    event AuctionDurationSet(\n        uint256 auctionDuration,\n        uint256 newAuctionDuration\n    );\n\n    event InstantWithdraw(\n        address indexed account,\n        uint256 amount,\n        uint256 round\n    );\n\n    event NewOffer(\n        uint256 swapId,\n        address seller,\n        address oToken,\n        address biddingToken,\n        uint256 minPrice,\n        uint256 minBidSize,\n        uint256 totalSize\n    );\n\n    /************************************************\n     *  STRUCTS\n     ***********************************************/\n\n    /**\n     * @notice Initialization parameters for the vault.\n     * @param _owner is the owner of the vault with critical permissions\n     * @param _feeRecipient is the address to recieve vault performance and management fees\n     * @param _managementFee is the management fee pct.\n     * @param _performanceFee is the perfomance fee pct.\n     * @param _tokenName is the name of the token\n     * @param _tokenSymbol is the symbol of the token\n     * @param _optionsPremiumPricer is the address of the contract with the\n       black-scholes premium calculation logic\n     * @param _strikeSelection is the address of the contract with strike selection logic\n     */\n    struct InitParams {\n        address _owner;\n        address _keeper;\n        address _feeRecipient;\n        uint256 _managementFee;\n        uint256 _performanceFee;\n        string _tokenName;\n        string _tokenSymbol;\n        address _optionsPremiumPricer;\n        address _strikeSelection;\n    }\n\n    /************************************************\n     *  CONSTRUCTOR & INITIALIZATION\n     ***********************************************/\n\n    /**\n     * @notice Initializes the contract with immutable variables\n     * @param _weth is the Wrapped Ether contract\n     * @param _usdc is the USDC contract\n     * @param _oTokenFactory is the contract address for minting new opyn option types (strikes, asset, expiry)\n     * @param _gammaController is the contract address for opyn actions\n     * @param _marginPool is the contract address for providing collateral to opyn\n     * @param _swapContract is the contract address that facilitates bids settlement\n     */\n    constructor(\n        address _weth,\n        address _usdc,\n        address _oTokenFactory,\n        address _gammaController,\n        address _marginPool,\n        address _swapContract\n    ) RibbonVault(_weth, _usdc, _gammaController, _marginPool, _swapContract) {\n        require(_oTokenFactory != address(0), \"!_oTokenFactory\");\n        OTOKEN_FACTORY = _oTokenFactory;\n    }\n\n    /**\n     * @notice Initializes the OptionVault contract with storage variables.\n     * @param _initParams is the struct with vault initialization parameters\n     * @param _vaultParams is the struct with vault general data\n     */\n    function initialize(\n        InitParams calldata _initParams,\n        Vault.VaultParams calldata _vaultParams\n    ) external initializer {\n        baseInitialize(\n            _initParams._owner,\n            _initParams._keeper,\n            _initParams._feeRecipient,\n            _initParams._managementFee,\n            _initParams._performanceFee,\n            _initParams._tokenName,\n            _initParams._tokenSymbol,\n            _vaultParams\n        );\n        require(\n            _initParams._optionsPremiumPricer != address(0),\n            \"!_optionsPremiumPricer\"\n        );\n        require(\n            _initParams._strikeSelection != address(0),\n            \"!_strikeSelection\"\n        );\n\n        optionsPremiumPricer = _initParams._optionsPremiumPricer;\n        strikeSelection = _initParams._strikeSelection;\n    }\n\n    /************************************************\n     *  SETTERS\n     ***********************************************/\n\n    /**\n     * @notice Sets the new strike selection contract\n     * @param newStrikeSelection is the address of the new strike selection contract\n     */\n    function setStrikeSelection(address newStrikeSelection) external onlyOwner {\n        require(newStrikeSelection != address(0), \"!newStrikeSelection\");\n        strikeSelection = newStrikeSelection;\n    }\n\n    /**\n     * @notice Sets the new options premium pricer contract\n     * @param newOptionsPremiumPricer is the address of the new strike selection contract\n     */\n    function setOptionsPremiumPricer(address newOptionsPremiumPricer)\n        external\n        onlyOwner\n    {\n        require(\n            newOptionsPremiumPricer != address(0),\n            \"!newOptionsPremiumPricer\"\n        );\n        optionsPremiumPricer = newOptionsPremiumPricer;\n    }\n\n    /**\n     * @notice Optionality to set strike price manually\n     * Should be called after closeRound if we are setting current week's strike\n     * @param strikePrice is the strike price of the new oTokens (decimals = 8)\n     */\n    function setStrikePrice(uint128 strikePrice) external onlyOwner {\n        require(strikePrice > 0, \"!strikePrice\");\n        overriddenStrikePrice = strikePrice;\n        lastStrikeOverrideRound = vaultState.round;\n    }\n\n    /**\n     * @notice Sets the new liquidityGauge contract for this vault\n     * @param newLiquidityGauge is the address of the new liquidityGauge contract\n     */\n    function setLiquidityGauge(address newLiquidityGauge) external onlyOwner {\n        liquidityGauge = newLiquidityGauge;\n    }\n\n    /**\n     * @notice Sets oToken Premium\n     * @param minPrice is the new oToken Premium in the units of 10**18\n     */\n    function setMinPrice(uint256 minPrice) external onlyKeeper {\n        require(minPrice > 0, \"!minPrice\");\n        currentOtokenPremium = minPrice;\n    }\n\n    /**\n     * @notice Sets the new Vault Pauser contract for this vault\n     * @param newVaultPauser is the address of the new vaultPauser contract\n     */\n    function setVaultPauser(address newVaultPauser) external onlyOwner {\n        vaultPauser = newVaultPauser;\n    }\n\n    /************************************************\n     *  VAULT OPERATIONS\n     ***********************************************/\n\n    /**\n     * @notice Withdraws the assets on the vault using the outstanding `DepositReceipt.amount`\n     * @param amount is the amount to withdraw\n     */\n    function withdrawInstantly(uint256 amount) external nonReentrant {\n        Vault.DepositReceipt storage depositReceipt =\n            depositReceipts[msg.sender];\n\n        uint256 currentRound = vaultState.round;\n        require(amount > 0, \"!amount\");\n        require(depositReceipt.round == currentRound, \"Invalid round\");\n\n        uint256 receiptAmount = depositReceipt.amount;\n        require(receiptAmount >= amount, \"Exceed amount\");\n\n        // Subtraction underflow checks already ensure it is smaller than uint104\n        depositReceipt.amount = uint104(receiptAmount.sub(amount));\n        vaultState.totalPending = uint128(\n            uint256(vaultState.totalPending).sub(amount)\n        );\n\n        emit InstantWithdraw(msg.sender, amount, currentRound);\n\n        transferAsset(msg.sender, amount);\n    }\n\n    /**\n     * @notice Initiates a withdrawal that can be processed once the round completes\n     * @param numShares is the number of shares to withdraw\n     */\n    function initiateWithdraw(uint256 numShares) external nonReentrant {\n        _initiateWithdraw(numShares);\n        currentQueuedWithdrawShares = currentQueuedWithdrawShares.add(\n            numShares\n        );\n    }\n\n    /**\n     * @notice Completes a scheduled withdrawal from a past round. Uses finalized pps for the round\n     */\n    function completeWithdraw() external nonReentrant {\n        uint256 withdrawAmount = _completeWithdraw();\n        lastQueuedWithdrawAmount = uint128(\n            uint256(lastQueuedWithdrawAmount).sub(withdrawAmount)\n        );\n    }\n\n    /**\n     * @notice Stakes a users vault shares\n     * @param numShares is the number of shares to stake\n     */\n    function stake(uint256 numShares) external nonReentrant {\n        address _liquidityGauge = liquidityGauge;\n        require(_liquidityGauge != address(0)); // Removed revert msgs due to contract size limit\n        require(numShares > 0);\n        uint256 heldByAccount = balanceOf(msg.sender);\n        if (heldByAccount < numShares) {\n            _redeem(numShares.sub(heldByAccount), false);\n        }\n        _transfer(msg.sender, address(this), numShares);\n        _approve(address(this), _liquidityGauge, numShares);\n        ILiquidityGauge(_liquidityGauge).deposit(numShares, msg.sender, false);\n    }\n\n    /**\n     * @notice Closes the existing short and calculate the shares to mint, new price per share &\n      amount of funds to re-allocate as collateral for the new round\n     * Since we are incrementing the round here, the options are sold in the beginning of a round\n     * instead of at the end of the round. For example, at round 1, we don't sell any options. We\n     * start selling options at the beginning of round 2.\n     */\n    function closeRound() external nonReentrant {\n        address oldOption = optionState.currentOption;\n        require(\n            oldOption != address(0) || vaultState.round == 1,\n            \"Round closed\"\n        );\n        _closeShort(oldOption);\n\n        uint256 currQueuedWithdrawShares = currentQueuedWithdrawShares;\n        (uint256 lockedBalance, uint256 queuedWithdrawAmount) =\n            _closeRound(\n                uint256(lastQueuedWithdrawAmount),\n                currQueuedWithdrawShares\n            );\n\n        lastQueuedWithdrawAmount = queuedWithdrawAmount;\n\n        uint256 newQueuedWithdrawShares =\n            uint256(vaultState.queuedWithdrawShares).add(\n                currQueuedWithdrawShares\n            );\n        ShareMath.assertUint128(newQueuedWithdrawShares);\n        vaultState.queuedWithdrawShares = uint128(newQueuedWithdrawShares);\n\n        currentQueuedWithdrawShares = 0;\n\n        ShareMath.assertUint104(lockedBalance);\n        vaultState.lockedAmount = uint104(lockedBalance);\n\n        uint256 nextOptionReady = block.timestamp.add(DELAY);\n        require(\n            nextOptionReady <= type(uint32).max,\n            \"Overflow nextOptionReady\"\n        );\n        optionState.nextOptionReadyAt = uint32(nextOptionReady);\n    }\n\n    /**\n     * @notice Closes the existing short position for the vault.\n     */\n    function _closeShort(address oldOption) private {\n        uint256 lockedAmount = vaultState.lockedAmount;\n        if (oldOption != address(0)) {\n            vaultState.lastLockedAmount = uint104(lockedAmount);\n        }\n        vaultState.lockedAmount = 0;\n\n        optionState.currentOption = address(0);\n\n        if (oldOption != address(0)) {\n            uint256 withdrawAmount =\n                VaultLifecycleWithSwap.settleShort(GAMMA_CONTROLLER);\n            emit CloseShort(oldOption, withdrawAmount, msg.sender);\n        }\n    }\n\n    /**\n     * @notice Sets the next option the vault will be shorting\n     */\n    function commitNextOption() external onlyKeeper nonReentrant {\n        address currentOption = optionState.currentOption;\n        require(\n            currentOption == address(0) && vaultState.round != 1,\n            \"Round not closed\"\n        );\n\n        VaultLifecycleWithSwap.CommitParams memory commitParams =\n            VaultLifecycleWithSwap.CommitParams({\n                OTOKEN_FACTORY: OTOKEN_FACTORY,\n                USDC: USDC,\n                collateralAsset: vaultParams.asset,\n                currentOption: currentOption,\n                delay: DELAY,\n                lastStrikeOverrideRound: lastStrikeOverrideRound,\n                overriddenStrikePrice: overriddenStrikePrice,\n                strikeSelection: strikeSelection,\n                optionsPremiumPricer: optionsPremiumPricer\n            });\n\n        (address otokenAddress, uint256 strikePrice, uint256 delta) =\n            VaultLifecycleWithSwap.commitNextOption(\n                commitParams,\n                vaultParams,\n                vaultState\n            );\n\n        emit NewOptionStrikeSelected(strikePrice, delta);\n\n        optionState.nextOption = otokenAddress;\n    }\n\n    /**\n     * @notice Rolls the vault's funds into a new short position and create a new offer.\n     */\n    function rollToNextOption() external onlyKeeper nonReentrant {\n        address newOption = optionState.nextOption;\n        require(newOption != address(0), \"!nextOption\");\n\n        optionState.currentOption = newOption;\n        optionState.nextOption = address(0);\n        uint256 lockedBalance = vaultState.lockedAmount;\n\n        emit OpenShort(newOption, lockedBalance, msg.sender);\n\n        VaultLifecycleWithSwap.createShort(\n            GAMMA_CONTROLLER,\n            MARGIN_POOL,\n            newOption,\n            lockedBalance\n        );\n\n        _createOffer();\n    }\n\n    function _createOffer() private {\n        address currentOtoken = optionState.currentOption;\n        uint256 currOtokenPremium = currentOtokenPremium;\n\n        optionAuctionID = VaultLifecycleWithSwap.createOffer(\n            currentOtoken,\n            currOtokenPremium,\n            SWAP_CONTRACT,\n            vaultParams\n        );\n    }\n\n    /**\n     * @notice Settle current offer\n     */\n    function settleOffer(ISwap.Bid[] calldata bids)\n        external\n        onlyKeeper\n        nonReentrant\n    {\n        ISwap(SWAP_CONTRACT).settleOffer(optionAuctionID, bids);\n    }\n\n    /**\n     * @notice Burn the remaining oTokens left over\n     */\n    function burnRemainingOTokens() external onlyKeeper nonReentrant {\n        VaultLifecycleWithSwap.burnOtokens(\n            GAMMA_CONTROLLER,\n            optionState.currentOption\n        );\n    }\n\n    /**\n     * @notice pause a user's vault position\n     */\n    function pausePosition() external {\n        address _vaultPauserAddress = vaultPauser;\n        require(_vaultPauserAddress != address(0)); // Removed revert msgs due to contract size limit\n        _redeem(0, true);\n        uint256 heldByAccount = balanceOf(msg.sender);\n        _approve(msg.sender, _vaultPauserAddress, heldByAccount);\n        IVaultPauser(_vaultPauserAddress).pausePosition(\n            msg.sender,\n            heldByAccount\n        );\n    }\n}\n"},"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract ContextUpgradeable is Initializable {\n    function __Context_init() internal initializer {\n        __Context_init_unchained();\n    }\n\n    function __Context_init_unchained() internal initializer {\n    }\n    function _msgSender() internal view virtual returns (address) {\n        return msg.sender;\n    }\n\n    function _msgData() internal view virtual returns (bytes calldata) {\n        return msg.data;\n    }\n    uint256[50] private __gap;\n}\n"},"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../utils/ContextUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\n    address private _owner;\n\n    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n    /**\n     * @dev Initializes the contract setting the deployer as the initial owner.\n     */\n    function __Ownable_init() internal initializer {\n        __Context_init_unchained();\n        __Ownable_init_unchained();\n    }\n\n    function __Ownable_init_unchained() internal initializer {\n        _setOwner(_msgSender());\n    }\n\n    /**\n     * @dev Returns the address of the current owner.\n     */\n    function owner() public view virtual returns (address) {\n        return _owner;\n    }\n\n    /**\n     * @dev Throws if called by any account other than the owner.\n     */\n    modifier onlyOwner() {\n        require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n        _;\n    }\n\n    /**\n     * @dev Leaves the contract without owner. It will not be possible to call\n     * `onlyOwner` functions anymore. Can only be called by the current owner.\n     *\n     * NOTE: Renouncing ownership will leave the contract without an owner,\n     * thereby removing any functionality that is only available to the owner.\n     */\n    function renounceOwnership() public virtual onlyOwner {\n        _setOwner(address(0));\n    }\n\n    /**\n     * @dev Transfers ownership of the contract to a new account (`newOwner`).\n     * Can only be called by the current owner.\n     */\n    function transferOwnership(address newOwner) public virtual onlyOwner {\n        require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n        _setOwner(newOwner);\n    }\n\n    function _setOwner(address newOwner) private {\n        address oldOwner = _owner;\n        _owner = newOwner;\n        emit OwnershipTransferred(oldOwner, newOwner);\n    }\n    uint256[49] private __gap;\n}\n"},"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\n * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\n *\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\n *\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\n */\nabstract contract Initializable {\n    /**\n     * @dev Indicates that the contract has been initialized.\n     */\n    bool private _initialized;\n\n    /**\n     * @dev Indicates that the contract is in the process of being initialized.\n     */\n    bool private _initializing;\n\n    /**\n     * @dev Modifier to protect an initializer function from being invoked twice.\n     */\n    modifier initializer() {\n        require(_initializing || !_initialized, \"Initializable: contract is already initialized\");\n\n        bool isTopLevelCall = !_initializing;\n        if (isTopLevelCall) {\n            _initializing = true;\n            _initialized = true;\n        }\n\n        _;\n\n        if (isTopLevelCall) {\n            _initializing = false;\n        }\n    }\n}\n"},"@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./IERC20Upgradeable.sol\";\nimport \"./extensions/IERC20MetadataUpgradeable.sol\";\nimport \"../../utils/ContextUpgradeable.sol\";\nimport \"../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Implementation of the {IERC20} interface.\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n * For a generic mechanism see {ERC20PresetMinterPauser}.\n *\n * TIP: For a detailed writeup see our guide\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\n *\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\n * instead returning `false` on failure. This behavior is nonetheless\n * conventional and does not conflict with the expectations of ERC20\n * applications.\n *\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\n * This allows applications to reconstruct the allowance for all accounts just\n * by listening to said events. Other implementations of the EIP may not emit\n * these events, as it isn't required by the specification.\n *\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\n * functions have been added to mitigate the well-known issues around setting\n * allowances. See {IERC20-approve}.\n */\ncontract ERC20Upgradeable is Initializable, ContextUpgradeable, IERC20Upgradeable, IERC20MetadataUpgradeable {\n    mapping(address => uint256) private _balances;\n\n    mapping(address => mapping(address => uint256)) private _allowances;\n\n    uint256 private _totalSupply;\n\n    string private _name;\n    string private _symbol;\n\n    /**\n     * @dev Sets the values for {name} and {symbol}.\n     *\n     * The default value of {decimals} is 18. To select a different value for\n     * {decimals} you should overload it.\n     *\n     * All two of these values are immutable: they can only be set once during\n     * construction.\n     */\n    function __ERC20_init(string memory name_, string memory symbol_) internal initializer {\n        __Context_init_unchained();\n        __ERC20_init_unchained(name_, symbol_);\n    }\n\n    function __ERC20_init_unchained(string memory name_, string memory symbol_) internal initializer {\n        _name = name_;\n        _symbol = symbol_;\n    }\n\n    /**\n     * @dev Returns the name of the token.\n     */\n    function name() public view virtual override returns (string memory) {\n        return _name;\n    }\n\n    /**\n     * @dev Returns the symbol of the token, usually a shorter version of the\n     * name.\n     */\n    function symbol() public view virtual override returns (string memory) {\n        return _symbol;\n    }\n\n    /**\n     * @dev Returns the number of decimals used to get its user representation.\n     * For example, if `decimals` equals `2`, a balance of `505` tokens should\n     * be displayed to a user as `5.05` (`505 / 10 ** 2`).\n     *\n     * Tokens usually opt for a value of 18, imitating the relationship between\n     * Ether and Wei. This is the value {ERC20} uses, unless this function is\n     * overridden;\n     *\n     * NOTE: This information is only used for _display_ purposes: it in\n     * no way affects any of the arithmetic of the contract, including\n     * {IERC20-balanceOf} and {IERC20-transfer}.\n     */\n    function decimals() public view virtual override returns (uint8) {\n        return 18;\n    }\n\n    /**\n     * @dev See {IERC20-totalSupply}.\n     */\n    function totalSupply() public view virtual override returns (uint256) {\n        return _totalSupply;\n    }\n\n    /**\n     * @dev See {IERC20-balanceOf}.\n     */\n    function balanceOf(address account) public view virtual override returns (uint256) {\n        return _balances[account];\n    }\n\n    /**\n     * @dev See {IERC20-transfer}.\n     *\n     * Requirements:\n     *\n     * - `recipient` cannot be the zero address.\n     * - the caller must have a balance of at least `amount`.\n     */\n    function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\n        _transfer(_msgSender(), recipient, amount);\n        return true;\n    }\n\n    /**\n     * @dev See {IERC20-allowance}.\n     */\n    function allowance(address owner, address spender) public view virtual override returns (uint256) {\n        return _allowances[owner][spender];\n    }\n\n    /**\n     * @dev See {IERC20-approve}.\n     *\n     * Requirements:\n     *\n     * - `spender` cannot be the zero address.\n     */\n    function approve(address spender, uint256 amount) public virtual override returns (bool) {\n        _approve(_msgSender(), spender, amount);\n        return true;\n    }\n\n    /**\n     * @dev See {IERC20-transferFrom}.\n     *\n     * Emits an {Approval} event indicating the updated allowance. This is not\n     * required by the EIP. See the note at the beginning of {ERC20}.\n     *\n     * Requirements:\n     *\n     * - `sender` and `recipient` cannot be the zero address.\n     * - `sender` must have a balance of at least `amount`.\n     * - the caller must have allowance for ``sender``'s tokens of at least\n     * `amount`.\n     */\n    function transferFrom(\n        address sender,\n        address recipient,\n        uint256 amount\n    ) public virtual override returns (bool) {\n        _transfer(sender, recipient, amount);\n\n        uint256 currentAllowance = _allowances[sender][_msgSender()];\n        require(currentAllowance >= amount, \"ERC20: transfer amount exceeds allowance\");\n        unchecked {\n            _approve(sender, _msgSender(), currentAllowance - amount);\n        }\n\n        return true;\n    }\n\n    /**\n     * @dev Atomically increases the allowance granted to `spender` by the caller.\n     *\n     * This is an alternative to {approve} that can be used as a mitigation for\n     * problems described in {IERC20-approve}.\n     *\n     * Emits an {Approval} event indicating the updated allowance.\n     *\n     * Requirements:\n     *\n     * - `spender` cannot be the zero address.\n     */\n    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\n        _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue);\n        return true;\n    }\n\n    /**\n     * @dev Atomically decreases the allowance granted to `spender` by the caller.\n     *\n     * This is an alternative to {approve} that can be used as a mitigation for\n     * problems described in {IERC20-approve}.\n     *\n     * Emits an {Approval} event indicating the updated allowance.\n     *\n     * Requirements:\n     *\n     * - `spender` cannot be the zero address.\n     * - `spender` must have allowance for the caller of at least\n     * `subtractedValue`.\n     */\n    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\n        uint256 currentAllowance = _allowances[_msgSender()][spender];\n        require(currentAllowance >= subtractedValue, \"ERC20: decreased allowance below zero\");\n        unchecked {\n            _approve(_msgSender(), spender, currentAllowance - subtractedValue);\n        }\n\n        return true;\n    }\n\n    /**\n     * @dev Moves `amount` of tokens from `sender` to `recipient`.\n     *\n     * This internal function is equivalent to {transfer}, and can be used to\n     * e.g. implement automatic token fees, slashing mechanisms, etc.\n     *\n     * Emits a {Transfer} event.\n     *\n     * Requirements:\n     *\n     * - `sender` cannot be the zero address.\n     * - `recipient` cannot be the zero address.\n     * - `sender` must have a balance of at least `amount`.\n     */\n    function _transfer(\n        address sender,\n        address recipient,\n        uint256 amount\n    ) internal virtual {\n        require(sender != address(0), \"ERC20: transfer from the zero address\");\n        require(recipient != address(0), \"ERC20: transfer to the zero address\");\n\n        _beforeTokenTransfer(sender, recipient, amount);\n\n        uint256 senderBalance = _balances[sender];\n        require(senderBalance >= amount, \"ERC20: transfer amount exceeds balance\");\n        unchecked {\n            _balances[sender] = senderBalance - amount;\n        }\n        _balances[recipient] += amount;\n\n        emit Transfer(sender, recipient, amount);\n\n        _afterTokenTransfer(sender, recipient, amount);\n    }\n\n    /** @dev Creates `amount` tokens and assigns them to `account`, increasing\n     * the total supply.\n     *\n     * Emits a {Transfer} event with `from` set to the zero address.\n     *\n     * Requirements:\n     *\n     * - `account` cannot be the zero address.\n     */\n    function _mint(address account, uint256 amount) internal virtual {\n        require(account != address(0), \"ERC20: mint to the zero address\");\n\n        _beforeTokenTransfer(address(0), account, amount);\n\n        _totalSupply += amount;\n        _balances[account] += amount;\n        emit Transfer(address(0), account, amount);\n\n        _afterTokenTransfer(address(0), account, amount);\n    }\n\n    /**\n     * @dev Destroys `amount` tokens from `account`, reducing the\n     * total supply.\n     *\n     * Emits a {Transfer} event with `to` set to the zero address.\n     *\n     * Requirements:\n     *\n     * - `account` cannot be the zero address.\n     * - `account` must have at least `amount` tokens.\n     */\n    function _burn(address account, uint256 amount) internal virtual {\n        require(account != address(0), \"ERC20: burn from the zero address\");\n\n        _beforeTokenTransfer(account, address(0), amount);\n\n        uint256 accountBalance = _balances[account];\n        require(accountBalance >= amount, \"ERC20: burn amount exceeds balance\");\n        unchecked {\n            _balances[account] = accountBalance - amount;\n        }\n        _totalSupply -= amount;\n\n        emit Transfer(account, address(0), amount);\n\n        _afterTokenTransfer(account, address(0), amount);\n    }\n\n    /**\n     * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\n     *\n     * This internal function is equivalent to `approve`, and can be used to\n     * e.g. set automatic allowances for certain subsystems, etc.\n     *\n     * Emits an {Approval} event.\n     *\n     * Requirements:\n     *\n     * - `owner` cannot be the zero address.\n     * - `spender` cannot be the zero address.\n     */\n    function _approve(\n        address owner,\n        address spender,\n        uint256 amount\n    ) internal virtual {\n        require(owner != address(0), \"ERC20: approve from the zero address\");\n        require(spender != address(0), \"ERC20: approve to the zero address\");\n\n        _allowances[owner][spender] = amount;\n        emit Approval(owner, spender, amount);\n    }\n\n    /**\n     * @dev Hook that is called before any transfer of tokens. This includes\n     * minting and burning.\n     *\n     * Calling conditions:\n     *\n     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n     * will be transferred to `to`.\n     * - when `from` is zero, `amount` tokens will be minted for `to`.\n     * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\n     * - `from` and `to` are never both zero.\n     *\n     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n     */\n    function _beforeTokenTransfer(\n        address from,\n        address to,\n        uint256 amount\n    ) internal virtual {}\n\n    /**\n     * @dev Hook that is called after any transfer of tokens. This includes\n     * minting and burning.\n     *\n     * Calling conditions:\n     *\n     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n     * has been transferred to `to`.\n     * - when `from` is zero, `amount` tokens have been minted for `to`.\n     * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\n     * - `from` and `to` are never both zero.\n     *\n     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n     */\n    function _afterTokenTransfer(\n        address from,\n        address to,\n        uint256 amount\n    ) internal virtual {}\n    uint256[45] private __gap;\n}\n"},"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20Upgradeable {\n    /**\n     * @dev Returns the amount of tokens in existence.\n     */\n    function totalSupply() external view returns (uint256);\n\n    /**\n     * @dev Returns the amount of tokens owned by `account`.\n     */\n    function balanceOf(address account) external view returns (uint256);\n\n    /**\n     * @dev Moves `amount` tokens from the caller's account to `recipient`.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transfer(address recipient, uint256 amount) external returns (bool);\n\n    /**\n     * @dev Returns the remaining number of tokens that `spender` will be\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\n     * zero by default.\n     *\n     * This value changes when {approve} or {transferFrom} are called.\n     */\n    function allowance(address owner, address spender) external view returns (uint256);\n\n    /**\n     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\n     * that someone may use both the old and the new allowance by unfortunate\n     * transaction ordering. One possible solution to mitigate this race\n     * condition is to first reduce the spender's allowance to 0 and set the\n     * desired value afterwards:\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n     *\n     * Emits an {Approval} event.\n     */\n    function approve(address spender, uint256 amount) external returns (bool);\n\n    /**\n     * @dev Moves `amount` tokens from `sender` to `recipient` using the\n     * allowance mechanism. `amount` is then deducted from the caller's\n     * allowance.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transferFrom(\n        address sender,\n        address recipient,\n        uint256 amount\n    ) external returns (bool);\n\n    /**\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\n     * another (`to`).\n     *\n     * Note that `value` may be zero.\n     */\n    event Transfer(address indexed from, address indexed to, uint256 value);\n\n    /**\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n     * a call to {approve}. `value` is the new allowance.\n     */\n    event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n"},"@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module that helps prevent reentrant calls to a function.\n *\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\n * available, which can be applied to functions to make sure there are no nested\n * (reentrant) calls to them.\n *\n * Note that because there is a single `nonReentrant` guard, functions marked as\n * `nonReentrant` may not call one another. This can be worked around by making\n * those functions `private`, and then adding `external` `nonReentrant` entry\n * points to them.\n *\n * TIP: If you would like to learn more about reentrancy and alternative ways\n * to protect against it, check out our blog post\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\n */\nabstract contract ReentrancyGuardUpgradeable is Initializable {\n    // Booleans are more expensive than uint256 or any type that takes up a full\n    // word because each write operation emits an extra SLOAD to first read the\n    // slot's contents, replace the bits taken up by the boolean, and then write\n    // back. This is the compiler's defense against contract upgrades and\n    // pointer aliasing, and it cannot be disabled.\n\n    // The values being non-zero value makes deployment a bit more expensive,\n    // but in exchange the refund on every call to nonReentrant will be lower in\n    // amount. Since refunds are capped to a percentage of the total\n    // transaction's gas, it is best to keep them low in cases like this one, to\n    // increase the likelihood of the full refund coming into effect.\n    uint256 private constant _NOT_ENTERED = 1;\n    uint256 private constant _ENTERED = 2;\n\n    uint256 private _status;\n\n    function __ReentrancyGuard_init() internal initializer {\n        __ReentrancyGuard_init_unchained();\n    }\n\n    function __ReentrancyGuard_init_unchained() internal initializer {\n        _status = _NOT_ENTERED;\n    }\n\n    /**\n     * @dev Prevents a contract from calling itself, directly or indirectly.\n     * Calling a `nonReentrant` function from another `nonReentrant`\n     * function is not supported. It is possible to prevent this from happening\n     * by making the `nonReentrant` function external, and make it call a\n     * `private` function that does the actual work.\n     */\n    modifier nonReentrant() {\n        // On the first call to nonReentrant, _notEntered will be true\n        require(_status != _ENTERED, \"ReentrancyGuard: reentrant call\");\n\n        // Any calls to nonReentrant after this point will fail\n        _status = _ENTERED;\n\n        _;\n\n        // By storing the original value once again, a refund is triggered (see\n        // https://eips.ethereum.org/EIPS/eip-2200)\n        _status = _NOT_ENTERED;\n    }\n    uint256[49] private __gap;\n}\n"},"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20MetadataUpgradeable.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20Upgradeable.sol\";\n\n/**\n * @dev Interface for the optional metadata functions from the ERC20 standard.\n *\n * _Available since v4.1._\n */\ninterface IERC20MetadataUpgradeable is IERC20Upgradeable {\n    /**\n     * @dev Returns the name of the token.\n     */\n    function name() external view returns (string memory);\n\n    /**\n     * @dev Returns the symbol of the token.\n     */\n    function symbol() external view returns (string memory);\n\n    /**\n     * @dev Returns the decimals places of the token.\n     */\n    function decimals() external view returns (uint8);\n}\n"}},"language":"Solidity","settings":{"metadata":{"useLiteralContent":true},"libraries":{"contracts/libraries/VaultLifecycleWithSwap.sol":{"VaultLifecycleWithSwap":"0xf7f4260943db50eee7e917330c35b460ff70ad54"}},"optimizer":{"runs":200,"enabled":true}}},"stdJsonOutput":{"sources":{"contracts/vendor/DSMath.sol":{"id":29},"contracts/libraries/Vault.sol":{"id":24},"contracts/interfaces/ISwap.sol":{"id":18},"contracts/interfaces/IWETH.sol":{"id":20},"contracts/interfaces/IRibbon.sol":{"id":16},"contracts/libraries/ShareMath.sol":{"id":22},"contracts/interfaces/IVaultPauser.sol":{"id":19},"contracts/libraries/GnosisAuction.sol":{"id":21},"contracts/interfaces/GammaInterface.sol":{"id":11},"contracts/interfaces/IERC20Detailed.sol":{"id":12},"contracts/interfaces/IGnosisAuction.sol":{"id":13},"contracts/interfaces/ILiquidityGauge.sol":{"id":14},"@openzeppelin/contracts/utils/Address.sol":{"id":9},"contracts/interfaces/IRibbonThetaVault.sol":{"id":17},"contracts/storage/RibbonThetaVaultStorage.sol":{"id":26},"@openzeppelin/contracts/token/ERC20/IERC20.sol":{"id":7},"contracts/interfaces/IOptionsPurchaseQueue.sol":{"id":15},"contracts/libraries/VaultLifecycleWithSwap.sol":{"id":25},"@openzeppelin/contracts/utils/math/SafeMath.sol":{"id":10},"contracts/libraries/SupportsNonCompliantERC20.sol":{"id":23},"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol":{"id":8},"contracts/vaults/BaseVaultWithSwap/base/RibbonVault.sol":{"id":28},"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol":{"id":27},"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol":{"id":6},"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol":{"id":0},"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol":{"id":1},"@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol":{"id":3},"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol":{"id":4},"@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol":{"id":2},"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20MetadataUpgradeable.sol":{"id":5}},"contracts":{"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol":{"RibbonThetaVaultWithSwap":{"abi":[{"type":"constructor","inputs":[{"name":"_weth","type":"address","internalType":"address"},{"name":"_usdc","type":"address","internalType":"address"},{"name":"_oTokenFactory","type":"address","internalType":"address"},{"name":"_gammaController","type":"address","internalType":"address"},{"name":"_marginPool","type":"address","internalType":"address"},{"name":"_swapContract","type":"address","internalType":"address"}],"stateMutability":"nonpayable"},{"name":"Approval","type":"event","inputs":[{"name":"owner","type":"address","indexed":true,"internalType":"address"},{"name":"spender","type":"address","indexed":true,"internalType":"address"},{"name":"value","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"name":"AuctionDurationSet","type":"event","inputs":[{"name":"auctionDuration","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"newAuctionDuration","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"name":"CapSet","type":"event","inputs":[{"name":"oldCap","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"newCap","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"name":"CloseShort","type":"event","inputs":[{"name":"options","type":"address","indexed":true,"internalType":"address"},{"name":"withdrawAmount","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"manager","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"name":"CollectVaultFees","type":"event","inputs":[{"name":"performanceFee","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"vaultFee","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"round","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"feeRecipient","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"name":"Deposit","type":"event","inputs":[{"name":"account","type":"address","indexed":true,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"round","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"name":"InitiateWithdraw","type":"event","inputs":[{"name":"account","type":"address","indexed":true,"internalType":"address"},{"name":"shares","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"round","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"name":"InstantWithdraw","type":"event","inputs":[{"name":"account","type":"address","indexed":true,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"round","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"name":"ManagementFeeSet","type":"event","inputs":[{"name":"managementFee","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"newManagementFee","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"name":"NewOffer","type":"event","inputs":[{"name":"swapId","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"seller","type":"address","indexed":false,"internalType":"address"},{"name":"oToken","type":"address","indexed":false,"internalType":"address"},{"name":"biddingToken","type":"address","indexed":false,"internalType":"address"},{"name":"minPrice","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"minBidSize","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"totalSize","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"name":"NewOptionStrikeSelected","type":"event","inputs":[{"name":"strikePrice","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"delta","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"name":"OpenShort","type":"event","inputs":[{"name":"options","type":"address","indexed":true,"internalType":"address"},{"name":"depositAmount","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"manager","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"name":"OwnershipTransferred","type":"event","inputs":[{"name":"previousOwner","type":"address","indexed":true,"internalType":"address"},{"name":"newOwner","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"name":"PerformanceFeeSet","type":"event","inputs":[{"name":"performanceFee","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"newPerformanceFee","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"name":"Redeem","type":"event","inputs":[{"name":"account","type":"address","indexed":true,"internalType":"address"},{"name":"share","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"round","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"name":"Transfer","type":"event","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"},{"name":"value","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"name":"Withdraw","type":"event","inputs":[{"name":"account","type":"address","indexed":true,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"shares","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"name":"DELAY","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"GAMMA_CONTROLLER","type":"function","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"name":"MARGIN_POOL","type":"function","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"name":"OTOKEN_FACTORY","type":"function","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"name":"PERIOD","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"SWAP_CONTRACT","type":"function","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"name":"USDC","type":"function","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"name":"WETH","type":"function","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"name":"accountVaultBalance","type":"function","inputs":[{"name":"account","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"allowance","type":"function","inputs":[{"name":"owner","type":"address","internalType":"address"},{"name":"spender","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"approve","type":"function","inputs":[{"name":"spender","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"name":"auctionDuration","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"balanceOf","type":"function","inputs":[{"name":"account","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"burnRemainingOTokens","type":"function","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"name":"cap","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"closeRound","type":"function","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"name":"commitNextOption","type":"function","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"name":"completeWithdraw","type":"function","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"name":"currentOption","type":"function","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"name":"currentOtokenPremium","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"currentQueuedWithdrawShares","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"decimals","type":"function","inputs":[],"outputs":[{"name":"","type":"uint8","internalType":"uint8"}],"stateMutability":"view"},{"name":"decreaseAllowance","type":"function","inputs":[{"name":"spender","type":"address","internalType":"address"},{"name":"subtractedValue","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"name":"deposit","type":"function","inputs":[{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"depositETH","type":"function","inputs":[],"outputs":[],"stateMutability":"payable"},{"name":"depositFor","type":"function","inputs":[{"name":"amount","type":"uint256","internalType":"uint256"},{"name":"creditor","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"depositReceipts","type":"function","inputs":[{"name":"","type":"address","internalType":"address"}],"outputs":[{"name":"round","type":"uint16","internalType":"uint16"},{"name":"amount","type":"uint104","internalType":"uint104"},{"name":"unredeemedShares","type":"uint128","internalType":"uint128"}],"stateMutability":"view"},{"name":"feeRecipient","type":"function","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"name":"increaseAllowance","type":"function","inputs":[{"name":"spender","type":"address","internalType":"address"},{"name":"addedValue","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"name":"initRounds","type":"function","inputs":[{"name":"numRounds","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"initialize","type":"function","inputs":[{"name":"_initParams","type":"tuple","components":[{"name":"_owner","type":"address","internalType":"address"},{"name":"_keeper","type":"address","internalType":"address"},{"name":"_feeRecipient","type":"address","internalType":"address"},{"name":"_managementFee","type":"uint256","internalType":"uint256"},{"name":"_performanceFee","type":"uint256","internalType":"uint256"},{"name":"_tokenName","type":"string","internalType":"string"},{"name":"_tokenSymbol","type":"string","internalType":"string"},{"name":"_optionsPremiumPricer","type":"address","internalType":"address"},{"name":"_strikeSelection","type":"address","internalType":"address"}],"internalType":"struct RibbonThetaVaultWithSwap.InitParams"},{"name":"_vaultParams","type":"tuple","components":[{"name":"isPut","type":"bool","internalType":"bool"},{"name":"decimals","type":"uint8","internalType":"uint8"},{"name":"asset","type":"address","internalType":"address"},{"name":"underlying","type":"address","internalType":"address"},{"name":"minimumSupply","type":"uint56","internalType":"uint56"},{"name":"cap","type":"uint104","internalType":"uint104"}],"internalType":"struct Vault.VaultParams"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"initiateWithdraw","type":"function","inputs":[{"name":"numShares","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"keeper","type":"function","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"name":"lastQueuedWithdrawAmount","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"lastStrikeOverrideRound","type":"function","inputs":[],"outputs":[{"name":"","type":"uint16","internalType":"uint16"}],"stateMutability":"view"},{"name":"liquidityGauge","type":"function","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"name":"managementFee","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"maxRedeem","type":"function","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"name":"name","type":"function","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"view"},{"name":"nextOption","type":"function","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"name":"nextOptionReadyAt","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"optionAuctionID","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"optionState","type":"function","inputs":[],"outputs":[{"name":"nextOption","type":"address","internalType":"address"},{"name":"currentOption","type":"address","internalType":"address"},{"name":"nextOptionReadyAt","type":"uint32","internalType":"uint32"}],"stateMutability":"view"},{"name":"optionsPremiumPricer","type":"function","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"name":"optionsPurchaseQueue","type":"function","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"name":"overriddenStrikePrice","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"owner","type":"function","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"name":"pausePosition","type":"function","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"name":"performanceFee","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"premiumDiscount","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"pricePerShare","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"redeem","type":"function","inputs":[{"name":"numShares","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"renounceOwnership","type":"function","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"name":"rollToNextOption","type":"function","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"name":"roundPricePerShare","type":"function","inputs":[{"name":"","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"setCap","type":"function","inputs":[{"name":"newCap","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"setFeeRecipient","type":"function","inputs":[{"name":"newFeeRecipient","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"setLiquidityGauge","type":"function","inputs":[{"name":"newLiquidityGauge","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"setManagementFee","type":"function","inputs":[{"name":"newManagementFee","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"setMinPrice","type":"function","inputs":[{"name":"minPrice","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"setNewKeeper","type":"function","inputs":[{"name":"newKeeper","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"setOptionsPremiumPricer","type":"function","inputs":[{"name":"newOptionsPremiumPricer","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"setPerformanceFee","type":"function","inputs":[{"name":"newPerformanceFee","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"setStrikePrice","type":"function","inputs":[{"name":"strikePrice","type":"uint128","internalType":"uint128"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"setStrikeSelection","type":"function","inputs":[{"name":"newStrikeSelection","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"setVaultPauser","type":"function","inputs":[{"name":"newVaultPauser","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"settleOffer","type":"function","inputs":[{"name":"bids","type":"tuple[]","components":[{"name":"swapId","type":"uint256","internalType":"uint256"},{"name":"nonce","type":"uint256","internalType":"uint256"},{"name":"signerWallet","type":"address","internalType":"address"},{"name":"sellAmount","type":"uint256","internalType":"uint256"},{"name":"buyAmount","type":"uint256","internalType":"uint256"},{"name":"referrer","type":"address","internalType":"address"},{"name":"v","type":"uint8","internalType":"uint8"},{"name":"r","type":"bytes32","internalType":"bytes32"},{"name":"s","type":"bytes32","internalType":"bytes32"}],"internalType":"struct ISwap.Bid[]"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"shareBalances","type":"function","inputs":[{"name":"account","type":"address","internalType":"address"}],"outputs":[{"name":"heldByAccount","type":"uint256","internalType":"uint256"},{"name":"heldByVault","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"shares","type":"function","inputs":[{"name":"account","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"stake","type":"function","inputs":[{"name":"numShares","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"strikeSelection","type":"function","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"name":"symbol","type":"function","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"view"},{"name":"totalBalance","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"totalPending","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"totalSupply","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"transfer","type":"function","inputs":[{"name":"recipient","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"name":"transferFrom","type":"function","inputs":[{"name":"sender","type":"address","internalType":"address"},{"name":"recipient","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"name":"transferOwnership","type":"function","inputs":[{"name":"newOwner","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"vaultParams","type":"function","inputs":[],"outputs":[{"name":"isPut","type":"bool","internalType":"bool"},{"name":"decimals","type":"uint8","internalType":"uint8"},{"name":"asset","type":"address","internalType":"address"},{"name":"underlying","type":"address","internalType":"address"},{"name":"minimumSupply","type":"uint56","internalType":"uint56"},{"name":"cap","type":"uint104","internalType":"uint104"}],"stateMutability":"view"},{"name":"vaultPauser","type":"function","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"name":"vaultState","type":"function","inputs":[],"outputs":[{"name":"round","type":"uint16","internalType":"uint16"},{"name":"lockedAmount","type":"uint104","internalType":"uint104"},{"name":"lastLockedAmount","type":"uint104","internalType":"uint104"},{"name":"totalPending","type":"uint128","internalType":"uint128"},{"name":"queuedWithdrawShares","type":"uint128","internalType":"uint128"}],"stateMutability":"view"},{"name":"withdrawInstantly","type":"function","inputs":[{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"withdrawals","type":"function","inputs":[{"name":"","type":"address","internalType":"address"}],"outputs":[{"name":"round","type":"uint16","internalType":"uint16"},{"name":"shares","type":"uint128","internalType":"uint128"}],"stateMutability":"view"}],"metadata":"{\"compiler\":{\"version\":\"0.8.4+commit.c7e474f2\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_weth\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_usdc\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_oTokenFactory\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_gammaController\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_marginPool\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_swapContract\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"auctionDuration\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newAuctionDuration\",\"type\":\"uint256\"}],\"name\":\"AuctionDurationSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldCap\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newCap\",\"type\":\"uint256\"}],\"name\":\"CapSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"options\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"withdrawAmount\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"manager\",\"type\":\"address\"}],\"name\":\"CloseShort\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"performanceFee\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"vaultFee\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"round\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"feeRecipient\",\"type\":\"address\"}],\"name\":\"CollectVaultFees\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"round\",\"type\":\"uint256\"}],\"name\":\"Deposit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"round\",\"type\":\"uint256\"}],\"name\":\"InitiateWithdraw\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"round\",\"type\":\"uint256\"}],\"name\":\"InstantWithdraw\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"managementFee\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newManagementFee\",\"type\":\"uint256\"}],\"name\":\"ManagementFeeSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"swapId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"seller\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"biddingToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"minPrice\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"minBidSize\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalSize\",\"type\":\"uint256\"}],\"name\":\"NewOffer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"strikePrice\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"delta\",\"type\":\"uint256\"}],\"name\":\"NewOptionStrikeSelected\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"options\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"depositAmount\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"manager\",\"type\":\"address\"}],\"name\":\"OpenShort\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"performanceFee\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newPerformanceFee\",\"type\":\"uint256\"}],\"name\":\"PerformanceFeeSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"share\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"round\",\"type\":\"uint256\"}],\"name\":\"Redeem\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"Withdraw\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DELAY\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"GAMMA_CONTROLLER\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MARGIN_POOL\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"OTOKEN_FACTORY\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PERIOD\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"SWAP_CONTRACT\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"USDC\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"WETH\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"accountVaultBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"auctionDuration\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"burnRemainingOTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"cap\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"closeRound\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"commitNextOption\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"completeWithdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"currentOption\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"currentOtokenPremium\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"currentQueuedWithdrawShares\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"depositETH\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"creditor\",\"type\":\"address\"}],\"name\":\"depositFor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"depositReceipts\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"round\",\"type\":\"uint16\"},{\"internalType\":\"uint104\",\"name\":\"amount\",\"type\":\"uint104\"},{\"internalType\":\"uint128\",\"name\":\"unredeemedShares\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"feeRecipient\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"numRounds\",\"type\":\"uint256\"}],\"name\":\"initRounds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_keeper\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_feeRecipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_managementFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_performanceFee\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"_tokenName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_tokenSymbol\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"_optionsPremiumPricer\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_strikeSelection\",\"type\":\"address\"}],\"internalType\":\"struct RibbonThetaVaultWithSwap.InitParams\",\"name\":\"_initParams\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isPut\",\"type\":\"bool\"},{\"internalType\":\"uint8\",\"name\":\"decimals\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"underlying\",\"type\":\"address\"},{\"internalType\":\"uint56\",\"name\":\"minimumSupply\",\"type\":\"uint56\"},{\"internalType\":\"uint104\",\"name\":\"cap\",\"type\":\"uint104\"}],\"internalType\":\"struct Vault.VaultParams\",\"name\":\"_vaultParams\",\"type\":\"tuple\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"numShares\",\"type\":\"uint256\"}],\"name\":\"initiateWithdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"keeper\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastQueuedWithdrawAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastStrikeOverrideRound\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"liquidityGauge\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"managementFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxRedeem\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"nextOption\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"nextOptionReadyAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"optionAuctionID\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"optionState\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"nextOption\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"currentOption\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"nextOptionReadyAt\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"optionsPremiumPricer\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"optionsPurchaseQueue\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"overriddenStrikePrice\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pausePosition\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"performanceFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"premiumDiscount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pricePerShare\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"numShares\",\"type\":\"uint256\"}],\"name\":\"redeem\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rollToNextOption\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"roundPricePerShare\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newCap\",\"type\":\"uint256\"}],\"name\":\"setCap\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newFeeRecipient\",\"type\":\"address\"}],\"name\":\"setFeeRecipient\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newLiquidityGauge\",\"type\":\"address\"}],\"name\":\"setLiquidityGauge\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newManagementFee\",\"type\":\"uint256\"}],\"name\":\"setManagementFee\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"minPrice\",\"type\":\"uint256\"}],\"name\":\"setMinPrice\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newKeeper\",\"type\":\"address\"}],\"name\":\"setNewKeeper\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOptionsPremiumPricer\",\"type\":\"address\"}],\"name\":\"setOptionsPremiumPricer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newPerformanceFee\",\"type\":\"uint256\"}],\"name\":\"setPerformanceFee\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint128\",\"name\":\"strikePrice\",\"type\":\"uint128\"}],\"name\":\"setStrikePrice\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newStrikeSelection\",\"type\":\"address\"}],\"name\":\"setStrikeSelection\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newVaultPauser\",\"type\":\"address\"}],\"name\":\"setVaultPauser\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"swapId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"signerWallet\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"sellAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"buyAmount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"referrer\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"internalType\":\"struct ISwap.Bid[]\",\"name\":\"bids\",\"type\":\"tuple[]\"}],\"name\":\"settleOffer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"shareBalances\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"heldByAccount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"heldByVault\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"shares\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"numShares\",\"type\":\"uint256\"}],\"name\":\"stake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"strikeSelection\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalPending\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"vaultParams\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"isPut\",\"type\":\"bool\"},{\"internalType\":\"uint8\",\"name\":\"decimals\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"underlying\",\"type\":\"address\"},{\"internalType\":\"uint56\",\"name\":\"minimumSupply\",\"type\":\"uint56\"},{\"internalType\":\"uint104\",\"name\":\"cap\",\"type\":\"uint104\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"vaultPauser\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"vaultState\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"round\",\"type\":\"uint16\"},{\"internalType\":\"uint104\",\"name\":\"lockedAmount\",\"type\":\"uint104\"},{\"internalType\":\"uint104\",\"name\":\"lastLockedAmount\",\"type\":\"uint104\"},{\"internalType\":\"uint128\",\"name\":\"totalPending\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"queuedWithdrawShares\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdrawInstantly\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"withdrawals\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"round\",\"type\":\"uint16\"},{\"internalType\":\"uint128\",\"name\":\"shares\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"accountVaultBalance(address)\":{\"params\":{\"account\":\"is the address to lookup balance for\"},\"returns\":{\"_0\":\"the amount of `asset` custodied by the vault for the user\"}},\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. Requirements: - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"constructor\":{\"params\":{\"_gammaController\":\"is the contract address for opyn actions\",\"_marginPool\":\"is the contract address for providing collateral to opyn\",\"_oTokenFactory\":\"is the contract address for minting new opyn option types (strikes, asset, expiry)\",\"_swapContract\":\"is the contract address that facilitates bids settlement\",\"_usdc\":\"is the USDC contract\",\"_weth\":\"is the Wrapped Ether contract\"}},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"deposit(uint256)\":{\"params\":{\"amount\":\"is the amount of `asset` to deposit\"}},\"depositFor(uint256,address)\":{\"params\":{\"amount\":\"is the amount of `asset` to deposit\",\"creditor\":\"is the address that can claim/withdraw deposited amount\"}},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.\"},\"initRounds(uint256)\":{\"params\":{\"numRounds\":\"is the number of rounds to initialize in the map\"}},\"initialize((address,address,address,uint256,uint256,string,string,address,address),(bool,uint8,address,address,uint56,uint104))\":{\"params\":{\"_initParams\":\"is the struct with vault initialization parameters\",\"_vaultParams\":\"is the struct with vault general data\"}},\"initiateWithdraw(uint256)\":{\"params\":{\"numShares\":\"is the number of shares to withdraw\"}},\"name()\":{\"details\":\"Returns the name of the token.\"},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"redeem(uint256)\":{\"params\":{\"numShares\":\"is the number of shares to redeem\"}},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"setCap(uint256)\":{\"params\":{\"newCap\":\"is the new cap for deposits\"}},\"setFeeRecipient(address)\":{\"params\":{\"newFeeRecipient\":\"is the address of the new fee recipient\"}},\"setLiquidityGauge(address)\":{\"params\":{\"newLiquidityGauge\":\"is the address of the new liquidityGauge contract\"}},\"setManagementFee(uint256)\":{\"params\":{\"newManagementFee\":\"is the management fee (6 decimals). ex: 2 * 10 ** 6 = 2%\"}},\"setMinPrice(uint256)\":{\"params\":{\"minPrice\":\"is the new oToken Premium in the units of 10**18\"}},\"setNewKeeper(address)\":{\"params\":{\"newKeeper\":\"is the address of the new keeper\"}},\"setOptionsPremiumPricer(address)\":{\"params\":{\"newOptionsPremiumPricer\":\"is the address of the new strike selection contract\"}},\"setPerformanceFee(uint256)\":{\"params\":{\"newPerformanceFee\":\"is the performance fee (6 decimals). ex: 20 * 10 ** 6 = 20%\"}},\"setStrikePrice(uint128)\":{\"params\":{\"strikePrice\":\"is the strike price of the new oTokens (decimals = 8)\"}},\"setStrikeSelection(address)\":{\"params\":{\"newStrikeSelection\":\"is the address of the new strike selection contract\"}},\"setVaultPauser(address)\":{\"params\":{\"newVaultPauser\":\"is the address of the new vaultPauser contract\"}},\"shareBalances(address)\":{\"params\":{\"account\":\"is the account to lookup share balance for\"},\"returns\":{\"heldByAccount\":\"is the shares held by account\",\"heldByVault\":\"is the shares held on the vault (unredeemedShares)\"}},\"shares(address)\":{\"params\":{\"account\":\"is the account to lookup share balance for\"},\"returns\":{\"_0\":\"the share balance\"}},\"stake(uint256)\":{\"params\":{\"numShares\":\"is the number of shares to stake\"}},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"totalBalance()\":{\"returns\":{\"_0\":\"total balance of the vault, including the amounts locked in third party protocols\"}},\"totalSupply()\":{\"details\":\"See {IERC20-totalSupply}.\"},\"transfer(address,uint256)\":{\"details\":\"See {IERC20-transfer}. Requirements: - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for ``sender``'s tokens of at least `amount`.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"withdrawInstantly(uint256)\":{\"params\":{\"amount\":\"is the amount to withdraw\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"DELAY()\":{\"notice\":\"Deprecated: 15 minute timelock between commitAndClose and rollToNexOption.\"},\"OTOKEN_FACTORY()\":{\"notice\":\"oTokenFactory is the factory contract used to spawn otokens. Used to lookup otokens.\"},\"PERIOD()\":{\"notice\":\"7 day period between each options sale.\"},\"USDC()\":{\"notice\":\"USDC 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\"},\"WETH()\":{\"notice\":\"WETH9 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\"},\"accountVaultBalance(address)\":{\"notice\":\"Returns the asset balance held on the vault for the account\"},\"burnRemainingOTokens()\":{\"notice\":\"Burn the remaining oTokens left over\"},\"closeRound()\":{\"notice\":\"Closes the existing short and calculate the shares to mint, new price per share & amount of funds to re-allocate as collateral for the new round Since we are incrementing the round here, the options are sold in the beginning of a round instead of at the end of the round. For example, at round 1, we don't sell any options. We start selling options at the beginning of round 2.\"},\"commitNextOption()\":{\"notice\":\"Sets the next option the vault will be shorting\"},\"completeWithdraw()\":{\"notice\":\"Completes a scheduled withdrawal from a past round. Uses finalized pps for the round\"},\"constructor\":{\"notice\":\"Initializes the contract with immutable variables\"},\"decimals()\":{\"notice\":\"Returns the token decimals\"},\"deposit(uint256)\":{\"notice\":\"Deposits the `asset` from msg.sender.\"},\"depositETH()\":{\"notice\":\"Deposits ETH into the contract and mint vault shares. Reverts if the asset is not WETH.\"},\"depositFor(uint256,address)\":{\"notice\":\"Deposits the `asset` from msg.sender added to `creditor`'s deposit.Used for vault -> vault deposits on the user's behalf\"},\"depositReceipts(address)\":{\"notice\":\"Stores the user's pending deposit for the round\"},\"feeRecipient()\":{\"notice\":\"Fee recipient for the performance and management fees\"},\"initRounds(uint256)\":{\"notice\":\"Helper function that helps to save gas for writing values into the roundPricePerShare map.         Writing `1` into the map makes subsequent writes warm, reducing the gas from 20k to 5k.         Having 1 initialized beforehand will not be an issue as long as we round down share calculations to 0.\"},\"initialize((address,address,address,uint256,uint256,string,string,address,address),(bool,uint8,address,address,uint56,uint104))\":{\"notice\":\"Initializes the OptionVault contract with storage variables.\"},\"initiateWithdraw(uint256)\":{\"notice\":\"Initiates a withdrawal that can be processed once the round completes\"},\"keeper()\":{\"notice\":\"role in charge of weekly vault operations such as rollToNextOption and burnRemainingOTokens\"},\"managementFee()\":{\"notice\":\"Management fee charged on entire AUM in rollToNextOption. Only charged when there is no loss.\"},\"maxRedeem()\":{\"notice\":\"Redeems the entire unredeemedShares balance that is owed to the account\"},\"optionState()\":{\"notice\":\"Vault's state of the options sold and the timelocked option\"},\"pausePosition()\":{\"notice\":\"pause a user's vault position\"},\"performanceFee()\":{\"notice\":\"Performance fee charged on premiums earned in rollToNextOption. Only charged when there is no loss.\"},\"pricePerShare()\":{\"notice\":\"The price of a unit of share denominated in the `asset`\"},\"redeem(uint256)\":{\"notice\":\"Redeems shares that are owed to the account\"},\"rollToNextOption()\":{\"notice\":\"Rolls the vault's funds into a new short position and create a new offer.\"},\"roundPricePerShare(uint256)\":{\"notice\":\"On every round's close, the pricePerShare value of an rTHETA token is stored This is used to determine the number of shares to be returned to a user with their DepositReceipt.depositAmount\"},\"setCap(uint256)\":{\"notice\":\"Sets a new cap for deposits\"},\"setFeeRecipient(address)\":{\"notice\":\"Sets the new fee recipient\"},\"setLiquidityGauge(address)\":{\"notice\":\"Sets the new liquidityGauge contract for this vault\"},\"setManagementFee(uint256)\":{\"notice\":\"Sets the management fee for the vault\"},\"setMinPrice(uint256)\":{\"notice\":\"Sets oToken Premium\"},\"setNewKeeper(address)\":{\"notice\":\"Sets the new keeper\"},\"setOptionsPremiumPricer(address)\":{\"notice\":\"Sets the new options premium pricer contract\"},\"setPerformanceFee(uint256)\":{\"notice\":\"Sets the performance fee for the vault\"},\"setStrikePrice(uint128)\":{\"notice\":\"Optionality to set strike price manually Should be called after closeRound if we are setting current week's strike\"},\"setStrikeSelection(address)\":{\"notice\":\"Sets the new strike selection contract\"},\"setVaultPauser(address)\":{\"notice\":\"Sets the new Vault Pauser contract for this vault\"},\"settleOffer((uint256,uint256,address,uint256,uint256,address,uint8,bytes32,bytes32)[])\":{\"notice\":\"Settle current offer\"},\"shareBalances(address)\":{\"notice\":\"Getter for returning the account's share balance split between account and vault holdings\"},\"shares(address)\":{\"notice\":\"Getter for returning the account's share balance including unredeemed shares\"},\"stake(uint256)\":{\"notice\":\"Stakes a users vault shares\"},\"totalBalance()\":{\"notice\":\"Returns the vault's total balance, including the amounts locked into a short position\"},\"vaultParams()\":{\"notice\":\"Vault's parameters like cap, decimals\"},\"vaultState()\":{\"notice\":\"Vault's lifecycle state like round and locked amounts\"},\"withdrawInstantly(uint256)\":{\"notice\":\"Withdraws the assets on the vault using the outstanding `DepositReceipt.amount`\"},\"withdrawals(address)\":{\"notice\":\"Stores pending user withdrawals\"}},\"notice\":\"UPGRADEABILITY: Since we use the upgradeable proxy pattern, we must observe the inheritance chain closely. Any changes/appends in storage variable needs to happen in RibbonThetaVaultStorage. RibbonThetaVault should not inherit from any other contract aside from RibbonVault, RibbonThetaVaultStorage\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol\":\"RibbonThetaVaultWithSwap\"},\"evmVersion\":\"istanbul\",\"libraries\":{\"contracts/libraries/VaultLifecycleWithSwap.sol:VaultLifecycleWithSwap\":\"0xf7f4260943db50eee7e917330c35b460ff70ad54\"},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\\n    address private _owner;\\n\\n    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n    /**\\n     * @dev Initializes the contract setting the deployer as the initial owner.\\n     */\\n    function __Ownable_init() internal initializer {\\n        __Context_init_unchained();\\n        __Ownable_init_unchained();\\n    }\\n\\n    function __Ownable_init_unchained() internal initializer {\\n        _setOwner(_msgSender());\\n    }\\n\\n    /**\\n     * @dev Returns the address of the current owner.\\n     */\\n    function owner() public view virtual returns (address) {\\n        return _owner;\\n    }\\n\\n    /**\\n     * @dev Throws if called by any account other than the owner.\\n     */\\n    modifier onlyOwner() {\\n        require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n        _;\\n    }\\n\\n    /**\\n     * @dev Leaves the contract without owner. It will not be possible to call\\n     * `onlyOwner` functions anymore. Can only be called by the current owner.\\n     *\\n     * NOTE: Renouncing ownership will leave the contract without an owner,\\n     * thereby removing any functionality that is only available to the owner.\\n     */\\n    function renounceOwnership() public virtual onlyOwner {\\n        _setOwner(address(0));\\n    }\\n\\n    /**\\n     * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n     * Can only be called by the current owner.\\n     */\\n    function transferOwnership(address newOwner) public virtual onlyOwner {\\n        require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n        _setOwner(newOwner);\\n    }\\n\\n    function _setOwner(address newOwner) private {\\n        address oldOwner = _owner;\\n        _owner = newOwner;\\n        emit OwnershipTransferred(oldOwner, newOwner);\\n    }\\n    uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x35b09b69aca3bc2633da8f47382a81ecf367efe57167a2114f60f9ec81988afa\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n */\\nabstract contract Initializable {\\n    /**\\n     * @dev Indicates that the contract has been initialized.\\n     */\\n    bool private _initialized;\\n\\n    /**\\n     * @dev Indicates that the contract is in the process of being initialized.\\n     */\\n    bool private _initializing;\\n\\n    /**\\n     * @dev Modifier to protect an initializer function from being invoked twice.\\n     */\\n    modifier initializer() {\\n        require(_initializing || !_initialized, \\\"Initializable: contract is already initialized\\\");\\n\\n        bool isTopLevelCall = !_initializing;\\n        if (isTopLevelCall) {\\n            _initializing = true;\\n            _initialized = true;\\n        }\\n\\n        _;\\n\\n        if (isTopLevelCall) {\\n            _initializing = false;\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x8b2abd85d0ece7e866e100e9d47ca9cbec93c87cf71a8d267b2b93eb81f7d5e9\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuardUpgradeable is Initializable {\\n    // Booleans are more expensive than uint256 or any type that takes up a full\\n    // word because each write operation emits an extra SLOAD to first read the\\n    // slot's contents, replace the bits taken up by the boolean, and then write\\n    // back. This is the compiler's defense against contract upgrades and\\n    // pointer aliasing, and it cannot be disabled.\\n\\n    // The values being non-zero value makes deployment a bit more expensive,\\n    // but in exchange the refund on every call to nonReentrant will be lower in\\n    // amount. Since refunds are capped to a percentage of the total\\n    // transaction's gas, it is best to keep them low in cases like this one, to\\n    // increase the likelihood of the full refund coming into effect.\\n    uint256 private constant _NOT_ENTERED = 1;\\n    uint256 private constant _ENTERED = 2;\\n\\n    uint256 private _status;\\n\\n    function __ReentrancyGuard_init() internal initializer {\\n        __ReentrancyGuard_init_unchained();\\n    }\\n\\n    function __ReentrancyGuard_init_unchained() internal initializer {\\n        _status = _NOT_ENTERED;\\n    }\\n\\n    /**\\n     * @dev Prevents a contract from calling itself, directly or indirectly.\\n     * Calling a `nonReentrant` function from another `nonReentrant`\\n     * function is not supported. It is possible to prevent this from happening\\n     * by making the `nonReentrant` function external, and make it call a\\n     * `private` function that does the actual work.\\n     */\\n    modifier nonReentrant() {\\n        // On the first call to nonReentrant, _notEntered will be true\\n        require(_status != _ENTERED, \\\"ReentrancyGuard: reentrant call\\\");\\n\\n        // Any calls to nonReentrant after this point will fail\\n        _status = _ENTERED;\\n\\n        _;\\n\\n        // By storing the original value once again, a refund is triggered (see\\n        // https://eips.ethereum.org/EIPS/eip-2200)\\n        _status = _NOT_ENTERED;\\n    }\\n    uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x89fa60d14355f7ae06af11e28fce2bb90c5c6186645d681a30e1b36234a4c210\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC20Upgradeable.sol\\\";\\nimport \\\"./extensions/IERC20MetadataUpgradeable.sol\\\";\\nimport \\\"../../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\\n * instead returning `false` on failure. This behavior is nonetheless\\n * conventional and does not conflict with the expectations of ERC20\\n * applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20Upgradeable is Initializable, ContextUpgradeable, IERC20Upgradeable, IERC20MetadataUpgradeable {\\n    mapping(address => uint256) private _balances;\\n\\n    mapping(address => mapping(address => uint256)) private _allowances;\\n\\n    uint256 private _totalSupply;\\n\\n    string private _name;\\n    string private _symbol;\\n\\n    /**\\n     * @dev Sets the values for {name} and {symbol}.\\n     *\\n     * The default value of {decimals} is 18. To select a different value for\\n     * {decimals} you should overload it.\\n     *\\n     * All two of these values are immutable: they can only be set once during\\n     * construction.\\n     */\\n    function __ERC20_init(string memory name_, string memory symbol_) internal initializer {\\n        __Context_init_unchained();\\n        __ERC20_init_unchained(name_, symbol_);\\n    }\\n\\n    function __ERC20_init_unchained(string memory name_, string memory symbol_) internal initializer {\\n        _name = name_;\\n        _symbol = symbol_;\\n    }\\n\\n    /**\\n     * @dev Returns the name of the token.\\n     */\\n    function name() public view virtual override returns (string memory) {\\n        return _name;\\n    }\\n\\n    /**\\n     * @dev Returns the symbol of the token, usually a shorter version of the\\n     * name.\\n     */\\n    function symbol() public view virtual override returns (string memory) {\\n        return _symbol;\\n    }\\n\\n    /**\\n     * @dev Returns the number of decimals used to get its user representation.\\n     * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n     * be displayed to a user as `5.05` (`505 / 10 ** 2`).\\n     *\\n     * Tokens usually opt for a value of 18, imitating the relationship between\\n     * Ether and Wei. This is the value {ERC20} uses, unless this function is\\n     * overridden;\\n     *\\n     * NOTE: This information is only used for _display_ purposes: it in\\n     * no way affects any of the arithmetic of the contract, including\\n     * {IERC20-balanceOf} and {IERC20-transfer}.\\n     */\\n    function decimals() public view virtual override returns (uint8) {\\n        return 18;\\n    }\\n\\n    /**\\n     * @dev See {IERC20-totalSupply}.\\n     */\\n    function totalSupply() public view virtual override returns (uint256) {\\n        return _totalSupply;\\n    }\\n\\n    /**\\n     * @dev See {IERC20-balanceOf}.\\n     */\\n    function balanceOf(address account) public view virtual override returns (uint256) {\\n        return _balances[account];\\n    }\\n\\n    /**\\n     * @dev See {IERC20-transfer}.\\n     *\\n     * Requirements:\\n     *\\n     * - `recipient` cannot be the zero address.\\n     * - the caller must have a balance of at least `amount`.\\n     */\\n    function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\\n        _transfer(_msgSender(), recipient, amount);\\n        return true;\\n    }\\n\\n    /**\\n     * @dev See {IERC20-allowance}.\\n     */\\n    function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n        return _allowances[owner][spender];\\n    }\\n\\n    /**\\n     * @dev See {IERC20-approve}.\\n     *\\n     * Requirements:\\n     *\\n     * - `spender` cannot be the zero address.\\n     */\\n    function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n        _approve(_msgSender(), spender, amount);\\n        return true;\\n    }\\n\\n    /**\\n     * @dev See {IERC20-transferFrom}.\\n     *\\n     * Emits an {Approval} event indicating the updated allowance. This is not\\n     * required by the EIP. See the note at the beginning of {ERC20}.\\n     *\\n     * Requirements:\\n     *\\n     * - `sender` and `recipient` cannot be the zero address.\\n     * - `sender` must have a balance of at least `amount`.\\n     * - the caller must have allowance for ``sender``'s tokens of at least\\n     * `amount`.\\n     */\\n    function transferFrom(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) public virtual override returns (bool) {\\n        _transfer(sender, recipient, amount);\\n\\n        uint256 currentAllowance = _allowances[sender][_msgSender()];\\n        require(currentAllowance >= amount, \\\"ERC20: transfer amount exceeds allowance\\\");\\n        unchecked {\\n            _approve(sender, _msgSender(), currentAllowance - amount);\\n        }\\n\\n        return true;\\n    }\\n\\n    /**\\n     * @dev Atomically increases the allowance granted to `spender` by the caller.\\n     *\\n     * This is an alternative to {approve} that can be used as a mitigation for\\n     * problems described in {IERC20-approve}.\\n     *\\n     * Emits an {Approval} event indicating the updated allowance.\\n     *\\n     * Requirements:\\n     *\\n     * - `spender` cannot be the zero address.\\n     */\\n    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n        _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue);\\n        return true;\\n    }\\n\\n    /**\\n     * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n     *\\n     * This is an alternative to {approve} that can be used as a mitigation for\\n     * problems described in {IERC20-approve}.\\n     *\\n     * Emits an {Approval} event indicating the updated allowance.\\n     *\\n     * Requirements:\\n     *\\n     * - `spender` cannot be the zero address.\\n     * - `spender` must have allowance for the caller of at least\\n     * `subtractedValue`.\\n     */\\n    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n        uint256 currentAllowance = _allowances[_msgSender()][spender];\\n        require(currentAllowance >= subtractedValue, \\\"ERC20: decreased allowance below zero\\\");\\n        unchecked {\\n            _approve(_msgSender(), spender, currentAllowance - subtractedValue);\\n        }\\n\\n        return true;\\n    }\\n\\n    /**\\n     * @dev Moves `amount` of tokens from `sender` to `recipient`.\\n     *\\n     * This internal function is equivalent to {transfer}, and can be used to\\n     * e.g. implement automatic token fees, slashing mechanisms, etc.\\n     *\\n     * Emits a {Transfer} event.\\n     *\\n     * Requirements:\\n     *\\n     * - `sender` cannot be the zero address.\\n     * - `recipient` cannot be the zero address.\\n     * - `sender` must have a balance of at least `amount`.\\n     */\\n    function _transfer(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) internal virtual {\\n        require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n        require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n        _beforeTokenTransfer(sender, recipient, amount);\\n\\n        uint256 senderBalance = _balances[sender];\\n        require(senderBalance >= amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n        unchecked {\\n            _balances[sender] = senderBalance - amount;\\n        }\\n        _balances[recipient] += amount;\\n\\n        emit Transfer(sender, recipient, amount);\\n\\n        _afterTokenTransfer(sender, recipient, amount);\\n    }\\n\\n    /** @dev Creates `amount` tokens and assigns them to `account`, increasing\\n     * the total supply.\\n     *\\n     * Emits a {Transfer} event with `from` set to the zero address.\\n     *\\n     * Requirements:\\n     *\\n     * - `account` cannot be the zero address.\\n     */\\n    function _mint(address account, uint256 amount) internal virtual {\\n        require(account != address(0), \\\"ERC20: mint to the zero address\\\");\\n\\n        _beforeTokenTransfer(address(0), account, amount);\\n\\n        _totalSupply += amount;\\n        _balances[account] += amount;\\n        emit Transfer(address(0), account, amount);\\n\\n        _afterTokenTransfer(address(0), account, amount);\\n    }\\n\\n    /**\\n     * @dev Destroys `amount` tokens from `account`, reducing the\\n     * total supply.\\n     *\\n     * Emits a {Transfer} event with `to` set to the zero address.\\n     *\\n     * Requirements:\\n     *\\n     * - `account` cannot be the zero address.\\n     * - `account` must have at least `amount` tokens.\\n     */\\n    function _burn(address account, uint256 amount) internal virtual {\\n        require(account != address(0), \\\"ERC20: burn from the zero address\\\");\\n\\n        _beforeTokenTransfer(account, address(0), amount);\\n\\n        uint256 accountBalance = _balances[account];\\n        require(accountBalance >= amount, \\\"ERC20: burn amount exceeds balance\\\");\\n        unchecked {\\n            _balances[account] = accountBalance - amount;\\n        }\\n        _totalSupply -= amount;\\n\\n        emit Transfer(account, address(0), amount);\\n\\n        _afterTokenTransfer(account, address(0), amount);\\n    }\\n\\n    /**\\n     * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n     *\\n     * This internal function is equivalent to `approve`, and can be used to\\n     * e.g. set automatic allowances for certain subsystems, etc.\\n     *\\n     * Emits an {Approval} event.\\n     *\\n     * Requirements:\\n     *\\n     * - `owner` cannot be the zero address.\\n     * - `spender` cannot be the zero address.\\n     */\\n    function _approve(\\n        address owner,\\n        address spender,\\n        uint256 amount\\n    ) internal virtual {\\n        require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n        require(spender != address(0), \\\"ERC20: approve to the zero address\\\");\\n\\n        _allowances[owner][spender] = amount;\\n        emit Approval(owner, spender, amount);\\n    }\\n\\n    /**\\n     * @dev Hook that is called before any transfer of tokens. This includes\\n     * minting and burning.\\n     *\\n     * Calling conditions:\\n     *\\n     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n     * will be transferred to `to`.\\n     * - when `from` is zero, `amount` tokens will be minted for `to`.\\n     * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n     * - `from` and `to` are never both zero.\\n     *\\n     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n     */\\n    function _beforeTokenTransfer(\\n        address from,\\n        address to,\\n        uint256 amount\\n    ) internal virtual {}\\n\\n    /**\\n     * @dev Hook that is called after any transfer of tokens. This includes\\n     * minting and burning.\\n     *\\n     * Calling conditions:\\n     *\\n     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n     * has been transferred to `to`.\\n     * - when `from` is zero, `amount` tokens have been minted for `to`.\\n     * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\\n     * - `from` and `to` are never both zero.\\n     *\\n     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n     */\\n    function _afterTokenTransfer(\\n        address from,\\n        address to,\\n        uint256 amount\\n    ) internal virtual {}\\n    uint256[45] private __gap;\\n}\\n\",\"keccak256\":\"0x891fbf39ac5b9524f417db912d33684f239195a0fc5c11db439659676e51aab6\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20Upgradeable {\\n    /**\\n     * @dev Returns the amount of tokens in existence.\\n     */\\n    function totalSupply() external view returns (uint256);\\n\\n    /**\\n     * @dev Returns the amount of tokens owned by `account`.\\n     */\\n    function balanceOf(address account) external view returns (uint256);\\n\\n    /**\\n     * @dev Moves `amount` tokens from the caller's account to `recipient`.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transfer(address recipient, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Returns the remaining number of tokens that `spender` will be\\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n     * zero by default.\\n     *\\n     * This value changes when {approve} or {transferFrom} are called.\\n     */\\n    function allowance(address owner, address spender) external view returns (uint256);\\n\\n    /**\\n     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n     * that someone may use both the old and the new allowance by unfortunate\\n     * transaction ordering. One possible solution to mitigate this race\\n     * condition is to first reduce the spender's allowance to 0 and set the\\n     * desired value afterwards:\\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n     *\\n     * Emits an {Approval} event.\\n     */\\n    function approve(address spender, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Moves `amount` tokens from `sender` to `recipient` using the\\n     * allowance mechanism. `amount` is then deducted from the caller's\\n     * allowance.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transferFrom(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) external returns (bool);\\n\\n    /**\\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n     * another (`to`).\\n     *\\n     * Note that `value` may be zero.\\n     */\\n    event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n    /**\\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n     * a call to {approve}. `value` is the new allowance.\\n     */\\n    event Approval(address indexed owner, address indexed spender, uint256 value);\\n}\\n\",\"keccak256\":\"0xf449ca0a763d4b1b4462cf8706857074492f324020a2b9d099181b5383055ad3\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20MetadataUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20Upgradeable.sol\\\";\\n\\n/**\\n * @dev Interface for the optional metadata functions from the ERC20 standard.\\n *\\n * _Available since v4.1._\\n */\\ninterface IERC20MetadataUpgradeable is IERC20Upgradeable {\\n    /**\\n     * @dev Returns the name of the token.\\n     */\\n    function name() external view returns (string memory);\\n\\n    /**\\n     * @dev Returns the symbol of the token.\\n     */\\n    function symbol() external view returns (string memory);\\n\\n    /**\\n     * @dev Returns the decimals places of the token.\\n     */\\n    function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x6795c369a4eefa78468e38966f7851fbc2dda5e5b9ccd3fa2b45970e2e4d3abd\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract ContextUpgradeable is Initializable {\\n    function __Context_init() internal initializer {\\n        __Context_init_unchained();\\n    }\\n\\n    function __Context_init_unchained() internal initializer {\\n    }\\n    function _msgSender() internal view virtual returns (address) {\\n        return msg.sender;\\n    }\\n\\n    function _msgData() internal view virtual returns (bytes calldata) {\\n        return msg.data;\\n    }\\n    uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x062b5a0f7cc6b0528fa350033759f3a15ba42afb57423d7c593753860f2c82e0\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n    /**\\n     * @dev Returns the amount of tokens in existence.\\n     */\\n    function totalSupply() external view returns (uint256);\\n\\n    /**\\n     * @dev Returns the amount of tokens owned by `account`.\\n     */\\n    function balanceOf(address account) external view returns (uint256);\\n\\n    /**\\n     * @dev Moves `amount` tokens from the caller's account to `recipient`.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transfer(address recipient, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Returns the remaining number of tokens that `spender` will be\\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n     * zero by default.\\n     *\\n     * This value changes when {approve} or {transferFrom} are called.\\n     */\\n    function allowance(address owner, address spender) external view returns (uint256);\\n\\n    /**\\n     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n     * that someone may use both the old and the new allowance by unfortunate\\n     * transaction ordering. One possible solution to mitigate this race\\n     * condition is to first reduce the spender's allowance to 0 and set the\\n     * desired value afterwards:\\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n     *\\n     * Emits an {Approval} event.\\n     */\\n    function approve(address spender, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Moves `amount` tokens from `sender` to `recipient` using the\\n     * allowance mechanism. `amount` is then deducted from the caller's\\n     * allowance.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transferFrom(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) external returns (bool);\\n\\n    /**\\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n     * another (`to`).\\n     *\\n     * Note that `value` may be zero.\\n     */\\n    event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n    /**\\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n     * a call to {approve}. `value` is the new allowance.\\n     */\\n    event Approval(address indexed owner, address indexed spender, uint256 value);\\n}\\n\",\"keccak256\":\"0x027b891937d20ccf213fdb9c31531574256de774bda99d3a70ecef6e1913ed2a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\nimport \\\"../../../utils/Address.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\\n * contract returns false). Tokens that return no value (and instead revert or\\n * throw on failure) are also supported, non-reverting calls are assumed to be\\n * successful.\\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\n */\\nlibrary SafeERC20 {\\n    using Address for address;\\n\\n    function safeTransfer(\\n        IERC20 token,\\n        address to,\\n        uint256 value\\n    ) internal {\\n        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n    }\\n\\n    function safeTransferFrom(\\n        IERC20 token,\\n        address from,\\n        address to,\\n        uint256 value\\n    ) internal {\\n        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n    }\\n\\n    /**\\n     * @dev Deprecated. This function has issues similar to the ones found in\\n     * {IERC20-approve}, and its usage is discouraged.\\n     *\\n     * Whenever possible, use {safeIncreaseAllowance} and\\n     * {safeDecreaseAllowance} instead.\\n     */\\n    function safeApprove(\\n        IERC20 token,\\n        address spender,\\n        uint256 value\\n    ) internal {\\n        // safeApprove should only be called when setting an initial allowance,\\n        // or when resetting it to zero. To increase and decrease it, use\\n        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\\n        require(\\n            (value == 0) || (token.allowance(address(this), spender) == 0),\\n            \\\"SafeERC20: approve from non-zero to non-zero allowance\\\"\\n        );\\n        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\\n    }\\n\\n    function safeIncreaseAllowance(\\n        IERC20 token,\\n        address spender,\\n        uint256 value\\n    ) internal {\\n        uint256 newAllowance = token.allowance(address(this), spender) + value;\\n        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n    }\\n\\n    function safeDecreaseAllowance(\\n        IERC20 token,\\n        address spender,\\n        uint256 value\\n    ) internal {\\n        unchecked {\\n            uint256 oldAllowance = token.allowance(address(this), spender);\\n            require(oldAllowance >= value, \\\"SafeERC20: decreased allowance below zero\\\");\\n            uint256 newAllowance = oldAllowance - value;\\n            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n        }\\n    }\\n\\n    /**\\n     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n     * on the return value: the return value is optional (but if data is returned, it must not be false).\\n     * @param token The token targeted by the call.\\n     * @param data The call data (encoded using abi.encode or one of its variants).\\n     */\\n    function _callOptionalReturn(IERC20 token, bytes memory data) private {\\n        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that\\n        // the target address contains contract code and also asserts for success in the low-level call.\\n\\n        bytes memory returndata = address(token).functionCall(data, \\\"SafeERC20: low-level call failed\\\");\\n        if (returndata.length > 0) {\\n            // Return data is optional\\n            require(abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x02348b2e4b9f3200c7e3907c5c2661643a6d8520e9f79939fbb9b4005a54894d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n    /**\\n     * @dev Returns true if `account` is a contract.\\n     *\\n     * [IMPORTANT]\\n     * ====\\n     * It is unsafe to assume that an address for which this function returns\\n     * false is an externally-owned account (EOA) and not a contract.\\n     *\\n     * Among others, `isContract` will return false for the following\\n     * types of addresses:\\n     *\\n     *  - an externally-owned account\\n     *  - a contract in construction\\n     *  - an address where a contract will be created\\n     *  - an address where a contract lived, but was destroyed\\n     * ====\\n     */\\n    function isContract(address account) internal view returns (bool) {\\n        // This method relies on extcodesize, which returns 0 for contracts in\\n        // construction, since the code is only stored at the end of the\\n        // constructor execution.\\n\\n        uint256 size;\\n        assembly {\\n            size := extcodesize(account)\\n        }\\n        return size > 0;\\n    }\\n\\n    /**\\n     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n     * `recipient`, forwarding all available gas and reverting on errors.\\n     *\\n     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n     * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n     * imposed by `transfer`, making them unable to receive funds via\\n     * `transfer`. {sendValue} removes this limitation.\\n     *\\n     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n     *\\n     * IMPORTANT: because control is transferred to `recipient`, care must be\\n     * taken to not create reentrancy vulnerabilities. Consider using\\n     * {ReentrancyGuard} or the\\n     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n     */\\n    function sendValue(address payable recipient, uint256 amount) internal {\\n        require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n        (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n        require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n    }\\n\\n    /**\\n     * @dev Performs a Solidity function call using a low level `call`. A\\n     * plain `call` is an unsafe replacement for a function call: use this\\n     * function instead.\\n     *\\n     * If `target` reverts with a revert reason, it is bubbled up by this\\n     * function (like regular Solidity function calls).\\n     *\\n     * Returns the raw returned data. To convert to the expected return value,\\n     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n     *\\n     * Requirements:\\n     *\\n     * - `target` must be a contract.\\n     * - calling `target` with `data` must not revert.\\n     *\\n     * _Available since v3.1._\\n     */\\n    function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n        return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n    }\\n\\n    /**\\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n     * `errorMessage` as a fallback revert reason when `target` reverts.\\n     *\\n     * _Available since v3.1._\\n     */\\n    function functionCall(\\n        address target,\\n        bytes memory data,\\n        string memory errorMessage\\n    ) internal returns (bytes memory) {\\n        return functionCallWithValue(target, data, 0, errorMessage);\\n    }\\n\\n    /**\\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n     * but also transferring `value` wei to `target`.\\n     *\\n     * Requirements:\\n     *\\n     * - the calling contract must have an ETH balance of at least `value`.\\n     * - the called Solidity function must be `payable`.\\n     *\\n     * _Available since v3.1._\\n     */\\n    function functionCallWithValue(\\n        address target,\\n        bytes memory data,\\n        uint256 value\\n    ) internal returns (bytes memory) {\\n        return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n    }\\n\\n    /**\\n     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n     * with `errorMessage` as a fallback revert reason when `target` reverts.\\n     *\\n     * _Available since v3.1._\\n     */\\n    function functionCallWithValue(\\n        address target,\\n        bytes memory data,\\n        uint256 value,\\n        string memory errorMessage\\n    ) internal returns (bytes memory) {\\n        require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n        require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n        (bool success, bytes memory returndata) = target.call{value: value}(data);\\n        return verifyCallResult(success, returndata, errorMessage);\\n    }\\n\\n    /**\\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n     * but performing a static call.\\n     *\\n     * _Available since v3.3._\\n     */\\n    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n        return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n    }\\n\\n    /**\\n     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n     * but performing a static call.\\n     *\\n     * _Available since v3.3._\\n     */\\n    function functionStaticCall(\\n        address target,\\n        bytes memory data,\\n        string memory errorMessage\\n    ) internal view returns (bytes memory) {\\n        require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n        (bool success, bytes memory returndata) = target.staticcall(data);\\n        return verifyCallResult(success, returndata, errorMessage);\\n    }\\n\\n    /**\\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n     * but performing a delegate call.\\n     *\\n     * _Available since v3.4._\\n     */\\n    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n        return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n    }\\n\\n    /**\\n     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n     * but performing a delegate call.\\n     *\\n     * _Available since v3.4._\\n     */\\n    function functionDelegateCall(\\n        address target,\\n        bytes memory data,\\n        string memory errorMessage\\n    ) internal returns (bytes memory) {\\n        require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n        (bool success, bytes memory returndata) = target.delegatecall(data);\\n        return verifyCallResult(success, returndata, errorMessage);\\n    }\\n\\n    /**\\n     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n     * revert reason using the provided one.\\n     *\\n     * _Available since v4.3._\\n     */\\n    function verifyCallResult(\\n        bool success,\\n        bytes memory returndata,\\n        string memory errorMessage\\n    ) internal pure returns (bytes memory) {\\n        if (success) {\\n            return returndata;\\n        } else {\\n            // Look for revert reason and bubble it up if present\\n            if (returndata.length > 0) {\\n                // The easiest way to bubble the revert reason is using memory via assembly\\n\\n                assembly {\\n                    let returndata_size := mload(returndata)\\n                    revert(add(32, returndata), returndata_size)\\n                }\\n            } else {\\n                revert(errorMessage);\\n            }\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x3336baae5cf23e94274d75336e2d412193be508504aee185e61dc7d58cd05c8a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n// CAUTION\\n// This version of SafeMath should only be used with Solidity 0.8 or later,\\n// because it relies on the compiler's built in overflow checks.\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations.\\n *\\n * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler\\n * now has built in overflow checking.\\n */\\nlibrary SafeMath {\\n    /**\\n     * @dev Returns the addition of two unsigned integers, with an overflow flag.\\n     *\\n     * _Available since v3.4._\\n     */\\n    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n        unchecked {\\n            uint256 c = a + b;\\n            if (c < a) return (false, 0);\\n            return (true, c);\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns the substraction of two unsigned integers, with an overflow flag.\\n     *\\n     * _Available since v3.4._\\n     */\\n    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n        unchecked {\\n            if (b > a) return (false, 0);\\n            return (true, a - b);\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n     *\\n     * _Available since v3.4._\\n     */\\n    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n        unchecked {\\n            // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n            // benefit is lost if 'b' is also tested.\\n            // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n            if (a == 0) return (true, 0);\\n            uint256 c = a * b;\\n            if (c / a != b) return (false, 0);\\n            return (true, c);\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n     *\\n     * _Available since v3.4._\\n     */\\n    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n        unchecked {\\n            if (b == 0) return (false, 0);\\n            return (true, a / b);\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n     *\\n     * _Available since v3.4._\\n     */\\n    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n        unchecked {\\n            if (b == 0) return (false, 0);\\n            return (true, a % b);\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns the addition of two unsigned integers, reverting on\\n     * overflow.\\n     *\\n     * Counterpart to Solidity's `+` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - Addition cannot overflow.\\n     */\\n    function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return a + b;\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two unsigned integers, reverting on\\n     * overflow (when the result is negative).\\n     *\\n     * Counterpart to Solidity's `-` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - Subtraction cannot overflow.\\n     */\\n    function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return a - b;\\n    }\\n\\n    /**\\n     * @dev Returns the multiplication of two unsigned integers, reverting on\\n     * overflow.\\n     *\\n     * Counterpart to Solidity's `*` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - Multiplication cannot overflow.\\n     */\\n    function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return a * b;\\n    }\\n\\n    /**\\n     * @dev Returns the integer division of two unsigned integers, reverting on\\n     * division by zero. The result is rounded towards zero.\\n     *\\n     * Counterpart to Solidity's `/` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - The divisor cannot be zero.\\n     */\\n    function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return a / b;\\n    }\\n\\n    /**\\n     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n     * reverting when dividing by zero.\\n     *\\n     * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n     * opcode (which leaves remaining gas untouched) while Solidity uses an\\n     * invalid opcode to revert (consuming all remaining gas).\\n     *\\n     * Requirements:\\n     *\\n     * - The divisor cannot be zero.\\n     */\\n    function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return a % b;\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\\n     * overflow (when the result is negative).\\n     *\\n     * CAUTION: This function is deprecated because it requires allocating memory for the error\\n     * message unnecessarily. For custom revert reasons use {trySub}.\\n     *\\n     * Counterpart to Solidity's `-` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - Subtraction cannot overflow.\\n     */\\n    function sub(\\n        uint256 a,\\n        uint256 b,\\n        string memory errorMessage\\n    ) internal pure returns (uint256) {\\n        unchecked {\\n            require(b <= a, errorMessage);\\n            return a - b;\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n     * division by zero. The result is rounded towards zero.\\n     *\\n     * Counterpart to Solidity's `/` operator. Note: this function uses a\\n     * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n     * uses an invalid opcode to revert (consuming all remaining gas).\\n     *\\n     * Requirements:\\n     *\\n     * - The divisor cannot be zero.\\n     */\\n    function div(\\n        uint256 a,\\n        uint256 b,\\n        string memory errorMessage\\n    ) internal pure returns (uint256) {\\n        unchecked {\\n            require(b > 0, errorMessage);\\n            return a / b;\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n     * reverting with custom message when dividing by zero.\\n     *\\n     * CAUTION: This function is deprecated because it requires allocating memory for the error\\n     * message unnecessarily. For custom revert reasons use {tryMod}.\\n     *\\n     * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n     * opcode (which leaves remaining gas untouched) while Solidity uses an\\n     * invalid opcode to revert (consuming all remaining gas).\\n     *\\n     * Requirements:\\n     *\\n     * - The divisor cannot be zero.\\n     */\\n    function mod(\\n        uint256 a,\\n        uint256 b,\\n        string memory errorMessage\\n    ) internal pure returns (uint256) {\\n        unchecked {\\n            require(b > 0, errorMessage);\\n            return a % b;\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x8666f020bd8fc9dc14f07e2ebc52b5f236ab4cdde7c77679b08cb2f94730043b\",\"license\":\"MIT\"},\"contracts/interfaces/GammaInterface.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity =0.8.4;\\n\\nlibrary GammaTypes {\\n    // vault is a struct of 6 arrays that describe a position a user has, a user can have multiple vaults.\\n    struct Vault {\\n        // addresses of oTokens a user has shorted (i.e. written) against this vault\\n        address[] shortOtokens;\\n        // addresses of oTokens a user has bought and deposited in this vault\\n        // user can be long oTokens without opening a vault (e.g. by buying on a DEX)\\n        // generally, long oTokens will be 'deposited' in vaults to act as collateral\\n        // in order to write oTokens against (i.e. in spreads)\\n        address[] longOtokens;\\n        // addresses of other ERC-20s a user has deposited as collateral in this vault\\n        address[] collateralAssets;\\n        // quantity of oTokens minted/written for each oToken address in shortOtokens\\n        uint256[] shortAmounts;\\n        // quantity of oTokens owned and held in the vault for each oToken address in longOtokens\\n        uint256[] longAmounts;\\n        // quantity of ERC-20 deposited as collateral in the vault for each ERC-20 address in collateralAssets\\n        uint256[] collateralAmounts;\\n    }\\n}\\n\\ninterface IOtoken {\\n    function underlyingAsset() external view returns (address);\\n\\n    function strikeAsset() external view returns (address);\\n\\n    function collateralAsset() external view returns (address);\\n\\n    function strikePrice() external view returns (uint256);\\n\\n    function expiryTimestamp() external view returns (uint256);\\n\\n    function isPut() external view returns (bool);\\n\\n    function balanceOf(address) external view returns (uint256);\\n\\n    function totalSupply() external view returns (uint256);\\n\\n    function transfer(address, uint256) external;\\n}\\n\\ninterface IOtokenFactory {\\n    function getOtoken(\\n        address _underlyingAsset,\\n        address _strikeAsset,\\n        address _collateralAsset,\\n        uint256 _strikePrice,\\n        uint256 _expiry,\\n        bool _isPut\\n    ) external view returns (address);\\n\\n    function createOtoken(\\n        address _underlyingAsset,\\n        address _strikeAsset,\\n        address _collateralAsset,\\n        uint256 _strikePrice,\\n        uint256 _expiry,\\n        bool _isPut\\n    ) external returns (address);\\n\\n    function getTargetOtokenAddress(\\n        address _underlyingAsset,\\n        address _strikeAsset,\\n        address _collateralAsset,\\n        uint256 _strikePrice,\\n        uint256 _expiry,\\n        bool _isPut\\n    ) external view returns (address);\\n\\n    event OtokenCreated(\\n        address tokenAddress,\\n        address creator,\\n        address indexed underlying,\\n        address indexed strike,\\n        address indexed collateral,\\n        uint256 strikePrice,\\n        uint256 expiry,\\n        bool isPut\\n    );\\n}\\n\\ninterface IController {\\n    // possible actions that can be performed\\n    enum ActionType {\\n        OpenVault,\\n        MintShortOption,\\n        BurnShortOption,\\n        DepositLongOption,\\n        WithdrawLongOption,\\n        DepositCollateral,\\n        WithdrawCollateral,\\n        SettleVault,\\n        Redeem,\\n        Call,\\n        Liquidate\\n    }\\n\\n    struct ActionArgs {\\n        // type of action that is being performed on the system\\n        ActionType actionType;\\n        // address of the account owner\\n        address owner;\\n        // address which we move assets from or to (depending on the action type)\\n        address secondAddress;\\n        // asset that is to be transfered\\n        address asset;\\n        // index of the vault that is to be modified (if any)\\n        uint256 vaultId;\\n        // amount of asset that is to be transfered\\n        uint256 amount;\\n        // each vault can hold multiple short / long / collateral assets\\n        // but we are restricting the scope to only 1 of each in this version\\n        // in future versions this would be the index of the short / long / collateral asset that needs to be modified\\n        uint256 index;\\n        // any other data that needs to be passed in for arbitrary function calls\\n        bytes data;\\n    }\\n\\n    struct RedeemArgs {\\n        // address to which we pay out the oToken proceeds\\n        address receiver;\\n        // oToken that is to be redeemed\\n        address otoken;\\n        // amount of oTokens that is to be redeemed\\n        uint256 amount;\\n    }\\n\\n    function getPayout(address _otoken, uint256 _amount)\\n        external\\n        view\\n        returns (uint256);\\n\\n    function operate(ActionArgs[] calldata _actions) external;\\n\\n    function getAccountVaultCounter(address owner)\\n        external\\n        view\\n        returns (uint256);\\n\\n    function oracle() external view returns (address);\\n\\n    function getVault(address _owner, uint256 _vaultId)\\n        external\\n        view\\n        returns (GammaTypes.Vault memory);\\n\\n    function getProceed(address _owner, uint256 _vaultId)\\n        external\\n        view\\n        returns (uint256);\\n\\n    function isSettlementAllowed(\\n        address _underlying,\\n        address _strike,\\n        address _collateral,\\n        uint256 _expiry\\n    ) external view returns (bool);\\n}\\n\\ninterface IOracle {\\n    function setAssetPricer(address _asset, address _pricer) external;\\n\\n    function updateAssetPricer(address _asset, address _pricer) external;\\n\\n    function getPrice(address _asset) external view returns (uint256);\\n\\n    function getExpiryPrice(address _asset, uint256 _expiryTimestamp)\\n        external\\n        view\\n        returns (uint256);\\n}\\n\",\"keccak256\":\"0x7f04fccbd7627de0133f3c0f71e09c789e6b691546b92da99dbce77046ba3c86\",\"license\":\"MIT\"},\"contracts/interfaces/IERC20Detailed.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity =0.8.4;\\n\\nimport {IERC20} from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\ninterface IERC20Detailed is IERC20 {\\n    function decimals() external view returns (uint8);\\n\\n    function symbol() external view returns (string calldata);\\n\\n    function name() external view returns (string calldata);\\n}\\n\",\"keccak256\":\"0x90fd29862ecc4bc1f2ee3e4d5c42364c5fbcc0f43f907d2bb82665f93df0d218\",\"license\":\"MIT\"},\"contracts/interfaces/IGnosisAuction.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity =0.8.4;\\n\\nimport {IERC20} from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\nlibrary AuctionType {\\n    struct AuctionData {\\n        IERC20 auctioningToken;\\n        IERC20 biddingToken;\\n        uint256 orderCancellationEndDate;\\n        uint256 auctionEndDate;\\n        bytes32 initialAuctionOrder;\\n        uint256 minimumBiddingAmountPerOrder;\\n        uint256 interimSumBidAmount;\\n        bytes32 interimOrder;\\n        bytes32 clearingPriceOrder;\\n        uint96 volumeClearingPriceOrder;\\n        bool minFundingThresholdNotReached;\\n        bool isAtomicClosureAllowed;\\n        uint256 feeNumerator;\\n        uint256 minFundingThreshold;\\n    }\\n}\\n\\ninterface IGnosisAuction {\\n    function initiateAuction(\\n        address _auctioningToken,\\n        address _biddingToken,\\n        uint256 orderCancellationEndDate,\\n        uint256 auctionEndDate,\\n        uint96 _auctionedSellAmount,\\n        uint96 _minBuyAmount,\\n        uint256 minimumBiddingAmountPerOrder,\\n        uint256 minFundingThreshold,\\n        bool isAtomicClosureAllowed,\\n        address accessManagerContract,\\n        bytes memory accessManagerContractData\\n    ) external returns (uint256);\\n\\n    function auctionCounter() external view returns (uint256);\\n\\n    function auctionData(uint256 auctionId)\\n        external\\n        view\\n        returns (AuctionType.AuctionData memory);\\n\\n    function auctionAccessManager(uint256 auctionId)\\n        external\\n        view\\n        returns (address);\\n\\n    function auctionAccessData(uint256 auctionId)\\n        external\\n        view\\n        returns (bytes memory);\\n\\n    function FEE_DENOMINATOR() external view returns (uint256);\\n\\n    function feeNumerator() external view returns (uint256);\\n\\n    function settleAuction(uint256 auctionId) external returns (bytes32);\\n\\n    function placeSellOrders(\\n        uint256 auctionId,\\n        uint96[] memory _minBuyAmounts,\\n        uint96[] memory _sellAmounts,\\n        bytes32[] memory _prevSellOrders,\\n        bytes calldata allowListCallData\\n    ) external returns (uint64);\\n\\n    function claimFromParticipantOrder(\\n        uint256 auctionId,\\n        bytes32[] memory orders\\n    ) external returns (uint256, uint256);\\n}\\n\",\"keccak256\":\"0x226639ee48018ec78891a829816799c9b9f6bbec7e84c4ca43cdc7dc8a07628f\",\"license\":\"MIT\"},\"contracts/interfaces/ILiquidityGauge.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity =0.8.4;\\n\\ninterface ILiquidityGauge {\\n    function balanceOf(address) external view returns (uint256);\\n\\n    function deposit(\\n        uint256 _value,\\n        address _addr,\\n        bool _claim_rewards\\n    ) external;\\n\\n    function withdraw(uint256 _value) external;\\n}\\n\",\"keccak256\":\"0x0865aecb52ae4467761aa81e48957cde1c5486e270b4a671f8ff07861b801105\",\"license\":\"MIT\"},\"contracts/interfaces/IOptionsPurchaseQueue.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.0;\\n\\ninterface IOptionsPurchaseQueue {\\n    /**\\n     * @dev Contains purchase request info\\n     * @param optionsAmount Amount of options to purchase\\n     * @param premiums Total premiums the buyer is spending to purchase the options (optionsAmount * ceilingPrice)\\n     *  We need to track the premiums here since the ceilingPrice could change between the time the purchase was\\n     *  requested and when the options are sold\\n     * @param buyer The buyer requesting this purchase\\n     */\\n    struct Purchase {\\n        uint128 optionsAmount; // Slot 0\\n        uint128 premiums;\\n        address buyer; // Slot 1\\n    }\\n\\n    function purchases(address, uint256)\\n        external\\n        view\\n        returns (\\n            uint128,\\n            uint128,\\n            address\\n        );\\n\\n    function totalOptionsAmount(address) external view returns (uint256);\\n\\n    function vaultAllocatedOptions(address) external view returns (uint256);\\n\\n    function whitelistedBuyer(address) external view returns (bool);\\n\\n    function minPurchaseAmount(address) external view returns (uint256);\\n\\n    function ceilingPrice(address) external view returns (uint256);\\n\\n    function getPurchases(address vault)\\n        external\\n        view\\n        returns (Purchase[] memory);\\n\\n    function getPremiums(address vault, uint256 optionsAmount)\\n        external\\n        view\\n        returns (uint256);\\n\\n    function getOptionsAllocation(address vault, uint256 allocatedOptions)\\n        external\\n        view\\n        returns (uint256);\\n\\n    function requestPurchase(address vault, uint256 optionsAmount)\\n        external\\n        returns (uint256);\\n\\n    function allocateOptions(uint256 allocatedOptions)\\n        external\\n        returns (uint256);\\n\\n    function sellToBuyers(uint256 settlementPrice) external returns (uint256);\\n\\n    function cancelAllPurchases(address vault) external;\\n\\n    function addWhitelist(address buyer) external;\\n\\n    function removeWhitelist(address buyer) external;\\n\\n    function setCeilingPrice(address vault, uint256 price) external;\\n\\n    function setMinPurchaseAmount(address vault, uint256 amount) external;\\n}\\n\",\"keccak256\":\"0x3033ae23c42a0da011d8e43d911ec7d999ccbc18a73e24098dfd202a71000086\",\"license\":\"MIT\"},\"contracts/interfaces/IRibbon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity =0.8.4;\\nimport {Vault} from \\\"../libraries/Vault.sol\\\";\\n\\ninterface IRibbonVault {\\n    function deposit(uint256 amount) external;\\n\\n    function depositETH() external payable;\\n\\n    function cap() external view returns (uint256);\\n\\n    function depositFor(uint256 amount, address creditor) external;\\n\\n    function vaultParams() external view returns (Vault.VaultParams memory);\\n}\\n\\ninterface IStrikeSelection {\\n    function getStrikePrice(uint256 expiryTimestamp, bool isPut)\\n        external\\n        view\\n        returns (uint256, uint256);\\n\\n    function delta() external view returns (uint256);\\n}\\n\\ninterface IOptionsPremiumPricer {\\n    function getPremium(\\n        uint256 strikePrice,\\n        uint256 timeToExpiry,\\n        bool isPut\\n    ) external view returns (uint256);\\n\\n    function getPremiumInStables(\\n        uint256 strikePrice,\\n        uint256 timeToExpiry,\\n        bool isPut\\n    ) external view returns (uint256);\\n\\n    function getOptionDelta(\\n        uint256 spotPrice,\\n        uint256 strikePrice,\\n        uint256 volatility,\\n        uint256 expiryTimestamp\\n    ) external view returns (uint256 delta);\\n\\n    function getUnderlyingPrice() external view returns (uint256);\\n\\n    function priceOracle() external view returns (address);\\n\\n    function volatilityOracle() external view returns (address);\\n\\n    function optionId() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0xd9ffea587ce992000d8a9f8d4b1bc8c40008633c35121b3d11ab8c6a7dd5ecbc\",\"license\":\"MIT\"},\"contracts/interfaces/IRibbonThetaVault.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity =0.8.4;\\n\\nimport {Vault} from \\\"../libraries/Vault.sol\\\";\\n\\ninterface IRibbonThetaVault {\\n    function GAMMA_CONTROLLER() external view returns (address);\\n\\n    function currentOption() external view returns (address);\\n\\n    function nextOption() external view returns (address);\\n\\n    function vaultParams() external view returns (Vault.VaultParams memory);\\n\\n    function vaultState() external view returns (Vault.VaultState memory);\\n\\n    function optionState() external view returns (Vault.OptionState memory);\\n\\n    function optionAuctionID() external view returns (uint256);\\n\\n    function pricePerShare() external view returns (uint256);\\n\\n    function roundPricePerShare(uint256) external view returns (uint256);\\n\\n    function symbol() external view returns (string calldata);\\n\\n    function depositFor(uint256 amount, address creditor) external;\\n\\n    function initiateWithdraw(uint256 numShares) external;\\n\\n    function completeWithdraw() external;\\n\\n    function maxRedeem() external;\\n\\n    function commitAndClose() external;\\n\\n    function burnRemainingOTokens() external;\\n}\\n\\ninterface IRibbonTreasuryVault is IRibbonThetaVault {\\n    function period() external view returns (uint256);\\n}\\n\\ninterface IRibbonSTETHVault is IRibbonThetaVault {\\n    function depositYieldTokenFor(uint256 amount, address creditor) external;\\n}\\n\",\"keccak256\":\"0xbf5f4604ae539f792d52f67725230bd401339647ccd99d647f45c3d280afc4b4\",\"license\":\"MIT\"},\"contracts/interfaces/ISwap.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity =0.8.4;\\n\\ninterface ISwap {\\n    struct Offer {\\n        // 32 byte slot 1, partial fill\\n        // Seller wallet address\\n        address seller;\\n        // 32 byte slot 2\\n        // Addess of oToken\\n        address oToken;\\n        // Price per oToken denominated in biddingToken\\n        uint96 minPrice;\\n        // 32 byte slot 3\\n        // ERC20 Token to bid for oToken\\n        address biddingToken;\\n        // Minimum oToken amount acceptable for a single bid\\n        uint96 minBidSize;\\n        // 32 byte slot 4\\n        // Total available oToken amount\\n        uint128 totalSize;\\n        // Remaining available oToken amount\\n        // This figure is updated after each successfull swap\\n        uint128 availableSize;\\n        // 32 byte slot 5\\n        // Amount of biddingToken received\\n        // This figure is updated after each successfull swap\\n        uint256 totalSales;\\n    }\\n\\n    struct Bid {\\n        // ID assigned to offers\\n        uint256 swapId;\\n        // Number only used once for each wallet\\n        uint256 nonce;\\n        // Signer wallet address\\n        address signerWallet;\\n        // Amount of biddingToken offered by signer\\n        uint256 sellAmount;\\n        // Amount of oToken requested by signer\\n        uint256 buyAmount;\\n        // Referrer wallet address\\n        address referrer;\\n        // Signature recovery id\\n        uint8 v;\\n        // r portion of the ECSDA signature\\n        bytes32 r;\\n        // s portion of the ECSDA signature\\n        bytes32 s;\\n    }\\n\\n    struct OfferDetails {\\n        // Seller wallet address\\n        address seller;\\n        // Addess of oToken\\n        address oToken;\\n        // Price per oToken denominated in biddingToken\\n        uint256 minPrice;\\n        // ERC20 Token to bid for oToken\\n        address biddingToken;\\n        // Minimum oToken amount acceptable for a single bid\\n        uint256 minBidSize;\\n    }\\n\\n    event Swap(\\n        uint256 indexed swapId,\\n        uint256 nonce,\\n        address indexed signerWallet,\\n        uint256 signerAmount,\\n        uint256 sellerAmount,\\n        address referrer,\\n        uint256 feeAmount\\n    );\\n\\n    event NewOffer(\\n        uint256 swapId,\\n        address seller,\\n        address oToken,\\n        address biddingToken,\\n        uint256 minPrice,\\n        uint256 minBidSize,\\n        uint256 totalSize\\n    );\\n\\n    event SetFee(address referrer, uint256 fee);\\n\\n    event SetPriceFeed(address asset, address aggregator);\\n\\n    event SettleOffer(uint256 swapId);\\n\\n    event Cancel(uint256 indexed nonce, address indexed signerWallet);\\n\\n    event Authorize(address indexed signer, address indexed signerWallet);\\n\\n    event Revoke(address indexed signer, address indexed signerWallet);\\n\\n    function createOffer(\\n        address oToken,\\n        address biddingToken,\\n        uint96 minPrice,\\n        uint96 minBidSize,\\n        uint128 totalSize\\n    ) external returns (uint256 swapId);\\n\\n    function settleOffer(uint256 swapId, Bid[] calldata bids) external;\\n\\n    function cancelNonce(uint256[] calldata nonces) external;\\n\\n    function check(Bid calldata bid)\\n        external\\n        view\\n        returns (uint256, bytes32[] memory);\\n\\n    function averagePriceForOffer(uint256 swapId)\\n        external\\n        view\\n        returns (uint256);\\n\\n    function authorize(address sender) external;\\n\\n    function revoke() external;\\n\\n    function nonceUsed(address, uint256) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x63869f607e9d427034a928008e429ee2ffee0469717d05a64dc1fbb28db8e1e1\",\"license\":\"MIT\"},\"contracts/interfaces/IVaultPauser.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity =0.8.4;\\n\\ninterface IVaultPauser {\\n    /// @notice pause vault position of an account with max amount\\n    /// @param _account the address of user\\n    /// @param _amount amount of shares\\n    function pausePosition(address _account, uint256 _amount) external;\\n\\n    /// @notice resume vault position of an account with max amount\\n    /// @param _vaultAddress the address of vault\\n    function resumePosition(address _vaultAddress) external;\\n}\\n\",\"keccak256\":\"0x8327eccf3e134700dcf180baa109d55e2225fd3fa5bdfe0dcfc232973c7aa185\",\"license\":\"MIT\"},\"contracts/interfaces/IWETH.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity =0.8.4;\\n\\ninterface IWETH {\\n    function deposit() external payable;\\n\\n    function withdraw(uint256) external;\\n\\n    function balanceOf(address account) external view returns (uint256);\\n\\n    function transfer(address recipient, uint256 amount)\\n        external\\n        returns (bool);\\n\\n    function allowance(address owner, address spender)\\n        external\\n        view\\n        returns (uint256);\\n\\n    function approve(address spender, uint256 amount) external returns (bool);\\n\\n    function transferFrom(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) external returns (bool);\\n\\n    function decimals() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x027f79659aea02845423eb96cfc4f926efb2214745463e3cbcfe4e4c24a065d9\",\"license\":\"MIT\"},\"contracts/libraries/GnosisAuction.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity =0.8.4;\\n\\nimport {SafeMath} from \\\"@openzeppelin/contracts/utils/math/SafeMath.sol\\\";\\nimport {IERC20} from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport {\\n    SafeERC20\\n} from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\nimport {DSMath} from \\\"../vendor/DSMath.sol\\\";\\nimport {IGnosisAuction} from \\\"../interfaces/IGnosisAuction.sol\\\";\\nimport {IOtoken} from \\\"../interfaces/GammaInterface.sol\\\";\\nimport {IOptionsPremiumPricer} from \\\"../interfaces/IRibbon.sol\\\";\\nimport {Vault} from \\\"./Vault.sol\\\";\\nimport {IRibbonThetaVault} from \\\"../interfaces/IRibbonThetaVault.sol\\\";\\n\\nlibrary GnosisAuction {\\n    using SafeMath for uint256;\\n    using SafeERC20 for IERC20;\\n\\n    event InitiateGnosisAuction(\\n        address indexed auctioningToken,\\n        address indexed biddingToken,\\n        uint256 auctionCounter,\\n        address indexed manager\\n    );\\n\\n    event PlaceAuctionBid(\\n        uint256 auctionId,\\n        address indexed auctioningToken,\\n        uint256 sellAmount,\\n        uint256 buyAmount,\\n        address indexed bidder\\n    );\\n\\n    struct AuctionDetails {\\n        address oTokenAddress;\\n        address gnosisEasyAuction;\\n        address asset;\\n        uint256 assetDecimals;\\n        uint256 oTokenPremium;\\n        uint256 duration;\\n    }\\n\\n    struct BidDetails {\\n        address oTokenAddress;\\n        address gnosisEasyAuction;\\n        address asset;\\n        uint256 assetDecimals;\\n        uint256 auctionId;\\n        uint256 lockedBalance;\\n        uint256 optionAllocation;\\n        uint256 optionPremium;\\n        address bidder;\\n    }\\n\\n    function startAuction(AuctionDetails calldata auctionDetails)\\n        internal\\n        returns (uint256 auctionID)\\n    {\\n        uint256 oTokenSellAmount =\\n            getOTokenSellAmount(auctionDetails.oTokenAddress);\\n        require(oTokenSellAmount > 0, \\\"No otokens to sell\\\");\\n\\n        IERC20(auctionDetails.oTokenAddress).safeApprove(\\n            auctionDetails.gnosisEasyAuction,\\n            IERC20(auctionDetails.oTokenAddress).balanceOf(address(this))\\n        );\\n\\n        // minBidAmount is total oTokens to sell * premium per oToken\\n        // shift decimals to correspond to decimals of USDC for puts\\n        // and underlying for calls\\n        uint256 minBidAmount =\\n            DSMath.wmul(\\n                oTokenSellAmount.mul(10**10),\\n                auctionDetails.oTokenPremium\\n            );\\n\\n        minBidAmount = auctionDetails.assetDecimals > 18\\n            ? minBidAmount.mul(10**(auctionDetails.assetDecimals.sub(18)))\\n            : minBidAmount.div(\\n                10**(uint256(18).sub(auctionDetails.assetDecimals))\\n            );\\n\\n        require(\\n            minBidAmount <= type(uint96).max,\\n            \\\"optionPremium * oTokenSellAmount > type(uint96) max value!\\\"\\n        );\\n\\n        uint256 auctionEnd = block.timestamp.add(auctionDetails.duration);\\n\\n        auctionID = IGnosisAuction(auctionDetails.gnosisEasyAuction)\\n            .initiateAuction(\\n            // address of oToken we minted and are selling\\n            auctionDetails.oTokenAddress,\\n            // address of asset we want in exchange for oTokens. Should match vault `asset`\\n            auctionDetails.asset,\\n            // orders can be cancelled at any time during the auction\\n            auctionEnd,\\n            // order will last for `duration`\\n            auctionEnd,\\n            // we are selling all of the otokens minus a fee taken by gnosis\\n            uint96(oTokenSellAmount),\\n            // the minimum we are willing to sell all the oTokens for. A discount is applied on black-scholes price\\n            uint96(minBidAmount),\\n            // the minimum bidding amount must be 1 * 10 ** -assetDecimals\\n            1,\\n            // the min funding threshold\\n            0,\\n            // no atomic closure\\n            false,\\n            // access manager contract\\n            address(0),\\n            // bytes for storing info like a whitelist for who can bid\\n            bytes(\\\"\\\")\\n        );\\n\\n        emit InitiateGnosisAuction(\\n            auctionDetails.oTokenAddress,\\n            auctionDetails.asset,\\n            auctionID,\\n            msg.sender\\n        );\\n    }\\n\\n    function placeBid(BidDetails calldata bidDetails)\\n        internal\\n        returns (\\n            uint256 sellAmount,\\n            uint256 buyAmount,\\n            uint64 userId\\n        )\\n    {\\n        // calculate how much to allocate\\n        sellAmount = bidDetails\\n            .lockedBalance\\n            .mul(bidDetails.optionAllocation)\\n            .div(100 * Vault.OPTION_ALLOCATION_MULTIPLIER);\\n\\n        // divide the `asset` sellAmount by the target premium per oToken to\\n        // get the number of oTokens to buy (8 decimals)\\n        buyAmount = sellAmount\\n            .mul(10**(bidDetails.assetDecimals.add(Vault.OTOKEN_DECIMALS)))\\n            .div(bidDetails.optionPremium)\\n            .div(10**bidDetails.assetDecimals);\\n\\n        require(\\n            sellAmount <= type(uint96).max,\\n            \\\"sellAmount > type(uint96) max value!\\\"\\n        );\\n        require(\\n            buyAmount <= type(uint96).max,\\n            \\\"buyAmount > type(uint96) max value!\\\"\\n        );\\n\\n        // approve that amount\\n        IERC20(bidDetails.asset).safeApprove(\\n            bidDetails.gnosisEasyAuction,\\n            sellAmount\\n        );\\n\\n        uint96[] memory _minBuyAmounts = new uint96[](1);\\n        uint96[] memory _sellAmounts = new uint96[](1);\\n        bytes32[] memory _prevSellOrders = new bytes32[](1);\\n        _minBuyAmounts[0] = uint96(buyAmount);\\n        _sellAmounts[0] = uint96(sellAmount);\\n        _prevSellOrders[\\n            0\\n        ] = 0x0000000000000000000000000000000000000000000000000000000000000001;\\n\\n        // place sell order with that amount\\n        userId = IGnosisAuction(bidDetails.gnosisEasyAuction).placeSellOrders(\\n            bidDetails.auctionId,\\n            _minBuyAmounts,\\n            _sellAmounts,\\n            _prevSellOrders,\\n            \\\"0x\\\"\\n        );\\n\\n        emit PlaceAuctionBid(\\n            bidDetails.auctionId,\\n            bidDetails.oTokenAddress,\\n            sellAmount,\\n            buyAmount,\\n            bidDetails.bidder\\n        );\\n\\n        return (sellAmount, buyAmount, userId);\\n    }\\n\\n    function claimAuctionOtokens(\\n        Vault.AuctionSellOrder calldata auctionSellOrder,\\n        address gnosisEasyAuction,\\n        address counterpartyThetaVault\\n    ) internal {\\n        bytes32 order =\\n            encodeOrder(\\n                auctionSellOrder.userId,\\n                auctionSellOrder.buyAmount,\\n                auctionSellOrder.sellAmount\\n            );\\n        bytes32[] memory orders = new bytes32[](1);\\n        orders[0] = order;\\n        IGnosisAuction(gnosisEasyAuction).claimFromParticipantOrder(\\n            IRibbonThetaVault(counterpartyThetaVault).optionAuctionID(),\\n            orders\\n        );\\n    }\\n\\n    function getOTokenSellAmount(address oTokenAddress)\\n        internal\\n        view\\n        returns (uint256)\\n    {\\n        // We take our current oToken balance. That will be our sell amount\\n        // but otokens will be transferred to gnosis.\\n        uint256 oTokenSellAmount =\\n            IERC20(oTokenAddress).balanceOf(address(this));\\n\\n        require(\\n            oTokenSellAmount <= type(uint96).max,\\n            \\\"oTokenSellAmount > type(uint96) max value!\\\"\\n        );\\n\\n        return oTokenSellAmount;\\n    }\\n\\n    function getOTokenPremiumInStables(\\n        address oTokenAddress,\\n        address optionsPremiumPricer,\\n        uint256 premiumDiscount\\n    ) internal view returns (uint256) {\\n        IOtoken newOToken = IOtoken(oTokenAddress);\\n        IOptionsPremiumPricer premiumPricer =\\n            IOptionsPremiumPricer(optionsPremiumPricer);\\n\\n        // Apply black-scholes formula (from rvol library) to option given its features\\n        // and get price for 100 contracts denominated USDC for both call and put options\\n        uint256 optionPremium =\\n            premiumPricer.getPremiumInStables(\\n                newOToken.strikePrice(),\\n                newOToken.expiryTimestamp(),\\n                newOToken.isPut()\\n            );\\n\\n        // Apply a discount to incentivize arbitraguers\\n        optionPremium = optionPremium.mul(premiumDiscount).div(\\n            100 * Vault.PREMIUM_DISCOUNT_MULTIPLIER\\n        );\\n\\n        require(\\n            optionPremium <= type(uint96).max,\\n            \\\"optionPremium > type(uint96) max value!\\\"\\n        );\\n\\n        return optionPremium;\\n    }\\n\\n    function encodeOrder(\\n        uint64 userId,\\n        uint96 buyAmount,\\n        uint96 sellAmount\\n    ) internal pure returns (bytes32) {\\n        return\\n            bytes32(\\n                (uint256(userId) << 192) +\\n                    (uint256(buyAmount) << 96) +\\n                    uint256(sellAmount)\\n            );\\n    }\\n}\\n\",\"keccak256\":\"0xfbe9e9b0da571d9b83545d3ae71827da0f91bd1c68c6b68955907e6e967e4972\",\"license\":\"MIT\"},\"contracts/libraries/ShareMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity =0.8.4;\\n\\nimport {SafeMath} from \\\"@openzeppelin/contracts/utils/math/SafeMath.sol\\\";\\nimport {Vault} from \\\"./Vault.sol\\\";\\n\\nlibrary ShareMath {\\n    using SafeMath for uint256;\\n\\n    uint256 internal constant PLACEHOLDER_UINT = 1;\\n\\n    function assetToShares(\\n        uint256 assetAmount,\\n        uint256 assetPerShare,\\n        uint256 decimals\\n    ) internal pure returns (uint256) {\\n        // If this throws, it means that vault's roundPricePerShare[currentRound] has not been set yet\\n        // which should never happen.\\n        // Has to be larger than 1 because `1` is used in `initRoundPricePerShares` to prevent cold writes.\\n        require(assetPerShare > PLACEHOLDER_UINT, \\\"Invalid assetPerShare\\\");\\n\\n        return assetAmount.mul(10**decimals).div(assetPerShare);\\n    }\\n\\n    function sharesToAsset(\\n        uint256 shares,\\n        uint256 assetPerShare,\\n        uint256 decimals\\n    ) internal pure returns (uint256) {\\n        // If this throws, it means that vault's roundPricePerShare[currentRound] has not been set yet\\n        // which should never happen.\\n        // Has to be larger than 1 because `1` is used in `initRoundPricePerShares` to prevent cold writes.\\n        require(assetPerShare > PLACEHOLDER_UINT, \\\"Invalid assetPerShare\\\");\\n\\n        return shares.mul(assetPerShare).div(10**decimals);\\n    }\\n\\n    /**\\n     * @notice Returns the shares unredeemed by the user given their DepositReceipt\\n     * @param depositReceipt is the user's deposit receipt\\n     * @param currentRound is the `round` stored on the vault\\n     * @param assetPerShare is the price in asset per share\\n     * @param decimals is the number of decimals the asset/shares use\\n     * @return unredeemedShares is the user's virtual balance of shares that are owed\\n     */\\n    function getSharesFromReceipt(\\n        Vault.DepositReceipt memory depositReceipt,\\n        uint256 currentRound,\\n        uint256 assetPerShare,\\n        uint256 decimals\\n    ) internal pure returns (uint256 unredeemedShares) {\\n        if (depositReceipt.round > 0 && depositReceipt.round < currentRound) {\\n            uint256 sharesFromRound =\\n                assetToShares(depositReceipt.amount, assetPerShare, decimals);\\n\\n            return\\n                uint256(depositReceipt.unredeemedShares).add(sharesFromRound);\\n        }\\n        return depositReceipt.unredeemedShares;\\n    }\\n\\n    function pricePerShare(\\n        uint256 totalSupply,\\n        uint256 totalBalance,\\n        uint256 pendingAmount,\\n        uint256 decimals\\n    ) internal pure returns (uint256) {\\n        uint256 singleShare = 10**decimals;\\n        return\\n            totalSupply > 0\\n                ? singleShare.mul(totalBalance.sub(pendingAmount)).div(\\n                    totalSupply\\n                )\\n                : singleShare;\\n    }\\n\\n    /************************************************\\n     *  HELPERS\\n     ***********************************************/\\n\\n    function assertUint104(uint256 num) internal pure {\\n        require(num <= type(uint104).max, \\\"Overflow uint104\\\");\\n    }\\n\\n    function assertUint128(uint256 num) internal pure {\\n        require(num <= type(uint128).max, \\\"Overflow uint128\\\");\\n    }\\n}\\n\",\"keccak256\":\"0x90bc4b56ee48f314d1e326903bdb2926bed143fa4e6867a7d44975503106bf56\",\"license\":\"MIT\"},\"contracts/libraries/SupportsNonCompliantERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity =0.8.4;\\nimport {IERC20} from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport {\\n    SafeERC20\\n} from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\n\\n/**\\n * This library supports ERC20s that have quirks in their behavior.\\n * One such ERC20 is USDT, which requires allowance to be 0 before calling approve.\\n * We plan to update this library with ERC20s that display such idiosyncratic behavior.\\n */\\nlibrary SupportsNonCompliantERC20 {\\n    address private constant USDT = 0xdAC17F958D2ee523a2206206994597C13D831ec7;\\n\\n    function safeApproveNonCompliant(\\n        IERC20 token,\\n        address spender,\\n        uint256 amount\\n    ) internal {\\n        if (address(token) == USDT) {\\n            SafeERC20.safeApprove(token, spender, 0);\\n        }\\n        SafeERC20.safeApprove(token, spender, amount);\\n    }\\n}\\n\",\"keccak256\":\"0xda967c8a0bcbdf15b1b60c4cba1d0b12aae75431570dfbb5fb06b64162c83cb0\",\"license\":\"MIT\"},\"contracts/libraries/Vault.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity =0.8.4;\\n\\nlibrary Vault {\\n    /************************************************\\n     *  IMMUTABLES & CONSTANTS\\n     ***********************************************/\\n\\n    // Fees are 6-decimal places. For example: 20 * 10**6 = 20%\\n    uint256 internal constant FEE_MULTIPLIER = 10**6;\\n\\n    // Premium discount has 1-decimal place. For example: 80 * 10**1 = 80%. Which represents a 20% discount.\\n    uint256 internal constant PREMIUM_DISCOUNT_MULTIPLIER = 10;\\n\\n    // Otokens have 8 decimal places.\\n    uint256 internal constant OTOKEN_DECIMALS = 8;\\n\\n    // Percentage of funds allocated to options is 2 decimal places. 10 * 10**2 = 10%\\n    uint256 internal constant OPTION_ALLOCATION_MULTIPLIER = 10**2;\\n\\n    // Placeholder uint value to prevent cold writes\\n    uint256 internal constant PLACEHOLDER_UINT = 1;\\n\\n    struct VaultParams {\\n        // Option type the vault is selling\\n        bool isPut;\\n        // Token decimals for vault shares\\n        uint8 decimals;\\n        // Asset used in Theta / Delta Vault\\n        address asset;\\n        // Underlying asset of the options sold by vault\\n        address underlying;\\n        // Minimum supply of the vault shares issued, for ETH it's 10**10\\n        uint56 minimumSupply;\\n        // Vault cap\\n        uint104 cap;\\n    }\\n\\n    struct OptionState {\\n        // Option that the vault is shorting / longing in the next cycle\\n        address nextOption;\\n        // Option that the vault is currently shorting / longing\\n        address currentOption;\\n        // The timestamp when the `nextOption` can be used by the vault\\n        uint32 nextOptionReadyAt;\\n    }\\n\\n    struct VaultState {\\n        // 32 byte slot 1\\n        //  Current round number. `round` represents the number of `period`s elapsed.\\n        uint16 round;\\n        // Amount that is currently locked for selling options\\n        uint104 lockedAmount;\\n        // Amount that was locked for selling options in the previous round\\n        // used for calculating performance fee deduction\\n        uint104 lastLockedAmount;\\n        // 32 byte slot 2\\n        // Stores the total tally of how much of `asset` there is\\n        // to be used to mint rTHETA tokens\\n        uint128 totalPending;\\n        // Total amount of queued withdrawal shares from previous rounds (doesn't include the current round)\\n        uint128 queuedWithdrawShares;\\n    }\\n\\n    struct DepositReceipt {\\n        // Maximum of 65535 rounds. Assuming 1 round is 7 days, maximum is 1256 years.\\n        uint16 round;\\n        // Deposit amount, max 20,282,409,603,651 or 20 trillion ETH deposit\\n        uint104 amount;\\n        // Unredeemed shares balance\\n        uint128 unredeemedShares;\\n    }\\n\\n    struct Withdrawal {\\n        // Maximum of 65535 rounds. Assuming 1 round is 7 days, maximum is 1256 years.\\n        uint16 round;\\n        // Number of shares withdrawn\\n        uint128 shares;\\n    }\\n\\n    struct AuctionSellOrder {\\n        // Amount of `asset` token offered in auction\\n        uint96 sellAmount;\\n        // Amount of oToken requested in auction\\n        uint96 buyAmount;\\n        // User Id of delta vault in latest gnosis auction\\n        uint64 userId;\\n    }\\n}\\n\",\"keccak256\":\"0x3119c096a02be6137015be605caf65412e0dd4b7df5f25e73bab4f88fddfa5d6\",\"license\":\"MIT\"},\"contracts/libraries/VaultLifecycleWithSwap.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity =0.8.4;\\n\\nimport {SafeMath} from \\\"@openzeppelin/contracts/utils/math/SafeMath.sol\\\";\\nimport {IERC20} from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport {\\n    SafeERC20\\n} from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\nimport {Vault} from \\\"./Vault.sol\\\";\\nimport {ShareMath} from \\\"./ShareMath.sol\\\";\\nimport {IStrikeSelection} from \\\"../interfaces/IRibbon.sol\\\";\\nimport {GnosisAuction} from \\\"./GnosisAuction.sol\\\";\\nimport {\\n    IOtokenFactory,\\n    IOtoken,\\n    IController,\\n    GammaTypes\\n} from \\\"../interfaces/GammaInterface.sol\\\";\\nimport {IERC20Detailed} from \\\"../interfaces/IERC20Detailed.sol\\\";\\nimport {ISwap} from \\\"../interfaces/ISwap.sol\\\";\\nimport {IOptionsPurchaseQueue} from \\\"../interfaces/IOptionsPurchaseQueue.sol\\\";\\nimport {SupportsNonCompliantERC20} from \\\"./SupportsNonCompliantERC20.sol\\\";\\nimport {IOptionsPremiumPricer} from \\\"../interfaces/IRibbon.sol\\\";\\n\\nlibrary VaultLifecycleWithSwap {\\n    using SafeMath for uint256;\\n    using SupportsNonCompliantERC20 for IERC20;\\n    using SafeERC20 for IERC20;\\n\\n    struct CommitParams {\\n        address OTOKEN_FACTORY;\\n        address USDC;\\n        address collateralAsset;\\n        address currentOption;\\n        uint256 delay;\\n        uint16 lastStrikeOverrideRound;\\n        uint256 overriddenStrikePrice;\\n        address strikeSelection;\\n        address optionsPremiumPricer;\\n    }\\n\\n    /**\\n     * @notice Sets the next option the vault will be shorting, and calculates its premium for the auction\\n     * @param commitParams is the struct with details on previous option and strike selection details\\n     * @param vaultParams is the struct with vault general data\\n     * @param vaultState is the struct with vault accounting state\\n     * @return otokenAddress is the address of the new option\\n     * @return strikePrice is the strike price of the new option\\n     * @return delta is the delta of the new option\\n     */\\n    function commitNextOption(\\n        CommitParams calldata commitParams,\\n        Vault.VaultParams storage vaultParams,\\n        Vault.VaultState storage vaultState\\n    )\\n        external\\n        returns (\\n            address otokenAddress,\\n            uint256 strikePrice,\\n            uint256 delta\\n        )\\n    {\\n        uint256 expiry = getNextExpiry(commitParams.currentOption);\\n\\n        IStrikeSelection selection =\\n            IStrikeSelection(commitParams.strikeSelection);\\n\\n        bool isPut = vaultParams.isPut;\\n        address underlying = vaultParams.underlying;\\n\\n        (strikePrice, delta) = commitParams.lastStrikeOverrideRound ==\\n            vaultState.round\\n            ? (commitParams.overriddenStrikePrice, selection.delta())\\n            : selection.getStrikePrice(expiry, isPut);\\n\\n        require(strikePrice != 0, \\\"!strikePrice\\\");\\n\\n        // retrieve address if option already exists, or deploy it\\n        otokenAddress = getOrDeployOtoken(\\n            commitParams,\\n            vaultParams,\\n            underlying,\\n            strikePrice,\\n            expiry,\\n            isPut\\n        );\\n\\n        return (otokenAddress, strikePrice, delta);\\n    }\\n\\n    /**\\n     * @notice Verify the otoken has the correct parameters to prevent vulnerability to opyn contract changes\\n     * @param otokenAddress is the address of the otoken\\n     * @param vaultParams is the struct with vault general data\\n     * @param collateralAsset is the address of the collateral asset\\n     * @param USDC is the address of usdc\\n     * @param delay is the delay between commitAndClose and rollToNextOption\\n     */\\n    function verifyOtoken(\\n        address otokenAddress,\\n        Vault.VaultParams storage vaultParams,\\n        address collateralAsset,\\n        address USDC,\\n        uint256 delay\\n    ) private view {\\n        require(otokenAddress != address(0), \\\"!otokenAddress\\\");\\n\\n        IOtoken otoken = IOtoken(otokenAddress);\\n        require(otoken.isPut() == vaultParams.isPut, \\\"Type mismatch\\\");\\n        require(\\n            otoken.underlyingAsset() == vaultParams.underlying,\\n            \\\"Wrong underlyingAsset\\\"\\n        );\\n        require(\\n            otoken.collateralAsset() == collateralAsset,\\n            \\\"Wrong collateralAsset\\\"\\n        );\\n\\n        // we just assume all options use USDC as the strike\\n        require(otoken.strikeAsset() == USDC, \\\"strikeAsset != USDC\\\");\\n\\n        uint256 readyAt = block.timestamp.add(delay);\\n        require(otoken.expiryTimestamp() >= readyAt, \\\"Expiry before delay\\\");\\n    }\\n\\n    /**\\n     * @param decimals is the decimals of the asset\\n     * @param totalBalance is the vault's total asset balance\\n     * @param currentShareSupply is the supply of the shares invoked with totalSupply()\\n     * @param lastQueuedWithdrawAmount is the amount queued for withdrawals from last round\\n     * @param performanceFee is the perf fee percent to charge on premiums\\n     * @param managementFee is the management fee percent to charge on the AUM\\n     */\\n    struct CloseParams {\\n        uint256 decimals;\\n        uint256 totalBalance;\\n        uint256 currentShareSupply;\\n        uint256 lastQueuedWithdrawAmount;\\n        uint256 performanceFee;\\n        uint256 managementFee;\\n        uint256 currentQueuedWithdrawShares;\\n    }\\n\\n    /**\\n     * @notice Calculate the shares to mint, new price per share, and\\n      amount of funds to re-allocate as collateral for the new round\\n     * @param vaultState is the storage variable vaultState passed from RibbonVault\\n     * @param params is the rollover parameters passed to compute the next state\\n     * @return newLockedAmount is the amount of funds to allocate for the new round\\n     * @return queuedWithdrawAmount is the amount of funds set aside for withdrawal\\n     * @return newPricePerShare is the price per share of the new round\\n     * @return mintShares is the amount of shares to mint from deposits\\n     * @return performanceFeeInAsset is the performance fee charged by vault\\n     * @return totalVaultFee is the total amount of fee charged by vault\\n     */\\n    function closeRound(\\n        Vault.VaultState storage vaultState,\\n        CloseParams calldata params\\n    )\\n        external\\n        view\\n        returns (\\n            uint256 newLockedAmount,\\n            uint256 queuedWithdrawAmount,\\n            uint256 newPricePerShare,\\n            uint256 mintShares,\\n            uint256 performanceFeeInAsset,\\n            uint256 totalVaultFee\\n        )\\n    {\\n        uint256 currentBalance = params.totalBalance;\\n        uint256 pendingAmount = vaultState.totalPending;\\n        // Total amount of queued withdrawal shares from previous rounds (doesn't include the current round)\\n        uint256 lastQueuedWithdrawShares = vaultState.queuedWithdrawShares;\\n\\n        // Deduct older queued withdraws so we don't charge fees on them\\n        uint256 balanceForVaultFees =\\n            currentBalance.sub(params.lastQueuedWithdrawAmount);\\n\\n        {\\n            (performanceFeeInAsset, , totalVaultFee) = getVaultFees(\\n                balanceForVaultFees,\\n                vaultState.lastLockedAmount,\\n                vaultState.totalPending,\\n                params.performanceFee,\\n                params.managementFee\\n            );\\n        }\\n\\n        // Take into account the fee\\n        // so we can calculate the newPricePerShare\\n        currentBalance = currentBalance.sub(totalVaultFee);\\n\\n        {\\n            newPricePerShare = ShareMath.pricePerShare(\\n                params.currentShareSupply.sub(lastQueuedWithdrawShares),\\n                currentBalance.sub(params.lastQueuedWithdrawAmount),\\n                pendingAmount,\\n                params.decimals\\n            );\\n\\n            queuedWithdrawAmount = params.lastQueuedWithdrawAmount.add(\\n                ShareMath.sharesToAsset(\\n                    params.currentQueuedWithdrawShares,\\n                    newPricePerShare,\\n                    params.decimals\\n                )\\n            );\\n\\n            // After closing the short, if the options expire in-the-money\\n            // vault pricePerShare would go down because vault's asset balance decreased.\\n            // This ensures that the newly-minted shares do not take on the loss.\\n            mintShares = ShareMath.assetToShares(\\n                pendingAmount,\\n                newPricePerShare,\\n                params.decimals\\n            );\\n        }\\n\\n        return (\\n            currentBalance.sub(queuedWithdrawAmount), // new locked balance subtracts the queued withdrawals\\n            queuedWithdrawAmount,\\n            newPricePerShare,\\n            mintShares,\\n            performanceFeeInAsset,\\n            totalVaultFee\\n        );\\n    }\\n\\n    /**\\n     * @notice Creates the actual Opyn short position by depositing collateral and minting otokens\\n     * @param gammaController is the address of the opyn controller contract\\n     * @param marginPool is the address of the opyn margin contract which holds the collateral\\n     * @param oTokenAddress is the address of the otoken to mint\\n     * @param depositAmount is the amount of collateral to deposit\\n     * @return the otoken mint amount\\n     */\\n    function createShort(\\n        address gammaController,\\n        address marginPool,\\n        address oTokenAddress,\\n        uint256 depositAmount\\n    ) external returns (uint256) {\\n        IController controller = IController(gammaController);\\n        uint256 newVaultID =\\n            (controller.getAccountVaultCounter(address(this))).add(1);\\n\\n        // An otoken's collateralAsset is the vault's `asset`\\n        // So in the context of performing Opyn short operations we call them collateralAsset\\n        IOtoken oToken = IOtoken(oTokenAddress);\\n        address collateralAsset = oToken.collateralAsset();\\n\\n        uint256 collateralDecimals =\\n            uint256(IERC20Detailed(collateralAsset).decimals());\\n        uint256 mintAmount;\\n\\n        if (oToken.isPut()) {\\n            // For minting puts, there will be instances where the full depositAmount will not be used for minting.\\n            // This is because of an issue with precision.\\n            //\\n            // For ETH put options, we are calculating the mintAmount (10**8 decimals) using\\n            // the depositAmount (10**18 decimals), which will result in truncation of decimals when scaling down.\\n            // As a result, there will be tiny amounts of dust left behind in the Opyn vault when minting put otokens.\\n            //\\n            // For simplicity's sake, we do not refund the dust back to the address(this) on minting otokens.\\n            // We retain the dust in the vault so the calling contract can withdraw the\\n            // actual locked amount + dust at settlement.\\n            //\\n            // To test this behavior, we can console.log\\n            // MarginCalculatorInterface(0x7A48d10f372b3D7c60f6c9770B91398e4ccfd3C7).getExcessCollateral(vault)\\n            // to see how much dust (or excess collateral) is left behind.\\n            mintAmount = depositAmount\\n                .mul(10**Vault.OTOKEN_DECIMALS)\\n                .mul(10**18) // we use 10**18 to give extra precision\\n                .div(oToken.strikePrice().mul(10**(10 + collateralDecimals)));\\n        } else {\\n            mintAmount = depositAmount;\\n\\n            if (collateralDecimals > 8) {\\n                uint256 scaleBy = 10**(collateralDecimals.sub(8)); // oTokens have 8 decimals\\n                if (mintAmount > scaleBy) {\\n                    mintAmount = depositAmount.div(scaleBy); // scale down from 10**18 to 10**8\\n                }\\n            }\\n        }\\n\\n        // double approve to fix non-compliant ERC20s\\n        IERC20 collateralToken = IERC20(collateralAsset);\\n        collateralToken.safeApproveNonCompliant(marginPool, depositAmount);\\n\\n        IController.ActionArgs[] memory actions =\\n            new IController.ActionArgs[](3);\\n\\n        actions[0] = IController.ActionArgs(\\n            IController.ActionType.OpenVault,\\n            address(this), // owner\\n            address(this), // receiver\\n            address(0), // asset, otoken\\n            newVaultID, // vaultId\\n            0, // amount\\n            0, //index\\n            \\\"\\\" //data\\n        );\\n\\n        actions[1] = IController.ActionArgs(\\n            IController.ActionType.DepositCollateral,\\n            address(this), // owner\\n            address(this), // address to transfer from\\n            collateralAsset, // deposited asset\\n            newVaultID, // vaultId\\n            depositAmount, // amount\\n            0, //index\\n            \\\"\\\" //data\\n        );\\n\\n        actions[2] = IController.ActionArgs(\\n            IController.ActionType.MintShortOption,\\n            address(this), // owner\\n            address(this), // address to transfer to\\n            oTokenAddress, // option address\\n            newVaultID, // vaultId\\n            mintAmount, // amount\\n            0, //index\\n            \\\"\\\" //data\\n        );\\n\\n        controller.operate(actions);\\n\\n        return mintAmount;\\n    }\\n\\n    /**\\n     * @notice Close the existing short otoken position. Currently this implementation is simple.\\n     * It closes the most recent vault opened by the contract. This assumes that the contract will\\n     * only have a single vault open at any given time. Since calling `_closeShort` deletes vaults by\\n     calling SettleVault action, this assumption should hold.\\n     * @param gammaController is the address of the opyn controller contract\\n     * @return amount of collateral redeemed from the vault\\n     */\\n    function settleShort(address gammaController) external returns (uint256) {\\n        IController controller = IController(gammaController);\\n\\n        // gets the currently active vault ID\\n        uint256 vaultID = controller.getAccountVaultCounter(address(this));\\n\\n        GammaTypes.Vault memory vault =\\n            controller.getVault(address(this), vaultID);\\n\\n        require(vault.shortOtokens.length > 0, \\\"No short\\\");\\n\\n        // An otoken's collateralAsset is the vault's `asset`\\n        // So in the context of performing Opyn short operations we call them collateralAsset\\n        IERC20 collateralToken = IERC20(vault.collateralAssets[0]);\\n\\n        // The short position has been previously closed, or all the otokens have been burned.\\n        // So we return early.\\n        if (address(collateralToken) == address(0)) {\\n            return 0;\\n        }\\n\\n        // This is equivalent to doing IERC20(vault.asset).balanceOf(address(this))\\n        uint256 startCollateralBalance =\\n            collateralToken.balanceOf(address(this));\\n\\n        // If it is after expiry, we need to settle the short position using the normal way\\n        // Delete the vault and withdraw all remaining collateral from the vault\\n        IController.ActionArgs[] memory actions =\\n            new IController.ActionArgs[](1);\\n\\n        actions[0] = IController.ActionArgs(\\n            IController.ActionType.SettleVault,\\n            address(this), // owner\\n            address(this), // address to transfer to\\n            address(0), // not used\\n            vaultID, // vaultId\\n            0, // not used\\n            0, // not used\\n            \\\"\\\" // not used\\n        );\\n\\n        controller.operate(actions);\\n\\n        uint256 endCollateralBalance = collateralToken.balanceOf(address(this));\\n\\n        return endCollateralBalance.sub(startCollateralBalance);\\n    }\\n\\n    /**\\n     * @notice Exercises the ITM option using existing long otoken position. Currently this implementation is simple.\\n     * It calls the `Redeem` action to claim the payout.\\n     * @param gammaController is the address of the opyn controller contract\\n     * @param oldOption is the address of the old option\\n     * @param asset is the address of the vault's asset\\n     * @return amount of asset received by exercising the option\\n     */\\n    function settleLong(\\n        address gammaController,\\n        address oldOption,\\n        address asset\\n    ) external returns (uint256) {\\n        IController controller = IController(gammaController);\\n\\n        uint256 oldOptionBalance = IERC20(oldOption).balanceOf(address(this));\\n\\n        if (controller.getPayout(oldOption, oldOptionBalance) == 0) {\\n            return 0;\\n        }\\n\\n        uint256 startAssetBalance = IERC20(asset).balanceOf(address(this));\\n\\n        // If it is after expiry, we need to redeem the profits\\n        IController.ActionArgs[] memory actions =\\n            new IController.ActionArgs[](1);\\n\\n        actions[0] = IController.ActionArgs(\\n            IController.ActionType.Redeem,\\n            address(0), // not used\\n            address(this), // address to send profits to\\n            oldOption, // address of otoken\\n            0, // not used\\n            oldOptionBalance, // otoken balance\\n            0, // not used\\n            \\\"\\\" // not used\\n        );\\n\\n        controller.operate(actions);\\n\\n        uint256 endAssetBalance = IERC20(asset).balanceOf(address(this));\\n\\n        return endAssetBalance.sub(startAssetBalance);\\n    }\\n\\n    /**\\n     * @notice Burn the remaining oTokens left over from auction. Currently this implementation is simple.\\n     * It burns oTokens from the most recent vault opened by the contract. This assumes that the contract will\\n     * only have a single vault open at any given time.\\n     * @param gammaController is the address of the opyn controller contract\\n     * @param currentOption is the address of the current option\\n     * @return amount of collateral redeemed by burning otokens\\n     */\\n    function burnOtokens(address gammaController, address currentOption)\\n        external\\n        returns (uint256)\\n    {\\n        uint256 numOTokensToBurn =\\n            IERC20(currentOption).balanceOf(address(this));\\n\\n        require(numOTokensToBurn > 0, \\\"No oTokens to burn\\\");\\n\\n        IController controller = IController(gammaController);\\n\\n        // gets the currently active vault ID\\n        uint256 vaultID = controller.getAccountVaultCounter(address(this));\\n\\n        GammaTypes.Vault memory vault =\\n            controller.getVault(address(this), vaultID);\\n\\n        require(vault.shortOtokens.length > 0, \\\"No short\\\");\\n\\n        IERC20 collateralToken = IERC20(vault.collateralAssets[0]);\\n\\n        uint256 startCollateralBalance =\\n            collateralToken.balanceOf(address(this));\\n\\n        // Burning `amount` of oTokens from the ribbon vault,\\n        // then withdrawing the corresponding collateral amount from the vault\\n        IController.ActionArgs[] memory actions =\\n            new IController.ActionArgs[](2);\\n\\n        actions[0] = IController.ActionArgs(\\n            IController.ActionType.BurnShortOption,\\n            address(this), // owner\\n            address(this), // address to transfer from\\n            address(vault.shortOtokens[0]), // otoken address\\n            vaultID, // vaultId\\n            numOTokensToBurn, // amount\\n            0, //index\\n            \\\"\\\" //data\\n        );\\n\\n        actions[1] = IController.ActionArgs(\\n            IController.ActionType.WithdrawCollateral,\\n            address(this), // owner\\n            address(this), // address to transfer to\\n            address(collateralToken), // withdrawn asset\\n            vaultID, // vaultId\\n            vault.collateralAmounts[0].mul(numOTokensToBurn).div(\\n                vault.shortAmounts[0]\\n            ), // amount\\n            0, //index\\n            \\\"\\\" //data\\n        );\\n\\n        controller.operate(actions);\\n\\n        uint256 endCollateralBalance = collateralToken.balanceOf(address(this));\\n\\n        return endCollateralBalance.sub(startCollateralBalance);\\n    }\\n\\n    /**\\n     * @notice Calculates the performance and management fee for this week's round\\n     * @param currentBalance is the balance of funds held on the vault after closing short\\n     * @param lastLockedAmount is the amount of funds locked from the previous round\\n     * @param pendingAmount is the pending deposit amount\\n     * @param performanceFeePercent is the performance fee pct.\\n     * @param managementFeePercent is the management fee pct.\\n     * @return performanceFeeInAsset is the performance fee\\n     * @return managementFeeInAsset is the management fee\\n     * @return vaultFee is the total fees\\n     */\\n    function getVaultFees(\\n        uint256 currentBalance,\\n        uint256 lastLockedAmount,\\n        uint256 pendingAmount,\\n        uint256 performanceFeePercent,\\n        uint256 managementFeePercent\\n    )\\n        internal\\n        pure\\n        returns (\\n            uint256 performanceFeeInAsset,\\n            uint256 managementFeeInAsset,\\n            uint256 vaultFee\\n        )\\n    {\\n        // At the first round, currentBalance=0, pendingAmount>0\\n        // so we just do not charge anything on the first round\\n        uint256 lockedBalanceSansPending =\\n            currentBalance > pendingAmount\\n                ? currentBalance.sub(pendingAmount)\\n                : 0;\\n\\n        uint256 _performanceFeeInAsset;\\n        uint256 _managementFeeInAsset;\\n        uint256 _vaultFee;\\n\\n        // Take performance fee and management fee ONLY if difference between\\n        // last week and this week's vault deposits, taking into account pending\\n        // deposits and withdrawals, is positive. If it is negative, last week's\\n        // option expired ITM past breakeven, and the vault took a loss so we\\n        // do not collect performance fee for last week\\n        if (lockedBalanceSansPending > lastLockedAmount) {\\n            _performanceFeeInAsset = performanceFeePercent > 0\\n                ? lockedBalanceSansPending\\n                    .sub(lastLockedAmount)\\n                    .mul(performanceFeePercent)\\n                    .div(100 * Vault.FEE_MULTIPLIER)\\n                : 0;\\n            _managementFeeInAsset = managementFeePercent > 0\\n                ? lockedBalanceSansPending.mul(managementFeePercent).div(\\n                    100 * Vault.FEE_MULTIPLIER\\n                )\\n                : 0;\\n\\n            _vaultFee = _performanceFeeInAsset.add(_managementFeeInAsset);\\n        }\\n\\n        return (_performanceFeeInAsset, _managementFeeInAsset, _vaultFee);\\n    }\\n\\n    /**\\n     * @notice Either retrieves the option token if it already exists, or deploy it\\n     * @param commitParams is the struct with details on previous option and strike selection details\\n     * @param vaultParams is the struct with vault general data\\n     * @param underlying is the address of the underlying asset of the option\\n     * @param strikePrice is the strike price of the option\\n     * @param expiry is the expiry timestamp of the option\\n     * @param isPut is whether the option is a put\\n     * @return the address of the option\\n     */\\n    function getOrDeployOtoken(\\n        CommitParams calldata commitParams,\\n        Vault.VaultParams storage vaultParams,\\n        address underlying,\\n        uint256 strikePrice,\\n        uint256 expiry,\\n        bool isPut\\n    ) internal returns (address) {\\n        IOtokenFactory factory = IOtokenFactory(commitParams.OTOKEN_FACTORY);\\n\\n        address otokenFromFactory =\\n            factory.getOtoken(\\n                underlying,\\n                commitParams.USDC,\\n                commitParams.collateralAsset,\\n                strikePrice,\\n                expiry,\\n                isPut\\n            );\\n\\n        if (otokenFromFactory != address(0)) {\\n            return otokenFromFactory;\\n        }\\n\\n        address otoken =\\n            factory.createOtoken(\\n                underlying,\\n                commitParams.USDC,\\n                commitParams.collateralAsset,\\n                strikePrice,\\n                expiry,\\n                isPut\\n            );\\n\\n        verifyOtoken(\\n            otoken,\\n            vaultParams,\\n            commitParams.collateralAsset,\\n            commitParams.USDC,\\n            commitParams.delay\\n        );\\n\\n        return otoken;\\n    }\\n\\n    /**\\n     * @notice Creates an offer in the Swap Contract\\n     * @param currentOtoken is the current otoken address\\n     * @param currOtokenPremium is premium for each otoken\\n     * @param swapContract the address of the swap contract\\n     * @param vaultParams is the struct with vault general data\\n     * @return optionAuctionID auction id of the newly created offer\\n     */\\n    function createOffer(\\n        address currentOtoken,\\n        uint256 currOtokenPremium,\\n        address swapContract,\\n        Vault.VaultParams storage vaultParams\\n    ) external returns (uint256 optionAuctionID) {\\n        require(\\n            currOtokenPremium <= type(uint96).max,\\n            \\\"currentOtokenPremium > type(uint96) max value!\\\"\\n        );\\n        require(currOtokenPremium > 0, \\\"!currentOtokenPremium\\\");\\n\\n        uint256 oTokenBalance = IERC20(currentOtoken).balanceOf(address(this));\\n        require(\\n            oTokenBalance <= type(uint128).max,\\n            \\\"oTokenBalance > type(uint128) max value!\\\"\\n        );\\n\\n        // Use safeIncrease instead of safeApproval because safeApproval is only used for initial\\n        // approval and cannot be called again. Using safeIncrease allow us to call _createOffer\\n        // even when we are approving the same oTokens we have used before. This might happen if\\n        // we accidentally burn the oTokens before settlement.\\n        uint256 allowance =\\n            IERC20(currentOtoken).allowance(address(this), swapContract);\\n\\n        if (allowance < oTokenBalance) {\\n            IERC20(currentOtoken).safeIncreaseAllowance(\\n                swapContract,\\n                oTokenBalance.sub(allowance)\\n            );\\n        }\\n\\n        uint256 decimals = vaultParams.decimals;\\n\\n        // If total size is larger than 1, set minimum bid as 1\\n        // Otherwise, set minimum bid to one tenth the total size\\n        uint256 minBidSize =\\n            oTokenBalance > 10**decimals ? 10**decimals : oTokenBalance.div(10);\\n\\n        require(\\n            minBidSize <= type(uint96).max,\\n            \\\"minBidSize > type(uint96) max value!\\\"\\n        );\\n\\n        currOtokenPremium = decimals > 18\\n            ? currOtokenPremium.mul(10**(decimals.sub(18)))\\n            : currOtokenPremium.div(10**(uint256(18).sub(decimals)));\\n\\n        optionAuctionID = ISwap(swapContract).createOffer(\\n            currentOtoken,\\n            vaultParams.asset,\\n            uint96(currOtokenPremium),\\n            uint96(minBidSize),\\n            uint128(oTokenBalance)\\n        );\\n    }\\n\\n    /**\\n     * @notice Allocates the vault's minted options to the OptionsPurchaseQueue contract\\n     * @dev Skipped if the optionsPurchaseQueue doesn't exist\\n     * @param optionsPurchaseQueue is the OptionsPurchaseQueue contract\\n     * @param option is the minted option\\n     * @param optionsAmount is the amount of options minted\\n     * @param optionAllocation is the maximum % of options to allocate towards the purchase queue (will only allocate\\n     *  up to the amount that is on the queue)\\n     * @return allocatedOptions is the amount of options that ended up getting allocated to the OptionsPurchaseQueue\\n     */\\n    function allocateOptions(\\n        address optionsPurchaseQueue,\\n        address option,\\n        uint256 optionsAmount,\\n        uint256 optionAllocation\\n    ) external returns (uint256 allocatedOptions) {\\n        // Skip if optionsPurchaseQueue is address(0)\\n        if (optionsPurchaseQueue != address(0)) {\\n            allocatedOptions = optionsAmount.mul(optionAllocation).div(\\n                100 * Vault.OPTION_ALLOCATION_MULTIPLIER\\n            );\\n            allocatedOptions = IOptionsPurchaseQueue(optionsPurchaseQueue)\\n                .getOptionsAllocation(address(this), allocatedOptions);\\n\\n            if (allocatedOptions != 0) {\\n                IERC20(option).approve(optionsPurchaseQueue, allocatedOptions);\\n                IOptionsPurchaseQueue(optionsPurchaseQueue).allocateOptions(\\n                    allocatedOptions\\n                );\\n            }\\n        }\\n\\n        return allocatedOptions;\\n    }\\n\\n    /**\\n     * @notice Sell the allocated options to the purchase queue post auction settlement\\n     * @dev Reverts if the auction hasn't settled yet\\n     * @param optionsPurchaseQueue is the OptionsPurchaseQueue contract\\n     * @param swapContract The address of the swap settlement contract\\n     * @return totalPremiums Total premiums earnt by the vault\\n     */\\n    function sellOptionsToQueue(\\n        address optionsPurchaseQueue,\\n        address swapContract,\\n        uint256 optionAuctionID\\n    ) external returns (uint256) {\\n        uint256 settlementPrice =\\n            getAuctionSettlementPrice(swapContract, optionAuctionID);\\n        require(settlementPrice != 0, \\\"!settlementPrice\\\");\\n\\n        return\\n            IOptionsPurchaseQueue(optionsPurchaseQueue).sellToBuyers(\\n                settlementPrice\\n            );\\n    }\\n\\n    /**\\n     * @notice Gets the settlement price of a settled auction\\n     * @param swapContract The address of the swap settlement contract\\n     * @param optionAuctionID is the offer ID\\n     * @return settlementPrice Auction settlement price\\n     */\\n    function getAuctionSettlementPrice(\\n        address swapContract,\\n        uint256 optionAuctionID\\n    ) public view returns (uint256) {\\n        return ISwap(swapContract).averagePriceForOffer(optionAuctionID);\\n    }\\n\\n    /**\\n     * @notice Verify the constructor params satisfy requirements\\n     * @param owner is the owner of the vault with critical permissions\\n     * @param feeRecipient is the address to recieve vault performance and management fees\\n     * @param performanceFee is the perfomance fee pct.\\n     * @param tokenName is the name of the token\\n     * @param tokenSymbol is the symbol of the token\\n     * @param _vaultParams is the struct with vault general data\\n     */\\n    function verifyInitializerParams(\\n        address owner,\\n        address keeper,\\n        address feeRecipient,\\n        uint256 performanceFee,\\n        uint256 managementFee,\\n        string calldata tokenName,\\n        string calldata tokenSymbol,\\n        Vault.VaultParams calldata _vaultParams\\n    ) external pure {\\n        require(owner != address(0), \\\"!owner\\\");\\n        require(keeper != address(0), \\\"!keeper\\\");\\n        require(feeRecipient != address(0), \\\"!feeRecipient\\\");\\n        require(\\n            performanceFee < 100 * Vault.FEE_MULTIPLIER,\\n            \\\"performanceFee >= 100%\\\"\\n        );\\n        require(\\n            managementFee < 100 * Vault.FEE_MULTIPLIER,\\n            \\\"managementFee >= 100%\\\"\\n        );\\n        require(bytes(tokenName).length > 0, \\\"!tokenName\\\");\\n        require(bytes(tokenSymbol).length > 0, \\\"!tokenSymbol\\\");\\n\\n        require(_vaultParams.asset != address(0), \\\"!asset\\\");\\n        require(_vaultParams.underlying != address(0), \\\"!underlying\\\");\\n        require(_vaultParams.minimumSupply > 0, \\\"!minimumSupply\\\");\\n        require(_vaultParams.cap > 0, \\\"!cap\\\");\\n        require(\\n            _vaultParams.cap > _vaultParams.minimumSupply,\\n            \\\"cap has to be higher than minimumSupply\\\"\\n        );\\n    }\\n\\n    /**\\n     * @notice Gets the next option expiry timestamp\\n     * @param currentOption is the otoken address that the vault is currently writing\\n     */\\n    function getNextExpiry(address currentOption)\\n        internal\\n        view\\n        returns (uint256)\\n    {\\n        // uninitialized state\\n        if (currentOption == address(0)) {\\n            return getNextFriday(block.timestamp);\\n        }\\n        uint256 currentExpiry = IOtoken(currentOption).expiryTimestamp();\\n\\n        // After options expiry if no options are written for >1 week\\n        // We need to give the ability continue writing options\\n        if (block.timestamp > currentExpiry + 7 days) {\\n            return getNextFriday(block.timestamp);\\n        }\\n        return getNextFriday(currentExpiry);\\n    }\\n\\n    /**\\n     * @notice Gets the next options expiry timestamp\\n     * @param timestamp is the expiry timestamp of the current option\\n     * Reference: https://codereview.stackexchange.com/a/33532\\n     * Examples:\\n     * getNextFriday(week 1 thursday) -> week 1 friday\\n     * getNextFriday(week 1 friday) -> week 2 friday\\n     * getNextFriday(week 1 saturday) -> week 2 friday\\n     */\\n    function getNextFriday(uint256 timestamp) internal pure returns (uint256) {\\n        // dayOfWeek = 0 (sunday) - 6 (saturday)\\n        uint256 dayOfWeek = ((timestamp / 1 days) + 4) % 7;\\n        uint256 nextFriday = timestamp + ((7 + 5 - dayOfWeek) % 7) * 1 days;\\n        uint256 friday8am = nextFriday - (nextFriday % (24 hours)) + (8 hours);\\n\\n        // If the passed timestamp is day=Friday hour>8am, we simply increment it by a week to next Friday\\n        if (timestamp >= friday8am) {\\n            friday8am += 7 days;\\n        }\\n        return friday8am;\\n    }\\n}\\n\",\"keccak256\":\"0x8c46787cf244c61a0945101272977fd95a7e0ec2c70068561097b8f92ecb3c9a\",\"license\":\"MIT\"},\"contracts/storage/RibbonThetaVaultStorage.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity =0.8.4;\\n\\nabstract contract RibbonThetaVaultStorageV1 {\\n    // Logic contract used to price options\\n    address public optionsPremiumPricer;\\n    // Logic contract used to select strike prices\\n    address public strikeSelection;\\n    // Premium discount on options we are selling (thousandths place: 000 - 999)\\n    uint256 public premiumDiscount;\\n    // Current oToken premium\\n    uint256 public currentOtokenPremium;\\n    // Last round id at which the strike was manually overridden\\n    uint16 public lastStrikeOverrideRound;\\n    // Price last overridden strike set to\\n    uint256 public overriddenStrikePrice;\\n    // Auction duration\\n    uint256 public auctionDuration;\\n    // Auction id of current option\\n    uint256 public optionAuctionID;\\n}\\n\\nabstract contract RibbonThetaVaultStorageV2 {\\n    // Amount locked for scheduled withdrawals last week;\\n    uint256 public lastQueuedWithdrawAmount;\\n}\\n\\nabstract contract RibbonThetaVaultStorageV3 {\\n    // DEPRECATED: Auction will be denominated in USDC if true\\n    bool private _isUsdcAuction;\\n    // DEPRECATED: Path for swaps\\n    bytes private _swapPath;\\n}\\n\\nabstract contract RibbonThetaVaultStorageV4 {\\n    // LiquidityGauge contract for the vault\\n    address public liquidityGauge;\\n}\\n\\nabstract contract RibbonThetaVaultStorageV5 {\\n    // OptionsPurchaseQueue contract for selling options\\n    address public optionsPurchaseQueue;\\n}\\n\\nabstract contract RibbonThetaVaultStorageV6 {\\n    // Queued withdraw shares for the current round\\n    uint256 public currentQueuedWithdrawShares;\\n}\\n\\nabstract contract RibbonThetaVaultStorageV7 {\\n    // Vault Pauser Contract for the vault\\n    address public vaultPauser;\\n}\\n\\nabstract contract RibbonThetaVaultStorageV8 {\\n    // DEPRECATED: Executor role for Swap offers\\n    address private _offerExecutor;\\n}\\n\\n// We are following Compound's method of upgrading new contract implementations\\n// When we need to add new storage variables, we create a new version of RibbonThetaVaultStorage\\n// e.g. RibbonThetaVaultStorage<versionNumber>, so finally it would look like\\n// contract RibbonThetaVaultStorage is RibbonThetaVaultStorageV1, RibbonThetaVaultStorageV2\\nabstract contract RibbonThetaVaultStorage is\\n    RibbonThetaVaultStorageV1,\\n    RibbonThetaVaultStorageV2,\\n    RibbonThetaVaultStorageV3,\\n    RibbonThetaVaultStorageV4,\\n    RibbonThetaVaultStorageV5,\\n    RibbonThetaVaultStorageV6,\\n    RibbonThetaVaultStorageV7,\\n    RibbonThetaVaultStorageV8\\n{\\n\\n}\\n\",\"keccak256\":\"0x39b4f9471e42d509dff2e44f04de23b5e0bc67493110983153fe7e06e2d52c07\",\"license\":\"MIT\"},\"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity =0.8.4;\\n\\nimport {SafeMath} from \\\"@openzeppelin/contracts/utils/math/SafeMath.sol\\\";\\nimport {IERC20} from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport {\\n    SafeERC20\\n} from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\n\\nimport {ISwap} from \\\"../../interfaces/ISwap.sol\\\";\\nimport {\\n    RibbonThetaVaultStorage\\n} from \\\"../../storage/RibbonThetaVaultStorage.sol\\\";\\nimport {Vault} from \\\"../../libraries/Vault.sol\\\";\\nimport {\\n    VaultLifecycleWithSwap\\n} from \\\"../../libraries/VaultLifecycleWithSwap.sol\\\";\\nimport {ShareMath} from \\\"../../libraries/ShareMath.sol\\\";\\nimport {ILiquidityGauge} from \\\"../../interfaces/ILiquidityGauge.sol\\\";\\nimport {RibbonVault} from \\\"./base/RibbonVault.sol\\\";\\nimport {IVaultPauser} from \\\"../../interfaces/IVaultPauser.sol\\\";\\n\\n/**\\n * UPGRADEABILITY: Since we use the upgradeable proxy pattern, we must observe\\n * the inheritance chain closely.\\n * Any changes/appends in storage variable needs to happen in RibbonThetaVaultStorage.\\n * RibbonThetaVault should not inherit from any other contract aside from RibbonVault, RibbonThetaVaultStorage\\n */\\ncontract RibbonThetaVaultWithSwap is RibbonVault, RibbonThetaVaultStorage {\\n    using SafeERC20 for IERC20;\\n    using SafeMath for uint256;\\n    using ShareMath for Vault.DepositReceipt;\\n\\n    /************************************************\\n     *  IMMUTABLES & CONSTANTS\\n     ***********************************************/\\n\\n    /// @notice oTokenFactory is the factory contract used to spawn otokens. Used to lookup otokens.\\n    address public immutable OTOKEN_FACTORY;\\n\\n    // The minimum duration for an option auction.\\n    uint256 private constant MIN_AUCTION_DURATION = 5 minutes;\\n\\n    /************************************************\\n     *  EVENTS\\n     ***********************************************/\\n\\n    event OpenShort(\\n        address indexed options,\\n        uint256 depositAmount,\\n        address indexed manager\\n    );\\n\\n    event CloseShort(\\n        address indexed options,\\n        uint256 withdrawAmount,\\n        address indexed manager\\n    );\\n\\n    event NewOptionStrikeSelected(uint256 strikePrice, uint256 delta);\\n\\n    event AuctionDurationSet(\\n        uint256 auctionDuration,\\n        uint256 newAuctionDuration\\n    );\\n\\n    event InstantWithdraw(\\n        address indexed account,\\n        uint256 amount,\\n        uint256 round\\n    );\\n\\n    event NewOffer(\\n        uint256 swapId,\\n        address seller,\\n        address oToken,\\n        address biddingToken,\\n        uint256 minPrice,\\n        uint256 minBidSize,\\n        uint256 totalSize\\n    );\\n\\n    /************************************************\\n     *  STRUCTS\\n     ***********************************************/\\n\\n    /**\\n     * @notice Initialization parameters for the vault.\\n     * @param _owner is the owner of the vault with critical permissions\\n     * @param _feeRecipient is the address to recieve vault performance and management fees\\n     * @param _managementFee is the management fee pct.\\n     * @param _performanceFee is the perfomance fee pct.\\n     * @param _tokenName is the name of the token\\n     * @param _tokenSymbol is the symbol of the token\\n     * @param _optionsPremiumPricer is the address of the contract with the\\n       black-scholes premium calculation logic\\n     * @param _strikeSelection is the address of the contract with strike selection logic\\n     */\\n    struct InitParams {\\n        address _owner;\\n        address _keeper;\\n        address _feeRecipient;\\n        uint256 _managementFee;\\n        uint256 _performanceFee;\\n        string _tokenName;\\n        string _tokenSymbol;\\n        address _optionsPremiumPricer;\\n        address _strikeSelection;\\n    }\\n\\n    /************************************************\\n     *  CONSTRUCTOR & INITIALIZATION\\n     ***********************************************/\\n\\n    /**\\n     * @notice Initializes the contract with immutable variables\\n     * @param _weth is the Wrapped Ether contract\\n     * @param _usdc is the USDC contract\\n     * @param _oTokenFactory is the contract address for minting new opyn option types (strikes, asset, expiry)\\n     * @param _gammaController is the contract address for opyn actions\\n     * @param _marginPool is the contract address for providing collateral to opyn\\n     * @param _swapContract is the contract address that facilitates bids settlement\\n     */\\n    constructor(\\n        address _weth,\\n        address _usdc,\\n        address _oTokenFactory,\\n        address _gammaController,\\n        address _marginPool,\\n        address _swapContract\\n    ) RibbonVault(_weth, _usdc, _gammaController, _marginPool, _swapContract) {\\n        require(_oTokenFactory != address(0), \\\"!_oTokenFactory\\\");\\n        OTOKEN_FACTORY = _oTokenFactory;\\n    }\\n\\n    /**\\n     * @notice Initializes the OptionVault contract with storage variables.\\n     * @param _initParams is the struct with vault initialization parameters\\n     * @param _vaultParams is the struct with vault general data\\n     */\\n    function initialize(\\n        InitParams calldata _initParams,\\n        Vault.VaultParams calldata _vaultParams\\n    ) external initializer {\\n        baseInitialize(\\n            _initParams._owner,\\n            _initParams._keeper,\\n            _initParams._feeRecipient,\\n            _initParams._managementFee,\\n            _initParams._performanceFee,\\n            _initParams._tokenName,\\n            _initParams._tokenSymbol,\\n            _vaultParams\\n        );\\n        require(\\n            _initParams._optionsPremiumPricer != address(0),\\n            \\\"!_optionsPremiumPricer\\\"\\n        );\\n        require(\\n            _initParams._strikeSelection != address(0),\\n            \\\"!_strikeSelection\\\"\\n        );\\n\\n        optionsPremiumPricer = _initParams._optionsPremiumPricer;\\n        strikeSelection = _initParams._strikeSelection;\\n    }\\n\\n    /************************************************\\n     *  SETTERS\\n     ***********************************************/\\n\\n    /**\\n     * @notice Sets the new strike selection contract\\n     * @param newStrikeSelection is the address of the new strike selection contract\\n     */\\n    function setStrikeSelection(address newStrikeSelection) external onlyOwner {\\n        require(newStrikeSelection != address(0), \\\"!newStrikeSelection\\\");\\n        strikeSelection = newStrikeSelection;\\n    }\\n\\n    /**\\n     * @notice Sets the new options premium pricer contract\\n     * @param newOptionsPremiumPricer is the address of the new strike selection contract\\n     */\\n    function setOptionsPremiumPricer(address newOptionsPremiumPricer)\\n        external\\n        onlyOwner\\n    {\\n        require(\\n            newOptionsPremiumPricer != address(0),\\n            \\\"!newOptionsPremiumPricer\\\"\\n        );\\n        optionsPremiumPricer = newOptionsPremiumPricer;\\n    }\\n\\n    /**\\n     * @notice Optionality to set strike price manually\\n     * Should be called after closeRound if we are setting current week's strike\\n     * @param strikePrice is the strike price of the new oTokens (decimals = 8)\\n     */\\n    function setStrikePrice(uint128 strikePrice) external onlyOwner {\\n        require(strikePrice > 0, \\\"!strikePrice\\\");\\n        overriddenStrikePrice = strikePrice;\\n        lastStrikeOverrideRound = vaultState.round;\\n    }\\n\\n    /**\\n     * @notice Sets the new liquidityGauge contract for this vault\\n     * @param newLiquidityGauge is the address of the new liquidityGauge contract\\n     */\\n    function setLiquidityGauge(address newLiquidityGauge) external onlyOwner {\\n        liquidityGauge = newLiquidityGauge;\\n    }\\n\\n    /**\\n     * @notice Sets oToken Premium\\n     * @param minPrice is the new oToken Premium in the units of 10**18\\n     */\\n    function setMinPrice(uint256 minPrice) external onlyKeeper {\\n        require(minPrice > 0, \\\"!minPrice\\\");\\n        currentOtokenPremium = minPrice;\\n    }\\n\\n    /**\\n     * @notice Sets the new Vault Pauser contract for this vault\\n     * @param newVaultPauser is the address of the new vaultPauser contract\\n     */\\n    function setVaultPauser(address newVaultPauser) external onlyOwner {\\n        vaultPauser = newVaultPauser;\\n    }\\n\\n    /************************************************\\n     *  VAULT OPERATIONS\\n     ***********************************************/\\n\\n    /**\\n     * @notice Withdraws the assets on the vault using the outstanding `DepositReceipt.amount`\\n     * @param amount is the amount to withdraw\\n     */\\n    function withdrawInstantly(uint256 amount) external nonReentrant {\\n        Vault.DepositReceipt storage depositReceipt =\\n            depositReceipts[msg.sender];\\n\\n        uint256 currentRound = vaultState.round;\\n        require(amount > 0, \\\"!amount\\\");\\n        require(depositReceipt.round == currentRound, \\\"Invalid round\\\");\\n\\n        uint256 receiptAmount = depositReceipt.amount;\\n        require(receiptAmount >= amount, \\\"Exceed amount\\\");\\n\\n        // Subtraction underflow checks already ensure it is smaller than uint104\\n        depositReceipt.amount = uint104(receiptAmount.sub(amount));\\n        vaultState.totalPending = uint128(\\n            uint256(vaultState.totalPending).sub(amount)\\n        );\\n\\n        emit InstantWithdraw(msg.sender, amount, currentRound);\\n\\n        transferAsset(msg.sender, amount);\\n    }\\n\\n    /**\\n     * @notice Initiates a withdrawal that can be processed once the round completes\\n     * @param numShares is the number of shares to withdraw\\n     */\\n    function initiateWithdraw(uint256 numShares) external nonReentrant {\\n        _initiateWithdraw(numShares);\\n        currentQueuedWithdrawShares = currentQueuedWithdrawShares.add(\\n            numShares\\n        );\\n    }\\n\\n    /**\\n     * @notice Completes a scheduled withdrawal from a past round. Uses finalized pps for the round\\n     */\\n    function completeWithdraw() external nonReentrant {\\n        uint256 withdrawAmount = _completeWithdraw();\\n        lastQueuedWithdrawAmount = uint128(\\n            uint256(lastQueuedWithdrawAmount).sub(withdrawAmount)\\n        );\\n    }\\n\\n    /**\\n     * @notice Stakes a users vault shares\\n     * @param numShares is the number of shares to stake\\n     */\\n    function stake(uint256 numShares) external nonReentrant {\\n        address _liquidityGauge = liquidityGauge;\\n        require(_liquidityGauge != address(0)); // Removed revert msgs due to contract size limit\\n        require(numShares > 0);\\n        uint256 heldByAccount = balanceOf(msg.sender);\\n        if (heldByAccount < numShares) {\\n            _redeem(numShares.sub(heldByAccount), false);\\n        }\\n        _transfer(msg.sender, address(this), numShares);\\n        _approve(address(this), _liquidityGauge, numShares);\\n        ILiquidityGauge(_liquidityGauge).deposit(numShares, msg.sender, false);\\n    }\\n\\n    /**\\n     * @notice Closes the existing short and calculate the shares to mint, new price per share &\\n      amount of funds to re-allocate as collateral for the new round\\n     * Since we are incrementing the round here, the options are sold in the beginning of a round\\n     * instead of at the end of the round. For example, at round 1, we don't sell any options. We\\n     * start selling options at the beginning of round 2.\\n     */\\n    function closeRound() external nonReentrant {\\n        address oldOption = optionState.currentOption;\\n        require(\\n            oldOption != address(0) || vaultState.round == 1,\\n            \\\"Round closed\\\"\\n        );\\n        _closeShort(oldOption);\\n\\n        uint256 currQueuedWithdrawShares = currentQueuedWithdrawShares;\\n        (uint256 lockedBalance, uint256 queuedWithdrawAmount) =\\n            _closeRound(\\n                uint256(lastQueuedWithdrawAmount),\\n                currQueuedWithdrawShares\\n            );\\n\\n        lastQueuedWithdrawAmount = queuedWithdrawAmount;\\n\\n        uint256 newQueuedWithdrawShares =\\n            uint256(vaultState.queuedWithdrawShares).add(\\n                currQueuedWithdrawShares\\n            );\\n        ShareMath.assertUint128(newQueuedWithdrawShares);\\n        vaultState.queuedWithdrawShares = uint128(newQueuedWithdrawShares);\\n\\n        currentQueuedWithdrawShares = 0;\\n\\n        ShareMath.assertUint104(lockedBalance);\\n        vaultState.lockedAmount = uint104(lockedBalance);\\n\\n        uint256 nextOptionReady = block.timestamp.add(DELAY);\\n        require(\\n            nextOptionReady <= type(uint32).max,\\n            \\\"Overflow nextOptionReady\\\"\\n        );\\n        optionState.nextOptionReadyAt = uint32(nextOptionReady);\\n    }\\n\\n    /**\\n     * @notice Closes the existing short position for the vault.\\n     */\\n    function _closeShort(address oldOption) private {\\n        uint256 lockedAmount = vaultState.lockedAmount;\\n        if (oldOption != address(0)) {\\n            vaultState.lastLockedAmount = uint104(lockedAmount);\\n        }\\n        vaultState.lockedAmount = 0;\\n\\n        optionState.currentOption = address(0);\\n\\n        if (oldOption != address(0)) {\\n            uint256 withdrawAmount =\\n                VaultLifecycleWithSwap.settleShort(GAMMA_CONTROLLER);\\n            emit CloseShort(oldOption, withdrawAmount, msg.sender);\\n        }\\n    }\\n\\n    /**\\n     * @notice Sets the next option the vault will be shorting\\n     */\\n    function commitNextOption() external onlyKeeper nonReentrant {\\n        address currentOption = optionState.currentOption;\\n        require(\\n            currentOption == address(0) && vaultState.round != 1,\\n            \\\"Round not closed\\\"\\n        );\\n\\n        VaultLifecycleWithSwap.CommitParams memory commitParams =\\n            VaultLifecycleWithSwap.CommitParams({\\n                OTOKEN_FACTORY: OTOKEN_FACTORY,\\n                USDC: USDC,\\n                collateralAsset: vaultParams.asset,\\n                currentOption: currentOption,\\n                delay: DELAY,\\n                lastStrikeOverrideRound: lastStrikeOverrideRound,\\n                overriddenStrikePrice: overriddenStrikePrice,\\n                strikeSelection: strikeSelection,\\n                optionsPremiumPricer: optionsPremiumPricer\\n            });\\n\\n        (address otokenAddress, uint256 strikePrice, uint256 delta) =\\n            VaultLifecycleWithSwap.commitNextOption(\\n                commitParams,\\n                vaultParams,\\n                vaultState\\n            );\\n\\n        emit NewOptionStrikeSelected(strikePrice, delta);\\n\\n        optionState.nextOption = otokenAddress;\\n    }\\n\\n    /**\\n     * @notice Rolls the vault's funds into a new short position and create a new offer.\\n     */\\n    function rollToNextOption() external onlyKeeper nonReentrant {\\n        address newOption = optionState.nextOption;\\n        require(newOption != address(0), \\\"!nextOption\\\");\\n\\n        optionState.currentOption = newOption;\\n        optionState.nextOption = address(0);\\n        uint256 lockedBalance = vaultState.lockedAmount;\\n\\n        emit OpenShort(newOption, lockedBalance, msg.sender);\\n\\n        VaultLifecycleWithSwap.createShort(\\n            GAMMA_CONTROLLER,\\n            MARGIN_POOL,\\n            newOption,\\n            lockedBalance\\n        );\\n\\n        _createOffer();\\n    }\\n\\n    function _createOffer() private {\\n        address currentOtoken = optionState.currentOption;\\n        uint256 currOtokenPremium = currentOtokenPremium;\\n\\n        optionAuctionID = VaultLifecycleWithSwap.createOffer(\\n            currentOtoken,\\n            currOtokenPremium,\\n            SWAP_CONTRACT,\\n            vaultParams\\n        );\\n    }\\n\\n    /**\\n     * @notice Settle current offer\\n     */\\n    function settleOffer(ISwap.Bid[] calldata bids)\\n        external\\n        onlyKeeper\\n        nonReentrant\\n    {\\n        ISwap(SWAP_CONTRACT).settleOffer(optionAuctionID, bids);\\n    }\\n\\n    /**\\n     * @notice Burn the remaining oTokens left over\\n     */\\n    function burnRemainingOTokens() external onlyKeeper nonReentrant {\\n        VaultLifecycleWithSwap.burnOtokens(\\n            GAMMA_CONTROLLER,\\n            optionState.currentOption\\n        );\\n    }\\n\\n    /**\\n     * @notice pause a user's vault position\\n     */\\n    function pausePosition() external {\\n        address _vaultPauserAddress = vaultPauser;\\n        require(_vaultPauserAddress != address(0)); // Removed revert msgs due to contract size limit\\n        _redeem(0, true);\\n        uint256 heldByAccount = balanceOf(msg.sender);\\n        _approve(msg.sender, _vaultPauserAddress, heldByAccount);\\n        IVaultPauser(_vaultPauserAddress).pausePosition(\\n            msg.sender,\\n            heldByAccount\\n        );\\n    }\\n}\\n\",\"keccak256\":\"0xa91829d8d36f0e0e524b4a9a3dce3f2a579eecfc99a5f218fab82975e5c7ae57\",\"license\":\"MIT\"},\"contracts/vaults/BaseVaultWithSwap/base/RibbonVault.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity =0.8.4;\\n\\nimport {SafeMath} from \\\"@openzeppelin/contracts/utils/math/SafeMath.sol\\\";\\nimport {IERC20} from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport {\\n    SafeERC20\\n} from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\nimport {\\n    ReentrancyGuardUpgradeable\\n} from \\\"@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol\\\";\\nimport {\\n    OwnableUpgradeable\\n} from \\\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\\\";\\nimport {\\n    ERC20Upgradeable\\n} from \\\"@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol\\\";\\n\\nimport {Vault} from \\\"../../../libraries/Vault.sol\\\";\\nimport {\\n    VaultLifecycleWithSwap\\n} from \\\"../../../libraries/VaultLifecycleWithSwap.sol\\\";\\nimport {ShareMath} from \\\"../../../libraries/ShareMath.sol\\\";\\nimport {IWETH} from \\\"../../../interfaces/IWETH.sol\\\";\\n\\ncontract RibbonVault is\\n    ReentrancyGuardUpgradeable,\\n    OwnableUpgradeable,\\n    ERC20Upgradeable\\n{\\n    using SafeERC20 for IERC20;\\n    using SafeMath for uint256;\\n    using ShareMath for Vault.DepositReceipt;\\n\\n    /************************************************\\n     *  NON UPGRADEABLE STORAGE\\n     ***********************************************/\\n\\n    /// @notice Stores the user's pending deposit for the round\\n    mapping(address => Vault.DepositReceipt) public depositReceipts;\\n\\n    /// @notice On every round's close, the pricePerShare value of an rTHETA token is stored\\n    /// This is used to determine the number of shares to be returned\\n    /// to a user with their DepositReceipt.depositAmount\\n    mapping(uint256 => uint256) public roundPricePerShare;\\n\\n    /// @notice Stores pending user withdrawals\\n    mapping(address => Vault.Withdrawal) public withdrawals;\\n\\n    /// @notice Vault's parameters like cap, decimals\\n    Vault.VaultParams public vaultParams;\\n\\n    /// @notice Vault's lifecycle state like round and locked amounts\\n    Vault.VaultState public vaultState;\\n\\n    /// @notice Vault's state of the options sold and the timelocked option\\n    Vault.OptionState public optionState;\\n\\n    /// @notice Fee recipient for the performance and management fees\\n    address public feeRecipient;\\n\\n    /// @notice role in charge of weekly vault operations such as rollToNextOption and burnRemainingOTokens\\n    // no access to critical vault changes\\n    address public keeper;\\n\\n    /// @notice Performance fee charged on premiums earned in rollToNextOption. Only charged when there is no loss.\\n    uint256 public performanceFee;\\n\\n    /// @notice Management fee charged on entire AUM in rollToNextOption. Only charged when there is no loss.\\n    uint256 public managementFee;\\n\\n    // Gap is left to avoid storage collisions. Though RibbonVault is not upgradeable, we add this as a safety measure.\\n    uint256[30] private ____gap;\\n\\n    // *IMPORTANT* NO NEW STORAGE VARIABLES SHOULD BE ADDED HERE\\n    // This is to prevent storage collisions. All storage variables should be appended to RibbonThetaVaultStorage\\n    // or RibbonDeltaVaultStorage instead. Read this documentation to learn more:\\n    // https://docs.openzeppelin.com/upgrades-plugins/1.x/writing-upgradeable#modifying-your-contracts\\n\\n    /************************************************\\n     *  IMMUTABLES & CONSTANTS\\n     ***********************************************/\\n\\n    /// @notice WETH9 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\\n    address public immutable WETH;\\n\\n    /// @notice USDC 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\\n    address public immutable USDC;\\n\\n    /// @notice Deprecated: 15 minute timelock between commitAndClose and rollToNexOption.\\n    uint256 public constant DELAY = 0;\\n\\n    /// @notice 7 day period between each options sale.\\n    uint256 public constant PERIOD = 7 days;\\n\\n    // Number of weeks per year = 52.142857 weeks * FEE_MULTIPLIER = 52142857\\n    // Dividing by weeks per year requires doing num.mul(FEE_MULTIPLIER).div(WEEKS_PER_YEAR)\\n    uint256 private constant WEEKS_PER_YEAR = 52142857;\\n\\n    // GAMMA_CONTROLLER is the top-level contract in Gamma protocol\\n    // which allows users to perform multiple actions on their vaults\\n    // and positions https://github.com/opynfinance/GammaProtocol/blob/master/contracts/core/Controller.sol\\n    address public immutable GAMMA_CONTROLLER;\\n\\n    // MARGIN_POOL is Gamma protocol's collateral pool.\\n    // Needed to approve collateral.safeTransferFrom for minting otokens.\\n    // https://github.com/opynfinance/GammaProtocol/blob/master/contracts/core/MarginPool.sol\\n    address public immutable MARGIN_POOL;\\n\\n    // SWAP_CONTRACT is a contract for settling bids via signed messages\\n    // https://github.com/ribbon-finance/ribbon-v2/blob/master/contracts/utils/Swap.sol\\n    address public immutable SWAP_CONTRACT;\\n\\n    /************************************************\\n     *  EVENTS\\n     ***********************************************/\\n\\n    event Deposit(address indexed account, uint256 amount, uint256 round);\\n\\n    event InitiateWithdraw(\\n        address indexed account,\\n        uint256 shares,\\n        uint256 round\\n    );\\n\\n    event Redeem(address indexed account, uint256 share, uint256 round);\\n\\n    event ManagementFeeSet(uint256 managementFee, uint256 newManagementFee);\\n\\n    event PerformanceFeeSet(uint256 performanceFee, uint256 newPerformanceFee);\\n\\n    event CapSet(uint256 oldCap, uint256 newCap);\\n\\n    event Withdraw(address indexed account, uint256 amount, uint256 shares);\\n\\n    event CollectVaultFees(\\n        uint256 performanceFee,\\n        uint256 vaultFee,\\n        uint256 round,\\n        address indexed feeRecipient\\n    );\\n\\n    /************************************************\\n     *  CONSTRUCTOR & INITIALIZATION\\n     ***********************************************/\\n\\n    /**\\n     * @notice Initializes the contract with immutable variables\\n     * @param _weth is the Wrapped Ether contract\\n     * @param _usdc is the USDC contract\\n     * @param _gammaController is the contract address for opyn actions\\n     * @param _marginPool is the contract address for providing collateral to opyn\\n     * @param _swapContract is the contract address that facilitates bids settlement\\n     */\\n    constructor(\\n        address _weth,\\n        address _usdc,\\n        address _gammaController,\\n        address _marginPool,\\n        address _swapContract\\n    ) {\\n        require(_weth != address(0), \\\"!_weth\\\");\\n        require(_usdc != address(0), \\\"!_usdc\\\");\\n        require(_swapContract != address(0), \\\"!_swapContract\\\");\\n        require(_gammaController != address(0), \\\"!_gammaController\\\");\\n        require(_marginPool != address(0), \\\"!_marginPool\\\");\\n\\n        WETH = _weth;\\n        USDC = _usdc;\\n        GAMMA_CONTROLLER = _gammaController;\\n        MARGIN_POOL = _marginPool;\\n        SWAP_CONTRACT = _swapContract;\\n    }\\n\\n    /**\\n     * @notice Initializes the OptionVault contract with storage variables.\\n     */\\n    function baseInitialize(\\n        address _owner,\\n        address _keeper,\\n        address _feeRecipient,\\n        uint256 _managementFee,\\n        uint256 _performanceFee,\\n        string memory _tokenName,\\n        string memory _tokenSymbol,\\n        Vault.VaultParams calldata _vaultParams\\n    ) internal initializer {\\n        VaultLifecycleWithSwap.verifyInitializerParams(\\n            _owner,\\n            _keeper,\\n            _feeRecipient,\\n            _performanceFee,\\n            _managementFee,\\n            _tokenName,\\n            _tokenSymbol,\\n            _vaultParams\\n        );\\n\\n        __ReentrancyGuard_init();\\n        __ERC20_init(_tokenName, _tokenSymbol);\\n        __Ownable_init();\\n        transferOwnership(_owner);\\n\\n        keeper = _keeper;\\n\\n        feeRecipient = _feeRecipient;\\n        performanceFee = _performanceFee;\\n        managementFee = _managementFee.mul(Vault.FEE_MULTIPLIER).div(\\n            WEEKS_PER_YEAR\\n        );\\n        vaultParams = _vaultParams;\\n\\n        uint256 assetBalance =\\n            IERC20(vaultParams.asset).balanceOf(address(this));\\n        ShareMath.assertUint104(assetBalance);\\n        vaultState.lastLockedAmount = uint104(assetBalance);\\n\\n        vaultState.round = 1;\\n    }\\n\\n    /**\\n     * @dev Throws if called by any account other than the keeper.\\n     */\\n    modifier onlyKeeper() {\\n        require(msg.sender == keeper, \\\"!keeper\\\");\\n        _;\\n    }\\n\\n    /************************************************\\n     *  SETTERS\\n     ***********************************************/\\n\\n    /**\\n     * @notice Sets the new keeper\\n     * @param newKeeper is the address of the new keeper\\n     */\\n    function setNewKeeper(address newKeeper) external onlyOwner {\\n        require(newKeeper != address(0), \\\"!newKeeper\\\");\\n        keeper = newKeeper;\\n    }\\n\\n    /**\\n     * @notice Sets the new fee recipient\\n     * @param newFeeRecipient is the address of the new fee recipient\\n     */\\n    function setFeeRecipient(address newFeeRecipient) external onlyOwner {\\n        require(newFeeRecipient != address(0), \\\"!newFeeRecipient\\\");\\n        require(newFeeRecipient != feeRecipient, \\\"Must be new feeRecipient\\\");\\n        feeRecipient = newFeeRecipient;\\n    }\\n\\n    /**\\n     * @notice Sets the management fee for the vault\\n     * @param newManagementFee is the management fee (6 decimals). ex: 2 * 10 ** 6 = 2%\\n     */\\n    function setManagementFee(uint256 newManagementFee) external onlyOwner {\\n        require(\\n            newManagementFee < 100 * Vault.FEE_MULTIPLIER,\\n            \\\"Invalid management fee\\\"\\n        );\\n\\n        // We are dividing annualized management fee by num weeks in a year\\n        uint256 tmpManagementFee =\\n            newManagementFee.mul(Vault.FEE_MULTIPLIER).div(WEEKS_PER_YEAR);\\n\\n        emit ManagementFeeSet(managementFee, newManagementFee);\\n\\n        managementFee = tmpManagementFee;\\n    }\\n\\n    /**\\n     * @notice Sets the performance fee for the vault\\n     * @param newPerformanceFee is the performance fee (6 decimals). ex: 20 * 10 ** 6 = 20%\\n     */\\n    function setPerformanceFee(uint256 newPerformanceFee) external onlyOwner {\\n        require(\\n            newPerformanceFee < 100 * Vault.FEE_MULTIPLIER,\\n            \\\"Invalid performance fee\\\"\\n        );\\n\\n        emit PerformanceFeeSet(performanceFee, newPerformanceFee);\\n\\n        performanceFee = newPerformanceFee;\\n    }\\n\\n    /**\\n     * @notice Sets a new cap for deposits\\n     * @param newCap is the new cap for deposits\\n     */\\n    function setCap(uint256 newCap) external onlyOwner {\\n        require(newCap > 0, \\\"!newCap\\\");\\n        ShareMath.assertUint104(newCap);\\n        emit CapSet(vaultParams.cap, newCap);\\n        vaultParams.cap = uint104(newCap);\\n    }\\n\\n    /************************************************\\n     *  DEPOSIT & WITHDRAWALS\\n     ***********************************************/\\n\\n    /**\\n     * @notice Deposits ETH into the contract and mint vault shares. Reverts if the asset is not WETH.\\n     */\\n    function depositETH() external payable nonReentrant {\\n        require(vaultParams.asset == WETH, \\\"!WETH\\\");\\n        require(msg.value > 0, \\\"!value\\\");\\n\\n        _depositFor(msg.value, msg.sender);\\n\\n        IWETH(WETH).deposit{value: msg.value}();\\n    }\\n\\n    /**\\n     * @notice Deposits the `asset` from msg.sender.\\n     * @param amount is the amount of `asset` to deposit\\n     */\\n    function deposit(uint256 amount) external nonReentrant {\\n        require(amount > 0, \\\"!amount\\\");\\n\\n        _depositFor(amount, msg.sender);\\n\\n        // An approve() by the msg.sender is required beforehand\\n        IERC20(vaultParams.asset).safeTransferFrom(\\n            msg.sender,\\n            address(this),\\n            amount\\n        );\\n    }\\n\\n    /**\\n     * @notice Deposits the `asset` from msg.sender added to `creditor`'s deposit.\\n     * @notice Used for vault -> vault deposits on the user's behalf\\n     * @param amount is the amount of `asset` to deposit\\n     * @param creditor is the address that can claim/withdraw deposited amount\\n     */\\n    function depositFor(uint256 amount, address creditor)\\n        external\\n        nonReentrant\\n    {\\n        require(amount > 0, \\\"!amount\\\");\\n        require(creditor != address(0));\\n\\n        _depositFor(amount, creditor);\\n\\n        // An approve() by the msg.sender is required beforehand\\n        IERC20(vaultParams.asset).safeTransferFrom(\\n            msg.sender,\\n            address(this),\\n            amount\\n        );\\n    }\\n\\n    /**\\n     * @notice Mints the vault shares to the creditor\\n     * @param amount is the amount of `asset` deposited\\n     * @param creditor is the address to receieve the deposit\\n     */\\n    function _depositFor(uint256 amount, address creditor) private {\\n        uint256 currentRound = vaultState.round;\\n        uint256 totalWithDepositedAmount = totalBalance().add(amount);\\n\\n        require(totalWithDepositedAmount <= vaultParams.cap, \\\"Exceed cap\\\");\\n        require(\\n            totalWithDepositedAmount >= vaultParams.minimumSupply,\\n            \\\"Insufficient balance\\\"\\n        );\\n\\n        emit Deposit(creditor, amount, currentRound);\\n\\n        Vault.DepositReceipt memory depositReceipt = depositReceipts[creditor];\\n\\n        // If we have an unprocessed pending deposit from the previous rounds, we have to process it.\\n        uint256 unredeemedShares =\\n            depositReceipt.getSharesFromReceipt(\\n                currentRound,\\n                roundPricePerShare[depositReceipt.round],\\n                vaultParams.decimals\\n            );\\n\\n        uint256 depositAmount = amount;\\n\\n        // If we have a pending deposit in the current round, we add on to the pending deposit\\n        if (currentRound == depositReceipt.round) {\\n            uint256 newAmount = uint256(depositReceipt.amount).add(amount);\\n            depositAmount = newAmount;\\n        }\\n\\n        ShareMath.assertUint104(depositAmount);\\n\\n        depositReceipts[creditor] = Vault.DepositReceipt({\\n            round: uint16(currentRound),\\n            amount: uint104(depositAmount),\\n            unredeemedShares: uint128(unredeemedShares)\\n        });\\n\\n        uint256 newTotalPending = uint256(vaultState.totalPending).add(amount);\\n        ShareMath.assertUint128(newTotalPending);\\n\\n        vaultState.totalPending = uint128(newTotalPending);\\n    }\\n\\n    /**\\n     * @notice Initiates a withdrawal that can be processed once the round completes\\n     * @param numShares is the number of shares to withdraw\\n     */\\n    function _initiateWithdraw(uint256 numShares) internal {\\n        require(numShares > 0, \\\"!numShares\\\");\\n\\n        // We do a max redeem before initiating a withdrawal\\n        // But we check if they must first have unredeemed shares\\n        if (\\n            depositReceipts[msg.sender].amount > 0 ||\\n            depositReceipts[msg.sender].unredeemedShares > 0\\n        ) {\\n            _redeem(0, true);\\n        }\\n\\n        // This caches the `round` variable used in shareBalances\\n        uint256 currentRound = vaultState.round;\\n        Vault.Withdrawal storage withdrawal = withdrawals[msg.sender];\\n\\n        bool withdrawalIsSameRound = withdrawal.round == currentRound;\\n\\n        emit InitiateWithdraw(msg.sender, numShares, currentRound);\\n\\n        uint256 existingShares = uint256(withdrawal.shares);\\n\\n        uint256 withdrawalShares;\\n        if (withdrawalIsSameRound) {\\n            withdrawalShares = existingShares.add(numShares);\\n        } else {\\n            require(existingShares == 0, \\\"Existing withdraw\\\");\\n            withdrawalShares = numShares;\\n            withdrawals[msg.sender].round = uint16(currentRound);\\n        }\\n\\n        ShareMath.assertUint128(withdrawalShares);\\n        withdrawals[msg.sender].shares = uint128(withdrawalShares);\\n\\n        _transfer(msg.sender, address(this), numShares);\\n    }\\n\\n    /**\\n     * @notice Completes a scheduled withdrawal from a past round. Uses finalized pps for the round\\n     * @return withdrawAmount the current withdrawal amount\\n     */\\n    function _completeWithdraw() internal returns (uint256) {\\n        Vault.Withdrawal storage withdrawal = withdrawals[msg.sender];\\n\\n        uint256 withdrawalShares = withdrawal.shares;\\n        uint256 withdrawalRound = withdrawal.round;\\n\\n        // This checks if there is a withdrawal\\n        require(withdrawalShares > 0, \\\"Not initiated\\\");\\n\\n        require(withdrawalRound < vaultState.round, \\\"Round not closed\\\");\\n\\n        // We leave the round number as non-zero to save on gas for subsequent writes\\n        withdrawals[msg.sender].shares = 0;\\n        vaultState.queuedWithdrawShares = uint128(\\n            uint256(vaultState.queuedWithdrawShares).sub(withdrawalShares)\\n        );\\n\\n        uint256 withdrawAmount =\\n            ShareMath.sharesToAsset(\\n                withdrawalShares,\\n                roundPricePerShare[withdrawalRound],\\n                vaultParams.decimals\\n            );\\n\\n        emit Withdraw(msg.sender, withdrawAmount, withdrawalShares);\\n\\n        _burn(address(this), withdrawalShares);\\n\\n        require(withdrawAmount > 0, \\\"!withdrawAmount\\\");\\n        transferAsset(msg.sender, withdrawAmount);\\n\\n        return withdrawAmount;\\n    }\\n\\n    /**\\n     * @notice Redeems shares that are owed to the account\\n     * @param numShares is the number of shares to redeem\\n     */\\n    function redeem(uint256 numShares) external nonReentrant {\\n        require(numShares > 0, \\\"!numShares\\\");\\n        _redeem(numShares, false);\\n    }\\n\\n    /**\\n     * @notice Redeems the entire unredeemedShares balance that is owed to the account\\n     */\\n    function maxRedeem() external nonReentrant {\\n        _redeem(0, true);\\n    }\\n\\n    /**\\n     * @notice Redeems shares that are owed to the account\\n     * @param numShares is the number of shares to redeem, could be 0 when isMax=true\\n     * @param isMax is flag for when callers do a max redemption\\n     */\\n    function _redeem(uint256 numShares, bool isMax) internal {\\n        Vault.DepositReceipt memory depositReceipt =\\n            depositReceipts[msg.sender];\\n\\n        // This handles the null case when depositReceipt.round = 0\\n        // Because we start with round = 1 at `initialize`\\n        uint256 currentRound = vaultState.round;\\n\\n        uint256 unredeemedShares =\\n            depositReceipt.getSharesFromReceipt(\\n                currentRound,\\n                roundPricePerShare[depositReceipt.round],\\n                vaultParams.decimals\\n            );\\n\\n        numShares = isMax ? unredeemedShares : numShares;\\n        if (numShares == 0) {\\n            return;\\n        }\\n        require(numShares <= unredeemedShares, \\\"Exceeds available\\\");\\n\\n        // If we have a depositReceipt on the same round, BUT we have some unredeemed shares\\n        // we debit from the unredeemedShares, but leave the amount field intact\\n        // If the round has past, with no new deposits, we just zero it out for new deposits.\\n        if (depositReceipt.round < currentRound) {\\n            depositReceipts[msg.sender].amount = 0;\\n        }\\n\\n        ShareMath.assertUint128(numShares);\\n        depositReceipts[msg.sender].unredeemedShares = uint128(\\n            unredeemedShares.sub(numShares)\\n        );\\n\\n        emit Redeem(msg.sender, numShares, depositReceipt.round);\\n\\n        _transfer(address(this), msg.sender, numShares);\\n    }\\n\\n    /************************************************\\n     *  VAULT OPERATIONS\\n     ***********************************************/\\n\\n    /**\\n     * @notice Helper function that helps to save gas for writing values into the roundPricePerShare map.\\n     *         Writing `1` into the map makes subsequent writes warm, reducing the gas from 20k to 5k.\\n     *         Having 1 initialized beforehand will not be an issue as long as we round down share calculations to 0.\\n     * @param numRounds is the number of rounds to initialize in the map\\n     */\\n    function initRounds(uint256 numRounds) external nonReentrant {\\n        require(numRounds > 0, \\\"!numRounds\\\");\\n\\n        uint256 _round = vaultState.round;\\n        for (uint256 i = 0; i < numRounds; i++) {\\n            uint256 index = _round + i;\\n            require(roundPricePerShare[index] == 0, \\\"Initialized\\\"); // AVOID OVERWRITING ACTUAL VALUES\\n            roundPricePerShare[index] = ShareMath.PLACEHOLDER_UINT;\\n        }\\n    }\\n\\n    /**\\n     * @notice Helper function that performs most administrative tasks\\n     * such as minting new shares, getting vault fees, etc.\\n     * @param lastQueuedWithdrawAmount is old queued withdraw amount\\n     * @param currentQueuedWithdrawShares is the queued withdraw shares for the current round\\n     * @return lockedBalance is the new balance used to calculate next option purchase size or collateral size\\n     * @return queuedWithdrawAmount is the new queued withdraw amount for this round\\n     */\\n    function _closeRound(\\n        uint256 lastQueuedWithdrawAmount,\\n        uint256 currentQueuedWithdrawShares\\n    ) internal returns (uint256 lockedBalance, uint256 queuedWithdrawAmount) {\\n        address recipient = feeRecipient;\\n        uint256 mintShares;\\n        uint256 performanceFeeInAsset;\\n        uint256 totalVaultFee;\\n        {\\n            uint256 newPricePerShare;\\n            (\\n                lockedBalance,\\n                queuedWithdrawAmount,\\n                newPricePerShare,\\n                mintShares,\\n                performanceFeeInAsset,\\n                totalVaultFee\\n            ) = VaultLifecycleWithSwap.closeRound(\\n                vaultState,\\n                VaultLifecycleWithSwap.CloseParams(\\n                    vaultParams.decimals,\\n                    IERC20(vaultParams.asset).balanceOf(address(this)),\\n                    totalSupply(),\\n                    lastQueuedWithdrawAmount,\\n                    performanceFee,\\n                    managementFee,\\n                    currentQueuedWithdrawShares\\n                )\\n            );\\n\\n            // Finalize the pricePerShare at the end of the round\\n            uint256 currentRound = vaultState.round;\\n            roundPricePerShare[currentRound] = newPricePerShare;\\n\\n            emit CollectVaultFees(\\n                performanceFeeInAsset,\\n                totalVaultFee,\\n                currentRound,\\n                recipient\\n            );\\n\\n            vaultState.totalPending = 0;\\n            vaultState.round = uint16(currentRound + 1);\\n        }\\n\\n        _mint(address(this), mintShares);\\n\\n        if (totalVaultFee > 0) {\\n            transferAsset(payable(recipient), totalVaultFee);\\n        }\\n\\n        return (lockedBalance, queuedWithdrawAmount);\\n    }\\n\\n    /**\\n     * @notice Helper function to make either an ETH transfer or ERC20 transfer\\n     * @param recipient is the receiving address\\n     * @param amount is the transfer amount\\n     */\\n    function transferAsset(address recipient, uint256 amount) internal {\\n        address asset = vaultParams.asset;\\n        if (asset == WETH) {\\n            IWETH(WETH).withdraw(amount);\\n            (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n            require(success, \\\"Transfer failed\\\");\\n            return;\\n        }\\n        IERC20(asset).safeTransfer(recipient, amount);\\n    }\\n\\n    /************************************************\\n     *  GETTERS\\n     ***********************************************/\\n\\n    /**\\n     * @notice Returns the asset balance held on the vault for the account\\n     * @param account is the address to lookup balance for\\n     * @return the amount of `asset` custodied by the vault for the user\\n     */\\n    function accountVaultBalance(address account)\\n        external\\n        view\\n        returns (uint256)\\n    {\\n        uint256 _decimals = vaultParams.decimals;\\n        uint256 assetPerShare =\\n            ShareMath.pricePerShare(\\n                totalSupply(),\\n                totalBalance(),\\n                vaultState.totalPending,\\n                _decimals\\n            );\\n        return\\n            ShareMath.sharesToAsset(shares(account), assetPerShare, _decimals);\\n    }\\n\\n    /**\\n     * @notice Getter for returning the account's share balance including unredeemed shares\\n     * @param account is the account to lookup share balance for\\n     * @return the share balance\\n     */\\n    function shares(address account) public view returns (uint256) {\\n        (uint256 heldByAccount, uint256 heldByVault) = shareBalances(account);\\n        return heldByAccount.add(heldByVault);\\n    }\\n\\n    /**\\n     * @notice Getter for returning the account's share balance split between account and vault holdings\\n     * @param account is the account to lookup share balance for\\n     * @return heldByAccount is the shares held by account\\n     * @return heldByVault is the shares held on the vault (unredeemedShares)\\n     */\\n    function shareBalances(address account)\\n        public\\n        view\\n        returns (uint256 heldByAccount, uint256 heldByVault)\\n    {\\n        Vault.DepositReceipt memory depositReceipt = depositReceipts[account];\\n\\n        if (depositReceipt.round < ShareMath.PLACEHOLDER_UINT) {\\n            return (balanceOf(account), 0);\\n        }\\n\\n        uint256 unredeemedShares =\\n            depositReceipt.getSharesFromReceipt(\\n                vaultState.round,\\n                roundPricePerShare[depositReceipt.round],\\n                vaultParams.decimals\\n            );\\n\\n        return (balanceOf(account), unredeemedShares);\\n    }\\n\\n    /**\\n     * @notice The price of a unit of share denominated in the `asset`\\n     */\\n    function pricePerShare() external view returns (uint256) {\\n        return\\n            ShareMath.pricePerShare(\\n                totalSupply(),\\n                totalBalance(),\\n                vaultState.totalPending,\\n                vaultParams.decimals\\n            );\\n    }\\n\\n    /**\\n     * @notice Returns the vault's total balance, including the amounts locked into a short position\\n     * @return total balance of the vault, including the amounts locked in third party protocols\\n     */\\n    function totalBalance() public view returns (uint256) {\\n        // After calling closeRound, current option is set to none\\n        // We also commit the lockedAmount but do not deposit into Opyn\\n        // which results in double counting of asset balance and lockedAmount\\n\\n        return\\n            optionState.currentOption != address(0)\\n                ? uint256(vaultState.lockedAmount).add(\\n                    IERC20(vaultParams.asset).balanceOf(address(this))\\n                )\\n                : IERC20(vaultParams.asset).balanceOf(address(this));\\n    }\\n\\n    /**\\n     * @notice Returns the token decimals\\n     */\\n    function decimals() public view override returns (uint8) {\\n        return vaultParams.decimals;\\n    }\\n\\n    function cap() external view returns (uint256) {\\n        return vaultParams.cap;\\n    }\\n\\n    function nextOptionReadyAt() external view returns (uint256) {\\n        return optionState.nextOptionReadyAt;\\n    }\\n\\n    function currentOption() external view returns (address) {\\n        return optionState.currentOption;\\n    }\\n\\n    function nextOption() external view returns (address) {\\n        return optionState.nextOption;\\n    }\\n\\n    function totalPending() external view returns (uint256) {\\n        return vaultState.totalPending;\\n    }\\n}\\n\",\"keccak256\":\"0x8f1343955106461e349c4260d8b74e3e803b4583ce4350a39d3b67e5d0d733d3\",\"license\":\"MIT\"},\"contracts/vendor/DSMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// math.sol -- mixin for inline numerical wizardry\\n\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity >0.4.13;\\n\\nlibrary DSMath {\\n    function add(uint256 x, uint256 y) internal pure returns (uint256 z) {\\n        require((z = x + y) >= x, \\\"ds-math-add-overflow\\\");\\n    }\\n\\n    function sub(uint256 x, uint256 y) internal pure returns (uint256 z) {\\n        require((z = x - y) <= x, \\\"ds-math-sub-underflow\\\");\\n    }\\n\\n    function mul(uint256 x, uint256 y) internal pure returns (uint256 z) {\\n        require(y == 0 || (z = x * y) / y == x, \\\"ds-math-mul-overflow\\\");\\n    }\\n\\n    function min(uint256 x, uint256 y) internal pure returns (uint256 z) {\\n        return x <= y ? x : y;\\n    }\\n\\n    function max(uint256 x, uint256 y) internal pure returns (uint256 z) {\\n        return x >= y ? x : y;\\n    }\\n\\n    function imin(int256 x, int256 y) internal pure returns (int256 z) {\\n        return x <= y ? x : y;\\n    }\\n\\n    function imax(int256 x, int256 y) internal pure returns (int256 z) {\\n        return x >= y ? x : y;\\n    }\\n\\n    uint256 constant WAD = 10**18;\\n    uint256 constant RAY = 10**27;\\n\\n    //rounds to zero if x*y < WAD / 2\\n    function wmul(uint256 x, uint256 y) internal pure returns (uint256 z) {\\n        z = add(mul(x, y), WAD / 2) / WAD;\\n    }\\n\\n    //rounds to zero if x*y < WAD / 2\\n    function rmul(uint256 x, uint256 y) internal pure returns (uint256 z) {\\n        z = add(mul(x, y), RAY / 2) / RAY;\\n    }\\n\\n    //rounds to zero if x*y < WAD / 2\\n    function wdiv(uint256 x, uint256 y) internal pure returns (uint256 z) {\\n        z = add(mul(x, WAD), y / 2) / y;\\n    }\\n\\n    //rounds to zero if x*y < RAY / 2\\n    function rdiv(uint256 x, uint256 y) internal pure returns (uint256 z) {\\n        z = add(mul(x, RAY), y / 2) / y;\\n    }\\n\\n    // This famous algorithm is called \\\"exponentiation by squaring\\\"\\n    // and calculates x^n with x as fixed-point and n as regular unsigned.\\n    //\\n    // It's O(log n), instead of O(n) for naive repeated multiplication.\\n    //\\n    // These facts are why it works:\\n    //\\n    //  If n is even, then x^n = (x^2)^(n/2).\\n    //  If n is odd,  then x^n = x * x^(n-1),\\n    //   and applying the equation for even x gives\\n    //    x^n = x * (x^2)^((n-1) / 2).\\n    //\\n    //  Also, EVM division is flooring and\\n    //    floor[(n-1) / 2] = floor[n / 2].\\n    //\\n    function rpow(uint256 x, uint256 n) internal pure returns (uint256 z) {\\n        z = n % 2 != 0 ? x : RAY;\\n\\n        for (n /= 2; n != 0; n /= 2) {\\n            x = rmul(x, x);\\n\\n            if (n % 2 != 0) {\\n                z = rmul(z, x);\\n            }\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0xe1c6bb5cff7c83c85792349f61b3f4faf6e22bb02fa95d7af7b269e59a3902b2\",\"license\":\"MIT\"}},\"version\":1}","userdoc":{"kind":"user","notice":"UPGRADEABILITY: Since we use the upgradeable proxy pattern, we must observe the inheritance chain closely. Any changes/appends in storage variable needs to happen in RibbonThetaVaultStorage. RibbonThetaVault should not inherit from any other contract aside from RibbonVault, RibbonThetaVaultStorage","methods":{"USDC()":{"notice":"USDC 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"},"WETH()":{"notice":"WETH9 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"},"DELAY()":{"notice":"Deprecated: 15 minute timelock between commitAndClose and rollToNexOption."},"PERIOD()":{"notice":"7 day period between each options sale."},"keeper()":{"notice":"role in charge of weekly vault operations such as rollToNextOption and burnRemainingOTokens"},"decimals()":{"notice":"Returns the token decimals"},"constructor":{"notice":"Initializes the contract with immutable variables"},"maxRedeem()":{"notice":"Redeems the entire unredeemedShares balance that is owed to the account"},"closeRound()":{"notice":"Closes the existing short and calculate the shares to mint, new price per share & amount of funds to re-allocate as collateral for the new round Since we are incrementing the round here, the options are sold in the beginning of a round instead of at the end of the round. For example, at round 1, we don't sell any options. We start selling options at the beginning of round 2."},"depositETH()":{"notice":"Deposits ETH into the contract and mint vault shares. Reverts if the asset is not WETH."},"vaultState()":{"notice":"Vault's lifecycle state like round and locked amounts"},"optionState()":{"notice":"Vault's state of the options sold and the timelocked option"},"vaultParams()":{"notice":"Vault's parameters like cap, decimals"},"feeRecipient()":{"notice":"Fee recipient for the performance and management fees"},"stake(uint256)":{"notice":"Stakes a users vault shares"},"totalBalance()":{"notice":"Returns the vault's total balance, including the amounts locked into a short position"},"managementFee()":{"notice":"Management fee charged on entire AUM in rollToNextOption. Only charged when there is no loss."},"pausePosition()":{"notice":"pause a user's vault position"},"pricePerShare()":{"notice":"The price of a unit of share denominated in the `asset`"},"redeem(uint256)":{"notice":"Redeems shares that are owed to the account"},"setCap(uint256)":{"notice":"Sets a new cap for deposits"},"shares(address)":{"notice":"Getter for returning the account's share balance including unredeemed shares"},"OTOKEN_FACTORY()":{"notice":"oTokenFactory is the factory contract used to spawn otokens. Used to lookup otokens."},"deposit(uint256)":{"notice":"Deposits the `asset` from msg.sender."},"performanceFee()":{"notice":"Performance fee charged on premiums earned in rollToNextOption. Only charged when there is no loss."},"commitNextOption()":{"notice":"Sets the next option the vault will be shorting"},"completeWithdraw()":{"notice":"Completes a scheduled withdrawal from a past round. Uses finalized pps for the round"},"rollToNextOption()":{"notice":"Rolls the vault's funds into a new short position and create a new offer."},"initRounds(uint256)":{"notice":"Helper function that helps to save gas for writing values into the roundPricePerShare map.         Writing `1` into the map makes subsequent writes warm, reducing the gas from 20k to 5k.         Having 1 initialized beforehand will not be an issue as long as we round down share calculations to 0."},"setMinPrice(uint256)":{"notice":"Sets oToken Premium"},"withdrawals(address)":{"notice":"Stores pending user withdrawals"},"setNewKeeper(address)":{"notice":"Sets the new keeper"},"burnRemainingOTokens()":{"notice":"Burn the remaining oTokens left over"},"shareBalances(address)":{"notice":"Getter for returning the account's share balance split between account and vault holdings"},"setStrikePrice(uint128)":{"notice":"Optionality to set strike price manually Should be called after closeRound if we are setting current week's strike"},"setVaultPauser(address)":{"notice":"Sets the new Vault Pauser contract for this vault"},"depositReceipts(address)":{"notice":"Stores the user's pending deposit for the round"},"setFeeRecipient(address)":{"notice":"Sets the new fee recipient"},"initiateWithdraw(uint256)":{"notice":"Initiates a withdrawal that can be processed once the round completes"},"setManagementFee(uint256)":{"notice":"Sets the management fee for the vault"},"setLiquidityGauge(address)":{"notice":"Sets the new liquidityGauge contract for this vault"},"setPerformanceFee(uint256)":{"notice":"Sets the performance fee for the vault"},"withdrawInstantly(uint256)":{"notice":"Withdraws the assets on the vault using the outstanding `DepositReceipt.amount`"},"depositFor(uint256,address)":{"notice":"Deposits the `asset` from msg.sender added to `creditor`'s deposit.Used for vault -> vault deposits on the user's behalf"},"roundPricePerShare(uint256)":{"notice":"On every round's close, the pricePerShare value of an rTHETA token is stored This is used to determine the number of shares to be returned to a user with their DepositReceipt.depositAmount"},"setStrikeSelection(address)":{"notice":"Sets the new strike selection contract"},"accountVaultBalance(address)":{"notice":"Returns the asset balance held on the vault for the account"},"setOptionsPremiumPricer(address)":{"notice":"Sets the new options premium pricer contract"},"settleOffer((uint256,uint256,address,uint256,uint256,address,uint8,bytes32,bytes32)[])":{"notice":"Settle current offer"},"initialize((address,address,address,uint256,uint256,string,string,address,address),(bool,uint8,address,address,uint56,uint104))":{"notice":"Initializes the OptionVault contract with storage variables."}},"version":1},"devdoc":{"kind":"dev","methods":{"name()":{"details":"Returns the name of the token."},"owner()":{"details":"Returns the address of the current owner."},"symbol()":{"details":"Returns the symbol of the token, usually a shorter version of the name."},"constructor":{"params":{"_usdc":"is the USDC contract","_weth":"is the Wrapped Ether contract","_marginPool":"is the contract address for providing collateral to opyn","_swapContract":"is the contract address that facilitates bids settlement","_oTokenFactory":"is the contract address for minting new opyn option types (strikes, asset, expiry)","_gammaController":"is the contract address for opyn actions"}},"totalSupply()":{"details":"See {IERC20-totalSupply}."},"stake(uint256)":{"params":{"numShares":"is the number of shares to stake"}},"totalBalance()":{"returns":{"_0":"total balance of the vault, including the amounts locked in third party protocols"}},"redeem(uint256)":{"params":{"numShares":"is the number of shares to redeem"}},"setCap(uint256)":{"params":{"newCap":"is the new cap for deposits"}},"shares(address)":{"params":{"account":"is the account to lookup share balance for"},"returns":{"_0":"the share balance"}},"deposit(uint256)":{"params":{"amount":"is the amount of `asset` to deposit"}},"balanceOf(address)":{"details":"See {IERC20-balanceOf}."},"initRounds(uint256)":{"params":{"numRounds":"is the number of rounds to initialize in the map"}},"renounceOwnership()":{"details":"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner."},"setMinPrice(uint256)":{"params":{"minPrice":"is the new oToken Premium in the units of 10**18"}},"setNewKeeper(address)":{"params":{"newKeeper":"is the address of the new keeper"}},"shareBalances(address)":{"params":{"account":"is the account to lookup share balance for"},"returns":{"heldByVault":"is the shares held on the vault (unredeemedShares)","heldByAccount":"is the shares held by account"}},"setStrikePrice(uint128)":{"params":{"strikePrice":"is the strike price of the new oTokens (decimals = 8)"}},"setVaultPauser(address)":{"params":{"newVaultPauser":"is the address of the new vaultPauser contract"}},"approve(address,uint256)":{"details":"See {IERC20-approve}. Requirements: - `spender` cannot be the zero address."},"setFeeRecipient(address)":{"params":{"newFeeRecipient":"is the address of the new fee recipient"}},"initiateWithdraw(uint256)":{"params":{"numShares":"is the number of shares to withdraw"}},"setManagementFee(uint256)":{"params":{"newManagementFee":"is the management fee (6 decimals). ex: 2 * 10 ** 6 = 2%"}},"transfer(address,uint256)":{"details":"See {IERC20-transfer}. Requirements: - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`."},"allowance(address,address)":{"details":"See {IERC20-allowance}."},"setLiquidityGauge(address)":{"params":{"newLiquidityGauge":"is the address of the new liquidityGauge contract"}},"setPerformanceFee(uint256)":{"params":{"newPerformanceFee":"is the performance fee (6 decimals). ex: 20 * 10 ** 6 = 20%"}},"transferOwnership(address)":{"details":"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner."},"withdrawInstantly(uint256)":{"params":{"amount":"is the amount to withdraw"}},"depositFor(uint256,address)":{"params":{"amount":"is the amount of `asset` to deposit","creditor":"is the address that can claim/withdraw deposited amount"}},"setStrikeSelection(address)":{"params":{"newStrikeSelection":"is the address of the new strike selection contract"}},"accountVaultBalance(address)":{"params":{"account":"is the address to lookup balance for"},"returns":{"_0":"the amount of `asset` custodied by the vault for the user"}},"setOptionsPremiumPricer(address)":{"params":{"newOptionsPremiumPricer":"is the address of the new strike selection contract"}},"decreaseAllowance(address,uint256)":{"details":"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`."},"increaseAllowance(address,uint256)":{"details":"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address."},"transferFrom(address,address,uint256)":{"details":"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for ``sender``'s tokens of at least `amount`."},"initialize((address,address,address,uint256,uint256,string,string,address,address),(bool,uint8,address,address,uint56,uint104))":{"params":{"_initParams":"is the struct with vault initialization parameters","_vaultParams":"is the struct with vault general data"}}},"version":1},"storageLayout":{"types":{"t_bool":{"label":"bool","encoding":"inplace","numberOfBytes":"1"},"t_uint8":{"label":"uint8","encoding":"inplace","numberOfBytes":"1"},"t_uint16":{"label":"uint16","encoding":"inplace","numberOfBytes":"2"},"t_uint32":{"label":"uint32","encoding":"inplace","numberOfBytes":"4"},"t_uint56":{"label":"uint56","encoding":"inplace","numberOfBytes":"7"},"t_address":{"label":"address","encoding":"inplace","numberOfBytes":"20"},"t_uint104":{"label":"uint104","encoding":"inplace","numberOfBytes":"13"},"t_uint128":{"label":"uint128","encoding":"inplace","numberOfBytes":"16"},"t_uint256":{"label":"uint256","encoding":"inplace","numberOfBytes":"32"},"t_bytes_storage":{"label":"bytes","encoding":"bytes","numberOfBytes":"32"},"t_string_storage":{"label":"string","encoding":"bytes","numberOfBytes":"32"},"t_array(t_uint256)30_storage":{"base":"t_uint256","label":"uint256[30]","encoding":"inplace","numberOfBytes":"960"},"t_array(t_uint256)45_storage":{"base":"t_uint256","label":"uint256[45]","encoding":"inplace","numberOfBytes":"1440"},"t_array(t_uint256)49_storage":{"base":"t_uint256","label":"uint256[49]","encoding":"inplace","numberOfBytes":"1568"},"t_array(t_uint256)50_storage":{"base":"t_uint256","label":"uint256[50]","encoding":"inplace","numberOfBytes":"1600"},"t_mapping(t_address,t_uint256)":{"key":"t_address","label":"mapping(address => uint256)","value":"t_uint256","encoding":"mapping","numberOfBytes":"32"},"t_mapping(t_uint256,t_uint256)":{"key":"t_uint256","label":"mapping(uint256 => uint256)","value":"t_uint256","encoding":"mapping","numberOfBytes":"32"},"t_struct(VaultState)3798_storage":{"label":"struct Vault.VaultState","members":[{"slot":"0","type":"t_uint16","astId":3789,"label":"round","offset":0,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"0","type":"t_uint104","astId":3791,"label":"lockedAmount","offset":2,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"0","type":"t_uint104","astId":3793,"label":"lastLockedAmount","offset":15,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"1","type":"t_uint128","astId":3795,"label":"totalPending","offset":0,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"1","type":"t_uint128","astId":3797,"label":"queuedWithdrawShares","offset":16,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"}],"encoding":"inplace","numberOfBytes":"64"},"t_struct(Withdrawal)3810_storage":{"label":"struct Vault.Withdrawal","members":[{"slot":"0","type":"t_uint16","astId":3807,"label":"round","offset":0,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"0","type":"t_uint128","astId":3809,"label":"shares","offset":2,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"}],"encoding":"inplace","numberOfBytes":"32"},"t_struct(OptionState)3787_storage":{"label":"struct Vault.OptionState","members":[{"slot":"0","type":"t_address","astId":3782,"label":"nextOption","offset":0,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"1","type":"t_address","astId":3784,"label":"currentOption","offset":0,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"1","type":"t_uint32","astId":3786,"label":"nextOptionReadyAt","offset":20,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"}],"encoding":"inplace","numberOfBytes":"64"},"t_struct(VaultParams)3780_storage":{"label":"struct Vault.VaultParams","members":[{"slot":"0","type":"t_bool","astId":3769,"label":"isPut","offset":0,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"0","type":"t_uint8","astId":3771,"label":"decimals","offset":1,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"0","type":"t_address","astId":3773,"label":"asset","offset":2,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"1","type":"t_address","astId":3775,"label":"underlying","offset":0,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"1","type":"t_uint56","astId":3777,"label":"minimumSupply","offset":20,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"2","type":"t_uint104","astId":3779,"label":"cap","offset":0,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"}],"encoding":"inplace","numberOfBytes":"96"},"t_struct(DepositReceipt)3805_storage":{"label":"struct Vault.DepositReceipt","members":[{"slot":"0","type":"t_uint16","astId":3800,"label":"round","offset":0,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"0","type":"t_uint104","astId":3802,"label":"amount","offset":2,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"0","type":"t_uint128","astId":3804,"label":"unredeemedShares","offset":15,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"}],"encoding":"inplace","numberOfBytes":"32"},"t_mapping(t_address,t_mapping(t_address,t_uint256))":{"key":"t_address","label":"mapping(address => mapping(address => uint256))","value":"t_mapping(t_address,t_uint256)","encoding":"mapping","numberOfBytes":"32"},"t_mapping(t_address,t_struct(Withdrawal)3810_storage)":{"key":"t_address","label":"mapping(address => struct Vault.Withdrawal)","value":"t_struct(Withdrawal)3810_storage","encoding":"mapping","numberOfBytes":"32"},"t_mapping(t_address,t_struct(DepositReceipt)3805_storage)":{"key":"t_address","label":"mapping(address => struct Vault.DepositReceipt)","value":"t_struct(DepositReceipt)3805_storage","encoding":"mapping","numberOfBytes":"32"}},"storage":[{"slot":"0","type":"t_bool","astId":130,"label":"_initialized","offset":0,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"0","type":"t_bool","astId":133,"label":"_initializing","offset":1,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"1","type":"t_uint256","astId":184,"label":"_status","offset":0,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"2","type":"t_array(t_uint256)49_storage","astId":227,"label":"__gap","offset":0,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"51","type":"t_array(t_uint256)50_storage","astId":947,"label":"__gap","offset":0,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"101","type":"t_address","astId":10,"label":"_owner","offset":0,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"102","type":"t_array(t_uint256)49_storage","astId":123,"label":"__gap","offset":0,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"151","type":"t_mapping(t_address,t_uint256)","astId":247,"label":"_balances","offset":0,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"152","type":"t_mapping(t_address,t_mapping(t_address,t_uint256))","astId":253,"label":"_allowances","offset":0,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"153","type":"t_uint256","astId":255,"label":"_totalSupply","offset":0,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"154","type":"t_string_storage","astId":257,"label":"_name","offset":0,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"155","type":"t_string_storage","astId":259,"label":"_symbol","offset":0,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"156","type":"t_array(t_uint256)45_storage","astId":800,"label":"__gap","offset":0,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"201","type":"t_mapping(t_address,t_struct(DepositReceipt)3805_storage)","astId":6695,"label":"depositReceipts","offset":0,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"202","type":"t_mapping(t_uint256,t_uint256)","astId":6700,"label":"roundPricePerShare","offset":0,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"203","type":"t_mapping(t_address,t_struct(Withdrawal)3810_storage)","astId":6706,"label":"withdrawals","offset":0,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"204","type":"t_struct(VaultParams)3780_storage","astId":6710,"label":"vaultParams","offset":0,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"207","type":"t_struct(VaultState)3798_storage","astId":6714,"label":"vaultState","offset":0,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"209","type":"t_struct(OptionState)3787_storage","astId":6718,"label":"optionState","offset":0,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"211","type":"t_address","astId":6721,"label":"feeRecipient","offset":0,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"212","type":"t_address","astId":6724,"label":"keeper","offset":0,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"213","type":"t_uint256","astId":6727,"label":"performanceFee","offset":0,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"214","type":"t_uint256","astId":6730,"label":"managementFee","offset":0,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"215","type":"t_array(t_uint256)30_storage","astId":6734,"label":"____gap","offset":0,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"245","type":"t_address","astId":5613,"label":"optionsPremiumPricer","offset":0,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"246","type":"t_address","astId":5615,"label":"strikeSelection","offset":0,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"247","type":"t_uint256","astId":5617,"label":"premiumDiscount","offset":0,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"248","type":"t_uint256","astId":5619,"label":"currentOtokenPremium","offset":0,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"249","type":"t_uint16","astId":5621,"label":"lastStrikeOverrideRound","offset":0,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"250","type":"t_uint256","astId":5623,"label":"overriddenStrikePrice","offset":0,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"251","type":"t_uint256","astId":5625,"label":"auctionDuration","offset":0,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"252","type":"t_uint256","astId":5627,"label":"optionAuctionID","offset":0,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"253","type":"t_uint256","astId":5630,"label":"lastQueuedWithdrawAmount","offset":0,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"254","type":"t_bool","astId":5633,"label":"_isUsdcAuction","offset":0,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"255","type":"t_bytes_storage","astId":5635,"label":"_swapPath","offset":0,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"256","type":"t_address","astId":5638,"label":"liquidityGauge","offset":0,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"257","type":"t_address","astId":5641,"label":"optionsPurchaseQueue","offset":0,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"258","type":"t_uint256","astId":5644,"label":"currentQueuedWithdrawShares","offset":0,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"259","type":"t_address","astId":5647,"label":"vaultPauser","offset":0,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"},{"slot":"260","type":"t_address","astId":5650,"label":"_offerExecutor","offset":0,"contract":"contracts/vaults/BaseVaultWithSwap/RibbonThetaVaultWithSwap.sol:RibbonThetaVaultWithSwap"}]},"transientStorageLayout":null,"evm":{"bytecode":{"object":"6101406040523480156200001257600080fd5b5060405162005c9438038062005c94833981016040819052620000359162000252565b85858484846001600160a01b0385166200007f5760405162461bcd60e51b8152602060048201526006602482015265042beeecae8d60d31b60448201526064015b60405180910390fd5b6001600160a01b038416620000c05760405162461bcd60e51b8152602060048201526006602482015265215f7573646360d01b604482015260640162000076565b6001600160a01b038116620001095760405162461bcd60e51b815260206004820152600e60248201526d0857dcddd85c10dbdb9d1c9858dd60921b604482015260640162000076565b6001600160a01b038316620001555760405162461bcd60e51b815260206004820152601160248201527010afb3b0b6b6b0a1b7b73a3937b63632b960791b604482015260640162000076565b6001600160a01b0382166200019c5760405162461bcd60e51b815260206004820152600c60248201526b0857db585c99da5b941bdbdb60a21b604482015260640162000076565b6001600160601b0319606095861b811660805293851b841660a05291841b831660c052831b821660e05290911b16610100526001600160a01b038416620002185760405162461bcd60e51b815260206004820152600f60248201526e215f6f546f6b656e466163746f727960881b604482015260640162000076565b50505060601b6001600160601b0319166101205250620002d29050565b80516001600160a01b03811681146200024d57600080fd5b919050565b60008060008060008060c087890312156200026b578182fd5b620002768762000235565b9550620002866020880162000235565b9450620002966040880162000235565b9350620002a66060880162000235565b9250620002b66080880162000235565b9150620002c660a0880162000235565b90509295509295509295565b60805160601c60a05160601c60c05160601c60e05160601c6101005160601c6101205160601c61590c6200038860003960008181610f2a0152612d60015260008181610ea001528181611a4c0152613c200152600081816108ac015261220e0152600081816105610152818161193c015281816121e60152613d58015260008181610af60152612d85015260008181610db601528181612a3d01528181612ae9015281816132eb0152613328015261590c6000f3fe6080604052600436106104945760003560e01c80638b10cc7c11610260578063ca59409411610144578063e74b981b116100c1578063f756fa2111610085578063f756fa211461105a578063f87c7d931461106f578063f957a06714611084578063f9a0be68146110a4578063fba7dc61146110c5578063fe56e232146110e657600080fd5b8063e74b981b14610fbd578063f001382714610fdd578063f2fde38b14610ffd578063f6326fb31461101d578063f656ba511461102557600080fd5b8063db006a7511610108578063db006a7514610ef8578063db43e86214610f18578063dd62ed3e14610f4c578063e278fe6f14610f92578063e73c63d514610fa757600080fd5b8063ca59409414610e59578063ce7c2ac214610e6e578063cf3afa5114610e8e578063d164cc1514610ec2578063d5f2638214610ee257600080fd5b8063a457c2d7116101dd578063ad5c4648116101a1578063ad5c464814610da4578063ad7a672f14610dd8578063afa6626414610ded578063b4d1d79514610e0d578063b6b55f2514610e24578063b9f8092b14610e4457600080fd5b8063a457c2d714610d0e578063a694fc3a14610d2e578063a6f7f5d614610d4e578063a9059cbb14610d64578063aced166114610d8457600080fd5b80639be43daa116102245780639be43daa14610b9f5780639fcc2d7514610bbf578063a083ff1714610c6b578063a285c9e814610cce578063a2db9d8314610cf057600080fd5b80638b10cc7c14610b185780638da5cb5b14610b36578063947061b514610b5457806395d89b4114610b7557806399530b0614610b8a57600080fd5b806347786d371161038757806369b41170116103045780637a9262a2116102c85780637a9262a214610a075780637e108d5214610a6b57806383536ff314610a8b57806387153eb114610aa15780638778878214610ace57806389a3027114610ae457600080fd5b806369b41170146109725780636f31ab341461098757806370897b231461099c57806370a08231146109bc578063715018a6146109f257600080fd5b80635ea8cd121161034b5780635ea8cd1214610865578063600a2cfb14610885578063650cce8a1461089a5780636719b2ee146108ce578063692308681461095257600080fd5b806347786d37146107d85780634b2431d9146107f8578063503c70aa1461080f57806355489bb214610825578063573f0d6e1461084557600080fd5b8063313ce567116104155780633f23bb73116103d95780633f23bb73146107445780633f90916a14610764578063432833a6146107825780634603c0aa1461079857806346904840146107b857600080fd5b8063313ce5671461068e578063355274ea146106b857806336efd16f146106d657806339509351146106f65780633ec143d31461071657600080fd5b80631a92f6c21161045c5780631a92f6c21461054f57806323b872dd1461059b5780632728f333146105bb5780632775d01c1461064e57806330630da41461066e57600080fd5b8063048bf0851461049957806306fdde03146104bb578063095ea7b3146104e65780630cbf54c81461051657806318160ddd1461053a575b600080fd5b3480156104a557600080fd5b506104b96104b4366004614e83565b611106565b005b3480156104c757600080fd5b506104d061115c565b6040516104dd9190615267565b60405180910390f35b3480156104f257600080fd5b50610506610501366004614f17565b6111ee565b60405190151581526020016104dd565b34801561052257600080fd5b5061052c60fb5481565b6040519081526020016104dd565b34801561054657600080fd5b5060995461052c565b34801561055b57600080fd5b506105837f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016104dd565b3480156105a757600080fd5b506105066105b6366004614ed7565b611205565b3480156105c757600080fd5b5060cf5460d0546106099161ffff8116916001600160681b03620100008304811692600160781b900416906001600160801b0380821691600160801b90041685565b6040805161ffff90961686526001600160681b03948516602087015293909216928401929092526001600160801b03918216606084015216608082015260a0016104dd565b34801561065a57600080fd5b506104b9610669366004615088565b6112b1565b34801561067a57600080fd5b506104b9610689366004614e83565b611454565b34801561069a57600080fd5b5060cc54610100900460ff1660405160ff90911681526020016104dd565b3480156106c457600080fd5b5060ce546001600160681b031661052c565b3480156106e257600080fd5b506104b96106f13660046150b8565b6114ec565b34801561070257600080fd5b50610506610711366004614f17565b611574565b34801561072257600080fd5b5060f9546107319061ffff1681565b60405161ffff90911681526020016104dd565b34801561075057600080fd5b5061052c61075f366004614e83565b6115b0565b34801561077057600080fd5b5060d0546001600160801b031661052c565b34801561078e57600080fd5b5061052c60fc5481565b3480156107a457600080fd5b506104b96107b3366004614e83565b611603565b3480156107c457600080fd5b5060d354610583906001600160a01b031681565b3480156107e457600080fd5b506104b96107f3366004615088565b6116a5565b34801561080457600080fd5b5061052c6101025481565b34801561081b57600080fd5b5061052c60fd5481565b34801561083157600080fd5b506104b9610840366004615061565b611780565b34801561085157600080fd5b506104b9610860366004614e83565b611818565b34801561087157600080fd5b506104b9610880366004615088565b611865565b34801561089157600080fd5b506104b96118d0565b3480156108a657600080fd5b506105837f000000000000000000000000000000000000000000000000000000000000000081565b3480156108da57600080fd5b506109216108e9366004614e83565b60c96020526000908152604090205461ffff8116906201000081046001600160681b031690600160781b90046001600160801b031683565b6040805161ffff90941684526001600160681b0390921660208401526001600160801b0316908201526060016104dd565b34801561095e57600080fd5b506104b961096d366004614f78565b6119e0565b34801561097e57600080fd5b5061052c600081565b34801561099357600080fd5b506104b9611abe565b3480156109a857600080fd5b506104b96109b7366004615088565b611afb565b3480156109c857600080fd5b5061052c6109d7366004614e83565b6001600160a01b031660009081526097602052604090205490565b3480156109fe57600080fd5b506104b9611bc2565b348015610a1357600080fd5b50610a49610a22366004614e83565b60cb6020526000908152604090205461ffff8116906201000090046001600160801b031682565b6040805161ffff90931683526001600160801b039091166020830152016104dd565b348015610a7757600080fd5b506104b9610a86366004615088565b611bf8565b348015610a9757600080fd5b5061052c60f75481565b348015610aad57600080fd5b5061052c610abc366004615088565b60ca6020526000908152604090205481565b348015610ada57600080fd5b5061052c60d55481565b348015610af057600080fd5b506105837f000000000000000000000000000000000000000000000000000000000000000081565b348015610b2457600080fd5b5060d2546001600160a01b0316610583565b348015610b4257600080fd5b506065546001600160a01b0316610583565b348015610b6057600080fd5b5061010354610583906001600160a01b031681565b348015610b8157600080fd5b506104d0611c42565b348015610b9657600080fd5b5061052c611c51565b348015610bab57600080fd5b506104b9610bba366004615088565b611c8b565b348015610bcb57600080fd5b5060cc5460cd5460ce54610c1b9260ff808216936101008304909116926001600160a01b036201000090930483169282169166ffffffffffffff600160a01b90910416906001600160681b031686565b60408051961515875260ff90951660208701526001600160a01b03938416948601949094529116606084015266ffffffffffffff1660808301526001600160681b031660a082015260c0016104dd565b348015610c7757600080fd5b5060d15460d254610ca2916001600160a01b039081169190811690600160a01b900463ffffffff1683565b604080516001600160a01b03948516815293909216602084015263ffffffff16908201526060016104dd565b348015610cda57600080fd5b5060d254600160a01b900463ffffffff1661052c565b348015610cfc57600080fd5b5060d1546001600160a01b0316610583565b348015610d1a57600080fd5b50610506610d29366004614f17565b611d85565b348015610d3a57600080fd5b506104b9610d49366004615088565b611e1e565b348015610d5a57600080fd5b5061052c60d65481565b348015610d7057600080fd5b50610506610d7f366004614f17565b611f1c565b348015610d9057600080fd5b5060d454610583906001600160a01b031681565b348015610db057600080fd5b506105837f000000000000000000000000000000000000000000000000000000000000000081565b348015610de457600080fd5b5061052c611f29565b348015610df957600080fd5b5060f554610583906001600160a01b031681565b348015610e1957600080fd5b5061052c62093a8081565b348015610e3057600080fd5b506104b9610e3f366004615088565b612057565b348015610e5057600080fd5b506104b96120c4565b348015610e6557600080fd5b506104b96122ba565b348015610e7a57600080fd5b5061052c610e89366004614e83565b61235d565b348015610e9a57600080fd5b506105837f000000000000000000000000000000000000000000000000000000000000000081565b348015610ece57600080fd5b506104b9610edd366004614e83565b61237a565b348015610eee57600080fd5b5061052c60f85481565b348015610f0457600080fd5b506104b9610f13366004615088565b612409565b348015610f2457600080fd5b506105837f000000000000000000000000000000000000000000000000000000000000000081565b348015610f5857600080fd5b5061052c610f67366004614e9f565b6001600160a01b03918216600090815260986020908152604080832093909416825291909152205490565b348015610f9e57600080fd5b506104b9612476565b348015610fb357600080fd5b5061052c60fa5481565b348015610fc957600080fd5b506104b9610fd8366004614e83565b61262a565b348015610fe957600080fd5b506104b9610ff8366004615005565b61271d565b34801561100957600080fd5b506104b9611018366004614e83565b612975565b6104b9612a10565b34801561103157600080fd5b50611045611040366004614e83565b612b61565b604080519283526020830191909152016104dd565b34801561106657600080fd5b506104b9612c44565b34801561107b57600080fd5b506104b9612c99565b34801561109057600080fd5b5060f654610583906001600160a01b031681565b3480156110b057600080fd5b5061010054610583906001600160a01b031681565b3480156110d157600080fd5b5061010154610583906001600160a01b031681565b3480156110f257600080fd5b506104b9611101366004615088565b612ef2565b6065546001600160a01b031633146111395760405162461bcd60e51b8152600401611130906152e9565b60405180910390fd5b61010080546001600160a01b0319166001600160a01b0392909216919091179055565b6060609a805461116b906156d6565b80601f0160208091040260200160405190810160405280929190818152602001828054611197906156d6565b80156111e45780601f106111b9576101008083540402835291602001916111e4565b820191906000526020600020905b8154815290600101906020018083116111c757829003601f168201915b5050505050905090565b60006111fb338484612fd3565b5060015b92915050565b60006112128484846130f8565b6001600160a01b0384166000908152609860209081526040808320338452909152902054828110156112975760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b6064820152608401611130565b6112a48533858403612fd3565b60019150505b9392505050565b600260015414156112d45760405162461bcd60e51b81526004016111309061533f565b600260015533600090815260c96020526040902060cf5461ffff168261130c5760405162461bcd60e51b81526004016111309061531e565b815461ffff1681146113505760405162461bcd60e51b815260206004820152600d60248201526c125b9d985b1a59081c9bdd5b99609a1b6044820152606401611130565b81546201000090046001600160681b0316838110156113a15760405162461bcd60e51b815260206004820152600d60248201526c115e18d9595908185b5bdd5b9d609a1b6044820152606401611130565b6113ab81856132c8565b83546001600160681b0391909116620100000262010000600160781b031990911617835560d0546113e5906001600160801b0316856132c8565b60d080546001600160801b0319166001600160801b0392909216919091179055604080518581526020810184905233917fab2daf3c146ca6416cbccd2a86ed2ba995e171ef6319df14a38aef01403a9c96910160405180910390a261144a33856132d4565b5050600180555050565b6065546001600160a01b0316331461147e5760405162461bcd60e51b8152600401611130906152e9565b6001600160a01b0381166114ca5760405162461bcd60e51b815260206004820152601360248201527210b732bba9ba3934b5b2a9b2b632b1ba34b7b760691b6044820152606401611130565b60f680546001600160a01b0319166001600160a01b0392909216919091179055565b6002600154141561150f5760405162461bcd60e51b81526004016111309061533f565b6002600155816115315760405162461bcd60e51b81526004016111309061531e565b6001600160a01b03811661154457600080fd5b61154e8282613435565b60cc5461156c906201000090046001600160a01b03163330856136c7565b505060018055565b3360008181526098602090815260408083206001600160a01b038716845290915281205490916111fb9185906115ab908690615551565b612fd3565b60cc5460009060ff61010090910416816115e66115cc60995490565b6115d4611f29565b60d0546001600160801b031685613732565b90506115fb6115f48561235d565b8284613772565b949350505050565b6065546001600160a01b0316331461162d5760405162461bcd60e51b8152600401611130906152e9565b6001600160a01b0381166116835760405162461bcd60e51b815260206004820152601860248201527f216e65774f7074696f6e735072656d69756d50726963657200000000000000006044820152606401611130565b60f580546001600160a01b0319166001600160a01b0392909216919091179055565b6065546001600160a01b031633146116cf5760405162461bcd60e51b8152600401611130906152e9565b600081116117095760405162461bcd60e51b81526020600482015260076024820152660216e65774361760cc1b6044820152606401611130565b611712816137d4565b60ce54604080516001600160681b039092168252602082018390527f5f86edbb9d92228a9edc3f0ebc0f001bda1ea345ac7335e0eeef3504b31d1a1c910160405180910390a160ce80546cffffffffffffffffffffffffff19166001600160681b0392909216919091179055565b6065546001600160a01b031633146117aa5760405162461bcd60e51b8152600401611130906152e9565b6000816001600160801b0316116117f25760405162461bcd60e51b815260206004820152600c60248201526b21737472696b65507269636560a01b6044820152606401611130565b6001600160801b031660fa5560cf5460f9805461ffff191661ffff909216919091179055565b6065546001600160a01b031633146118425760405162461bcd60e51b8152600401611130906152e9565b61010380546001600160a01b0319166001600160a01b0392909216919091179055565b60d4546001600160a01b0316331461188f5760405162461bcd60e51b81526004016111309061527a565b600081116118cb5760405162461bcd60e51b8152602060048201526009602482015268216d696e507269636560b81b6044820152606401611130565b60f855565b60d4546001600160a01b031633146118fa5760405162461bcd60e51b81526004016111309061527a565b6002600154141561191d5760405162461bcd60e51b81526004016111309061533f565b600260015560d2546040516358ffbb3d60e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081166004830152909116602482015273f7f4260943db50eee7e917330c35b460ff70ad54906358ffbb3d9060440160206040518083038186803b1580156119a157600080fd5b505af41580156119b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119d991906150a0565b5060018055565b60d4546001600160a01b03163314611a0a5760405162461bcd60e51b81526004016111309061527a565b60026001541415611a2d5760405162461bcd60e51b81526004016111309061533f565b600260015560fc54604051633545cbf360e21b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163d5172fcc91611a84919086908690600401615449565b600060405180830381600087803b158015611a9e57600080fd5b505af1158015611ab2573d6000803e3d6000fd5b50506001805550505050565b60026001541415611ae15760405162461bcd60e51b81526004016111309061533f565b6002600181905550611af56000600161381e565b60018055565b6065546001600160a01b03163314611b255760405162461bcd60e51b8152600401611130906152e9565b611b33620f42406064615674565b8110611b815760405162461bcd60e51b815260206004820152601760248201527f496e76616c696420706572666f726d616e6365206665650000000000000000006044820152606401611130565b60d55460408051918252602082018390527f24867dfb6fcb9970a07be21024956524abe7a1837faa903ff0e99aaa40cf893e910160405180910390a160d555565b6065546001600160a01b03163314611bec5760405162461bcd60e51b8152600401611130906152e9565b611bf660006139cd565b565b60026001541415611c1b5760405162461bcd60e51b81526004016111309061533f565b6002600155611c2981613a1f565b61010254611c379082613be6565b610102555060018055565b6060609b805461116b906156d6565b6000611c86611c5f60995490565b611c67611f29565b60d05460cc546001600160801b0390911690610100900460ff16613732565b905090565b60026001541415611cae5760405162461bcd60e51b81526004016111309061533f565b600260015580611ced5760405162461bcd60e51b815260206004820152600a602482015269216e756d526f756e647360b01b6044820152606401611130565b60cf5461ffff1660005b82811015611d7c576000611d0b8284615551565b600081815260ca602052604090205490915015611d585760405162461bcd60e51b815260206004820152600b60248201526a125b9a5d1a585b1a5e995960aa1b6044820152606401611130565b600090815260ca602052604090206001905580611d7481615711565b915050611cf7565b50506001805550565b3360009081526098602090815260408083206001600160a01b038616845290915281205482811015611e075760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401611130565b611e143385858403612fd3565b5060019392505050565b60026001541415611e415760405162461bcd60e51b81526004016111309061533f565b6002600155610100546001600160a01b031680611e5d57600080fd5b60008211611e6a57600080fd5b3360009081526097602052604090205482811015611e9657611e96611e8f84836132c8565b600061381e565b611ea13330856130f8565b611eac308385612fd3565b6040516383df674760e01b815260048101849052336024820152600060448201526001600160a01b038316906383df674790606401600060405180830381600087803b158015611efb57600080fd5b505af1158015611f0f573d6000803e3d6000fd5b5050600180555050505050565b60006111fb3384846130f8565b60d2546000906001600160a01b0316611fbc5760cc546040516370a0823160e01b8152306004820152620100009091046001600160a01b0316906370a082319060240160206040518083038186803b158015611f8457600080fd5b505afa158015611f98573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c8691906150a0565b60cc546040516370a0823160e01b8152306004820152611c86916201000090046001600160a01b0316906370a082319060240160206040518083038186803b15801561200757600080fd5b505afa15801561201b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061203f91906150a0565b60cf546201000090046001600160681b031690613be6565b6002600154141561207a5760405162461bcd60e51b81526004016111309061533f565b60026001558061209c5760405162461bcd60e51b81526004016111309061531e565b6120a68133613435565b60cc546119d9906201000090046001600160a01b03163330846136c7565b60d4546001600160a01b031633146120ee5760405162461bcd60e51b81526004016111309061527a565b600260015414156121115760405162461bcd60e51b81526004016111309061533f565b600260015560d1546001600160a01b03168061215d5760405162461bcd60e51b815260206004820152600b60248201526a10b732bc3a27b83a34b7b760a91b6044820152606401611130565b60d280546001600160a01b03199081166001600160a01b03841690811790925560d18054909116905560cf54604051620100009091046001600160681b03168082529133917f045c558fdce4714c5816d53820d27420f4cd860892df203fe636384d8d19aa019060200160405180910390a3604051632904c23960e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811660048301527f000000000000000000000000000000000000000000000000000000000000000081166024830152831660448201526064810182905273f7f4260943db50eee7e917330c35b460ff70ad5490632904c2399060840160206040518083038186803b15801561227957600080fd5b505af415801561228d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122b191906150a0565b5061156c613bf2565b610103546001600160a01b0316806122d157600080fd5b6122dd6000600161381e565b33600081815260976020526040902054906122f9908383612fd3565b60405163c9c2d4f560e01b8152336004820152602481018290526001600160a01b0383169063c9c2d4f590604401600060405180830381600087803b15801561234157600080fd5b505af1158015612355573d6000803e3d6000fd5b505050505050565b600080600061236b84612b61565b90925090506115fb8282613be6565b6065546001600160a01b031633146123a45760405162461bcd60e51b8152600401611130906152e9565b6001600160a01b0381166123e75760405162461bcd60e51b815260206004820152600a60248201526910b732bba5b2b2b832b960b11b6044820152606401611130565b60d480546001600160a01b0319166001600160a01b0392909216919091179055565b6002600154141561242c5760405162461bcd60e51b81526004016111309061533f565b60026001558061246b5760405162461bcd60e51b815260206004820152600a602482015269216e756d53686172657360b01b6044820152606401611130565b6119d981600061381e565b600260015414156124995760405162461bcd60e51b81526004016111309061533f565b600260015560d2546001600160a01b0316801515806124be575060cf5461ffff166001145b6124f95760405162461bcd60e51b815260206004820152600c60248201526b149bdd5b990818db1bdcd95960a21b6044820152606401611130565b61250281613cc4565b600061010254905060008061251960fd5484613e3a565b60fd81905560d054919350915060009061254390600160801b90046001600160801b031685613be6565b905061254e816140c1565b60d080546001600160801b03808416600160801b029116179055600061010255612577836137d4565b60cf805462010000600160781b031916620100006001600160681b0386160217905560006125a54282613be6565b905063ffffffff8111156125fb5760405162461bcd60e51b815260206004820152601860248201527f4f766572666c6f77206e6578744f7074696f6e526561647900000000000000006044820152606401611130565b60d2805463ffffffff909216600160a01b0263ffffffff60a01b19909216919091179055505060018055505050565b6065546001600160a01b031633146126545760405162461bcd60e51b8152600401611130906152e9565b6001600160a01b03811661269d5760405162461bcd60e51b815260206004820152601060248201526f085b995dd19959549958da5c1a595b9d60821b6044820152606401611130565b60d3546001600160a01b03828116911614156126fb5760405162461bcd60e51b815260206004820152601860248201527f4d757374206265206e657720666565526563697069656e7400000000000000006044820152606401611130565b60d380546001600160a01b0319166001600160a01b0392909216919091179055565b600054610100900460ff1680612736575060005460ff16155b6127525760405162461bcd60e51b81526004016111309061529b565b600054610100900460ff16158015612774576000805461ffff19166101011790555b6128396127846020850185614e83565b6127946040860160208701614e83565b6127a46060870160408801614e83565b606087013560808801356127bb60a08a018a61550c565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506127fd9250505060c08b018b61550c565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508c925061410b915050565b600061284c610100850160e08601614e83565b6001600160a01b0316141561289c5760405162461bcd60e51b815260206004820152601660248201527510afb7b83a34b7b739a83932b6b4bab6a83934b1b2b960511b6044820152606401611130565b60006128b061012085016101008601614e83565b6001600160a01b031614156128fb5760405162461bcd60e51b815260206004820152601160248201527010afb9ba3934b5b2a9b2b632b1ba34b7b760791b6044820152606401611130565b61290c610100840160e08501614e83565b60f580546001600160a01b0319166001600160a01b039290921691909117905561293e61012084016101008501614e83565b60f680546001600160a01b0319166001600160a01b03929092169190911790558015612970576000805461ff00191690555b505050565b6065546001600160a01b0316331461299f5760405162461bcd60e51b8152600401611130906152e9565b6001600160a01b038116612a045760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401611130565b612a0d816139cd565b50565b60026001541415612a335760405162461bcd60e51b81526004016111309061533f565b600260015560cc547f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03908116620100009092041614612aa45760405162461bcd60e51b8152602060048201526005602482015264042ae8aa8960db1b6044820152606401611130565b60003411612add5760405162461bcd60e51b81526020600482015260066024820152652176616c756560d01b6044820152606401611130565b612ae73433613435565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b158015612b4257600080fd5b505af1158015612b56573d6000803e3d6000fd5b505060018055505050565b6001600160a01b038116600090815260c9602090815260408083208151606081018352905461ffff81168083526201000082046001600160681b031694830194909452600160781b90046001600160801b031691810191909152829160011115612be3575050506001600160a01b031660009081526097602052604081205491565b60cf54815161ffff908116600090815260ca602052604081205460cc549193612c1993869391169190610100900460ff1661434a565b9050612c3a856001600160a01b031660009081526097602052604090205490565b9590945092505050565b60026001541415612c675760405162461bcd60e51b81526004016111309061533f565b60026001556000612c766143bb565b60fd54909150612c8690826132c8565b6001600160801b031660fd555060018055565b60d4546001600160a01b03163314612cc35760405162461bcd60e51b81526004016111309061527a565b60026001541415612ce65760405162461bcd60e51b81526004016111309061533f565b600260015560d2546001600160a01b031680158015612d0c575060cf5461ffff16600114155b612d4b5760405162461bcd60e51b815260206004820152601060248201526f149bdd5b99081b9bdd0818db1bdcd95960821b6044820152606401611130565b60408051610120810182526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811682527f00000000000000000000000000000000000000000000000000000000000000008116602083015260cc8054620100009004821683850152848216606084015260006080840181905260f95461ffff1660a085015260fa5460c085015260f654831660e085015260f55490921661010084015292516377e3ce0d60e11b8152919290918291829173f7f4260943db50eee7e917330c35b460ff70ad549163efc79c1a91612e3791889160cf90600401615376565b60606040518083038186803b158015612e4f57600080fd5b505af4158015612e63573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e879190614f42565b604080518381526020810183905293965091945092507fa217999b1c125c2a996f712c5f26a28addad7167bd8a67d5bd5b2a751148abb0910160405180910390a1505060d180546001600160a01b0319166001600160a01b0392909216919091179055505060018055565b6065546001600160a01b03163314612f1c5760405162461bcd60e51b8152600401611130906152e9565b612f2a620f42406064615674565b8110612f715760405162461bcd60e51b8152602060048201526016602482015275496e76616c6964206d616e6167656d656e742066656560501b6044820152606401611130565b6000612f8e63031ba309612f8884620f4240614578565b90614584565b60d65460408051918252602082018590529192507f4e874b007ab14f7e263baefd44951834c8266f4f224d1092e49e9c254354cc54910160405180910390a160d65550565b6001600160a01b0383166130355760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401611130565b6001600160a01b0382166130965760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401611130565b6001600160a01b0383811660008181526098602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b6001600160a01b03831661315c5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401611130565b6001600160a01b0382166131be5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401611130565b6001600160a01b038316600090815260976020526040902054818110156132365760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401611130565b6001600160a01b0380851660009081526097602052604080822085850390559185168152908120805484929061326d908490615551565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516132b991815260200190565b60405180910390a35b50505050565b60006112aa8284615693565b60cc546001600160a01b03620100009091048116907f00000000000000000000000000000000000000000000000000000000000000001681141561342157604051632e1a7d4d60e01b8152600481018390527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690632e1a7d4d90602401600060405180830381600087803b15801561337457600080fd5b505af1158015613388573d6000803e3d6000fd5b505050506000836001600160a01b03168360405160006040518083038185875af1925050503d80600081146133d9576040519150601f19603f3d011682016040523d82523d6000602084013e6133de565b606091505b50509050806132c25760405162461bcd60e51b815260206004820152600f60248201526e151c985b9cd9995c8819985a5b1959608a1b6044820152606401611130565b6129706001600160a01b0382168484614590565b60cf5461ffff1660006134508461344a611f29565b90613be6565b60ce549091506001600160681b031681111561349b5760405162461bcd60e51b815260206004820152600a6024820152690457863656564206361760b41b6044820152606401611130565b60cd54600160a01b900466ffffffffffffff168110156134f45760405162461bcd60e51b8152602060048201526014602482015273496e73756666696369656e742062616c616e636560601b6044820152606401611130565b60408051858152602081018490526001600160a01b038516917f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a15910160405180910390a26001600160a01b038316600090815260c9602090815260408083208151606081018352905461ffff81168083526201000082046001600160681b031683860152600160781b9091046001600160801b031682840152845260ca90925282205460cc549192916135b3918491879190610100900460ff1661434a565b8251909150869061ffff168514156135e45760208301516000906135e0906001600160681b031689613be6565b9150505b6135ed816137d4565b6040805160608101825261ffff80881682526001600160681b0380851660208085019182526001600160801b038089168688019081526001600160a01b038e16600090815260c990935296822095518654935197518216600160781b02600160781b600160f81b03199890951662010000026effffffffffffffffffffffffffffff1990941695169490941791909117949094161790915560d054613693911689613be6565b905061369e816140c1565b60d080546001600160801b0319166001600160801b039290921691909117905550505050505050565b6040516001600160a01b03808516602483015283166044820152606481018290526132c29085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526145c0565b60008061374083600a6155cc565b9050600086116137505780613768565b61376886612f8861376188886132c8565b8490614578565b9695505050505050565b6000600183116137bc5760405162461bcd60e51b8152602060048201526015602482015274496e76616c6964206173736574506572536861726560581b6044820152606401611130565b6115fb6137ca83600a6155cc565b612f888686614578565b6001600160681b03811115612a0d5760405162461bcd60e51b815260206004820152601060248201526f13dd995c999b1bddc81d5a5b9d0c4c0d60821b6044820152606401611130565b33600090815260c9602090815260408083208151606081018352905461ffff8082168084526201000083046001600160681b031684870152600160781b9092046001600160801b03168385015260cf5491865260ca9094529184205460cc54919492909316926138999185918591610100900460ff1661434a565b9050836138a657846138a8565b805b9450846138b6575050505050565b808511156138fa5760405162461bcd60e51b81526020600482015260116024820152704578636565647320617661696c61626c6560781b6044820152606401611130565b825161ffff168211156139275733600090815260c960205260409020805462010000600160781b03191690555b613930856140c1565b61393a81866132c8565b33600081815260c960205260409081902080546001600160801b0394909416600160781b02600160781b600160f81b0319909416939093179092558451915190917fe5b754fb1abb7f01b499791d0b820ae3b6af3424ac1c59768edb53f4ec31a929916139b39189825261ffff16602082015260400190565b60405180910390a26139c63033876130f8565b5050505050565b606580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60008111613a5c5760405162461bcd60e51b815260206004820152600a602482015269216e756d53686172657360b01b6044820152606401611130565b33600090815260c960205260409020546201000090046001600160681b0316151580613aa6575033600090815260c96020526040902054600160781b90046001600160801b031615155b15613ab757613ab76000600161381e565b60cf5433600081815260cb60209081526040918290208054835187815261ffff96871693810184905292959194911685149290917f0c53c82ad07e2d592d88ece3b066777dd60f1118e2a081b380efc4358f0d9e2a910160405180910390a281546201000090046001600160801b031660008215613b4057613b398287613be6565b9050613ba3565b8115613b825760405162461bcd60e51b81526020600482015260116024820152704578697374696e6720776974686472617760781b6044820152606401611130565b5033600090815260cb60205260409020805461ffff191661ffff8616179055845b613bac816140c1565b33600081815260cb60205260409020805462010000600160901b031916620100006001600160801b038516021790556123559030886130f8565b60006112aa8284615551565b60d25460f8546040516301c6654960e21b81526001600160a01b0392831660048201819052602482018390527f0000000000000000000000000000000000000000000000000000000000000000909316604482015260cc606482015273f7f4260943db50eee7e917330c35b460ff70ad549063071995249060840160206040518083038186803b158015613c8557600080fd5b505af4158015613c99573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613cbd91906150a0565b60fc555050565b60cf546201000090046001600160681b03166001600160a01b03821615613d105760cf80546cffffffffffffffffffffffffff60781b1916600160781b6001600160681b038416021790555b60cf805462010000600160781b031916905560d280546001600160a01b03191690556001600160a01b03821615613e3657604051636c6fe87f60e11b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016600482015260009073f7f4260943db50eee7e917330c35b460ff70ad549063d8dfd0fe9060240160206040518083038186803b158015613db757600080fd5b505af4158015613dcb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613def91906150a0565b9050336001600160a01b0316836001600160a01b03167f7e830f7c1771deb1bdb35c4a7e6051bbac32b376f7f4e4976b8618b0b11997f7836040516130eb91815260200190565b5050565b60d3546040805160e08101825260cc54610100810460ff16825291516370a0823160e01b815230600482015260009384936001600160a01b0391821693859384938493849373f7f4260943db50eee7e917330c35b460ff70ad549363d9b874389360cf93602084019262010000909104909116906370a082319060240160206040518083038186803b158015613ecf57600080fd5b505afa158015613ee3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613f0791906150a0565b8152602001613f1560995490565b81526020018d815260200160d554815260200160d65481526020018c8152506040518363ffffffff1660e01b8152600401613fa292919060006101008201905083825282516020830152602083015160408301526040830151606083015260608301516080830152608083015160a083015260a083015160c083015260c083015160e08301529392505050565b60c06040518083038186803b158015613fba57600080fd5b505af4158015613fce573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613ff291906150dc565b60cf5461ffff16600081815260ca60209081526040918290208790558151858152908101849052908101829052969d50949b50919850965094509250906001600160a01b038716907f0a242f7ecaf711036ca770774ceffae28e60ef042ac113ddd187f2631db0c0069060600160405180910390a260d080546001600160801b0319169055614082816001615551565b60cf805461ffff191661ffff92909216919091179055506140a590503084614692565b80156140b5576140b584826132d4565b505050505b9250929050565b6001600160801b03811115612a0d5760405162461bcd60e51b815260206004820152601060248201526f09eeccae4ccd8deee40ead2dce86264760831b6044820152606401611130565b600054610100900460ff1680614124575060005460ff16155b6141405760405162461bcd60e51b81526004016111309061529b565b600054610100900460ff16158015614162576000805461ffff19166101011790555b60405163c72733f760e01b815273f7f4260943db50eee7e917330c35b460ff70ad549063c72733f7906141a7908c908c908c908b908d908c908c908c9060040161516d565b60006040518083038186803b1580156141bf57600080fd5b505af41580156141d3573d6000803e3d6000fd5b505050506141df614771565b6141e984846147e4565b6141f1614863565b6141fa89612975565b60d480546001600160a01b03808b166001600160a01b03199283161790925560d38054928a169290911691909117905560d585905561424463031ba309612f8888620f4240614578565b60d6558160cc6142548282615769565b505060cc546040516370a0823160e01b81523060048201526000916201000090046001600160a01b0316906370a082319060240160206040518083038186803b1580156142a057600080fd5b505afa1580156142b4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906142d891906150a0565b90506142e3816137d4565b60cf805461ffff196001600160681b03909316600160781b02929092167fffffffff00000000000000000000000000ffffffffffffffffffffffffff0000909216919091176001179055801561433f576000805461ff00191690555b505050505050505050565b835160009061ffff16158015906143655750845161ffff1684115b156143a757600061438486602001516001600160681b031685856148ca565b604087015190915061439f906001600160801b031682613be6565b9150506115fb565b50505050604001516001600160801b031690565b33600090815260cb6020526040812080546001600160801b03620100008204169061ffff168161441d5760405162461bcd60e51b815260206004820152600d60248201526c139bdd081a5b9a5d1a585d1959609a1b6044820152606401611130565b60cf5461ffff1681106144655760405162461bcd60e51b815260206004820152601060248201526f149bdd5b99081b9bdd0818db1bdcd95960821b6044820152606401611130565b33600090815260cb60205260409020805462010000600160901b031916905560d0546144a190600160801b90046001600160801b0316836132c8565b60d080546001600160801b03928316600160801b029216919091179055600081815260ca602052604081205460cc546144e491859160ff61010090910416613772565b604080518281526020810186905291925033917ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b568910160405180910390a261452c308461492d565b6000811161456e5760405162461bcd60e51b815260206004820152600f60248201526e085dda5d1a191c985dd05b5bdd5b9d608a1b6044820152606401611130565b6115fb33826132d4565b60006112aa8284615674565b60006112aa8284615569565b6040516001600160a01b03831660248201526044810182905261297090849063a9059cbb60e01b906064016136fb565b6000614615826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316614a7b9092919063ffffffff16565b80519091501561297057808060200190518101906146339190614fe9565b6129705760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401611130565b6001600160a01b0382166146e85760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401611130565b80609960008282546146fa9190615551565b90915550506001600160a01b03821660009081526097602052604081208054839290614727908490615551565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b600054610100900460ff168061478a575060005460ff16155b6147a65760405162461bcd60e51b81526004016111309061529b565b600054610100900460ff161580156147c8576000805461ffff19166101011790555b6147d0614a8a565b8015612a0d576000805461ff001916905550565b600054610100900460ff16806147fd575060005460ff16155b6148195760405162461bcd60e51b81526004016111309061529b565b600054610100900460ff1615801561483b576000805461ffff19166101011790555b614843614af9565b61484d8383614b63565b8015612970576000805461ff0019169055505050565b600054610100900460ff168061487c575060005460ff16155b6148985760405162461bcd60e51b81526004016111309061529b565b600054610100900460ff161580156148ba576000805461ffff19166101011790555b6148c2614af9565b6147d0614bf8565b6000600183116149145760405162461bcd60e51b8152602060048201526015602482015274496e76616c6964206173736574506572536861726560581b6044820152606401611130565b6115fb83612f8861492685600a6155cc565b8790614578565b6001600160a01b03821661498d5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401611130565b6001600160a01b03821660009081526097602052604090205481811015614a015760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401611130565b6001600160a01b0383166000908152609760205260408120838303905560998054849290614a30908490615693565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b60606115fb8484600085614c58565b600054610100900460ff1680614aa3575060005460ff16155b614abf5760405162461bcd60e51b81526004016111309061529b565b600054610100900460ff16158015614ae1576000805461ffff19166101011790555b600180558015612a0d576000805461ff001916905550565b600054610100900460ff1680614b12575060005460ff16155b614b2e5760405162461bcd60e51b81526004016111309061529b565b600054610100900460ff161580156147d0576000805461ffff19166101011790558015612a0d576000805461ff001916905550565b600054610100900460ff1680614b7c575060005460ff16155b614b985760405162461bcd60e51b81526004016111309061529b565b600054610100900460ff16158015614bba576000805461ffff19166101011790555b8251614bcd90609a906020860190614db9565b508151614be190609b906020850190614db9565b508015612970576000805461ff0019169055505050565b600054610100900460ff1680614c11575060005460ff16155b614c2d5760405162461bcd60e51b81526004016111309061529b565b600054610100900460ff16158015614c4f576000805461ffff19166101011790555b6147d0336139cd565b606082471015614cb95760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401611130565b843b614d075760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401611130565b600080866001600160a01b03168587604051614d239190615151565b60006040518083038185875af1925050503d8060008114614d60576040519150601f19603f3d011682016040523d82523d6000602084013e614d65565b606091505b5091509150614d75828286614d80565b979650505050505050565b60608315614d8f5750816112aa565b825115614d9f5782518084602001fd5b8160405162461bcd60e51b81526004016111309190615267565b828054614dc5906156d6565b90600052602060002090601f016020900481019282614de75760008555614e2d565b82601f10614e0057805160ff1916838001178555614e2d565b82800160010185558215614e2d579182015b82811115614e2d578251825591602001919060010190614e12565b50614e39929150614e3d565b5090565b5b80821115614e395760008155600101614e3e565b8035614e5d8161587a565b919050565b8035614e5d8161589d565b8035614e5d816158b2565b8035614e5d816158c7565b600060208284031215614e94578081fd5b81356112aa8161587a565b60008060408385031215614eb1578081fd5b8235614ebc8161587a565b91506020830135614ecc8161587a565b809150509250929050565b600080600060608486031215614eeb578081fd5b8335614ef68161587a565b92506020840135614f068161587a565b929592945050506040919091013590565b60008060408385031215614f29578182fd5b8235614f348161587a565b946020939093013593505050565b600080600060608486031215614f56578283fd5b8351614f618161587a565b602085015160409095015190969495509392505050565b60008060208385031215614f8a578182fd5b823567ffffffffffffffff80821115614fa1578384fd5b818501915085601f830112614fb4578384fd5b813581811115614fc2578485fd5b86602061012083028501011115614fd7578485fd5b60209290920196919550909350505050565b600060208284031215614ffa578081fd5b81516112aa8161588f565b60008082840360e0811215615018578283fd5b833567ffffffffffffffff81111561502e578384fd5b84016101208187031215615040578384fd5b925060c0601f1982011215615053578182fd5b506020830190509250929050565b600060208284031215615072578081fd5b81356001600160801b03811681146112aa578182fd5b600060208284031215615099578081fd5b5035919050565b6000602082840312156150b1578081fd5b5051919050565b600080604083850312156150ca578182fd5b823591506020830135614ecc8161587a565b60008060008060008060c087890312156150f4578384fd5b865195506020870151945060408701519350606087015192506080870151915060a087015190509295509295509295565b6000815180845261513d8160208601602086016156aa565b601f01601f19169290920160200192915050565b600082516151638184602087016156aa565b9190910192915050565b60006101a060018060a01b03808c168452808b166020850152808a1660408501528860608501528760808501528160a08501526151ac82850188615125565b915083820360c08501526151c08287615125565b9250843591506151cf8261588f565b90151560e08401526020840135906151e6826158c7565b60ff8216610100850152604085013591506152008261587a565b1661012083015261521360608401614e52565b6001600160a01b031661014083015261522e60808401614e6d565b66ffffffffffffff1661016083015261524960a08401614e62565b6001600160681b038116610180840152509998505050505050505050565b6020815260006112aa6020830184615125565b60208082526007908201526610b5b2b2b832b960c91b604082015260600190565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526007908201526608585b5bdd5b9d60ca1b604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b83516001600160a01b031681526020808501516101608301916153a3908401826001600160a01b03169052565b5060408501516153be60408401826001600160a01b03169052565b5060608501516153d960608401826001600160a01b03169052565b506080850151608083015260a08501516153f960a084018261ffff169052565b5060c085015160c083015260e085015161541e60e08401826001600160a01b03169052565b50610100858101516001600160a01b0381168483015250506101208201939093526101400152919050565b838152604060208083018290528282018490526000919060609081850187855b888110156154fd57813583528382013584840152615488868301614e52565b6001600160a01b03168684015284820135858401526080808301359084015260a06154b4818401614e52565b6001600160a01b03169084015260c06154ce838201614e78565b60ff169084015260e0828101359084015261010080830135908401526101209283019290910190600101615469565b50909998505050505050505050565b6000808335601e19843603018112615522578283fd5b83018035915067ffffffffffffffff82111561553c578283fd5b6020019150368190038213156140ba57600080fd5b600082198211156155645761556461572c565b500190565b60008261558457634e487b7160e01b81526012600452602481fd5b500490565b600181815b808511156155c45781600019048211156155aa576155aa61572c565b808516156155b757918102915b93841c939080029061558e565b509250929050565b60006112aa83836000826155e2575060016111ff565b816155ef575060006111ff565b8160018114615605576002811461560f5761562b565b60019150506111ff565b60ff8411156156205761562061572c565b50506001821b6111ff565b5060208310610133831016604e8410600b841016171561564e575081810a6111ff565b6156588383615589565b806000190482111561566c5761566c61572c565b029392505050565b600081600019048311821515161561568e5761568e61572c565b500290565b6000828210156156a5576156a561572c565b500390565b60005b838110156156c55781810151838201526020016156ad565b838111156132c25750506000910152565b600181811c908216806156ea57607f821691505b6020821081141561570b57634e487b7160e01b600052602260045260246000fd5b50919050565b60006000198214156157255761572561572c565b5060010190565b634e487b7160e01b600052601160045260246000fd5b600081356111ff8161587a565b600081356111ff8161589d565b600081356111ff816158b2565b81356157748161588f565b815460ff19811691151560ff1691821783556020840135615794816158c7565b61ff008160081b169050808361ffff1984161717845560408501356157b88161587a565b6001600160b01b0319929092169092179190911760109190911b62010000600160b01b0316178155600181016158106157f360608501615742565b82546001600160a01b0319166001600160a01b0391909116178255565b61584961581f6080850161575c565b82805466ffffffffffffff60a01b191660a09290921b66ffffffffffffff60a01b16919091179055565b50613e3661585960a0840161574f565b600283016001600160681b0382166001600160681b03198254161781555050565b6001600160a01b0381168114612a0d57600080fd5b8015158114612a0d57600080fd5b6001600160681b0381168114612a0d57600080fd5b66ffffffffffffff81168114612a0d57600080fd5b60ff81168114612a0d57600080fdfea2646970667358221220d57d9363a2549d4d8bb447473f2ccf1f500aa870e9b3845b5f87898379dcf8d964736f6c63430008040033","sourceMap":"1132:15154:27:-:0;;;4370:376;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;4572:5;4579;4586:16;4604:11;4617:13;-1:-1:-1;;;;;6337:19:28;;6329:38;;;;-1:-1:-1;;;6329:38:28;;1395:2:30;6329:38:28;;;1377:21:30;1434:1;1414:18;;;1407:29;-1:-1:-1;;;1452:18:30;;;1445:36;1498:18;;6329:38:28;;;;;;;;;-1:-1:-1;;;;;6385:19:28;;6377:38;;;;-1:-1:-1;;;6377:38:28;;2757:2:30;6377:38:28;;;2739:21:30;2796:1;2776:18;;;2769:29;-1:-1:-1;;;2814:18:30;;;2807:36;2860:18;;6377:38:28;2729:155:30;6377:38:28;-1:-1:-1;;;;;6433:27:28;;6425:54;;;;-1:-1:-1;;;6425:54:28;;1729:2:30;6425:54:28;;;1711:21:30;1768:2;1748:18;;;1741:30;-1:-1:-1;;;1787:18:30;;;1780:44;1841:18;;6425:54:28;1701:164:30;6425:54:28;-1:-1:-1;;;;;6497:30:28;;6489:60;;;;-1:-1:-1;;;6489:60:28;;1049:2:30;6489:60:28;;;1031:21:30;1088:2;1068:18;;;1061:30;-1:-1:-1;;;1107:18:30;;;1100:47;1164:18;;6489:60:28;1021:167:30;6489:60:28;-1:-1:-1;;;;;6567:25:28;;6559:50;;;;-1:-1:-1;;;6559:50:28;;2416:2:30;6559:50:28;;;2398:21:30;2455:2;2435:18;;;2428:30;-1:-1:-1;;;2474:18:30;;;2467:42;2526:18;;6559:50:28;2388:162:30;6559:50:28;-1:-1:-1;;;;;;6620:12:28;;;;;;;;6642;;;;;;;6664:35;;;;;;;6709:25;;;;;;6744:29;;;;;;-1:-1:-1;;;;;4650:28:27;::::1;4642:56;;;::::0;-1:-1:-1;;;4642:56:27;;2072:2:30;4642:56:27::1;::::0;::::1;2054:21:30::0;2111:2;2091:18;;;2084:30;-1:-1:-1;;;2130:18:30;;;2123:45;2185:18;;4642:56:27::1;2044:165:30::0;4642:56:27::1;-1:-1:-1::0;;;4708:31:27::1;::::0;-1:-1:-1;;;;;;4708:31:27;::::1;::::0;-1:-1:-1;1132:15154:27;;-1:-1:-1;1132:15154:27;14:177:30;93:13;;-1:-1:-1;;;;;135:31:30;;125:42;;115:2;;181:1;178;171:12;115:2;74:117;;;:::o;196:646::-;311:6;319;327;335;343;351;404:3;392:9;383:7;379:23;375:33;372:2;;;426:6;418;411:22;372:2;454:40;484:9;454:40;:::i;:::-;444:50;;513:49;558:2;547:9;543:18;513:49;:::i;:::-;503:59;;581:49;626:2;615:9;611:18;581:49;:::i;:::-;571:59;;649:49;694:2;683:9;679:18;649:49;:::i;:::-;639:59;;717:50;762:3;751:9;747:19;717:50;:::i;:::-;707:60;;786:50;831:3;820:9;816:19;786:50;:::i;:::-;776:60;;362:480;;;;;;;;:::o;2729:155::-;1132:15154:27;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","linkReferences":{}},"deployedBytecode":{"object":"6080604052600436106104945760003560e01c80638b10cc7c11610260578063ca59409411610144578063e74b981b116100c1578063f756fa2111610085578063f756fa211461105a578063f87c7d931461106f578063f957a06714611084578063f9a0be68146110a4578063fba7dc61146110c5578063fe56e232146110e657600080fd5b8063e74b981b14610fbd578063f001382714610fdd578063f2fde38b14610ffd578063f6326fb31461101d578063f656ba511461102557600080fd5b8063db006a7511610108578063db006a7514610ef8578063db43e86214610f18578063dd62ed3e14610f4c578063e278fe6f14610f92578063e73c63d514610fa757600080fd5b8063ca59409414610e59578063ce7c2ac214610e6e578063cf3afa5114610e8e578063d164cc1514610ec2578063d5f2638214610ee257600080fd5b8063a457c2d7116101dd578063ad5c4648116101a1578063ad5c464814610da4578063ad7a672f14610dd8578063afa6626414610ded578063b4d1d79514610e0d578063b6b55f2514610e24578063b9f8092b14610e4457600080fd5b8063a457c2d714610d0e578063a694fc3a14610d2e578063a6f7f5d614610d4e578063a9059cbb14610d64578063aced166114610d8457600080fd5b80639be43daa116102245780639be43daa14610b9f5780639fcc2d7514610bbf578063a083ff1714610c6b578063a285c9e814610cce578063a2db9d8314610cf057600080fd5b80638b10cc7c14610b185780638da5cb5b14610b36578063947061b514610b5457806395d89b4114610b7557806399530b0614610b8a57600080fd5b806347786d371161038757806369b41170116103045780637a9262a2116102c85780637a9262a214610a075780637e108d5214610a6b57806383536ff314610a8b57806387153eb114610aa15780638778878214610ace57806389a3027114610ae457600080fd5b806369b41170146109725780636f31ab341461098757806370897b231461099c57806370a08231146109bc578063715018a6146109f257600080fd5b80635ea8cd121161034b5780635ea8cd1214610865578063600a2cfb14610885578063650cce8a1461089a5780636719b2ee146108ce578063692308681461095257600080fd5b806347786d37146107d85780634b2431d9146107f8578063503c70aa1461080f57806355489bb214610825578063573f0d6e1461084557600080fd5b8063313ce567116104155780633f23bb73116103d95780633f23bb73146107445780633f90916a14610764578063432833a6146107825780634603c0aa1461079857806346904840146107b857600080fd5b8063313ce5671461068e578063355274ea146106b857806336efd16f146106d657806339509351146106f65780633ec143d31461071657600080fd5b80631a92f6c21161045c5780631a92f6c21461054f57806323b872dd1461059b5780632728f333146105bb5780632775d01c1461064e57806330630da41461066e57600080fd5b8063048bf0851461049957806306fdde03146104bb578063095ea7b3146104e65780630cbf54c81461051657806318160ddd1461053a575b600080fd5b3480156104a557600080fd5b506104b96104b4366004614e83565b611106565b005b3480156104c757600080fd5b506104d061115c565b6040516104dd9190615267565b60405180910390f35b3480156104f257600080fd5b50610506610501366004614f17565b6111ee565b60405190151581526020016104dd565b34801561052257600080fd5b5061052c60fb5481565b6040519081526020016104dd565b34801561054657600080fd5b5060995461052c565b34801561055b57600080fd5b506105837f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016104dd565b3480156105a757600080fd5b506105066105b6366004614ed7565b611205565b3480156105c757600080fd5b5060cf5460d0546106099161ffff8116916001600160681b03620100008304811692600160781b900416906001600160801b0380821691600160801b90041685565b6040805161ffff90961686526001600160681b03948516602087015293909216928401929092526001600160801b03918216606084015216608082015260a0016104dd565b34801561065a57600080fd5b506104b9610669366004615088565b6112b1565b34801561067a57600080fd5b506104b9610689366004614e83565b611454565b34801561069a57600080fd5b5060cc54610100900460ff1660405160ff90911681526020016104dd565b3480156106c457600080fd5b5060ce546001600160681b031661052c565b3480156106e257600080fd5b506104b96106f13660046150b8565b6114ec565b34801561070257600080fd5b50610506610711366004614f17565b611574565b34801561072257600080fd5b5060f9546107319061ffff1681565b60405161ffff90911681526020016104dd565b34801561075057600080fd5b5061052c61075f366004614e83565b6115b0565b34801561077057600080fd5b5060d0546001600160801b031661052c565b34801561078e57600080fd5b5061052c60fc5481565b3480156107a457600080fd5b506104b96107b3366004614e83565b611603565b3480156107c457600080fd5b5060d354610583906001600160a01b031681565b3480156107e457600080fd5b506104b96107f3366004615088565b6116a5565b34801561080457600080fd5b5061052c6101025481565b34801561081b57600080fd5b5061052c60fd5481565b34801561083157600080fd5b506104b9610840366004615061565b611780565b34801561085157600080fd5b506104b9610860366004614e83565b611818565b34801561087157600080fd5b506104b9610880366004615088565b611865565b34801561089157600080fd5b506104b96118d0565b3480156108a657600080fd5b506105837f000000000000000000000000000000000000000000000000000000000000000081565b3480156108da57600080fd5b506109216108e9366004614e83565b60c96020526000908152604090205461ffff8116906201000081046001600160681b031690600160781b90046001600160801b031683565b6040805161ffff90941684526001600160681b0390921660208401526001600160801b0316908201526060016104dd565b34801561095e57600080fd5b506104b961096d366004614f78565b6119e0565b34801561097e57600080fd5b5061052c600081565b34801561099357600080fd5b506104b9611abe565b3480156109a857600080fd5b506104b96109b7366004615088565b611afb565b3480156109c857600080fd5b5061052c6109d7366004614e83565b6001600160a01b031660009081526097602052604090205490565b3480156109fe57600080fd5b506104b9611bc2565b348015610a1357600080fd5b50610a49610a22366004614e83565b60cb6020526000908152604090205461ffff8116906201000090046001600160801b031682565b6040805161ffff90931683526001600160801b039091166020830152016104dd565b348015610a7757600080fd5b506104b9610a86366004615088565b611bf8565b348015610a9757600080fd5b5061052c60f75481565b348015610aad57600080fd5b5061052c610abc366004615088565b60ca6020526000908152604090205481565b348015610ada57600080fd5b5061052c60d55481565b348015610af057600080fd5b506105837f000000000000000000000000000000000000000000000000000000000000000081565b348015610b2457600080fd5b5060d2546001600160a01b0316610583565b348015610b4257600080fd5b506065546001600160a01b0316610583565b348015610b6057600080fd5b5061010354610583906001600160a01b031681565b348015610b8157600080fd5b506104d0611c42565b348015610b9657600080fd5b5061052c611c51565b348015610bab57600080fd5b506104b9610bba366004615088565b611c8b565b348015610bcb57600080fd5b5060cc5460cd5460ce54610c1b9260ff808216936101008304909116926001600160a01b036201000090930483169282169166ffffffffffffff600160a01b90910416906001600160681b031686565b60408051961515875260ff90951660208701526001600160a01b03938416948601949094529116606084015266ffffffffffffff1660808301526001600160681b031660a082015260c0016104dd565b348015610c7757600080fd5b5060d15460d254610ca2916001600160a01b039081169190811690600160a01b900463ffffffff1683565b604080516001600160a01b03948516815293909216602084015263ffffffff16908201526060016104dd565b348015610cda57600080fd5b5060d254600160a01b900463ffffffff1661052c565b348015610cfc57600080fd5b5060d1546001600160a01b0316610583565b348015610d1a57600080fd5b50610506610d29366004614f17565b611d85565b348015610d3a57600080fd5b506104b9610d49366004615088565b611e1e565b348015610d5a57600080fd5b5061052c60d65481565b348015610d7057600080fd5b50610506610d7f366004614f17565b611f1c565b348015610d9057600080fd5b5060d454610583906001600160a01b031681565b348015610db057600080fd5b506105837f000000000000000000000000000000000000000000000000000000000000000081565b348015610de457600080fd5b5061052c611f29565b348015610df957600080fd5b5060f554610583906001600160a01b031681565b348015610e1957600080fd5b5061052c62093a8081565b348015610e3057600080fd5b506104b9610e3f366004615088565b612057565b348015610e5057600080fd5b506104b96120c4565b348015610e6557600080fd5b506104b96122ba565b348015610e7a57600080fd5b5061052c610e89366004614e83565b61235d565b348015610e9a57600080fd5b506105837f000000000000000000000000000000000000000000000000000000000000000081565b348015610ece57600080fd5b506104b9610edd366004614e83565b61237a565b348015610eee57600080fd5b5061052c60f85481565b348015610f0457600080fd5b506104b9610f13366004615088565b612409565b348015610f2457600080fd5b506105837f000000000000000000000000000000000000000000000000000000000000000081565b348015610f5857600080fd5b5061052c610f67366004614e9f565b6001600160a01b03918216600090815260986020908152604080832093909416825291909152205490565b348015610f9e57600080fd5b506104b9612476565b348015610fb357600080fd5b5061052c60fa5481565b348015610fc957600080fd5b506104b9610fd8366004614e83565b61262a565b348015610fe957600080fd5b506104b9610ff8366004615005565b61271d565b34801561100957600080fd5b506104b9611018366004614e83565b612975565b6104b9612a10565b34801561103157600080fd5b50611045611040366004614e83565b612b61565b604080519283526020830191909152016104dd565b34801561106657600080fd5b506104b9612c44565b34801561107b57600080fd5b506104b9612c99565b34801561109057600080fd5b5060f654610583906001600160a01b031681565b3480156110b057600080fd5b5061010054610583906001600160a01b031681565b3480156110d157600080fd5b5061010154610583906001600160a01b031681565b3480156110f257600080fd5b506104b9611101366004615088565b612ef2565b6065546001600160a01b031633146111395760405162461bcd60e51b8152600401611130906152e9565b60405180910390fd5b61010080546001600160a01b0319166001600160a01b0392909216919091179055565b6060609a805461116b906156d6565b80601f0160208091040260200160405190810160405280929190818152602001828054611197906156d6565b80156111e45780601f106111b9576101008083540402835291602001916111e4565b820191906000526020600020905b8154815290600101906020018083116111c757829003601f168201915b5050505050905090565b60006111fb338484612fd3565b5060015b92915050565b60006112128484846130f8565b6001600160a01b0384166000908152609860209081526040808320338452909152902054828110156112975760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b6064820152608401611130565b6112a48533858403612fd3565b60019150505b9392505050565b600260015414156112d45760405162461bcd60e51b81526004016111309061533f565b600260015533600090815260c96020526040902060cf5461ffff168261130c5760405162461bcd60e51b81526004016111309061531e565b815461ffff1681146113505760405162461bcd60e51b815260206004820152600d60248201526c125b9d985b1a59081c9bdd5b99609a1b6044820152606401611130565b81546201000090046001600160681b0316838110156113a15760405162461bcd60e51b815260206004820152600d60248201526c115e18d9595908185b5bdd5b9d609a1b6044820152606401611130565b6113ab81856132c8565b83546001600160681b0391909116620100000262010000600160781b031990911617835560d0546113e5906001600160801b0316856132c8565b60d080546001600160801b0319166001600160801b0392909216919091179055604080518581526020810184905233917fab2daf3c146ca6416cbccd2a86ed2ba995e171ef6319df14a38aef01403a9c96910160405180910390a261144a33856132d4565b5050600180555050565b6065546001600160a01b0316331461147e5760405162461bcd60e51b8152600401611130906152e9565b6001600160a01b0381166114ca5760405162461bcd60e51b815260206004820152601360248201527210b732bba9ba3934b5b2a9b2b632b1ba34b7b760691b6044820152606401611130565b60f680546001600160a01b0319166001600160a01b0392909216919091179055565b6002600154141561150f5760405162461bcd60e51b81526004016111309061533f565b6002600155816115315760405162461bcd60e51b81526004016111309061531e565b6001600160a01b03811661154457600080fd5b61154e8282613435565b60cc5461156c906201000090046001600160a01b03163330856136c7565b505060018055565b3360008181526098602090815260408083206001600160a01b038716845290915281205490916111fb9185906115ab908690615551565b612fd3565b60cc5460009060ff61010090910416816115e66115cc60995490565b6115d4611f29565b60d0546001600160801b031685613732565b90506115fb6115f48561235d565b8284613772565b949350505050565b6065546001600160a01b0316331461162d5760405162461bcd60e51b8152600401611130906152e9565b6001600160a01b0381166116835760405162461bcd60e51b815260206004820152601860248201527f216e65774f7074696f6e735072656d69756d50726963657200000000000000006044820152606401611130565b60f580546001600160a01b0319166001600160a01b0392909216919091179055565b6065546001600160a01b031633146116cf5760405162461bcd60e51b8152600401611130906152e9565b600081116117095760405162461bcd60e51b81526020600482015260076024820152660216e65774361760cc1b6044820152606401611130565b611712816137d4565b60ce54604080516001600160681b039092168252602082018390527f5f86edbb9d92228a9edc3f0ebc0f001bda1ea345ac7335e0eeef3504b31d1a1c910160405180910390a160ce80546cffffffffffffffffffffffffff19166001600160681b0392909216919091179055565b6065546001600160a01b031633146117aa5760405162461bcd60e51b8152600401611130906152e9565b6000816001600160801b0316116117f25760405162461bcd60e51b815260206004820152600c60248201526b21737472696b65507269636560a01b6044820152606401611130565b6001600160801b031660fa5560cf5460f9805461ffff191661ffff909216919091179055565b6065546001600160a01b031633146118425760405162461bcd60e51b8152600401611130906152e9565b61010380546001600160a01b0319166001600160a01b0392909216919091179055565b60d4546001600160a01b0316331461188f5760405162461bcd60e51b81526004016111309061527a565b600081116118cb5760405162461bcd60e51b8152602060048201526009602482015268216d696e507269636560b81b6044820152606401611130565b60f855565b60d4546001600160a01b031633146118fa5760405162461bcd60e51b81526004016111309061527a565b6002600154141561191d5760405162461bcd60e51b81526004016111309061533f565b600260015560d2546040516358ffbb3d60e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081166004830152909116602482015273f7f4260943db50eee7e917330c35b460ff70ad54906358ffbb3d9060440160206040518083038186803b1580156119a157600080fd5b505af41580156119b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119d991906150a0565b5060018055565b60d4546001600160a01b03163314611a0a5760405162461bcd60e51b81526004016111309061527a565b60026001541415611a2d5760405162461bcd60e51b81526004016111309061533f565b600260015560fc54604051633545cbf360e21b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163d5172fcc91611a84919086908690600401615449565b600060405180830381600087803b158015611a9e57600080fd5b505af1158015611ab2573d6000803e3d6000fd5b50506001805550505050565b60026001541415611ae15760405162461bcd60e51b81526004016111309061533f565b6002600181905550611af56000600161381e565b60018055565b6065546001600160a01b03163314611b255760405162461bcd60e51b8152600401611130906152e9565b611b33620f42406064615674565b8110611b815760405162461bcd60e51b815260206004820152601760248201527f496e76616c696420706572666f726d616e6365206665650000000000000000006044820152606401611130565b60d55460408051918252602082018390527f24867dfb6fcb9970a07be21024956524abe7a1837faa903ff0e99aaa40cf893e910160405180910390a160d555565b6065546001600160a01b03163314611bec5760405162461bcd60e51b8152600401611130906152e9565b611bf660006139cd565b565b60026001541415611c1b5760405162461bcd60e51b81526004016111309061533f565b6002600155611c2981613a1f565b61010254611c379082613be6565b610102555060018055565b6060609b805461116b906156d6565b6000611c86611c5f60995490565b611c67611f29565b60d05460cc546001600160801b0390911690610100900460ff16613732565b905090565b60026001541415611cae5760405162461bcd60e51b81526004016111309061533f565b600260015580611ced5760405162461bcd60e51b815260206004820152600a602482015269216e756d526f756e647360b01b6044820152606401611130565b60cf5461ffff1660005b82811015611d7c576000611d0b8284615551565b600081815260ca602052604090205490915015611d585760405162461bcd60e51b815260206004820152600b60248201526a125b9a5d1a585b1a5e995960aa1b6044820152606401611130565b600090815260ca602052604090206001905580611d7481615711565b915050611cf7565b50506001805550565b3360009081526098602090815260408083206001600160a01b038616845290915281205482811015611e075760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401611130565b611e143385858403612fd3565b5060019392505050565b60026001541415611e415760405162461bcd60e51b81526004016111309061533f565b6002600155610100546001600160a01b031680611e5d57600080fd5b60008211611e6a57600080fd5b3360009081526097602052604090205482811015611e9657611e96611e8f84836132c8565b600061381e565b611ea13330856130f8565b611eac308385612fd3565b6040516383df674760e01b815260048101849052336024820152600060448201526001600160a01b038316906383df674790606401600060405180830381600087803b158015611efb57600080fd5b505af1158015611f0f573d6000803e3d6000fd5b5050600180555050505050565b60006111fb3384846130f8565b60d2546000906001600160a01b0316611fbc5760cc546040516370a0823160e01b8152306004820152620100009091046001600160a01b0316906370a082319060240160206040518083038186803b158015611f8457600080fd5b505afa158015611f98573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c8691906150a0565b60cc546040516370a0823160e01b8152306004820152611c86916201000090046001600160a01b0316906370a082319060240160206040518083038186803b15801561200757600080fd5b505afa15801561201b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061203f91906150a0565b60cf546201000090046001600160681b031690613be6565b6002600154141561207a5760405162461bcd60e51b81526004016111309061533f565b60026001558061209c5760405162461bcd60e51b81526004016111309061531e565b6120a68133613435565b60cc546119d9906201000090046001600160a01b03163330846136c7565b60d4546001600160a01b031633146120ee5760405162461bcd60e51b81526004016111309061527a565b600260015414156121115760405162461bcd60e51b81526004016111309061533f565b600260015560d1546001600160a01b03168061215d5760405162461bcd60e51b815260206004820152600b60248201526a10b732bc3a27b83a34b7b760a91b6044820152606401611130565b60d280546001600160a01b03199081166001600160a01b03841690811790925560d18054909116905560cf54604051620100009091046001600160681b03168082529133917f045c558fdce4714c5816d53820d27420f4cd860892df203fe636384d8d19aa019060200160405180910390a3604051632904c23960e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811660048301527f000000000000000000000000000000000000000000000000000000000000000081166024830152831660448201526064810182905273f7f4260943db50eee7e917330c35b460ff70ad5490632904c2399060840160206040518083038186803b15801561227957600080fd5b505af415801561228d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122b191906150a0565b5061156c613bf2565b610103546001600160a01b0316806122d157600080fd5b6122dd6000600161381e565b33600081815260976020526040902054906122f9908383612fd3565b60405163c9c2d4f560e01b8152336004820152602481018290526001600160a01b0383169063c9c2d4f590604401600060405180830381600087803b15801561234157600080fd5b505af1158015612355573d6000803e3d6000fd5b505050505050565b600080600061236b84612b61565b90925090506115fb8282613be6565b6065546001600160a01b031633146123a45760405162461bcd60e51b8152600401611130906152e9565b6001600160a01b0381166123e75760405162461bcd60e51b815260206004820152600a60248201526910b732bba5b2b2b832b960b11b6044820152606401611130565b60d480546001600160a01b0319166001600160a01b0392909216919091179055565b6002600154141561242c5760405162461bcd60e51b81526004016111309061533f565b60026001558061246b5760405162461bcd60e51b815260206004820152600a602482015269216e756d53686172657360b01b6044820152606401611130565b6119d981600061381e565b600260015414156124995760405162461bcd60e51b81526004016111309061533f565b600260015560d2546001600160a01b0316801515806124be575060cf5461ffff166001145b6124f95760405162461bcd60e51b815260206004820152600c60248201526b149bdd5b990818db1bdcd95960a21b6044820152606401611130565b61250281613cc4565b600061010254905060008061251960fd5484613e3a565b60fd81905560d054919350915060009061254390600160801b90046001600160801b031685613be6565b905061254e816140c1565b60d080546001600160801b03808416600160801b029116179055600061010255612577836137d4565b60cf805462010000600160781b031916620100006001600160681b0386160217905560006125a54282613be6565b905063ffffffff8111156125fb5760405162461bcd60e51b815260206004820152601860248201527f4f766572666c6f77206e6578744f7074696f6e526561647900000000000000006044820152606401611130565b60d2805463ffffffff909216600160a01b0263ffffffff60a01b19909216919091179055505060018055505050565b6065546001600160a01b031633146126545760405162461bcd60e51b8152600401611130906152e9565b6001600160a01b03811661269d5760405162461bcd60e51b815260206004820152601060248201526f085b995dd19959549958da5c1a595b9d60821b6044820152606401611130565b60d3546001600160a01b03828116911614156126fb5760405162461bcd60e51b815260206004820152601860248201527f4d757374206265206e657720666565526563697069656e7400000000000000006044820152606401611130565b60d380546001600160a01b0319166001600160a01b0392909216919091179055565b600054610100900460ff1680612736575060005460ff16155b6127525760405162461bcd60e51b81526004016111309061529b565b600054610100900460ff16158015612774576000805461ffff19166101011790555b6128396127846020850185614e83565b6127946040860160208701614e83565b6127a46060870160408801614e83565b606087013560808801356127bb60a08a018a61550c565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506127fd9250505060c08b018b61550c565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508c925061410b915050565b600061284c610100850160e08601614e83565b6001600160a01b0316141561289c5760405162461bcd60e51b815260206004820152601660248201527510afb7b83a34b7b739a83932b6b4bab6a83934b1b2b960511b6044820152606401611130565b60006128b061012085016101008601614e83565b6001600160a01b031614156128fb5760405162461bcd60e51b815260206004820152601160248201527010afb9ba3934b5b2a9b2b632b1ba34b7b760791b6044820152606401611130565b61290c610100840160e08501614e83565b60f580546001600160a01b0319166001600160a01b039290921691909117905561293e61012084016101008501614e83565b60f680546001600160a01b0319166001600160a01b03929092169190911790558015612970576000805461ff00191690555b505050565b6065546001600160a01b0316331461299f5760405162461bcd60e51b8152600401611130906152e9565b6001600160a01b038116612a045760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401611130565b612a0d816139cd565b50565b60026001541415612a335760405162461bcd60e51b81526004016111309061533f565b600260015560cc547f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03908116620100009092041614612aa45760405162461bcd60e51b8152602060048201526005602482015264042ae8aa8960db1b6044820152606401611130565b60003411612add5760405162461bcd60e51b81526020600482015260066024820152652176616c756560d01b6044820152606401611130565b612ae73433613435565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b158015612b4257600080fd5b505af1158015612b56573d6000803e3d6000fd5b505060018055505050565b6001600160a01b038116600090815260c9602090815260408083208151606081018352905461ffff81168083526201000082046001600160681b031694830194909452600160781b90046001600160801b031691810191909152829160011115612be3575050506001600160a01b031660009081526097602052604081205491565b60cf54815161ffff908116600090815260ca602052604081205460cc549193612c1993869391169190610100900460ff1661434a565b9050612c3a856001600160a01b031660009081526097602052604090205490565b9590945092505050565b60026001541415612c675760405162461bcd60e51b81526004016111309061533f565b60026001556000612c766143bb565b60fd54909150612c8690826132c8565b6001600160801b031660fd555060018055565b60d4546001600160a01b03163314612cc35760405162461bcd60e51b81526004016111309061527a565b60026001541415612ce65760405162461bcd60e51b81526004016111309061533f565b600260015560d2546001600160a01b031680158015612d0c575060cf5461ffff16600114155b612d4b5760405162461bcd60e51b815260206004820152601060248201526f149bdd5b99081b9bdd0818db1bdcd95960821b6044820152606401611130565b60408051610120810182526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811682527f00000000000000000000000000000000000000000000000000000000000000008116602083015260cc8054620100009004821683850152848216606084015260006080840181905260f95461ffff1660a085015260fa5460c085015260f654831660e085015260f55490921661010084015292516377e3ce0d60e11b8152919290918291829173f7f4260943db50eee7e917330c35b460ff70ad549163efc79c1a91612e3791889160cf90600401615376565b60606040518083038186803b158015612e4f57600080fd5b505af4158015612e63573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e879190614f42565b604080518381526020810183905293965091945092507fa217999b1c125c2a996f712c5f26a28addad7167bd8a67d5bd5b2a751148abb0910160405180910390a1505060d180546001600160a01b0319166001600160a01b0392909216919091179055505060018055565b6065546001600160a01b03163314612f1c5760405162461bcd60e51b8152600401611130906152e9565b612f2a620f42406064615674565b8110612f715760405162461bcd60e51b8152602060048201526016602482015275496e76616c6964206d616e6167656d656e742066656560501b6044820152606401611130565b6000612f8e63031ba309612f8884620f4240614578565b90614584565b60d65460408051918252602082018590529192507f4e874b007ab14f7e263baefd44951834c8266f4f224d1092e49e9c254354cc54910160405180910390a160d65550565b6001600160a01b0383166130355760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401611130565b6001600160a01b0382166130965760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401611130565b6001600160a01b0383811660008181526098602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b6001600160a01b03831661315c5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401611130565b6001600160a01b0382166131be5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401611130565b6001600160a01b038316600090815260976020526040902054818110156132365760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401611130565b6001600160a01b0380851660009081526097602052604080822085850390559185168152908120805484929061326d908490615551565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516132b991815260200190565b60405180910390a35b50505050565b60006112aa8284615693565b60cc546001600160a01b03620100009091048116907f00000000000000000000000000000000000000000000000000000000000000001681141561342157604051632e1a7d4d60e01b8152600481018390527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690632e1a7d4d90602401600060405180830381600087803b15801561337457600080fd5b505af1158015613388573d6000803e3d6000fd5b505050506000836001600160a01b03168360405160006040518083038185875af1925050503d80600081146133d9576040519150601f19603f3d011682016040523d82523d6000602084013e6133de565b606091505b50509050806132c25760405162461bcd60e51b815260206004820152600f60248201526e151c985b9cd9995c8819985a5b1959608a1b6044820152606401611130565b6129706001600160a01b0382168484614590565b60cf5461ffff1660006134508461344a611f29565b90613be6565b60ce549091506001600160681b031681111561349b5760405162461bcd60e51b815260206004820152600a6024820152690457863656564206361760b41b6044820152606401611130565b60cd54600160a01b900466ffffffffffffff168110156134f45760405162461bcd60e51b8152602060048201526014602482015273496e73756666696369656e742062616c616e636560601b6044820152606401611130565b60408051858152602081018490526001600160a01b038516917f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a15910160405180910390a26001600160a01b038316600090815260c9602090815260408083208151606081018352905461ffff81168083526201000082046001600160681b031683860152600160781b9091046001600160801b031682840152845260ca90925282205460cc549192916135b3918491879190610100900460ff1661434a565b8251909150869061ffff168514156135e45760208301516000906135e0906001600160681b031689613be6565b9150505b6135ed816137d4565b6040805160608101825261ffff80881682526001600160681b0380851660208085019182526001600160801b038089168688019081526001600160a01b038e16600090815260c990935296822095518654935197518216600160781b02600160781b600160f81b03199890951662010000026effffffffffffffffffffffffffffff1990941695169490941791909117949094161790915560d054613693911689613be6565b905061369e816140c1565b60d080546001600160801b0319166001600160801b039290921691909117905550505050505050565b6040516001600160a01b03808516602483015283166044820152606481018290526132c29085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526145c0565b60008061374083600a6155cc565b9050600086116137505780613768565b61376886612f8861376188886132c8565b8490614578565b9695505050505050565b6000600183116137bc5760405162461bcd60e51b8152602060048201526015602482015274496e76616c6964206173736574506572536861726560581b6044820152606401611130565b6115fb6137ca83600a6155cc565b612f888686614578565b6001600160681b03811115612a0d5760405162461bcd60e51b815260206004820152601060248201526f13dd995c999b1bddc81d5a5b9d0c4c0d60821b6044820152606401611130565b33600090815260c9602090815260408083208151606081018352905461ffff8082168084526201000083046001600160681b031684870152600160781b9092046001600160801b03168385015260cf5491865260ca9094529184205460cc54919492909316926138999185918591610100900460ff1661434a565b9050836138a657846138a8565b805b9450846138b6575050505050565b808511156138fa5760405162461bcd60e51b81526020600482015260116024820152704578636565647320617661696c61626c6560781b6044820152606401611130565b825161ffff168211156139275733600090815260c960205260409020805462010000600160781b03191690555b613930856140c1565b61393a81866132c8565b33600081815260c960205260409081902080546001600160801b0394909416600160781b02600160781b600160f81b0319909416939093179092558451915190917fe5b754fb1abb7f01b499791d0b820ae3b6af3424ac1c59768edb53f4ec31a929916139b39189825261ffff16602082015260400190565b60405180910390a26139c63033876130f8565b5050505050565b606580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60008111613a5c5760405162461bcd60e51b815260206004820152600a602482015269216e756d53686172657360b01b6044820152606401611130565b33600090815260c960205260409020546201000090046001600160681b0316151580613aa6575033600090815260c96020526040902054600160781b90046001600160801b031615155b15613ab757613ab76000600161381e565b60cf5433600081815260cb60209081526040918290208054835187815261ffff96871693810184905292959194911685149290917f0c53c82ad07e2d592d88ece3b066777dd60f1118e2a081b380efc4358f0d9e2a910160405180910390a281546201000090046001600160801b031660008215613b4057613b398287613be6565b9050613ba3565b8115613b825760405162461bcd60e51b81526020600482015260116024820152704578697374696e6720776974686472617760781b6044820152606401611130565b5033600090815260cb60205260409020805461ffff191661ffff8616179055845b613bac816140c1565b33600081815260cb60205260409020805462010000600160901b031916620100006001600160801b038516021790556123559030886130f8565b60006112aa8284615551565b60d25460f8546040516301c6654960e21b81526001600160a01b0392831660048201819052602482018390527f0000000000000000000000000000000000000000000000000000000000000000909316604482015260cc606482015273f7f4260943db50eee7e917330c35b460ff70ad549063071995249060840160206040518083038186803b158015613c8557600080fd5b505af4158015613c99573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613cbd91906150a0565b60fc555050565b60cf546201000090046001600160681b03166001600160a01b03821615613d105760cf80546cffffffffffffffffffffffffff60781b1916600160781b6001600160681b038416021790555b60cf805462010000600160781b031916905560d280546001600160a01b03191690556001600160a01b03821615613e3657604051636c6fe87f60e11b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016600482015260009073f7f4260943db50eee7e917330c35b460ff70ad549063d8dfd0fe9060240160206040518083038186803b158015613db757600080fd5b505af4158015613dcb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613def91906150a0565b9050336001600160a01b0316836001600160a01b03167f7e830f7c1771deb1bdb35c4a7e6051bbac32b376f7f4e4976b8618b0b11997f7836040516130eb91815260200190565b5050565b60d3546040805160e08101825260cc54610100810460ff16825291516370a0823160e01b815230600482015260009384936001600160a01b0391821693859384938493849373f7f4260943db50eee7e917330c35b460ff70ad549363d9b874389360cf93602084019262010000909104909116906370a082319060240160206040518083038186803b158015613ecf57600080fd5b505afa158015613ee3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613f0791906150a0565b8152602001613f1560995490565b81526020018d815260200160d554815260200160d65481526020018c8152506040518363ffffffff1660e01b8152600401613fa292919060006101008201905083825282516020830152602083015160408301526040830151606083015260608301516080830152608083015160a083015260a083015160c083015260c083015160e08301529392505050565b60c06040518083038186803b158015613fba57600080fd5b505af4158015613fce573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613ff291906150dc565b60cf5461ffff16600081815260ca60209081526040918290208790558151858152908101849052908101829052969d50949b50919850965094509250906001600160a01b038716907f0a242f7ecaf711036ca770774ceffae28e60ef042ac113ddd187f2631db0c0069060600160405180910390a260d080546001600160801b0319169055614082816001615551565b60cf805461ffff191661ffff92909216919091179055506140a590503084614692565b80156140b5576140b584826132d4565b505050505b9250929050565b6001600160801b03811115612a0d5760405162461bcd60e51b815260206004820152601060248201526f09eeccae4ccd8deee40ead2dce86264760831b6044820152606401611130565b600054610100900460ff1680614124575060005460ff16155b6141405760405162461bcd60e51b81526004016111309061529b565b600054610100900460ff16158015614162576000805461ffff19166101011790555b60405163c72733f760e01b815273f7f4260943db50eee7e917330c35b460ff70ad549063c72733f7906141a7908c908c908c908b908d908c908c908c9060040161516d565b60006040518083038186803b1580156141bf57600080fd5b505af41580156141d3573d6000803e3d6000fd5b505050506141df614771565b6141e984846147e4565b6141f1614863565b6141fa89612975565b60d480546001600160a01b03808b166001600160a01b03199283161790925560d38054928a169290911691909117905560d585905561424463031ba309612f8888620f4240614578565b60d6558160cc6142548282615769565b505060cc546040516370a0823160e01b81523060048201526000916201000090046001600160a01b0316906370a082319060240160206040518083038186803b1580156142a057600080fd5b505afa1580156142b4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906142d891906150a0565b90506142e3816137d4565b60cf805461ffff196001600160681b03909316600160781b02929092167fffffffff00000000000000000000000000ffffffffffffffffffffffffff0000909216919091176001179055801561433f576000805461ff00191690555b505050505050505050565b835160009061ffff16158015906143655750845161ffff1684115b156143a757600061438486602001516001600160681b031685856148ca565b604087015190915061439f906001600160801b031682613be6565b9150506115fb565b50505050604001516001600160801b031690565b33600090815260cb6020526040812080546001600160801b03620100008204169061ffff168161441d5760405162461bcd60e51b815260206004820152600d60248201526c139bdd081a5b9a5d1a585d1959609a1b6044820152606401611130565b60cf5461ffff1681106144655760405162461bcd60e51b815260206004820152601060248201526f149bdd5b99081b9bdd0818db1bdcd95960821b6044820152606401611130565b33600090815260cb60205260409020805462010000600160901b031916905560d0546144a190600160801b90046001600160801b0316836132c8565b60d080546001600160801b03928316600160801b029216919091179055600081815260ca602052604081205460cc546144e491859160ff61010090910416613772565b604080518281526020810186905291925033917ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b568910160405180910390a261452c308461492d565b6000811161456e5760405162461bcd60e51b815260206004820152600f60248201526e085dda5d1a191c985dd05b5bdd5b9d608a1b6044820152606401611130565b6115fb33826132d4565b60006112aa8284615674565b60006112aa8284615569565b6040516001600160a01b03831660248201526044810182905261297090849063a9059cbb60e01b906064016136fb565b6000614615826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316614a7b9092919063ffffffff16565b80519091501561297057808060200190518101906146339190614fe9565b6129705760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401611130565b6001600160a01b0382166146e85760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401611130565b80609960008282546146fa9190615551565b90915550506001600160a01b03821660009081526097602052604081208054839290614727908490615551565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b600054610100900460ff168061478a575060005460ff16155b6147a65760405162461bcd60e51b81526004016111309061529b565b600054610100900460ff161580156147c8576000805461ffff19166101011790555b6147d0614a8a565b8015612a0d576000805461ff001916905550565b600054610100900460ff16806147fd575060005460ff16155b6148195760405162461bcd60e51b81526004016111309061529b565b600054610100900460ff1615801561483b576000805461ffff19166101011790555b614843614af9565b61484d8383614b63565b8015612970576000805461ff0019169055505050565b600054610100900460ff168061487c575060005460ff16155b6148985760405162461bcd60e51b81526004016111309061529b565b600054610100900460ff161580156148ba576000805461ffff19166101011790555b6148c2614af9565b6147d0614bf8565b6000600183116149145760405162461bcd60e51b8152602060048201526015602482015274496e76616c6964206173736574506572536861726560581b6044820152606401611130565b6115fb83612f8861492685600a6155cc565b8790614578565b6001600160a01b03821661498d5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401611130565b6001600160a01b03821660009081526097602052604090205481811015614a015760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401611130565b6001600160a01b0383166000908152609760205260408120838303905560998054849290614a30908490615693565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b60606115fb8484600085614c58565b600054610100900460ff1680614aa3575060005460ff16155b614abf5760405162461bcd60e51b81526004016111309061529b565b600054610100900460ff16158015614ae1576000805461ffff19166101011790555b600180558015612a0d576000805461ff001916905550565b600054610100900460ff1680614b12575060005460ff16155b614b2e5760405162461bcd60e51b81526004016111309061529b565b600054610100900460ff161580156147d0576000805461ffff19166101011790558015612a0d576000805461ff001916905550565b600054610100900460ff1680614b7c575060005460ff16155b614b985760405162461bcd60e51b81526004016111309061529b565b600054610100900460ff16158015614bba576000805461ffff19166101011790555b8251614bcd90609a906020860190614db9565b508151614be190609b906020850190614db9565b508015612970576000805461ff0019169055505050565b600054610100900460ff1680614c11575060005460ff16155b614c2d5760405162461bcd60e51b81526004016111309061529b565b600054610100900460ff16158015614c4f576000805461ffff19166101011790555b6147d0336139cd565b606082471015614cb95760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401611130565b843b614d075760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401611130565b600080866001600160a01b03168587604051614d239190615151565b60006040518083038185875af1925050503d8060008114614d60576040519150601f19603f3d011682016040523d82523d6000602084013e614d65565b606091505b5091509150614d75828286614d80565b979650505050505050565b60608315614d8f5750816112aa565b825115614d9f5782518084602001fd5b8160405162461bcd60e51b81526004016111309190615267565b828054614dc5906156d6565b90600052602060002090601f016020900481019282614de75760008555614e2d565b82601f10614e0057805160ff1916838001178555614e2d565b82800160010185558215614e2d579182015b82811115614e2d578251825591602001919060010190614e12565b50614e39929150614e3d565b5090565b5b80821115614e395760008155600101614e3e565b8035614e5d8161587a565b919050565b8035614e5d8161589d565b8035614e5d816158b2565b8035614e5d816158c7565b600060208284031215614e94578081fd5b81356112aa8161587a565b60008060408385031215614eb1578081fd5b8235614ebc8161587a565b91506020830135614ecc8161587a565b809150509250929050565b600080600060608486031215614eeb578081fd5b8335614ef68161587a565b92506020840135614f068161587a565b929592945050506040919091013590565b60008060408385031215614f29578182fd5b8235614f348161587a565b946020939093013593505050565b600080600060608486031215614f56578283fd5b8351614f618161587a565b602085015160409095015190969495509392505050565b60008060208385031215614f8a578182fd5b823567ffffffffffffffff80821115614fa1578384fd5b818501915085601f830112614fb4578384fd5b813581811115614fc2578485fd5b86602061012083028501011115614fd7578485fd5b60209290920196919550909350505050565b600060208284031215614ffa578081fd5b81516112aa8161588f565b60008082840360e0811215615018578283fd5b833567ffffffffffffffff81111561502e578384fd5b84016101208187031215615040578384fd5b925060c0601f1982011215615053578182fd5b506020830190509250929050565b600060208284031215615072578081fd5b81356001600160801b03811681146112aa578182fd5b600060208284031215615099578081fd5b5035919050565b6000602082840312156150b1578081fd5b5051919050565b600080604083850312156150ca578182fd5b823591506020830135614ecc8161587a565b60008060008060008060c087890312156150f4578384fd5b865195506020870151945060408701519350606087015192506080870151915060a087015190509295509295509295565b6000815180845261513d8160208601602086016156aa565b601f01601f19169290920160200192915050565b600082516151638184602087016156aa565b9190910192915050565b60006101a060018060a01b03808c168452808b166020850152808a1660408501528860608501528760808501528160a08501526151ac82850188615125565b915083820360c08501526151c08287615125565b9250843591506151cf8261588f565b90151560e08401526020840135906151e6826158c7565b60ff8216610100850152604085013591506152008261587a565b1661012083015261521360608401614e52565b6001600160a01b031661014083015261522e60808401614e6d565b66ffffffffffffff1661016083015261524960a08401614e62565b6001600160681b038116610180840152509998505050505050505050565b6020815260006112aa6020830184615125565b60208082526007908201526610b5b2b2b832b960c91b604082015260600190565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526007908201526608585b5bdd5b9d60ca1b604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b83516001600160a01b031681526020808501516101608301916153a3908401826001600160a01b03169052565b5060408501516153be60408401826001600160a01b03169052565b5060608501516153d960608401826001600160a01b03169052565b506080850151608083015260a08501516153f960a084018261ffff169052565b5060c085015160c083015260e085015161541e60e08401826001600160a01b03169052565b50610100858101516001600160a01b0381168483015250506101208201939093526101400152919050565b838152604060208083018290528282018490526000919060609081850187855b888110156154fd57813583528382013584840152615488868301614e52565b6001600160a01b03168684015284820135858401526080808301359084015260a06154b4818401614e52565b6001600160a01b03169084015260c06154ce838201614e78565b60ff169084015260e0828101359084015261010080830135908401526101209283019290910190600101615469565b50909998505050505050505050565b6000808335601e19843603018112615522578283fd5b83018035915067ffffffffffffffff82111561553c578283fd5b6020019150368190038213156140ba57600080fd5b600082198211156155645761556461572c565b500190565b60008261558457634e487b7160e01b81526012600452602481fd5b500490565b600181815b808511156155c45781600019048211156155aa576155aa61572c565b808516156155b757918102915b93841c939080029061558e565b509250929050565b60006112aa83836000826155e2575060016111ff565b816155ef575060006111ff565b8160018114615605576002811461560f5761562b565b60019150506111ff565b60ff8411156156205761562061572c565b50506001821b6111ff565b5060208310610133831016604e8410600b841016171561564e575081810a6111ff565b6156588383615589565b806000190482111561566c5761566c61572c565b029392505050565b600081600019048311821515161561568e5761568e61572c565b500290565b6000828210156156a5576156a561572c565b500390565b60005b838110156156c55781810151838201526020016156ad565b838111156132c25750506000910152565b600181811c908216806156ea57607f821691505b6020821081141561570b57634e487b7160e01b600052602260045260246000fd5b50919050565b60006000198214156157255761572561572c565b5060010190565b634e487b7160e01b600052601160045260246000fd5b600081356111ff8161587a565b600081356111ff8161589d565b600081356111ff816158b2565b81356157748161588f565b815460ff19811691151560ff1691821783556020840135615794816158c7565b61ff008160081b169050808361ffff1984161717845560408501356157b88161587a565b6001600160b01b0319929092169092179190911760109190911b62010000600160b01b0316178155600181016158106157f360608501615742565b82546001600160a01b0319166001600160a01b0391909116178255565b61584961581f6080850161575c565b82805466ffffffffffffff60a01b191660a09290921b66ffffffffffffff60a01b16919091179055565b50613e3661585960a0840161574f565b600283016001600160681b0382166001600160681b03198254161781555050565b6001600160a01b0381168114612a0d57600080fd5b8015158114612a0d57600080fd5b6001600160681b0381168114612a0d57600080fd5b66ffffffffffffff81168114612a0d57600080fd5b60ff81168114612a0d57600080fdfea2646970667358221220d57d9363a2549d4d8bb447473f2ccf1f500aa870e9b3845b5f87898379dcf8d964736f6c63430008040033","sourceMap":"1132:15154:27:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7388:124;;;;;;;;;;-1:-1:-1;7388:124:27;;;;;:::i;:::-;;:::i;:::-;;2447:98:3;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;4544:166;;;;;;;;;;-1:-1:-1;4544:166:3;;;;;:::i;:::-;;:::i;:::-;;;11417:14:30;;11410:22;11392:41;;11380:2;11365:18;4544:166:3;11347:92:30;684:30:26;;;;;;;;;;;;;;;;;;;35093:25:30;;;35081:2;35066:18;684:30:26;35048:76:30;3535:106:3;;;;;;;;;;-1:-1:-1;3622:12:3;;3535:106;;4251:41:28;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;6961:32:30;;;6943:51;;6931:2;6916:18;4251:41:28;6898:102:30;5177:478:3;;;;;;;;;;-1:-1:-1;5177:478:3;;;;;:::i;:::-;;:::i;1944:34:28:-;;;;;;;;;;-1:-1:-1;1944:34:28;;;;;;;;;;-1:-1:-1;;;;;1944:34:28;;;;;;-1:-1:-1;;;1944:34:28;;;;-1:-1:-1;;;;;1944:34:28;;;;-1:-1:-1;;;1944:34:28;;;;;;;;;33903:6:30;33891:19;;;33873:38;;-1:-1:-1;;;;;33994:15:30;;;33989:2;33974:18;;33967:43;34046:15;;;;34026:18;;;34019:43;;;;-1:-1:-1;;;;;34151:15:30;;;34146:2;34131:18;;34124:43;34204:15;34198:3;34183:19;;34176:44;33860:3;33845:19;1944:34:28;33827:399:30;8365:815:27;;;;;;;;;;-1:-1:-1;8365:815:27;;;;;:::i;:::-;;:::i;6100:202::-;;;;;;;;;;-1:-1:-1;6100:202:27;;;;;:::i;:::-;;:::i;26262:101:28:-;;;;;;;;;;-1:-1:-1;26336:11:28;:20;;;;;;26262:101;;38101:4:30;38089:17;;;38071:36;;38059:2;38044:18;26262:101:28;38026:87:30;26369:86:28;;;;;;;;;;-1:-1:-1;26433:15:28;;-1:-1:-1;;;;;26433:15:28;26369:86;;11851:423;;;;;;;;;;-1:-1:-1;11851:423:28;;;;;:::i;:::-;;:::i;6050:212:3:-;;;;;;;;;;-1:-1:-1;6050:212:3;;;;;:::i;:::-;;:::i;532:37:26:-;;;;;;;;;;-1:-1:-1;532:37:26;;;;;;;;;;;33597:6:30;33585:19;;;33567:38;;33555:2;33540:18;532:37:26;33522:89:30;23219:472:28;;;;;;;;;;-1:-1:-1;23219:472:28;;;;;:::i;:::-;;:::i;26799:103::-;;;;;;;;;;-1:-1:-1;26872:23:28;;-1:-1:-1;;;;;26872:23:28;26799:103;;756:30:26;;;;;;;;;;;;;;;;6474:286:27;;;;;;;;;;-1:-1:-1;6474:286:27;;;;;:::i;:::-;;:::i;2174:27:28:-;;;;;;;;;;-1:-1:-1;2174:27:28;;;;-1:-1:-1;;;;;2174:27:28;;;10325:228;;;;;;;;;;-1:-1:-1;10325:228:28;;;;;:::i;:::-;;:::i;1529:42:26:-;;;;;;;;;;;;;;;;899:39;;;;;;;;;;;;;;;;6999:218:27;;;;;;;;;;-1:-1:-1;6999:218:27;;;;;:::i;:::-;;:::i;7955:112::-;;;;;;;;;;-1:-1:-1;7955:112:27;;;;;:::i;:::-;;:::i;7641:151::-;;;;;;;;;;-1:-1:-1;7641:151:27;;;;;:::i;:::-;;:::i;15563:195::-;;;;;;;;;;;;;:::i;4523:36:28:-;;;;;;;;;;;;;;;1316:63;;;;;;;;;;-1:-1:-1;1316:63:28;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;1316:63:28;;-1:-1:-1;;;1316:63:28;;-1:-1:-1;;;;;1316:63:28;;;;;;;34461:6:30;34449:19;;;34431:38;;-1:-1:-1;;;;;34505:41:30;;;34500:2;34485:18;;34478:69;-1:-1:-1;;;;;34583:47:30;34563:18;;;34556:75;34419:2;34404:18;1316:63:28;34386:251:30;15308:181:27;;;;;;;;;;-1:-1:-1;15308:181:27;;;;;:::i;:::-;;:::i;3635:33:28:-;;;;;;;;;;;;3667:1;3635:33;;17311:76;;;;;;;;;;;;;:::i;9892:319::-;;;;;;;;;;-1:-1:-1;9892:319:28;;;;;:::i;:::-;;:::i;3699:125:3:-;;;;;;;;;;-1:-1:-1;3699:125:3;;;;;:::i;:::-;-1:-1:-1;;;;;3799:18:3;3773:7;3799:18;;;:9;:18;;;;;;;3699:125;1871:92:0;;;;;;;;;;;;;:::i;1715:55:28:-;;;;;;;;;;-1:-1:-1;1715:55:28;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;1715:55:28;;;;;;;34844:6:30;34832:19;;;34814:38;;-1:-1:-1;;;;;34888:47:30;;;34883:2;34868:18;;34861:75;34787:18;1715:55:28;34769:173:30;9347:216:27;;;;;;;;;;-1:-1:-1;9347:216:27;;;;;:::i;:::-;;:::i;360:30:26:-;;;;;;;;;;;;;;;;1607:53:28;;;;;;;;;;-1:-1:-1;1607:53:28;;;;;:::i;:::-;;;;;;;;;;;;;;2503:29;;;;;;;;;;;;;;;;3508;;;;;;;;;;;;;;;26581:106;;;;;;;;;;-1:-1:-1;26655:25:28;;-1:-1:-1;;;;;26655:25:28;26581:106;;1239:85:0;;;;;;;;;;-1:-1:-1;1311:6:0;;-1:-1:-1;;;;;1311:6:0;1239:85;;1669:26:26;;;;;;;;;;-1:-1:-1;1669:26:26;;;;-1:-1:-1;;;;;1669:26:26;;;2658:102:3;;;;;;;;;;;;;:::i;25145:272:28:-;;;;;;;;;;;;;:::i;19594:429::-;;;;;;;;;;-1:-1:-1;19594:429:28;;;;;:::i;:::-;;:::i;1831:36::-;;;;;;;;;;-1:-1:-1;1831:36:28;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;1831:36:28;;;;;;;;;;;-1:-1:-1;;;1831:36:28;;;;;-1:-1:-1;;;;;1831:36:28;;;;;;;11744:14:30;;11737:22;11719:41;;11808:4;11796:17;;;11791:2;11776:18;;11769:45;-1:-1:-1;;;;;11888:15:30;;;11868:18;;;11861:43;;;;11940:15;;11935:2;11920:18;;11913:43;12005:16;11993:29;11987:3;11972:19;;11965:58;-1:-1:-1;;;;;12060:41:30;11841:3;12039:19;;12032:70;11706:3;11691:19;1831:36:28;11673:435:30;2061:36:28;;;;;;;;;;-1:-1:-1;2061:36:28;;;;;;-1:-1:-1;;;;;2061:36:28;;;;;;;;-1:-1:-1;;;2061:36:28;;;;;;;;;;-1:-1:-1;;;;;10348:15:30;;;10330:34;;10400:15;;;;10395:2;10380:18;;10373:43;10464:10;10452:23;10432:18;;;10425:51;10280:2;10265:18;2061:36:28;10247:235:30;26461:114:28;;;;;;;;;;-1:-1:-1;26539:29:28;;-1:-1:-1;;;26539:29:28;;;;26461:114;;26693:100;;;;;;;;;;-1:-1:-1;26764:11:28;:22;-1:-1:-1;;;;;26764:22:28;26693:100;;6749:405:3;;;;;;;;;;-1:-1:-1;6749:405:3;;;;;:::i;:::-;;:::i;10039:605:27:-;;;;;;;;;;-1:-1:-1;10039:605:27;;;;;:::i;:::-;;:::i;2649:28:28:-;;;;;;;;;;;;;;;;4027:172:3;;;;;;;;;;-1:-1:-1;4027:172:3;;;;;:::i;:::-;;:::i;2359:21:28:-;;;;;;;;;;-1:-1:-1;2359:21:28;;;;-1:-1:-1;;;;;2359:21:28;;;3408:29;;;;;;;;;;;;;;;25637:561;;;;;;;;;;;;;:::i;151:35:26:-;;;;;;;;;;-1:-1:-1;151:35:26;;;;-1:-1:-1;;;;;151:35:26;;;3731:39:28;;;;;;;;;;;;3764:6;3731:39;;11198:343;;;;;;;;;;-1:-1:-1;11198:343:28;;;;;:::i;:::-;;:::i;14330:575:27:-;;;;;;;;;;;;;:::i;15825:459::-;;;;;;;;;;;;;:::i;23903:196:28:-;;;;;;;;;;-1:-1:-1;23903:196:28;;;;;:::i;:::-;;:::i;4727:38::-;;;;;;;;;;;;;;;8516:151;;;;;;;;;;-1:-1:-1;8516:151:28;;;;;:::i;:::-;;:::i;426:35:26:-;;;;;;;;;;;;;;;;17057:145:28;;;;;;;;;;-1:-1:-1;17057:145:28;;;;;:::i;:::-;;:::i;1564:39:27:-;;;;;;;;;;;;;;;4257:149:3;;;;;;;;;;-1:-1:-1;4257:149:3;;;;;:::i;:::-;-1:-1:-1;;;;;4372:18:3;;;4346:7;4372:18;;;:11;:18;;;;;;;;:27;;;;;;;;;;;;;4257:149;11086:1266:27;;;;;;;;;;;;;:::i;618:36:26:-;;;;;;;;;;;;;;;;8801:262:28;;;;;;;;;;-1:-1:-1;8801:262:28;;;;;:::i;:::-;;:::i;4986:828:27:-;;;;;;;;;;-1:-1:-1;4986:828:27;;;;;:::i;:::-;;:::i;2112:189:0:-;;;;;;;;;;-1:-1:-1;2112:189:0;;;;;:::i;:::-;;:::i;10817:249:28:-;;;:::i;24428:624::-;;;;;;;;;;-1:-1:-1;24428:624:28;;;;;:::i;:::-;;:::i;:::-;;;;37526:25:30;;;37582:2;37567:18;;37560:34;;;;37499:18;24428:624:28;37481:119:30;9685:232:27;;;;;;;;;;;;;:::i;13060:1159::-;;;;;;;;;;;;;:::i;243:30:26:-;;;;;;;;;;-1:-1:-1;243:30:26;;;;-1:-1:-1;;;;;243:30:26;;;1246:29;;;;;;;;;;-1:-1:-1;1246:29:26;;;;-1:-1:-1;;;;;1246:29:26;;;1387:35;;;;;;;;;;-1:-1:-1;1387:35:26;;;;-1:-1:-1;;;;;1387:35:26;;;9226:498:28;;;;;;;;;;-1:-1:-1;9226:498:28;;;;;:::i;:::-;;:::i;7388:124:27:-;1311:6:0;;-1:-1:-1;;;;;1311:6:0;902:10:6;1451:23:0;1443:68;;;;-1:-1:-1;;;1443:68:0;;;;;;;:::i;:::-;;;;;;;;;7471:14:27::1;:34:::0;;-1:-1:-1;;;;;;7471:34:27::1;-1:-1:-1::0;;;;;7471:34:27;;;::::1;::::0;;;::::1;::::0;;7388:124::o;2447:98:3:-;2501:13;2533:5;2526:12;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2447:98;:::o;4544:166::-;4627:4;4643:39;902:10:6;4666:7:3;4675:6;4643:8;:39::i;:::-;-1:-1:-1;4699:4:3;4544:166;;;;;:::o;5177:478::-;5313:4;5329:36;5339:6;5347:9;5358:6;5329:9;:36::i;:::-;-1:-1:-1;;;;;5403:19:3;;5376:24;5403:19;;;:11;:19;;;;;;;;902:10:6;5403:33:3;;;;;;;;5454:26;;;;5446:79;;;;-1:-1:-1;;;5446:79:3;;22244:2:30;5446:79:3;;;22226:21:30;22283:2;22263:18;;;22256:30;22322:34;22302:18;;;22295:62;-1:-1:-1;;;22373:18:30;;;22366:38;22421:19;;5446:79:3;22216:230:30;5446:79:3;5559:57;5568:6;902:10:6;5609:6:3;5590:16;:25;5559:8;:57::i;:::-;5644:4;5637:11;;;5177:478;;;;;;:::o;8365:815:27:-;1751:1:2;2493:7;;:19;;2485:63;;;;-1:-1:-1;;;2485:63:2;;;;;;;:::i;:::-;1751:1;2623:7;:18;8514:10:27::1;8440:43;8498:27:::0;;;:15:::1;:27;::::0;;;;8559:10:::1;:16:::0;::::1;;8593:10:::0;8585:30:::1;;;;-1:-1:-1::0;;;8585:30:27::1;;;;;;;:::i;:::-;8633:20:::0;;::::1;;:36:::0;::::1;8625:62;;;::::0;-1:-1:-1;;;8625:62:27;;18334:2:30;8625:62:27::1;::::0;::::1;18316:21:30::0;18373:2;18353:18;;;18346:30;-1:-1:-1;;;18392:18:30;;;18385:43;18445:18;;8625:62:27::1;18306:163:30::0;8625:62:27::1;8722:21:::0;;;;::::1;-1:-1:-1::0;;;;;8722:21:27::1;8761:23:::0;;::::1;;8753:49;;;::::0;-1:-1:-1;;;8753:49:27;;26244:2:30;8753:49:27::1;::::0;::::1;26226:21:30::0;26283:2;26263:18;;;26256:30;-1:-1:-1;;;26302:18:30;;;26295:43;26355:18;;8753:49:27::1;26216:163:30::0;8753:49:27::1;8927:25;:13:::0;8945:6;8927:17:::1;:25::i;:::-;8895:58:::0;;-1:-1:-1;;;;;8895:58:27;;;::::1;::::0;::::1;-1:-1:-1::0;;;;;;8895:58:27;;::::1;;::::0;;9018:23;;9010:44:::1;::::0;-1:-1:-1;;;;;9018:23:27::1;9047:6:::0;9010:36:::1;:44::i;:::-;8963:23:::0;:101;;-1:-1:-1;;;;;;8963:101:27::1;-1:-1:-1::0;;;;;8963:101:27;;;::::1;::::0;;;::::1;::::0;;9080:49:::1;::::0;;37526:25:30;;;37582:2;37567:18;;37560:34;;;9096:10:27::1;::::0;9080:49:::1;::::0;37499:18:30;9080:49:27::1;;;;;;;9140:33;9154:10;9166:6;9140:13;:33::i;:::-;-1:-1:-1::0;;1708:1:2;2796:22;;-1:-1:-1;;8365:815:27:o;6100:202::-;1311:6:0;;-1:-1:-1;;;;;1311:6:0;902:10:6;1451:23:0;1443:68;;;;-1:-1:-1;;;1443:68:0;;;;;;;:::i;:::-;-1:-1:-1;;;;;6193:32:27;::::1;6185:64;;;::::0;-1:-1:-1;;;6185:64:27;;17240:2:30;6185:64:27::1;::::0;::::1;17222:21:30::0;17279:2;17259:18;;;17252:30;-1:-1:-1;;;17298:18:30;;;17291:49;17357:18;;6185:64:27::1;17212:169:30::0;6185:64:27::1;6259:15;:36:::0;;-1:-1:-1;;;;;;6259:36:27::1;-1:-1:-1::0;;;;;6259:36:27;;;::::1;::::0;;;::::1;::::0;;6100:202::o;11851:423:28:-;1751:1:2;2493:7;;:19;;2485:63;;;;-1:-1:-1;;;2485:63:2;;;;;;;:::i;:::-;1751:1;2623:7;:18;11965:10:28;11957:30:::1;;;;-1:-1:-1::0;;;11957:30:28::1;;;;;;;:::i;:::-;-1:-1:-1::0;;;;;12005:22:28;::::1;11997:31;;;::::0;::::1;;12039:29;12051:6;12059:8;12039:11;:29::i;:::-;12151:11;:17:::0;12144:123:::1;::::0;12151:17;;::::1;-1:-1:-1::0;;;;;12151:17:28::1;12200:10;12232:4;12251:6:::0;12144:42:::1;:123::i;:::-;-1:-1:-1::0;;1708:1:2;2796:22;;11851:423:28:o;6050:212:3:-;902:10:6;6138:4:3;6186:25;;;:11;:25;;;;;;;;-1:-1:-1;;;;;6186:34:3;;;;;;;;;;6138:4;;6154:80;;6177:7;;6186:47;;6223:10;;6186:47;:::i;:::-;6154:8;:80::i;23219:472:28:-;23355:11;:20;23312:7;;23355:20;;;;;;23312:7;23421:168;23462:13;3622:12:3;;;3535:106;23462:13:28;23493:14;:12;:14::i;:::-;23525:23;;-1:-1:-1;;;;;23525:23:28;23566:9;23421:23;:168::i;:::-;23385:204;;23618:66;23642:15;23649:7;23642:6;:15::i;:::-;23659:13;23674:9;23618:23;:66::i;:::-;23599:85;23219:472;-1:-1:-1;;;;23219:472:28:o;6474:286:27:-;1311:6:0;;-1:-1:-1;;;;;1311:6:0;902:10:6;1451:23:0;1443:68;;;;-1:-1:-1;;;1443:68:0;;;;;;;:::i;:::-;-1:-1:-1;;;;;6610:37:27;::::1;6589:108;;;::::0;-1:-1:-1;;;6589:108:27;;30930:2:30;6589:108:27::1;::::0;::::1;30912:21:30::0;30969:2;30949:18;;;30942:30;31008:26;30988:18;;;30981:54;31052:18;;6589:108:27::1;30902:174:30::0;6589:108:27::1;6707:20;:46:::0;;-1:-1:-1;;;;;;6707:46:27::1;-1:-1:-1::0;;;;;6707:46:27;;;::::1;::::0;;;::::1;::::0;;6474:286::o;10325:228:28:-;1311:6:0;;-1:-1:-1;;;;;1311:6:0;902:10:6;1451:23:0;1443:68;;;;-1:-1:-1;;;1443:68:0;;;;;;;:::i;:::-;10403:1:28::1;10394:6;:10;10386:30;;;::::0;-1:-1:-1;;;10386:30:28;;23356:2:30;10386:30:28::1;::::0;::::1;23338:21:30::0;23395:1;23375:18;;;23368:29;-1:-1:-1;;;23413:18:30;;;23406:37;23460:18;;10386:30:28::1;23328:156:30::0;10386:30:28::1;10426:31;10450:6;10426:23;:31::i;:::-;10479:15:::0;;10472:31:::1;::::0;;-1:-1:-1;;;;;10479:15:28;;::::1;33309:60:30::0;;33400:2;33385:18;;33378:34;;;10472:31:28::1;::::0;33282:18:30;10472:31:28::1;;;;;;;10513:15:::0;:33;;-1:-1:-1;;10513:33:28::1;-1:-1:-1::0;;;;;10513:33:28;;;::::1;::::0;;;::::1;::::0;;10325:228::o;6999:218:27:-;1311:6:0;;-1:-1:-1;;;;;1311:6:0;902:10:6;1451:23:0;1443:68;;;;-1:-1:-1;;;1443:68:0;;;;;;;:::i;:::-;7095:1:27::1;7081:11;-1:-1:-1::0;;;;;7081:15:27::1;;7073:40;;;::::0;-1:-1:-1;;;7073:40:27;;25497:2:30;7073:40:27::1;::::0;::::1;25479:21:30::0;25536:2;25516:18;;;25509:30;-1:-1:-1;;;25555:18:30;;;25548:42;25607:18;;7073:40:27::1;25469:162:30::0;7073:40:27::1;-1:-1:-1::0;;;;;7123:35:27::1;:21;:35:::0;7194:10:::1;:16:::0;7168:23:::1;:42:::0;;-1:-1:-1;;7168:42:27::1;7194:16;::::0;;::::1;7168:42:::0;;;::::1;::::0;;6999:218::o;7955:112::-;1311:6:0;;-1:-1:-1;;;;;1311:6:0;902:10:6;1451:23:0;1443:68;;;;-1:-1:-1;;;1443:68:0;;;;;;;:::i;:::-;8032:11:27::1;:28:::0;;-1:-1:-1;;;;;;8032:28:27::1;-1:-1:-1::0;;;;;8032:28:27;;;::::1;::::0;;;::::1;::::0;;7955:112::o;7641:151::-;8241:6:28;;-1:-1:-1;;;;;8241:6:28;8227:10;:20;8219:40;;;;-1:-1:-1;;;8219:40:28;;;;;;;:::i;:::-;7729:1:27::1;7718:8;:12;7710:34;;;::::0;-1:-1:-1;;;7710:34:27;;16903:2:30;7710:34:27::1;::::0;::::1;16885:21:30::0;16942:1;16922:18;;;16915:29;-1:-1:-1;;;16960:18:30;;;16953:39;17009:18;;7710:34:27::1;16875:158:30::0;7710:34:27::1;7754:20;:31:::0;7641:151::o;15563:195::-;8241:6:28;;-1:-1:-1;;;;;8241:6:28;8227:10;:20;8219:40;;;;-1:-1:-1;;;8219:40:28;;;;;;;:::i;:::-;1751:1:2::1;2493:7;;:19;;2485:63;;;;-1:-1:-1::0;;;2485:63:2::1;;;;;;;:::i;:::-;1751:1;2623:7;:18:::0;15716:25:27;;15638:113:::2;::::0;-1:-1:-1;;;15638:113:27;;-1:-1:-1;;;;;15686:16:27::2;7451:15:30::0;;15638:113:27::2;::::0;::::2;7433:34:30::0;15716:25:27;;::::2;7483:18:30::0;;;7476:43;15638:22:27::2;::::0;:34:::2;::::0;7368:18:30;;15638:113:27::2;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1::0;1708:1:2::1;2796:22:::0;;15563:195:27:o;15308:181::-;8241:6:28;;-1:-1:-1;;;;;8241:6:28;8227:10;:20;8219:40;;;;-1:-1:-1;;;8219:40:28;;;;;;;:::i;:::-;1751:1:2::1;2493:7;;:19;;2485:63;;;;-1:-1:-1::0;;;2485:63:2::1;;;;;;;:::i;:::-;1751:1;2623:7;:18:::0;15460:15:27::2;::::0;15427:55:::2;::::0;-1:-1:-1;;;15427:55:27;;-1:-1:-1;;;;;15433:13:27::2;15427:32;::::0;::::2;::::0;:55:::2;::::0;15460:15;15477:4;;;;15427:55:::2;;;:::i;:::-;;;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;-1:-1:-1::0;;1708:1:2::1;2796:22:::0;;-1:-1:-1;;;;15308:181:27:o;17311:76:28:-;1751:1:2;2493:7;;:19;;2485:63;;;;-1:-1:-1;;;2485:63:2;;;;;;;:::i;:::-;1751:1;2623:7;:18;;;;17364:16:28::1;17372:1;17375:4;17364:7;:16::i;:::-;1708:1:2::0;2796:22;;17311:76:28:o;9892:319::-;1311:6:0;;-1:-1:-1;;;;;1311:6:0;902:10:6;1451:23:0;1443:68;;;;-1:-1:-1;;;1443:68:0;;;;;;;:::i;:::-;10016:26:28::1;324:5:24;10016:3:28;:26;:::i;:::-;9996:17;:46;9975:116;;;::::0;-1:-1:-1;;;9975:116:28;;23691:2:30;9975:116:28::1;::::0;::::1;23673:21:30::0;23730:2;23710:18;;;23703:30;23769:25;23749:18;;;23742:53;23812:18;;9975:116:28::1;23663:173:30::0;9975:116:28::1;10125:14;::::0;10107:52:::1;::::0;;37526:25:30;;;37582:2;37567:18;;37560:34;;;10107:52:28::1;::::0;37499:18:30;10107:52:28::1;;;;;;;10170:14;:34:::0;9892:319::o;1871:92:0:-;1311:6;;-1:-1:-1;;;;;1311:6:0;902:10:6;1451:23:0;1443:68;;;;-1:-1:-1;;;1443:68:0;;;;;;;:::i;:::-;1935:21:::1;1953:1;1935:9;:21::i;:::-;1871:92::o:0;9347:216:27:-;1751:1:2;2493:7;;:19;;2485:63;;;;-1:-1:-1;;;2485:63:2;;;;;;;:::i;:::-;1751:1;2623:7;:18;9424:28:27::1;9442:9:::0;9424:17:::1;:28::i;:::-;9492:27;::::0;:64:::1;::::0;9537:9;9492:31:::1;:64::i;:::-;9462:27;:94:::0;-1:-1:-1;1708:1:2;2796:22;;9347:216:27:o;2658:102:3:-;2714:13;2746:7;2739:14;;;;;:::i;25145:272:28:-;25193:7;25231:179;25272:13;3622:12:3;;;3535:106;25272:13:28;25303:14;:12;:14::i;:::-;25335:23;;25376:11;:20;-1:-1:-1;;;;;25335:23:28;;;;;25376:20;;;;25231:23;:179::i;:::-;25212:198;;25145:272;:::o;19594:429::-;1751:1:2;2493:7;;:19;;2485:63;;;;-1:-1:-1;;;2485:63:2;;;;;;;:::i;:::-;1751:1;2623:7;:18;19673:13:28;19665:36:::1;;;::::0;-1:-1:-1;;;19665:36:28;;16564:2:30;19665:36:28::1;::::0;::::1;16546:21:30::0;16603:2;16583:18;;;16576:30;-1:-1:-1;;;16622:18:30;;;16615:40;16672:18;;19665:36:28::1;16536:160:30::0;19665:36:28::1;19729:10;:16:::0;::::1;;19712:14;19755:262;19779:9;19775:1;:13;19755:262;;;19809:13;19825:10;19834:1:::0;19825:6;:10:::1;:::i;:::-;19857:25;::::0;;;:18:::1;:25;::::0;;;;;19809:26;;-1:-1:-1;19857:30:28;19849:54:::1;;;::::0;-1:-1:-1;;;19849:54:28;;27695:2:30;19849:54:28::1;::::0;::::1;27677:21:30::0;27734:2;27714:18;;;27707:30;-1:-1:-1;;;27753:18:30;;;27746:41;27804:18;;19849:54:28::1;27667:161:30::0;19849:54:28::1;19952:25;::::0;;;:18:::1;:25;::::0;;;;269:1:22::1;19952:54:28::0;;19790:3;::::1;::::0;::::1;:::i;:::-;;;;19755:262;;;-1:-1:-1::0;;1708:1:2;2796:22;;-1:-1:-1;19594:429:28:o;6749:405:3:-;902:10:6;6842:4:3;6885:25;;;:11;:25;;;;;;;;-1:-1:-1;;;;;6885:34:3;;;;;;;;;;6937:35;;;;6929:85;;;;-1:-1:-1;;;6929:85:3;;29824:2:30;6929:85:3;;;29806:21:30;29863:2;29843:18;;;29836:30;29902:34;29882:18;;;29875:62;-1:-1:-1;;;29953:18:30;;;29946:35;29998:19;;6929:85:3;29796:227:30;6929:85:3;7048:67;902:10:6;7071:7:3;7099:15;7080:16;:34;7048:8;:67::i;:::-;-1:-1:-1;7143:4:3;;6749:405;-1:-1:-1;;;6749:405:3:o;10039:605:27:-;1751:1:2;2493:7;;:19;;2485:63;;;;-1:-1:-1;;;2485:63:2;;;;;;;:::i;:::-;1751:1;2623:7;:18;10131:14:27::1;::::0;-1:-1:-1;;;;;10131:14:27::1;10163:29:::0;10155:38:::1;;;::::0;::::1;;10273:1;10261:9;:13;10253:22;;;::::0;::::1;;10319:10;10285:21;3799:18:3::0;;;:9;:18;;;;;;10344:25:27;;::::1;10340:100;;;10385:44;10393:28;:9:::0;10407:13;10393::::1;:28::i;:::-;10423:5;10385:7;:44::i;:::-;10449:47;10459:10;10479:4;10486:9;10449;:47::i;:::-;10506:51;10523:4;10530:15;10547:9;10506:8;:51::i;:::-;10567:70;::::0;-1:-1:-1;;;10567:70:27;;::::1;::::0;::::1;35325:25:30::0;;;10619:10:27::1;35366:18:30::0;;;35359:60;10631:5:27::1;35435:18:30::0;;;35428:50;-1:-1:-1;;;;;10567:40:27;::::1;::::0;::::1;::::0;35298:18:30;;10567:70:27::1;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;-1:-1:-1::0;;1708:1:2;2796:22;;-1:-1:-1;;;;;10039:605:27:o;4027:172:3:-;4113:4;4129:42;902:10:6;4153:9:3;4164:6;4129:9;:42::i;25637:561:28:-;25938:25;;25682:7;;-1:-1:-1;;;;;25938:25:28;:253;;26148:11;:17;26141:50;;-1:-1:-1;;;26141:50:28;;26185:4;26141:50;;;6943:51:30;26148:17:28;;;;-1:-1:-1;;;;;26148:17:28;;26141:35;;6916:18:30;;26141:50:28;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;25938:253::-;26061:11;:17;26054:50;;-1:-1:-1;;;26054:50:28;;26098:4;26054:50;;;6943:51:30;25996:126:28;;26061:17;;;-1:-1:-1;;;;;26061:17:28;;26054:35;;6916:18:30;;26054:50:28;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;26004:10;:23;;;;-1:-1:-1;;;;;26004:23:28;;25996:36;:126::i;11198:343::-;1751:1:2;2493:7;;:19;;2485:63;;;;-1:-1:-1;;;2485:63:2;;;;;;;:::i;:::-;1751:1;2623:7;:18;11271:10:28;11263:30:::1;;;;-1:-1:-1::0;;;11263:30:28::1;;;;;;;:::i;:::-;11304:31;11316:6;11324:10;11304:11;:31::i;:::-;11418:11;:17:::0;11411:123:::1;::::0;11418:17;;::::1;-1:-1:-1::0;;;;;11418:17:28::1;11467:10;11499:4;11518:6:::0;11411:42:::1;:123::i;14330:575:27:-:0;8241:6:28;;-1:-1:-1;;;;;8241:6:28;8227:10;:20;8219:40;;;;-1:-1:-1;;;8219:40:28;;;;;;;:::i;:::-;1751:1:2::1;2493:7;;:19;;2485:63;;;;-1:-1:-1::0;;;2485:63:2::1;;;;;;;:::i;:::-;1751:1;2623:7;:18:::0;14421:11:27::2;:22:::0;-1:-1:-1;;;;;14421:22:27::2;14461:23:::0;14453:47:::2;;;::::0;-1:-1:-1;;;14453:47:27;;30230:2:30;14453:47:27::2;::::0;::::2;30212:21:30::0;30269:2;30249:18;;;30242:30;-1:-1:-1;;;30288:18:30;;;30281:41;30339:18;;14453:47:27::2;30202:161:30::0;14453:47:27::2;14511:25:::0;:37;;-1:-1:-1;;;;;;14511:37:27;;::::2;-1:-1:-1::0;;;;;14511:37:27;::::2;::::0;;::::2;::::0;;;:11:::2;14558:35:::0;;;;::::2;::::0;;14627:10:::2;:23:::0;14666:47:::2;::::0;14627:23;;;::::2;-1:-1:-1::0;;;;;14627:23:27::2;35093:25:30::0;;;14627:23:27;14702:10:::2;::::0;14666:47:::2;::::0;35081:2:30;35066:18;14666:47:27::2;;;;;;;14724:149;::::0;-1:-1:-1;;;14724:149:27;;-1:-1:-1;;;;;14772:16:27::2;7825:15:30::0;;14724:149:27::2;::::0;::::2;7807:34:30::0;14802:11:27::2;7877:15:30::0;;7857:18;;;7850:43;7929:15;;7909:18;;;7902:43;7961:18;;;7954:34;;;14724:22:27::2;::::0;:34:::2;::::0;7741:19:30;;14724:149:27::2;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;14884:14;:12;:14::i;15825:459::-:0;15899:11;;-1:-1:-1;;;;;15899:11:27;15928:33;15920:42;;;;;;16022:16;16030:1;16033:4;16022:7;:16::i;:::-;16082:10;16048:21;3799:18:3;;;:9;:18;;;;;;;16103:56:27;;16124:19;3799:18:3;16103:8:27;:56::i;:::-;16169:108;;-1:-1:-1;;;16169:108:27;;16230:10;16169:108;;;10661:51:30;10728:18;;;10721:34;;;-1:-1:-1;;;;;16169:47:27;;;;;10634:18:30;;16169:108:27;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;15825:459;;:::o;23903:196:28:-;23957:7;23977:21;24000:19;24023:22;24037:7;24023:13;:22::i;:::-;23976:69;;-1:-1:-1;23976:69:28;-1:-1:-1;24062:30:28;23976:69;;24062:17;:30::i;8516:151::-;1311:6:0;;-1:-1:-1;;;;;1311:6:0;902:10:6;1451:23:0;1443:68;;;;-1:-1:-1;;;1443:68:0;;;;;;;:::i;:::-;-1:-1:-1;;;;;8594:23:28;::::1;8586:46;;;::::0;-1:-1:-1;;;8586:46:28;;28781:2:30;8586:46:28::1;::::0;::::1;28763:21:30::0;28820:2;28800:18;;;28793:30;-1:-1:-1;;;28839:18:30;;;28832:40;28889:18;;8586:46:28::1;28753:160:30::0;8586:46:28::1;8642:6;:18:::0;;-1:-1:-1;;;;;;8642:18:28::1;-1:-1:-1::0;;;;;8642:18:28;;;::::1;::::0;;;::::1;::::0;;8516:151::o;17057:145::-;1751:1:2;2493:7;;:19;;2485:63;;;;-1:-1:-1;;;2485:63:2;;;;;;;:::i;:::-;1751:1;2623:7;:18;17132:13:28;17124:36:::1;;;::::0;-1:-1:-1;;;17124:36:28;;17995:2:30;17124:36:28::1;::::0;::::1;17977:21:30::0;18034:2;18014:18;;;18007:30;-1:-1:-1;;;18053:18:30;;;18046:40;18103:18;;17124:36:28::1;17967:160:30::0;17124:36:28::1;17170:25;17178:9;17189:5;17170:7;:25::i;11086:1266:27:-:0;1751:1:2;2493:7;;:19;;2485:63;;;;-1:-1:-1;;;2485:63:2;;;;;;;:::i;:::-;1751:1;2623:7;:18;11160:25:27;;-1:-1:-1;;;;;11160:25:27::1;11216:23:::0;;::::1;::::0;:48:::1;;-1:-1:-1::0;11243:10:27::1;:16:::0;::::1;;::::0;:21:::1;11216:48;11195:107;;;::::0;-1:-1:-1;;;11195:107:27;;21558:2:30;11195:107:27::1;::::0;::::1;21540:21:30::0;21597:2;21577:18;;;21570:30;-1:-1:-1;;;21616:18:30;;;21609:42;21668:18;;11195:107:27::1;21530:162:30::0;11195:107:27::1;11312:22;11324:9;11312:11;:22::i;:::-;11345:32;11380:27;;11345:62;;11418:21;11441:28:::0;11485:118:::1;11522:24;;11565;11485:11;:118::i;:::-;11614:24;:47:::0;;;11726:31;;11417:186;;-1:-1:-1;11614:47:27;-1:-1:-1;11672:31:27::1;::::0;11718:100:::1;::::0;-1:-1:-1;;;11726:31:27;::::1;-1:-1:-1::0;;;;;11726:31:27::1;11780:24:::0;11718:44:::1;:100::i;:::-;11672:146;;11828:48;11852:23;11828;:48::i;:::-;11886:31:::0;:66;;-1:-1:-1;;;;;11886:66:27;;::::1;-1:-1:-1::0;;;11886:66:27::1;::::0;::::1;;::::0;;-1:-1:-1;11963:27:27::1;:31:::0;12005:38:::1;12029:13:::0;12005:23:::1;:38::i;:::-;12053:10;:48:::0;;-1:-1:-1;;;;;;12053:48:27::1;::::0;-1:-1:-1;;;;;12053:48:27;::::1;;;::::0;;-1:-1:-1;12138:26:27::1;:15;-1:-1:-1::0;12138:19:27::1;:26::i;:::-;12112:52:::0;-1:-1:-1;12214:16:27::1;12195:35:::0;::::1;;12174:106;;;::::0;-1:-1:-1;;;12174:106:27;;15865:2:30;12174:106:27::1;::::0;::::1;15847:21:30::0;15904:2;15884:18;;;15877:30;15943:26;15923:18;;;15916:54;15987:18;;12174:106:27::1;15837:174:30::0;12174:106:27::1;12290:29:::0;:55;;::::1;::::0;;::::1;-1:-1:-1::0;;;12290:55:27::1;-1:-1:-1::0;;;;12290:55:27;;::::1;::::0;;;::::1;::::0;;-1:-1:-1;;12290:29:27::1;2796:22:2::0;;-1:-1:-1;;;11086:1266:27:o;8801:262:28:-;1311:6:0;;-1:-1:-1;;;;;1311:6:0;902:10:6;1451:23:0;1443:68;;;;-1:-1:-1;;;1443:68:0;;;;;;;:::i;:::-;-1:-1:-1;;;;;8888:29:28;::::1;8880:58;;;::::0;-1:-1:-1;;;8880:58:28;;20130:2:30;8880:58:28::1;::::0;::::1;20112:21:30::0;20169:2;20149:18;;;20142:30;-1:-1:-1;;;20188:18:30;;;20181:46;20244:18;;8880:58:28::1;20102:166:30::0;8880:58:28::1;8975:12;::::0;-1:-1:-1;;;;;8956:31:28;;::::1;8975:12:::0;::::1;8956:31;;8948:68;;;::::0;-1:-1:-1;;;8948:68:28;;19025:2:30;8948:68:28::1;::::0;::::1;19007:21:30::0;19064:2;19044:18;;;19037:30;19103:26;19083:18;;;19076:54;19147:18;;8948:68:28::1;18997:174:30::0;8948:68:28::1;9026:12;:30:::0;;-1:-1:-1;;;;;;9026:30:28::1;-1:-1:-1::0;;;;;9026:30:28;;;::::1;::::0;;;::::1;::::0;;8801:262::o;4986:828:27:-;1409:13:1;;;;;;;;:30;;-1:-1:-1;1427:12:1;;;;1426:13;1409:30;1401:89;;;;-1:-1:-1;;;1401:89:1;;;;;;;:::i;:::-;1501:19;1524:13;;;;;;1523:14;1547:98;;;;1581:13;:20;;-1:-1:-1;;1615:19:1;;;;;1547:98;5133:309:27::1;5161:18;;::::0;::::1;:11:::0;:18:::1;:::i;:::-;5193:19;::::0;;;::::1;::::0;::::1;;:::i;:::-;5226:25;::::0;;;::::1;::::0;::::1;;:::i;:::-;5265:26;::::0;::::1;;5305:27;::::0;::::1;;5346:22;;::::0;::::1;5265:11:::0;5346:22:::1;:::i;:::-;5133:309;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;::::0;;;;-1:-1:-1;5382:24:27::1;::::0;-1:-1:-1;;;5382:24:27::1;::::0;::::1;::::0;::::1;:::i;:::-;5133:309;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;::::0;;;;-1:-1:-1;5420:12:27;;-1:-1:-1;5133:14:27::1;::::0;-1:-1:-1;;5133:309:27:i:1;:::-;5518:1;5473:33;::::0;;;::::1;::::0;::::1;;:::i;:::-;-1:-1:-1::0;;;;;5473:47:27::1;;;5452:116;;;::::0;-1:-1:-1;;;5452:116:27;;25146:2:30;5452:116:27::1;::::0;::::1;25128:21:30::0;25185:2;25165:18;;;25158:30;-1:-1:-1;;;25204:18:30;;;25197:52;25266:18;;5452:116:27::1;25118:172:30::0;5452:116:27::1;5639:1;5599:28;::::0;;;::::1;::::0;::::1;;:::i;:::-;-1:-1:-1::0;;;;;5599:42:27::1;;;5578:106;;;::::0;-1:-1:-1;;;5578:106:27;;12944:2:30;5578:106:27::1;::::0;::::1;12926:21:30::0;12983:2;12963:18;;;12956:30;-1:-1:-1;;;13002:18:30;;;12995:47;13059:18;;5578:106:27::1;12916:167:30::0;5578:106:27::1;5718:33;::::0;;;::::1;::::0;::::1;;:::i;:::-;5695:20;:56:::0;;-1:-1:-1;;;;;;5695:56:27::1;-1:-1:-1::0;;;;;5695:56:27;;;::::1;::::0;;;::::1;::::0;;5779:28:::1;::::0;;;5695:56:::1;5779:28:::0;::::1;;:::i;:::-;5761:15;:46:::0;;-1:-1:-1;;;;;;5761:46:27::1;-1:-1:-1::0;;;;;5761:46:27;;;::::1;::::0;;;::::1;::::0;;1667:66:1;;;;1717:5;1701:21;;-1:-1:-1;;1701:21:1;;;1667:66;4986:828:27;;;:::o;2112:189:0:-;1311:6;;-1:-1:-1;;;;;1311:6:0;902:10:6;1451:23:0;1443:68;;;;-1:-1:-1;;;1443:68:0;;;;;;;:::i;:::-;-1:-1:-1;;;;;2200:22:0;::::1;2192:73;;;::::0;-1:-1:-1;;;2192:73:0;;14366:2:30;2192:73:0::1;::::0;::::1;14348:21:30::0;14405:2;14385:18;;;14378:30;14444:34;14424:18;;;14417:62;-1:-1:-1;;;14495:18:30;;;14488:36;14541:19;;2192:73:0::1;14338:228:30::0;2192:73:0::1;2275:19;2285:8;2275:9;:19::i;:::-;2112:189:::0;:::o;10817:249:28:-;1751:1:2;2493:7;;:19;;2485:63;;;;-1:-1:-1;;;2485:63:2;;;;;;;:::i;:::-;1751:1;2623:7;:18;10887:11:28::1;:17:::0;10908:4:::1;-1:-1:-1::0;;;;;10887:25:28;;::::1;:17:::0;;;::::1;;:25;10879:43;;;::::0;-1:-1:-1;;;10879:43:28;;20810:2:30;10879:43:28::1;::::0;::::1;20792:21:30::0;20849:1;20829:18;;;20822:29;-1:-1:-1;;;20867:18:30;;;20860:35;20912:18;;10879:43:28::1;20782:154:30::0;10879:43:28::1;10952:1;10940:9;:13;10932:32;;;::::0;-1:-1:-1;;;10932:32:28;;14032:2:30;10932:32:28::1;::::0;::::1;14014:21:30::0;14071:1;14051:18;;;14044:29;-1:-1:-1;;;14089:18:30;;;14082:36;14135:18;;10932:32:28::1;14004:155:30::0;10932:32:28::1;10975:34;10987:9;10998:10;10975:11;:34::i;:::-;11026:4;-1:-1:-1::0;;;;;11020:19:28::1;;11047:9;11020:39;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;-1:-1:-1::0;;1708:1:2;2796:22;;-1:-1:-1;;;10817:249:28:o;24428:624::-;-1:-1:-1;;;;;24616:24:28;;24513:21;24616:24;;;:15;:24;;;;;;;;24571:69;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;24571:69:28;;;;;;;;-1:-1:-1;;;24571:69:28;;-1:-1:-1;;;;;24571:69:28;;;;;;;;24513:21;;24571:69;-1:-1:-1;24651:110:28;;;-1:-1:-1;;;;;;;;3799:18:3;3773:7;3799:18;;;:9;:18;;;;;;;24428:624:28:o;24651:110::-;24863:10;:16;24916:20;;24863:16;24897:40;;;24771:24;24897:40;;;:18;:40;;;;;;24955:11;:20;24771:24;;24810:179;;24916:20;;24863:16;;;24897:40;24863:16;24955:20;;;;24810:35;:179::i;:::-;24771:218;;25008:18;25018:7;-1:-1:-1;;;;;3799:18:3;3773:7;3799:18;;;:9;:18;;;;;;;3699:125;25008:18:28;25000:45;25028:16;;-1:-1:-1;24428:624:28;-1:-1:-1;;;24428:624:28:o;9685:232:27:-;1751:1:2;2493:7;;:19;;2485:63;;;;-1:-1:-1;;;2485:63:2;;;;;;;:::i;:::-;1751:1;2623:7;:18;9745:22:27::1;9770:19;:17;:19::i;:::-;9855:24;::::0;9745:44;;-1:-1:-1;9847:53:27::1;::::0;9745:44;9847:37:::1;:53::i;:::-;-1:-1:-1::0;;;;;9799:111:27::1;:24;:111:::0;-1:-1:-1;1708:1:2;2796:22;;9685:232:27:o;13060:1159::-;8241:6:28;;-1:-1:-1;;;;;8241:6:28;8227:10;:20;8219:40;;;;-1:-1:-1;;;8219:40:28;;;;;;;:::i;:::-;1751:1:2::1;2493:7;;:19;;2485:63;;;;-1:-1:-1::0;;;2485:63:2::1;;;;;;;:::i;:::-;1751:1;2623:7;:18:::0;13155:25:27;;-1:-1:-1;;;;;13155:25:27::2;13211:27:::0;;:52;::::2;;;-1:-1:-1::0;13242:10:27::2;:16:::0;::::2;;::::0;:21:::2;;13211:52;13190:115;;;::::0;-1:-1:-1;;;13190:115:27;;19378:2:30;13190:115:27::2;::::0;::::2;19360:21:30::0;19417:2;19397:18;;;19390:30;-1:-1:-1;;;19436:18:30;;;19429:46;19492:18;;13190:115:27::2;19350:166:30::0;13190:115:27::2;13386:493;::::0;;::::2;::::0;::::2;::::0;;-1:-1:-1;;;;;13456:14:27::2;13386:493:::0;::::2;::::0;;13494:4:::2;13386:493:::0;::::2;;::::0;::::2;::::0;13533:11:::2;:17:::0;;;;::::2;::::0;::::2;13386:493:::0;;;;;;::::2;::::0;;;;13316:55:::2;13386:493:::0;;;;;;13669:23:::2;::::0;::::2;;13386:493:::0;;;;13733:21:::2;::::0;13386:493;;;;13789:15:::2;::::0;;::::2;13386:493:::0;;;;13844:20:::2;::::0;;;::::2;13533:17;13386:493:::0;;;13964:140;;-1:-1:-1;;;13964:140:27;;13386:493;;13316:55;;;;;;13964:22:::2;::::0;:39:::2;::::0;:140:::2;::::0;13386:493;;14080:10:::2;::::0;13964:140:::2;;;:::i;:::-;;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;14120:43;::::0;;37526:25:30;;;37582:2;37567:18;;37560:34;;;13890:214:27;;-1:-1:-1;13890:214:27;;-1:-1:-1;13890:214:27;-1:-1:-1;14120:43:27::2;::::0;37499:18:30;14120:43:27::2;;;;;;;-1:-1:-1::0;;14174:11:27::2;:38:::0;;-1:-1:-1;;;;;;14174:38:27::2;-1:-1:-1::0;;;;;14174:38:27;;;::::2;::::0;;;::::2;::::0;;-1:-1:-1;;;2796:22:2;;13060:1159:27:o;9226:498:28:-;1311:6:0;;-1:-1:-1;;;;;1311:6:0;902:10:6;1451:23:0;1443:68;;;;-1:-1:-1;;;1443:68:0;;;;;;;:::i;:::-;9347:26:28::1;324:5:24;9347:3:28;:26;:::i;:::-;9328:16;:45;9307:114;;;::::0;-1:-1:-1;;;9307:114:28;;24795:2:30;9307:114:28::1;::::0;::::1;24777:21:30::0;24834:2;24814:18;;;24807:30;-1:-1:-1;;;24853:18:30;;;24846:52;24915:18;;9307:114:28::1;24767:172:30::0;9307:114:28::1;9508:24;9547:62;3990:8;9547:42;:16:::0;324:5:24::1;9547:20:28;:42::i;:::-;:46:::0;::::1;:62::i;:::-;9642:13;::::0;9625:49:::1;::::0;;37526:25:30;;;37582:2;37567:18;;37560:34;;;9508:101:28;;-1:-1:-1;9625:49:28::1;::::0;37499:18:30;9625:49:28::1;;;;;;;9685:13;:32:::0;-1:-1:-1;9226:498:28:o;10325:370:3:-;-1:-1:-1;;;;;10456:19:3;;10448:68;;;;-1:-1:-1;;;10448:68:3;;26932:2:30;10448:68:3;;;26914:21:30;26971:2;26951:18;;;26944:30;27010:34;26990:18;;;26983:62;-1:-1:-1;;;27061:18:30;;;27054:34;27105:19;;10448:68:3;26904:226:30;10448:68:3;-1:-1:-1;;;;;10534:21:3;;10526:68;;;;-1:-1:-1;;;10526:68:3;;14773:2:30;10526:68:3;;;14755:21:30;14812:2;14792:18;;;14785:30;14851:34;14831:18;;;14824:62;-1:-1:-1;;;14902:18:30;;;14895:32;14944:19;;10526:68:3;14745:224:30;10526:68:3;-1:-1:-1;;;;;10605:18:3;;;;;;;:11;:18;;;;;;;;:27;;;;;;;;;;;;;:36;;;10656:32;;35093:25:30;;;10656:32:3;;35066:18:30;10656:32:3;;;;;;;;10325:370;;;:::o;7628:713::-;-1:-1:-1;;;;;7763:20:3;;7755:70;;;;-1:-1:-1;;;7755:70:3;;25838:2:30;7755:70:3;;;25820:21:30;25877:2;25857:18;;;25850:30;25916:34;25896:18;;;25889:62;-1:-1:-1;;;25967:18:30;;;25960:35;26012:19;;7755:70:3;25810:227:30;7755:70:3;-1:-1:-1;;;;;7843:23:3;;7835:71;;;;-1:-1:-1;;;7835:71:3;;12540:2:30;7835:71:3;;;12522:21:30;12579:2;12559:18;;;12552:30;12618:34;12598:18;;;12591:62;-1:-1:-1;;;12669:18:30;;;12662:33;12712:19;;7835:71:3;12512:225:30;7835:71:3;-1:-1:-1;;;;;7999:17:3;;7975:21;7999:17;;;:9;:17;;;;;;8034:23;;;;8026:74;;;;-1:-1:-1;;;8026:74:3;;17588:2:30;8026:74:3;;;17570:21:30;17627:2;17607:18;;;17600:30;17666:34;17646:18;;;17639:62;-1:-1:-1;;;17717:18:30;;;17710:36;17763:19;;8026:74:3;17560:228:30;8026:74:3;-1:-1:-1;;;;;8134:17:3;;;;;;;:9;:17;;;;;;8154:22;;;8134:42;;8196:20;;;;;;;;:30;;8170:6;;8134:17;8196:30;;8170:6;;8196:30;:::i;:::-;;;;;;;;8259:9;-1:-1:-1;;;;;8242:35:3;8251:6;-1:-1:-1;;;;;8242:35:3;;8270:6;8242:35;;;;35093:25:30;;35081:2;35066:18;;35048:76;8242:35:3;;;;;;;;8288:46;7628:713;;;;:::o;3039:96:10:-;3097:7;3123:5;3127:1;3123;:5;:::i;22477:388:28:-;22570:11;:17;-1:-1:-1;;;;;22570:17:28;;;;;;;22610:4;22601:13;;;22597:207;;;22630:28;;-1:-1:-1;;;22630:28:28;;;;;35093:25:30;;;22636:4:28;-1:-1:-1;;;;;22630:20:28;;;;35066:18:30;;22630:28:28;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;22673:12;22691:9;-1:-1:-1;;;;;22691:14:28;22713:6;22691:33;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;22672:52;;;22746:7;22738:35;;;;-1:-1:-1;;;22738:35:28;;15176:2:30;22738:35:28;;;15158:21:30;15215:2;15195:18;;;15188:30;-1:-1:-1;;;15234:18:30;;;15227:45;15289:18;;22738:35:28;15148:165:30;22597:207:28;22813:45;-1:-1:-1;;;;;22813:26:28;;22840:9;22851:6;22813:26;:45::i;12468:1628::-;12564:10;:16;;;12541:20;12625:26;12644:6;12625:14;:12;:14::i;:::-;:18;;:26::i;:::-;12698:15;;12590:61;;-1:-1:-1;;;;;;12698:15:28;12670:43;;;12662:66;;;;-1:-1:-1;;;12662:66:28;;13693:2:30;12662:66:28;;;13675:21:30;13732:2;13712:18;;;13705:30;-1:-1:-1;;;13751:18:30;;;13744:40;13801:18;;12662:66:28;13665:160:30;12662:66:28;12787:25;;-1:-1:-1;;;12787:25:28;;;;12759:53;;;12738:120;;;;-1:-1:-1;;;12738:120:28;;18676:2:30;12738:120:28;;;18658:21:30;18715:2;18695:18;;;18688:30;-1:-1:-1;;;18734:18:30;;;18727:50;18794:18;;12738:120:28;18648:170:30;12738:120:28;12874:39;;;37526:25:30;;;37582:2;37567:18;;37560:34;;;-1:-1:-1;;;;;12874:39:28;;;;;37499:18:30;12874:39:28;;;;;;;-1:-1:-1;;;;;12969:25:28;;12924:42;12969:25;;;:15;:25;;;;;;;;12924:70;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;12924:70:28;;;;;-1:-1:-1;;;12924:70:28;;;-1:-1:-1;;;;;12924:70:28;;;;;13229:40;;:18;:40;;;;;;13287:11;:20;12924:70;;:42;13146:175;;12924:70;;13199:12;;13229:40;12924:70;13287:20;;;;13146:35;:175::i;:::-;13488:20;;13107:214;;-1:-1:-1;13356:6:28;;13472:36;;;;13468:168;;;13552:21;;;;13524:17;;13544:42;;-1:-1:-1;;;;;13544:30:28;13579:6;13544:34;:42::i;:::-;13524:62;-1:-1:-1;;13468:168:28;13646:38;13670:13;13646:23;:38::i;:::-;13723:174;;;;;;;;;;;;;;-1:-1:-1;;;;;13723:174:28;;;;;;;;;;-1:-1:-1;;;;;13723:174:28;;;;;;;;;-1:-1:-1;;;;;13695:25:28;;-1:-1:-1;13695:25:28;;;:15;:25;;;;;;:202;;;;;;;;;;-1:-1:-1;;;13695:202:28;-1:-1:-1;;;;;;;;13695:202:28;;;;;;-1:-1:-1;;13695:202:28;;;;;;;;;;;;;;;;;;;;;13942:23;;13934:44;;13942:23;13971:6;13934:36;:44::i;:::-;13908:70;;13988:40;14012:15;13988:23;:40::i;:::-;14039:23;:50;;-1:-1:-1;;;;;;14039:50:28;-1:-1:-1;;;;;14039:50:28;;;;;;;;;;-1:-1:-1;;;;;;;12468:1628:28:o;845:241:8:-;1010:68;;-1:-1:-1;;;;;9970:15:30;;;1010:68:8;;;9952:34:30;10022:15;;10002:18;;;9995:43;10054:18;;;10047:34;;;983:96:8;;1003:5;;-1:-1:-1;;;1033:27:8;9887:18:30;;1010:68:8;;;;-1:-1:-1;;1010:68:8;;;;;;;;;;;;;;-1:-1:-1;;;;;1010:68:8;-1:-1:-1;;;;;;1010:68:8;;;;;;;;;;983:19;:96::i;2396:424:22:-;2564:7;;2605:12;2609:8;2605:2;:12;:::i;:::-;2583:34;;2660:1;2646:11;:15;:167;;2802:11;2646:167;;;2680:103;2754:11;2680:48;2696:31;:12;2713:13;2696:16;:31::i;:::-;2680:11;;:15;:48::i;:103::-;2627:186;2396:424;-1:-1:-1;;;;;;2396:424:22:o;828:535::-;961:7;269:1;1237:13;:32;1229:66;;;;-1:-1:-1;;;1229:66:22;;24043:2:30;1229:66:22;;;24025:21:30;24082:2;24062:18;;;24055:30;-1:-1:-1;;;24101:18:30;;;24094:51;24162:18;;1229:66:22;24015:171:30;1229:66:22;1313:43;1343:12;1347:8;1343:2;:12;:::i;:::-;1313:25;:6;1324:13;1313:10;:25::i;2951:120::-;-1:-1:-1;;;;;3019:24:22;;;3011:53;;;;-1:-1:-1;;;3011:53:22;;21899:2:30;3011:53:22;;;21881:21:30;21938:2;21918:18;;;21911:30;-1:-1:-1;;;21957:18:30;;;21950:46;22013:18;;3011:53:22;21871:166:30;17619:1419:28;17759:10;17686:42;17743:27;;;:15;:27;;;;;;;;17686:84;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;17686:84:28;;;;;-1:-1:-1;;;17686:84:28;;;-1:-1:-1;;;;;17686:84:28;;;;;17931:10;:16;18080:40;;;:18;:40;;;;;;;18138:11;:20;17686:84;;17931:16;;;;;17997:175;;17686:84;;17931:16;;17686:84;18138:20;;;;17997:35;:175::i;:::-;17958:214;;18195:5;:36;;18222:9;18195:36;;;18203:16;18195:36;18183:48;-1:-1:-1;18245:14:28;18241:51;;18275:7;;;17619:1419;;:::o;18241:51::-;18322:16;18309:9;:29;;18301:59;;;;-1:-1:-1;;;18301:59:28;;16218:2:30;18301:59:28;;;16200:21:30;16257:2;16237:18;;;16230:30;-1:-1:-1;;;16276:18:30;;;16269:47;16333:18;;18301:59:28;16190:167:30;18301:59:28;18643:20;;:35;;;-1:-1:-1;18639:104:28;;;18710:10;18731:1;18694:27;;;:15;:27;;;;;:38;;-1:-1:-1;;;;;;18694:38:28;;;18639:104;18753:34;18777:9;18753:23;:34::i;:::-;18865:31;:16;18886:9;18865:20;:31::i;:::-;18813:10;18797:27;;;;:15;:27;;;;;;;:109;;-1:-1:-1;;;;;18797:109:28;;;;-1:-1:-1;;;18797:109:28;-1:-1:-1;;;;;;;;18797:109:28;;;;;;;;;;18952:20;;18922:51;;18813:10;;18922:51;;;;18941:9;37260:25:30;;37333:6;37321:19;37316:2;37301:18;;37294:47;37248:2;37233:18;;37215:132;18922:51:28;;;;;;;;18984:47;19002:4;19009:10;19021:9;18984;:47::i;:::-;17619:1419;;;;;:::o;2307:169:0:-;2381:6;;;-1:-1:-1;;;;;2397:17:0;;;-1:-1:-1;;;;;;2397:17:0;;;;;;;2429:40;;2381:6;;;2397:17;2381:6;;2429:40;;2362:16;;2429:40;2307:169;;:::o;14263:1316:28:-;14348:1;14336:9;:13;14328:36;;;;-1:-1:-1;;;14328:36:28;;17995:2:30;14328:36:28;;;17977:21:30;18034:2;18014:18;;;18007:30;-1:-1:-1;;;18053:18:30;;;18046:40;18103:18;;14328:36:28;17967:160:30;14328:36:28;14535:10;14556:1;14519:27;;;:15;:27;;;;;:34;;;;-1:-1:-1;;;;;14519:34:28;:38;;;:102;;-1:-1:-1;14589:10:28;14620:1;14573:27;;;:15;:27;;;;;:44;-1:-1:-1;;;14573:44:28;;-1:-1:-1;;;;;14573:44:28;:48;;14519:102;14502:171;;;14646:16;14654:1;14657:4;14646:7;:16::i;:::-;14772:10;:16;14848:10;14749:20;14836:23;;;:11;:23;;;;;;;;;14899:16;;14947:53;;37526:25:30;;;14772:16:28;;;;37567:18:30;;;37560:34;;;14772:16:28;;14836:23;;14899:16;;:32;;;14848:10;;14947:53;;37499:18:30;14947:53:28;;;;;;;15044:17;;;;;-1:-1:-1;;;;;15044:17:28;15011:22;15107:288;;;;15167:29;:14;15186:9;15167:18;:29::i;:::-;15148:48;;15107:288;;;15235:19;;15227:49;;;;-1:-1:-1;;;15227:49:28;;26586:2:30;15227:49:28;;;26568:21:30;26625:2;26605:18;;;26598:30;-1:-1:-1;;;26644:18:30;;;26637:47;26701:18;;15227:49:28;26558:167:30;15227:49:28;-1:-1:-1;15344:10:28;15332:23;;;;:11;:23;;;;;:52;;-1:-1:-1;;15332:52:28;;;;;;;15309:9;15107:288;15405:41;15429:16;15405:23;:41::i;:::-;15468:10;15456:23;;;;:11;:23;;;;;:58;;-1:-1:-1;;;;;;15456:58:28;;-1:-1:-1;;;;;15456:58:28;;;;;;15525:47;;15555:4;15562:9;15525;:47::i;2672:96:10:-;2730:7;2756:5;2760:1;2756;:5;:::i;14911:339:27:-;14977:25;;15040:20;;15089:154;;-1:-1:-1;;;15089:154:27;;-1:-1:-1;;;;;14977:25:27;;;15089:154;;;11069:34:30;;;11119:18;;;11112:34;;;15195:13:27;11182:15:30;;;11162:18;;;11155:43;15222:11:27;11214:18:30;;;11207:34;15089:22:27;;:34;;11003:19:30;;15089:154:27;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;15071:15;:172;-1:-1:-1;;14911:339:27:o;12439:536::-;12520:10;:23;;;;-1:-1:-1;;;;;12520:23:27;-1:-1:-1;;;;;12557:23:27;;;12553:105;;12596:10;:51;;-1:-1:-1;;;;12596:51:27;-1:-1:-1;;;;;;;;12596:51:27;;;;;;12553:105;12667:10;:27;;-1:-1:-1;;;;;;12667:27:27;;;12705:25;:38;;-1:-1:-1;;;;;;12705:38:27;;;-1:-1:-1;;;;;12758:23:27;;;12754:215;;12838:52;;-1:-1:-1;;;12838:52:27;;-1:-1:-1;;;;;12873:16:27;6961:32:30;12838:52:27;;;6943:51:30;12797:22:27;;12838;;:34;;6916:18:30;;12838:52:27;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;12797:93;;12947:10;-1:-1:-1;;;;;12909:49:27;12920:9;-1:-1:-1;;;;;12909:49:27;;12931:14;12909:49;;;;35093:25:30;;35081:2;35066:18;;35048:76;12754:215:27;12439:536;;:::o;20535:1747:28:-;20750:12;;21219:367;;;;;;;;21275:11;:20;20750:12;21275:20;;;;21219:367;;21317:50;;-1:-1:-1;;;21317:50:28;;21361:4;21317:50;;;6943:51:30;-1:-1:-1;;;;;;;;;20750:12:28;;;;-1:-1:-1;;;;;;;;21140:22:28;;:33;;21191:10;;21219:367;;;;21324:17;;;;;;;;21317:35;;6916:18:30;;21317:50:28;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;21219:367;;;;21389:13;3622:12:3;;;3535:106;21389:13:28;21219:367;;;;21424:24;21219:367;;;;21470:14;;21219:367;;;;21506:13;;21219:367;;;;21541:27;21219:367;;;21140:460;;;;;;;;;;;;;;;32633:4:30;32675:3;32664:9;32660:19;32652:27;;32706:6;32695:9;32688:25;32755:6;32749:13;32744:2;32733:9;32729:18;32722:41;32817:2;32809:6;32805:15;32799:22;32794:2;32783:9;32779:18;32772:50;32876:2;32868:6;32864:15;32858:22;32853:2;32842:9;32838:18;32831:50;32936:2;32928:6;32924:15;32918:22;32912:3;32901:9;32897:19;32890:51;32996:3;32988:6;32984:16;32978:23;32972:3;32961:9;32957:19;32950:52;33057:3;33049:6;33045:16;33039:23;33033:3;33022:9;33018:19;33011:52;33118:3;33110:6;33106:16;33100:23;33094:3;33083:9;33079:19;33072:52;32642:488;;;;;;21140:460:28;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;21704:10;:16;;;21681:20;21734:32;;;:18;:32;;;;;;;;;:51;;;21805:157;;37807:25:30;;;37848:18;;;37841:34;;;37891:18;;;37884:34;;;20922:678:28;;-1:-1:-1;20922:678:28;;-1:-1:-1;20922:678:28;;-1:-1:-1;20922:678:28;-1:-1:-1;20922:678:28;-1:-1:-1;21734:51:28;-1:-1:-1;21704:16:28;-1:-1:-1;;;;;21805:157:28;;;;;37795:2:30;37780:18;21805:157:28;;;;;;;21977:23;:27;;-1:-1:-1;;;;;;21977:27:28;;;22044:16;:12;21977:23;22044:16;:::i;:::-;22018:10;:43;;-1:-1:-1;;22018:43:28;;;;;;;;;;;;-1:-1:-1;22082:32:28;;-1:-1:-1;22096:4:28;22103:10;22082:5;:32::i;:::-;22129:17;;22125:96;;22162:48;22184:9;22196:13;22162;:48::i;:::-;22231:44;;;;20535:1747;;;;;;:::o;3077:120:22:-;-1:-1:-1;;;;;3145:24:22;;;3137:53;;;;-1:-1:-1;;;3137:53:22;;15520:2:30;3137:53:22;;;15502:21:30;15559:2;15539:18;;;15532:30;-1:-1:-1;;;15578:18:30;;;15571:46;15634:18;;3137:53:22;15492:166:30;6878:1220:28;1409:13:1;;;;;;;;:30;;-1:-1:-1;1427:12:1;;;;1426:13;1409:30;1401:89;;;;-1:-1:-1;;;1401:89:1;;;;;;;:::i;:::-;1501:19;1524:13;;;;;;1523:14;1547:98;;;;1581:13;:20;;-1:-1:-1;;1615:19:1;;;;;1547:98;7203:257:28::1;::::0;-1:-1:-1;;;7203:257:28;;:22:::1;::::0;:46:::1;::::0;:257:::1;::::0;7263:6;;7283:7;;7304:13;;7331:15;;7360:14;;7388:10;;7412:12;;7438;;7203:257:::1;;;:::i;:::-;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;7471:24;:22;:24::i;:::-;7505:38;7518:10;7530:12;7505;:38::i;:::-;7553:16;:14;:16::i;:::-;7579:25;7597:6;7579:17;:25::i;:::-;7615:6;:16:::0;;-1:-1:-1;;;;;7615:16:28;;::::1;-1:-1:-1::0;;;;;;7615:16:28;;::::1;;::::0;;;7642:12:::1;:28:::0;;;;::::1;::::0;;;::::1;::::0;;;::::1;::::0;;7680:14:::1;:32:::0;;;7738:82:::1;3990:8;7738:40;:14:::0;324:5:24::1;7738:18:28;:40::i;:82::-;7722:13;:98:::0;7844:12;7830:11:::1;:26;7844:12:::0;7830:11;:26:::1;:::i;:::-;-1:-1:-1::0;;7909:11:28::1;:17:::0;7902:50:::1;::::0;-1:-1:-1;;;7902:50:28;;7946:4:::1;7902:50;::::0;::::1;6943:51:30::0;7867:20:28::1;::::0;7909:17;;::::1;-1:-1:-1::0;;;;;7909:17:28::1;::::0;7902:35:::1;::::0;6916:18:30;;7902:50:28::1;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;7867:85;;7962:37;7986:12;7962:23;:37::i;:::-;8009:10;:51:::0;;-1:-1:-1;;;;;;;8009:51:28;;::::1;-1:-1:-1::0;;;8009:51:28::1;8071:20:::0;;;;;;;;;;;;-1:-1:-1;8071:20:28::1;::::0;;1667:66:1;;;;1717:5;1701:21;;-1:-1:-1;;1701:21:1;;;1667:66;6878:1220:28;;;;;;;;;:::o;1806:584:22:-;2044:20;;2004:24;;2044;;;;;;:63;;-1:-1:-1;2072:20:22;;:35;;;-1:-1:-1;2044:63:22;2040:296;;;2123:23;2165:61;2179:14;:21;;;-1:-1:-1;;;;;2165:61:22;2202:13;2217:8;2165:13;:61::i;:::-;2272:31;;;;2123:103;;-1:-1:-1;2264:61:22;;-1:-1:-1;;;;;2264:40:22;2123:103;2264:44;:61::i;:::-;2241:84;;;;;2040:296;-1:-1:-1;;;;2352:31:22;;;-1:-1:-1;;;;;2345:38:22;;1806:584::o;15761:1157:28:-;15877:10;15808:7;15865:23;;;:11;:23;;;;;15926:17;;-1:-1:-1;;;;;15926:17:28;;;;;15979:16;;16062:20;16054:46;;;;-1:-1:-1;;;16054:46:28;;22653:2:30;16054:46:28;;;22635:21:30;22692:2;22672:18;;;22665:30;-1:-1:-1;;;22711:18:30;;;22704:43;22764:18;;16054:46:28;22625:163:30;16054:46:28;16137:10;:16;;;16119:34;;16111:63;;;;-1:-1:-1;;;16111:63:28;;19378:2:30;16111:63:28;;;19360:21:30;19417:2;19397:18;;;19390:30;-1:-1:-1;;;19436:18:30;;;19429:46;19492:18;;16111:63:28;19350:166:30;16111:63:28;16283:10;16304:1;16271:23;;;:11;:23;;;;;:34;;-1:-1:-1;;;;;;16271:34:28;;;16378:31;;16370:62;;-1:-1:-1;;;16378:31:28;;-1:-1:-1;;;;;16378:31:28;16415:16;16370:44;:62::i;:::-;16315:31;:127;;-1:-1:-1;;;;;16315:127:28;;;-1:-1:-1;;;16315:127:28;;;;;;;;;-1:-1:-1;16565:35:28;;;:18;:35;;;;;;16618:11;:20;16490:162;;16531:16;;16618:20;16315:127;16618:20;;;;16490:23;:162::i;:::-;16668:54;;;37526:25:30;;;37582:2;37567:18;;37560:34;;;16453:199:28;;-1:-1:-1;16677:10:28;;16668:54;;37499:18:30;16668:54:28;;;;;;;16733:38;16747:4;16754:16;16733:5;:38::i;:::-;16807:1;16790:14;:18;16782:46;;;;-1:-1:-1;;;16782:46:28;;29480:2:30;16782:46:28;;;29462:21:30;29519:2;29499:18;;;29492:30;-1:-1:-1;;;29538:18:30;;;29531:45;29593:18;;16782:46:28;29452:165:30;16782:46:28;16838:41;16852:10;16864:14;16838:13;:41::i;3382:96:10:-;3440:7;3466:5;3470:1;3466;:5;:::i;3767:96::-;3825:7;3851:5;3855:1;3851;:5;:::i;634:205:8:-;773:58;;-1:-1:-1;;;;;10679:32:30;;773:58:8;;;10661:51:30;10728:18;;;10721:34;;;746:86:8;;766:5;;-1:-1:-1;;;796:23:8;10634:18:30;;773:58:8;10616:145:30;3140:706:8;3559:23;3585:69;3613:4;3585:69;;;;;;;;;;;;;;;;;3593:5;-1:-1:-1;;;;;3585:27:8;;;:69;;;;;:::i;:::-;3668:17;;3559:95;;-1:-1:-1;3668:21:8;3664:176;;3763:10;3752:30;;;;;;;;;;;;:::i;:::-;3744:85;;;;-1:-1:-1;;;3744:85:8;;28370:2:30;3744:85:8;;;28352:21:30;28409:2;28389:18;;;28382:30;28448:34;28428:18;;;28421:62;-1:-1:-1;;;28499:18:30;;;28492:40;28549:19;;3744:85:8;28342:232:30;8617:389:3;-1:-1:-1;;;;;8700:21:3;;8692:65;;;;-1:-1:-1;;;8692:65:3;;30570:2:30;8692:65:3;;;30552:21:30;30609:2;30589:18;;;30582:30;30648:33;30628:18;;;30621:61;30699:18;;8692:65:3;30542:181:30;8692:65:3;8844:6;8828:12;;:22;;;;;;;:::i;:::-;;;;-1:-1:-1;;;;;;;8860:18:3;;;;;;:9;:18;;;;;:28;;8882:6;;8860:18;:28;;8882:6;;8860:28;:::i;:::-;;;;-1:-1:-1;;8903:37:3;;35093:25:30;;;-1:-1:-1;;;;;8903:37:3;;;8920:1;;8903:37;;35081:2:30;35066:18;8903:37:3;;;;;;;12439:536:27;;:::o;1789:106:2:-;1409:13:1;;;;;;;;:30;;-1:-1:-1;1427:12:1;;;;1426:13;1409:30;1401:89;;;;-1:-1:-1;;;1401:89:1;;;;;;;:::i;:::-;1501:19;1524:13;;;;;;1523:14;1547:98;;;;1581:13;:20;;-1:-1:-1;;1615:19:1;;;;;1547:98;1854:34:2::1;:32;:34::i;:::-;1671:14:1::0;1667:66;;;1717:5;1701:21;;-1:-1:-1;;1701:21:1;;;1789:106:2;:::o;2044:178:3:-;1409:13:1;;;;;;;;:30;;-1:-1:-1;1427:12:1;;;;1426:13;1409:30;1401:89;;;;-1:-1:-1;;;1401:89:1;;;;;;;:::i;:::-;1501:19;1524:13;;;;;;1523:14;1547:98;;;;1581:13;:20;;-1:-1:-1;;1615:19:1;;;;;1547:98;2141:26:3::1;:24;:26::i;:::-;2177:38;2200:5;2207:7;2177:22;:38::i;:::-;1671:14:1::0;1667:66;;;1717:5;1701:21;;-1:-1:-1;;1701:21:1;;;2044:178:3;;;:::o;934:126:0:-;1409:13:1;;;;;;;;:30;;-1:-1:-1;1427:12:1;;;;1426:13;1409:30;1401:89;;;;-1:-1:-1;;;1401:89:1;;;;;;;:::i;:::-;1501:19;1524:13;;;;;;1523:14;1547:98;;;;1581:13;:20;;-1:-1:-1;;1615:19:1;;;;;1547:98;991:26:0::1;:24;:26::i;:::-;1027;:24;:26::i;277:545:22:-:0;415:7;269:1;691:13;:32;683:66;;;;-1:-1:-1;;;683:66:22;;24043:2:30;683:66:22;;;24025:21:30;24082:2;24062:18;;;24055:30;-1:-1:-1;;;24101:18:30;;;24094:51;24162:18;;683:66:22;24015:171:30;683:66:22;767:48;801:13;767:29;783:12;787:8;783:2;:12;:::i;:::-;767:11;;:15;:29::i;9326:576:3:-;-1:-1:-1;;;;;9409:21:3;;9401:67;;;;-1:-1:-1;;;9401:67:3;;24393:2:30;9401:67:3;;;24375:21:30;24432:2;24412:18;;;24405:30;24471:34;24451:18;;;24444:62;-1:-1:-1;;;24522:18:30;;;24515:31;24563:19;;9401:67:3;24365:223:30;9401:67:3;-1:-1:-1;;;;;9564:18:3;;9539:22;9564:18;;;:9;:18;;;;;;9600:24;;;;9592:71;;;;-1:-1:-1;;;9592:71:3;;13290:2:30;9592:71:3;;;13272:21:30;13329:2;13309:18;;;13302:30;13368:34;13348:18;;;13341:62;-1:-1:-1;;;13419:18:30;;;13412:32;13461:19;;9592:71:3;13262:224:30;9592:71:3;-1:-1:-1;;;;;9697:18:3;;;;;;:9;:18;;;;;9718:23;;;9697:44;;9761:12;:22;;9735:6;;9697:18;9761:22;;9735:6;;9761:22;:::i;:::-;;;;-1:-1:-1;;9799:37:3;;35093:25:30;;;9825:1:3;;-1:-1:-1;;;;;9799:37:3;;;;;35081:2:30;35066:18;9799:37:3;;;;;;;4986:828:27;;;:::o;3461:223:9:-;3594:12;3625:52;3647:6;3655:4;3661:1;3664:12;3625:21;:52::i;1901:104:2:-;1409:13:1;;;;;;;;:30;;-1:-1:-1;1427:12:1;;;;1426:13;1409:30;1401:89;;;;-1:-1:-1;;;1401:89:1;;;;;;;:::i;:::-;1501:19;1524:13;;;;;;1523:14;1547:98;;;;1581:13;:20;;-1:-1:-1;;1615:19:1;;;;;1547:98;1708:1:2::1;1976:22:::0;;1667:66:1;;;;1717:5;1701:21;;-1:-1:-1;;1701:21:1;;;1901:104:2;:::o;754:64:6:-;1409:13:1;;;;;;;;:30;;-1:-1:-1;1427:12:1;;;;1426:13;1409:30;1401:89;;;;-1:-1:-1;;;1401:89:1;;;;;;;:::i;:::-;1501:19;1524:13;;;;;;1523:14;1547:98;;;;1581:13;:20;;-1:-1:-1;;1615:19:1;;;;;1667:66;;;;1717:5;1701:21;;-1:-1:-1;;1701:21:1;;;754:64:6;:::o;2228:154:3:-;1409:13:1;;;;;;;;:30;;-1:-1:-1;1427:12:1;;;;1426:13;1409:30;1401:89;;;;-1:-1:-1;;;1401:89:1;;;;;;;:::i;:::-;1501:19;1524:13;;;;;;1523:14;1547:98;;;;1581:13;:20;;-1:-1:-1;;1615:19:1;;;;;1547:98;2335:13:3;;::::1;::::0;:5:::1;::::0;:13:::1;::::0;::::1;::::0;::::1;:::i;:::-;-1:-1:-1::0;2358:17:3;;::::1;::::0;:7:::1;::::0;:17:::1;::::0;::::1;::::0;::::1;:::i;:::-;;1671:14:1::0;1667:66;;;1717:5;1701:21;;-1:-1:-1;;1701:21:1;;;2228:154:3;;;:::o;1066:97:0:-;1409:13:1;;;;;;;;:30;;-1:-1:-1;1427:12:1;;;;1426:13;1409:30;1401:89;;;;-1:-1:-1;;;1401:89:1;;;;;;;:::i;:::-;1501:19;1524:13;;;;;;1523:14;1547:98;;;;1581:13;:20;;-1:-1:-1;;1615:19:1;;;;;1547:98;1133:23:0::1;902:10:6::0;1133:9:0::1;:23::i;4548:499:9:-:0;4713:12;4770:5;4745:21;:30;;4737:81;;;;-1:-1:-1;;;4737:81:9;;19723:2:30;4737:81:9;;;19705:21:30;19762:2;19742:18;;;19735:30;19801:34;19781:18;;;19774:62;-1:-1:-1;;;19852:18:30;;;19845:36;19898:19;;4737:81:9;19695:228:30;4737:81:9;1034:20;;4828:60;;;;-1:-1:-1;;;4828:60:9;;27337:2:30;4828:60:9;;;27319:21:30;27376:2;27356:18;;;27349:30;27415:31;27395:18;;;27388:59;27464:18;;4828:60:9;27309:179:30;4828:60:9;4900:12;4914:23;4941:6;-1:-1:-1;;;;;4941:11:9;4960:5;4967:4;4941:31;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4899:73;;;;4989:51;5006:7;5015:10;5027:12;4989:16;:51::i;:::-;4982:58;4548:499;-1:-1:-1;;;;;;;4548:499:9:o;7161:692::-;7307:12;7335:7;7331:516;;;-1:-1:-1;7365:10:9;7358:17;;7331:516;7476:17;;:21;7472:365;;7670:10;7664:17;7730:15;7717:10;7713:2;7709:19;7702:44;7619:145;7809:12;7802:20;;-1:-1:-1;;;7802:20:9;;;;;;;;:::i;-1:-1:-1:-;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;14:134:30;82:20;;111:31;82:20;111:31;:::i;:::-;63:85;;;:::o;153:134::-;221:20;;250:31;221:20;250:31;:::i;292:132::-;359:20;;388:30;359:20;388:30;:::i;429:130::-;495:20;;524:29;495:20;524:29;:::i;564:257::-;623:6;676:2;664:9;655:7;651:23;647:32;644:2;;;697:6;689;682:22;644:2;741:9;728:23;760:31;785:5;760:31;:::i;826:398::-;894:6;902;955:2;943:9;934:7;930:23;926:32;923:2;;;976:6;968;961:22;923:2;1020:9;1007:23;1039:31;1064:5;1039:31;:::i;:::-;1089:5;-1:-1:-1;1146:2:30;1131:18;;1118:32;1159:33;1118:32;1159:33;:::i;:::-;1211:7;1201:17;;;913:311;;;;;:::o;1229:466::-;1306:6;1314;1322;1375:2;1363:9;1354:7;1350:23;1346:32;1343:2;;;1396:6;1388;1381:22;1343:2;1440:9;1427:23;1459:31;1484:5;1459:31;:::i;:::-;1509:5;-1:-1:-1;1566:2:30;1551:18;;1538:32;1579:33;1538:32;1579:33;:::i;:::-;1333:362;;1631:7;;-1:-1:-1;;;1685:2:30;1670:18;;;;1657:32;;1333:362::o;1700:325::-;1768:6;1776;1829:2;1817:9;1808:7;1804:23;1800:32;1797:2;;;1850:6;1842;1835:22;1797:2;1894:9;1881:23;1913:31;1938:5;1913:31;:::i;:::-;1963:5;2015:2;2000:18;;;;1987:32;;-1:-1:-1;;;1787:238:30:o;2030:383::-;2118:6;2126;2134;2187:2;2175:9;2166:7;2162:23;2158:32;2155:2;;;2208:6;2200;2193:22;2155:2;2245:9;2239:16;2264:31;2289:5;2264:31;:::i;:::-;2359:2;2344:18;;2338:25;2403:2;2388:18;;;2382:25;2314:5;;2338:25;;-1:-1:-1;2382:25:30;2145:268;-1:-1:-1;;;2145:268:30:o;2418:693::-;2527:6;2535;2588:2;2576:9;2567:7;2563:23;2559:32;2556:2;;;2609:6;2601;2594:22;2556:2;2654:9;2641:23;2683:18;2724:2;2716:6;2713:14;2710:2;;;2745:6;2737;2730:22;2710:2;2788:6;2777:9;2773:22;2763:32;;2833:7;2826:4;2822:2;2818:13;2814:27;2804:2;;2860:6;2852;2845:22;2804:2;2905;2892:16;2931:2;2923:6;2920:14;2917:2;;;2952:6;2944;2937:22;2917:2;3015:7;3010:2;3000:6;2992;2988:19;2984:2;2980:28;2976:37;2973:50;2970:2;;;3041:6;3033;3026:22;2970:2;3077;3069:11;;;;;3099:6;;-1:-1:-1;2546:565:30;;-1:-1:-1;;;;2546:565:30:o;3116:255::-;3183:6;3236:2;3224:9;3215:7;3211:23;3207:32;3204:2;;;3257:6;3249;3242:22;3204:2;3294:9;3288:16;3313:28;3335:5;3313:28;:::i;3376:592::-;3505:6;3513;3557:9;3548:7;3544:23;3587:3;3583:2;3579:12;3576:2;;;3609:6;3601;3594:22;3576:2;3654:9;3641:23;3687:18;3679:6;3676:30;3673:2;;;3724:6;3716;3709:22;3673:2;3752:22;;3808:3;3790:16;;;3786:26;3783:2;;;3830:6;3822;3815:22;3783:2;3858;-1:-1:-1;3894:3:30;-1:-1:-1;;3876:16:30;;3872:26;3869:2;;;3916:6;3908;3901:22;3869:2;;3959;3948:9;3944:18;3934:28;;3524:444;;;;;:::o;3973:321::-;4032:6;4085:2;4073:9;4064:7;4060:23;4056:32;4053:2;;;4106:6;4098;4091:22;4053:2;4150:9;4137:23;-1:-1:-1;;;;;4193:5:30;4189:46;4182:5;4179:57;4169:2;;4255:6;4247;4240:22;4299:190;4358:6;4411:2;4399:9;4390:7;4386:23;4382:32;4379:2;;;4432:6;4424;4417:22;4379:2;-1:-1:-1;4460:23:30;;4369:120;-1:-1:-1;4369:120:30:o;4494:194::-;4564:6;4617:2;4605:9;4596:7;4592:23;4588:32;4585:2;;;4638:6;4630;4623:22;4585:2;-1:-1:-1;4666:16:30;;4575:113;-1:-1:-1;4575:113:30:o;4693:325::-;4761:6;4769;4822:2;4810:9;4801:7;4797:23;4793:32;4790:2;;;4843:6;4835;4828:22;4790:2;4884:9;4871:23;4861:33;;4944:2;4933:9;4929:18;4916:32;4957:31;4982:5;4957:31;:::i;5023:502::-;5138:6;5146;5154;5162;5170;5178;5231:3;5219:9;5210:7;5206:23;5202:33;5199:2;;;5253:6;5245;5238:22;5199:2;5287:9;5281:16;5271:26;;5337:2;5326:9;5322:18;5316:25;5306:35;;5381:2;5370:9;5366:18;5360:25;5350:35;;5425:2;5414:9;5410:18;5404:25;5394:35;;5469:3;5458:9;5454:19;5448:26;5438:36;;5514:3;5503:9;5499:19;5493:26;5483:36;;5189:336;;;;;;;;:::o;5639:258::-;5681:3;5719:5;5713:12;5746:6;5741:3;5734:19;5762:63;5818:6;5811:4;5806:3;5802:14;5795:4;5788:5;5784:16;5762:63;:::i;:::-;5879:2;5858:15;-1:-1:-1;;5854:29:30;5845:39;;;;5886:4;5841:50;;5689:208;-1:-1:-1;;5689:208:30:o;6300:274::-;6429:3;6467:6;6461:13;6483:53;6529:6;6524:3;6517:4;6509:6;6505:17;6483:53;:::i;:::-;6552:16;;;;;6437:137;-1:-1:-1;;6437:137:30:o;7999:1708::-;8395:4;8424:3;8463:1;8459;8454:3;8450:11;8446:19;8504:2;8496:6;8492:15;8481:9;8474:34;8556:2;8548:6;8544:15;8539:2;8528:9;8524:18;8517:43;8608:2;8600:6;8596:15;8591:2;8580:9;8576:18;8569:43;8648:6;8643:2;8632:9;8628:18;8621:34;8692:6;8686:3;8675:9;8671:19;8664:35;8736:2;8730:3;8719:9;8715:19;8708:31;8762:45;8803:2;8792:9;8788:18;8780:6;8762:45;:::i;:::-;8748:59;;8856:9;8848:6;8844:22;8838:3;8827:9;8823:19;8816:51;8884:33;8910:6;8902;8884:33;:::i;:::-;8876:41;;8952:6;8939:20;8926:33;;8968:28;8990:5;8968:28;:::i;:::-;9040:13;;9033:21;9027:3;9012:19;;9005:50;9104:2;9092:15;;9079:29;;9117:31;9079:29;9117:31;:::i;:::-;9198:4;9189:7;9185:18;9179:3;9168:9;9164:19;9157:47;9253:2;9245:6;9241:15;9228:29;9213:44;;9266:33;9291:7;9266:33;:::i;:::-;9336:16;9330:3;9315:19;;9308:45;9377:35;9408:2;9396:15;;9377:35;:::i;:::-;-1:-1:-1;;;;;5596:31:30;9464:3;9449:19;;5584:44;9493:35;9523:3;9511:16;;9493:35;:::i;:::-;6191:16;6180:28;9579:3;9564:19;;6168:41;9608:36;9639:3;9627:16;;9608:36;:::i;:::-;-1:-1:-1;;;;;5968:40:30;;9696:3;9681:19;;5956:53;9653:48;8404:1303;;;;;;;;;;;:::o;12113:220::-;12262:2;12251:9;12244:21;12225:4;12282:45;12323:2;12312:9;12308:18;12300:6;12282:45;:::i;20273:330::-;20475:2;20457:21;;;20514:1;20494:18;;;20487:29;-1:-1:-1;;;20547:2:30;20532:18;;20525:37;20594:2;20579:18;;20447:156::o;20941:410::-;21143:2;21125:21;;;21182:2;21162:18;;;21155:30;21221:34;21216:2;21201:18;;21194:62;-1:-1:-1;;;21287:2:30;21272:18;;21265:44;21341:3;21326:19;;21115:236::o;22793:356::-;22995:2;22977:21;;;23014:18;;;23007:30;23073:34;23068:2;23053:18;;23046:62;23140:2;23125:18;;22967:182::o;27833:330::-;28035:2;28017:21;;;28074:1;28054:18;;;28047:29;-1:-1:-1;;;28107:2:30;28092:18;;28085:37;28154:2;28139:18;;28007:156::o;28918:355::-;29120:2;29102:21;;;29159:2;29139:18;;;29132:30;29198:33;29193:2;29178:18;;29171:61;29264:2;29249:18;;29092:181::o;31081:1336::-;31425:13;;-1:-1:-1;;;;;31421:39:30;31403:58;;31508:4;31496:17;;;31490:24;31390:3;31375:19;;;31523:54;;31556:20;;31490:24;-1:-1:-1;;;;;5596:31:30;5584:44;;5574:60;31523:54;;31626:4;31618:6;31614:17;31608:24;31641:56;31691:4;31680:9;31676:20;31660:14;-1:-1:-1;;;;;5596:31:30;5584:44;;5574:60;31641:56;;31746:4;31738:6;31734:17;31728:24;31761:56;31811:4;31800:9;31796:20;31780:14;-1:-1:-1;;;;;5596:31:30;5584:44;;5574:60;31761:56;;31873:4;31865:6;31861:17;31855:24;31848:4;31837:9;31833:20;31826:54;31929:4;31921:6;31917:17;31911:24;31944:55;31993:4;31982:9;31978:20;31962:14;6096:6;6085:18;6073:31;;6063:47;31944:55;;32055:4;32047:6;32043:17;32037:24;32030:4;32019:9;32015:20;32008:54;32111:4;32103:6;32099:17;32093:24;32126:56;32176:4;32165:9;32161:20;32145:14;-1:-1:-1;;;;;5596:31:30;5584:44;;5574:60;32126:56;-1:-1:-1;32201:6:30;32244:15;;;32238:22;-1:-1:-1;;;;;5596:31:30;;32304:18;;;5584:44;-1:-1:-1;;32354:3:30;32339:19;;32332:35;;;;32398:3;32383:19;32376:35;31357:1060;;-1:-1:-1;31357:1060:30:o;35489:1593::-;35794:25;;;35742:2;35838;35856:18;;;35849:30;;;35767:18;;;35914:22;;;35713:4;;35742:2;35955;;35973:18;;;36014:6;35713:4;36051:1005;36065:6;36062:1;36059:13;36051:1005;;;36139:6;36126:20;36121:3;36114:33;36206:2;36198:6;36194:15;36181:29;36176:2;36171:3;36167:12;36160:51;36237:35;36268:2;36260:6;36256:15;36237:35;:::i;:::-;-1:-1:-1;;;;;5596:31:30;36311:12;;;5584:44;36371:15;;;36358:29;36344:12;;;36337:51;36411:4;36462:15;;;36449:29;36435:12;;;36428:51;36502:4;36534:35;36553:15;;;36534:35;:::i;:::-;-1:-1:-1;;;;;5596:31:30;36610:12;;;5584:44;36646:4;36678:33;36695:15;;;36678:33;:::i;:::-;6287:4;6276:16;36750:12;;;6264:29;36786:4;36837:15;;;36824:29;36810:12;;;36803:51;36877:6;36930:15;;;36917:29;36903:12;;;36896:51;36970:6;36996:12;;;;37031:15;;;;36087:1;36080:9;36051:1005;;;-1:-1:-1;37073:3:30;;35722:1360;-1:-1:-1;;;;;;;;;35722:1360:30:o;38118:534::-;38196:4;38202:6;38262:11;38249:25;38356:2;38352:7;38341:8;38325:14;38321:29;38317:43;38297:18;38293:68;38283:2;;38378:4;38372;38365:18;38283:2;38408:33;;38460:20;;;-1:-1:-1;38503:18:30;38492:30;;38489:2;;;38538:4;38532;38525:18;38489:2;38574:4;38562:17;;-1:-1:-1;38605:14:30;38601:27;;;38591:38;;38588:2;;;38642:1;38639;38632:12;38657:128;38697:3;38728:1;38724:6;38721:1;38718:13;38715:2;;;38734:18;;:::i;:::-;-1:-1:-1;38770:9:30;;38705:80::o;38790:217::-;38830:1;38856;38846:2;;-1:-1:-1;;;38881:31:30;;38935:4;38932:1;38925:15;38963:4;38888:1;38953:15;38846:2;-1:-1:-1;38992:9:30;;38836:171::o;39012:422::-;39101:1;39144:5;39101:1;39158:270;39179:7;39169:8;39166:21;39158:270;;;39238:4;39234:1;39230:6;39226:17;39220:4;39217:27;39214:2;;;39247:18;;:::i;:::-;39297:7;39287:8;39283:22;39280:2;;;39317:16;;;;39280:2;39396:22;;;;39356:15;;;;39158:270;;;39162:3;39076:358;;;;;:::o;39439:131::-;39499:5;39528:36;39555:8;39549:4;39624:5;39654:8;39644:2;;-1:-1:-1;39695:1:30;39709:5;;39644:2;39743:4;39733:2;;-1:-1:-1;39780:1:30;39794:5;;39733:2;39825:4;39843:1;39838:59;;;;39911:1;39906:130;;;;39818:218;;39838:59;39868:1;39859:10;;39882:5;;;39906:130;39943:3;39933:8;39930:17;39927:2;;;39950:18;;:::i;:::-;-1:-1:-1;;40006:1:30;39992:16;;40021:5;;39818:218;;40120:2;40110:8;40107:16;40101:3;40095:4;40092:13;40088:36;40082:2;40072:8;40069:16;40064:2;40058:4;40055:12;40051:35;40048:77;40045:2;;;-1:-1:-1;40157:19:30;;;40189:5;;40045:2;40236:34;40261:8;40255:4;40236:34;:::i;:::-;40306:6;40302:1;40298:6;40294:19;40285:7;40282:32;40279:2;;;40317:18;;:::i;:::-;40355:20;;39634:747;-1:-1:-1;;;39634:747:30:o;40386:168::-;40426:7;40492:1;40488;40484:6;40480:14;40477:1;40474:21;40469:1;40462:9;40455:17;40451:45;40448:2;;;40499:18;;:::i;:::-;-1:-1:-1;40539:9:30;;40438:116::o;40559:125::-;40599:4;40627:1;40624;40621:8;40618:2;;;40632:18;;:::i;:::-;-1:-1:-1;40669:9:30;;40608:76::o;40689:258::-;40761:1;40771:113;40785:6;40782:1;40779:13;40771:113;;;40861:11;;;40855:18;40842:11;;;40835:39;40807:2;40800:10;40771:113;;;40902:6;40899:1;40896:13;40893:2;;;-1:-1:-1;;40937:1:30;40919:16;;40912:27;40742:205::o;40952:380::-;41031:1;41027:12;;;;41074;;;41095:2;;41149:4;41141:6;41137:17;41127:27;;41095:2;41202;41194:6;41191:14;41171:18;41168:38;41165:2;;;41248:10;41243:3;41239:20;41236:1;41229:31;41283:4;41280:1;41273:15;41311:4;41308:1;41301:15;41165:2;;41007:325;;;:::o;41337:135::-;41376:3;-1:-1:-1;;41397:17:30;;41394:2;;;41417:18;;:::i;:::-;-1:-1:-1;41464:1:30;41453:13;;41384:88::o;41477:127::-;41538:10;41533:3;41529:20;41526:1;41519:31;41569:4;41566:1;41559:15;41593:4;41590:1;41583:15;41609:176;41654:11;41706:3;41693:17;41719:31;41744:5;41719:31;:::i;41790:176::-;41835:11;41887:3;41874:17;41900:31;41925:5;41900:31;:::i;41971:174::-;42015:11;42067:3;42054:17;42080:30;42104:5;42080:30;:::i;42350:1155::-;42523:5;42510:19;42538:30;42560:7;42538:30;:::i;:::-;42587:11;;-1:-1:-1;;42675:17:30;;42628:15;;42621:23;42646:3;42617:33;42672:25;;;42659:39;;42746:2;42735:14;;42722:28;42759:31;42722:28;42759:31;:::i;:::-;42830:5;42820:7;42817:1;42813:15;42809:27;42799:37;;42890:2;42885;42876:5;42872:10;42868:2;42864:19;42861:27;42858:35;42852:4;42845:49;42942:2;42935:5;42931:14;42918:28;42955:33;42980:7;42955:33;:::i;:::-;-1:-1:-1;;;;;;43023:41:30;;;;43020:49;;;43013:57;;;;43080:2;43076:16;;;;-1:-1:-1;;;;;43072:46:30;43010:109;42997:123;;43107:1;43147:12;;43168:104;43228:43;43267:2;43256:14;;43228:43;:::i;:::-;42254:11;;-1:-1:-1;;;;;;42250:54:30;-1:-1:-1;;;;;42306:31:30;;;;42247:91;42234:105;;42224:121;43168:104;43281:102;43339:43;43377:3;43370:5;43366:15;43339:43;:::i;:::-;43327:10;43808:11;;-1:-1:-1;;;;43844:40:30;43911:3;43890:15;;;;-1:-1:-1;;;43886:48:30;43841:94;;;;43828:108;;43788:154;43281:102;;43392:107;43454:44;43493:3;43486:5;43482:15;43454:44;:::i;:::-;43450:1;43444:4;43440:12;-1:-1:-1;;;;;43667:5:30;43663:40;-1:-1:-1;;;;;43627:33:30;43620:4;43614:11;43610:51;43607:97;43601:4;43594:111;43584:127;;;43947:131;-1:-1:-1;;;;;44022:31:30;;44012:42;;44002:2;;44068:1;44065;44058:12;44083:118;44169:5;44162:13;44155:21;44148:5;44145:32;44135:2;;44191:1;44188;44181:12;44206:140;-1:-1:-1;;;;;44285:5:30;44281:40;44274:5;44271:51;44261:2;;44336:1;44333;44326:12;44351:127;44436:16;44429:5;44425:28;44418:5;44415:39;44405:2;;44468:1;44465;44458:12;44483:114;44567:4;44560:5;44556:16;44549:5;44546:27;44536:2;;44587:1;44584;44577:12","linkReferences":{},"immutableReferences":{"5711":[{"start":3882,"length":32},{"start":11616,"length":32}],"6737":[{"start":3510,"length":32},{"start":10813,"length":32},{"start":10985,"length":32},{"start":13035,"length":32},{"start":13096,"length":32}],"6740":[{"start":2806,"length":32},{"start":11653,"length":32}],"6753":[{"start":1377,"length":32},{"start":6460,"length":32},{"start":8678,"length":32},{"start":15704,"length":32}],"6755":[{"start":2220,"length":32},{"start":8718,"length":32}],"6757":[{"start":3744,"length":32},{"start":6732,"length":32},{"start":15392,"length":32}]}}}}}}},"signatures":{"function":[{"signature":"accountVaultBalance(address)","signatureHash4":"0x3f23bb73","signatureHash32":"0x3f23bb7316c5b636e7188c573c1db52d4d5531aeca9b8879234ed3251de6fca8"},{"signature":"allowance(address,address)","signatureHash4":"0xdd62ed3e","signatureHash32":"0xdd62ed3e90e97b3d417db9c0c7522647811bafca5afc6694f143588d255fdfb4"},{"signature":"approve(address,uint256)","signatureHash4":"0x095ea7b3","signatureHash32":"0x095ea7b334ae44009aa867bfb386f5c3b4b443ac6f0ee573fa91c4608fbadfba"},{"signature":"auctionDuration()","signatureHash4":"0x0cbf54c8","signatureHash32":"0x0cbf54c844f676babc862d6877e9e49a43a5d6218eb75c9b6d2df596533cf312"},{"signature":"balanceOf(address)","signatureHash4":"0x70a08231","signatureHash32":"0x70a08231b98ef4ca268c9cc3f6b4590e4bfec28280db06bb5d45e689f2a360be"},{"signature":"burnRemainingOTokens()","signatureHash4":"0x600a2cfb","signatureHash32":"0x600a2cfb7d08b566443bdc2335c6cafe4142faa7cca13ab92071a594725ed7cf"},{"signature":"cap()","signatureHash4":"0x355274ea","signatureHash32":"0x355274ea4c5084069935a4456a1ac3001e99e7cb12c33ca22e251b993bb2c183"},{"signature":"closeRound()","signatureHash4":"0xe278fe6f","signatureHash32":"0xe278fe6fa85414978065ea4d2988ff61e5372862ed30c17841cd8284b18155bd"},{"signature":"commitNextOption()","signatureHash4":"0xf87c7d93","signatureHash32":"0xf87c7d933b71a263d64fc5647a5b24a8aa872321f356004211747fed3bed6cc8"},{"signature":"completeWithdraw()","signatureHash4":"0xf756fa21","signatureHash32":"0xf756fa2181e7332876946f09e39081a8cbad9396de0c47e0fa34fa9a84ef9798"},{"signature":"currentOption()","signatureHash4":"0x8b10cc7c","signatureHash32":"0x8b10cc7c5aca411803dd1724110b6f1a8c4635959353e6ab7eba6e841ed38da2"},{"signature":"currentOtokenPremium()","signatureHash4":"0xd5f26382","signatureHash32":"0xd5f26382255b7be1cc438a99334497be89e4bbc18343ccf942be27b1bf38b6e7"},{"signature":"currentQueuedWithdrawShares()","signatureHash4":"0x4b2431d9","signatureHash32":"0x4b2431d9a225ed314846a225c2f8cbd24f3efd9886d72fc6f528c1c43adf8eaf"},{"signature":"decimals()","signatureHash4":"0x313ce567","signatureHash32":"0x313ce567add4d438edf58b94ff345d7d38c45b17dfc0f947988d7819dca364f9"},{"signature":"decreaseAllowance(address,uint256)","signatureHash4":"0xa457c2d7","signatureHash32":"0xa457c2d77307f80ff2f3ac810ec99eb18ae2cffee13b29c90c9324546e374be5"},{"signature":"DELAY()","signatureHash4":"0x69b41170","signatureHash32":"0x69b411700d9d21db560aa4e6ac0c070f86abca78110a106b3677a3679dbf0462"},{"signature":"depositETH()","signatureHash4":"0xf6326fb3","signatureHash32":"0xf6326fb3893f8a6cfdcd734d86b6cbe8c7ecba6f6badf9a69f52a4d2418dc85f"},{"signature":"depositFor(uint256,address)","signatureHash4":"0x36efd16f","signatureHash32":"0x36efd16f3afbf7fcb0595d95ac47c0a7df68c33c503dde7af5b7c3cee1623c7e"},{"signature":"depositReceipts(address)","signatureHash4":"0x6719b2ee","signatureHash32":"0x6719b2ee3e6604cd4f68e99da57c453222a9520445d836c5dbbba226aa6bb00f"},{"signature":"deposit(uint256)","signatureHash4":"0xb6b55f25","signatureHash32":"0xb6b55f256c3eb337f96418d59e773db6e805074f5e574a2bebb7d71394043619"},{"signature":"feeRecipient()","signatureHash4":"0x46904840","signatureHash32":"0x46904840b6b05d7bd13973931bbfab50fdf290a35cb7abbfdd5a1d4a81b1e8e8"},{"signature":"GAMMA_CONTROLLER()","signatureHash4":"0x1a92f6c2","signatureHash32":"0x1a92f6c292c6c024e67262eef37351a40ac2cdc7e11558acfa29b45558c7ba61"},{"signature":"increaseAllowance(address,uint256)","signatureHash4":"0x39509351","signatureHash32":"0x39509351d3325647dde3fdd3c8b249adfe89ef4f16d76d83768e6df7a5cd81d6"},{"signature":"initialize((address,address,address,uint256,uint256,string,string,address,address),(bool,uint8,address,address,uint56,uint104))","signatureHash4":"0xf0013827","signatureHash32":"0xf00138273aeb95ecc63b397defc4985101201f390d6962fe15e94db219a7957b"},{"signature":"initiateWithdraw(uint256)","signatureHash4":"0x7e108d52","signatureHash32":"0x7e108d52a77f1e4b65dbec7193a4ea73b98a4becf2f6ffd20abec19196b0598e"},{"signature":"initRounds(uint256)","signatureHash4":"0x9be43daa","signatureHash32":"0x9be43daa8fb8890a2b78bb80c1cca7449cbc033376db0702a9484e299fb708dd"},{"signature":"keeper()","signatureHash4":"0xaced1661","signatureHash32":"0xaced1661d621e9488a7a92f8697a36336e860b494f8a07f8ba61f9df9eedcb7c"},{"signature":"lastQueuedWithdrawAmount()","signatureHash4":"0x503c70aa","signatureHash32":"0x503c70aa233d5a1b0faedac51526ec8c41106866bb1de0aa0fa72623ef66b023"},{"signature":"lastStrikeOverrideRound()","signatureHash4":"0x3ec143d3","signatureHash32":"0x3ec143d3eb75afaf9ac273bb2516d73f5f292af990d36c348bfa3996ce174fee"},{"signature":"liquidityGauge()","signatureHash4":"0xf9a0be68","signatureHash32":"0xf9a0be683db123f3c0c780e23439788ed7b32be6f4959924e894f32e1df05376"},{"signature":"managementFee()","signatureHash4":"0xa6f7f5d6","signatureHash32":"0xa6f7f5d6b4b6c0911e98163c4de6fcae3dddcfb8916a4ed6e367ac2301f9d815"},{"signature":"MARGIN_POOL()","signatureHash4":"0x650cce8a","signatureHash32":"0x650cce8ac7df048239fd605a5f4bc1cd39779d8cf0dd0e4b5f086ed653986ded"},{"signature":"maxRedeem()","signatureHash4":"0x6f31ab34","signatureHash32":"0x6f31ab343413d477fa1f201aa9a379076b4c44c6eec264b5f3d679f1758a6554"},{"signature":"name()","signatureHash4":"0x06fdde03","signatureHash32":"0x06fdde0383f15d582d1a74511486c9ddf862a882fb7904b3d9fe9b8b8e58a796"},{"signature":"nextOption()","signatureHash4":"0xa2db9d83","signatureHash32":"0xa2db9d83d2d52163000292e6eab99cba21d8c3a02800b669f66ba196717a1adf"},{"signature":"nextOptionReadyAt()","signatureHash4":"0xa285c9e8","signatureHash32":"0xa285c9e8f57c89efae30c00c7bba6d89a9687c3167505111af2334946a243399"},{"signature":"optionAuctionID()","signatureHash4":"0x432833a6","signatureHash32":"0x432833a6de75b16e4131261831ae5ffa12ec491c27bb65714914b149e15dff1f"},{"signature":"optionsPremiumPricer()","signatureHash4":"0xafa66264","signatureHash32":"0xafa66264992b81ed1b14b132cf2ffe0603c51d27bcbddd716c4f97231448f5be"},{"signature":"optionsPurchaseQueue()","signatureHash4":"0xfba7dc61","signatureHash32":"0xfba7dc6148931aaf7f6846237d7a5289a277a7fdadb36b895ce8355f805aa75a"},{"signature":"optionState()","signatureHash4":"0xa083ff17","signatureHash32":"0xa083ff17d20eb94e9f5c03f30e56d15cc156cb7d7c651ea7cabb74af333478c4"},{"signature":"OTOKEN_FACTORY()","signatureHash4":"0xdb43e862","signatureHash32":"0xdb43e862aa6fb92d6c3376a96344310107d9539ae6694d3dc3f48702601426af"},{"signature":"overriddenStrikePrice()","signatureHash4":"0xe73c63d5","signatureHash32":"0xe73c63d5c4ebd657ea9059f95cc0e3bd2e653b2b36302362eacee977bb280d43"},{"signature":"owner()","signatureHash4":"0x8da5cb5b","signatureHash32":"0x8da5cb5b36e7f68c1d2e56001220cdbdd3ba2616072f718acfda4a06441a807d"},{"signature":"pausePosition()","signatureHash4":"0xca594094","signatureHash32":"0xca5940949337c641c65b4298e42003956f25d6fff594f35e82ba4a884ab915fc"},{"signature":"performanceFee()","signatureHash4":"0x87788782","signatureHash32":"0x877887823743807fe427fa574aa6b0eae6aab006227a2bdc52adcf9142605c16"},{"signature":"PERIOD()","signatureHash4":"0xb4d1d795","signatureHash32":"0xb4d1d795e2565d35d6529be847549a079c86df4704d0255e076a73790c94adf7"},{"signature":"premiumDiscount()","signatureHash4":"0x83536ff3","signatureHash32":"0x83536ff35ab842eecb3683ace332a696a80352b8f40bf0be2e48afaebe50e67d"},{"signature":"pricePerShare()","signatureHash4":"0x99530b06","signatureHash32":"0x99530b067d1a78fb39d014130d6b6c2d687261c9a5f9a53b0cfba75ff519c82a"},{"signature":"redeem(uint256)","signatureHash4":"0xdb006a75","signatureHash32":"0xdb006a751bed9eb2097bb87aa93452cb31329759b3b6c5518170a3d50e6e985d"},{"signature":"renounceOwnership()","signatureHash4":"0x715018a6","signatureHash32":"0x715018a616b5f2044428f6fadb7deef4ce9ca76ef60ea57978964ad137bbe7ae"},{"signature":"rollToNextOption()","signatureHash4":"0xb9f8092b","signatureHash32":"0xb9f8092b113aeca1f1190afe2662571d5346ebfd39a87d39a68915d52cd278d4"},{"signature":"roundPricePerShare(uint256)","signatureHash4":"0x87153eb1","signatureHash32":"0x87153eb16acb1a2226951ef008bb22bed2ad16bd0a36e3de48587768f3b99197"},{"signature":"setCap(uint256)","signatureHash4":"0x47786d37","signatureHash32":"0x47786d371e8afce5e078049554f69b30fe5c44380cd96e0bd5eb0c678e64d1b3"},{"signature":"setFeeRecipient(address)","signatureHash4":"0xe74b981b","signatureHash32":"0xe74b981b15b470d91075cececf40a8c44bc07bb6cc644ca08d3c2784845fdd29"},{"signature":"setLiquidityGauge(address)","signatureHash4":"0x048bf085","signatureHash32":"0x048bf0859d3b08bcff73428235705a032881e384a543cca024a719dbc80112d8"},{"signature":"setManagementFee(uint256)","signatureHash4":"0xfe56e232","signatureHash32":"0xfe56e2323c6209ff8d51066edc92f1b5ade2f3b39adfdb6c09c17bdca66b5fa0"},{"signature":"setMinPrice(uint256)","signatureHash4":"0x5ea8cd12","signatureHash32":"0x5ea8cd12b3cf2292ca3ce5b0896458da78d62cee87786810c0e4071cf0182b43"},{"signature":"setNewKeeper(address)","signatureHash4":"0xd164cc15","signatureHash32":"0xd164cc1502e313b6ad9e88a898ce8bcc17dde7eaea899593cef78a90f44d83ee"},{"signature":"setOptionsPremiumPricer(address)","signatureHash4":"0x4603c0aa","signatureHash32":"0x4603c0aa198a6e14239f0b9cbd02c56815bcf2aa98ffe898657a62613b749640"},{"signature":"setPerformanceFee(uint256)","signatureHash4":"0x70897b23","signatureHash32":"0x70897b232fd46e669dc436b42339412608c857993c1b5f50b43e4dfcaf2bbb63"},{"signature":"setStrikePrice(uint128)","signatureHash4":"0x55489bb2","signatureHash32":"0x55489bb235ec703e660c9db7e0188ace58a776e58e2d5f5650c3206a963b4791"},{"signature":"setStrikeSelection(address)","signatureHash4":"0x30630da4","signatureHash32":"0x30630da445a43adc6bc2a0272001542185b84a8070ee1c2a03889f5489d7f800"},{"signature":"settleOffer((uint256,uint256,address,uint256,uint256,address,uint8,bytes32,bytes32)[])","signatureHash4":"0x69230868","signatureHash32":"0x692308687aa9e1ed119041c0277ac172f09fc38178a31fffe4761b0fd7dcdd80"},{"signature":"setVaultPauser(address)","signatureHash4":"0x573f0d6e","signatureHash32":"0x573f0d6e5987c78c7aa82823725d7b9e99b46fe3ff26b85e73a6b96f541155c7"},{"signature":"shareBalances(address)","signatureHash4":"0xf656ba51","signatureHash32":"0xf656ba519456bad2a9e978467d62c12ff4d25859118f049d085bc9ad85331166"},{"signature":"shares(address)","signatureHash4":"0xce7c2ac2","signatureHash32":"0xce7c2ac2babd16f4d8c518abdcb99ed8e1402512d3d522f56911309564fde112"},{"signature":"stake(uint256)","signatureHash4":"0xa694fc3a","signatureHash32":"0xa694fc3a9be557197d0136d5e7dd615518dbfe3af0753bf945e64e3bed38fba8"},{"signature":"strikeSelection()","signatureHash4":"0xf957a067","signatureHash32":"0xf957a067530f22cd1538ed1a870b44c3fd6a3acae8a91d75a7d14550c07fc798"},{"signature":"SWAP_CONTRACT()","signatureHash4":"0xcf3afa51","signatureHash32":"0xcf3afa518d537dff120321671e39bd69b4420e3506b9531ebddbb22c9fd83f7d"},{"signature":"symbol()","signatureHash4":"0x95d89b41","signatureHash32":"0x95d89b41e2f5f391a79ec54e9d87c79d6e777c63e32c28da95b4e9e4a79250ec"},{"signature":"totalBalance()","signatureHash4":"0xad7a672f","signatureHash32":"0xad7a672fba2833726315cc78ca49d737d6a104d6eb4a4d86bc6efce8005ccdd7"},{"signature":"totalPending()","signatureHash4":"0x3f90916a","signatureHash32":"0x3f90916af74fda6807270cfab35afc14623d1ef84dc7a10091fdfb2fe7a55ea7"},{"signature":"totalSupply()","signatureHash4":"0x18160ddd","signatureHash32":"0x18160ddd7f15c72528c2f94fd8dfe3c8d5aa26e2c50c7d81f4bc7bee8d4b7932"},{"signature":"transfer(address,uint256)","signatureHash4":"0xa9059cbb","signatureHash32":"0xa9059cbb2ab09eb219583f4a59a5d0623ade346d962bcd4e46b11da047c9049b"},{"signature":"transferFrom(address,address,uint256)","signatureHash4":"0x23b872dd","signatureHash32":"0x23b872dd7302113369cda2901243429419bec145408fa8b352b3dd92b66c680b"},{"signature":"transferOwnership(address)","signatureHash4":"0xf2fde38b","signatureHash32":"0xf2fde38b092330466c661fc723d5289b90272a3e580e3187d1d7ef788506c557"},{"signature":"USDC()","signatureHash4":"0x89a30271","signatureHash32":"0x89a3027128efbe27d01dbabe5ad7c443cb24417820caefb1e0216f2ed420386c"},{"signature":"vaultParams()","signatureHash4":"0x9fcc2d75","signatureHash32":"0x9fcc2d7561d50cb3a0553dcc8d34e06a58e66fb534faff36e73fe17405e0324e"},{"signature":"vaultPauser()","signatureHash4":"0x947061b5","signatureHash32":"0x947061b5682e34f791a700ffef1dbdf67c8e6bf544dd46c50412009af029ca25"},{"signature":"vaultState()","signatureHash4":"0x2728f333","signatureHash32":"0x2728f333a78c66cdc2fa054ab76df73cde7756faf1b4d38a6c9da8ad9e894c6d"},{"signature":"WETH()","signatureHash4":"0xad5c4648","signatureHash32":"0xad5c46488b7de578b546a5d35cea48a937114e7ed63179543cd1f8e1899a1241"},{"signature":"withdrawals(address)","signatureHash4":"0x7a9262a2","signatureHash32":"0x7a9262a249fbbdf8c335c66d5d3335a882e60d93ec9d5d6c50fc09de7148dbe4"},{"signature":"withdrawInstantly(uint256)","signatureHash4":"0x2775d01c","signatureHash32":"0x2775d01ca8196dcabafc1a95edc3cc1e10ba87c4ef1f82bcbe5567114156371e"}],"event":[{"signature":"Approval(address,address,uint256)","signatureHash4":"0x8c5be1e5","signatureHash32":"0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925"},{"signature":"AuctionDurationSet(uint256,uint256)","signatureHash4":"0x5acd982e","signatureHash32":"0x5acd982e2240ed224a69aa03dab039d3797c108e4b5f288cd7dd6ca181b275f3"},{"signature":"CapSet(uint256,uint256)","signatureHash4":"0x5f86edbb","signatureHash32":"0x5f86edbb9d92228a9edc3f0ebc0f001bda1ea345ac7335e0eeef3504b31d1a1c"},{"signature":"CloseShort(address,uint256,address)","signatureHash4":"0x7e830f7c","signatureHash32":"0x7e830f7c1771deb1bdb35c4a7e6051bbac32b376f7f4e4976b8618b0b11997f7"},{"signature":"CollectVaultFees(uint256,uint256,uint256,address)","signatureHash4":"0x0a242f7e","signatureHash32":"0x0a242f7ecaf711036ca770774ceffae28e60ef042ac113ddd187f2631db0c006"},{"signature":"Deposit(address,uint256,uint256)","signatureHash4":"0x90890809","signatureHash32":"0x90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a15"},{"signature":"InitiateWithdraw(address,uint256,uint256)","signatureHash4":"0x0c53c82a","signatureHash32":"0x0c53c82ad07e2d592d88ece3b066777dd60f1118e2a081b380efc4358f0d9e2a"},{"signature":"InstantWithdraw(address,uint256,uint256)","signatureHash4":"0xab2daf3c","signatureHash32":"0xab2daf3c146ca6416cbccd2a86ed2ba995e171ef6319df14a38aef01403a9c96"},{"signature":"ManagementFeeSet(uint256,uint256)","signatureHash4":"0x4e874b00","signatureHash32":"0x4e874b007ab14f7e263baefd44951834c8266f4f224d1092e49e9c254354cc54"},{"signature":"NewOffer(uint256,address,address,address,uint256,uint256,uint256)","signatureHash4":"0x61ed224d","signatureHash32":"0x61ed224de71f3815c67ff417a9cba223a61831d6223cfd50f3986f55cca81166"},{"signature":"NewOptionStrikeSelected(uint256,uint256)","signatureHash4":"0xa217999b","signatureHash32":"0xa217999b1c125c2a996f712c5f26a28addad7167bd8a67d5bd5b2a751148abb0"},{"signature":"OpenShort(address,uint256,address)","signatureHash4":"0x045c558f","signatureHash32":"0x045c558fdce4714c5816d53820d27420f4cd860892df203fe636384d8d19aa01"},{"signature":"OwnershipTransferred(address,address)","signatureHash4":"0x8be0079c","signatureHash32":"0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0"},{"signature":"PerformanceFeeSet(uint256,uint256)","signatureHash4":"0x24867dfb","signatureHash32":"0x24867dfb6fcb9970a07be21024956524abe7a1837faa903ff0e99aaa40cf893e"},{"signature":"Redeem(address,uint256,uint256)","signatureHash4":"0xe5b754fb","signatureHash32":"0xe5b754fb1abb7f01b499791d0b820ae3b6af3424ac1c59768edb53f4ec31a929"},{"signature":"Transfer(address,address,uint256)","signatureHash4":"0xddf252ad","signatureHash32":"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"},{"signature":"Withdraw(address,uint256,uint256)","signatureHash4":"0xf279e6a1","signatureHash32":"0xf279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b568"}],"error":[]},"proxyResolution":{"isProxy":false,"proxyType":null,"implementations":[]},"match":"match","chainId":"1","address":"0xEaf743E9FE7449Ae3Ce02Bc01712666530D2666e"}