{"matchId":"57608862","creationMatch":"match","runtimeMatch":"match","verifiedAt":"2026-10-30T00:45:39Z","creationBytecode":{"onchainBytecode":"0x610100604052348015610010575f5ffd5b50604051613bc9380380613bc983398101604081905261002f916102a4565b60408051808201909152601b81527f537461626c65537761704e4741676772656761746f722076312e300000000000602082015260196080526001600160a01b03841660a052839081610081306100a9565b50600161008e8282610386565b5050506001600160a01b0391821660c0521660e05250610440565b61012881610123604080516101c0810182525f60208201819052606082018190526080820181905260a0820181905260e0820181905261010082018190526101208201819052610160820181905261018082018190526101a0820152600160c0820181905261014082018190528082529181019190915290565b61012b565b50565b805115156120008316151514158061014f5750602081015115156110008316151514155b806101665750604081015115156108008316151514155b8061017d5750606081015115156104008316151514155b806101945750608081015115156102008316151514155b806101ab575060a081015115156101008316151514155b806101c1575060c0810151151560808316151514155b806101d7575060e0810151151560408316151514155b806101ee5750610100810151151560208316151514155b806102055750610120810151151560108316151514155b8061021c5750610140810151151560088316151514155b806102335750610160810151151560048316151514155b8061024a5750610180810151151560028316151514155b8061026157506101a0810151151560018316151514155b1561027757610277630732d7b560e51b8361027b565b5050565b815f526001600160a01b03811660045260245ffd5b6001600160a01b0381168114610128575f5ffd5b5f5f5f606084860312156102b6575f5ffd5b83516102c181610290565b60208501519093506102d281610290565b60408501519092506102e381610290565b809150509250925092565b634e487b7160e01b5f52604160045260245ffd5b600181811c9082168061031657607f821691505b60208210810361033457634e487b7160e01b5f52602260045260245ffd5b50919050565b601f82111561038157805f5260205f20601f840160051c8101602085101561035f5750805b601f840160051c820191505b8181101561037e575f815560010161036b565b50505b505050565b81516001600160401b0381111561039f5761039f6102ee565b6103b3816103ad8454610302565b8461033a565b6020601f8211600181146103e5575f83156103ce5750848201515b5f19600385901b1c1916600184901b17845561037e565b5f84815260208120601f198516915b8281101561041457878501518255602094850194600190920191016103f4565b508482101561043157868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b60805160a05160c05160e0516136456105845f395f8181610499015281816114c201526115cb01525f81816101bc0152818161081e015281816108fa0152818161107101528181611166015281816112270152818161130401528181611498015281816115a1015281816116770152818161190e0152818161197e01528181611ef4015281816126f7015261284701525f81816105e901528181610664015281816106ed0152818161097201528181610a5c01528181610aeb01528181610b7a01528181610c0201528181610c8f01528181610d390152818161139701528181611b1f01528181611b690152818161200d015281816120d501528181612149015281816121ea01528181612645015281816127990152818161281f015281816128b60152818161298501526129c701525f81816102190152611d1c01526136455ff3fe608060405260043610610170575f3560e01c80636fe7e6eb116100c6578063c4e833ce1161007c578063dc98354e11610057578063dc98354e1461060b578063e1b4af6914610515578063f777ce221461062a575f5ffd5b8063c4e833ce14610534578063cd272714146105b9578063dc4c90d3146105d8575f5ffd5b8063ae6836d6116100ac578063ae6836d614610488578063b47b2fb1146104bb578063b6a8b0fa14610515575f5ffd5b80636fe7e6eb146104695780639f063efc14610412575f5ffd5b80632c2efcac11610126578063490c98f511610101578063490c98f514610385578063575e24b4146103b05780636c2bbe7e14610412575f5ffd5b80632c2efcac1461031f5780632d910fb41461033d5780633f7d117914610371575f5ffd5b806321d0ee701161015657806321d0ee701461024f578063259982e51461029f57806328401c10146102be575f5ffd5b806316f0115b146101ab5780631ce4c78b14610208575f5ffd5b366101a7576040517fa80433dc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5ffd5b3480156101b6575f5ffd5b506101de7f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b348015610213575f5ffd5b5061023b7f000000000000000000000000000000000000000000000000000000000000000081565b60405162ffffff90911681526020016101ff565b34801561025a575f5ffd5b5061026e610269366004612e4f565b61064b565b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020016101ff565b3480156102aa575f5ffd5b5061026e6102b9366004612e4f565b6106d4565b3480156102c9575f5ffd5b506103056102d8366004612ec6565b60026020525f9081526040902054600f81810b917001000000000000000000000000000000009004900b82565b60408051600f93840b81529190920b6020820152016101ff565b34801561032a575f5ffd5b506108005b6040519081526020016101ff565b348015610348575f5ffd5b5061035c610357366004612ec6565b610751565b604080519283526020830191909152016101ff565b34801561037c575f5ffd5b506101de61096b565b348015610390575f5ffd5b505f546101de9073ffffffffffffffffffffffffffffffffffffffff1681565b3480156103bb575f5ffd5b506103cf6103ca366004612eed565b610a41565b604080517fffffffff000000000000000000000000000000000000000000000000000000009094168452602084019290925262ffffff16908201526060016101ff565b34801561041d575f5ffd5b5061043161042c366004612f47565b610ad1565b604080517fffffffff0000000000000000000000000000000000000000000000000000000090931683526020830191909152016101ff565b348015610474575f5ffd5b5061026e610483366004612fe3565b610b61565b348015610493575f5ffd5b506101de7f000000000000000000000000000000000000000000000000000000000000000081565b3480156104c6575f5ffd5b506104da6104d536600461303a565b610be8565b604080517fffffffff000000000000000000000000000000000000000000000000000000009093168352600f9190910b6020830152016101ff565b348015610520575f5ffd5b5061026e61052f3660046130bb565b610c76565b34801561053f575f5ffd5b50604080516101c0810182525f60208201819052606082018190526080820181905260a0820181905260e0820181905261010082018190526101208201819052610160820181905261018082018190526101a0820152600160c0820181905261014082018190528082528183015290516101ff9190613115565b3480156105c4575f5ffd5b5061032f6105d3366004613243565b610cff565b3480156105e3575f5ffd5b506101de7f000000000000000000000000000000000000000000000000000000000000000081565b348015610616575f5ffd5b5061026e610625366004613275565b610d20565b348015610635575f5ffd5b5061063e610d9b565b6040516101ff91906132bc565b5f3373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016146106bb576040517fae18210a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6106c88686868686610e27565b90505b95945050505050565b5f3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610744576040517fae18210a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6106c88686868686610e5a565b5f818152600260209081526040808320815180830190925254600f81810b808452700100000000000000000000000000000000909204900b9282019290925282911580156107a457506020810151600f0b155b156107db576040517f0afa7ee800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80516040517f4903b0d10000000000000000000000000000000000000000000000000000000081526fffffffffffffffffffffffffffffffff90911660048201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1690634903b0d190602401602060405180830381865afa158015610878573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061089c919061330f565b60208201516040517f4903b0d10000000000000000000000000000000000000000000000000000000081526fffffffffffffffffffffffffffffffff909116600482015290935073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001690634903b0d190602401602060405180830381865afa15801561093f573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610963919061330f565b915050915091565b5f5f6109967f0000000000000000000000000000000000000000000000000000000000000000610e8d565b5f5490915073ffffffffffffffffffffffffffffffffffffffff808316911614610a24575f80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8316908117825560405190917f9aafce815f6249ca174c3adc0232e8758909994867884013369549fbe000d51791a25b50505f5473ffffffffffffffffffffffffffffffffffffffff1690565b5f80803373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610ab3576040517fae18210a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ac08888888888610fd6565b925092509250955095509592505050565b5f803373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610b42576040517fae18210a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610b5189898989898989611009565b9150915097509795505050505050565b5f3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610bd1576040517fae18210a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610bdd85858585610e27565b90505b949350505050565b5f803373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610c59576040517fae18210a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610c67888888888888611009565b91509150965096945050505050565b5f3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610ce6576040517fae18210a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610cf4878787878787610e27565b979650505050505050565b5f610d16848484610d1188888861103d565b611390565b90505b9392505050565b5f3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610d90576040517fae18210a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610d1684848461145b565b60018054610da890613326565b80601f0160208091040260200160405190810160405280929190818152602001828054610dd490613326565b8015610e1f5780601f10610df657610100808354040283529160200191610e1f565b820191905f5260205f20905b815481529060010190602001808311610e0257829003601f168201915b505050505081565b5f6040517f0a85dc2900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f6040517f78895c1300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f8273ffffffffffffffffffffffffffffffffffffffff1663f02de3b26040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ed8573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610efc9190613371565b905073ffffffffffffffffffffffffffffffffffffffff81161580610f36575073ffffffffffffffffffffffffffffffffffffffff81163b155b15610f4357505f92915050565b8073ffffffffffffffffffffffffffffffffffffffff1663e0ef2b4b6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610fc8575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201909252610fc591810190613371565b60015b15610fd05791505b50919050565b5f5f5f5f5f610fe58989611a3f565b91509150610ff68a8a8a8585611af2565b9450945094505050955095509592505050565b5f5f6040517f0a85dc2900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f818152600260205260408120818412156111b257841561114d57805473ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001690635e0d443f90600f81810b917001000000000000000000000000000000009004900b6110bd886133b9565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b168152600f93840b60048201529190920b60248201526044810191909152606401602060405180830381865afa158015611122573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611146919061330f565b9150611388565b805473ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001690635e0d443f907001000000000000000000000000000000008104600f90810b91900b6110bd886133b9565b835f6111bd82611cab565b6111c790836133ef565b905086156112ac5782546040517f67df02ca000000000000000000000000000000000000000000000000000000008152600f82810b600483015270010000000000000000000000000000000090920490910b6024820152604481018290527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906367df02ca90606401602060405180830381865afa158015611281573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906112a5919061330f565b9350611385565b82546040517f67df02ca0000000000000000000000000000000000000000000000000000000081527001000000000000000000000000000000008204600f90810b60048301529190910b6024820152604481018290527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906367df02ca90606401602060405180830381865afa15801561135e573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611382919061330f565b93505b50505b509392505050565b5f5f6113bd7f00000000000000000000000000000000000000000000000000000000000000008786611cd1565b90508062ffffff165f036113d45782915050610be0565b5f5473ffffffffffffffffffffffffffffffffffffffff166113fa576113f861096b565b505b5f5473ffffffffffffffffffffffffffffffffffffffff1661141f5782915050610be0565b5f8086129061142f838387611d41565b9050816114455761144081866133ef565b61144f565b61144f8186613402565b98975050505050505050565b6040517fe4d332a900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000811660048301525f917f00000000000000000000000000000000000000000000000000000000000000009091169063e4d332a990602401602060405180830381865afa158015611509573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061152d9190613415565b15611564576040517f57fa586900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517f940494f100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000811660048301525f917f00000000000000000000000000000000000000000000000000000000000000009091169063940494f190602401602060405180830381865afa158015611612573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611636919061330f565b90505f808080805b85811015611795576040517fc6610657000000000000000000000000000000000000000000000000000000008152600481018290525f907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063c661065790602401602060405180830381865afa1580156116d1573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906116f59190613371565b905061170460208b018b613430565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611742578193506001955061178c565b61175260408b0160208c01613430565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361178c57819250600194505b5060010161163e565b50831580156117a2575082155b1561181b576117b46020890189613430565b6117c460408a0160208b01613430565b6040517f97956d6e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9283166004820152911660248201526044015b60405180910390fd5b836118785761182d6020890189613430565b6040517f8466f04600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091166004820152602401611812565b8261188d5761182d6040890160208a01613430565b60408051808201909152600f83810b825282900b602082015260025f6118c26118bb368d90038d018d61345d565b60a0902090565b81526020808201929092526040015f208251928201516fffffffffffffffffffffffffffffffff90811670010000000000000000000000000000000002931692909217909155611979907f0000000000000000000000000000000000000000000000000000000000000000907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9061195c908c018c613430565b73ffffffffffffffffffffffffffffffffffffffff169190611d7e565b6119ce7f00000000000000000000000000000000000000000000000000000000000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff61195c60408c0160208d01613430565b6119e06118bb368a90038a018a61345d565b6040517fe4e250d624b5ed2f65699d87988884c47eac735ffb1dcccead084c5254b14373905f90a2611a1061096b565b507fdc98354e000000000000000000000000000000000000000000000000000000009998505050505050505050565b5f8080611a4f6020850185613510565b611a6557611a606020860186613430565b611a75565b611a756040860160208701613430565b90505f611a856020860186613510565b611a9e57611a996040870160208801613430565b611aab565b611aab6020870187613430565b90505f8080611acd85858a611ac86118bb368f90038f018f61345d565b611e49565b92509250925080611ae357611ae3853085612084565b509450925050505b9250929050565b5f5f5f5f611b0786865f8a6020013512612276565b90505f611b1760208901356133b9565b90505f611b627f0000000000000000000000000000000000000000000000000000000000000000611b4b60208c018c613510565b611b5d6118bb368f90038f018f61345d565b611cd1565b9050611b917f00000000000000000000000000000000000000000000000000000000000000008b8b8685612292565b611b9b908461352b565b92505f896020013512611bb457611bb187613579565b91505b5f8060208b018035821390611bc9908d613510565b151503611be15783600f0b915084600f0b9050611bee565b84600f0b915083600f0b90505b73ffffffffffffffffffffffffffffffffffffffff8d16611c176118bb368f90038f018f61345d565b604080518581526020810185905262ffffff87168183015290517f6150bb53cd76c5702d6074239fc7b6c2a5495d339eb122fdc06252f3efdbbc1b9181900360600190a37f575e24b4000000000000000000000000000000000000000000000000000000006fffffffffffffffffffffffffffffffff8616608086901b17909e909d505f9c509a5050505050505050505050565b5f80611cba620f4240846135e2565b905060148111611ccb576014610d19565b92915050565b5f80611cf373ffffffffffffffffffffffffffffffffffffffff861684612461565b509250505083611d0b57600c81901c610fff16611d11565b610fff81165b61ffff1691506106cb7f00000000000000000000000000000000000000000000000000000000000000008361361a565b5f8215611d6257611d5b828562ffffff16620f4240612546565b9050610d19565b611d5b8262ffffff8616611d7981620f4240613402565b612546565b611d8a8383835f612576565b611e4457611d9b83835f6001612576565b611de9576040517f5274afe700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84166004820152602401611812565b611df68383836001612576565b611e44576040517f5274afe700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84166004820152602401611812565b505050565b5f8181526002602090815260408220829182919082908190611e6d90890189613510565b15611e975750508054600f81810b917001000000000000000000000000000000009004900b611eb8565b505080547001000000000000000000000000000000008104600f90810b91900b5b5f88602001351215611ed857611ed160208901356133b9565b9450611fbb565b602088013573ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000166367df02ca8484611f2485611cab565b611f2e90866133ef565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b168152600f93840b60048201529190920b60248201526044810191909152606401602060405180830381865afa158015611f93573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611fb7919061330f565b9550505b6040517f0b0d9c0900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8a81166004830152306024830152604482018790527f00000000000000000000000000000000000000000000000000000000000000001690630b0d9c09906064015f604051808303815f87803b15801561204e575f5ffd5b505af1158015612060573d5f5f3e3d5ffd5b505050506120718583838d8c6125fe565b9550600193505050509450945094915050565b805f0361209057505050565b6040517fa584119400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063a5841194906024015f604051808303815f87803b158015612116575f5ffd5b505af1158015612128573d5f5f3e3d5ffd5b5050505073ffffffffffffffffffffffffffffffffffffffff83166121dd577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166311da60b4826040518263ffffffff1660e01b815260040160206040518083038185885af11580156121b2573d5f5f3e3d5ffd5b50505050506040513d601f19601f820116820180604052508101906121d7919061330f565b50505050565b6121e883838361294c565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166311da60b46040518163ffffffff1660e01b81526004016020604051808303815f875af1158015612252573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906121d7919061330f565b5f5f821561228957508261114681613579565b50929392505050565b5f8162ffffff165f036122a657505f6106cb565b5f5473ffffffffffffffffffffffffffffffffffffffff166122cc576122ca61096b565b505b5f5473ffffffffffffffffffffffffffffffffffffffff166122ef57505f6106cb565b5f6020850180358213919082906123069088613510565b15151461231f5761231a6020880188613430565b61232f565b61232f6040880160208901613430565b90505f5f86600f0b12612342578561234b565b61234b86613579565b6fffffffffffffffffffffffffffffffff1690505f612371865f8a602001351284611d41565b5f5460405182815291925073ffffffffffffffffffffffffffffffffffffffff858116929116907fdb249cf7a102711dda1beaba415bb011ee0e1402c7f67617236fed5739235d6c9060200160405180910390a35f546040517f0b0d9c0900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8581166004830152918216602482015260448101839052908b1690630b0d9c09906064015f604051808303815f87803b15801561243d575f5ffd5b505af115801561244f573d5f5f3e3d5ffd5b50929c9b505050505050505050505050565b5f5f5f5f5f61246f866129ec565b6040517f1e2eaeaf000000000000000000000000000000000000000000000000000000008152600481018290529091505f9073ffffffffffffffffffffffffffffffffffffffff891690631e2eaeaf90602401602060405180830381865afa1580156124dd573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612501919061330f565b905073ffffffffffffffffffffffffffffffffffffffff811695508060a01c60020b945062ffffff8160b81c16935062ffffff8160d01c169250505092959194509250565b5f612552848484612a28565b90508180612562576125626135b5565b83850915610d195760010180610d19575f5ffd5b6040517f095ea7b3000000000000000000000000000000000000000000000000000000005f81815273ffffffffffffffffffffffffffffffffffffffff8616600452602485905291602083604481808b5af1925060015f511483166125f25783831516156125e6573d5f823e3d81fd5b5f873b113d1516831692505b60405250949350505050565b6040517fa584119400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83811660048301525f917f00000000000000000000000000000000000000000000000000000000000000009091169063a5841194906024015f604051808303815f87803b158015612688575f5ffd5b505af115801561269a573d5f5f3e3d5ffd5b505050505f826020013513156127c3576040517fddc1f59d000000000000000000000000000000000000000000000000000000008152600f86810b600483015285900b6024820152604481018790525f60648201523060848201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063ddc1f59d9060a4016020604051808303815f875af1158015612752573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612776919061330f565b505060208101356127be73ffffffffffffffffffffffffffffffffffffffff84167f000000000000000000000000000000000000000000000000000000000000000083612ae3565b6128b4565b6040517fddc1f59d000000000000000000000000000000000000000000000000000000008152600f86810b600483015285900b6024820152604481018790525f606482015273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000811660848301527f0000000000000000000000000000000000000000000000000000000000000000169063ddc1f59d9060a4016020604051808303815f875af115801561288d573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906128b1919061330f565b90505b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166311da60b46040518163ffffffff1660e01b81526004016020604051808303815f875af115801561291e573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612942919061330f565b5095945050505050565b3073ffffffffffffffffffffffffffffffffffffffff8316036129aa57611e4473ffffffffffffffffffffffffffffffffffffffff84167f000000000000000000000000000000000000000000000000000000000000000083612ae3565b611e4473ffffffffffffffffffffffffffffffffffffffff8416837f000000000000000000000000000000000000000000000000000000000000000084612c00565b6040515f90612a0b908390600690602001918252602082015260400190565b604051602081830303815290604052805190602001209050919050565b5f838302817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff85870982811083820303915050808411612a66575f5ffd5b805f03612a7857508290049050610d19565b5f848688095f868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010186841190950394909402919094039290920491909117919091029150509392505050565b5f73ffffffffffffffffffffffffffffffffffffffff8416612b3e575f5f5f5f85875af1905080612b3957612b39835f7ff4b3b1bc00000000000000000000000000000000000000000000000000000000612c5c565b6121d7565b6040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8416600482015282602482015260205f6044835f895af13d15601f3d1160015f511416171691505f81525f60208201525f604082015250806121d7576121d7847fa9059cbb000000000000000000000000000000000000000000000000000000007ff27f64e400000000000000000000000000000000000000000000000000000000612c5c565b612c0e848484846001612d2a565b6121d7576040517f5274afe700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85166004820152602401611812565b6040517f90bfb8650000000000000000000000000000000000000000000000000000000080825273ffffffffffffffffffffffffffffffffffffffff851660048301527fffffffff0000000000000000000000000000000000000000000000000000000084166024830152608060448301526020601f3d018190040260a0810160648401523d608484015290913d5f60a483013e60048260a4018201527fffffffff0000000000000000000000000000000000000000000000000000000084168260c4018201528160e40181fd5b6040517f23b872dd000000000000000000000000000000000000000000000000000000005f81815273ffffffffffffffffffffffffffffffffffffffff8781166004528616602452604485905291602083606481808c5af1925060015f51148316612dac578383151615612da0573d5f823e3d81fd5b5f883b113d1516831692505b604052505f60605295945050505050565b73ffffffffffffffffffffffffffffffffffffffff81168114612dde575f5ffd5b50565b8035612dec81612dbd565b919050565b5f60a08284031215610fd0575f5ffd5b5f60808284031215610fd0575f5ffd5b5f5f83601f840112612e21575f5ffd5b50813567ffffffffffffffff811115612e38575f5ffd5b602083019150836020828501011115611aeb575f5ffd5b5f5f5f5f5f6101608688031215612e64575f5ffd5b8535612e6f81612dbd565b9450612e7e8760208801612df1565b9350612e8d8760c08801612e01565b925061014086013567ffffffffffffffff811115612ea9575f5ffd5b612eb588828901612e11565b969995985093965092949392505050565b5f60208284031215612ed6575f5ffd5b5035919050565b5f60608284031215610fd0575f5ffd5b5f5f5f5f5f6101408688031215612f02575f5ffd5b8535612f0d81612dbd565b9450612f1c8760208801612df1565b9350612f2b8760c08801612edd565b925061012086013567ffffffffffffffff811115612ea9575f5ffd5b5f5f5f5f5f5f5f6101a0888a031215612f5e575f5ffd5b8735612f6981612dbd565b9650612f788960208a01612df1565b9550612f878960c08a01612e01565b94506101408801359350610160880135925061018088013567ffffffffffffffff811115612fb3575f5ffd5b612fbf8a828b01612e11565b989b979a50959850939692959293505050565b8035600281900b8114612dec575f5ffd5b5f5f5f5f6101008587031215612ff7575f5ffd5b843561300281612dbd565b93506130118660208701612df1565b925060c085013561302181612dbd565b915061302f60e08601612fd2565b905092959194509250565b5f5f5f5f5f5f6101608789031215613050575f5ffd5b863561305b81612dbd565b955061306a8860208901612df1565b94506130798860c08901612edd565b9350610120870135925061014087013567ffffffffffffffff81111561309d575f5ffd5b6130a989828a01612e11565b979a9699509497509295939492505050565b5f5f5f5f5f5f61012087890312156130d1575f5ffd5b86356130dc81612dbd565b95506130eb8860208901612df1565b945060c0870135935060e0870135925061010087013567ffffffffffffffff81111561309d575f5ffd5b8151151581526101c081016020830151613133602084018215159052565b506040830151613147604084018215159052565b50606083015161315b606084018215159052565b50608083015161316f608084018215159052565b5060a083015161318360a084018215159052565b5060c083015161319760c084018215159052565b5060e08301516131ab60e084018215159052565b506101008301516131c161010084018215159052565b506101208301516131d761012084018215159052565b506101408301516131ed61014084018215159052565b5061016083015161320361016084018215159052565b5061018083015161321961018084018215159052565b506101a083015161322f6101a084018215159052565b5092915050565b8015158114612dde575f5ffd5b5f5f5f60608486031215613255575f5ffd5b833561326081613236565b95602085013595506040909401359392505050565b5f5f5f60e08486031215613287575f5ffd5b833561329281612dbd565b92506132a18560208601612df1565b915060c08401356132b181612dbd565b809150509250925092565b602081525f82518060208401528060208501604085015e5f6040828501015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011684010191505092915050565b5f6020828403121561331f575f5ffd5b5051919050565b600181811c9082168061333a57607f821691505b602082108103610fd0577f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f60208284031215613381575f5ffd5b8151610d1981612dbd565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f7f800000000000000000000000000000000000000000000000000000000000000082036133e9576133e961338c565b505f0390565b80820180821115611ccb57611ccb61338c565b81810381811115611ccb57611ccb61338c565b5f60208284031215613425575f5ffd5b8151610d1981613236565b5f60208284031215613440575f5ffd5b8135610d1981612dbd565b803562ffffff81168114612dec575f5ffd5b5f60a082840312801561346e575f5ffd5b5060405160a0810167ffffffffffffffff811182821017156134b7577f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6040526134c383612de1565b81526134d160208401612de1565b60208201526134e26040840161344b565b60408201526134f360608401612fd2565b606082015261350460808401612de1565b60808201529392505050565b5f60208284031215613520575f5ffd5b8135610d1981613236565b600f81810b9083900b016f7fffffffffffffffffffffffffffffff81137fffffffffffffffffffffffffffffffff8000000000000000000000000000000082121715611ccb57611ccb61338c565b5f81600f0b7fffffffffffffffffffffffffffffffff8000000000000000000000000000000081036135ad576135ad61338c565b5f0392915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f82613615577f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b500490565b62ffffff818116838216029081169081811461322f5761322f61338c56fea164736f6c634300081d000a000000000000000000000000000000000004444c5dc75cb358380d2e3de08a90000000000000000000000000f36a4ba50c603204c3fc6d2da8b78a7b69cbc67d0000000000000000000000006a8cbed756804b16e05e741edabd5cb544ae21bf","recompiledBytecode":"0x610100604052348015610010575f5ffd5b50604051613bc9380380613bc983398101604081905261002f916102a4565b60408051808201909152601b81527f537461626c65537761704e4741676772656761746f722076312e300000000000602082015260196080526001600160a01b03841660a052839081610081306100a9565b50600161008e8282610386565b5050506001600160a01b0391821660c0521660e05250610440565b61012881610123604080516101c0810182525f60208201819052606082018190526080820181905260a0820181905260e0820181905261010082018190526101208201819052610160820181905261018082018190526101a0820152600160c0820181905261014082018190528082529181019190915290565b61012b565b50565b805115156120008316151514158061014f5750602081015115156110008316151514155b806101665750604081015115156108008316151514155b8061017d5750606081015115156104008316151514155b806101945750608081015115156102008316151514155b806101ab575060a081015115156101008316151514155b806101c1575060c0810151151560808316151514155b806101d7575060e0810151151560408316151514155b806101ee5750610100810151151560208316151514155b806102055750610120810151151560108316151514155b8061021c5750610140810151151560088316151514155b806102335750610160810151151560048316151514155b8061024a5750610180810151151560028316151514155b8061026157506101a0810151151560018316151514155b1561027757610277630732d7b560e51b8361027b565b5050565b815f526001600160a01b03811660045260245ffd5b6001600160a01b0381168114610128575f5ffd5b5f5f5f606084860312156102b6575f5ffd5b83516102c181610290565b60208501519093506102d281610290565b60408501519092506102e381610290565b809150509250925092565b634e487b7160e01b5f52604160045260245ffd5b600181811c9082168061031657607f821691505b60208210810361033457634e487b7160e01b5f52602260045260245ffd5b50919050565b601f82111561038157805f5260205f20601f840160051c8101602085101561035f5750805b601f840160051c820191505b8181101561037e575f815560010161036b565b50505b505050565b81516001600160401b0381111561039f5761039f6102ee565b6103b3816103ad8454610302565b8461033a565b6020601f8211600181146103e5575f83156103ce5750848201515b5f19600385901b1c1916600184901b17845561037e565b5f84815260208120601f198516915b8281101561041457878501518255602094850194600190920191016103f4565b508482101561043157868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b60805160a05160c05160e0516136456105845f395f8181610499015281816114c201526115cb01525f81816101bc0152818161081e015281816108fa0152818161107101528181611166015281816112270152818161130401528181611498015281816115a1015281816116770152818161190e0152818161197e01528181611ef4015281816126f7015261284701525f81816105e901528181610664015281816106ed0152818161097201528181610a5c01528181610aeb01528181610b7a01528181610c0201528181610c8f01528181610d390152818161139701528181611b1f01528181611b690152818161200d015281816120d501528181612149015281816121ea01528181612645015281816127990152818161281f015281816128b60152818161298501526129c701525f81816102190152611d1c01526136455ff3fe608060405260043610610170575f3560e01c80636fe7e6eb116100c6578063c4e833ce1161007c578063dc98354e11610057578063dc98354e1461060b578063e1b4af6914610515578063f777ce221461062a575f5ffd5b8063c4e833ce14610534578063cd272714146105b9578063dc4c90d3146105d8575f5ffd5b8063ae6836d6116100ac578063ae6836d614610488578063b47b2fb1146104bb578063b6a8b0fa14610515575f5ffd5b80636fe7e6eb146104695780639f063efc14610412575f5ffd5b80632c2efcac11610126578063490c98f511610101578063490c98f514610385578063575e24b4146103b05780636c2bbe7e14610412575f5ffd5b80632c2efcac1461031f5780632d910fb41461033d5780633f7d117914610371575f5ffd5b806321d0ee701161015657806321d0ee701461024f578063259982e51461029f57806328401c10146102be575f5ffd5b806316f0115b146101ab5780631ce4c78b14610208575f5ffd5b366101a7576040517fa80433dc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5ffd5b3480156101b6575f5ffd5b506101de7f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b348015610213575f5ffd5b5061023b7f000000000000000000000000000000000000000000000000000000000000000081565b60405162ffffff90911681526020016101ff565b34801561025a575f5ffd5b5061026e610269366004612e4f565b61064b565b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020016101ff565b3480156102aa575f5ffd5b5061026e6102b9366004612e4f565b6106d4565b3480156102c9575f5ffd5b506103056102d8366004612ec6565b60026020525f9081526040902054600f81810b917001000000000000000000000000000000009004900b82565b60408051600f93840b81529190920b6020820152016101ff565b34801561032a575f5ffd5b506108005b6040519081526020016101ff565b348015610348575f5ffd5b5061035c610357366004612ec6565b610751565b604080519283526020830191909152016101ff565b34801561037c575f5ffd5b506101de61096b565b348015610390575f5ffd5b505f546101de9073ffffffffffffffffffffffffffffffffffffffff1681565b3480156103bb575f5ffd5b506103cf6103ca366004612eed565b610a41565b604080517fffffffff000000000000000000000000000000000000000000000000000000009094168452602084019290925262ffffff16908201526060016101ff565b34801561041d575f5ffd5b5061043161042c366004612f47565b610ad1565b604080517fffffffff0000000000000000000000000000000000000000000000000000000090931683526020830191909152016101ff565b348015610474575f5ffd5b5061026e610483366004612fe3565b610b61565b348015610493575f5ffd5b506101de7f000000000000000000000000000000000000000000000000000000000000000081565b3480156104c6575f5ffd5b506104da6104d536600461303a565b610be8565b604080517fffffffff000000000000000000000000000000000000000000000000000000009093168352600f9190910b6020830152016101ff565b348015610520575f5ffd5b5061026e61052f3660046130bb565b610c76565b34801561053f575f5ffd5b50604080516101c0810182525f60208201819052606082018190526080820181905260a0820181905260e0820181905261010082018190526101208201819052610160820181905261018082018190526101a0820152600160c0820181905261014082018190528082528183015290516101ff9190613115565b3480156105c4575f5ffd5b5061032f6105d3366004613243565b610cff565b3480156105e3575f5ffd5b506101de7f000000000000000000000000000000000000000000000000000000000000000081565b348015610616575f5ffd5b5061026e610625366004613275565b610d20565b348015610635575f5ffd5b5061063e610d9b565b6040516101ff91906132bc565b5f3373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016146106bb576040517fae18210a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6106c88686868686610e27565b90505b95945050505050565b5f3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610744576040517fae18210a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6106c88686868686610e5a565b5f818152600260209081526040808320815180830190925254600f81810b808452700100000000000000000000000000000000909204900b9282019290925282911580156107a457506020810151600f0b155b156107db576040517f0afa7ee800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80516040517f4903b0d10000000000000000000000000000000000000000000000000000000081526fffffffffffffffffffffffffffffffff90911660048201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1690634903b0d190602401602060405180830381865afa158015610878573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061089c919061330f565b60208201516040517f4903b0d10000000000000000000000000000000000000000000000000000000081526fffffffffffffffffffffffffffffffff909116600482015290935073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001690634903b0d190602401602060405180830381865afa15801561093f573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610963919061330f565b915050915091565b5f5f6109967f0000000000000000000000000000000000000000000000000000000000000000610e8d565b5f5490915073ffffffffffffffffffffffffffffffffffffffff808316911614610a24575f80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8316908117825560405190917f9aafce815f6249ca174c3adc0232e8758909994867884013369549fbe000d51791a25b50505f5473ffffffffffffffffffffffffffffffffffffffff1690565b5f80803373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610ab3576040517fae18210a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ac08888888888610fd6565b925092509250955095509592505050565b5f803373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610b42576040517fae18210a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610b5189898989898989611009565b9150915097509795505050505050565b5f3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610bd1576040517fae18210a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610bdd85858585610e27565b90505b949350505050565b5f803373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610c59576040517fae18210a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610c67888888888888611009565b91509150965096945050505050565b5f3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610ce6576040517fae18210a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610cf4878787878787610e27565b979650505050505050565b5f610d16848484610d1188888861103d565b611390565b90505b9392505050565b5f3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610d90576040517fae18210a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610d1684848461145b565b60018054610da890613326565b80601f0160208091040260200160405190810160405280929190818152602001828054610dd490613326565b8015610e1f5780601f10610df657610100808354040283529160200191610e1f565b820191905f5260205f20905b815481529060010190602001808311610e0257829003601f168201915b505050505081565b5f6040517f0a85dc2900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f6040517f78895c1300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f8273ffffffffffffffffffffffffffffffffffffffff1663f02de3b26040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ed8573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610efc9190613371565b905073ffffffffffffffffffffffffffffffffffffffff81161580610f36575073ffffffffffffffffffffffffffffffffffffffff81163b155b15610f4357505f92915050565b8073ffffffffffffffffffffffffffffffffffffffff1663e0ef2b4b6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610fc8575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201909252610fc591810190613371565b60015b15610fd05791505b50919050565b5f5f5f5f5f610fe58989611a3f565b91509150610ff68a8a8a8585611af2565b9450945094505050955095509592505050565b5f5f6040517f0a85dc2900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f818152600260205260408120818412156111b257841561114d57805473ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001690635e0d443f90600f81810b917001000000000000000000000000000000009004900b6110bd886133b9565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b168152600f93840b60048201529190920b60248201526044810191909152606401602060405180830381865afa158015611122573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611146919061330f565b9150611388565b805473ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001690635e0d443f907001000000000000000000000000000000008104600f90810b91900b6110bd886133b9565b835f6111bd82611cab565b6111c790836133ef565b905086156112ac5782546040517f67df02ca000000000000000000000000000000000000000000000000000000008152600f82810b600483015270010000000000000000000000000000000090920490910b6024820152604481018290527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906367df02ca90606401602060405180830381865afa158015611281573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906112a5919061330f565b9350611385565b82546040517f67df02ca0000000000000000000000000000000000000000000000000000000081527001000000000000000000000000000000008204600f90810b60048301529190910b6024820152604481018290527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906367df02ca90606401602060405180830381865afa15801561135e573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611382919061330f565b93505b50505b509392505050565b5f5f6113bd7f00000000000000000000000000000000000000000000000000000000000000008786611cd1565b90508062ffffff165f036113d45782915050610be0565b5f5473ffffffffffffffffffffffffffffffffffffffff166113fa576113f861096b565b505b5f5473ffffffffffffffffffffffffffffffffffffffff1661141f5782915050610be0565b5f8086129061142f838387611d41565b9050816114455761144081866133ef565b61144f565b61144f8186613402565b98975050505050505050565b6040517fe4d332a900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000811660048301525f917f00000000000000000000000000000000000000000000000000000000000000009091169063e4d332a990602401602060405180830381865afa158015611509573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061152d9190613415565b15611564576040517f57fa586900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517f940494f100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000811660048301525f917f00000000000000000000000000000000000000000000000000000000000000009091169063940494f190602401602060405180830381865afa158015611612573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611636919061330f565b90505f808080805b85811015611795576040517fc6610657000000000000000000000000000000000000000000000000000000008152600481018290525f907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063c661065790602401602060405180830381865afa1580156116d1573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906116f59190613371565b905061170460208b018b613430565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611742578193506001955061178c565b61175260408b0160208c01613430565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361178c57819250600194505b5060010161163e565b50831580156117a2575082155b1561181b576117b46020890189613430565b6117c460408a0160208b01613430565b6040517f97956d6e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9283166004820152911660248201526044015b60405180910390fd5b836118785761182d6020890189613430565b6040517f8466f04600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091166004820152602401611812565b8261188d5761182d6040890160208a01613430565b60408051808201909152600f83810b825282900b602082015260025f6118c26118bb368d90038d018d61345d565b60a0902090565b81526020808201929092526040015f208251928201516fffffffffffffffffffffffffffffffff90811670010000000000000000000000000000000002931692909217909155611979907f0000000000000000000000000000000000000000000000000000000000000000907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9061195c908c018c613430565b73ffffffffffffffffffffffffffffffffffffffff169190611d7e565b6119ce7f00000000000000000000000000000000000000000000000000000000000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff61195c60408c0160208d01613430565b6119e06118bb368a90038a018a61345d565b6040517fe4e250d624b5ed2f65699d87988884c47eac735ffb1dcccead084c5254b14373905f90a2611a1061096b565b507fdc98354e000000000000000000000000000000000000000000000000000000009998505050505050505050565b5f8080611a4f6020850185613510565b611a6557611a606020860186613430565b611a75565b611a756040860160208701613430565b90505f611a856020860186613510565b611a9e57611a996040870160208801613430565b611aab565b611aab6020870187613430565b90505f8080611acd85858a611ac86118bb368f90038f018f61345d565b611e49565b92509250925080611ae357611ae3853085612084565b509450925050505b9250929050565b5f5f5f5f611b0786865f8a6020013512612276565b90505f611b1760208901356133b9565b90505f611b627f0000000000000000000000000000000000000000000000000000000000000000611b4b60208c018c613510565b611b5d6118bb368f90038f018f61345d565b611cd1565b9050611b917f00000000000000000000000000000000000000000000000000000000000000008b8b8685612292565b611b9b908461352b565b92505f896020013512611bb457611bb187613579565b91505b5f8060208b018035821390611bc9908d613510565b151503611be15783600f0b915084600f0b9050611bee565b84600f0b915083600f0b90505b73ffffffffffffffffffffffffffffffffffffffff8d16611c176118bb368f90038f018f61345d565b604080518581526020810185905262ffffff87168183015290517f6150bb53cd76c5702d6074239fc7b6c2a5495d339eb122fdc06252f3efdbbc1b9181900360600190a37f575e24b4000000000000000000000000000000000000000000000000000000006fffffffffffffffffffffffffffffffff8616608086901b17909e909d505f9c509a5050505050505050505050565b5f80611cba620f4240846135e2565b905060148111611ccb576014610d19565b92915050565b5f80611cf373ffffffffffffffffffffffffffffffffffffffff861684612461565b509250505083611d0b57600c81901c610fff16611d11565b610fff81165b61ffff1691506106cb7f00000000000000000000000000000000000000000000000000000000000000008361361a565b5f8215611d6257611d5b828562ffffff16620f4240612546565b9050610d19565b611d5b8262ffffff8616611d7981620f4240613402565b612546565b611d8a8383835f612576565b611e4457611d9b83835f6001612576565b611de9576040517f5274afe700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84166004820152602401611812565b611df68383836001612576565b611e44576040517f5274afe700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84166004820152602401611812565b505050565b5f8181526002602090815260408220829182919082908190611e6d90890189613510565b15611e975750508054600f81810b917001000000000000000000000000000000009004900b611eb8565b505080547001000000000000000000000000000000008104600f90810b91900b5b5f88602001351215611ed857611ed160208901356133b9565b9450611fbb565b602088013573ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000166367df02ca8484611f2485611cab565b611f2e90866133ef565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b168152600f93840b60048201529190920b60248201526044810191909152606401602060405180830381865afa158015611f93573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611fb7919061330f565b9550505b6040517f0b0d9c0900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8a81166004830152306024830152604482018790527f00000000000000000000000000000000000000000000000000000000000000001690630b0d9c09906064015f604051808303815f87803b15801561204e575f5ffd5b505af1158015612060573d5f5f3e3d5ffd5b505050506120718583838d8c6125fe565b9550600193505050509450945094915050565b805f0361209057505050565b6040517fa584119400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063a5841194906024015f604051808303815f87803b158015612116575f5ffd5b505af1158015612128573d5f5f3e3d5ffd5b5050505073ffffffffffffffffffffffffffffffffffffffff83166121dd577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166311da60b4826040518263ffffffff1660e01b815260040160206040518083038185885af11580156121b2573d5f5f3e3d5ffd5b50505050506040513d601f19601f820116820180604052508101906121d7919061330f565b50505050565b6121e883838361294c565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166311da60b46040518163ffffffff1660e01b81526004016020604051808303815f875af1158015612252573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906121d7919061330f565b5f5f821561228957508261114681613579565b50929392505050565b5f8162ffffff165f036122a657505f6106cb565b5f5473ffffffffffffffffffffffffffffffffffffffff166122cc576122ca61096b565b505b5f5473ffffffffffffffffffffffffffffffffffffffff166122ef57505f6106cb565b5f6020850180358213919082906123069088613510565b15151461231f5761231a6020880188613430565b61232f565b61232f6040880160208901613430565b90505f5f86600f0b12612342578561234b565b61234b86613579565b6fffffffffffffffffffffffffffffffff1690505f612371865f8a602001351284611d41565b5f5460405182815291925073ffffffffffffffffffffffffffffffffffffffff858116929116907fdb249cf7a102711dda1beaba415bb011ee0e1402c7f67617236fed5739235d6c9060200160405180910390a35f546040517f0b0d9c0900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8581166004830152918216602482015260448101839052908b1690630b0d9c09906064015f604051808303815f87803b15801561243d575f5ffd5b505af115801561244f573d5f5f3e3d5ffd5b50929c9b505050505050505050505050565b5f5f5f5f5f61246f866129ec565b6040517f1e2eaeaf000000000000000000000000000000000000000000000000000000008152600481018290529091505f9073ffffffffffffffffffffffffffffffffffffffff891690631e2eaeaf90602401602060405180830381865afa1580156124dd573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612501919061330f565b905073ffffffffffffffffffffffffffffffffffffffff811695508060a01c60020b945062ffffff8160b81c16935062ffffff8160d01c169250505092959194509250565b5f612552848484612a28565b90508180612562576125626135b5565b83850915610d195760010180610d19575f5ffd5b6040517f095ea7b3000000000000000000000000000000000000000000000000000000005f81815273ffffffffffffffffffffffffffffffffffffffff8616600452602485905291602083604481808b5af1925060015f511483166125f25783831516156125e6573d5f823e3d81fd5b5f873b113d1516831692505b60405250949350505050565b6040517fa584119400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83811660048301525f917f00000000000000000000000000000000000000000000000000000000000000009091169063a5841194906024015f604051808303815f87803b158015612688575f5ffd5b505af115801561269a573d5f5f3e3d5ffd5b505050505f826020013513156127c3576040517fddc1f59d000000000000000000000000000000000000000000000000000000008152600f86810b600483015285900b6024820152604481018790525f60648201523060848201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063ddc1f59d9060a4016020604051808303815f875af1158015612752573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612776919061330f565b505060208101356127be73ffffffffffffffffffffffffffffffffffffffff84167f000000000000000000000000000000000000000000000000000000000000000083612ae3565b6128b4565b6040517fddc1f59d000000000000000000000000000000000000000000000000000000008152600f86810b600483015285900b6024820152604481018790525f606482015273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000811660848301527f0000000000000000000000000000000000000000000000000000000000000000169063ddc1f59d9060a4016020604051808303815f875af115801561288d573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906128b1919061330f565b90505b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166311da60b46040518163ffffffff1660e01b81526004016020604051808303815f875af115801561291e573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612942919061330f565b5095945050505050565b3073ffffffffffffffffffffffffffffffffffffffff8316036129aa57611e4473ffffffffffffffffffffffffffffffffffffffff84167f000000000000000000000000000000000000000000000000000000000000000083612ae3565b611e4473ffffffffffffffffffffffffffffffffffffffff8416837f000000000000000000000000000000000000000000000000000000000000000084612c00565b6040515f90612a0b908390600690602001918252602082015260400190565b604051602081830303815290604052805190602001209050919050565b5f838302817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff85870982811083820303915050808411612a66575f5ffd5b805f03612a7857508290049050610d19565b5f848688095f868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010186841190950394909402919094039290920491909117919091029150509392505050565b5f73ffffffffffffffffffffffffffffffffffffffff8416612b3e575f5f5f5f85875af1905080612b3957612b39835f7ff4b3b1bc00000000000000000000000000000000000000000000000000000000612c5c565b6121d7565b6040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8416600482015282602482015260205f6044835f895af13d15601f3d1160015f511416171691505f81525f60208201525f604082015250806121d7576121d7847fa9059cbb000000000000000000000000000000000000000000000000000000007ff27f64e400000000000000000000000000000000000000000000000000000000612c5c565b612c0e848484846001612d2a565b6121d7576040517f5274afe700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85166004820152602401611812565b6040517f90bfb8650000000000000000000000000000000000000000000000000000000080825273ffffffffffffffffffffffffffffffffffffffff851660048301527fffffffff0000000000000000000000000000000000000000000000000000000084166024830152608060448301526020601f3d018190040260a0810160648401523d608484015290913d5f60a483013e60048260a4018201527fffffffff0000000000000000000000000000000000000000000000000000000084168260c4018201528160e40181fd5b6040517f23b872dd000000000000000000000000000000000000000000000000000000005f81815273ffffffffffffffffffffffffffffffffffffffff8781166004528616602452604485905291602083606481808c5af1925060015f51148316612dac578383151615612da0573d5f823e3d81fd5b5f883b113d1516831692505b604052505f60605295945050505050565b73ffffffffffffffffffffffffffffffffffffffff81168114612dde575f5ffd5b50565b8035612dec81612dbd565b919050565b5f60a08284031215610fd0575f5ffd5b5f60808284031215610fd0575f5ffd5b5f5f83601f840112612e21575f5ffd5b50813567ffffffffffffffff811115612e38575f5ffd5b602083019150836020828501011115611aeb575f5ffd5b5f5f5f5f5f6101608688031215612e64575f5ffd5b8535612e6f81612dbd565b9450612e7e8760208801612df1565b9350612e8d8760c08801612e01565b925061014086013567ffffffffffffffff811115612ea9575f5ffd5b612eb588828901612e11565b969995985093965092949392505050565b5f60208284031215612ed6575f5ffd5b5035919050565b5f60608284031215610fd0575f5ffd5b5f5f5f5f5f6101408688031215612f02575f5ffd5b8535612f0d81612dbd565b9450612f1c8760208801612df1565b9350612f2b8760c08801612edd565b925061012086013567ffffffffffffffff811115612ea9575f5ffd5b5f5f5f5f5f5f5f6101a0888a031215612f5e575f5ffd5b8735612f6981612dbd565b9650612f788960208a01612df1565b9550612f878960c08a01612e01565b94506101408801359350610160880135925061018088013567ffffffffffffffff811115612fb3575f5ffd5b612fbf8a828b01612e11565b989b979a50959850939692959293505050565b8035600281900b8114612dec575f5ffd5b5f5f5f5f6101008587031215612ff7575f5ffd5b843561300281612dbd565b93506130118660208701612df1565b925060c085013561302181612dbd565b915061302f60e08601612fd2565b905092959194509250565b5f5f5f5f5f5f6101608789031215613050575f5ffd5b863561305b81612dbd565b955061306a8860208901612df1565b94506130798860c08901612edd565b9350610120870135925061014087013567ffffffffffffffff81111561309d575f5ffd5b6130a989828a01612e11565b979a9699509497509295939492505050565b5f5f5f5f5f5f61012087890312156130d1575f5ffd5b86356130dc81612dbd565b95506130eb8860208901612df1565b945060c0870135935060e0870135925061010087013567ffffffffffffffff81111561309d575f5ffd5b8151151581526101c081016020830151613133602084018215159052565b506040830151613147604084018215159052565b50606083015161315b606084018215159052565b50608083015161316f608084018215159052565b5060a083015161318360a084018215159052565b5060c083015161319760c084018215159052565b5060e08301516131ab60e084018215159052565b506101008301516131c161010084018215159052565b506101208301516131d761012084018215159052565b506101408301516131ed61014084018215159052565b5061016083015161320361016084018215159052565b5061018083015161321961018084018215159052565b506101a083015161322f6101a084018215159052565b5092915050565b8015158114612dde575f5ffd5b5f5f5f60608486031215613255575f5ffd5b833561326081613236565b95602085013595506040909401359392505050565b5f5f5f60e08486031215613287575f5ffd5b833561329281612dbd565b92506132a18560208601612df1565b915060c08401356132b181612dbd565b809150509250925092565b602081525f82518060208401528060208501604085015e5f6040828501015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011684010191505092915050565b5f6020828403121561331f575f5ffd5b5051919050565b600181811c9082168061333a57607f821691505b602082108103610fd0577f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f60208284031215613381575f5ffd5b8151610d1981612dbd565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f7f800000000000000000000000000000000000000000000000000000000000000082036133e9576133e961338c565b505f0390565b80820180821115611ccb57611ccb61338c565b81810381811115611ccb57611ccb61338c565b5f60208284031215613425575f5ffd5b8151610d1981613236565b5f60208284031215613440575f5ffd5b8135610d1981612dbd565b803562ffffff81168114612dec575f5ffd5b5f60a082840312801561346e575f5ffd5b5060405160a0810167ffffffffffffffff811182821017156134b7577f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6040526134c383612de1565b81526134d160208401612de1565b60208201526134e26040840161344b565b60408201526134f360608401612fd2565b606082015261350460808401612de1565b60808201529392505050565b5f60208284031215613520575f5ffd5b8135610d1981613236565b600f81810b9083900b016f7fffffffffffffffffffffffffffffff81137fffffffffffffffffffffffffffffffff8000000000000000000000000000000082121715611ccb57611ccb61338c565b5f81600f0b7fffffffffffffffffffffffffffffffff8000000000000000000000000000000081036135ad576135ad61338c565b5f0392915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f82613615577f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b500490565b62ffffff818116838216029081169081811461322f5761322f61338c56fea164736f6c634300081d000a","sourceMap":"1101:6937:43:-:0;;;2049:241;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;2144:172:41;;;;;;;;;;;;;;;;;2249:2;1085:46:42;;-1:-1:-1;;;;;782:26:38;;;;2178:8:43;;;902:25:47::1;922:4;902:19;:25::i;:::-;-1:-1:-1::0;2263:21:41::2;:46;2287:22:::0;2263:21;:46:::2;:::i;:::-;-1:-1:-1::0;;;;;;;;2233:12:43;;::::1;;::::0;2255:28:::1;;::::0;-1:-1:-1;1101:6937:43;;1578:142:47;1655:58;1685:5;1692:20;1101:6937:43;;;;;;;;-1:-1:-1;1101:6937:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4425:4:41;1101:6937:43;;;4400:29:41;;;1101:6937:43;;;4439:40:41;;;4489:35;;;1101:6937:43;;;4534:37:41;;;;1101:6937:43;4292:286:41;1692:20:47;1655:29;:58::i;:::-;1578:142;:::o;3610:1599:20:-;3729:28;;:74;;1397:7;16467:29;;:34;;3729:74;;;:166;;-1:-1:-1;3823:27:20;;;;:72;;1460:7;16467:29;;:34;;3823:72;;3729:166;:265;;;-1:-1:-1;3915:30:20;;;;:79;;1528:7;16467:29;;:34;;3915:79;;3729:265;:362;;;-1:-1:-1;4014:29:20;;;;:77;;1594:7;16467:29;;:34;;4014:77;;3729:362;:467;;;-1:-1:-1;4111:33:20;;;;:85;;1665:6;16467:29;;:34;;4111:85;;3729:467;:570;;;-1:-1:-1;4216:32:20;;;;:83;;1733:6;16467:29;;:34;;4216:83;;3729:570;:652;;;-1:-1:-1;4319:22:20;;;;:62;;1791:6;16467:29;;:34;;4319:62;;3729:652;:732;;;-1:-1:-1;4401:21:20;;;;:60;;1847:6;16467:29;;:34;;4401:60;;3729:732;:818;;;-1:-1:-1;4481:24:20;;;;:66;;1907:6;16467:29;;:34;;4481:66;;3729:818;:902;;;-1:-1:-1;4567:23:20;;;;:64;;1965:6;16467:29;;:34;;4567:64;;3729:902;:1009;;;-1:-1:-1;4651:33:20;;;;:87;;2037:6;16467:29;;:34;;4651:87;;3729:1009;:1114;;;-1:-1:-1;4758:32:20;;;;:85;;2107:6;16467:29;;:34;;4758:85;;3729:1114;:1236;;;-1:-1:-1;4863:40:20;;;;:102;;2186:6;16467:29;;:34;;4863:102;;3729:1236;:1384;;;-1:-1:-1;4985:43:20;;;;:128;;2268:6;16467:29;;:34;;4985:128;;3729:1384;3712:1491;;;5138:54;-1:-1:-1;;;5186:4:20;5138:39;:54::i;:::-;3610:1599;;:::o;1009:257:17:-;1133:8;1130:1;1123:19;-1:-1:-1;;;;;1172:4:17;1168:53;1162:4;1155:67;1245:4;1242:1;1235:15;14:145:48;-1:-1:-1;;;;;103:31:48;;93:42;;83:70;;149:1;146;139:12;164:643;334:6;342;350;403:2;391:9;382:7;378:23;374:32;371:52;;;419:1;416;409:12;371:52;451:9;445:16;470:45;509:5;470:45;:::i;:::-;584:2;569:18;;563:25;534:5;;-1:-1:-1;597:47:48;563:25;597:47;:::i;:::-;715:2;700:18;;694:25;663:7;;-1:-1:-1;728:47:48;694:25;728:47;:::i;:::-;794:7;784:17;;;164:643;;;;;:::o;812:127::-;873:10;868:3;864:20;861:1;854:31;904:4;901:1;894:15;928:4;925:1;918:15;944:380;1023:1;1019:12;;;;1066;;;1087:61;;1141:4;1133:6;1129:17;1119:27;;1087:61;1194:2;1186:6;1183:14;1163:18;1160:38;1157:161;;1240:10;1235:3;1231:20;1228:1;1221:31;1275:4;1272:1;1265:15;1303:4;1300:1;1293:15;1157:161;;944:380;;;:::o;1455:518::-;1557:2;1552:3;1549:11;1546:421;;;1593:5;1590:1;1583:16;1637:4;1634:1;1624:18;1707:2;1695:10;1691:19;1688:1;1684:27;1678:4;1674:38;1743:4;1731:10;1728:20;1725:47;;;-1:-1:-1;1766:4:48;1725:47;1821:2;1816:3;1812:12;1809:1;1805:20;1799:4;1795:31;1785:41;;1876:81;1894:2;1887:5;1884:13;1876:81;;;1953:1;1939:16;;1920:1;1909:13;1876:81;;;1880:3;;1546:421;1455:518;;;:::o;2149:1299::-;2269:10;;-1:-1:-1;;;;;2291:30:48;;2288:56;;;2324:18;;:::i;:::-;2353:97;2443:6;2403:38;2435:4;2429:11;2403:38;:::i;:::-;2397:4;2353:97;:::i;:::-;2499:4;2530:2;2519:14;;2547:1;2542:649;;;;3235:1;3252:6;3249:89;;;-1:-1:-1;3304:19:48;;;3298:26;3249:89;-1:-1:-1;;2106:1:48;2102:11;;;2098:24;2094:29;2084:40;2130:1;2126:11;;;2081:57;3351:81;;2512:930;;2542:649;1402:1;1395:14;;;1439:4;1426:18;;-1:-1:-1;;2578:20:48;;;2696:222;2710:7;2707:1;2704:14;2696:222;;;2792:19;;;2786:26;2771:42;;2899:4;2884:20;;;;2852:1;2840:14;;;;2726:12;2696:222;;;2700:3;2946:6;2937:7;2934:19;2931:201;;;3007:19;;;3001:26;-1:-1:-1;;3090:1:48;3086:14;;;3102:3;3082:24;3078:37;3074:42;3059:58;3044:74;;2931:201;-1:-1:-1;;;;3178:1:48;3162:14;;;3158:22;3145:36;;-1:-1:-1;2149:1299:48:o;:::-;1101:6937:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","linkReferences":{},"cborAuxdata":{"1":{"value":"0xa164736f6c634300081d000a","offset":15293}},"transformations":[{"type":"insert","offset":15305,"reason":"constructorArguments"}],"transformationValues":{"constructorArguments":"0x000000000000000000000000000000000004444c5dc75cb358380d2e3de08a90000000000000000000000000f36a4ba50c603204c3fc6d2da8b78a7b69cbc67d0000000000000000000000006a8cbed756804b16e05e741edabd5cb544ae21bf"}},"runtimeBytecode":{"onchainBytecode":"0x608060405260043610610170575f3560e01c80636fe7e6eb116100c6578063c4e833ce1161007c578063dc98354e11610057578063dc98354e1461060b578063e1b4af6914610515578063f777ce221461062a575f5ffd5b8063c4e833ce14610534578063cd272714146105b9578063dc4c90d3146105d8575f5ffd5b8063ae6836d6116100ac578063ae6836d614610488578063b47b2fb1146104bb578063b6a8b0fa14610515575f5ffd5b80636fe7e6eb146104695780639f063efc14610412575f5ffd5b80632c2efcac11610126578063490c98f511610101578063490c98f514610385578063575e24b4146103b05780636c2bbe7e14610412575f5ffd5b80632c2efcac1461031f5780632d910fb41461033d5780633f7d117914610371575f5ffd5b806321d0ee701161015657806321d0ee701461024f578063259982e51461029f57806328401c10146102be575f5ffd5b806316f0115b146101ab5780631ce4c78b14610208575f5ffd5b366101a7576040517fa80433dc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5ffd5b3480156101b6575f5ffd5b506101de7f000000000000000000000000f36a4ba50c603204c3fc6d2da8b78a7b69cbc67d81565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b348015610213575f5ffd5b5061023b7f000000000000000000000000000000000000000000000000000000000000001981565b60405162ffffff90911681526020016101ff565b34801561025a575f5ffd5b5061026e610269366004612e4f565b61064b565b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020016101ff565b3480156102aa575f5ffd5b5061026e6102b9366004612e4f565b6106d4565b3480156102c9575f5ffd5b506103056102d8366004612ec6565b60026020525f9081526040902054600f81810b917001000000000000000000000000000000009004900b82565b60408051600f93840b81529190920b6020820152016101ff565b34801561032a575f5ffd5b506108005b6040519081526020016101ff565b348015610348575f5ffd5b5061035c610357366004612ec6565b610751565b604080519283526020830191909152016101ff565b34801561037c575f5ffd5b506101de61096b565b348015610390575f5ffd5b505f546101de9073ffffffffffffffffffffffffffffffffffffffff1681565b3480156103bb575f5ffd5b506103cf6103ca366004612eed565b610a41565b604080517fffffffff000000000000000000000000000000000000000000000000000000009094168452602084019290925262ffffff16908201526060016101ff565b34801561041d575f5ffd5b5061043161042c366004612f47565b610ad1565b604080517fffffffff0000000000000000000000000000000000000000000000000000000090931683526020830191909152016101ff565b348015610474575f5ffd5b5061026e610483366004612fe3565b610b61565b348015610493575f5ffd5b506101de7f0000000000000000000000006a8cbed756804b16e05e741edabd5cb544ae21bf81565b3480156104c6575f5ffd5b506104da6104d536600461303a565b610be8565b604080517fffffffff000000000000000000000000000000000000000000000000000000009093168352600f9190910b6020830152016101ff565b348015610520575f5ffd5b5061026e61052f3660046130bb565b610c76565b34801561053f575f5ffd5b50604080516101c0810182525f60208201819052606082018190526080820181905260a0820181905260e0820181905261010082018190526101208201819052610160820181905261018082018190526101a0820152600160c0820181905261014082018190528082528183015290516101ff9190613115565b3480156105c4575f5ffd5b5061032f6105d3366004613243565b610cff565b3480156105e3575f5ffd5b506101de7f000000000000000000000000000000000004444c5dc75cb358380d2e3de08a9081565b348015610616575f5ffd5b5061026e610625366004613275565b610d20565b348015610635575f5ffd5b5061063e610d9b565b6040516101ff91906132bc565b5f3373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000004444c5dc75cb358380d2e3de08a9016146106bb576040517fae18210a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6106c88686868686610e27565b90505b95945050505050565b5f3373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000004444c5dc75cb358380d2e3de08a901614610744576040517fae18210a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6106c88686868686610e5a565b5f818152600260209081526040808320815180830190925254600f81810b808452700100000000000000000000000000000000909204900b9282019290925282911580156107a457506020810151600f0b155b156107db576040517f0afa7ee800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80516040517f4903b0d10000000000000000000000000000000000000000000000000000000081526fffffffffffffffffffffffffffffffff90911660048201527f000000000000000000000000f36a4ba50c603204c3fc6d2da8b78a7b69cbc67d73ffffffffffffffffffffffffffffffffffffffff1690634903b0d190602401602060405180830381865afa158015610878573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061089c919061330f565b60208201516040517f4903b0d10000000000000000000000000000000000000000000000000000000081526fffffffffffffffffffffffffffffffff909116600482015290935073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000f36a4ba50c603204c3fc6d2da8b78a7b69cbc67d1690634903b0d190602401602060405180830381865afa15801561093f573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610963919061330f565b915050915091565b5f5f6109967f000000000000000000000000000000000004444c5dc75cb358380d2e3de08a90610e8d565b5f5490915073ffffffffffffffffffffffffffffffffffffffff808316911614610a24575f80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8316908117825560405190917f9aafce815f6249ca174c3adc0232e8758909994867884013369549fbe000d51791a25b50505f5473ffffffffffffffffffffffffffffffffffffffff1690565b5f80803373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000004444c5dc75cb358380d2e3de08a901614610ab3576040517fae18210a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ac08888888888610fd6565b925092509250955095509592505050565b5f803373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000004444c5dc75cb358380d2e3de08a901614610b42576040517fae18210a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610b5189898989898989611009565b9150915097509795505050505050565b5f3373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000004444c5dc75cb358380d2e3de08a901614610bd1576040517fae18210a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610bdd85858585610e27565b90505b949350505050565b5f803373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000004444c5dc75cb358380d2e3de08a901614610c59576040517fae18210a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610c67888888888888611009565b91509150965096945050505050565b5f3373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000004444c5dc75cb358380d2e3de08a901614610ce6576040517fae18210a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610cf4878787878787610e27565b979650505050505050565b5f610d16848484610d1188888861103d565b611390565b90505b9392505050565b5f3373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000004444c5dc75cb358380d2e3de08a901614610d90576040517fae18210a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610d1684848461145b565b60018054610da890613326565b80601f0160208091040260200160405190810160405280929190818152602001828054610dd490613326565b8015610e1f5780601f10610df657610100808354040283529160200191610e1f565b820191905f5260205f20905b815481529060010190602001808311610e0257829003601f168201915b505050505081565b5f6040517f0a85dc2900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f6040517f78895c1300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f8273ffffffffffffffffffffffffffffffffffffffff1663f02de3b26040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ed8573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610efc9190613371565b905073ffffffffffffffffffffffffffffffffffffffff81161580610f36575073ffffffffffffffffffffffffffffffffffffffff81163b155b15610f4357505f92915050565b8073ffffffffffffffffffffffffffffffffffffffff1663e0ef2b4b6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610fc8575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201909252610fc591810190613371565b60015b15610fd05791505b50919050565b5f5f5f5f5f610fe58989611a3f565b91509150610ff68a8a8a8585611af2565b9450945094505050955095509592505050565b5f5f6040517f0a85dc2900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f818152600260205260408120818412156111b257841561114d57805473ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000f36a4ba50c603204c3fc6d2da8b78a7b69cbc67d1690635e0d443f90600f81810b917001000000000000000000000000000000009004900b6110bd886133b9565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b168152600f93840b60048201529190920b60248201526044810191909152606401602060405180830381865afa158015611122573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611146919061330f565b9150611388565b805473ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000f36a4ba50c603204c3fc6d2da8b78a7b69cbc67d1690635e0d443f907001000000000000000000000000000000008104600f90810b91900b6110bd886133b9565b835f6111bd82611cab565b6111c790836133ef565b905086156112ac5782546040517f67df02ca000000000000000000000000000000000000000000000000000000008152600f82810b600483015270010000000000000000000000000000000090920490910b6024820152604481018290527f000000000000000000000000f36a4ba50c603204c3fc6d2da8b78a7b69cbc67d73ffffffffffffffffffffffffffffffffffffffff16906367df02ca90606401602060405180830381865afa158015611281573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906112a5919061330f565b9350611385565b82546040517f67df02ca0000000000000000000000000000000000000000000000000000000081527001000000000000000000000000000000008204600f90810b60048301529190910b6024820152604481018290527f000000000000000000000000f36a4ba50c603204c3fc6d2da8b78a7b69cbc67d73ffffffffffffffffffffffffffffffffffffffff16906367df02ca90606401602060405180830381865afa15801561135e573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611382919061330f565b93505b50505b509392505050565b5f5f6113bd7f000000000000000000000000000000000004444c5dc75cb358380d2e3de08a908786611cd1565b90508062ffffff165f036113d45782915050610be0565b5f5473ffffffffffffffffffffffffffffffffffffffff166113fa576113f861096b565b505b5f5473ffffffffffffffffffffffffffffffffffffffff1661141f5782915050610be0565b5f8086129061142f838387611d41565b9050816114455761144081866133ef565b61144f565b61144f8186613402565b98975050505050505050565b6040517fe4d332a900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000f36a4ba50c603204c3fc6d2da8b78a7b69cbc67d811660048301525f917f0000000000000000000000006a8cbed756804b16e05e741edabd5cb544ae21bf9091169063e4d332a990602401602060405180830381865afa158015611509573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061152d9190613415565b15611564576040517f57fa586900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517f940494f100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000f36a4ba50c603204c3fc6d2da8b78a7b69cbc67d811660048301525f917f0000000000000000000000006a8cbed756804b16e05e741edabd5cb544ae21bf9091169063940494f190602401602060405180830381865afa158015611612573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611636919061330f565b90505f808080805b85811015611795576040517fc6610657000000000000000000000000000000000000000000000000000000008152600481018290525f907f000000000000000000000000f36a4ba50c603204c3fc6d2da8b78a7b69cbc67d73ffffffffffffffffffffffffffffffffffffffff169063c661065790602401602060405180830381865afa1580156116d1573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906116f59190613371565b905061170460208b018b613430565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611742578193506001955061178c565b61175260408b0160208c01613430565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361178c57819250600194505b5060010161163e565b50831580156117a2575082155b1561181b576117b46020890189613430565b6117c460408a0160208b01613430565b6040517f97956d6e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9283166004820152911660248201526044015b60405180910390fd5b836118785761182d6020890189613430565b6040517f8466f04600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091166004820152602401611812565b8261188d5761182d6040890160208a01613430565b60408051808201909152600f83810b825282900b602082015260025f6118c26118bb368d90038d018d61345d565b60a0902090565b81526020808201929092526040015f208251928201516fffffffffffffffffffffffffffffffff90811670010000000000000000000000000000000002931692909217909155611979907f000000000000000000000000f36a4ba50c603204c3fc6d2da8b78a7b69cbc67d907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9061195c908c018c613430565b73ffffffffffffffffffffffffffffffffffffffff169190611d7e565b6119ce7f000000000000000000000000f36a4ba50c603204c3fc6d2da8b78a7b69cbc67d7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff61195c60408c0160208d01613430565b6119e06118bb368a90038a018a61345d565b6040517fe4e250d624b5ed2f65699d87988884c47eac735ffb1dcccead084c5254b14373905f90a2611a1061096b565b507fdc98354e000000000000000000000000000000000000000000000000000000009998505050505050505050565b5f8080611a4f6020850185613510565b611a6557611a606020860186613430565b611a75565b611a756040860160208701613430565b90505f611a856020860186613510565b611a9e57611a996040870160208801613430565b611aab565b611aab6020870187613430565b90505f8080611acd85858a611ac86118bb368f90038f018f61345d565b611e49565b92509250925080611ae357611ae3853085612084565b509450925050505b9250929050565b5f5f5f5f611b0786865f8a6020013512612276565b90505f611b1760208901356133b9565b90505f611b627f000000000000000000000000000000000004444c5dc75cb358380d2e3de08a90611b4b60208c018c613510565b611b5d6118bb368f90038f018f61345d565b611cd1565b9050611b917f000000000000000000000000000000000004444c5dc75cb358380d2e3de08a908b8b8685612292565b611b9b908461352b565b92505f896020013512611bb457611bb187613579565b91505b5f8060208b018035821390611bc9908d613510565b151503611be15783600f0b915084600f0b9050611bee565b84600f0b915083600f0b90505b73ffffffffffffffffffffffffffffffffffffffff8d16611c176118bb368f90038f018f61345d565b604080518581526020810185905262ffffff87168183015290517f6150bb53cd76c5702d6074239fc7b6c2a5495d339eb122fdc06252f3efdbbc1b9181900360600190a37f575e24b4000000000000000000000000000000000000000000000000000000006fffffffffffffffffffffffffffffffff8616608086901b17909e909d505f9c509a5050505050505050505050565b5f80611cba620f4240846135e2565b905060148111611ccb576014610d19565b92915050565b5f80611cf373ffffffffffffffffffffffffffffffffffffffff861684612461565b509250505083611d0b57600c81901c610fff16611d11565b610fff81165b61ffff1691506106cb7f00000000000000000000000000000000000000000000000000000000000000198361361a565b5f8215611d6257611d5b828562ffffff16620f4240612546565b9050610d19565b611d5b8262ffffff8616611d7981620f4240613402565b612546565b611d8a8383835f612576565b611e4457611d9b83835f6001612576565b611de9576040517f5274afe700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84166004820152602401611812565b611df68383836001612576565b611e44576040517f5274afe700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84166004820152602401611812565b505050565b5f8181526002602090815260408220829182919082908190611e6d90890189613510565b15611e975750508054600f81810b917001000000000000000000000000000000009004900b611eb8565b505080547001000000000000000000000000000000008104600f90810b91900b5b5f88602001351215611ed857611ed160208901356133b9565b9450611fbb565b602088013573ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000f36a4ba50c603204c3fc6d2da8b78a7b69cbc67d166367df02ca8484611f2485611cab565b611f2e90866133ef565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b168152600f93840b60048201529190920b60248201526044810191909152606401602060405180830381865afa158015611f93573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611fb7919061330f565b9550505b6040517f0b0d9c0900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8a81166004830152306024830152604482018790527f000000000000000000000000000000000004444c5dc75cb358380d2e3de08a901690630b0d9c09906064015f604051808303815f87803b15801561204e575f5ffd5b505af1158015612060573d5f5f3e3d5ffd5b505050506120718583838d8c6125fe565b9550600193505050509450945094915050565b805f0361209057505050565b6040517fa584119400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84811660048301527f000000000000000000000000000000000004444c5dc75cb358380d2e3de08a90169063a5841194906024015f604051808303815f87803b158015612116575f5ffd5b505af1158015612128573d5f5f3e3d5ffd5b5050505073ffffffffffffffffffffffffffffffffffffffff83166121dd577f000000000000000000000000000000000004444c5dc75cb358380d2e3de08a9073ffffffffffffffffffffffffffffffffffffffff166311da60b4826040518263ffffffff1660e01b815260040160206040518083038185885af11580156121b2573d5f5f3e3d5ffd5b50505050506040513d601f19601f820116820180604052508101906121d7919061330f565b50505050565b6121e883838361294c565b7f000000000000000000000000000000000004444c5dc75cb358380d2e3de08a9073ffffffffffffffffffffffffffffffffffffffff166311da60b46040518163ffffffff1660e01b81526004016020604051808303815f875af1158015612252573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906121d7919061330f565b5f5f821561228957508261114681613579565b50929392505050565b5f8162ffffff165f036122a657505f6106cb565b5f5473ffffffffffffffffffffffffffffffffffffffff166122cc576122ca61096b565b505b5f5473ffffffffffffffffffffffffffffffffffffffff166122ef57505f6106cb565b5f6020850180358213919082906123069088613510565b15151461231f5761231a6020880188613430565b61232f565b61232f6040880160208901613430565b90505f5f86600f0b12612342578561234b565b61234b86613579565b6fffffffffffffffffffffffffffffffff1690505f612371865f8a602001351284611d41565b5f5460405182815291925073ffffffffffffffffffffffffffffffffffffffff858116929116907fdb249cf7a102711dda1beaba415bb011ee0e1402c7f67617236fed5739235d6c9060200160405180910390a35f546040517f0b0d9c0900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8581166004830152918216602482015260448101839052908b1690630b0d9c09906064015f604051808303815f87803b15801561243d575f5ffd5b505af115801561244f573d5f5f3e3d5ffd5b50929c9b505050505050505050505050565b5f5f5f5f5f61246f866129ec565b6040517f1e2eaeaf000000000000000000000000000000000000000000000000000000008152600481018290529091505f9073ffffffffffffffffffffffffffffffffffffffff891690631e2eaeaf90602401602060405180830381865afa1580156124dd573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612501919061330f565b905073ffffffffffffffffffffffffffffffffffffffff811695508060a01c60020b945062ffffff8160b81c16935062ffffff8160d01c169250505092959194509250565b5f612552848484612a28565b90508180612562576125626135b5565b83850915610d195760010180610d19575f5ffd5b6040517f095ea7b3000000000000000000000000000000000000000000000000000000005f81815273ffffffffffffffffffffffffffffffffffffffff8616600452602485905291602083604481808b5af1925060015f511483166125f25783831516156125e6573d5f823e3d81fd5b5f873b113d1516831692505b60405250949350505050565b6040517fa584119400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83811660048301525f917f000000000000000000000000000000000004444c5dc75cb358380d2e3de08a909091169063a5841194906024015f604051808303815f87803b158015612688575f5ffd5b505af115801561269a573d5f5f3e3d5ffd5b505050505f826020013513156127c3576040517fddc1f59d000000000000000000000000000000000000000000000000000000008152600f86810b600483015285900b6024820152604481018790525f60648201523060848201527f000000000000000000000000f36a4ba50c603204c3fc6d2da8b78a7b69cbc67d73ffffffffffffffffffffffffffffffffffffffff169063ddc1f59d9060a4016020604051808303815f875af1158015612752573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612776919061330f565b505060208101356127be73ffffffffffffffffffffffffffffffffffffffff84167f000000000000000000000000000000000004444c5dc75cb358380d2e3de08a9083612ae3565b6128b4565b6040517fddc1f59d000000000000000000000000000000000000000000000000000000008152600f86810b600483015285900b6024820152604481018790525f606482015273ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000004444c5dc75cb358380d2e3de08a90811660848301527f000000000000000000000000f36a4ba50c603204c3fc6d2da8b78a7b69cbc67d169063ddc1f59d9060a4016020604051808303815f875af115801561288d573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906128b1919061330f565b90505b7f000000000000000000000000000000000004444c5dc75cb358380d2e3de08a9073ffffffffffffffffffffffffffffffffffffffff166311da60b46040518163ffffffff1660e01b81526004016020604051808303815f875af115801561291e573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612942919061330f565b5095945050505050565b3073ffffffffffffffffffffffffffffffffffffffff8316036129aa57611e4473ffffffffffffffffffffffffffffffffffffffff84167f000000000000000000000000000000000004444c5dc75cb358380d2e3de08a9083612ae3565b611e4473ffffffffffffffffffffffffffffffffffffffff8416837f000000000000000000000000000000000004444c5dc75cb358380d2e3de08a9084612c00565b6040515f90612a0b908390600690602001918252602082015260400190565b604051602081830303815290604052805190602001209050919050565b5f838302817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff85870982811083820303915050808411612a66575f5ffd5b805f03612a7857508290049050610d19565b5f848688095f868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010186841190950394909402919094039290920491909117919091029150509392505050565b5f73ffffffffffffffffffffffffffffffffffffffff8416612b3e575f5f5f5f85875af1905080612b3957612b39835f7ff4b3b1bc00000000000000000000000000000000000000000000000000000000612c5c565b6121d7565b6040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8416600482015282602482015260205f6044835f895af13d15601f3d1160015f511416171691505f81525f60208201525f604082015250806121d7576121d7847fa9059cbb000000000000000000000000000000000000000000000000000000007ff27f64e400000000000000000000000000000000000000000000000000000000612c5c565b612c0e848484846001612d2a565b6121d7576040517f5274afe700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85166004820152602401611812565b6040517f90bfb8650000000000000000000000000000000000000000000000000000000080825273ffffffffffffffffffffffffffffffffffffffff851660048301527fffffffff0000000000000000000000000000000000000000000000000000000084166024830152608060448301526020601f3d018190040260a0810160648401523d608484015290913d5f60a483013e60048260a4018201527fffffffff0000000000000000000000000000000000000000000000000000000084168260c4018201528160e40181fd5b6040517f23b872dd000000000000000000000000000000000000000000000000000000005f81815273ffffffffffffffffffffffffffffffffffffffff8781166004528616602452604485905291602083606481808c5af1925060015f51148316612dac578383151615612da0573d5f823e3d81fd5b5f883b113d1516831692505b604052505f60605295945050505050565b73ffffffffffffffffffffffffffffffffffffffff81168114612dde575f5ffd5b50565b8035612dec81612dbd565b919050565b5f60a08284031215610fd0575f5ffd5b5f60808284031215610fd0575f5ffd5b5f5f83601f840112612e21575f5ffd5b50813567ffffffffffffffff811115612e38575f5ffd5b602083019150836020828501011115611aeb575f5ffd5b5f5f5f5f5f6101608688031215612e64575f5ffd5b8535612e6f81612dbd565b9450612e7e8760208801612df1565b9350612e8d8760c08801612e01565b925061014086013567ffffffffffffffff811115612ea9575f5ffd5b612eb588828901612e11565b969995985093965092949392505050565b5f60208284031215612ed6575f5ffd5b5035919050565b5f60608284031215610fd0575f5ffd5b5f5f5f5f5f6101408688031215612f02575f5ffd5b8535612f0d81612dbd565b9450612f1c8760208801612df1565b9350612f2b8760c08801612edd565b925061012086013567ffffffffffffffff811115612ea9575f5ffd5b5f5f5f5f5f5f5f6101a0888a031215612f5e575f5ffd5b8735612f6981612dbd565b9650612f788960208a01612df1565b9550612f878960c08a01612e01565b94506101408801359350610160880135925061018088013567ffffffffffffffff811115612fb3575f5ffd5b612fbf8a828b01612e11565b989b979a50959850939692959293505050565b8035600281900b8114612dec575f5ffd5b5f5f5f5f6101008587031215612ff7575f5ffd5b843561300281612dbd565b93506130118660208701612df1565b925060c085013561302181612dbd565b915061302f60e08601612fd2565b905092959194509250565b5f5f5f5f5f5f6101608789031215613050575f5ffd5b863561305b81612dbd565b955061306a8860208901612df1565b94506130798860c08901612edd565b9350610120870135925061014087013567ffffffffffffffff81111561309d575f5ffd5b6130a989828a01612e11565b979a9699509497509295939492505050565b5f5f5f5f5f5f61012087890312156130d1575f5ffd5b86356130dc81612dbd565b95506130eb8860208901612df1565b945060c0870135935060e0870135925061010087013567ffffffffffffffff81111561309d575f5ffd5b8151151581526101c081016020830151613133602084018215159052565b506040830151613147604084018215159052565b50606083015161315b606084018215159052565b50608083015161316f608084018215159052565b5060a083015161318360a084018215159052565b5060c083015161319760c084018215159052565b5060e08301516131ab60e084018215159052565b506101008301516131c161010084018215159052565b506101208301516131d761012084018215159052565b506101408301516131ed61014084018215159052565b5061016083015161320361016084018215159052565b5061018083015161321961018084018215159052565b506101a083015161322f6101a084018215159052565b5092915050565b8015158114612dde575f5ffd5b5f5f5f60608486031215613255575f5ffd5b833561326081613236565b95602085013595506040909401359392505050565b5f5f5f60e08486031215613287575f5ffd5b833561329281612dbd565b92506132a18560208601612df1565b915060c08401356132b181612dbd565b809150509250925092565b602081525f82518060208401528060208501604085015e5f6040828501015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011684010191505092915050565b5f6020828403121561331f575f5ffd5b5051919050565b600181811c9082168061333a57607f821691505b602082108103610fd0577f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f60208284031215613381575f5ffd5b8151610d1981612dbd565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f7f800000000000000000000000000000000000000000000000000000000000000082036133e9576133e961338c565b505f0390565b80820180821115611ccb57611ccb61338c565b81810381811115611ccb57611ccb61338c565b5f60208284031215613425575f5ffd5b8151610d1981613236565b5f60208284031215613440575f5ffd5b8135610d1981612dbd565b803562ffffff81168114612dec575f5ffd5b5f60a082840312801561346e575f5ffd5b5060405160a0810167ffffffffffffffff811182821017156134b7577f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6040526134c383612de1565b81526134d160208401612de1565b60208201526134e26040840161344b565b60408201526134f360608401612fd2565b606082015261350460808401612de1565b60808201529392505050565b5f60208284031215613520575f5ffd5b8135610d1981613236565b600f81810b9083900b016f7fffffffffffffffffffffffffffffff81137fffffffffffffffffffffffffffffffff8000000000000000000000000000000082121715611ccb57611ccb61338c565b5f81600f0b7fffffffffffffffffffffffffffffffff8000000000000000000000000000000081036135ad576135ad61338c565b5f0392915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f82613615577f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b500490565b62ffffff818116838216029081169081811461322f5761322f61338c56fea164736f6c634300081d000a","recompiledBytecode":"0x608060405260043610610170575f3560e01c80636fe7e6eb116100c6578063c4e833ce1161007c578063dc98354e11610057578063dc98354e1461060b578063e1b4af6914610515578063f777ce221461062a575f5ffd5b8063c4e833ce14610534578063cd272714146105b9578063dc4c90d3146105d8575f5ffd5b8063ae6836d6116100ac578063ae6836d614610488578063b47b2fb1146104bb578063b6a8b0fa14610515575f5ffd5b80636fe7e6eb146104695780639f063efc14610412575f5ffd5b80632c2efcac11610126578063490c98f511610101578063490c98f514610385578063575e24b4146103b05780636c2bbe7e14610412575f5ffd5b80632c2efcac1461031f5780632d910fb41461033d5780633f7d117914610371575f5ffd5b806321d0ee701161015657806321d0ee701461024f578063259982e51461029f57806328401c10146102be575f5ffd5b806316f0115b146101ab5780631ce4c78b14610208575f5ffd5b366101a7576040517fa80433dc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5ffd5b3480156101b6575f5ffd5b506101de7f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b348015610213575f5ffd5b5061023b7f000000000000000000000000000000000000000000000000000000000000000081565b60405162ffffff90911681526020016101ff565b34801561025a575f5ffd5b5061026e610269366004612e4f565b61064b565b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020016101ff565b3480156102aa575f5ffd5b5061026e6102b9366004612e4f565b6106d4565b3480156102c9575f5ffd5b506103056102d8366004612ec6565b60026020525f9081526040902054600f81810b917001000000000000000000000000000000009004900b82565b60408051600f93840b81529190920b6020820152016101ff565b34801561032a575f5ffd5b506108005b6040519081526020016101ff565b348015610348575f5ffd5b5061035c610357366004612ec6565b610751565b604080519283526020830191909152016101ff565b34801561037c575f5ffd5b506101de61096b565b348015610390575f5ffd5b505f546101de9073ffffffffffffffffffffffffffffffffffffffff1681565b3480156103bb575f5ffd5b506103cf6103ca366004612eed565b610a41565b604080517fffffffff000000000000000000000000000000000000000000000000000000009094168452602084019290925262ffffff16908201526060016101ff565b34801561041d575f5ffd5b5061043161042c366004612f47565b610ad1565b604080517fffffffff0000000000000000000000000000000000000000000000000000000090931683526020830191909152016101ff565b348015610474575f5ffd5b5061026e610483366004612fe3565b610b61565b348015610493575f5ffd5b506101de7f000000000000000000000000000000000000000000000000000000000000000081565b3480156104c6575f5ffd5b506104da6104d536600461303a565b610be8565b604080517fffffffff000000000000000000000000000000000000000000000000000000009093168352600f9190910b6020830152016101ff565b348015610520575f5ffd5b5061026e61052f3660046130bb565b610c76565b34801561053f575f5ffd5b50604080516101c0810182525f60208201819052606082018190526080820181905260a0820181905260e0820181905261010082018190526101208201819052610160820181905261018082018190526101a0820152600160c0820181905261014082018190528082528183015290516101ff9190613115565b3480156105c4575f5ffd5b5061032f6105d3366004613243565b610cff565b3480156105e3575f5ffd5b506101de7f000000000000000000000000000000000000000000000000000000000000000081565b348015610616575f5ffd5b5061026e610625366004613275565b610d20565b348015610635575f5ffd5b5061063e610d9b565b6040516101ff91906132bc565b5f3373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016146106bb576040517fae18210a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6106c88686868686610e27565b90505b95945050505050565b5f3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610744576040517fae18210a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6106c88686868686610e5a565b5f818152600260209081526040808320815180830190925254600f81810b808452700100000000000000000000000000000000909204900b9282019290925282911580156107a457506020810151600f0b155b156107db576040517f0afa7ee800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80516040517f4903b0d10000000000000000000000000000000000000000000000000000000081526fffffffffffffffffffffffffffffffff90911660048201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1690634903b0d190602401602060405180830381865afa158015610878573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061089c919061330f565b60208201516040517f4903b0d10000000000000000000000000000000000000000000000000000000081526fffffffffffffffffffffffffffffffff909116600482015290935073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001690634903b0d190602401602060405180830381865afa15801561093f573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610963919061330f565b915050915091565b5f5f6109967f0000000000000000000000000000000000000000000000000000000000000000610e8d565b5f5490915073ffffffffffffffffffffffffffffffffffffffff808316911614610a24575f80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8316908117825560405190917f9aafce815f6249ca174c3adc0232e8758909994867884013369549fbe000d51791a25b50505f5473ffffffffffffffffffffffffffffffffffffffff1690565b5f80803373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610ab3576040517fae18210a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ac08888888888610fd6565b925092509250955095509592505050565b5f803373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610b42576040517fae18210a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610b5189898989898989611009565b9150915097509795505050505050565b5f3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610bd1576040517fae18210a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610bdd85858585610e27565b90505b949350505050565b5f803373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610c59576040517fae18210a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610c67888888888888611009565b91509150965096945050505050565b5f3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610ce6576040517fae18210a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610cf4878787878787610e27565b979650505050505050565b5f610d16848484610d1188888861103d565b611390565b90505b9392505050565b5f3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610d90576040517fae18210a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610d1684848461145b565b60018054610da890613326565b80601f0160208091040260200160405190810160405280929190818152602001828054610dd490613326565b8015610e1f5780601f10610df657610100808354040283529160200191610e1f565b820191905f5260205f20905b815481529060010190602001808311610e0257829003601f168201915b505050505081565b5f6040517f0a85dc2900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f6040517f78895c1300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f8273ffffffffffffffffffffffffffffffffffffffff1663f02de3b26040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ed8573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610efc9190613371565b905073ffffffffffffffffffffffffffffffffffffffff81161580610f36575073ffffffffffffffffffffffffffffffffffffffff81163b155b15610f4357505f92915050565b8073ffffffffffffffffffffffffffffffffffffffff1663e0ef2b4b6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610fc8575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201909252610fc591810190613371565b60015b15610fd05791505b50919050565b5f5f5f5f5f610fe58989611a3f565b91509150610ff68a8a8a8585611af2565b9450945094505050955095509592505050565b5f5f6040517f0a85dc2900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f818152600260205260408120818412156111b257841561114d57805473ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001690635e0d443f90600f81810b917001000000000000000000000000000000009004900b6110bd886133b9565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b168152600f93840b60048201529190920b60248201526044810191909152606401602060405180830381865afa158015611122573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611146919061330f565b9150611388565b805473ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001690635e0d443f907001000000000000000000000000000000008104600f90810b91900b6110bd886133b9565b835f6111bd82611cab565b6111c790836133ef565b905086156112ac5782546040517f67df02ca000000000000000000000000000000000000000000000000000000008152600f82810b600483015270010000000000000000000000000000000090920490910b6024820152604481018290527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906367df02ca90606401602060405180830381865afa158015611281573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906112a5919061330f565b9350611385565b82546040517f67df02ca0000000000000000000000000000000000000000000000000000000081527001000000000000000000000000000000008204600f90810b60048301529190910b6024820152604481018290527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906367df02ca90606401602060405180830381865afa15801561135e573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611382919061330f565b93505b50505b509392505050565b5f5f6113bd7f00000000000000000000000000000000000000000000000000000000000000008786611cd1565b90508062ffffff165f036113d45782915050610be0565b5f5473ffffffffffffffffffffffffffffffffffffffff166113fa576113f861096b565b505b5f5473ffffffffffffffffffffffffffffffffffffffff1661141f5782915050610be0565b5f8086129061142f838387611d41565b9050816114455761144081866133ef565b61144f565b61144f8186613402565b98975050505050505050565b6040517fe4d332a900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000811660048301525f917f00000000000000000000000000000000000000000000000000000000000000009091169063e4d332a990602401602060405180830381865afa158015611509573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061152d9190613415565b15611564576040517f57fa586900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517f940494f100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000811660048301525f917f00000000000000000000000000000000000000000000000000000000000000009091169063940494f190602401602060405180830381865afa158015611612573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611636919061330f565b90505f808080805b85811015611795576040517fc6610657000000000000000000000000000000000000000000000000000000008152600481018290525f907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063c661065790602401602060405180830381865afa1580156116d1573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906116f59190613371565b905061170460208b018b613430565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611742578193506001955061178c565b61175260408b0160208c01613430565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361178c57819250600194505b5060010161163e565b50831580156117a2575082155b1561181b576117b46020890189613430565b6117c460408a0160208b01613430565b6040517f97956d6e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9283166004820152911660248201526044015b60405180910390fd5b836118785761182d6020890189613430565b6040517f8466f04600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091166004820152602401611812565b8261188d5761182d6040890160208a01613430565b60408051808201909152600f83810b825282900b602082015260025f6118c26118bb368d90038d018d61345d565b60a0902090565b81526020808201929092526040015f208251928201516fffffffffffffffffffffffffffffffff90811670010000000000000000000000000000000002931692909217909155611979907f0000000000000000000000000000000000000000000000000000000000000000907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9061195c908c018c613430565b73ffffffffffffffffffffffffffffffffffffffff169190611d7e565b6119ce7f00000000000000000000000000000000000000000000000000000000000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff61195c60408c0160208d01613430565b6119e06118bb368a90038a018a61345d565b6040517fe4e250d624b5ed2f65699d87988884c47eac735ffb1dcccead084c5254b14373905f90a2611a1061096b565b507fdc98354e000000000000000000000000000000000000000000000000000000009998505050505050505050565b5f8080611a4f6020850185613510565b611a6557611a606020860186613430565b611a75565b611a756040860160208701613430565b90505f611a856020860186613510565b611a9e57611a996040870160208801613430565b611aab565b611aab6020870187613430565b90505f8080611acd85858a611ac86118bb368f90038f018f61345d565b611e49565b92509250925080611ae357611ae3853085612084565b509450925050505b9250929050565b5f5f5f5f611b0786865f8a6020013512612276565b90505f611b1760208901356133b9565b90505f611b627f0000000000000000000000000000000000000000000000000000000000000000611b4b60208c018c613510565b611b5d6118bb368f90038f018f61345d565b611cd1565b9050611b917f00000000000000000000000000000000000000000000000000000000000000008b8b8685612292565b611b9b908461352b565b92505f896020013512611bb457611bb187613579565b91505b5f8060208b018035821390611bc9908d613510565b151503611be15783600f0b915084600f0b9050611bee565b84600f0b915083600f0b90505b73ffffffffffffffffffffffffffffffffffffffff8d16611c176118bb368f90038f018f61345d565b604080518581526020810185905262ffffff87168183015290517f6150bb53cd76c5702d6074239fc7b6c2a5495d339eb122fdc06252f3efdbbc1b9181900360600190a37f575e24b4000000000000000000000000000000000000000000000000000000006fffffffffffffffffffffffffffffffff8616608086901b17909e909d505f9c509a5050505050505050505050565b5f80611cba620f4240846135e2565b905060148111611ccb576014610d19565b92915050565b5f80611cf373ffffffffffffffffffffffffffffffffffffffff861684612461565b509250505083611d0b57600c81901c610fff16611d11565b610fff81165b61ffff1691506106cb7f00000000000000000000000000000000000000000000000000000000000000008361361a565b5f8215611d6257611d5b828562ffffff16620f4240612546565b9050610d19565b611d5b8262ffffff8616611d7981620f4240613402565b612546565b611d8a8383835f612576565b611e4457611d9b83835f6001612576565b611de9576040517f5274afe700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84166004820152602401611812565b611df68383836001612576565b611e44576040517f5274afe700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84166004820152602401611812565b505050565b5f8181526002602090815260408220829182919082908190611e6d90890189613510565b15611e975750508054600f81810b917001000000000000000000000000000000009004900b611eb8565b505080547001000000000000000000000000000000008104600f90810b91900b5b5f88602001351215611ed857611ed160208901356133b9565b9450611fbb565b602088013573ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000166367df02ca8484611f2485611cab565b611f2e90866133ef565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b168152600f93840b60048201529190920b60248201526044810191909152606401602060405180830381865afa158015611f93573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611fb7919061330f565b9550505b6040517f0b0d9c0900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8a81166004830152306024830152604482018790527f00000000000000000000000000000000000000000000000000000000000000001690630b0d9c09906064015f604051808303815f87803b15801561204e575f5ffd5b505af1158015612060573d5f5f3e3d5ffd5b505050506120718583838d8c6125fe565b9550600193505050509450945094915050565b805f0361209057505050565b6040517fa584119400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063a5841194906024015f604051808303815f87803b158015612116575f5ffd5b505af1158015612128573d5f5f3e3d5ffd5b5050505073ffffffffffffffffffffffffffffffffffffffff83166121dd577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166311da60b4826040518263ffffffff1660e01b815260040160206040518083038185885af11580156121b2573d5f5f3e3d5ffd5b50505050506040513d601f19601f820116820180604052508101906121d7919061330f565b50505050565b6121e883838361294c565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166311da60b46040518163ffffffff1660e01b81526004016020604051808303815f875af1158015612252573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906121d7919061330f565b5f5f821561228957508261114681613579565b50929392505050565b5f8162ffffff165f036122a657505f6106cb565b5f5473ffffffffffffffffffffffffffffffffffffffff166122cc576122ca61096b565b505b5f5473ffffffffffffffffffffffffffffffffffffffff166122ef57505f6106cb565b5f6020850180358213919082906123069088613510565b15151461231f5761231a6020880188613430565b61232f565b61232f6040880160208901613430565b90505f5f86600f0b12612342578561234b565b61234b86613579565b6fffffffffffffffffffffffffffffffff1690505f612371865f8a602001351284611d41565b5f5460405182815291925073ffffffffffffffffffffffffffffffffffffffff858116929116907fdb249cf7a102711dda1beaba415bb011ee0e1402c7f67617236fed5739235d6c9060200160405180910390a35f546040517f0b0d9c0900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8581166004830152918216602482015260448101839052908b1690630b0d9c09906064015f604051808303815f87803b15801561243d575f5ffd5b505af115801561244f573d5f5f3e3d5ffd5b50929c9b505050505050505050505050565b5f5f5f5f5f61246f866129ec565b6040517f1e2eaeaf000000000000000000000000000000000000000000000000000000008152600481018290529091505f9073ffffffffffffffffffffffffffffffffffffffff891690631e2eaeaf90602401602060405180830381865afa1580156124dd573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612501919061330f565b905073ffffffffffffffffffffffffffffffffffffffff811695508060a01c60020b945062ffffff8160b81c16935062ffffff8160d01c169250505092959194509250565b5f612552848484612a28565b90508180612562576125626135b5565b83850915610d195760010180610d19575f5ffd5b6040517f095ea7b3000000000000000000000000000000000000000000000000000000005f81815273ffffffffffffffffffffffffffffffffffffffff8616600452602485905291602083604481808b5af1925060015f511483166125f25783831516156125e6573d5f823e3d81fd5b5f873b113d1516831692505b60405250949350505050565b6040517fa584119400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83811660048301525f917f00000000000000000000000000000000000000000000000000000000000000009091169063a5841194906024015f604051808303815f87803b158015612688575f5ffd5b505af115801561269a573d5f5f3e3d5ffd5b505050505f826020013513156127c3576040517fddc1f59d000000000000000000000000000000000000000000000000000000008152600f86810b600483015285900b6024820152604481018790525f60648201523060848201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063ddc1f59d9060a4016020604051808303815f875af1158015612752573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612776919061330f565b505060208101356127be73ffffffffffffffffffffffffffffffffffffffff84167f000000000000000000000000000000000000000000000000000000000000000083612ae3565b6128b4565b6040517fddc1f59d000000000000000000000000000000000000000000000000000000008152600f86810b600483015285900b6024820152604481018790525f606482015273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000811660848301527f0000000000000000000000000000000000000000000000000000000000000000169063ddc1f59d9060a4016020604051808303815f875af115801561288d573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906128b1919061330f565b90505b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166311da60b46040518163ffffffff1660e01b81526004016020604051808303815f875af115801561291e573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612942919061330f565b5095945050505050565b3073ffffffffffffffffffffffffffffffffffffffff8316036129aa57611e4473ffffffffffffffffffffffffffffffffffffffff84167f000000000000000000000000000000000000000000000000000000000000000083612ae3565b611e4473ffffffffffffffffffffffffffffffffffffffff8416837f000000000000000000000000000000000000000000000000000000000000000084612c00565b6040515f90612a0b908390600690602001918252602082015260400190565b604051602081830303815290604052805190602001209050919050565b5f838302817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff85870982811083820303915050808411612a66575f5ffd5b805f03612a7857508290049050610d19565b5f848688095f868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010186841190950394909402919094039290920491909117919091029150509392505050565b5f73ffffffffffffffffffffffffffffffffffffffff8416612b3e575f5f5f5f85875af1905080612b3957612b39835f7ff4b3b1bc00000000000000000000000000000000000000000000000000000000612c5c565b6121d7565b6040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8416600482015282602482015260205f6044835f895af13d15601f3d1160015f511416171691505f81525f60208201525f604082015250806121d7576121d7847fa9059cbb000000000000000000000000000000000000000000000000000000007ff27f64e400000000000000000000000000000000000000000000000000000000612c5c565b612c0e848484846001612d2a565b6121d7576040517f5274afe700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85166004820152602401611812565b6040517f90bfb8650000000000000000000000000000000000000000000000000000000080825273ffffffffffffffffffffffffffffffffffffffff851660048301527fffffffff0000000000000000000000000000000000000000000000000000000084166024830152608060448301526020601f3d018190040260a0810160648401523d608484015290913d5f60a483013e60048260a4018201527fffffffff0000000000000000000000000000000000000000000000000000000084168260c4018201528160e40181fd5b6040517f23b872dd000000000000000000000000000000000000000000000000000000005f81815273ffffffffffffffffffffffffffffffffffffffff8781166004528616602452604485905291602083606481808c5af1925060015f51148316612dac578383151615612da0573d5f823e3d81fd5b5f883b113d1516831692505b604052505f60605295945050505050565b73ffffffffffffffffffffffffffffffffffffffff81168114612dde575f5ffd5b50565b8035612dec81612dbd565b919050565b5f60a08284031215610fd0575f5ffd5b5f60808284031215610fd0575f5ffd5b5f5f83601f840112612e21575f5ffd5b50813567ffffffffffffffff811115612e38575f5ffd5b602083019150836020828501011115611aeb575f5ffd5b5f5f5f5f5f6101608688031215612e64575f5ffd5b8535612e6f81612dbd565b9450612e7e8760208801612df1565b9350612e8d8760c08801612e01565b925061014086013567ffffffffffffffff811115612ea9575f5ffd5b612eb588828901612e11565b969995985093965092949392505050565b5f60208284031215612ed6575f5ffd5b5035919050565b5f60608284031215610fd0575f5ffd5b5f5f5f5f5f6101408688031215612f02575f5ffd5b8535612f0d81612dbd565b9450612f1c8760208801612df1565b9350612f2b8760c08801612edd565b925061012086013567ffffffffffffffff811115612ea9575f5ffd5b5f5f5f5f5f5f5f6101a0888a031215612f5e575f5ffd5b8735612f6981612dbd565b9650612f788960208a01612df1565b9550612f878960c08a01612e01565b94506101408801359350610160880135925061018088013567ffffffffffffffff811115612fb3575f5ffd5b612fbf8a828b01612e11565b989b979a50959850939692959293505050565b8035600281900b8114612dec575f5ffd5b5f5f5f5f6101008587031215612ff7575f5ffd5b843561300281612dbd565b93506130118660208701612df1565b925060c085013561302181612dbd565b915061302f60e08601612fd2565b905092959194509250565b5f5f5f5f5f5f6101608789031215613050575f5ffd5b863561305b81612dbd565b955061306a8860208901612df1565b94506130798860c08901612edd565b9350610120870135925061014087013567ffffffffffffffff81111561309d575f5ffd5b6130a989828a01612e11565b979a9699509497509295939492505050565b5f5f5f5f5f5f61012087890312156130d1575f5ffd5b86356130dc81612dbd565b95506130eb8860208901612df1565b945060c0870135935060e0870135925061010087013567ffffffffffffffff81111561309d575f5ffd5b8151151581526101c081016020830151613133602084018215159052565b506040830151613147604084018215159052565b50606083015161315b606084018215159052565b50608083015161316f608084018215159052565b5060a083015161318360a084018215159052565b5060c083015161319760c084018215159052565b5060e08301516131ab60e084018215159052565b506101008301516131c161010084018215159052565b506101208301516131d761012084018215159052565b506101408301516131ed61014084018215159052565b5061016083015161320361016084018215159052565b5061018083015161321961018084018215159052565b506101a083015161322f6101a084018215159052565b5092915050565b8015158114612dde575f5ffd5b5f5f5f60608486031215613255575f5ffd5b833561326081613236565b95602085013595506040909401359392505050565b5f5f5f60e08486031215613287575f5ffd5b833561329281612dbd565b92506132a18560208601612df1565b915060c08401356132b181612dbd565b809150509250925092565b602081525f82518060208401528060208501604085015e5f6040828501015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011684010191505092915050565b5f6020828403121561331f575f5ffd5b5051919050565b600181811c9082168061333a57607f821691505b602082108103610fd0577f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f60208284031215613381575f5ffd5b8151610d1981612dbd565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f7f800000000000000000000000000000000000000000000000000000000000000082036133e9576133e961338c565b505f0390565b80820180821115611ccb57611ccb61338c565b81810381811115611ccb57611ccb61338c565b5f60208284031215613425575f5ffd5b8151610d1981613236565b5f60208284031215613440575f5ffd5b8135610d1981612dbd565b803562ffffff81168114612dec575f5ffd5b5f60a082840312801561346e575f5ffd5b5060405160a0810167ffffffffffffffff811182821017156134b7577f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6040526134c383612de1565b81526134d160208401612de1565b60208201526134e26040840161344b565b60408201526134f360608401612fd2565b606082015261350460808401612de1565b60808201529392505050565b5f60208284031215613520575f5ffd5b8135610d1981613236565b600f81810b9083900b016f7fffffffffffffffffffffffffffffff81137fffffffffffffffffffffffffffffffff8000000000000000000000000000000082121715611ccb57611ccb61338c565b5f81600f0b7fffffffffffffffffffffffffffffffff8000000000000000000000000000000081036135ad576135ad61338c565b5f0392915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f82613615577f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b500490565b62ffffff818116838216029081169081811461322f5761322f61338c56fea164736f6c634300081d000a","sourceMap":"1101:6937:43:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8001:28;;;;;;;;;;;;;;1101:6937;;;;1280:40;;;;;;;;;;;;;;;;;;217:42:48;205:55;;;187:74;;175:2;160:18;1280:40:43;;;;;;;;980:45:42;;;;;;;;;;;;;;;;;;446:8:48;434:21;;;416:40;;404:2;389:18;980:45:42;272:190:48;3116:290:47;;;;;;;;;;-1:-1:-1;3116:290:47;;;;;:::i;:::-;;:::i;:::-;;;2459:66:48;2447:79;;;2429:98;;2417:2;2402:18;3116:290:47;2285:248:48;2583:284:47;;;;;;;;;;-1:-1:-1;2583:284:47;;;;;:::i;:::-;;:::i;1763:52:43:-;;;;;;;;;;-1:-1:-1;1763:52:43;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;2995:2:48;2984:22;;;2966:41;;3043:22;;;;3038:2;3023:18;;3016:50;2939:18;1763:52:43;2796:276:48;4623:108:41;;;;;;;;;;-1:-1:-1;4717:7:41;4623:108;;;3223:25:48;;;3211:2;3196:18;4623:108:41;3077:177:48;3394:420:43;;;;;;;;;;-1:-1:-1;3394:420:43;;;;;:::i;:::-;;:::i;:::-;;;;3433:25:48;;;3489:2;3474:18;;3467:34;;;;3406:18;3394:420:43;3259:248:48;2355:284:41;;;;;;;;;;;;;:::i;951:23:42:-;;;;;;;;;;-1:-1:-1;951:23:42;;;;;;;;5055:272:47;;;;;;;;;;-1:-1:-1;5055:272:47;;;;;:::i;:::-;;:::i;:::-;;;;4979:66:48;4967:79;;;4949:98;;5078:2;5063:18;;5056:34;;;;5138:8;5126:21;5106:18;;;5099:49;4937:2;4922:18;5055:272:47;4716:438:48;4352:384:47;;;;;;;;;;-1:-1:-1;4352:384:47;;;;;:::i;:::-;;:::i;:::-;;;;6533:66:48;6521:79;;;6503:98;;6632:2;6617:18;;6610:34;;;;6476:18;4352:384:47;6299:351:48;2157:240:47;;;;;;;;;;-1:-1:-1;2157:240:47;;;;;:::i;:::-;;:::i;1405:55:43:-;;;;;;;;;;;;;;;5582:298:47;;;;;;;;;;-1:-1:-1;5582:298:47;;;;;:::i;:::-;;:::i;:::-;;;;8841:66:48;8829:79;;;8811:98;;8956:2;8945:22;;;;8940:2;8925:18;;8918:50;8784:18;5582:298:47;8641:333:48;6131:285:47;;;;;;;;;;-1:-1:-1;6131:285:47;;;;;:::i;:::-;;:::i;4292:286:41:-;;;;;;;;;;-1:-1:-1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4425:4:41;-1:-1:-1;;;4400:29:41;;;-1:-1:-1;;;4439:40:41;;;4489:35;;;-1:-1:-1;;;4534:37:41;4292:286;;;;-1:-1:-1;4292:286:41;:::i;2830:233::-;;;;;;;;;;-1:-1:-1;2830:233:41;;;;;:::i;:::-;;:::i;411:41:38:-;;;;;;;;;;;;;;;1753:224:47;;;;;;;;;;-1:-1:-1;1753:224:47;;;;;:::i;:::-;;:::i;1978:35:41:-;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;3116:290:47:-;3321:6;650:10:38;:34;672:11;650:34;;646:63;;693:16;;;;;;;;;;;;;;646:63;3346:53:47::1;3369:6;3377:3;3382:6;3390:8;;3346:22;:53::i;:::-;3339:60;;719:1:38;3116:290:47::0;;;;;;;:::o;2583:284::-;2785:6;650:10:38;:34;672:11;650:34;;646:63;;693:16;;;;;;;;;;;;;;646:63;2810:50:47::1;2830:6;2838:3;2843:6;2851:8;;2810:19;:50::i;3394:420:43:-:0;3473:15;3544:25;;;:17;:25;;;;;;;;3517:52;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3473:15;;3583:25;:54;;;;-1:-1:-1;3612:20:43;;;;:25;;;3583:54;3579:82;;;3646:15;;;;;;;;;;;;;;3579:82;3711:20;;3681:53;;;;;3695:38;;;;3681:53;;;3223:25:48;3681:4:43;:13;;;;;3196:18:48;;3681:53:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;3784:20;;;;3754:53;;;;;3768:38;;;;3754:53;;;3223:25:48;3671:63:43;;-1:-1:-1;3754:13:43;:4;:13;;;;3196:18:48;;3754:53:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;3744:63;;3507:307;3394:420;;;:::o;2355:284:41:-;2412:7;2431:19;2453:25;2466:11;2453:12;:25::i;:::-;2492:8;;2431:47;;-1:-1:-1;2492:23:41;;;;:8;;:23;2488:120;;2531:8;:22;;;;;;;;;;;;2572:25;;2531:22;;2572:25;;;2488:120;-1:-1:-1;;2624:8:41;;;;;2355:284::o;5055:272:47:-;5224:6;;;650:10:38;:34;672:11;650:34;;646:63;;693:16;;;;;;;;;;;;;;646:63;5278:42:47::1;5290:6;5298:3;5303:6;5311:8;;5278:11;:42::i;:::-;5271:49;;;;;;5055:272:::0;;;;;;;;;:::o;4352:384::-;4618:6;;650:10:38;:34;672:11;650:34;;646:63;;693:16;;;;;;;;;;;;;;646:63;4657:72:47::1;4679:6;4687:3;4692:6;4700:5;4707:11;4720:8;;4657:21;:72::i;:::-;4650:79;;;;4352:384:::0;;;;;;;;;;:::o;2157:240::-;2312:6;650:10:38;:34;672:11;650:34;;646:63;;693:16;;;;;;;;;;;;;;646:63;2341:49:47::1;2358:6;2366:3;2371:12;2385:4;2341:16;:49::i;:::-;2334:56;;719:1:38;2157:240:47::0;;;;;;:::o;5582:298::-;5792:6;;650:10:38;:34;672:11;650:34;;646:63;;693:16;;;;;;;;;;;;;;646:63;5825:48:47::1;5836:6;5844:3;5849:6;5857:5;5864:8;;5825:10;:48::i;:::-;5818:55;;;;5582:298:::0;;;;;;;;;:::o;6131:285::-;6330:6;650:10:38;:34;672:11;650:34;;646:63;;693:16;;;;;;;;;;;;;;646:63;6355:54:47::1;6369:6;6377:3;6382:7;6391;6400:8;;6355:13;:54::i;:::-;6348:61:::0;6131:285;-1:-1:-1;;;;;;;6131:285:47:o;2830:233:41:-;2918:25;2962:94;2974:9;2985:15;3002:6;3010:45;3020:9;3031:15;3048:6;3010:9;:45::i;:::-;2962:11;:94::i;:::-;2955:101;;2830:233;;;;;;:::o;1753:224:47:-;1897:6;650:10:38;:34;672:11;650:34;;646:63;;693:16;;;;;;;;;;;;;;646:63;1926:44:47::1;1944:6;1952:3;1957:12;1926:17;:44::i;1978:35:41:-:0;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;3412:213:47:-;3569:6;3598:20;;;;;;;;;;;;;;6698:225:41;6866:6;6895:21;;;;;;;;;;;;;;4466:505:42;4537:18;4567:33;4603:11;:33;;;:35;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;4567:71;-1:-1:-1;4652:39:42;;;;;:85;;-1:-1:-1;4695:37:42;;;;:42;4652:85;4648:108;;;-1:-1:-1;4754:1:42;;4466:505;-1:-1:-1;;4466:505:42:o;4648:108::-;4784:25;4770:50;;;:52;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4770:52:42;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;4766:199;;;4880:11;-1:-1:-1;4766:199:42;4557:414;4466:505;;;:::o;6929:367:41:-;7099:6;7107:15;7124:6;7147:16;7165:17;7186:28;7202:3;7207:6;7186:15;:28::i;:::-;7146:68;;;;7231:58;7248:6;7256:3;7261:6;7269:8;7279:9;7231:16;:58::i;:::-;7224:65;;;;;;;;6929:367;;;;;;;;;:::o;4742:280:47:-;4956:6;4964:12;4995:20;;;;;;;;;;;;;;2335:1014:43;2473:25;2542;;;:17;:25;;;;;2581:19;;;2577:766;;;2620:9;2616:291;;;2681:20;;2669:11;:4;:11;;;;2681:20;;;;;2703;;;;;2733:16;2734:15;2733:16;:::i;:::-;2669:82;;;;;;;;;;15187:2:48;15176:22;;;2669:82:43;;;15158:41:48;15235:22;;;;15215:18;;;15208:50;15274:18;;;15267:34;;;;15131:18;;2669:82:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;2649:102;;2577:766;;2616:291;2822:20;;2810:11;:4;:11;;;;2822:20;;;;;;;;2844;;2874:16;2875:15;2874:16;:::i;2577:766::-;2962:15;2937:14;3028:18;2962:15;3028:10;:18::i;:::-;3019:27;;:6;:27;:::i;:::-;2992:54;;3064:9;3060:273;;;3125:20;;3113:73;;;;;3125:20;;;;3113:73;;;15158:41:48;3147:20:43;;;;;;;15215:18:48;;;15208:50;15274:18;;;15267:34;;;3113:4:43;:11;;;;;15131:18:48;;3113:73:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;3093:93;;3060:273;;;3257:20;;3245:73;;;;;3257:20;;;;;;;3245:73;;;15158:41:48;3279:20:43;;;;15215:18:48;;;15208:50;15274:18;;;15267:34;;;3245:4:43;:11;;;;;15131:18:48;;3245:73:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;3225:93;;3060:273;2923:420;;2577:766;2504:845;2335:1014;;;;;:::o;3603:654:41:-;3740:7;3763:18;3784:47;3800:11;3813:9;3824:6;3784:15;:47::i;:::-;3763:68;;3846:11;:16;;3861:1;3846:16;3842:46;;3871:17;3864:24;;;;;3842:46;3923:1;3903:8;:22;:8;3899:42;;3927:14;:12;:14::i;:::-;;3899:42;3975:1;3955:8;:22;:8;3951:52;;3986:17;3979:24;;;;;3951:52;4014:17;4034:19;;;;4083:73;4111:11;4034:19;4138:17;4083:27;:73::i;:::-;4063:93;;4174:12;:76;;4221:29;4241:9;4221:17;:29;:::i;:::-;4174:76;;;4189:29;4209:9;4189:17;:29;:::i;:::-;4167:83;3603:654;-1:-1:-1;;;;;;;;3603:654:41:o;3820:1574:43:-;3936:35;;;;;:20;3965:4;205:55:48;;3936:35:43;;;187:74:48;-1:-1:-1;;3936:12:43;:20;;;;;;160:18:48;;3936:35:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;3932:64;;;3980:16;;;;;;;;;;;;;;3932:64;4028:39;;;;;:24;4061:4;205:55:48;;4028:39:43;;;187:74:48;-1:-1:-1;;4028:12:43;:24;;;;;;160:18:48;;4028:39:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;4007:60;-1:-1:-1;4077:16:43;;;;;4201:401;4225:10;4221:1;:14;4201:401;;;4271:13;;;;;;;;3223:25:48;;;4256:12:43;;4271:4;:10;;;;;3196:18:48;;4271:13:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;4256:28;-1:-1:-1;4326:13:43;;;;:3;:13;:::i;:::-;4302:38;;:4;:38;;;4298:294;;4388:1;4360:31;;4423:4;4409:18;;4298:294;;;4476:13;;;;;;;;:::i;:::-;4452:38;;:4;:38;;;4448:144;;4538:1;4510:31;;4573:4;4559:18;;4448:144;-1:-1:-1;4237:3:43;;4201:401;;;;4617:11;4616:12;:28;;;;;4633:11;4632:12;4616:28;4612:145;;;4699:13;;;;:3;:13;:::i;:::-;4731;;;;;;;;:::i;:::-;4667:79;;;;;16310:42:48;16298:55;;;4667:79:43;;;16280:74:48;16390:55;;16370:18;;;16363:83;16253:18;;4667:79:43;;;;;;;;4612:145;4771:11;4766:96;;4836:13;;;;:3;:13;:::i;:::-;4805:46;;;;;217:42:48;205:55;;;4805:46:43;;;187:74:48;160:18;;4805:46:43;14:253:48;4766:96:43;4876:11;4871:96;;4941:13;;;;;;;;:::i;4871:96::-;5009:62;;;;;;;;;;;;;;;;;;;;;;4977:17;-1:-1:-1;4995:10:43;:8;;;;;;;:3;:8;:::i;:::-;515:4:34;496:24;;;271:265;4995:10:43;4977:29;;;;;;;;;;;;-1:-1:-1;4977:29:43;:94;;;;;;;;;;;;;;;;;;;;;5082:85;;5142:4;;5149:17;;5105:13;;;;:3;:13;:::i;:::-;5082:51;;;:85;:51;:85::i;:::-;5177;5237:4;5244:17;5200:13;;;;;;;;:::i;5177:85::-;5303:10;:8;;;;;;;:3;:8;:::i;:10::-;5278:36;;;;;;;5324:14;:12;:14::i;:::-;-1:-1:-1;5355:32:43;;3820:1574;-1:-1:-1;;;;;;;;;3820:1574:43:o;9690:620:41:-;9799:16;;;9876:17;;;;:6;:17;:::i;:::-;:49;;9912:13;;;;:3;:13;:::i;:::-;9876:49;;;9896:13;;;;;;;;:::i;:::-;9850:75;-1:-1:-1;9935:21:41;9959:17;;;;:6;:17;:::i;:::-;:49;;9995:13;;;;;;;;:::i;:::-;9959:49;;;9979:13;;;;:3;:13;:::i;:::-;9935:73;-1:-1:-1;10020:20:41;;;10093:62;10106:14;9935:73;10136:6;10144:10;:8;;;;;;;:3;:8;:::i;:10::-;10093:12;:62::i;:::-;10019:136;;;;;;10171:10;10166:94;;10197:52;10205:14;10229:4;10236:12;10197:7;:52::i;:::-;-1:-1:-1;10278:10:41;-1:-1:-1;10290:12:41;-1:-1:-1;;;9690:620:41;;;;;;:::o;7866:1323::-;8059:6;8067:15;8084:6;8102:23;8128:64;8144:8;8154:9;8190:1;8165:6;:22;;;:26;8128:15;:64::i;:::-;8102:90;-1:-1:-1;8202:16:41;8228:23;8229:22;;;;8228:23;:::i;:::-;8202:50;-1:-1:-1;8278:18:41;8299:59;8315:11;8328:17;;;;:6;:17;:::i;:::-;8347:10;:8;;;;;;;:3;:8;:::i;:10::-;8299:15;:59::i;:::-;8278:80;;8388:78;8410:11;8423:3;8428:6;8436:16;8454:11;8388:21;:78::i;:::-;8368:98;;;;:::i;:::-;;;8507:1;8481:6;:22;;;:27;8477:249;;8688:27;8704:9;8688:27;:::i;:::-;8676:39;;8477:249;8736:14;;8809:22;;;;;:26;-1:-1:-1;8809:26:41;8788:17;;8809:6;8788:17;:::i;:::-;:47;;;8784:227;;8861:9;8851:19;;;;8894:16;8884:26;;;;8784:227;;;8951:16;8941:26;;;;8991:9;8981:19;;;;8784:227;9026:59;;;9035:10;:8;;;;;;;:3;:8;:::i;:10::-;9026:59;;;18516:25:48;;;18572:2;18557:18;;18550:34;;;18632:8;18620:21;;18600:18;;;18593:49;9026:59:41;;;;;;;18504:2:48;9026:59:41;;;9104:26;540:19:32;536:42;;548:3;510:24;;;507:72;9096:86:41;;;;-1:-1:-1;9180:1:41;;-1:-1:-1;7866:1323:41;-1:-1:-1;;;;;;;;;;;7866:1323:41:o;7743:199:43:-;7802:7;;7838:25;1566:9;7838:6;:25;:::i;:::-;7821:42;;1513:2;7880:6;:26;:55;;1513:2;7880:55;;;7909:6;7873:62;-1:-1:-1;;7743:199:43:o;4021:439:42:-;4150:18;;4214:28;:20;;;4235:6;4214:20;:28::i;:::-;4184:58;;;;;4266:9;:141;;871:2:27;863:10;;;;;4266:141:42;;;750:5:27;743:12;;4290:51:42;4252:155;;;-1:-1:-1;4417:36:42;4432:21;4252:155;4417:36;:::i;3200:740::-;3350:7;3377:12;3373:561;;;3412:94;3438:17;3457:11;3412:94;;633:9:27;3412:25:42;:94::i;:::-;3405:101;;;;3373:561;3785:138;3828:17;3785:138;;;3860:49;3785:138;633:9:27;3860:49:42;:::i;:::-;3785:25;:138::i;5098:367:4:-;5190:42;5203:5;5210:7;5219:5;5226;5190:12;:42::i;:::-;5185:274;;5253:37;5266:5;5273:7;5282:1;5285:4;5253:12;:37::i;:::-;5248:91;;5299:40;;;;;217:42:48;205:55;;5299:40:4;;;187:74:48;160:18;;5299:40:4;14:253:48;5248:91:4;5358:41;5371:5;5378:7;5387:5;5394:4;5358:12;:41::i;:::-;5353:95;;5408:40;;;;;217:42:48;205:55;;5408:40:4;;;187:74:48;160:18;;5408:40:4;14:253:48;5353:95:4;5098:367;;;:::o;5439:1262:43:-;5603:20;5704:25;;;:17;:25;;;;;;;5603:20;;;;5704:25;5603:20;;;;5802:17;;;;:6;:17;:::i;:::-;5798:249;;;-1:-1:-1;;5850:20:43;;;;;;;5900;;;;;5798:249;;;-1:-1:-1;;5966:20:43;;;;;;;;;;6016;;5798:249;6086:1;6061:6;:22;;;:26;6057:385;;;6148:23;6149:22;;;;6148:23;:::i;:::-;6127:45;;6057:385;;;6312:22;;;;6362:11;:4;:11;;6374:12;6388:13;6412:18;6312:22;6412:10;:18::i;:::-;6403:27;;:6;:27;:::i;:::-;6362:69;;;;;;;;;;15187:2:48;15176:22;;;6362:69:43;;;15158:41:48;15235:22;;;;15215:18;;;15208:50;15274:18;;;15267:34;;;;15131:18;;6362:69:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;6349:82;;6189:253;6057:385;6452:57;;;;;:16;19613:55:48;;;6452:57:43;;;19595:74:48;6491:4:43;19685:18:48;;;19678:83;19777:18;;;19770:34;;;6452:11:43;:16;;;;19568:18:48;;6452:57:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6535:76;6547:10;6559:12;6573:13;6588:14;6604:6;6535:11;:76::i;:::-;6520:91;;6634:4;6621:17;;6649:45;;;5439:1262;;;;;;;;:::o;1788:346:37:-;1878:6;1888:1;1878:11;1874:24;;1788:346;;;:::o;1874:24::-;1908:26;;;;;:16;205:55:48;;;1908:26:37;;;187:74:48;1908:11:37;:16;;;;160:18:48;;1908:26:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;1948:22:37;;;1944:184;;1988:11;:18;;;2014:6;1988:35;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;5098:367:4;;;:::o;1944:184:37:-;2054:29;2059:8;2069:5;2076:6;2054:4;:29::i;:::-;2097:11;:18;;;:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;9195:489:41:-;9321:23;9360:19;9393:10;9389:289;;;-1:-1:-1;9457:9:41;9499:29;9457:9;9499:29;:::i;9389:289::-;-1:-1:-1;9598:8:41;;9195:489;-1:-1:-1;;;9195:489:41:o;1998:1196:42:-;2214:6;2236:11;:16;;2251:1;2236:16;2232:30;;-1:-1:-1;2261:1:42;2254:8;;2232:30;2375:1;2355:8;:22;:8;2351:42;;2379:14;:12;:14::i;:::-;;2351:42;2427:1;2407:8;:22;:8;2403:36;;-1:-1:-1;2438:1:42;2431:8;;2403:36;2450:17;2470:22;;;;;:26;-1:-1:-1;2470:26:42;2450:17;2470:26;;2622:17;;2470:6;2622:17;:::i;:::-;:33;;;:65;;2674:13;;;;:3;:13;:::i;:::-;2622:65;;;2658:13;;;;;;;;:::i;:::-;2591:96;;2698:22;2758:1;2739:16;:20;;;:59;;2782:16;2739:59;;;2762:17;2763:16;2762:17;:::i;:::-;2723:77;;2698:102;;2810:25;2838:84;2866:11;2904:1;2879:6;:22;;;:26;2907:14;2838:27;:84::i;:::-;3010:8;;2988:71;;3223:25:48;;;2810:112:42;;-1:-1:-1;2988:71:42;;;;;3010:8;;;2988:71;;3211:2:48;3196:18;2988:71:42;;;;;;;3107:8;;3069:66;;;;;:16;19613:55:48;;;3069:66:42;;;19595:74:48;3107:8:42;;;19685:18:48;;;19678:83;19777:18;;;19770:34;;;3069:16:42;;;;;;19568:18:48;;3069:66:42;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3168:17:42;;1998:1196;-1:-1:-1;;;;;;;;;;;;1998:1196:42:o;1580:996:29:-;1682:20;1704:10;1716:18;1736:12;1821:17;1841:25;1859:6;1841:17;:25::i;:::-;1892:27;;;;;;;;3223:25:48;;;1821:45:29;;-1:-1:-1;1877:12:29;;1892:16;;;;;;3196:18:48;;1892:27:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1877:42;;2251;2245:4;2241:53;2225:69;;2374:4;2369:3;2365:14;2362:1;2351:29;2343:37;;2464:8;2457:4;2452:3;2448:14;2444:29;2429:44;;2551:8;2544:4;2539:3;2535:14;2531:29;2522:38;;2172:398;;1580:996;;;;;;;:::o;5164:296:19:-;5256:14;5315:25;5322:1;5325;5328:11;5315:6;:25::i;:::-;5306:34;;5371:11;5358:25;;;;;:::i;:::-;5368:1;5365;5358:25;:30;5354:90;;5416:8;;:12;5408:21;;;;;12059:1252:4;12289:4;12283:11;12199:23;12157:12;12307:22;;;12368:15;12355:29;;12349:4;12342:43;12405:4;12398:19;;;12157:12;12481:4;12157:12;12469:4;12157:12;;12453:5;12446;12441:45;12430:56;;12698:1;12691:4;12685:11;12682:18;12673:7;12669:32;12659:606;;12830:6;12820:7;12813:15;12809:28;12806:165;;;12886:16;12880:4;12875:3;12860:43;12936:16;12931:3;12924:29;12806:165;13247:1;13239:5;13227:18;13224:25;13205:16;13198:24;13194:56;13185:7;13181:70;13170:81;;12659:606;13285:4;13278:17;-1:-1:-1;12059:1252:4;;-1:-1:-1;;;;12059:1252:4:o;6707:1030:43:-;6937:32;;;;;:16;205:55:48;;;6937:32:43;;;187:74:48;6908:17:43;;6937:11;:16;;;;;;160:18:48;;6937:32:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7144:1;7119:6;:22;;;:26;7115:586;;;7254:72;;;;;20738:2:48;20727:22;;;7254:72:43;;;20709:41:48;20786:22;;;20766:18;;;20759:50;20825:18;;;20818:34;;;7309:1:43;20868:18:48;;;20861:34;7320:4:43;20911:19:48;;;20904:84;7254:4:43;:13;;;;;20681:19:48;;7254:72:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;;7360:22:43;;;;7397:78;:23;;;7429:11;7360:22;7397:23;:78::i;:::-;7115:586;;;7611:79;;;;;20738:2:48;20727:22;;;7611:79:43;;;20709:41:48;20786:22;;;20766:18;;;20759:50;20825:18;;;20818:34;;;-1:-1:-1;20868:18:48;;;20861:34;7611:13:43;7677:11;20932:55:48;;20911:19;;;20904:84;7611:4:43;:13;;;;20681:19:48;;7611:79:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;7599:91;;7115:586;7710:11;:18;;;:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;6707:1030;;;;;;;:::o;10316:307:41:-;10426:4;10409:22;;;;10405:212;;10447:44;:14;;;10470:11;10484:6;10447:14;:44::i;10405:212::-;10522:84;:47;;;10570:5;10585:11;10599:6;10522:47;:84::i;14852:160:29:-;14953:51;;14917:7;;14953:51;;14984:6;;414:1;;14953:51;;21156:19:48;;;21200:2;21191:12;;21184:28;21237:2;21228:12;;20999:247;14953:51:29;;;;;;;;;;;;;14943:62;;;;;;14936:69;;14852:160;;;:::o;741:4141:19:-;823:14;1212:5;;;823:14;1413:6;1216:1;1212;1400:20;1473:5;1469:2;1466:13;1458:5;1454:2;1450:14;1446:34;1437:43;;;1633:5;1619:11;:19;1611:28;;;;;;1720:5;1729:1;1720:10;1716:177;;-1:-1:-1;1807:23:19;;;;-1:-1:-1;1865:13:19;;1716:177;2193:17;2293:11;2290:1;2287;2280:25;2701:12;2717:15;;;2716:31;;2869:22;;;;;3776:1;3757;:15;;3756:21;;4019:17;;;4015:21;;4008:28;4081:17;;;4077:21;;4070:28;4144:17;;;4140:21;;4133:28;4207:17;;;4203:21;;4196:28;4270:17;;;4266:21;;4259:28;4334:17;;;4330:21;;;4323:28;3313:12;;;;3309:23;;;3334:1;3305:31;2454:20;;;2443:32;;;3372:12;;;;2501:21;;;;3029:16;;;;3363:21;;;;4827:11;;;;;-1:-1:-1;;741:4141:19;;;;;:::o;1472:2873:33:-;1743:12;1769:22;;;1765:2574;;1956:1;1953;1950;1947;1939:6;1935:2;1928:5;1923:35;1912:46;;2086:7;2081:127;;2113:80;2148:2;2159:1;2163:29;2113:34;:80::i;:::-;1765:2574;;;2352:4;2346:11;2488:66;2483:3;2476:79;2600:42;2596:2;2592:51;2588:1;2583:3;2579:11;2572:72;2720:6;2715:2;2710:3;2706:12;2699:28;3649:2;3646:1;3642:2;3637:3;3634:1;3624:8;3617:5;3612:40;3141:16;3134:24;3128:2;3110:16;3107:24;3103:1;3099;3093:8;3090:15;3086:46;3083:76;2859:815;2828:846;;3752:1;3747:3;3740:14;3853:1;3846:4;3841:3;3837:14;3830:25;3956:1;3949:4;3944:3;3940:14;3933:25;;4125:7;4120:209;;4152:162;4224:8;4235:31;4268:28;4152:34;:162::i;1662:232:4:-;1767:47;1785:5;1792:4;1798:2;1802:5;1809:4;1767:17;:47::i;:::-;1762:126;;1837:40;;;;;217:42:48;205:55;;1837:40:4;;;187:74:48;160:18;;1837:40:4;14:253:48;3508:1663:17;3953:4;3947:11;3710:21;4094:33;;;4186:42;4163:66;;4156:4;4147:14;;4140:90;4330:66;4299:98;;4276:4;4267:14;;4243:168;4483:4;4476;4467:14;;4460:28;3919:2;3909;3891:16;3887:25;3883:34;;;3879:43;4569:4;4565:26;;4558:4;4549:14;;4542:50;4662:16;4655:4;4646:14;;4639:40;3710:21;;4755:16;-1:-1:-1;4745:4:17;4736:14;;4721:51;4869:4;4850:15;4844:4;4840:26;4835:3;4831:36;4824:50;5022:66;5003:17;4999:90;4964:15;4958:4;4954:26;4949:3;4945:36;4921:182;5138:15;5132:4;5128:26;5123:3;5116:39;10165:1393:4;10460:4;10454:11;10365:28;10323:12;10478:22;;;10536:15;10526:26;;;10520:4;10513:40;10579:24;;10573:4;10566:38;10624:4;10617:19;;;10323:12;10700:4;10323:12;10688:4;10323:12;;10672:5;10665;10660:45;10649:56;;10917:1;10910:4;10904:11;10901:18;10892:7;10888:32;10878:606;;11049:6;11039:7;11032:15;11028:28;11025:165;;;11105:16;11099:4;11094:3;11079:43;11155:16;11150:3;11143:29;11025:165;11466:1;11458:5;11446:18;11443:25;11424:16;11417:24;11413:56;11404:7;11400:70;11389:81;;10878:606;11504:4;11497:17;-1:-1:-1;11540:1:4;11534:4;11527:15;10165:1393;;-1:-1:-1;;;;;10165:1393:4:o;467:154:48:-;553:42;546:5;542:54;535:5;532:65;522:93;;611:1;608;601:12;522:93;467:154;:::o;626:134::-;694:20;;723:31;694:20;723:31;:::i;:::-;626:134;;;:::o;765:156::-;825:5;870:3;861:6;856:3;852:16;848:26;845:46;;;887:1;884;877:12;926:170;1000:5;1045:3;1036:6;1031:3;1027:16;1023:26;1020:46;;;1062:1;1059;1052:12;1101:347;1152:8;1162:6;1216:3;1209:4;1201:6;1197:17;1193:27;1183:55;;1234:1;1231;1224:12;1183:55;-1:-1:-1;1257:20:48;;1300:18;1289:30;;1286:50;;;1332:1;1329;1322:12;1286:50;1369:4;1361:6;1357:17;1345:29;;1421:3;1414:4;1405:6;1397;1393:19;1389:30;1386:39;1383:59;;;1438:1;1435;1428:12;1453:827;1618:6;1626;1634;1642;1650;1703:3;1691:9;1682:7;1678:23;1674:33;1671:53;;;1720:1;1717;1710:12;1671:53;1759:9;1746:23;1778:31;1803:5;1778:31;:::i;:::-;1828:5;-1:-1:-1;1852:63:48;1907:7;1902:2;1887:18;;1852:63;:::i;:::-;1842:73;;1934:78;2004:7;1998:3;1987:9;1983:19;1934:78;:::i;:::-;1924:88;;2063:3;2052:9;2048:19;2035:33;2091:18;2083:6;2080:30;2077:50;;;2123:1;2120;2113:12;2077:50;2162:58;2212:7;2203:6;2192:9;2188:22;2162:58;:::i;:::-;1453:827;;;;-1:-1:-1;1453:827:48;;-1:-1:-1;2239:8:48;;2136:84;1453:827;-1:-1:-1;;;1453:827:48:o;2538:253::-;2624:6;2677:2;2665:9;2656:7;2652:23;2648:32;2645:52;;;2693:1;2690;2683:12;2645:52;-1:-1:-1;2738:23:48;;2538:253;-1:-1:-1;2538:253:48:o;3743:158::-;3806:5;3851:2;3842:6;3837:3;3833:16;3829:25;3826:45;;;3867:1;3864;3857:12;3906:805;4060:6;4068;4076;4084;4092;4145:3;4133:9;4124:7;4120:23;4116:33;4113:53;;;4162:1;4159;4152:12;4113:53;4201:9;4188:23;4220:31;4245:5;4220:31;:::i;:::-;4270:5;-1:-1:-1;4294:63:48;4349:7;4344:2;4329:18;;4294:63;:::i;:::-;4284:73;;4376:67;4435:7;4429:3;4418:9;4414:19;4376:67;:::i;:::-;4366:77;;4494:3;4483:9;4479:19;4466:33;4522:18;4514:6;4511:30;4508:50;;;4554:1;4551;4544:12;5159:1135;5408:6;5416;5424;5432;5440;5448;5456;5509:3;5497:9;5488:7;5484:23;5480:33;5477:53;;;5526:1;5523;5516:12;5477:53;5565:9;5552:23;5584:31;5609:5;5584:31;:::i;:::-;5634:5;-1:-1:-1;5658:63:48;5713:7;5708:2;5693:18;;5658:63;:::i;:::-;5648:73;;5740:78;5810:7;5804:3;5793:9;5789:19;5740:78;:::i;:::-;5730:88;-1:-1:-1;5891:3:48;5876:19;;5863:33;;-1:-1:-1;5995:3:48;5980:19;;5967:33;;-1:-1:-1;6077:3:48;6062:19;;6049:33;6105:18;6094:30;;6091:50;;;6137:1;6134;6127:12;6091:50;6176:58;6226:7;6217:6;6206:9;6202:22;6176:58;:::i;:::-;5159:1135;;;;-1:-1:-1;5159:1135:48;;-1:-1:-1;5159:1135:48;;;;6150:84;;-1:-1:-1;;;5159:1135:48:o;6655:160::-;6721:20;;6781:1;6770:20;;;6760:31;;6750:59;;6805:1;6802;6795:12;6820:587;6931:6;6939;6947;6955;7008:3;6996:9;6987:7;6983:23;6979:33;6976:53;;;7025:1;7022;7015:12;6976:53;7064:9;7051:23;7083:31;7108:5;7083:31;:::i;:::-;7133:5;-1:-1:-1;7157:63:48;7212:7;7207:2;7192:18;;7157:63;:::i;:::-;7147:73;;7272:3;7261:9;7257:19;7244:33;7286;7311:7;7286:33;:::i;:::-;7338:7;-1:-1:-1;7364:37:48;7396:3;7381:19;;7364:37;:::i;:::-;7354:47;;6820:587;;;;;;;:::o;7677:959::-;7873:6;7881;7889;7897;7905;7913;7966:3;7954:9;7945:7;7941:23;7937:33;7934:53;;;7983:1;7980;7973:12;7934:53;8022:9;8009:23;8041:31;8066:5;8041:31;:::i;:::-;8091:5;-1:-1:-1;8115:63:48;8170:7;8165:2;8150:18;;8115:63;:::i;:::-;8105:73;;8197:67;8256:7;8250:3;8239:9;8235:19;8197:67;:::i;:::-;8187:77;-1:-1:-1;8337:3:48;8322:19;;8309:33;;-1:-1:-1;8419:3:48;8404:19;;8391:33;8447:18;8436:30;;8433:50;;;8479:1;8476;8469:12;8433:50;8518:58;8568:7;8559:6;8548:9;8544:22;8518:58;:::i;:::-;7677:959;;;;-1:-1:-1;7677:959:48;;-1:-1:-1;7677:959:48;;8595:8;;7677:959;-1:-1:-1;;;7677:959:48:o;8979:914::-;9112:6;9120;9128;9136;9144;9152;9205:3;9193:9;9184:7;9180:23;9176:33;9173:53;;;9222:1;9219;9212:12;9173:53;9261:9;9248:23;9280:31;9305:5;9280:31;:::i;:::-;9330:5;-1:-1:-1;9354:63:48;9409:7;9404:2;9389:18;;9354:63;:::i;:::-;9344:73;-1:-1:-1;9490:3:48;9475:19;;9462:33;;-1:-1:-1;9594:3:48;9579:19;;9566:33;;-1:-1:-1;9676:3:48;9661:19;;9648:33;9704:18;9693:30;;9690:50;;;9736:1;9733;9726:12;9994:1799;10215:13;;9968;9961:21;9949:34;;10186:3;10171:19;;10287:4;10279:6;10275:17;10269:24;10302:51;10347:4;10336:9;10332:20;10318:12;9968:13;9961:21;9949:34;;9898:91;10302:51;;10402:4;10394:6;10390:17;10384:24;10417:53;10464:4;10453:9;10449:20;10433:14;9968:13;9961:21;9949:34;;9898:91;10417:53;;10519:4;10511:6;10507:17;10501:24;10534:53;10581:4;10570:9;10566:20;10550:14;9968:13;9961:21;9949:34;;9898:91;10534:53;;10636:4;10628:6;10624:17;10618:24;10651:53;10698:4;10687:9;10683:20;10667:14;9968:13;9961:21;9949:34;;9898:91;10651:53;;10753:4;10745:6;10741:17;10735:24;10768:53;10815:4;10804:9;10800:20;10784:14;9968:13;9961:21;9949:34;;9898:91;10768:53;;10870:4;10862:6;10858:17;10852:24;10885:53;10932:4;10921:9;10917:20;10901:14;9968:13;9961:21;9949:34;;9898:91;10885:53;;10987:4;10979:6;10975:17;10969:24;11002:53;11049:4;11038:9;11034:20;11018:14;9968:13;9961:21;9949:34;;9898:91;11002:53;;11104:6;11096;11092:19;11086:26;11121:55;11168:6;11157:9;11153:22;11137:14;9968:13;9961:21;9949:34;;9898:91;11121:55;;11225:6;11217;11213:19;11207:26;11242:55;11289:6;11278:9;11274:22;11258:14;9968:13;9961:21;9949:34;;9898:91;11242:55;;11346:6;11338;11334:19;11328:26;11363:55;11410:6;11399:9;11395:22;11379:14;9968:13;9961:21;9949:34;;9898:91;11363:55;;11468:6;11460;11456:19;11450:26;11485:56;11533:6;11522:9;11518:22;11501:15;9968:13;9961:21;9949:34;;9898:91;11485:56;;11591:6;11583;11579:19;11573:26;11608:56;11656:6;11645:9;11641:22;11624:15;9968:13;9961:21;9949:34;;9898:91;11608:56;;11714:6;11706;11702:19;11696:26;11731:56;11779:6;11768:9;11764:22;11747:15;9968:13;9961:21;9949:34;;9898:91;11731:56;;9994:1799;;;;:::o;11798:118::-;11884:5;11877:13;11870:21;11863:5;11860:32;11850:60;;11906:1;11903;11896:12;11921:507;12021:6;12029;12037;12090:2;12078:9;12069:7;12065:23;12061:32;12058:52;;;12106:1;12103;12096:12;12058:52;12145:9;12132:23;12164:28;12186:5;12164:28;:::i;:::-;12211:5;12289:2;12274:18;;12261:32;;-1:-1:-1;12392:2:48;12377:18;;;12364:32;;11921:507;-1:-1:-1;;;11921:507:48:o;12685:516::-;12789:6;12797;12805;12858:3;12846:9;12837:7;12833:23;12829:33;12826:53;;;12875:1;12872;12865:12;12826:53;12914:9;12901:23;12933:31;12958:5;12933:31;:::i;:::-;12983:5;-1:-1:-1;13007:63:48;13062:7;13057:2;13042:18;;13007:63;:::i;:::-;12997:73;;13122:3;13111:9;13107:19;13094:33;13136;13161:7;13136:33;:::i;:::-;13188:7;13178:17;;;12685:516;;;;;:::o;13206:477::-;13355:2;13344:9;13337:21;13318:4;13387:6;13381:13;13430:6;13425:2;13414:9;13410:18;13403:34;13489:6;13484:2;13476:6;13472:15;13467:2;13456:9;13452:18;13446:50;13545:1;13540:2;13531:6;13520:9;13516:22;13512:31;13505:42;13674:2;13604:66;13599:2;13591:6;13587:15;13583:88;13572:9;13568:104;13564:113;13556:121;;;13206:477;;;;:::o;13688:184::-;13758:6;13811:2;13799:9;13790:7;13786:23;13782:32;13779:52;;;13827:1;13824;13817:12;13779:52;-1:-1:-1;13850:16:48;;13688:184;-1:-1:-1;13688:184:48:o;13877:437::-;13956:1;13952:12;;;;13999;;;14020:61;;14074:4;14066:6;14062:17;14052:27;;14020:61;14127:2;14119:6;14116:14;14096:18;14093:38;14090:218;;14164:77;14161:1;14154:88;14265:4;14262:1;14255:15;14293:4;14290:1;14283:15;14319:251;14389:6;14442:2;14430:9;14421:7;14417:23;14413:32;14410:52;;;14458:1;14455;14448:12;14410:52;14490:9;14484:16;14509:31;14534:5;14509:31;:::i;14575:184::-;14627:77;14624:1;14617:88;14724:4;14721:1;14714:15;14748:4;14745:1;14738:15;14764:191;14799:3;14830:66;14823:5;14820:77;14817:103;;14900:18;;:::i;:::-;-1:-1:-1;14940:1:48;14936:13;;14764:191::o;15312:125::-;15377:9;;;15398:10;;;15395:36;;;15411:18;;:::i;15442:128::-;15509:9;;;15530:11;;;15527:37;;;15544:18;;:::i;15575:245::-;15642:6;15695:2;15683:9;15674:7;15670:23;15666:32;15663:52;;;15711:1;15708;15701:12;15663:52;15743:9;15737:16;15762:28;15784:5;15762:28;:::i;15825:276::-;15913:6;15966:2;15954:9;15945:7;15941:23;15937:32;15934:52;;;15982:1;15979;15972:12;15934:52;16021:9;16008:23;16040:31;16065:5;16040:31;:::i;16457:161::-;16524:20;;16584:8;16573:20;;16563:31;;16553:59;;16608:1;16605;16598:12;16623:924;16707:6;16767:3;16755:9;16746:7;16742:23;16738:33;16783:2;16780:22;;;16798:1;16795;16788:12;16780:22;-1:-1:-1;16847:2:48;16841:9;16889:3;16877:16;;16923:18;16908:34;;16944:22;;;16905:62;16902:242;;;17000:77;16997:1;16990:88;17101:4;17098:1;17091:15;17129:4;17126:1;17119:15;16902:242;17160:2;17153:22;17199:29;17218:9;17199:29;:::i;:::-;17191:6;17184:45;17262:38;17296:2;17285:9;17281:18;17262:38;:::i;:::-;17257:2;17249:6;17245:15;17238:63;17334:37;17367:2;17356:9;17352:18;17334:37;:::i;:::-;17329:2;17321:6;17317:15;17310:62;17405:36;17437:2;17426:9;17422:18;17405:36;:::i;:::-;17400:2;17392:6;17388:15;17381:61;17476:39;17510:3;17499:9;17495:19;17476:39;:::i;:::-;17470:3;17458:16;;17451:65;17462:6;16623:924;-1:-1:-1;;;16623:924:48:o;17552:241::-;17608:6;17661:2;17649:9;17640:7;17636:23;17632:32;17629:52;;;17677:1;17674;17667:12;17629:52;17716:9;17703:23;17735:28;17757:5;17735:28;:::i;17798:272::-;17896:2;17866:17;;;17885;;;;17862:41;17927:34;17918:44;;17973:66;17964:76;;17915:126;17912:152;;;18044:18;;:::i;18075:240::-;18110:3;18158:5;18154:2;18143:21;18188:66;18179:7;18176:79;18173:105;;18258:18;;:::i;:::-;18298:1;18294:15;;18075:240;-1:-1:-1;;18075:240:48:o;18653:184::-;18705:77;18702:1;18695:88;18802:4;18799:1;18792:15;18826:4;18823:1;18816:15;18842:274;18882:1;18908;18898:189;;18943:77;18940:1;18933:88;19044:4;19041:1;19034:15;19072:4;19069:1;19062:15;18898:189;-1:-1:-1;19101:9:48;;18842:274::o;19121:238::-;19230:8;19205:16;;;19223;;;19201:39;19260:26;;;;19305:24;;;19295:58;;19333:18;;:::i","linkReferences":{},"cborAuxdata":{"1":{"value":"0xa164736f6c634300081d000a","offset":13881}},"immutableReferences":{"5860":[{"start":1513,"length":32},{"start":1636,"length":32},{"start":1773,"length":32},{"start":2418,"length":32},{"start":2652,"length":32},{"start":2795,"length":32},{"start":2938,"length":32},{"start":3074,"length":32},{"start":3215,"length":32},{"start":3385,"length":32},{"start":5015,"length":32},{"start":6943,"length":32},{"start":7017,"length":32},{"start":8205,"length":32},{"start":8405,"length":32},{"start":8521,"length":32},{"start":8682,"length":32},{"start":9797,"length":32},{"start":10137,"length":32},{"start":10271,"length":32},{"start":10422,"length":32},{"start":10629,"length":32},{"start":10695,"length":32}],"6661":[{"start":537,"length":32},{"start":7452,"length":32}],"7000":[{"start":444,"length":32},{"start":2078,"length":32},{"start":2298,"length":32},{"start":4209,"length":32},{"start":4454,"length":32},{"start":4647,"length":32},{"start":4868,"length":32},{"start":5272,"length":32},{"start":5537,"length":32},{"start":5751,"length":32},{"start":6414,"length":32},{"start":6526,"length":32},{"start":7924,"length":32},{"start":9975,"length":32},{"start":10311,"length":32}],"7004":[{"start":1177,"length":32},{"start":5314,"length":32},{"start":5579,"length":32}]},"transformations":[{"id":"7000","type":"replace","offset":444,"reason":"immutable"},{"id":"6661","type":"replace","offset":537,"reason":"immutable"},{"id":"7004","type":"replace","offset":1177,"reason":"immutable"},{"id":"5860","type":"replace","offset":1513,"reason":"immutable"},{"id":"5860","type":"replace","offset":1636,"reason":"immutable"},{"id":"5860","type":"replace","offset":1773,"reason":"immutable"},{"id":"7000","type":"replace","offset":2078,"reason":"immutable"},{"id":"7000","type":"replace","offset":2298,"reason":"immutable"},{"id":"5860","type":"replace","offset":2418,"reason":"immutable"},{"id":"5860","type":"replace","offset":2652,"reason":"immutable"},{"id":"5860","type":"replace","offset":2795,"reason":"immutable"},{"id":"5860","type":"replace","offset":2938,"reason":"immutable"},{"id":"5860","type":"replace","offset":3074,"reason":"immutable"},{"id":"5860","type":"replace","offset":3215,"reason":"immutable"},{"id":"5860","type":"replace","offset":3385,"reason":"immutable"},{"id":"7000","type":"replace","offset":4209,"reason":"immutable"},{"id":"7000","type":"replace","offset":4454,"reason":"immutable"},{"id":"7000","type":"replace","offset":4647,"reason":"immutable"},{"id":"7000","type":"replace","offset":4868,"reason":"immutable"},{"id":"5860","type":"replace","offset":5015,"reason":"immutable"},{"id":"7000","type":"replace","offset":5272,"reason":"immutable"},{"id":"7004","type":"replace","offset":5314,"reason":"immutable"},{"id":"7000","type":"replace","offset":5537,"reason":"immutable"},{"id":"7004","type":"replace","offset":5579,"reason":"immutable"},{"id":"7000","type":"replace","offset":5751,"reason":"immutable"},{"id":"7000","type":"replace","offset":6414,"reason":"immutable"},{"id":"7000","type":"replace","offset":6526,"reason":"immutable"},{"id":"5860","type":"replace","offset":6943,"reason":"immutable"},{"id":"5860","type":"replace","offset":7017,"reason":"immutable"},{"id":"6661","type":"replace","offset":7452,"reason":"immutable"},{"id":"7000","type":"replace","offset":7924,"reason":"immutable"},{"id":"5860","type":"replace","offset":8205,"reason":"immutable"},{"id":"5860","type":"replace","offset":8405,"reason":"immutable"},{"id":"5860","type":"replace","offset":8521,"reason":"immutable"},{"id":"5860","type":"replace","offset":8682,"reason":"immutable"},{"id":"5860","type":"replace","offset":9797,"reason":"immutable"},{"id":"7000","type":"replace","offset":9975,"reason":"immutable"},{"id":"5860","type":"replace","offset":10137,"reason":"immutable"},{"id":"5860","type":"replace","offset":10271,"reason":"immutable"},{"id":"7000","type":"replace","offset":10311,"reason":"immutable"},{"id":"5860","type":"replace","offset":10422,"reason":"immutable"},{"id":"5860","type":"replace","offset":10629,"reason":"immutable"},{"id":"5860","type":"replace","offset":10695,"reason":"immutable"}],"transformationValues":{"immutables":{"5860":"0x000000000000000000000000000000000004444c5dc75cb358380d2e3de08a90","6661":"0x0000000000000000000000000000000000000000000000000000000000000019","7000":"0x000000000000000000000000f36a4ba50c603204c3fc6d2da8b78a7b69cbc67d","7004":"0x0000000000000000000000006a8cbed756804b16e05e741edabd5cb544ae21bf"}}},"deployment":{"transactionHash":"0x14f0a3f092dceae297ae53f8927170bcbfcf08a0b2434b039f5ea3a1de1ab062","blockNumber":"25777725","transactionIndex":"116","deployer":"0xe3ed9Ed05284CF1962882beF564B2F6aEEC7d775"},"sources":{"src/aggregator-hooks/implementations/StableSwapNG/StableSwapNGAggregator.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity 0.8.29;\n\nimport {BaseAggregatorHook} from \"../../BaseAggregatorHook.sol\";\nimport {ICurveStableSwapNG} from \"./interfaces/ICurveStableSwapNG.sol\";\nimport {ICurveStableSwapFactoryNG} from \"./interfaces/ICurveStableSwapFactoryNG.sol\";\nimport {StateLibrary} from \"@uniswap/v4-core/src/libraries/StateLibrary.sol\";\nimport {PoolId} from \"@uniswap/v4-core/src/types/PoolId.sol\";\nimport {IPoolManager} from \"@uniswap/v4-core/src/interfaces/IPoolManager.sol\";\nimport {PoolKey} from \"@uniswap/v4-core/src/types/PoolKey.sol\";\nimport {SwapParams} from \"@uniswap/v4-core/src/types/PoolOperation.sol\";\nimport {Currency} from \"@uniswap/v4-core/src/types/Currency.sol\";\nimport {IHooks} from \"@uniswap/v4-core/src/interfaces/IHooks.sol\";\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport {SafeERC20} from \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\n\n/// @title StableSwapNGAggregator\n/// @notice Uniswap V4 hook that aggregates liquidity from Curve StableSwap NG pools\n/// @dev Supports both exact-input and exact-output swaps\ncontract StableSwapNGAggregator is BaseAggregatorHook {\n    using StateLibrary for IPoolManager;\n    using SafeERC20 for IERC20;\n\n    /// @notice The Curve StableSwap NG pool\n    ICurveStableSwapNG public immutable pool;\n\n    /// @notice The Curve StableSwap NG factory for checking meta pool status\n    ICurveStableSwapFactoryNG public immutable curveFactory;\n\n    uint256 internal constant INACCURACY_BUFFER = 20;\n    uint256 internal constant INACCURACY_SCALE = 1_000_000;\n\n    struct PoolInfo {\n        int128 token0Index;\n        int128 token1Index;\n    }\n\n    /// @notice Maps Uniswap V4 pool IDs to their corresponding token indices in the Curve pool\n    mapping(PoolId => PoolInfo) public poolIdToTokenInfo;\n\n    error NativeCurrencyNotSupported();\n    error AmountOutExceeded();\n    error TokenNotInPool(address token);\n    error TokensNotInPool(address token0, address token1);\n    error PoolIsMetaPool();\n    error InvalidPoolId();\n\n    constructor(IPoolManager _manager, ICurveStableSwapNG _pool, ICurveStableSwapFactoryNG _curveFactory)\n        BaseAggregatorHook(_manager, \"StableSwapNGAggregator v1.0\")\n    {\n        pool = _pool;\n        curveFactory = _curveFactory;\n    }\n\n    /// @inheritdoc BaseAggregatorHook\n    function _rawQuote(bool zeroToOne, int256 amountSpecified, PoolId poolId)\n        internal\n        view\n        override\n        returns (uint256 amountUnspecified)\n    {\n        PoolInfo storage poolInfo = poolIdToTokenInfo[poolId];\n        if (amountSpecified < 0) {\n            if (zeroToOne) {\n                amountUnspecified = pool.get_dy(poolInfo.token0Index, poolInfo.token1Index, uint256(-amountSpecified));\n            } else {\n                amountUnspecified = pool.get_dy(poolInfo.token1Index, poolInfo.token0Index, uint256(-amountSpecified));\n            }\n        } else {\n            uint256 amount = uint256(amountSpecified);\n            uint256 _amountSpecified = amount + _getBuffer(amount);\n            if (zeroToOne) {\n                amountUnspecified = pool.get_dx(poolInfo.token0Index, poolInfo.token1Index, _amountSpecified);\n            } else {\n                amountUnspecified = pool.get_dx(poolInfo.token1Index, poolInfo.token0Index, _amountSpecified);\n            }\n        }\n    }\n\n    /// @inheritdoc BaseAggregatorHook\n    function pseudoTotalValueLocked(PoolId poolId) external view override returns (uint256 amount0, uint256 amount1) {\n        PoolInfo memory poolInfo = poolIdToTokenInfo[poolId];\n        if (poolInfo.token0Index == 0 && poolInfo.token1Index == 0) revert InvalidPoolId();\n        amount0 = pool.balances(uint256(uint128(poolInfo.token0Index)));\n        amount1 = pool.balances(uint256(uint128(poolInfo.token1Index)));\n    }\n\n    function _beforeInitialize(address, PoolKey calldata key, uint160) internal override returns (bytes4) {\n        if (curveFactory.is_meta(address(pool))) revert PoolIsMetaPool();\n\n        uint256 totalCoins = curveFactory.get_n_coins(address(pool));\n        bool token0Found = false;\n        bool token1Found = false;\n        int128 token0Index;\n        int128 token1Index;\n        for (uint256 i = 0; i < totalCoins; i++) {\n            address coin = pool.coins(i);\n            if (coin == Currency.unwrap(key.currency0)) {\n                token0Index = int128(int256(i));\n                token0Found = true;\n            } else if (coin == Currency.unwrap(key.currency1)) {\n                token1Index = int128(int256(i));\n                token1Found = true;\n            }\n        }\n\n        if (!token0Found && !token1Found) {\n            revert TokensNotInPool(Currency.unwrap(key.currency0), Currency.unwrap(key.currency1));\n        }\n        if (!token0Found) {\n            revert TokenNotInPool(Currency.unwrap(key.currency0));\n        }\n        if (!token1Found) {\n            revert TokenNotInPool(Currency.unwrap(key.currency1));\n        }\n\n        poolIdToTokenInfo[key.toId()] = PoolInfo({token0Index: token0Index, token1Index: token1Index});\n\n        IERC20(Currency.unwrap(key.currency0)).forceApprove(address(pool), type(uint256).max);\n        IERC20(Currency.unwrap(key.currency1)).forceApprove(address(pool), type(uint256).max);\n\n        emit AggregatorPoolRegistered(key.toId());\n        pollTokenJar();\n        return IHooks.beforeInitialize.selector;\n    }\n\n    /// @inheritdoc BaseAggregatorHook\n    function _conductSwap(Currency settleCurrency, Currency takeCurrency, SwapParams calldata params, PoolId poolId)\n        internal\n        override\n        returns (uint256 amountSettle, uint256 amountTake, bool hasSettled)\n    {\n        PoolInfo storage poolInfo = poolIdToTokenInfo[poolId];\n        int128 tokenInIndex;\n        int128 tokenOutIndex;\n        if (params.zeroForOne) {\n            tokenInIndex = poolInfo.token0Index;\n            tokenOutIndex = poolInfo.token1Index;\n        } else {\n            tokenInIndex = poolInfo.token1Index;\n            tokenOutIndex = poolInfo.token0Index;\n        }\n\n        if (params.amountSpecified < 0) {\n            // Exact-In\n            amountTake = uint256(-params.amountSpecified);\n        } else {\n            // Exact-Out: find out how much in (add buffer to cover precision loss)\n            uint256 amount = uint256(params.amountSpecified);\n            amountTake = pool.get_dx(tokenInIndex, tokenOutIndex, amount + _getBuffer(amount));\n        }\n\n        poolManager.take(takeCurrency, address(this), amountTake);\n\n        amountSettle = _handleSwap(amountTake, tokenInIndex, tokenOutIndex, settleCurrency, params);\n        hasSettled = true;\n\n        return (amountSettle, amountTake, hasSettled);\n    }\n\n    function _handleSwap(\n        uint256 amountTake,\n        int128 tokenInIndex,\n        int128 tokenOutIndex,\n        Currency settleCurrency,\n        SwapParams calldata params\n    ) internal returns (uint256 amountOut) {\n        poolManager.sync(settleCurrency);\n        // Is exactOut has accuracy issues on Curve, so we do the gas inefficient way of transferring here first to ensure exact amount\n        if (params.amountSpecified > 0) {\n            // MinAmountOut is 0 to avoid slippage check because it is checked in the router\n            pool.exchange(tokenInIndex, tokenOutIndex, amountTake, 0, address(this));\n            amountOut = uint256(params.amountSpecified);\n            settleCurrency.transfer(address(poolManager), uint256(params.amountSpecified));\n        } else {\n            // MinAmountOut is 0 to avoid slippage check because it is checked in the router\n            amountOut = pool.exchange(tokenInIndex, tokenOutIndex, amountTake, 0, address(poolManager));\n        }\n        poolManager.settle();\n    }\n\n    function _getBuffer(uint256 amount) internal pure returns (uint256) {\n        uint256 scaled = amount / INACCURACY_SCALE;\n        return scaled > INACCURACY_BUFFER ? scaled : INACCURACY_BUFFER;\n    }\n\n    receive() external payable override {\n        revert NativeCurrencyNotSupported();\n    }\n}\n"},"src/aggregator-hooks/BaseAggregatorHook.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {IPoolManager} from \"@uniswap/v4-core/src/interfaces/IPoolManager.sol\";\nimport {IHooks} from \"@uniswap/v4-core/src/interfaces/IHooks.sol\";\nimport {PoolKey} from \"@uniswap/v4-core/src/types/PoolKey.sol\";\nimport {Hooks} from \"@uniswap/v4-core/src/libraries/Hooks.sol\";\nimport {BeforeSwapDelta, toBeforeSwapDelta} from \"@uniswap/v4-core/src/types/BeforeSwapDelta.sol\";\nimport {Currency, CurrencyLibrary} from \"@uniswap/v4-core/src/types/Currency.sol\";\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport {PoolId} from \"@uniswap/v4-core/src/types/PoolId.sol\";\nimport {PoolIdLibrary} from \"@uniswap/v4-core/src/types/PoolId.sol\";\nimport {ModifyLiquidityParams, SwapParams} from \"@uniswap/v4-core/src/types/PoolOperation.sol\";\nimport {BaseHook} from \"../base/BaseHook.sol\";\nimport {SafeERC20} from \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\nimport {StateLibrary} from \"@uniswap/v4-core/src/libraries/StateLibrary.sol\";\nimport {DeltaResolver} from \"@uniswap/v4-periphery/src/base/DeltaResolver.sol\";\nimport {IAggregatorHook} from \"./interfaces/IAggregatorHook.sol\";\nimport {ProtocolFees} from \"./ProtocolFees.sol\";\nimport {IFeeClassifiedHook} from \"@protocol-fees/interfaces/IFeeClassifiedHook.sol\";\n\n/// @title BaseAggregatorHook\n/// @notice Abstract contract for implementing aggregator hooks in Uniswap V4\n/// @dev Implements the IAggregatorHook interface, leverages the ProtocolFees contract, and extends the BaseHook contract\nabstract contract BaseAggregatorHook is IAggregatorHook, IFeeClassifiedHook, ProtocolFees, BaseHook, DeltaResolver {\n    using CurrencyLibrary for Currency;\n    using PoolIdLibrary for PoolKey;\n    using SafeERC20 for IERC20;\n    using StateLibrary for IPoolManager;\n\n    /// @notice The publicly displayed version of the aggregator hook.\n    /// @dev Although this should never change after construction, strings cannot be labelled immutable.\n    string public aggregatorHookVersion;\n\n    /// @notice Initializes the hook with required dependencies\n    /// @param _manager The Uniswap V4 PoolManager contract\n    constructor(IPoolManager _manager, string memory _aggregatorHookVersion) BaseHook(_manager) ProtocolFees(25) {\n        aggregatorHookVersion = _aggregatorHookVersion;\n    }\n\n    /// @inheritdoc ProtocolFees\n    function pollTokenJar() public virtual override returns (address) {\n        address newTokenJar = _getTokenJar(poolManager);\n        if (tokenJar != newTokenJar) {\n            tokenJar = newTokenJar;\n            emit TokenJarUpdated(tokenJar);\n        }\n        return tokenJar;\n    }\n\n    /// @inheritdoc IAggregatorHook\n    function pseudoTotalValueLocked(PoolId poolId) external virtual returns (uint256 amount0, uint256 amount1);\n\n    /// @inheritdoc IAggregatorHook\n    function quote(bool zeroToOne, int256 amountSpecified, PoolId poolId) external returns (uint256 amountUnspecified) {\n        return _innerQuote(zeroToOne, amountSpecified, poolId, _rawQuote(zeroToOne, amountSpecified, poolId));\n    }\n\n    /// @notice Shared quote tail: applies the protocol fee to a raw quote. Called by every quote variant so\n    ///         this fee adjustment lives in exactly one place.\n    /// @param zeroToOne Whether the swap is from token0 to token1\n    /// @param amountSpecified The amount specified (negative for exact-in, positive for exact-out)\n    /// @param poolId The pool ID\n    /// @param amountUnspecified The raw unspecified amount before protocol fee adjustment\n    /// @return The unspecified amount after protocol fee adjustment\n    function _innerQuote(bool zeroToOne, int256 amountSpecified, PoolId poolId, uint256 amountUnspecified)\n        internal\n        returns (uint256)\n    {\n        uint24 protocolFee = _getProtocolFee(poolManager, zeroToOne, poolId);\n\n        if (protocolFee == 0) return amountUnspecified;\n\n        if (tokenJar == address(0)) pollTokenJar();\n        if (tokenJar == address(0)) return amountUnspecified;\n\n        bool isExactInput = amountSpecified < 0;\n        uint256 feeAmount = _calculateProtocolFeeAmount(protocolFee, isExactInput, amountUnspecified);\n\n        return isExactInput ? amountUnspecified - feeAmount : amountUnspecified + feeAmount;\n    }\n\n    /// @inheritdoc BaseHook\n    function getHookPermissions() public pure override returns (Hooks.Permissions memory permissions) {\n        permissions.beforeSwap = true;\n        permissions.beforeSwapReturnDelta = true;\n        permissions.beforeInitialize = true;\n        permissions.beforeAddLiquidity = true;\n    }\n\n    /// @inheritdoc IFeeClassifiedHook\n    function protocolFeeFlags() external view virtual override returns (uint256) {\n        return 1 << 11;\n    }\n\n    /// @notice Abstract function for contracts to implement conducting the swap on the aggregated liquidity source\n    /// @param settleCurrency The currency to be settled on the V4 PoolManager (swapper's output currency)\n    /// @param takeCurrency The currency to be taken from the V4 PoolManager (swapper's input currency)\n    /// @param params The swap parameters\n    /// @param poolId The V4 Pool ID\n    /// @return amountSettle The amount of the currency being settled (swapper's output amount)\n    /// @return amountTake The amount of the currency being taken (swapper's input amount)\n    /// @return hasSettled Whether the swap has been settled inside of the _conductSwap function\n    /// @dev To settle the swap inside of the _conductSwap function, you must follow the 'sync, send,\n    ///      settle' pattern and set hasSettled to true\n    function _conductSwap(Currency settleCurrency, Currency takeCurrency, SwapParams calldata params, PoolId poolId)\n        internal\n        virtual\n        returns (uint256 amountSettle, uint256 amountTake, bool hasSettled);\n\n    /// @notice Returns the raw quote from the underlying liquidity source without protocol fees\n    /// @param zeroToOne Whether the swap is from token0 to token1\n    /// @param amountSpecified The amount specified (negative for exact-in, positive for exact-out)\n    /// @param poolId The pool ID\n    /// @return amountUnspecified The raw unspecified amount before protocol fee adjustment\n    function _rawQuote(bool zeroToOne, int256 amountSpecified, PoolId poolId)\n        internal\n        virtual\n        returns (uint256 amountUnspecified);\n\n    function _beforeInitialize(address, PoolKey calldata key, uint160) internal virtual override returns (bytes4) {\n        emit AggregatorPoolRegistered(key.toId());\n        // NOTE: Token jar will be grabbed in first protocol fee payment if not done here.\n        pollTokenJar();\n        return IHooks.beforeInitialize.selector;\n    }\n\n    function _beforeAddLiquidity(address, PoolKey calldata, ModifyLiquidityParams calldata, bytes calldata)\n        internal\n        pure\n        override\n        returns (bytes4)\n    {\n        revert LiquidityNotAllowed();\n    }\n\n    function _beforeSwap(address sender, PoolKey calldata key, SwapParams calldata params, bytes calldata)\n        internal\n        virtual\n        override\n        returns (bytes4, BeforeSwapDelta, uint24)\n    {\n        (uint256 amountIn, uint256 amountOut) = _internalSettle(key, params);\n        return _innerBeforeSwap(sender, key, params, amountIn, amountOut);\n    }\n\n    /// @notice Shared `beforeSwap` tail: turns the settled amounts into the BeforeSwapDelta and applies the\n    ///         protocol fee. Called by every `_beforeSwap` variant so this accounting lives in exactly one place.\n    /// @param sender The address that initiated the swap\n    /// @param key The pool key\n    /// @param params The swap parameters\n    /// @param amountIn The swapper's input amount resolved by settlement (the `takeCurrency` amount)\n    /// @param amountOut The swapper's output amount resolved by settlement (the `settleCurrency` amount)\n    function _innerBeforeSwap(\n        address sender,\n        PoolKey calldata key,\n        SwapParams calldata params,\n        uint256 amountIn,\n        uint256 amountOut\n    ) internal returns (bytes4, BeforeSwapDelta, uint24) {\n        int128 unspecifiedDelta = _processAmounts(amountIn, amountOut, params.amountSpecified < 0);\n        int128 specified = int128(-params.amountSpecified); // cancel core\n\n        uint24 protocolFee = _getProtocolFee(poolManager, params.zeroForOne, key.toId());\n        unspecifiedDelta += _applyWithProtocolFee(poolManager, key, params, unspecifiedDelta, protocolFee);\n\n        if (params.amountSpecified >= 0) {\n            // For exactOut, in cases where the implementation's amountOut may be off.\n            // NOTE: it would be up to the router to handle this\n            specified = -int128(uint128(amountOut));\n        }\n\n        int256 amount0;\n        int256 amount1;\n        if (params.zeroForOne == params.amountSpecified < 0) {\n            amount0 = specified;\n            amount1 = unspecifiedDelta;\n        } else {\n            amount0 = unspecifiedDelta;\n            amount1 = specified;\n        }\n\n        emit HookSwap(key.toId(), sender, amount0, amount1, protocolFee);\n\n        return (IHooks.beforeSwap.selector, toBeforeSwapDelta(specified, unspecifiedDelta), 0);\n    }\n\n    function _processAmounts(uint256 amountIn, uint256 amountOut, bool exactInput)\n        internal\n        pure\n        returns (int128 unspecifiedDelta)\n    {\n        uint256 unspecified;\n        if (exactInput) {\n            // Exact-In\n            unspecified = amountOut;\n            unspecifiedDelta = -int128(uint128(unspecified));\n        } else {\n            // Exact-Out\n            unspecified = amountIn;\n            unspecifiedDelta = int128(uint128(unspecified));\n        }\n    }\n\n    function _internalSettle(PoolKey calldata key, SwapParams calldata params)\n        internal\n        returns (uint256 amountIn, uint256 amountOut)\n    {\n        Currency settleCurrency = params.zeroForOne ? key.currency1 : key.currency0;\n        Currency takeCurrency = params.zeroForOne ? key.currency0 : key.currency1;\n\n        (uint256 amountSettle, uint256 amountTake, bool hasSettled) =\n            _conductSwap(settleCurrency, takeCurrency, params, key.toId());\n\n        if (!hasSettled) {\n            _settle(settleCurrency, address(this), amountSettle);\n        }\n\n        return (amountTake, amountSettle);\n    }\n\n    function _pay(Currency token, address payer, uint256 amount) internal override {\n        if (payer == address(this)) {\n            token.transfer(address(poolManager), amount);\n        } else {\n            IERC20(Currency.unwrap(token)).safeTransferFrom(payer, address(poolManager), amount);\n        }\n    }\n\n    /// @notice Allows the contract to receive ETH for native currency swaps\n    /// @dev Required for handling native ETH transfers during swap operations\n    receive() external payable virtual {}\n}\n"},"src/aggregator-hooks/implementations/StableSwapNG/interfaces/ICurveStableSwapNG.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n/// @title ICurveStableSwapNG\n/// @notice Interface for Curve StableSwap NG pools\n/// @dev Based on the Vyper implementation at https://github.com/curvefi/stableswap-ng\n/// @dev We have to write our own interface file since the source code is in vyper\ninterface ICurveStableSwapNG {\n    /// @notice Calculates the required input amount for a desired output (inverse quote)\n    /// @param i Index of the input token in the pool\n    /// @param j Index of the output token in the pool\n    /// @param dy Desired amount of output tokens\n    /// @return The required amount of input tokens\n    function get_dx(int128 i, int128 j, uint256 dy) external view returns (uint256);\n\n    /// @notice Calculates the expected output amount for a swap\n    /// @param i Index of the input token in the pool\n    /// @param j Index of the output token in the pool\n    /// @param dx Amount of input tokens to swap\n    /// @return The expected amount of output tokens\n    function get_dy(int128 i, int128 j, uint256 dx) external view returns (uint256);\n\n    /// @notice Executes a token swap with custom receiver\n    /// @param i Index of the input token in the pool\n    /// @param j Index of the output token in the pool\n    /// @param dx Amount of input tokens to swap\n    /// @param min_dy Minimum amount of output tokens to receive (slippage protection)\n    /// @param receiver Address to receive the output tokens\n    /// @return The actual amount of output tokens received\n    function exchange(int128 i, int128 j, uint256 dx, uint256 min_dy, address receiver) external returns (uint256);\n\n    /// @notice Returns the number of coins in the pool\n    /// @return The number of tokens in this pool\n    function N_COINS() external view returns (uint256);\n\n    /// @notice Returns the token address at a given index\n    /// @param i Index of the token in the pool\n    /// @return The token address at that index\n    function coins(uint256 i) external view returns (address);\n\n    /// @notice Returns the balance of a token at a given index\n    /// @param i Index of the token in the pool\n    /// @return The balance of the token at that index\n    function balances(uint256 i) external view returns (uint256);\n}\n"},"src/aggregator-hooks/implementations/StableSwapNG/interfaces/ICurveStableSwapFactoryNG.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n/// @title ICurveStableSwapFactoryNG\n/// @notice Interface for Curve StableSwap NG Factory\n/// @dev Based on the Vyper implementation at https://github.com/curvefi/stableswap-ng\ninterface ICurveStableSwapFactoryNG {\n    /// @notice Deploy a new plain pool\n    /// @param _name Name of the new plain pool\n    /// @param _symbol Symbol for the new plain pool\n    /// @param _coins List of addresses of the coins being used in the pool\n    /// @param _A Amplification coefficient (suggested: 5-10 for algo stables, 100 for non-redeemable, 200-400 for redeemable)\n    /// @param _fee Trade fee with 1e10 precision (max 1% = 100000000)\n    /// @param _offpeg_fee_multiplier Off-peg fee multiplier\n    /// @param _ma_exp_time Moving average time window (e.g., 866 for 10 min EMA)\n    /// @param _implementation_idx Index of the implementation to use\n    /// @param _asset_types Asset types (0=Standard, 1=Oracle, 2=Rebasing, 3=ERC4626)\n    /// @param _method_ids Method IDs for rate oracles (use bytes4(0) for standard tokens)\n    /// @param _oracles Oracle addresses (use address(0) for standard tokens)\n    /// @return The address of the deployed pool\n    function deploy_plain_pool(\n        string memory _name,\n        string memory _symbol,\n        address[] memory _coins,\n        uint256 _A,\n        uint256 _fee,\n        uint256 _offpeg_fee_multiplier,\n        uint256 _ma_exp_time,\n        uint256 _implementation_idx,\n        uint8[] memory _asset_types,\n        bytes4[] memory _method_ids,\n        address[] memory _oracles\n    ) external returns (address);\n\n    /// @notice Set implementation contracts for pools\n    /// @param _implementation_index Implementation index where implementation is stored\n    /// @param _implementation Implementation address to use when deploying plain pools\n    function set_pool_implementations(uint256 _implementation_index, address _implementation) external;\n\n    /// @notice Set implementation contracts for metapools\n    /// @param _implementation_index Implementation index where implementation is stored\n    /// @param _implementation Implementation address to use when deploying metapools\n    function set_metapool_implementations(uint256 _implementation_index, address _implementation) external;\n\n    /// @notice Set implementation contract for StableSwap Math\n    /// @param _math_implementation Address of the math implementation contract\n    function set_math_implementation(address _math_implementation) external;\n\n    /// @notice Set implementation contract for Views methods\n    /// @param _views_implementation Implementation address of views contract\n    function set_views_implementation(address _views_implementation) external;\n\n    /// @notice Set gauge implementation address\n    /// @param _gauge_implementation Address of the gauge implementation\n    function set_gauge_implementation(address _gauge_implementation) external;\n\n    /// @notice Returns the admin address\n    function admin() external view returns (address);\n\n    /// @notice Returns the fee receiver address\n    function fee_receiver() external view returns (address);\n\n    /// @notice Returns the math implementation address\n    function math_implementation() external view returns (address);\n\n    /// @notice Returns the views implementation address\n    function views_implementation() external view returns (address);\n\n    /// @notice Returns the pool implementation at the given index\n    function pool_implementations(uint256 index) external view returns (address);\n\n    /// @notice Returns the number of deployed pools\n    function pool_count() external view returns (uint256);\n\n    /// @notice Returns the pool address at the given index\n    function pool_list(uint256 index) external view returns (address);\n\n    /// @notice Check if a pool is a metapool\n    /// @param _pool Address of the pool\n    /// @return True if the pool is a metapool\n    function is_meta(address _pool) external view returns (bool);\n\n    /// @notice Get the number of coins in a pool\n    /// @param _pool Pool address (must be deployed by this factory)\n    /// @return Number of coins in the pool\n    /// @dev Reverts if pool was not deployed by this factory\n    function get_n_coins(address _pool) external view returns (uint256);\n}\n"},"lib/v4-core/src/libraries/StateLibrary.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {PoolId} from \"../types/PoolId.sol\";\nimport {IPoolManager} from \"../interfaces/IPoolManager.sol\";\nimport {Position} from \"./Position.sol\";\n\n/// @notice A helper library to provide state getters that use extsload\nlibrary StateLibrary {\n    /// @notice index of pools mapping in the PoolManager\n    bytes32 public constant POOLS_SLOT = bytes32(uint256(6));\n\n    /// @notice index of feeGrowthGlobal0X128 in Pool.State\n    uint256 public constant FEE_GROWTH_GLOBAL0_OFFSET = 1;\n\n    // feeGrowthGlobal1X128 offset in Pool.State = 2\n\n    /// @notice index of liquidity in Pool.State\n    uint256 public constant LIQUIDITY_OFFSET = 3;\n\n    /// @notice index of TicksInfo mapping in Pool.State: mapping(int24 => TickInfo) ticks;\n    uint256 public constant TICKS_OFFSET = 4;\n\n    /// @notice index of tickBitmap mapping in Pool.State\n    uint256 public constant TICK_BITMAP_OFFSET = 5;\n\n    /// @notice index of Position.State mapping in Pool.State: mapping(bytes32 => Position.State) positions;\n    uint256 public constant POSITIONS_OFFSET = 6;\n\n    /**\n     * @notice Get Slot0 of the pool: sqrtPriceX96, tick, protocolFee, lpFee\n     * @dev Corresponds to pools[poolId].slot0\n     * @param manager The pool manager contract.\n     * @param poolId The ID of the pool.\n     * @return sqrtPriceX96 The square root of the price of the pool, in Q96 precision.\n     * @return tick The current tick of the pool.\n     * @return protocolFee The protocol fee of the pool.\n     * @return lpFee The swap fee of the pool.\n     */\n    function getSlot0(IPoolManager manager, PoolId poolId)\n        internal\n        view\n        returns (uint160 sqrtPriceX96, int24 tick, uint24 protocolFee, uint24 lpFee)\n    {\n        // slot key of Pool.State value: `pools[poolId]`\n        bytes32 stateSlot = _getPoolStateSlot(poolId);\n\n        bytes32 data = manager.extsload(stateSlot);\n\n        //   24 bits  |24bits|24bits      |24 bits|160 bits\n        // 0x000000   |000bb8|000000      |ffff75 |0000000000000000fe3aa841ba359daa0ea9eff7\n        // ---------- | fee  |protocolfee | tick  | sqrtPriceX96\n        assembly (\"memory-safe\") {\n            // bottom 160 bits of data\n            sqrtPriceX96 := and(data, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF)\n            // next 24 bits of data\n            tick := signextend(2, shr(160, data))\n            // next 24 bits of data\n            protocolFee := and(shr(184, data), 0xFFFFFF)\n            // last 24 bits of data\n            lpFee := and(shr(208, data), 0xFFFFFF)\n        }\n    }\n\n    /**\n     * @notice Retrieves the tick information of a pool at a specific tick.\n     * @dev Corresponds to pools[poolId].ticks[tick]\n     * @param manager The pool manager contract.\n     * @param poolId The ID of the pool.\n     * @param tick The tick to retrieve information for.\n     * @return liquidityGross The total position liquidity that references this tick\n     * @return liquidityNet The amount of net liquidity added (subtracted) when tick is crossed from left to right (right to left)\n     * @return feeGrowthOutside0X128 fee growth per unit of liquidity on the _other_ side of this tick (relative to the current tick)\n     * @return feeGrowthOutside1X128 fee growth per unit of liquidity on the _other_ side of this tick (relative to the current tick)\n     */\n    function getTickInfo(IPoolManager manager, PoolId poolId, int24 tick)\n        internal\n        view\n        returns (\n            uint128 liquidityGross,\n            int128 liquidityNet,\n            uint256 feeGrowthOutside0X128,\n            uint256 feeGrowthOutside1X128\n        )\n    {\n        bytes32 slot = _getTickInfoSlot(poolId, tick);\n\n        // read all 3 words of the TickInfo struct\n        bytes32[] memory data = manager.extsload(slot, 3);\n        assembly (\"memory-safe\") {\n            let firstWord := mload(add(data, 32))\n            liquidityNet := sar(128, firstWord)\n            liquidityGross := and(firstWord, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF)\n            feeGrowthOutside0X128 := mload(add(data, 64))\n            feeGrowthOutside1X128 := mload(add(data, 96))\n        }\n    }\n\n    /**\n     * @notice Retrieves the liquidity information of a pool at a specific tick.\n     * @dev Corresponds to pools[poolId].ticks[tick].liquidityGross and pools[poolId].ticks[tick].liquidityNet. A more gas efficient version of getTickInfo\n     * @param manager The pool manager contract.\n     * @param poolId The ID of the pool.\n     * @param tick The tick to retrieve liquidity for.\n     * @return liquidityGross The total position liquidity that references this tick\n     * @return liquidityNet The amount of net liquidity added (subtracted) when tick is crossed from left to right (right to left)\n     */\n    function getTickLiquidity(IPoolManager manager, PoolId poolId, int24 tick)\n        internal\n        view\n        returns (uint128 liquidityGross, int128 liquidityNet)\n    {\n        bytes32 slot = _getTickInfoSlot(poolId, tick);\n\n        bytes32 value = manager.extsload(slot);\n        assembly (\"memory-safe\") {\n            liquidityNet := sar(128, value)\n            liquidityGross := and(value, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF)\n        }\n    }\n\n    /**\n     * @notice Retrieves the fee growth outside a tick range of a pool\n     * @dev Corresponds to pools[poolId].ticks[tick].feeGrowthOutside0X128 and pools[poolId].ticks[tick].feeGrowthOutside1X128. A more gas efficient version of getTickInfo\n     * @param manager The pool manager contract.\n     * @param poolId The ID of the pool.\n     * @param tick The tick to retrieve fee growth for.\n     * @return feeGrowthOutside0X128 fee growth per unit of liquidity on the _other_ side of this tick (relative to the current tick)\n     * @return feeGrowthOutside1X128 fee growth per unit of liquidity on the _other_ side of this tick (relative to the current tick)\n     */\n    function getTickFeeGrowthOutside(IPoolManager manager, PoolId poolId, int24 tick)\n        internal\n        view\n        returns (uint256 feeGrowthOutside0X128, uint256 feeGrowthOutside1X128)\n    {\n        bytes32 slot = _getTickInfoSlot(poolId, tick);\n\n        // offset by 1 word, since the first word is liquidityGross + liquidityNet\n        bytes32[] memory data = manager.extsload(bytes32(uint256(slot) + 1), 2);\n        assembly (\"memory-safe\") {\n            feeGrowthOutside0X128 := mload(add(data, 32))\n            feeGrowthOutside1X128 := mload(add(data, 64))\n        }\n    }\n\n    /**\n     * @notice Retrieves the global fee growth of a pool.\n     * @dev Corresponds to pools[poolId].feeGrowthGlobal0X128 and pools[poolId].feeGrowthGlobal1X128\n     * @param manager The pool manager contract.\n     * @param poolId The ID of the pool.\n     * @return feeGrowthGlobal0 The global fee growth for token0.\n     * @return feeGrowthGlobal1 The global fee growth for token1.\n     * @dev Note that feeGrowthGlobal can be artificially inflated\n     * For pools with a single liquidity position, actors can donate to themselves to freely inflate feeGrowthGlobal\n     * atomically donating and collecting fees in the same unlockCallback may make the inflated value more extreme\n     */\n    function getFeeGrowthGlobals(IPoolManager manager, PoolId poolId)\n        internal\n        view\n        returns (uint256 feeGrowthGlobal0, uint256 feeGrowthGlobal1)\n    {\n        // slot key of Pool.State value: `pools[poolId]`\n        bytes32 stateSlot = _getPoolStateSlot(poolId);\n\n        // Pool.State, `uint256 feeGrowthGlobal0X128`\n        bytes32 slot_feeGrowthGlobal0X128 = bytes32(uint256(stateSlot) + FEE_GROWTH_GLOBAL0_OFFSET);\n\n        // read the 2 words of feeGrowthGlobal\n        bytes32[] memory data = manager.extsload(slot_feeGrowthGlobal0X128, 2);\n        assembly (\"memory-safe\") {\n            feeGrowthGlobal0 := mload(add(data, 32))\n            feeGrowthGlobal1 := mload(add(data, 64))\n        }\n    }\n\n    /**\n     * @notice Retrieves total the liquidity of a pool.\n     * @dev Corresponds to pools[poolId].liquidity\n     * @param manager The pool manager contract.\n     * @param poolId The ID of the pool.\n     * @return liquidity The liquidity of the pool.\n     */\n    function getLiquidity(IPoolManager manager, PoolId poolId) internal view returns (uint128 liquidity) {\n        // slot key of Pool.State value: `pools[poolId]`\n        bytes32 stateSlot = _getPoolStateSlot(poolId);\n\n        // Pool.State: `uint128 liquidity`\n        bytes32 slot = bytes32(uint256(stateSlot) + LIQUIDITY_OFFSET);\n\n        liquidity = uint128(uint256(manager.extsload(slot)));\n    }\n\n    /**\n     * @notice Retrieves the tick bitmap of a pool at a specific tick.\n     * @dev Corresponds to pools[poolId].tickBitmap[tick]\n     * @param manager The pool manager contract.\n     * @param poolId The ID of the pool.\n     * @param tick The tick to retrieve the bitmap for.\n     * @return tickBitmap The bitmap of the tick.\n     */\n    function getTickBitmap(IPoolManager manager, PoolId poolId, int16 tick)\n        internal\n        view\n        returns (uint256 tickBitmap)\n    {\n        // slot key of Pool.State value: `pools[poolId]`\n        bytes32 stateSlot = _getPoolStateSlot(poolId);\n\n        // Pool.State: `mapping(int16 => uint256) tickBitmap;`\n        bytes32 tickBitmapMapping = bytes32(uint256(stateSlot) + TICK_BITMAP_OFFSET);\n\n        // slot id of the mapping key: `pools[poolId].tickBitmap[tick]\n        bytes32 slot = keccak256(abi.encodePacked(int256(tick), tickBitmapMapping));\n\n        tickBitmap = uint256(manager.extsload(slot));\n    }\n\n    /**\n     * @notice Retrieves the position information of a pool without needing to calculate the `positionId`.\n     * @dev Corresponds to pools[poolId].positions[positionId]\n     * @param poolId The ID of the pool.\n     * @param owner The owner of the liquidity position.\n     * @param tickLower The lower tick of the liquidity range.\n     * @param tickUpper The upper tick of the liquidity range.\n     * @param salt The bytes32 randomness to further distinguish position state.\n     * @return liquidity The liquidity of the position.\n     * @return feeGrowthInside0LastX128 The fee growth inside the position for token0.\n     * @return feeGrowthInside1LastX128 The fee growth inside the position for token1.\n     */\n    function getPositionInfo(\n        IPoolManager manager,\n        PoolId poolId,\n        address owner,\n        int24 tickLower,\n        int24 tickUpper,\n        bytes32 salt\n    ) internal view returns (uint128 liquidity, uint256 feeGrowthInside0LastX128, uint256 feeGrowthInside1LastX128) {\n        // positionKey = keccak256(abi.encodePacked(owner, tickLower, tickUpper, salt))\n        bytes32 positionKey = Position.calculatePositionKey(owner, tickLower, tickUpper, salt);\n\n        (liquidity, feeGrowthInside0LastX128, feeGrowthInside1LastX128) = getPositionInfo(manager, poolId, positionKey);\n    }\n\n    /**\n     * @notice Retrieves the position information of a pool at a specific position ID.\n     * @dev Corresponds to pools[poolId].positions[positionId]\n     * @param manager The pool manager contract.\n     * @param poolId The ID of the pool.\n     * @param positionId The ID of the position.\n     * @return liquidity The liquidity of the position.\n     * @return feeGrowthInside0LastX128 The fee growth inside the position for token0.\n     * @return feeGrowthInside1LastX128 The fee growth inside the position for token1.\n     */\n    function getPositionInfo(IPoolManager manager, PoolId poolId, bytes32 positionId)\n        internal\n        view\n        returns (uint128 liquidity, uint256 feeGrowthInside0LastX128, uint256 feeGrowthInside1LastX128)\n    {\n        bytes32 slot = _getPositionInfoSlot(poolId, positionId);\n\n        // read all 3 words of the Position.State struct\n        bytes32[] memory data = manager.extsload(slot, 3);\n\n        assembly (\"memory-safe\") {\n            liquidity := mload(add(data, 32))\n            feeGrowthInside0LastX128 := mload(add(data, 64))\n            feeGrowthInside1LastX128 := mload(add(data, 96))\n        }\n    }\n\n    /**\n     * @notice Retrieves the liquidity of a position.\n     * @dev Corresponds to pools[poolId].positions[positionId].liquidity. More gas efficient for just retrieiving liquidity as compared to getPositionInfo\n     * @param manager The pool manager contract.\n     * @param poolId The ID of the pool.\n     * @param positionId The ID of the position.\n     * @return liquidity The liquidity of the position.\n     */\n    function getPositionLiquidity(IPoolManager manager, PoolId poolId, bytes32 positionId)\n        internal\n        view\n        returns (uint128 liquidity)\n    {\n        bytes32 slot = _getPositionInfoSlot(poolId, positionId);\n        liquidity = uint128(uint256(manager.extsload(slot)));\n    }\n\n    /**\n     * @notice Calculate the fee growth inside a tick range of a pool\n     * @dev pools[poolId].feeGrowthInside0LastX128 in Position.State is cached and can become stale. This function will calculate the up to date feeGrowthInside\n     * @param manager The pool manager contract.\n     * @param poolId The ID of the pool.\n     * @param tickLower The lower tick of the range.\n     * @param tickUpper The upper tick of the range.\n     * @return feeGrowthInside0X128 The fee growth inside the tick range for token0.\n     * @return feeGrowthInside1X128 The fee growth inside the tick range for token1.\n     */\n    function getFeeGrowthInside(IPoolManager manager, PoolId poolId, int24 tickLower, int24 tickUpper)\n        internal\n        view\n        returns (uint256 feeGrowthInside0X128, uint256 feeGrowthInside1X128)\n    {\n        (uint256 feeGrowthGlobal0X128, uint256 feeGrowthGlobal1X128) = getFeeGrowthGlobals(manager, poolId);\n\n        (uint256 lowerFeeGrowthOutside0X128, uint256 lowerFeeGrowthOutside1X128) =\n            getTickFeeGrowthOutside(manager, poolId, tickLower);\n        (uint256 upperFeeGrowthOutside0X128, uint256 upperFeeGrowthOutside1X128) =\n            getTickFeeGrowthOutside(manager, poolId, tickUpper);\n        (, int24 tickCurrent,,) = getSlot0(manager, poolId);\n        unchecked {\n            if (tickCurrent < tickLower) {\n                feeGrowthInside0X128 = lowerFeeGrowthOutside0X128 - upperFeeGrowthOutside0X128;\n                feeGrowthInside1X128 = lowerFeeGrowthOutside1X128 - upperFeeGrowthOutside1X128;\n            } else if (tickCurrent >= tickUpper) {\n                feeGrowthInside0X128 = upperFeeGrowthOutside0X128 - lowerFeeGrowthOutside0X128;\n                feeGrowthInside1X128 = upperFeeGrowthOutside1X128 - lowerFeeGrowthOutside1X128;\n            } else {\n                feeGrowthInside0X128 = feeGrowthGlobal0X128 - lowerFeeGrowthOutside0X128 - upperFeeGrowthOutside0X128;\n                feeGrowthInside1X128 = feeGrowthGlobal1X128 - lowerFeeGrowthOutside1X128 - upperFeeGrowthOutside1X128;\n            }\n        }\n    }\n\n    function _getPoolStateSlot(PoolId poolId) internal pure returns (bytes32) {\n        return keccak256(abi.encodePacked(PoolId.unwrap(poolId), POOLS_SLOT));\n    }\n\n    function _getTickInfoSlot(PoolId poolId, int24 tick) internal pure returns (bytes32) {\n        // slot key of Pool.State value: `pools[poolId]`\n        bytes32 stateSlot = _getPoolStateSlot(poolId);\n\n        // Pool.State: `mapping(int24 => TickInfo) ticks`\n        bytes32 ticksMappingSlot = bytes32(uint256(stateSlot) + TICKS_OFFSET);\n\n        // slot key of the tick key: `pools[poolId].ticks[tick]\n        return keccak256(abi.encodePacked(int256(tick), ticksMappingSlot));\n    }\n\n    function _getPositionInfoSlot(PoolId poolId, bytes32 positionId) internal pure returns (bytes32) {\n        // slot key of Pool.State value: `pools[poolId]`\n        bytes32 stateSlot = _getPoolStateSlot(poolId);\n\n        // Pool.State: `mapping(bytes32 => Position.State) positions;`\n        bytes32 positionMapping = bytes32(uint256(stateSlot) + POSITIONS_OFFSET);\n\n        // slot of the mapping key: `pools[poolId].positions[positionId]\n        return keccak256(abi.encodePacked(positionId, positionMapping));\n    }\n}\n"},"lib/v4-core/src/types/PoolId.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {PoolKey} from \"./PoolKey.sol\";\n\ntype PoolId is bytes32;\n\n/// @notice Library for computing the ID of a pool\nlibrary PoolIdLibrary {\n    /// @notice Returns value equal to keccak256(abi.encode(poolKey))\n    function toId(PoolKey memory poolKey) internal pure returns (PoolId poolId) {\n        assembly (\"memory-safe\") {\n            // 0xa0 represents the total size of the poolKey struct (5 slots of 32 bytes)\n            poolId := keccak256(poolKey, 0xa0)\n        }\n    }\n}\n"},"lib/v4-core/src/interfaces/IPoolManager.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.24;\n\nimport {Currency} from \"../types/Currency.sol\";\nimport {PoolKey} from \"../types/PoolKey.sol\";\nimport {IHooks} from \"./IHooks.sol\";\nimport {IERC6909Claims} from \"./external/IERC6909Claims.sol\";\nimport {IProtocolFees} from \"./IProtocolFees.sol\";\nimport {BalanceDelta} from \"../types/BalanceDelta.sol\";\nimport {PoolId} from \"../types/PoolId.sol\";\nimport {IExtsload} from \"./IExtsload.sol\";\nimport {IExttload} from \"./IExttload.sol\";\nimport {ModifyLiquidityParams, SwapParams} from \"../types/PoolOperation.sol\";\n\n/// @notice Interface for the PoolManager\ninterface IPoolManager is IProtocolFees, IERC6909Claims, IExtsload, IExttload {\n    /// @notice Thrown when a currency is not netted out after the contract is unlocked\n    error CurrencyNotSettled();\n\n    /// @notice Thrown when trying to interact with a non-initialized pool\n    error PoolNotInitialized();\n\n    /// @notice Thrown when unlock is called, but the contract is already unlocked\n    error AlreadyUnlocked();\n\n    /// @notice Thrown when a function is called that requires the contract to be unlocked, but it is not\n    error ManagerLocked();\n\n    /// @notice Pools are limited to type(int16).max tickSpacing in #initialize, to prevent overflow\n    error TickSpacingTooLarge(int24 tickSpacing);\n\n    /// @notice Pools must have a positive non-zero tickSpacing passed to #initialize\n    error TickSpacingTooSmall(int24 tickSpacing);\n\n    /// @notice PoolKey must have currencies where address(currency0) < address(currency1)\n    error CurrenciesOutOfOrderOrEqual(address currency0, address currency1);\n\n    /// @notice Thrown when a call to updateDynamicLPFee is made by an address that is not the hook,\n    /// or on a pool that does not have a dynamic swap fee.\n    error UnauthorizedDynamicLPFeeUpdate();\n\n    /// @notice Thrown when trying to swap amount of 0\n    error SwapAmountCannotBeZero();\n\n    ///@notice Thrown when native currency is passed to a non native settlement\n    error NonzeroNativeValue();\n\n    /// @notice Thrown when `clear` is called with an amount that is not exactly equal to the open currency delta.\n    error MustClearExactPositiveDelta();\n\n    /// @notice Emitted when a new pool is initialized\n    /// @param id The abi encoded hash of the pool key struct for the new pool\n    /// @param currency0 The first currency of the pool by address sort order\n    /// @param currency1 The second currency of the pool by address sort order\n    /// @param fee The fee collected upon every swap in the pool, denominated in hundredths of a bip\n    /// @param tickSpacing The minimum number of ticks between initialized ticks\n    /// @param hooks The hooks contract address for the pool, or address(0) if none\n    /// @param sqrtPriceX96 The price of the pool on initialization\n    /// @param tick The initial tick of the pool corresponding to the initialized price\n    event Initialize(\n        PoolId indexed id,\n        Currency indexed currency0,\n        Currency indexed currency1,\n        uint24 fee,\n        int24 tickSpacing,\n        IHooks hooks,\n        uint160 sqrtPriceX96,\n        int24 tick\n    );\n\n    /// @notice Emitted when a liquidity position is modified\n    /// @param id The abi encoded hash of the pool key struct for the pool that was modified\n    /// @param sender The address that modified the pool\n    /// @param tickLower The lower tick of the position\n    /// @param tickUpper The upper tick of the position\n    /// @param liquidityDelta The amount of liquidity that was added or removed\n    /// @param salt The extra data to make positions unique\n    event ModifyLiquidity(\n        PoolId indexed id, address indexed sender, int24 tickLower, int24 tickUpper, int256 liquidityDelta, bytes32 salt\n    );\n\n    /// @notice Emitted for swaps between currency0 and currency1\n    /// @param id The abi encoded hash of the pool key struct for the pool that was modified\n    /// @param sender The address that initiated the swap call, and that received the callback\n    /// @param amount0 The delta of the currency0 balance of the pool\n    /// @param amount1 The delta of the currency1 balance of the pool\n    /// @param sqrtPriceX96 The sqrt(price) of the pool after the swap, as a Q64.96\n    /// @param liquidity The liquidity of the pool after the swap\n    /// @param tick The log base 1.0001 of the price of the pool after the swap\n    /// @param fee The swap fee in hundredths of a bip\n    event Swap(\n        PoolId indexed id,\n        address indexed sender,\n        int128 amount0,\n        int128 amount1,\n        uint160 sqrtPriceX96,\n        uint128 liquidity,\n        int24 tick,\n        uint24 fee\n    );\n\n    /// @notice Emitted for donations\n    /// @param id The abi encoded hash of the pool key struct for the pool that was donated to\n    /// @param sender The address that initiated the donate call\n    /// @param amount0 The amount donated in currency0\n    /// @param amount1 The amount donated in currency1\n    event Donate(PoolId indexed id, address indexed sender, uint256 amount0, uint256 amount1);\n\n    /// @notice All interactions on the contract that account deltas require unlocking. A caller that calls `unlock` must implement\n    /// `IUnlockCallback(msg.sender).unlockCallback(data)`, where they interact with the remaining functions on this contract.\n    /// @dev The only functions callable without an unlocking are `initialize` and `updateDynamicLPFee`\n    /// @param data Any data to pass to the callback, via `IUnlockCallback(msg.sender).unlockCallback(data)`\n    /// @return The data returned by the call to `IUnlockCallback(msg.sender).unlockCallback(data)`\n    function unlock(bytes calldata data) external returns (bytes memory);\n\n    /// @notice Initialize the state for a given pool ID\n    /// @dev A swap fee totaling MAX_SWAP_FEE (100%) makes exact output swaps impossible since the input is entirely consumed by the fee\n    /// @param key The pool key for the pool to initialize\n    /// @param sqrtPriceX96 The initial square root price\n    /// @return tick The initial tick of the pool\n    function initialize(PoolKey memory key, uint160 sqrtPriceX96) external returns (int24 tick);\n\n    /// @notice Modify the liquidity for the given pool\n    /// @dev Poke by calling with a zero liquidityDelta\n    /// @param key The pool to modify liquidity in\n    /// @param params The parameters for modifying the liquidity\n    /// @param hookData The data to pass through to the add/removeLiquidity hooks\n    /// @return callerDelta The balance delta of the caller of modifyLiquidity. This is the total of both principal, fee deltas, and hook deltas if applicable\n    /// @return feesAccrued The balance delta of the fees generated in the liquidity range. Returned for informational purposes\n    /// @dev Note that feesAccrued can be artificially inflated by a malicious actor and integrators should be careful using the value\n    /// For pools with a single liquidity position, actors can donate to themselves to inflate feeGrowthGlobal (and consequently feesAccrued)\n    /// atomically donating and collecting fees in the same unlockCallback may make the inflated value more extreme\n    function modifyLiquidity(PoolKey memory key, ModifyLiquidityParams memory params, bytes calldata hookData)\n        external\n        returns (BalanceDelta callerDelta, BalanceDelta feesAccrued);\n\n    /// @notice Swap against the given pool\n    /// @param key The pool to swap in\n    /// @param params The parameters for swapping\n    /// @param hookData The data to pass through to the swap hooks\n    /// @return swapDelta The balance delta of the address swapping\n    /// @dev Swapping on low liquidity pools may cause unexpected swap amounts when liquidity available is less than amountSpecified.\n    /// Additionally note that if interacting with hooks that have the BEFORE_SWAP_RETURNS_DELTA_FLAG or AFTER_SWAP_RETURNS_DELTA_FLAG\n    /// the hook may alter the swap input/output. Integrators should perform checks on the returned swapDelta.\n    function swap(PoolKey memory key, SwapParams memory params, bytes calldata hookData)\n        external\n        returns (BalanceDelta swapDelta);\n\n    /// @notice Donate the given currency amounts to the in-range liquidity providers of a pool\n    /// @dev Calls to donate can be frontrun adding just-in-time liquidity, with the aim of receiving a portion donated funds.\n    /// Donors should keep this in mind when designing donation mechanisms.\n    /// @dev This function donates to in-range LPs at slot0.tick. In certain edge-cases of the swap algorithm, the `sqrtPrice` of\n    /// a pool can be at the lower boundary of tick `n`, but the `slot0.tick` of the pool is already `n - 1`. In this case a call to\n    /// `donate` would donate to tick `n - 1` (slot0.tick) not tick `n` (getTickAtSqrtPrice(slot0.sqrtPriceX96)).\n    /// Read the comments in `Pool.swap()` for more information about this.\n    /// @param key The key of the pool to donate to\n    /// @param amount0 The amount of currency0 to donate\n    /// @param amount1 The amount of currency1 to donate\n    /// @param hookData The data to pass through to the donate hooks\n    /// @return BalanceDelta The delta of the caller after the donate\n    function donate(PoolKey memory key, uint256 amount0, uint256 amount1, bytes calldata hookData)\n        external\n        returns (BalanceDelta);\n\n    /// @notice Writes the current ERC20 balance of the specified currency to transient storage\n    /// This is used to checkpoint balances for the manager and derive deltas for the caller.\n    /// @dev This MUST be called before any ERC20 tokens are sent into the contract, but can be skipped\n    /// for native tokens because the amount to settle is determined by the sent value.\n    /// However, if an ERC20 token has been synced and not settled, and the caller instead wants to settle\n    /// native funds, this function can be called with the native currency to then be able to settle the native currency\n    function sync(Currency currency) external;\n\n    /// @notice Called by the user to net out some value owed to the user\n    /// @dev Will revert if the requested amount is not available, consider using `mint` instead\n    /// @dev Can also be used as a mechanism for free flash loans\n    /// @param currency The currency to withdraw from the pool manager\n    /// @param to The address to withdraw to\n    /// @param amount The amount of currency to withdraw\n    function take(Currency currency, address to, uint256 amount) external;\n\n    /// @notice Called by the user to pay what is owed\n    /// @return paid The amount of currency settled\n    function settle() external payable returns (uint256 paid);\n\n    /// @notice Called by the user to pay on behalf of another address\n    /// @param recipient The address to credit for the payment\n    /// @return paid The amount of currency settled\n    function settleFor(address recipient) external payable returns (uint256 paid);\n\n    /// @notice WARNING - Any currency that is cleared, will be non-retrievable, and locked in the contract permanently.\n    /// A call to clear will zero out a positive balance WITHOUT a corresponding transfer.\n    /// @dev This could be used to clear a balance that is considered dust.\n    /// Additionally, the amount must be the exact positive balance. This is to enforce that the caller is aware of the amount being cleared.\n    function clear(Currency currency, uint256 amount) external;\n\n    /// @notice Called by the user to move value into ERC6909 balance\n    /// @param to The address to mint the tokens to\n    /// @param id The currency address to mint to ERC6909s, as a uint256\n    /// @param amount The amount of currency to mint\n    /// @dev The id is converted to a uint160 to correspond to a currency address\n    /// If the upper 12 bytes are not 0, they will be 0-ed out\n    function mint(address to, uint256 id, uint256 amount) external;\n\n    /// @notice Called by the user to move value from ERC6909 balance\n    /// @param from The address to burn the tokens from\n    /// @param id The currency address to burn from ERC6909s, as a uint256\n    /// @param amount The amount of currency to burn\n    /// @dev The id is converted to a uint160 to correspond to a currency address\n    /// If the upper 12 bytes are not 0, they will be 0-ed out\n    function burn(address from, uint256 id, uint256 amount) external;\n\n    /// @notice Updates the pools lp fees for the a pool that has enabled dynamic lp fees.\n    /// @dev A swap fee totaling MAX_SWAP_FEE (100%) makes exact output swaps impossible since the input is entirely consumed by the fee\n    /// @param key The key of the pool to update dynamic LP fees for\n    /// @param newDynamicLPFee The new dynamic pool LP fee\n    function updateDynamicLPFee(PoolKey memory key, uint24 newDynamicLPFee) external;\n}\n"},"lib/v4-core/src/types/PoolKey.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {Currency} from \"./Currency.sol\";\nimport {IHooks} from \"../interfaces/IHooks.sol\";\nimport {PoolIdLibrary} from \"./PoolId.sol\";\n\nusing PoolIdLibrary for PoolKey global;\n\n/// @notice Returns the key for identifying a pool\nstruct PoolKey {\n    /// @notice The lower currency of the pool, sorted numerically\n    Currency currency0;\n    /// @notice The higher currency of the pool, sorted numerically\n    Currency currency1;\n    /// @notice The pool LP fee, capped at 1_000_000. If the highest bit is 1, the pool has a dynamic fee and must be exactly equal to 0x800000\n    uint24 fee;\n    /// @notice Ticks that involve positions must be a multiple of tick spacing\n    int24 tickSpacing;\n    /// @notice The hooks of the pool\n    IHooks hooks;\n}\n"},"lib/v4-core/src/types/PoolOperation.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.24;\n\nimport {PoolKey} from \"../types/PoolKey.sol\";\nimport {BalanceDelta} from \"../types/BalanceDelta.sol\";\n\n/// @notice Parameter struct for `ModifyLiquidity` pool operations\nstruct ModifyLiquidityParams {\n    // the lower and upper tick of the position\n    int24 tickLower;\n    int24 tickUpper;\n    // how to modify the liquidity\n    int256 liquidityDelta;\n    // a value to set if you want unique liquidity positions at the same range\n    bytes32 salt;\n}\n\n/// @notice Parameter struct for `Swap` pool operations\nstruct SwapParams {\n    /// Whether to swap token0 for token1 or vice versa\n    bool zeroForOne;\n    /// The desired input amount if negative (exactIn), or the desired output amount if positive (exactOut)\n    int256 amountSpecified;\n    /// The sqrt price at which, if reached, the swap will stop executing\n    uint160 sqrtPriceLimitX96;\n}\n"},"lib/v4-core/src/types/Currency.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {IERC20Minimal} from \"../interfaces/external/IERC20Minimal.sol\";\nimport {CustomRevert} from \"../libraries/CustomRevert.sol\";\n\ntype Currency is address;\n\nusing {greaterThan as >, lessThan as <, greaterThanOrEqualTo as >=, equals as ==} for Currency global;\nusing CurrencyLibrary for Currency global;\n\nfunction equals(Currency currency, Currency other) pure returns (bool) {\n    return Currency.unwrap(currency) == Currency.unwrap(other);\n}\n\nfunction greaterThan(Currency currency, Currency other) pure returns (bool) {\n    return Currency.unwrap(currency) > Currency.unwrap(other);\n}\n\nfunction lessThan(Currency currency, Currency other) pure returns (bool) {\n    return Currency.unwrap(currency) < Currency.unwrap(other);\n}\n\nfunction greaterThanOrEqualTo(Currency currency, Currency other) pure returns (bool) {\n    return Currency.unwrap(currency) >= Currency.unwrap(other);\n}\n\n/// @title CurrencyLibrary\n/// @dev This library allows for transferring and holding native tokens and ERC20 tokens\nlibrary CurrencyLibrary {\n    /// @notice Additional context for ERC-7751 wrapped error when a native transfer fails\n    error NativeTransferFailed();\n\n    /// @notice Additional context for ERC-7751 wrapped error when an ERC20 transfer fails\n    error ERC20TransferFailed();\n\n    /// @notice A constant to represent the native currency\n    Currency public constant ADDRESS_ZERO = Currency.wrap(address(0));\n\n    function transfer(Currency currency, address to, uint256 amount) internal {\n        // altered from https://github.com/transmissions11/solmate/blob/44a9963d4c78111f77caa0e65d677b8b46d6f2e6/src/utils/SafeTransferLib.sol\n        // modified custom error selectors\n\n        bool success;\n        if (currency.isAddressZero()) {\n            assembly (\"memory-safe\") {\n                // Transfer the ETH and revert if it fails.\n                success := call(gas(), to, amount, 0, 0, 0, 0)\n            }\n            // revert with NativeTransferFailed, containing the bubbled up error as an argument\n            if (!success) {\n                CustomRevert.bubbleUpAndRevertWith(to, bytes4(0), NativeTransferFailed.selector);\n            }\n        } else {\n            assembly (\"memory-safe\") {\n                // Get a pointer to some free memory.\n                let fmp := mload(0x40)\n\n                // Write the abi-encoded calldata into memory, beginning with the function selector.\n                mstore(fmp, 0xa9059cbb00000000000000000000000000000000000000000000000000000000)\n                mstore(add(fmp, 4), and(to, 0xffffffffffffffffffffffffffffffffffffffff)) // Append and mask the \"to\" argument.\n                mstore(add(fmp, 36), amount) // Append the \"amount\" argument. Masking not required as it's a full 32 byte type.\n\n                success :=\n                    and(\n                        // Set success to whether the call reverted, if not we check it either\n                        // returned exactly 1 (can't just be non-zero data), or had no return data.\n                        or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize())),\n                        // We use 68 because the length of our calldata totals up like so: 4 + 32 * 2.\n                        // We use 0 and 32 to copy up to 32 bytes of return data into the scratch space.\n                        // Counterintuitively, this call must be positioned second to the or() call in the\n                        // surrounding and() call or else returndatasize() will be zero during the computation.\n                        call(gas(), currency, 0, fmp, 68, 0, 32)\n                    )\n\n                // Now clean the memory we used\n                mstore(fmp, 0) // 4 byte `selector` and 28 bytes of `to` were stored here\n                mstore(add(fmp, 0x20), 0) // 4 bytes of `to` and 28 bytes of `amount` were stored here\n                mstore(add(fmp, 0x40), 0) // 4 bytes of `amount` were stored here\n            }\n            // revert with ERC20TransferFailed, containing the bubbled up error as an argument\n            if (!success) {\n                CustomRevert.bubbleUpAndRevertWith(\n                    Currency.unwrap(currency), IERC20Minimal.transfer.selector, ERC20TransferFailed.selector\n                );\n            }\n        }\n    }\n\n    function balanceOfSelf(Currency currency) internal view returns (uint256) {\n        if (currency.isAddressZero()) {\n            return address(this).balance;\n        } else {\n            return IERC20Minimal(Currency.unwrap(currency)).balanceOf(address(this));\n        }\n    }\n\n    function balanceOf(Currency currency, address owner) internal view returns (uint256) {\n        if (currency.isAddressZero()) {\n            return owner.balance;\n        } else {\n            return IERC20Minimal(Currency.unwrap(currency)).balanceOf(owner);\n        }\n    }\n\n    function isAddressZero(Currency currency) internal pure returns (bool) {\n        return Currency.unwrap(currency) == Currency.unwrap(ADDRESS_ZERO);\n    }\n\n    function toId(Currency currency) internal pure returns (uint256) {\n        return uint160(Currency.unwrap(currency));\n    }\n\n    // If the upper 12 bytes are non-zero, they will be zero-ed out\n    // Therefore, fromId() and toId() are not inverses of each other\n    function fromId(uint256 id) internal pure returns (Currency) {\n        return Currency.wrap(address(uint160(id)));\n    }\n}\n"},"lib/v4-core/src/interfaces/IHooks.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {PoolKey} from \"../types/PoolKey.sol\";\nimport {BalanceDelta} from \"../types/BalanceDelta.sol\";\nimport {ModifyLiquidityParams, SwapParams} from \"../types/PoolOperation.sol\";\nimport {BeforeSwapDelta} from \"../types/BeforeSwapDelta.sol\";\n\n/// @notice V4 decides whether to invoke specific hooks by inspecting the least significant bits\n/// of the address that the hooks contract is deployed to.\n/// For example, a hooks contract deployed to address: 0x0000000000000000000000000000000000002400\n/// has the lowest bits '10 0100 0000 0000' which would cause the 'before initialize' and 'after add liquidity' hooks to be used.\n/// See the Hooks library for the full spec.\n/// @dev Should only be callable by the v4 PoolManager.\ninterface IHooks {\n    /// @notice The hook called before the state of a pool is initialized\n    /// @param sender The initial msg.sender for the initialize call\n    /// @param key The key for the pool being initialized\n    /// @param sqrtPriceX96 The sqrt(price) of the pool as a Q64.96\n    /// @return bytes4 The function selector for the hook\n    function beforeInitialize(address sender, PoolKey calldata key, uint160 sqrtPriceX96) external returns (bytes4);\n\n    /// @notice The hook called after the state of a pool is initialized\n    /// @param sender The initial msg.sender for the initialize call\n    /// @param key The key for the pool being initialized\n    /// @param sqrtPriceX96 The sqrt(price) of the pool as a Q64.96\n    /// @param tick The current tick after the state of a pool is initialized\n    /// @return bytes4 The function selector for the hook\n    function afterInitialize(address sender, PoolKey calldata key, uint160 sqrtPriceX96, int24 tick)\n        external\n        returns (bytes4);\n\n    /// @notice The hook called before liquidity is added\n    /// @param sender The initial msg.sender for the add liquidity call\n    /// @param key The key for the pool\n    /// @param params The parameters for adding liquidity\n    /// @param hookData Arbitrary data handed into the PoolManager by the liquidity provider to be passed on to the hook\n    /// @return bytes4 The function selector for the hook\n    function beforeAddLiquidity(\n        address sender,\n        PoolKey calldata key,\n        ModifyLiquidityParams calldata params,\n        bytes calldata hookData\n    ) external returns (bytes4);\n\n    /// @notice The hook called after liquidity is added\n    /// @param sender The initial msg.sender for the add liquidity call\n    /// @param key The key for the pool\n    /// @param params The parameters for adding liquidity\n    /// @param delta The caller's balance delta after adding liquidity; the sum of principal delta, fees accrued, and hook delta\n    /// @param feesAccrued The fees accrued since the last time fees were collected from this position\n    /// @param hookData Arbitrary data handed into the PoolManager by the liquidity provider to be passed on to the hook\n    /// @return bytes4 The function selector for the hook\n    /// @return BalanceDelta The hook's delta in token0 and token1. Positive: the hook is owed/took currency, negative: the hook owes/sent currency\n    function afterAddLiquidity(\n        address sender,\n        PoolKey calldata key,\n        ModifyLiquidityParams calldata params,\n        BalanceDelta delta,\n        BalanceDelta feesAccrued,\n        bytes calldata hookData\n    ) external returns (bytes4, BalanceDelta);\n\n    /// @notice The hook called before liquidity is removed\n    /// @param sender The initial msg.sender for the remove liquidity call\n    /// @param key The key for the pool\n    /// @param params The parameters for removing liquidity\n    /// @param hookData Arbitrary data handed into the PoolManager by the liquidity provider to be be passed on to the hook\n    /// @return bytes4 The function selector for the hook\n    function beforeRemoveLiquidity(\n        address sender,\n        PoolKey calldata key,\n        ModifyLiquidityParams calldata params,\n        bytes calldata hookData\n    ) external returns (bytes4);\n\n    /// @notice The hook called after liquidity is removed\n    /// @param sender The initial msg.sender for the remove liquidity call\n    /// @param key The key for the pool\n    /// @param params The parameters for removing liquidity\n    /// @param delta The caller's balance delta after removing liquidity; the sum of principal delta, fees accrued, and hook delta\n    /// @param feesAccrued The fees accrued since the last time fees were collected from this position\n    /// @param hookData Arbitrary data handed into the PoolManager by the liquidity provider to be be passed on to the hook\n    /// @return bytes4 The function selector for the hook\n    /// @return BalanceDelta The hook's delta in token0 and token1. Positive: the hook is owed/took currency, negative: the hook owes/sent currency\n    function afterRemoveLiquidity(\n        address sender,\n        PoolKey calldata key,\n        ModifyLiquidityParams calldata params,\n        BalanceDelta delta,\n        BalanceDelta feesAccrued,\n        bytes calldata hookData\n    ) external returns (bytes4, BalanceDelta);\n\n    /// @notice The hook called before a swap\n    /// @param sender The initial msg.sender for the swap call\n    /// @param key The key for the pool\n    /// @param params The parameters for the swap\n    /// @param hookData Arbitrary data handed into the PoolManager by the swapper to be be passed on to the hook\n    /// @return bytes4 The function selector for the hook\n    /// @return BeforeSwapDelta The hook's delta in specified and unspecified currencies. Positive: the hook is owed/took currency, negative: the hook owes/sent currency\n    /// @return uint24 Optionally override the lp fee, only used if three conditions are met: 1. the Pool has a dynamic fee, 2. the value's 2nd highest bit is set (23rd bit, 0x400000), and 3. the value is less than or equal to the maximum fee (1 million)\n    function beforeSwap(address sender, PoolKey calldata key, SwapParams calldata params, bytes calldata hookData)\n        external\n        returns (bytes4, BeforeSwapDelta, uint24);\n\n    /// @notice The hook called after a swap\n    /// @param sender The initial msg.sender for the swap call\n    /// @param key The key for the pool\n    /// @param params The parameters for the swap\n    /// @param delta The amount owed to the caller (positive) or owed to the pool (negative)\n    /// @param hookData Arbitrary data handed into the PoolManager by the swapper to be be passed on to the hook\n    /// @return bytes4 The function selector for the hook\n    /// @return int128 The hook's delta in unspecified currency. Positive: the hook is owed/took currency, negative: the hook owes/sent currency\n    function afterSwap(\n        address sender,\n        PoolKey calldata key,\n        SwapParams calldata params,\n        BalanceDelta delta,\n        bytes calldata hookData\n    ) external returns (bytes4, int128);\n\n    /// @notice The hook called before donate\n    /// @param sender The initial msg.sender for the donate call\n    /// @param key The key for the pool\n    /// @param amount0 The amount of token0 being donated\n    /// @param amount1 The amount of token1 being donated\n    /// @param hookData Arbitrary data handed into the PoolManager by the donor to be be passed on to the hook\n    /// @return bytes4 The function selector for the hook\n    function beforeDonate(\n        address sender,\n        PoolKey calldata key,\n        uint256 amount0,\n        uint256 amount1,\n        bytes calldata hookData\n    ) external returns (bytes4);\n\n    /// @notice The hook called after donate\n    /// @param sender The initial msg.sender for the donate call\n    /// @param key The key for the pool\n    /// @param amount0 The amount of token0 being donated\n    /// @param amount1 The amount of token1 being donated\n    /// @param hookData Arbitrary data handed into the PoolManager by the donor to be be passed on to the hook\n    /// @return bytes4 The function selector for the hook\n    function afterDonate(\n        address sender,\n        PoolKey calldata key,\n        uint256 amount0,\n        uint256 amount1,\n        bytes calldata hookData\n    ) external returns (bytes4);\n}\n"},"lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol)\n\npragma solidity >=0.4.16;\n\n/**\n * @dev Interface of the ERC-20 standard as defined in the ERC.\n */\ninterface IERC20 {\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    /**\n     * @dev Returns the value of tokens in existence.\n     */\n    function totalSupply() external view returns (uint256);\n\n    /**\n     * @dev Returns the value of tokens owned by `account`.\n     */\n    function balanceOf(address account) external view returns (uint256);\n\n    /**\n     * @dev Moves a `value` amount of tokens from the caller's account to `to`.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transfer(address to, uint256 value) 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 a `value` amount of tokens as the allowance of `spender` over the\n     * 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 value) external returns (bool);\n\n    /**\n     * @dev Moves a `value` amount of tokens from `from` to `to` using the\n     * allowance mechanism. `value` 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(address from, address to, uint256 value) external returns (bool);\n}\n"},"lib/openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.5.0) (token/ERC20/utils/SafeERC20.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"../IERC20.sol\";\nimport {IERC1363} from \"../../../interfaces/IERC1363.sol\";\n\n/**\n * @title SafeERC20\n * @dev Wrappers around ERC-20 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    /**\n     * @dev An operation with an ERC-20 token failed.\n     */\n    error SafeERC20FailedOperation(address token);\n\n    /**\n     * @dev Indicates a failed `decreaseAllowance` request.\n     */\n    error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease);\n\n    /**\n     * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,\n     * non-reverting calls are assumed to be successful.\n     */\n    function safeTransfer(IERC20 token, address to, uint256 value) internal {\n        if (!_safeTransfer(token, to, value, true)) {\n            revert SafeERC20FailedOperation(address(token));\n        }\n    }\n\n    /**\n     * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the\n     * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.\n     */\n    function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\n        if (!_safeTransferFrom(token, from, to, value, true)) {\n            revert SafeERC20FailedOperation(address(token));\n        }\n    }\n\n    /**\n     * @dev Variant of {safeTransfer} that returns a bool instead of reverting if the operation is not successful.\n     */\n    function trySafeTransfer(IERC20 token, address to, uint256 value) internal returns (bool) {\n        return _safeTransfer(token, to, value, false);\n    }\n\n    /**\n     * @dev Variant of {safeTransferFrom} that returns a bool instead of reverting if the operation is not successful.\n     */\n    function trySafeTransferFrom(IERC20 token, address from, address to, uint256 value) internal returns (bool) {\n        return _safeTransferFrom(token, from, to, value, false);\n    }\n\n    /**\n     * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\n     * non-reverting calls are assumed to be successful.\n     *\n     * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \"client\"\n     * smart contract uses ERC-7674 to set temporary allowances, then the \"client\" smart contract should avoid using\n     * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\n     * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\n     */\n    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n        uint256 oldAllowance = token.allowance(address(this), spender);\n        forceApprove(token, spender, oldAllowance + value);\n    }\n\n    /**\n     * @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no\n     * value, non-reverting calls are assumed to be successful.\n     *\n     * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \"client\"\n     * smart contract uses ERC-7674 to set temporary allowances, then the \"client\" smart contract should avoid using\n     * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\n     * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\n     */\n    function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal {\n        unchecked {\n            uint256 currentAllowance = token.allowance(address(this), spender);\n            if (currentAllowance < requestedDecrease) {\n                revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease);\n            }\n            forceApprove(token, spender, currentAllowance - requestedDecrease);\n        }\n    }\n\n    /**\n     * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,\n     * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval\n     * to be set to zero before setting it to a non-zero value, such as USDT.\n     *\n     * NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function\n     * only sets the \"standard\" allowance. Any temporary allowance will remain active, in addition to the value being\n     * set here.\n     */\n    function forceApprove(IERC20 token, address spender, uint256 value) internal {\n        if (!_safeApprove(token, spender, value, false)) {\n            if (!_safeApprove(token, spender, 0, true)) revert SafeERC20FailedOperation(address(token));\n            if (!_safeApprove(token, spender, value, true)) revert SafeERC20FailedOperation(address(token));\n        }\n    }\n\n    /**\n     * @dev Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no\n     * code. This can be used to implement an {ERC721}-like safe transfer that relies on {ERC1363} checks when\n     * targeting contracts.\n     *\n     * Reverts if the returned value is other than `true`.\n     */\n    function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\n        if (to.code.length == 0) {\n            safeTransfer(token, to, value);\n        } else if (!token.transferAndCall(to, value, data)) {\n            revert SafeERC20FailedOperation(address(token));\n        }\n    }\n\n    /**\n     * @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target\n     * has no code. This can be used to implement an {ERC721}-like safe transfer that relies on {ERC1363} checks when\n     * targeting contracts.\n     *\n     * Reverts if the returned value is other than `true`.\n     */\n    function transferFromAndCallRelaxed(\n        IERC1363 token,\n        address from,\n        address to,\n        uint256 value,\n        bytes memory data\n    ) internal {\n        if (to.code.length == 0) {\n            safeTransferFrom(token, from, to, value);\n        } else if (!token.transferFromAndCall(from, to, value, data)) {\n            revert SafeERC20FailedOperation(address(token));\n        }\n    }\n\n    /**\n     * @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no\n     * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\n     * targeting contracts.\n     *\n     * NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}.\n     * Oppositely, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall}\n     * once without retrying, and relies on the returned value to be true.\n     *\n     * Reverts if the returned value is other than `true`.\n     */\n    function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\n        if (to.code.length == 0) {\n            forceApprove(token, to, value);\n        } else if (!token.approveAndCall(to, value, data)) {\n            revert SafeERC20FailedOperation(address(token));\n        }\n    }\n\n    /**\n     * @dev Imitates a Solidity `token.transfer(to, value)` call, relaxing the requirement on the return value: the\n     * return value is optional (but if data is returned, it must not be false).\n     *\n     * @param token The token targeted by the call.\n     * @param to The recipient of the tokens\n     * @param value The amount of token to transfer\n     * @param bubble Behavior switch if the transfer call reverts: bubble the revert reason or return a false boolean.\n     */\n    function _safeTransfer(IERC20 token, address to, uint256 value, bool bubble) private returns (bool success) {\n        bytes4 selector = IERC20.transfer.selector;\n\n        assembly (\"memory-safe\") {\n            let fmp := mload(0x40)\n            mstore(0x00, selector)\n            mstore(0x04, and(to, shr(96, not(0))))\n            mstore(0x24, value)\n            success := call(gas(), token, 0, 0x00, 0x44, 0x00, 0x20)\n            // if call success and return is true, all is good.\n            // otherwise (not success or return is not true), we need to perform further checks\n            if iszero(and(success, eq(mload(0x00), 1))) {\n                // if the call was a failure and bubble is enabled, bubble the error\n                if and(iszero(success), bubble) {\n                    returndatacopy(fmp, 0x00, returndatasize())\n                    revert(fmp, returndatasize())\n                }\n                // if the return value is not true, then the call is only successful if:\n                // - the token address has code\n                // - the returndata is empty\n                success := and(success, and(iszero(returndatasize()), gt(extcodesize(token), 0)))\n            }\n            mstore(0x40, fmp)\n        }\n    }\n\n    /**\n     * @dev Imitates a Solidity `token.transferFrom(from, to, value)` call, relaxing the requirement on the return\n     * value: the return value is optional (but if data is returned, it must not be false).\n     *\n     * @param token The token targeted by the call.\n     * @param from The sender of the tokens\n     * @param to The recipient of the tokens\n     * @param value The amount of token to transfer\n     * @param bubble Behavior switch if the transfer call reverts: bubble the revert reason or return a false boolean.\n     */\n    function _safeTransferFrom(\n        IERC20 token,\n        address from,\n        address to,\n        uint256 value,\n        bool bubble\n    ) private returns (bool success) {\n        bytes4 selector = IERC20.transferFrom.selector;\n\n        assembly (\"memory-safe\") {\n            let fmp := mload(0x40)\n            mstore(0x00, selector)\n            mstore(0x04, and(from, shr(96, not(0))))\n            mstore(0x24, and(to, shr(96, not(0))))\n            mstore(0x44, value)\n            success := call(gas(), token, 0, 0x00, 0x64, 0x00, 0x20)\n            // if call success and return is true, all is good.\n            // otherwise (not success or return is not true), we need to perform further checks\n            if iszero(and(success, eq(mload(0x00), 1))) {\n                // if the call was a failure and bubble is enabled, bubble the error\n                if and(iszero(success), bubble) {\n                    returndatacopy(fmp, 0x00, returndatasize())\n                    revert(fmp, returndatasize())\n                }\n                // if the return value is not true, then the call is only successful if:\n                // - the token address has code\n                // - the returndata is empty\n                success := and(success, and(iszero(returndatasize()), gt(extcodesize(token), 0)))\n            }\n            mstore(0x40, fmp)\n            mstore(0x60, 0)\n        }\n    }\n\n    /**\n     * @dev Imitates a Solidity `token.approve(spender, value)` call, relaxing the requirement on the return value:\n     * the return value is optional (but if data is returned, it must not be false).\n     *\n     * @param token The token targeted by the call.\n     * @param spender The spender of the tokens\n     * @param value The amount of token to transfer\n     * @param bubble Behavior switch if the transfer call reverts: bubble the revert reason or return a false boolean.\n     */\n    function _safeApprove(IERC20 token, address spender, uint256 value, bool bubble) private returns (bool success) {\n        bytes4 selector = IERC20.approve.selector;\n\n        assembly (\"memory-safe\") {\n            let fmp := mload(0x40)\n            mstore(0x00, selector)\n            mstore(0x04, and(spender, shr(96, not(0))))\n            mstore(0x24, value)\n            success := call(gas(), token, 0, 0x00, 0x44, 0x00, 0x20)\n            // if call success and return is true, all is good.\n            // otherwise (not success or return is not true), we need to perform further checks\n            if iszero(and(success, eq(mload(0x00), 1))) {\n                // if the call was a failure and bubble is enabled, bubble the error\n                if and(iszero(success), bubble) {\n                    returndatacopy(fmp, 0x00, returndatasize())\n                    revert(fmp, returndatasize())\n                }\n                // if the return value is not true, then the call is only successful if:\n                // - the token address has code\n                // - the returndata is empty\n                success := and(success, and(iszero(returndatasize()), gt(extcodesize(token), 0)))\n            }\n            mstore(0x40, fmp)\n        }\n    }\n}\n"},"lib/v4-core/src/libraries/Hooks.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {PoolKey} from \"../types/PoolKey.sol\";\nimport {IHooks} from \"../interfaces/IHooks.sol\";\nimport {SafeCast} from \"./SafeCast.sol\";\nimport {LPFeeLibrary} from \"./LPFeeLibrary.sol\";\nimport {BalanceDelta, toBalanceDelta, BalanceDeltaLibrary} from \"../types/BalanceDelta.sol\";\nimport {BeforeSwapDelta, BeforeSwapDeltaLibrary} from \"../types/BeforeSwapDelta.sol\";\nimport {IPoolManager} from \"../interfaces/IPoolManager.sol\";\nimport {ModifyLiquidityParams, SwapParams} from \"../types/PoolOperation.sol\";\nimport {ParseBytes} from \"./ParseBytes.sol\";\nimport {CustomRevert} from \"./CustomRevert.sol\";\n\n/// @notice V4 decides whether to invoke specific hooks by inspecting the least significant bits\n/// of the address that the hooks contract is deployed to.\n/// For example, a hooks contract deployed to address: 0x0000000000000000000000000000000000002400\n/// has the lowest bits '10 0100 0000 0000' which would cause the 'before initialize' and 'after add liquidity' hooks to be used.\nlibrary Hooks {\n    using LPFeeLibrary for uint24;\n    using Hooks for IHooks;\n    using SafeCast for int256;\n    using BeforeSwapDeltaLibrary for BeforeSwapDelta;\n    using ParseBytes for bytes;\n    using CustomRevert for bytes4;\n\n    uint160 internal constant ALL_HOOK_MASK = uint160((1 << 14) - 1);\n\n    uint160 internal constant BEFORE_INITIALIZE_FLAG = 1 << 13;\n    uint160 internal constant AFTER_INITIALIZE_FLAG = 1 << 12;\n\n    uint160 internal constant BEFORE_ADD_LIQUIDITY_FLAG = 1 << 11;\n    uint160 internal constant AFTER_ADD_LIQUIDITY_FLAG = 1 << 10;\n\n    uint160 internal constant BEFORE_REMOVE_LIQUIDITY_FLAG = 1 << 9;\n    uint160 internal constant AFTER_REMOVE_LIQUIDITY_FLAG = 1 << 8;\n\n    uint160 internal constant BEFORE_SWAP_FLAG = 1 << 7;\n    uint160 internal constant AFTER_SWAP_FLAG = 1 << 6;\n\n    uint160 internal constant BEFORE_DONATE_FLAG = 1 << 5;\n    uint160 internal constant AFTER_DONATE_FLAG = 1 << 4;\n\n    uint160 internal constant BEFORE_SWAP_RETURNS_DELTA_FLAG = 1 << 3;\n    uint160 internal constant AFTER_SWAP_RETURNS_DELTA_FLAG = 1 << 2;\n    uint160 internal constant AFTER_ADD_LIQUIDITY_RETURNS_DELTA_FLAG = 1 << 1;\n    uint160 internal constant AFTER_REMOVE_LIQUIDITY_RETURNS_DELTA_FLAG = 1 << 0;\n\n    struct Permissions {\n        bool beforeInitialize;\n        bool afterInitialize;\n        bool beforeAddLiquidity;\n        bool afterAddLiquidity;\n        bool beforeRemoveLiquidity;\n        bool afterRemoveLiquidity;\n        bool beforeSwap;\n        bool afterSwap;\n        bool beforeDonate;\n        bool afterDonate;\n        bool beforeSwapReturnDelta;\n        bool afterSwapReturnDelta;\n        bool afterAddLiquidityReturnDelta;\n        bool afterRemoveLiquidityReturnDelta;\n    }\n\n    /// @notice Thrown if the address will not lead to the specified hook calls being called\n    /// @param hooks The address of the hooks contract\n    error HookAddressNotValid(address hooks);\n\n    /// @notice Hook did not return its selector\n    error InvalidHookResponse();\n\n    /// @notice Additional context for ERC-7751 wrapped error when a hook call fails\n    error HookCallFailed();\n\n    /// @notice The hook's delta changed the swap from exactIn to exactOut or vice versa\n    error HookDeltaExceedsSwapAmount();\n\n    /// @notice Utility function intended to be used in hook constructors to ensure\n    /// the deployed hooks address causes the intended hooks to be called\n    /// @param permissions The hooks that are intended to be called\n    /// @dev permissions param is memory as the function will be called from constructors\n    function validateHookPermissions(IHooks self, Permissions memory permissions) internal pure {\n        if (\n            permissions.beforeInitialize != self.hasPermission(BEFORE_INITIALIZE_FLAG)\n                || permissions.afterInitialize != self.hasPermission(AFTER_INITIALIZE_FLAG)\n                || permissions.beforeAddLiquidity != self.hasPermission(BEFORE_ADD_LIQUIDITY_FLAG)\n                || permissions.afterAddLiquidity != self.hasPermission(AFTER_ADD_LIQUIDITY_FLAG)\n                || permissions.beforeRemoveLiquidity != self.hasPermission(BEFORE_REMOVE_LIQUIDITY_FLAG)\n                || permissions.afterRemoveLiquidity != self.hasPermission(AFTER_REMOVE_LIQUIDITY_FLAG)\n                || permissions.beforeSwap != self.hasPermission(BEFORE_SWAP_FLAG)\n                || permissions.afterSwap != self.hasPermission(AFTER_SWAP_FLAG)\n                || permissions.beforeDonate != self.hasPermission(BEFORE_DONATE_FLAG)\n                || permissions.afterDonate != self.hasPermission(AFTER_DONATE_FLAG)\n                || permissions.beforeSwapReturnDelta != self.hasPermission(BEFORE_SWAP_RETURNS_DELTA_FLAG)\n                || permissions.afterSwapReturnDelta != self.hasPermission(AFTER_SWAP_RETURNS_DELTA_FLAG)\n                || permissions.afterAddLiquidityReturnDelta != self.hasPermission(AFTER_ADD_LIQUIDITY_RETURNS_DELTA_FLAG)\n                || permissions.afterRemoveLiquidityReturnDelta\n                    != self.hasPermission(AFTER_REMOVE_LIQUIDITY_RETURNS_DELTA_FLAG)\n        ) {\n            HookAddressNotValid.selector.revertWith(address(self));\n        }\n    }\n\n    /// @notice Ensures that the hook address includes at least one hook flag or dynamic fees, or is the 0 address\n    /// @param self The hook to verify\n    /// @param fee The fee of the pool the hook is used with\n    /// @return bool True if the hook address is valid\n    function isValidHookAddress(IHooks self, uint24 fee) internal pure returns (bool) {\n        // The hook can only have a flag to return a hook delta on an action if it also has the corresponding action flag\n        if (!self.hasPermission(BEFORE_SWAP_FLAG) && self.hasPermission(BEFORE_SWAP_RETURNS_DELTA_FLAG)) return false;\n        if (!self.hasPermission(AFTER_SWAP_FLAG) && self.hasPermission(AFTER_SWAP_RETURNS_DELTA_FLAG)) return false;\n        if (!self.hasPermission(AFTER_ADD_LIQUIDITY_FLAG) && self.hasPermission(AFTER_ADD_LIQUIDITY_RETURNS_DELTA_FLAG))\n        {\n            return false;\n        }\n        if (\n            !self.hasPermission(AFTER_REMOVE_LIQUIDITY_FLAG)\n                && self.hasPermission(AFTER_REMOVE_LIQUIDITY_RETURNS_DELTA_FLAG)\n        ) return false;\n\n        // If there is no hook contract set, then fee cannot be dynamic\n        // If a hook contract is set, it must have at least 1 flag set, or have a dynamic fee\n        return address(self) == address(0)\n            ? !fee.isDynamicFee()\n            : (uint160(address(self)) & ALL_HOOK_MASK > 0 || fee.isDynamicFee());\n    }\n\n    /// @notice performs a hook call using the given calldata on the given hook that doesn't return a delta\n    /// @return result The complete data returned by the hook\n    function callHook(IHooks self, bytes memory data) internal returns (bytes memory result) {\n        bool success;\n        assembly (\"memory-safe\") {\n            success := call(gas(), self, 0, add(data, 0x20), mload(data), 0, 0)\n        }\n        // Revert with FailedHookCall, containing any error message to bubble up\n        if (!success) CustomRevert.bubbleUpAndRevertWith(address(self), bytes4(data), HookCallFailed.selector);\n\n        // The call was successful, fetch the returned data\n        assembly (\"memory-safe\") {\n            // allocate result byte array from the free memory pointer\n            result := mload(0x40)\n            // store new free memory pointer at the end of the array padded to 32 bytes\n            mstore(0x40, add(result, and(add(returndatasize(), 0x3f), not(0x1f))))\n            // store length in memory\n            mstore(result, returndatasize())\n            // copy return data to result\n            returndatacopy(add(result, 0x20), 0, returndatasize())\n        }\n\n        // Length must be at least 32 to contain the selector. Check expected selector and returned selector match.\n        if (result.length < 32 || result.parseSelector() != data.parseSelector()) {\n            InvalidHookResponse.selector.revertWith();\n        }\n    }\n\n    /// @notice performs a hook call using the given calldata on the given hook\n    /// @return int256 The delta returned by the hook\n    function callHookWithReturnDelta(IHooks self, bytes memory data, bool parseReturn) internal returns (int256) {\n        bytes memory result = callHook(self, data);\n\n        // If this hook wasn't meant to return something, default to 0 delta\n        if (!parseReturn) return 0;\n\n        // A length of 64 bytes is required to return a bytes4, and a 32 byte delta\n        if (result.length != 64) InvalidHookResponse.selector.revertWith();\n        return result.parseReturnDelta();\n    }\n\n    /// @notice modifier to prevent calling a hook if they initiated the action\n    modifier noSelfCall(IHooks self) {\n        if (msg.sender != address(self)) {\n            _;\n        }\n    }\n\n    /// @notice calls beforeInitialize hook if permissioned and validates return value\n    function beforeInitialize(IHooks self, PoolKey memory key, uint160 sqrtPriceX96) internal noSelfCall(self) {\n        if (self.hasPermission(BEFORE_INITIALIZE_FLAG)) {\n            self.callHook(abi.encodeCall(IHooks.beforeInitialize, (msg.sender, key, sqrtPriceX96)));\n        }\n    }\n\n    /// @notice calls afterInitialize hook if permissioned and validates return value\n    function afterInitialize(IHooks self, PoolKey memory key, uint160 sqrtPriceX96, int24 tick)\n        internal\n        noSelfCall(self)\n    {\n        if (self.hasPermission(AFTER_INITIALIZE_FLAG)) {\n            self.callHook(abi.encodeCall(IHooks.afterInitialize, (msg.sender, key, sqrtPriceX96, tick)));\n        }\n    }\n\n    /// @notice calls beforeModifyLiquidity hook if permissioned and validates return value\n    function beforeModifyLiquidity(\n        IHooks self,\n        PoolKey memory key,\n        ModifyLiquidityParams memory params,\n        bytes calldata hookData\n    ) internal noSelfCall(self) {\n        if (params.liquidityDelta > 0 && self.hasPermission(BEFORE_ADD_LIQUIDITY_FLAG)) {\n            self.callHook(abi.encodeCall(IHooks.beforeAddLiquidity, (msg.sender, key, params, hookData)));\n        } else if (params.liquidityDelta <= 0 && self.hasPermission(BEFORE_REMOVE_LIQUIDITY_FLAG)) {\n            self.callHook(abi.encodeCall(IHooks.beforeRemoveLiquidity, (msg.sender, key, params, hookData)));\n        }\n    }\n\n    /// @notice calls afterModifyLiquidity hook if permissioned and validates return value\n    function afterModifyLiquidity(\n        IHooks self,\n        PoolKey memory key,\n        ModifyLiquidityParams memory params,\n        BalanceDelta delta,\n        BalanceDelta feesAccrued,\n        bytes calldata hookData\n    ) internal returns (BalanceDelta callerDelta, BalanceDelta hookDelta) {\n        if (msg.sender == address(self)) return (delta, BalanceDeltaLibrary.ZERO_DELTA);\n\n        callerDelta = delta;\n        if (params.liquidityDelta > 0) {\n            if (self.hasPermission(AFTER_ADD_LIQUIDITY_FLAG)) {\n                hookDelta = BalanceDelta.wrap(\n                    self.callHookWithReturnDelta(\n                        abi.encodeCall(\n                            IHooks.afterAddLiquidity, (msg.sender, key, params, delta, feesAccrued, hookData)\n                        ),\n                        self.hasPermission(AFTER_ADD_LIQUIDITY_RETURNS_DELTA_FLAG)\n                    )\n                );\n                callerDelta = callerDelta - hookDelta;\n            }\n        } else {\n            if (self.hasPermission(AFTER_REMOVE_LIQUIDITY_FLAG)) {\n                hookDelta = BalanceDelta.wrap(\n                    self.callHookWithReturnDelta(\n                        abi.encodeCall(\n                            IHooks.afterRemoveLiquidity, (msg.sender, key, params, delta, feesAccrued, hookData)\n                        ),\n                        self.hasPermission(AFTER_REMOVE_LIQUIDITY_RETURNS_DELTA_FLAG)\n                    )\n                );\n                callerDelta = callerDelta - hookDelta;\n            }\n        }\n    }\n\n    /// @notice calls beforeSwap hook if permissioned and validates return value\n    function beforeSwap(IHooks self, PoolKey memory key, SwapParams memory params, bytes calldata hookData)\n        internal\n        returns (int256 amountToSwap, BeforeSwapDelta hookReturn, uint24 lpFeeOverride)\n    {\n        amountToSwap = params.amountSpecified;\n        if (msg.sender == address(self)) return (amountToSwap, BeforeSwapDeltaLibrary.ZERO_DELTA, lpFeeOverride);\n\n        if (self.hasPermission(BEFORE_SWAP_FLAG)) {\n            bytes memory result = callHook(self, abi.encodeCall(IHooks.beforeSwap, (msg.sender, key, params, hookData)));\n\n            // A length of 96 bytes is required to return a bytes4, a 32 byte delta, and an LP fee\n            if (result.length != 96) InvalidHookResponse.selector.revertWith();\n\n            // dynamic fee pools that want to override the cache fee, return a valid fee with the override flag. If override flag\n            // is set but an invalid fee is returned, the transaction will revert. Otherwise the current LP fee will be used\n            if (key.fee.isDynamicFee()) lpFeeOverride = result.parseFee();\n\n            // skip this logic for the case where the hook return is 0\n            if (self.hasPermission(BEFORE_SWAP_RETURNS_DELTA_FLAG)) {\n                hookReturn = BeforeSwapDelta.wrap(result.parseReturnDelta());\n\n                // any return in unspecified is passed to the afterSwap hook for handling\n                int128 hookDeltaSpecified = hookReturn.getSpecifiedDelta();\n\n                // Update the swap amount according to the hook's return, and check that the swap type doesn't change (exact input/output)\n                if (hookDeltaSpecified != 0) {\n                    bool exactInput = amountToSwap < 0;\n                    amountToSwap += hookDeltaSpecified;\n                    if (exactInput ? amountToSwap > 0 : amountToSwap < 0) {\n                        HookDeltaExceedsSwapAmount.selector.revertWith();\n                    }\n                }\n            }\n        }\n    }\n\n    /// @notice calls afterSwap hook if permissioned and validates return value\n    function afterSwap(\n        IHooks self,\n        PoolKey memory key,\n        SwapParams memory params,\n        BalanceDelta swapDelta,\n        bytes calldata hookData,\n        BeforeSwapDelta beforeSwapHookReturn\n    ) internal returns (BalanceDelta, BalanceDelta) {\n        if (msg.sender == address(self)) return (swapDelta, BalanceDeltaLibrary.ZERO_DELTA);\n\n        int128 hookDeltaSpecified = beforeSwapHookReturn.getSpecifiedDelta();\n        int128 hookDeltaUnspecified = beforeSwapHookReturn.getUnspecifiedDelta();\n\n        if (self.hasPermission(AFTER_SWAP_FLAG)) {\n            hookDeltaUnspecified += self.callHookWithReturnDelta(\n                abi.encodeCall(IHooks.afterSwap, (msg.sender, key, params, swapDelta, hookData)),\n                self.hasPermission(AFTER_SWAP_RETURNS_DELTA_FLAG)\n            ).toInt128();\n        }\n\n        BalanceDelta hookDelta;\n        if (hookDeltaUnspecified != 0 || hookDeltaSpecified != 0) {\n            hookDelta = (params.amountSpecified < 0 == params.zeroForOne)\n                ? toBalanceDelta(hookDeltaSpecified, hookDeltaUnspecified)\n                : toBalanceDelta(hookDeltaUnspecified, hookDeltaSpecified);\n\n            // the caller has to pay for (or receive) the hook's delta\n            swapDelta = swapDelta - hookDelta;\n        }\n        return (swapDelta, hookDelta);\n    }\n\n    /// @notice calls beforeDonate hook if permissioned and validates return value\n    function beforeDonate(IHooks self, PoolKey memory key, uint256 amount0, uint256 amount1, bytes calldata hookData)\n        internal\n        noSelfCall(self)\n    {\n        if (self.hasPermission(BEFORE_DONATE_FLAG)) {\n            self.callHook(abi.encodeCall(IHooks.beforeDonate, (msg.sender, key, amount0, amount1, hookData)));\n        }\n    }\n\n    /// @notice calls afterDonate hook if permissioned and validates return value\n    function afterDonate(IHooks self, PoolKey memory key, uint256 amount0, uint256 amount1, bytes calldata hookData)\n        internal\n        noSelfCall(self)\n    {\n        if (self.hasPermission(AFTER_DONATE_FLAG)) {\n            self.callHook(abi.encodeCall(IHooks.afterDonate, (msg.sender, key, amount0, amount1, hookData)));\n        }\n    }\n\n    function hasPermission(IHooks self, uint160 flag) internal pure returns (bool) {\n        return uint160(address(self)) & flag != 0;\n    }\n}\n"},"lib/v4-core/src/types/BeforeSwapDelta.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n// Return type of the beforeSwap hook.\n// Upper 128 bits is the delta in specified tokens. Lower 128 bits is delta in unspecified tokens (to match the afterSwap hook)\ntype BeforeSwapDelta is int256;\n\n// Creates a BeforeSwapDelta from specified and unspecified\nfunction toBeforeSwapDelta(int128 deltaSpecified, int128 deltaUnspecified)\n    pure\n    returns (BeforeSwapDelta beforeSwapDelta)\n{\n    assembly (\"memory-safe\") {\n        beforeSwapDelta := or(shl(128, deltaSpecified), and(sub(shl(128, 1), 1), deltaUnspecified))\n    }\n}\n\n/// @notice Library for getting the specified and unspecified deltas from the BeforeSwapDelta type\nlibrary BeforeSwapDeltaLibrary {\n    /// @notice A BeforeSwapDelta of 0\n    BeforeSwapDelta public constant ZERO_DELTA = BeforeSwapDelta.wrap(0);\n\n    /// extracts int128 from the upper 128 bits of the BeforeSwapDelta\n    /// returned by beforeSwap\n    function getSpecifiedDelta(BeforeSwapDelta delta) internal pure returns (int128 deltaSpecified) {\n        assembly (\"memory-safe\") {\n            deltaSpecified := sar(128, delta)\n        }\n    }\n\n    /// extracts int128 from the lower 128 bits of the BeforeSwapDelta\n    /// returned by beforeSwap and afterSwap\n    function getUnspecifiedDelta(BeforeSwapDelta delta) internal pure returns (int128 deltaUnspecified) {\n        assembly (\"memory-safe\") {\n            deltaUnspecified := signextend(15, delta)\n        }\n    }\n}\n"},"src/base/BaseHook.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {Hooks} from \"@uniswap/v4-core/src/libraries/Hooks.sol\";\nimport {IPoolManager} from \"@uniswap/v4-core/src/interfaces/IPoolManager.sol\";\nimport {IHooks} from \"@uniswap/v4-core/src/interfaces/IHooks.sol\";\nimport {BalanceDelta} from \"@uniswap/v4-core/src/types/BalanceDelta.sol\";\nimport {PoolKey} from \"@uniswap/v4-core/src/types/PoolKey.sol\";\nimport {BeforeSwapDelta} from \"@uniswap/v4-core/src/types/BeforeSwapDelta.sol\";\nimport {ImmutableState} from \"@uniswap/v4-periphery/src/base/ImmutableState.sol\";\nimport {ModifyLiquidityParams, SwapParams} from \"@uniswap/v4-core/src/types/PoolOperation.sol\";\n\n/// @title Base Hook\n/// @notice abstract contract for hook implementations\nabstract contract BaseHook is IHooks, ImmutableState {\n    error HookNotImplemented();\n\n    constructor(IPoolManager _manager) ImmutableState(_manager) {\n        validateHookAddress(this);\n    }\n\n    /// @notice Returns a struct of permissions to signal which hook functions are to be implemented\n    /// @dev Used at deployment to validate the address correctly represents the expected permissions\n    /// @return Permissions struct\n    function getHookPermissions() public pure virtual returns (Hooks.Permissions memory);\n\n    /// @notice Validates the deployed hook address agrees with the expected permissions of the hook\n    /// @dev this function is virtual so that we can override it during testing,\n    /// which allows us to deploy an implementation to any address\n    /// and then etch the bytecode into the correct address\n    function validateHookAddress(BaseHook _this) internal pure virtual {\n        Hooks.validateHookPermissions(_this, getHookPermissions());\n    }\n\n    /// @inheritdoc IHooks\n    function beforeInitialize(address sender, PoolKey calldata key, uint160 sqrtPriceX96)\n        external\n        onlyPoolManager\n        returns (bytes4)\n    {\n        return _beforeInitialize(sender, key, sqrtPriceX96);\n    }\n\n    function _beforeInitialize(address, PoolKey calldata, uint160) internal virtual returns (bytes4) {\n        revert HookNotImplemented();\n    }\n\n    /// @inheritdoc IHooks\n    function afterInitialize(address sender, PoolKey calldata key, uint160 sqrtPriceX96, int24 tick)\n        external\n        onlyPoolManager\n        returns (bytes4)\n    {\n        return _afterInitialize(sender, key, sqrtPriceX96, tick);\n    }\n\n    function _afterInitialize(address, PoolKey calldata, uint160, int24) internal virtual returns (bytes4) {\n        revert HookNotImplemented();\n    }\n\n    /// @inheritdoc IHooks\n    function beforeAddLiquidity(\n        address sender,\n        PoolKey calldata key,\n        ModifyLiquidityParams calldata params,\n        bytes calldata hookData\n    ) external onlyPoolManager returns (bytes4) {\n        return _beforeAddLiquidity(sender, key, params, hookData);\n    }\n\n    function _beforeAddLiquidity(address, PoolKey calldata, ModifyLiquidityParams calldata, bytes calldata)\n        internal\n        virtual\n        returns (bytes4)\n    {\n        revert HookNotImplemented();\n    }\n\n    /// @inheritdoc IHooks\n    function beforeRemoveLiquidity(\n        address sender,\n        PoolKey calldata key,\n        ModifyLiquidityParams calldata params,\n        bytes calldata hookData\n    ) external onlyPoolManager returns (bytes4) {\n        return _beforeRemoveLiquidity(sender, key, params, hookData);\n    }\n\n    function _beforeRemoveLiquidity(address, PoolKey calldata, ModifyLiquidityParams calldata, bytes calldata)\n        internal\n        virtual\n        returns (bytes4)\n    {\n        revert HookNotImplemented();\n    }\n\n    /// @inheritdoc IHooks\n    function afterAddLiquidity(\n        address sender,\n        PoolKey calldata key,\n        ModifyLiquidityParams calldata params,\n        BalanceDelta delta,\n        BalanceDelta feesAccrued,\n        bytes calldata hookData\n    ) external onlyPoolManager returns (bytes4, BalanceDelta) {\n        return _afterAddLiquidity(sender, key, params, delta, feesAccrued, hookData);\n    }\n\n    function _afterAddLiquidity(\n        address,\n        PoolKey calldata,\n        ModifyLiquidityParams calldata,\n        BalanceDelta,\n        BalanceDelta,\n        bytes calldata\n    ) internal virtual returns (bytes4, BalanceDelta) {\n        revert HookNotImplemented();\n    }\n\n    /// @inheritdoc IHooks\n    function afterRemoveLiquidity(\n        address sender,\n        PoolKey calldata key,\n        ModifyLiquidityParams calldata params,\n        BalanceDelta delta,\n        BalanceDelta feesAccrued,\n        bytes calldata hookData\n    ) external onlyPoolManager returns (bytes4, BalanceDelta) {\n        return _afterRemoveLiquidity(sender, key, params, delta, feesAccrued, hookData);\n    }\n\n    function _afterRemoveLiquidity(\n        address,\n        PoolKey calldata,\n        ModifyLiquidityParams calldata,\n        BalanceDelta,\n        BalanceDelta,\n        bytes calldata\n    ) internal virtual returns (bytes4, BalanceDelta) {\n        revert HookNotImplemented();\n    }\n\n    /// @inheritdoc IHooks\n    function beforeSwap(address sender, PoolKey calldata key, SwapParams calldata params, bytes calldata hookData)\n        external\n        onlyPoolManager\n        returns (bytes4, BeforeSwapDelta, uint24)\n    {\n        return _beforeSwap(sender, key, params, hookData);\n    }\n\n    function _beforeSwap(address, PoolKey calldata, SwapParams calldata, bytes calldata)\n        internal\n        virtual\n        returns (bytes4, BeforeSwapDelta, uint24)\n    {\n        revert HookNotImplemented();\n    }\n\n    /// @inheritdoc IHooks\n    function afterSwap(\n        address sender,\n        PoolKey calldata key,\n        SwapParams calldata params,\n        BalanceDelta delta,\n        bytes calldata hookData\n    ) external onlyPoolManager returns (bytes4, int128) {\n        return _afterSwap(sender, key, params, delta, hookData);\n    }\n\n    function _afterSwap(address, PoolKey calldata, SwapParams calldata, BalanceDelta, bytes calldata)\n        internal\n        virtual\n        returns (bytes4, int128)\n    {\n        revert HookNotImplemented();\n    }\n\n    /// @inheritdoc IHooks\n    function beforeDonate(\n        address sender,\n        PoolKey calldata key,\n        uint256 amount0,\n        uint256 amount1,\n        bytes calldata hookData\n    ) external onlyPoolManager returns (bytes4) {\n        return _beforeDonate(sender, key, amount0, amount1, hookData);\n    }\n\n    function _beforeDonate(address, PoolKey calldata, uint256, uint256, bytes calldata)\n        internal\n        virtual\n        returns (bytes4)\n    {\n        revert HookNotImplemented();\n    }\n\n    /// @inheritdoc IHooks\n    function afterDonate(\n        address sender,\n        PoolKey calldata key,\n        uint256 amount0,\n        uint256 amount1,\n        bytes calldata hookData\n    ) external onlyPoolManager returns (bytes4) {\n        return _afterDonate(sender, key, amount0, amount1, hookData);\n    }\n\n    function _afterDonate(address, PoolKey calldata, uint256, uint256, bytes calldata)\n        internal\n        virtual\n        returns (bytes4)\n    {\n        revert HookNotImplemented();\n    }\n}\n"},"lib/v4-periphery/src/base/DeltaResolver.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.24;\n\nimport {Currency} from \"@uniswap/v4-core/src/types/Currency.sol\";\nimport {TransientStateLibrary} from \"@uniswap/v4-core/src/libraries/TransientStateLibrary.sol\";\nimport {IPoolManager} from \"@uniswap/v4-core/src/interfaces/IPoolManager.sol\";\nimport {ImmutableState} from \"./ImmutableState.sol\";\nimport {ActionConstants} from \"../libraries/ActionConstants.sol\";\n\n/// @notice Abstract contract used to sync, send, and settle funds to the pool manager\n/// @dev Note that sync() is called before any erc-20 transfer in `settle`.\nabstract contract DeltaResolver is ImmutableState {\n    using TransientStateLibrary for IPoolManager;\n\n    /// @notice Emitted when unexpected negative delta is found.\n    error DeltaNotPositive(Currency currency);\n    /// @notice Emitted when unexpected positive delta is found.\n    error DeltaNotNegative(Currency currency);\n    /// @notice Emitted when the contract does not have enough balance to wrap or unwrap.\n    error InsufficientBalance();\n\n    /// @notice Take an amount of currency out of the PoolManager\n    /// @param currency Currency to take\n    /// @param recipient Address to receive the currency\n    /// @param amount Amount to take\n    /// @dev Returns early if the amount is 0\n    function _take(Currency currency, address recipient, uint256 amount) internal virtual {\n        if (amount == 0) return;\n        poolManager.take(currency, recipient, amount);\n    }\n\n    /// @notice Pay and settle a currency to the PoolManager\n    /// @dev The implementing contract must ensure that the `payer` is a secure address\n    /// @param currency Currency to settle\n    /// @param payer Address of the payer\n    /// @param amount Amount to send\n    /// @dev Returns early if the amount is 0\n    function _settle(Currency currency, address payer, uint256 amount) internal {\n        if (amount == 0) return;\n\n        poolManager.sync(currency);\n        if (currency.isAddressZero()) {\n            poolManager.settle{value: amount}();\n        } else {\n            _pay(currency, payer, amount);\n            poolManager.settle();\n        }\n    }\n\n    /// @notice Abstract function for contracts to implement paying tokens to the poolManager\n    /// @dev The recipient of the payment should be the poolManager\n    /// @param token The token to settle. This is known not to be the native currency\n    /// @param payer The address who should pay tokens\n    /// @param amount The number of tokens to send\n    function _pay(Currency token, address payer, uint256 amount) internal virtual;\n\n    /// @notice Obtain the full amount owed by this contract (negative delta)\n    /// @param currency Currency to get the delta for\n    /// @return amount The amount owed by this contract as a uint256\n    function _getFullDebt(Currency currency) internal view returns (uint256 amount) {\n        int256 _amount = poolManager.currencyDelta(address(this), currency);\n        // If the amount is positive, it should be taken not settled.\n        if (_amount > 0) revert DeltaNotNegative(currency);\n        // Casting is safe due to limits on the total supply of a pool\n        amount = uint256(-_amount);\n    }\n\n    /// @notice Obtain the full credit owed to this contract (positive delta)\n    /// @param currency Currency to get the delta for\n    /// @return amount The amount owed to this contract as a uint256\n    function _getFullCredit(Currency currency) internal view returns (uint256 amount) {\n        int256 _amount = poolManager.currencyDelta(address(this), currency);\n        // If the amount is negative, it should be settled not taken.\n        if (_amount < 0) revert DeltaNotPositive(currency);\n        amount = uint256(_amount);\n    }\n\n    /// @notice Calculates the amount for a settle action\n    function _mapSettleAmount(uint256 amount, Currency currency) internal view virtual returns (uint256) {\n        if (amount == ActionConstants.CONTRACT_BALANCE) {\n            return currency.balanceOfSelf();\n        } else if (amount == ActionConstants.OPEN_DELTA) {\n            return _getFullDebt(currency);\n        } else {\n            return amount;\n        }\n    }\n\n    /// @notice Calculates the amount for a take action\n    function _mapTakeAmount(uint256 amount, Currency currency) internal view returns (uint256) {\n        if (amount == ActionConstants.OPEN_DELTA) {\n            return _getFullCredit(currency);\n        } else {\n            return amount;\n        }\n    }\n\n    /// @notice Calculates the sanitized amount before wrapping/unwrapping.\n    /// @param inputCurrency The currency, either native or wrapped native, that this contract holds\n    /// @param amount The amount to wrap or unwrap. Can be CONTRACT_BALANCE, OPEN_DELTA or a specific amount\n    /// @param outputCurrency The currency after the wrap/unwrap that the user may owe a balance in on the poolManager\n    function _mapWrapUnwrapAmount(Currency inputCurrency, uint256 amount, Currency outputCurrency)\n        internal\n        view\n        returns (uint256)\n    {\n        // if wrapping, the balance in this contract is in ETH\n        // if unwrapping, the balance in this contract is in WETH\n        uint256 balance = inputCurrency.balanceOf(address(this));\n        if (amount == ActionConstants.CONTRACT_BALANCE) {\n            // return early to avoid unnecessary balance check\n            return balance;\n        }\n        if (amount == ActionConstants.OPEN_DELTA) {\n            // if wrapping, the open currency on the PoolManager is WETH.\n            // if unwrapping, the open currency on the PoolManager is ETH.\n            // note that we use the DEBT amount. Positive deltas can be taken and then wrapped.\n            amount = _getFullDebt(outputCurrency);\n        }\n        if (amount > balance) revert InsufficientBalance();\n        return amount;\n    }\n}\n"},"src/aggregator-hooks/interfaces/IAggregatorHook.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {PoolId} from \"@uniswap/v4-core/src/types/PoolId.sol\";\n\n/// @title IAggregatorHook\n/// @notice Interface for the AggregatorHook contract. An implemented aggregator hook should be able to use liquidity from external sources\ninterface IAggregatorHook {\n    error UnspecifiedAmountExceeded();\n    error PoolDoesNotExist();\n    error LiquidityNotAllowed();\n\n    event AggregatorPoolRegistered(PoolId indexed poolId);\n    event TokenJarUpdated(address indexed tokenJar);\n    event HookSwap(PoolId indexed poolId, address indexed sender, int256 amount0, int256 amount1, uint24 swapFee);\n\n    /// @notice Quotes amount of unspecified side for a given amount of specified side\n    /// @param zeroToOne Whether the swap is from token0 to token1 or from token1 to token0\n    /// @param amountSpecified The amount of tokens in or out (negative for exact-in, positive for exact-out)\n    /// @return amountUnspecified amount of unspecified side (always positive to adhere to practices by other quote functions)\n    /// @dev This function is meant to be called as a view function even though it is not one. This is because the swap\n    /// might be simulated but not finalized. Applies protocol fee on top of the raw quote from the underlying liquidity source\n    function quote(bool zeroToOne, int256 amountSpecified, PoolId poolId) external returns (uint256 amountUnspecified);\n\n    /// @notice Returns the pseudo TVL: the amount of the UniswapV4 pool's tokens locked in the aggregated pool\n    /// @param poolId The pool ID of the UniswapV4 pool\n    /// @return amount0 The amount of token0 in the aggregated pool\n    /// @return amount1 The amount of token1 in the aggregated pool\n    function pseudoTotalValueLocked(PoolId poolId) external returns (uint256 amount0, uint256 amount1);\n}\n"},"src/aggregator-hooks/ProtocolFees.sol":{"content":"// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity ^0.8.0;\n\nimport {IPoolManager} from \"@uniswap/v4-core/src/interfaces/IPoolManager.sol\";\nimport {PoolKey} from \"@uniswap/v4-core/src/types/PoolKey.sol\";\nimport {SwapParams} from \"@uniswap/v4-core/src/types/PoolOperation.sol\";\nimport {Currency} from \"@uniswap/v4-core/src/types/Currency.sol\";\nimport {ProtocolFeeLibrary} from \"@uniswap/v4-core/src/libraries/ProtocolFeeLibrary.sol\";\nimport {PoolId} from \"@uniswap/v4-core/src/types/PoolId.sol\";\nimport {IV4FeeAdapter} from \"@protocol-fees/interfaces/IV4FeeAdapter.sol\";\nimport {PoolIdLibrary} from \"@uniswap/v4-core/src/types/PoolId.sol\";\nimport {StateLibrary} from \"@uniswap/v4-core/src/libraries/StateLibrary.sol\";\nimport {FullMath} from \"@uniswap/v4-core/src/libraries/FullMath.sol\";\n\nabstract contract ProtocolFees {\n    using ProtocolFeeLibrary for uint24;\n    using PoolIdLibrary for PoolKey;\n    using StateLibrary for IPoolManager;\n\n    address public tokenJar;\n    uint24 public immutable protocolFeeMultiplier;\n\n    constructor(uint24 _protocolFeeMultiplier) {\n        protocolFeeMultiplier = _protocolFeeMultiplier;\n    }\n\n    event ProtocolFeesCollected(address indexed recipient, Currency indexed currency, uint256 amount);\n\n    /// @notice Queries the token jar from the pool manager and emits an event if it is updated\n    /// @return The token jar address\n    /// @dev This function should not need to be called externally except in the case of the tokenJar address changing\n    /// after the protocol fee has been set\n    function pollTokenJar() public virtual returns (address);\n\n    function _applyProtocolFee(\n        IPoolManager poolManager,\n        PoolKey calldata key,\n        SwapParams calldata params,\n        int128 unspecifiedDelta\n    ) internal returns (int128) {\n        uint24 protocolFee = _getProtocolFee(poolManager, params.zeroForOne, key.toId());\n        return _applyWithProtocolFee(poolManager, key, params, unspecifiedDelta, protocolFee);\n    }\n\n    function _applyWithProtocolFee(\n        IPoolManager poolManager,\n        PoolKey calldata key,\n        SwapParams calldata params,\n        int128 unspecifiedDelta,\n        uint24 protocolFee\n    ) internal returns (int128) {\n        if (protocolFee == 0) return 0;\n        // Assumes that if a protocol fee is set, there should be a token jar.\n        if (tokenJar == address(0)) pollTokenJar();\n        if (tokenJar == address(0)) return 0;\n\n        bool isExactInput = params.amountSpecified < 0;\n\n        // Determine the unspecified currency (the side protocol fee is taken from)\n        Currency unspecifiedCurrency = params.zeroForOne == isExactInput ? key.currency1 : key.currency0;\n\n        uint256 absUnspecified = uint256(uint128(unspecifiedDelta < 0 ? -unspecifiedDelta : unspecifiedDelta));\n        uint256 protocolFeeAmount = _calculateProtocolFeeAmount(protocolFee, params.amountSpecified < 0, absUnspecified);\n\n        // Send the protocol fee to the token jar\n        emit ProtocolFeesCollected(tokenJar, unspecifiedCurrency, protocolFeeAmount);\n        poolManager.take(unspecifiedCurrency, tokenJar, protocolFeeAmount);\n\n        return int128(uint128(protocolFeeAmount));\n    }\n\n    function _calculateProtocolFeeAmount(uint24 protocolFee, bool isExactInput, uint256 amountUnspecified)\n        internal\n        pure\n        returns (uint256)\n    {\n        if (isExactInput) {\n            return FullMath.mulDivRoundingUp(amountUnspecified, protocolFee, ProtocolFeeLibrary.PIPS_DENOMINATOR);\n        } else {\n            // This calculation ensures the fee is the correct proportion of the total input.\n            // For a protocol fee of X%, the fee amount will be X% of the total input rather than X%\n            // of the pre-protocol fee input.\n            return FullMath.mulDivRoundingUp(\n                amountUnspecified, protocolFee, ProtocolFeeLibrary.PIPS_DENOMINATOR - protocolFee\n            );\n        }\n    }\n\n    /// @dev The protocol fee is multiplied by the protocol fee multiplier\n    function _getProtocolFee(IPoolManager poolManager, bool zeroToOne, PoolId poolId)\n        internal\n        view\n        returns (uint24 protocolFee)\n    {\n        (,, uint24 protocolFeeRaw,) = poolManager.getSlot0(poolId);\n        protocolFee = zeroToOne\n            ? ProtocolFeeLibrary.getZeroForOneFee(protocolFeeRaw)\n            : ProtocolFeeLibrary.getOneForZeroFee(protocolFeeRaw);\n        protocolFee *= protocolFeeMultiplier;\n    }\n\n    function _getTokenJar(IPoolManager poolManager) internal view returns (address currentJar) {\n        address protocolFeeAdapterAddress = poolManager.protocolFeeController();\n        if (protocolFeeAdapterAddress == address(0) || protocolFeeAdapterAddress.code.length == 0) return address(0);\n        try IV4FeeAdapter(protocolFeeAdapterAddress).TOKEN_JAR() returns (address _currentJar) {\n            currentJar = _currentJar;\n        } catch {\n            // keep currentJar as address(0)\n        }\n    }\n}\n"},"lib/protocol-fees/src/interfaces/IFeeClassifiedHook.sol":{"content":"// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity ^0.8.26;\n\n/// @title IFeeClassifiedHook\n/// @notice Optional interface for v4 hooks to self-report behavioral flags for\n/// protocol fee classification.\n/// @dev Hooks return an opaque uint256 bitfield. The V4FeePolicy ascribes no meaning\n/// to individual bits — it only matches the returned value against governance-configured\n/// flag rules to derive a family ID. Gas-capped staticcall prevents griefing.\n/// Governance can always override via setHookFamily(). See the governance guide for the\n/// bit conventions in active use.\n/// @custom:security-contact security@uniswap.org\ninterface IFeeClassifiedHook {\n  /// @notice Returns the hook's self-reported behavioral flags.\n  /// @dev Return 0 to indicate no self-classification (falls through to defaultFee).\n  /// The bitfield is opaque to the policy; see the governance guide for active conventions.\n  function protocolFeeFlags() external view returns (uint256);\n}\n"},"lib/v4-core/src/libraries/Position.sol":{"content":"// SPDX-License-Identifier: BUSL-1.1\npragma solidity ^0.8.0;\n\nimport {FullMath} from \"./FullMath.sol\";\nimport {FixedPoint128} from \"./FixedPoint128.sol\";\nimport {LiquidityMath} from \"./LiquidityMath.sol\";\nimport {CustomRevert} from \"./CustomRevert.sol\";\n\n/// @title Position\n/// @notice Positions represent an owner address' liquidity between a lower and upper tick boundary\n/// @dev Positions store additional state for tracking fees owed to the position\nlibrary Position {\n    using CustomRevert for bytes4;\n\n    /// @notice Cannot update a position with no liquidity\n    error CannotUpdateEmptyPosition();\n\n    // info stored for each user's position\n    struct State {\n        // the amount of liquidity owned by this position\n        uint128 liquidity;\n        // fee growth per unit of liquidity as of the last update to liquidity or fees owed\n        uint256 feeGrowthInside0LastX128;\n        uint256 feeGrowthInside1LastX128;\n    }\n\n    /// @notice Returns the State struct of a position, given an owner and position boundaries\n    /// @param self The mapping containing all user positions\n    /// @param owner The address of the position owner\n    /// @param tickLower The lower tick boundary of the position\n    /// @param tickUpper The upper tick boundary of the position\n    /// @param salt A unique value to differentiate between multiple positions in the same range\n    /// @return position The position info struct of the given owners' position\n    function get(mapping(bytes32 => State) storage self, address owner, int24 tickLower, int24 tickUpper, bytes32 salt)\n        internal\n        view\n        returns (State storage position)\n    {\n        bytes32 positionKey = calculatePositionKey(owner, tickLower, tickUpper, salt);\n        position = self[positionKey];\n    }\n\n    /// @notice A helper function to calculate the position key\n    /// @param owner The address of the position owner\n    /// @param tickLower the lower tick boundary of the position\n    /// @param tickUpper the upper tick boundary of the position\n    /// @param salt A unique value to differentiate between multiple positions in the same range, by the same owner. Passed in by the caller.\n    function calculatePositionKey(address owner, int24 tickLower, int24 tickUpper, bytes32 salt)\n        internal\n        pure\n        returns (bytes32 positionKey)\n    {\n        // positionKey = keccak256(abi.encodePacked(owner, tickLower, tickUpper, salt))\n        assembly (\"memory-safe\") {\n            let fmp := mload(0x40)\n            mstore(add(fmp, 0x26), salt) // [0x26, 0x46)\n            mstore(add(fmp, 0x06), tickUpper) // [0x23, 0x26)\n            mstore(add(fmp, 0x03), tickLower) // [0x20, 0x23)\n            mstore(fmp, owner) // [0x0c, 0x20)\n            positionKey := keccak256(add(fmp, 0x0c), 0x3a) // len is 58 bytes\n\n            // now clean the memory we used\n            mstore(add(fmp, 0x40), 0) // fmp+0x40 held salt\n            mstore(add(fmp, 0x20), 0) // fmp+0x20 held tickLower, tickUpper, salt\n            mstore(fmp, 0) // fmp held owner\n        }\n    }\n\n    /// @notice Credits accumulated fees to a user's position\n    /// @param self The individual position to update\n    /// @param liquidityDelta The change in pool liquidity as a result of the position update\n    /// @param feeGrowthInside0X128 The all-time fee growth in currency0, per unit of liquidity, inside the position's tick boundaries\n    /// @param feeGrowthInside1X128 The all-time fee growth in currency1, per unit of liquidity, inside the position's tick boundaries\n    /// @return feesOwed0 The amount of currency0 owed to the position owner\n    /// @return feesOwed1 The amount of currency1 owed to the position owner\n    function update(\n        State storage self,\n        int128 liquidityDelta,\n        uint256 feeGrowthInside0X128,\n        uint256 feeGrowthInside1X128\n    ) internal returns (uint256 feesOwed0, uint256 feesOwed1) {\n        uint128 liquidity = self.liquidity;\n\n        if (liquidityDelta == 0) {\n            // disallow pokes for 0 liquidity positions\n            if (liquidity == 0) CannotUpdateEmptyPosition.selector.revertWith();\n        } else {\n            self.liquidity = LiquidityMath.addDelta(liquidity, liquidityDelta);\n        }\n\n        // calculate accumulated fees. overflow in the subtraction of fee growth is expected\n        unchecked {\n            feesOwed0 =\n                FullMath.mulDiv(feeGrowthInside0X128 - self.feeGrowthInside0LastX128, liquidity, FixedPoint128.Q128);\n            feesOwed1 =\n                FullMath.mulDiv(feeGrowthInside1X128 - self.feeGrowthInside1LastX128, liquidity, FixedPoint128.Q128);\n        }\n\n        // update the position\n        self.feeGrowthInside0LastX128 = feeGrowthInside0X128;\n        self.feeGrowthInside1LastX128 = feeGrowthInside1X128;\n    }\n}\n"},"lib/v4-core/src/interfaces/external/IERC6909Claims.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n/// @notice Interface for claims over a contract balance, wrapped as a ERC6909\ninterface IERC6909Claims {\n    /*//////////////////////////////////////////////////////////////\n                                 EVENTS\n    //////////////////////////////////////////////////////////////*/\n\n    event OperatorSet(address indexed owner, address indexed operator, bool approved);\n\n    event Approval(address indexed owner, address indexed spender, uint256 indexed id, uint256 amount);\n\n    event Transfer(address caller, address indexed from, address indexed to, uint256 indexed id, uint256 amount);\n\n    /*//////////////////////////////////////////////////////////////\n                                 FUNCTIONS\n    //////////////////////////////////////////////////////////////*/\n\n    /// @notice Owner balance of an id.\n    /// @param owner The address of the owner.\n    /// @param id The id of the token.\n    /// @return amount The balance of the token.\n    function balanceOf(address owner, uint256 id) external view returns (uint256 amount);\n\n    /// @notice Spender allowance of an id.\n    /// @param owner The address of the owner.\n    /// @param spender The address of the spender.\n    /// @param id The id of the token.\n    /// @return amount The allowance of the token.\n    function allowance(address owner, address spender, uint256 id) external view returns (uint256 amount);\n\n    /// @notice Checks if a spender is approved by an owner as an operator\n    /// @param owner The address of the owner.\n    /// @param spender The address of the spender.\n    /// @return approved The approval status.\n    function isOperator(address owner, address spender) external view returns (bool approved);\n\n    /// @notice Transfers an amount of an id from the caller to a receiver.\n    /// @param receiver The address of the receiver.\n    /// @param id The id of the token.\n    /// @param amount The amount of the token.\n    /// @return bool True, always, unless the function reverts\n    function transfer(address receiver, uint256 id, uint256 amount) external returns (bool);\n\n    /// @notice Transfers an amount of an id from a sender to a receiver.\n    /// @param sender The address of the sender.\n    /// @param receiver The address of the receiver.\n    /// @param id The id of the token.\n    /// @param amount The amount of the token.\n    /// @return bool True, always, unless the function reverts\n    function transferFrom(address sender, address receiver, uint256 id, uint256 amount) external returns (bool);\n\n    /// @notice Approves an amount of an id to a spender.\n    /// @param spender The address of the spender.\n    /// @param id The id of the token.\n    /// @param amount The amount of the token.\n    /// @return bool True, always\n    function approve(address spender, uint256 id, uint256 amount) external returns (bool);\n\n    /// @notice Sets or removes an operator for the caller.\n    /// @param operator The address of the operator.\n    /// @param approved The approval status.\n    /// @return bool True, always\n    function setOperator(address operator, bool approved) external returns (bool);\n}\n"},"lib/v4-core/src/interfaces/IProtocolFees.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {Currency} from \"../types/Currency.sol\";\nimport {PoolId} from \"../types/PoolId.sol\";\nimport {PoolKey} from \"../types/PoolKey.sol\";\n\n/// @notice Interface for all protocol-fee related functions in the pool manager\ninterface IProtocolFees {\n    /// @notice Thrown when protocol fee is set too high\n    error ProtocolFeeTooLarge(uint24 fee);\n\n    /// @notice Thrown when collectProtocolFees or setProtocolFee is not called by the controller.\n    error InvalidCaller();\n\n    /// @notice Thrown when collectProtocolFees is attempted on a token that is synced.\n    error ProtocolFeeCurrencySynced();\n\n    /// @notice Emitted when the protocol fee controller address is updated in setProtocolFeeController.\n    event ProtocolFeeControllerUpdated(address indexed protocolFeeController);\n\n    /// @notice Emitted when the protocol fee is updated for a pool.\n    event ProtocolFeeUpdated(PoolId indexed id, uint24 protocolFee);\n\n    /// @notice Given a currency address, returns the protocol fees accrued in that currency\n    /// @param currency The currency to check\n    /// @return amount The amount of protocol fees accrued in the currency\n    function protocolFeesAccrued(Currency currency) external view returns (uint256 amount);\n\n    /// @notice Sets the protocol fee for the given pool\n    /// @param key The key of the pool to set a protocol fee for\n    /// @param newProtocolFee The fee to set\n    function setProtocolFee(PoolKey memory key, uint24 newProtocolFee) external;\n\n    /// @notice Sets the protocol fee controller\n    /// @param controller The new protocol fee controller\n    function setProtocolFeeController(address controller) external;\n\n    /// @notice Collects the protocol fees for a given recipient and currency, returning the amount collected\n    /// @dev This will revert if the contract is unlocked\n    /// @param recipient The address to receive the protocol fees\n    /// @param currency The currency to withdraw\n    /// @param amount The amount of currency to withdraw\n    /// @return amountCollected The amount of currency successfully withdrawn\n    function collectProtocolFees(address recipient, Currency currency, uint256 amount)\n        external\n        returns (uint256 amountCollected);\n\n    /// @notice Returns the current protocol fee controller address\n    /// @return address The current protocol fee controller address\n    function protocolFeeController() external view returns (address);\n}\n"},"lib/v4-core/src/types/BalanceDelta.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {SafeCast} from \"../libraries/SafeCast.sol\";\n\n/// @dev Two `int128` values packed into a single `int256` where the upper 128 bits represent the amount0\n/// and the lower 128 bits represent the amount1.\ntype BalanceDelta is int256;\n\nusing {add as +, sub as -, eq as ==, neq as !=} for BalanceDelta global;\nusing BalanceDeltaLibrary for BalanceDelta global;\nusing SafeCast for int256;\n\nfunction toBalanceDelta(int128 _amount0, int128 _amount1) pure returns (BalanceDelta balanceDelta) {\n    assembly (\"memory-safe\") {\n        balanceDelta := or(shl(128, _amount0), and(sub(shl(128, 1), 1), _amount1))\n    }\n}\n\nfunction add(BalanceDelta a, BalanceDelta b) pure returns (BalanceDelta) {\n    int256 res0;\n    int256 res1;\n    assembly (\"memory-safe\") {\n        let a0 := sar(128, a)\n        let a1 := signextend(15, a)\n        let b0 := sar(128, b)\n        let b1 := signextend(15, b)\n        res0 := add(a0, b0)\n        res1 := add(a1, b1)\n    }\n    return toBalanceDelta(res0.toInt128(), res1.toInt128());\n}\n\nfunction sub(BalanceDelta a, BalanceDelta b) pure returns (BalanceDelta) {\n    int256 res0;\n    int256 res1;\n    assembly (\"memory-safe\") {\n        let a0 := sar(128, a)\n        let a1 := signextend(15, a)\n        let b0 := sar(128, b)\n        let b1 := signextend(15, b)\n        res0 := sub(a0, b0)\n        res1 := sub(a1, b1)\n    }\n    return toBalanceDelta(res0.toInt128(), res1.toInt128());\n}\n\nfunction eq(BalanceDelta a, BalanceDelta b) pure returns (bool) {\n    return BalanceDelta.unwrap(a) == BalanceDelta.unwrap(b);\n}\n\nfunction neq(BalanceDelta a, BalanceDelta b) pure returns (bool) {\n    return BalanceDelta.unwrap(a) != BalanceDelta.unwrap(b);\n}\n\n/// @notice Library for getting the amount0 and amount1 deltas from the BalanceDelta type\nlibrary BalanceDeltaLibrary {\n    /// @notice A BalanceDelta of 0\n    BalanceDelta public constant ZERO_DELTA = BalanceDelta.wrap(0);\n\n    function amount0(BalanceDelta balanceDelta) internal pure returns (int128 _amount0) {\n        assembly (\"memory-safe\") {\n            _amount0 := sar(128, balanceDelta)\n        }\n    }\n\n    function amount1(BalanceDelta balanceDelta) internal pure returns (int128 _amount1) {\n        assembly (\"memory-safe\") {\n            _amount1 := signextend(15, balanceDelta)\n        }\n    }\n}\n"},"lib/v4-core/src/interfaces/IExtsload.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n/// @notice Interface for functions to access any storage slot in a contract\ninterface IExtsload {\n    /// @notice Called by external contracts to access granular pool state\n    /// @param slot Key of slot to sload\n    /// @return value The value of the slot as bytes32\n    function extsload(bytes32 slot) external view returns (bytes32 value);\n\n    /// @notice Called by external contracts to access granular pool state\n    /// @param startSlot Key of slot to start sloading from\n    /// @param nSlots Number of slots to load into return value\n    /// @return values List of loaded values.\n    function extsload(bytes32 startSlot, uint256 nSlots) external view returns (bytes32[] memory values);\n\n    /// @notice Called by external contracts to access sparse pool state\n    /// @param slots List of slots to SLOAD from.\n    /// @return values List of loaded values.\n    function extsload(bytes32[] calldata slots) external view returns (bytes32[] memory values);\n}\n"},"lib/v4-core/src/interfaces/IExttload.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.24;\n\n/// @notice Interface for functions to access any transient storage slot in a contract\ninterface IExttload {\n    /// @notice Called by external contracts to access transient storage of the contract\n    /// @param slot Key of slot to tload\n    /// @return value The value of the slot as bytes32\n    function exttload(bytes32 slot) external view returns (bytes32 value);\n\n    /// @notice Called by external contracts to access sparse transient pool state\n    /// @param slots List of slots to tload\n    /// @return values List of loaded values\n    function exttload(bytes32[] calldata slots) external view returns (bytes32[] memory values);\n}\n"},"lib/v4-core/src/interfaces/external/IERC20Minimal.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n/// @title Minimal ERC20 interface for Uniswap\n/// @notice Contains a subset of the full ERC20 interface that is used in Uniswap V3\ninterface IERC20Minimal {\n    /// @notice Returns an account's balance in the token\n    /// @param account The account for which to look up the number of tokens it has, i.e. its balance\n    /// @return The number of tokens held by the account\n    function balanceOf(address account) external view returns (uint256);\n\n    /// @notice Transfers the amount of token from the `msg.sender` to the recipient\n    /// @param recipient The account that will receive the amount transferred\n    /// @param amount The number of tokens to send from the sender to the recipient\n    /// @return Returns true for a successful transfer, false for an unsuccessful transfer\n    function transfer(address recipient, uint256 amount) external returns (bool);\n\n    /// @notice Returns the current allowance given to a spender by an owner\n    /// @param owner The account of the token owner\n    /// @param spender The account of the token spender\n    /// @return The current allowance granted by `owner` to `spender`\n    function allowance(address owner, address spender) external view returns (uint256);\n\n    /// @notice Sets the allowance of a spender from the `msg.sender` to the value `amount`\n    /// @param spender The account which will be allowed to spend a given amount of the owners tokens\n    /// @param amount The amount of tokens allowed to be used by `spender`\n    /// @return Returns true for a successful approval, false for unsuccessful\n    function approve(address spender, uint256 amount) external returns (bool);\n\n    /// @notice Transfers `amount` tokens from `sender` to `recipient` up to the allowance given to the `msg.sender`\n    /// @param sender The account from which the transfer will be initiated\n    /// @param recipient The recipient of the transfer\n    /// @param amount The amount of the transfer\n    /// @return Returns true for a successful transfer, false for unsuccessful\n    function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);\n\n    /// @notice Event emitted when tokens are transferred from one address to another, either via `#transfer` or `#transferFrom`.\n    /// @param from The account from which the tokens were sent, i.e. the balance decreased\n    /// @param to The account to which the tokens were sent, i.e. the balance increased\n    /// @param value The amount of tokens that were transferred\n    event Transfer(address indexed from, address indexed to, uint256 value);\n\n    /// @notice Event emitted when the approval amount for the spender of a given owner's tokens changes.\n    /// @param owner The account that approved spending of its tokens\n    /// @param spender The account for which the spending allowance was modified\n    /// @param value The new allowance from the owner to the spender\n    event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n"},"lib/v4-core/src/libraries/CustomRevert.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n/// @title Library for reverting with custom errors efficiently\n/// @notice Contains functions for reverting with custom errors with different argument types efficiently\n/// @dev To use this library, declare `using CustomRevert for bytes4;` and replace `revert CustomError()` with\n/// `CustomError.selector.revertWith()`\n/// @dev The functions may tamper with the free memory pointer but it is fine since the call context is exited immediately\nlibrary CustomRevert {\n    /// @dev ERC-7751 error for wrapping bubbled up reverts\n    error WrappedError(address target, bytes4 selector, bytes reason, bytes details);\n\n    /// @dev Reverts with the selector of a custom error in the scratch space\n    function revertWith(bytes4 selector) internal pure {\n        assembly (\"memory-safe\") {\n            mstore(0, selector)\n            revert(0, 0x04)\n        }\n    }\n\n    /// @dev Reverts with a custom error with an address argument in the scratch space\n    function revertWith(bytes4 selector, address addr) internal pure {\n        assembly (\"memory-safe\") {\n            mstore(0, selector)\n            mstore(0x04, and(addr, 0xffffffffffffffffffffffffffffffffffffffff))\n            revert(0, 0x24)\n        }\n    }\n\n    /// @dev Reverts with a custom error with an int24 argument in the scratch space\n    function revertWith(bytes4 selector, int24 value) internal pure {\n        assembly (\"memory-safe\") {\n            mstore(0, selector)\n            mstore(0x04, signextend(2, value))\n            revert(0, 0x24)\n        }\n    }\n\n    /// @dev Reverts with a custom error with a uint160 argument in the scratch space\n    function revertWith(bytes4 selector, uint160 value) internal pure {\n        assembly (\"memory-safe\") {\n            mstore(0, selector)\n            mstore(0x04, and(value, 0xffffffffffffffffffffffffffffffffffffffff))\n            revert(0, 0x24)\n        }\n    }\n\n    /// @dev Reverts with a custom error with two int24 arguments\n    function revertWith(bytes4 selector, int24 value1, int24 value2) internal pure {\n        assembly (\"memory-safe\") {\n            let fmp := mload(0x40)\n            mstore(fmp, selector)\n            mstore(add(fmp, 0x04), signextend(2, value1))\n            mstore(add(fmp, 0x24), signextend(2, value2))\n            revert(fmp, 0x44)\n        }\n    }\n\n    /// @dev Reverts with a custom error with two uint160 arguments\n    function revertWith(bytes4 selector, uint160 value1, uint160 value2) internal pure {\n        assembly (\"memory-safe\") {\n            let fmp := mload(0x40)\n            mstore(fmp, selector)\n            mstore(add(fmp, 0x04), and(value1, 0xffffffffffffffffffffffffffffffffffffffff))\n            mstore(add(fmp, 0x24), and(value2, 0xffffffffffffffffffffffffffffffffffffffff))\n            revert(fmp, 0x44)\n        }\n    }\n\n    /// @dev Reverts with a custom error with two address arguments\n    function revertWith(bytes4 selector, address value1, address value2) internal pure {\n        assembly (\"memory-safe\") {\n            let fmp := mload(0x40)\n            mstore(fmp, selector)\n            mstore(add(fmp, 0x04), and(value1, 0xffffffffffffffffffffffffffffffffffffffff))\n            mstore(add(fmp, 0x24), and(value2, 0xffffffffffffffffffffffffffffffffffffffff))\n            revert(fmp, 0x44)\n        }\n    }\n\n    /// @notice bubble up the revert message returned by a call and revert with a wrapped ERC-7751 error\n    /// @dev this method can be vulnerable to revert data bombs\n    function bubbleUpAndRevertWith(\n        address revertingContract,\n        bytes4 revertingFunctionSelector,\n        bytes4 additionalContext\n    ) internal pure {\n        bytes4 wrappedErrorSelector = WrappedError.selector;\n        assembly (\"memory-safe\") {\n            // Ensure the size of the revert data is a multiple of 32 bytes\n            let encodedDataSize := mul(div(add(returndatasize(), 31), 32), 32)\n\n            let fmp := mload(0x40)\n\n            // Encode wrapped error selector, address, function selector, offset, additional context, size, revert reason\n            mstore(fmp, wrappedErrorSelector)\n            mstore(add(fmp, 0x04), and(revertingContract, 0xffffffffffffffffffffffffffffffffffffffff))\n            mstore(\n                add(fmp, 0x24),\n                and(revertingFunctionSelector, 0xffffffff00000000000000000000000000000000000000000000000000000000)\n            )\n            // offset revert reason\n            mstore(add(fmp, 0x44), 0x80)\n            // offset additional context\n            mstore(add(fmp, 0x64), add(0xa0, encodedDataSize))\n            // size revert reason\n            mstore(add(fmp, 0x84), returndatasize())\n            // revert reason\n            returndatacopy(add(fmp, 0xa4), 0, returndatasize())\n            // size additional context\n            mstore(add(fmp, add(0xa4, encodedDataSize)), 0x04)\n            // additional context\n            mstore(\n                add(fmp, add(0xc4, encodedDataSize)),\n                and(additionalContext, 0xffffffff00000000000000000000000000000000000000000000000000000000)\n            )\n            revert(fmp, add(0xe4, encodedDataSize))\n        }\n    }\n}\n"},"lib/openzeppelin-contracts/contracts/interfaces/IERC1363.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC1363.sol)\n\npragma solidity >=0.6.2;\n\nimport {IERC20} from \"./IERC20.sol\";\nimport {IERC165} from \"./IERC165.sol\";\n\n/**\n * @title IERC1363\n * @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363].\n *\n * Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract\n * after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction.\n */\ninterface IERC1363 is IERC20, IERC165 {\n    /*\n     * Note: the ERC-165 identifier for this interface is 0xb0202a11.\n     * 0xb0202a11 ===\n     *   bytes4(keccak256('transferAndCall(address,uint256)')) ^\n     *   bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^\n     *   bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^\n     *   bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^\n     *   bytes4(keccak256('approveAndCall(address,uint256)')) ^\n     *   bytes4(keccak256('approveAndCall(address,uint256,bytes)'))\n     */\n\n    /**\n     * @dev Moves a `value` amount of tokens from the caller's account to `to`\n     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n     * @param to The address which you want to transfer to.\n     * @param value The amount of tokens to be transferred.\n     * @return A boolean value indicating whether the operation succeeded unless throwing.\n     */\n    function transferAndCall(address to, uint256 value) external returns (bool);\n\n    /**\n     * @dev Moves a `value` amount of tokens from the caller's account to `to`\n     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n     * @param to The address which you want to transfer to.\n     * @param value The amount of tokens to be transferred.\n     * @param data Additional data with no specified format, sent in call to `to`.\n     * @return A boolean value indicating whether the operation succeeded unless throwing.\n     */\n    function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool);\n\n    /**\n     * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\n     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n     * @param from The address which you want to send tokens from.\n     * @param to The address which you want to transfer to.\n     * @param value The amount of tokens to be transferred.\n     * @return A boolean value indicating whether the operation succeeded unless throwing.\n     */\n    function transferFromAndCall(address from, address to, uint256 value) external returns (bool);\n\n    /**\n     * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\n     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n     * @param from The address which you want to send tokens from.\n     * @param to The address which you want to transfer to.\n     * @param value The amount of tokens to be transferred.\n     * @param data Additional data with no specified format, sent in call to `to`.\n     * @return A boolean value indicating whether the operation succeeded unless throwing.\n     */\n    function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool);\n\n    /**\n     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\n     * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\n     * @param spender The address which will spend the funds.\n     * @param value The amount of tokens to be spent.\n     * @return A boolean value indicating whether the operation succeeded unless throwing.\n     */\n    function approveAndCall(address spender, uint256 value) external returns (bool);\n\n    /**\n     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\n     * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\n     * @param spender The address which will spend the funds.\n     * @param value The amount of tokens to be spent.\n     * @param data Additional data with no specified format, sent in call to `spender`.\n     * @return A boolean value indicating whether the operation succeeded unless throwing.\n     */\n    function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool);\n}\n"},"lib/v4-core/src/libraries/SafeCast.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {CustomRevert} from \"./CustomRevert.sol\";\n\n/// @title Safe casting methods\n/// @notice Contains methods for safely casting between types\nlibrary SafeCast {\n    using CustomRevert for bytes4;\n\n    error SafeCastOverflow();\n\n    /// @notice Cast a uint256 to a uint160, revert on overflow\n    /// @param x The uint256 to be downcasted\n    /// @return y The downcasted integer, now type uint160\n    function toUint160(uint256 x) internal pure returns (uint160 y) {\n        y = uint160(x);\n        if (y != x) SafeCastOverflow.selector.revertWith();\n    }\n\n    /// @notice Cast a uint256 to a uint128, revert on overflow\n    /// @param x The uint256 to be downcasted\n    /// @return y The downcasted integer, now type uint128\n    function toUint128(uint256 x) internal pure returns (uint128 y) {\n        y = uint128(x);\n        if (x != y) SafeCastOverflow.selector.revertWith();\n    }\n\n    /// @notice Cast a int128 to a uint128, revert on overflow or underflow\n    /// @param x The int128 to be casted\n    /// @return y The casted integer, now type uint128\n    function toUint128(int128 x) internal pure returns (uint128 y) {\n        if (x < 0) SafeCastOverflow.selector.revertWith();\n        y = uint128(x);\n    }\n\n    /// @notice Cast a int256 to a int128, revert on overflow or underflow\n    /// @param x The int256 to be downcasted\n    /// @return y The downcasted integer, now type int128\n    function toInt128(int256 x) internal pure returns (int128 y) {\n        y = int128(x);\n        if (y != x) SafeCastOverflow.selector.revertWith();\n    }\n\n    /// @notice Cast a uint256 to a int256, revert on overflow\n    /// @param x The uint256 to be casted\n    /// @return y The casted integer, now type int256\n    function toInt256(uint256 x) internal pure returns (int256 y) {\n        y = int256(x);\n        if (y < 0) SafeCastOverflow.selector.revertWith();\n    }\n\n    /// @notice Cast a uint256 to a int128, revert on overflow\n    /// @param x The uint256 to be downcasted\n    /// @return The downcasted integer, now type int128\n    function toInt128(uint256 x) internal pure returns (int128) {\n        if (x >= 1 << 127) SafeCastOverflow.selector.revertWith();\n        return int128(int256(x));\n    }\n}\n"},"lib/v4-core/src/libraries/LPFeeLibrary.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {CustomRevert} from \"./CustomRevert.sol\";\n\n/// @notice Library of helper functions for a pools LP fee\nlibrary LPFeeLibrary {\n    using LPFeeLibrary for uint24;\n    using CustomRevert for bytes4;\n\n    /// @notice Thrown when the static or dynamic fee on a pool exceeds 100%.\n    error LPFeeTooLarge(uint24 fee);\n\n    /// @notice An lp fee of exactly 0b1000000... signals a dynamic fee pool. This isn't a valid static fee as it is > MAX_LP_FEE\n    uint24 public constant DYNAMIC_FEE_FLAG = 0x800000;\n\n    /// @notice the second bit of the fee returned by beforeSwap is used to signal if the stored LP fee should be overridden in this swap\n    // only dynamic-fee pools can return a fee via the beforeSwap hook\n    uint24 public constant OVERRIDE_FEE_FLAG = 0x400000;\n\n    /// @notice mask to remove the override fee flag from a fee returned by the beforeSwaphook\n    uint24 public constant REMOVE_OVERRIDE_MASK = 0xBFFFFF;\n\n    /// @notice the lp fee is represented in hundredths of a bip, so the max is 100%\n    uint24 public constant MAX_LP_FEE = 1000000;\n\n    /// @notice returns true if a pool's LP fee signals that the pool has a dynamic fee\n    /// @param self The fee to check\n    /// @return bool True of the fee is dynamic\n    function isDynamicFee(uint24 self) internal pure returns (bool) {\n        return self == DYNAMIC_FEE_FLAG;\n    }\n\n    /// @notice returns true if an LP fee is valid, aka not above the maximum permitted fee\n    /// @param self The fee to check\n    /// @return bool True of the fee is valid\n    function isValid(uint24 self) internal pure returns (bool) {\n        return self <= MAX_LP_FEE;\n    }\n\n    /// @notice validates whether an LP fee is larger than the maximum, and reverts if invalid\n    /// @param self The fee to validate\n    function validate(uint24 self) internal pure {\n        if (!self.isValid()) LPFeeTooLarge.selector.revertWith(self);\n    }\n\n    /// @notice gets and validates the initial LP fee for a pool. Dynamic fee pools have an initial fee of 0.\n    /// @dev if a dynamic fee pool wants a non-0 initial fee, it should call `updateDynamicLPFee` in the afterInitialize hook\n    /// @param self The fee to get the initial LP from\n    /// @return initialFee 0 if the fee is dynamic, otherwise the fee (if valid)\n    function getInitialLPFee(uint24 self) internal pure returns (uint24) {\n        // the initial fee for a dynamic fee pool is 0\n        if (self.isDynamicFee()) return 0;\n        self.validate();\n        return self;\n    }\n\n    /// @notice returns true if the fee has the override flag set (2nd highest bit of the uint24)\n    /// @param self The fee to check\n    /// @return bool True of the fee has the override flag set\n    function isOverride(uint24 self) internal pure returns (bool) {\n        return self & OVERRIDE_FEE_FLAG != 0;\n    }\n\n    /// @notice returns a fee with the override flag removed\n    /// @param self The fee to remove the override flag from\n    /// @return fee The fee without the override flag set\n    function removeOverrideFlag(uint24 self) internal pure returns (uint24) {\n        return self & REMOVE_OVERRIDE_MASK;\n    }\n\n    /// @notice Removes the override flag and validates the fee (reverts if the fee is too large)\n    /// @param self The fee to remove the override flag from, and then validate\n    /// @return fee The fee without the override flag set (if valid)\n    function removeOverrideFlagAndValidate(uint24 self) internal pure returns (uint24 fee) {\n        fee = self.removeOverrideFlag();\n        fee.validate();\n    }\n}\n"},"lib/v4-core/src/libraries/ParseBytes.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/// @notice Parses bytes returned from hooks and the byte selector used to check return selectors from hooks.\n/// @dev parseSelector also is used to parse the expected selector\n/// For parsing hook returns, note that all hooks return either bytes4 or (bytes4, 32-byte-delta) or (bytes4, 32-byte-delta, uint24).\nlibrary ParseBytes {\n    function parseSelector(bytes memory result) internal pure returns (bytes4 selector) {\n        // equivalent: (selector,) = abi.decode(result, (bytes4, int256));\n        assembly (\"memory-safe\") {\n            selector := mload(add(result, 0x20))\n        }\n    }\n\n    function parseFee(bytes memory result) internal pure returns (uint24 lpFee) {\n        // equivalent: (,, lpFee) = abi.decode(result, (bytes4, int256, uint24));\n        assembly (\"memory-safe\") {\n            lpFee := mload(add(result, 0x60))\n        }\n    }\n\n    function parseReturnDelta(bytes memory result) internal pure returns (int256 hookReturn) {\n        // equivalent: (, hookReturnDelta) = abi.decode(result, (bytes4, int256));\n        assembly (\"memory-safe\") {\n            hookReturn := mload(add(result, 0x40))\n        }\n    }\n}\n"},"lib/v4-periphery/src/base/ImmutableState.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {IPoolManager} from \"@uniswap/v4-core/src/interfaces/IPoolManager.sol\";\nimport {IImmutableState} from \"../interfaces/IImmutableState.sol\";\n\n/// @title Immutable State\n/// @notice A collection of immutable state variables, commonly used across multiple contracts\ncontract ImmutableState is IImmutableState {\n    /// @inheritdoc IImmutableState\n    IPoolManager public immutable poolManager;\n\n    /// @notice Thrown when the caller is not PoolManager\n    error NotPoolManager();\n\n    /// @notice Only allow calls from the PoolManager contract\n    modifier onlyPoolManager() {\n        if (msg.sender != address(poolManager)) revert NotPoolManager();\n        _;\n    }\n\n    constructor(IPoolManager _poolManager) {\n        poolManager = _poolManager;\n    }\n}\n"},"lib/v4-core/src/libraries/TransientStateLibrary.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.24;\n\nimport {IPoolManager} from \"../interfaces/IPoolManager.sol\";\nimport {Currency} from \"../types/Currency.sol\";\nimport {CurrencyReserves} from \"./CurrencyReserves.sol\";\nimport {NonzeroDeltaCount} from \"./NonzeroDeltaCount.sol\";\nimport {Lock} from \"./Lock.sol\";\n\n/// @notice A helper library to provide state getters that use exttload\nlibrary TransientStateLibrary {\n    /// @notice returns the reserves for the synced currency\n    /// @param manager The pool manager contract.\n\n    /// @return uint256 The reserves of the currency.\n    /// @dev returns 0 if the reserves are not synced or value is 0.\n    /// Checks the synced currency to only return valid reserve values (after a sync and before a settle).\n    function getSyncedReserves(IPoolManager manager) internal view returns (uint256) {\n        if (getSyncedCurrency(manager).isAddressZero()) return 0;\n        return uint256(manager.exttload(CurrencyReserves.RESERVES_OF_SLOT));\n    }\n\n    function getSyncedCurrency(IPoolManager manager) internal view returns (Currency) {\n        return Currency.wrap(address(uint160(uint256(manager.exttload(CurrencyReserves.CURRENCY_SLOT)))));\n    }\n\n    /// @notice Returns the number of nonzero deltas open on the PoolManager that must be zeroed out before the contract is locked\n    function getNonzeroDeltaCount(IPoolManager manager) internal view returns (uint256) {\n        return uint256(manager.exttload(NonzeroDeltaCount.NONZERO_DELTA_COUNT_SLOT));\n    }\n\n    /// @notice Get the current delta for a caller in the given currency\n    /// @param target The credited account address\n    /// @param currency The currency for which to lookup the delta\n    function currencyDelta(IPoolManager manager, address target, Currency currency) internal view returns (int256) {\n        bytes32 key;\n        assembly (\"memory-safe\") {\n            mstore(0, and(target, 0xffffffffffffffffffffffffffffffffffffffff))\n            mstore(32, and(currency, 0xffffffffffffffffffffffffffffffffffffffff))\n            key := keccak256(0, 64)\n        }\n        return int256(uint256(manager.exttload(key)));\n    }\n\n    /// @notice Returns whether the contract is unlocked or not\n    function isUnlocked(IPoolManager manager) internal view returns (bool) {\n        return manager.exttload(Lock.IS_UNLOCKED_SLOT) != 0x0;\n    }\n}\n"},"lib/v4-periphery/src/libraries/ActionConstants.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n/// @title Action Constants\n/// @notice Common constants used in actions\n/// @dev Constants are gas efficient alternatives to their literal values\nlibrary ActionConstants {\n    /// @notice used to signal that an action should use the input value of the open delta on the pool manager\n    /// or of the balance that the contract holds\n    uint128 internal constant OPEN_DELTA = 0;\n    /// @notice used to signal that an action should use the contract's entire balance of a currency\n    /// This value is equivalent to 1<<255, i.e. a singular 1 in the most significant bit.\n    uint256 internal constant CONTRACT_BALANCE = 0x8000000000000000000000000000000000000000000000000000000000000000;\n\n    /// @notice used to signal that the recipient of an action should be the msgSender\n    address internal constant MSG_SENDER = address(1);\n\n    /// @notice used to signal that the recipient of an action should be the address(this)\n    address internal constant ADDRESS_THIS = address(2);\n}\n"},"lib/v4-core/src/libraries/ProtocolFeeLibrary.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n/// @notice library of functions related to protocol fees\nlibrary ProtocolFeeLibrary {\n    /// @notice Max protocol fee is 0.1% (1000 pips)\n    /// @dev Increasing these values could lead to overflow in Pool.swap\n    uint16 public constant MAX_PROTOCOL_FEE = 1000;\n\n    /// @notice Thresholds used for optimized bounds checks on protocol fees\n    uint24 internal constant FEE_0_THRESHOLD = 1001;\n    uint24 internal constant FEE_1_THRESHOLD = 1001 << 12;\n\n    /// @notice the protocol fee is represented in hundredths of a bip\n    uint256 internal constant PIPS_DENOMINATOR = 1_000_000;\n\n    function getZeroForOneFee(uint24 self) internal pure returns (uint16) {\n        return uint16(self & 0xfff);\n    }\n\n    function getOneForZeroFee(uint24 self) internal pure returns (uint16) {\n        return uint16(self >> 12);\n    }\n\n    function isValidProtocolFee(uint24 self) internal pure returns (bool valid) {\n        // Equivalent to: getZeroForOneFee(self) <= MAX_PROTOCOL_FEE && getOneForZeroFee(self) <= MAX_PROTOCOL_FEE\n        assembly (\"memory-safe\") {\n            let isZeroForOneFeeOk := lt(and(self, 0xfff), FEE_0_THRESHOLD)\n            let isOneForZeroFeeOk := lt(and(self, 0xfff000), FEE_1_THRESHOLD)\n            valid := and(isZeroForOneFeeOk, isOneForZeroFeeOk)\n        }\n    }\n\n    // The protocol fee is taken from the input amount first and then the LP fee is taken from the remaining\n    // The swap fee is capped at 100%\n    // Equivalent to protocolFee + lpFee(1_000_000 - protocolFee) / 1_000_000 (rounded up)\n    /// @dev here `self` is just a single direction's protocol fee, not a packed type of 2 protocol fees\n    function calculateSwapFee(uint16 self, uint24 lpFee) internal pure returns (uint24 swapFee) {\n        // protocolFee + lpFee - (protocolFee * lpFee / 1_000_000)\n        assembly (\"memory-safe\") {\n            self := and(self, 0xfff)\n            lpFee := and(lpFee, 0xffffff)\n            let numerator := mul(self, lpFee)\n            swapFee := sub(add(self, lpFee), div(numerator, PIPS_DENOMINATOR))\n        }\n    }\n}\n"},"lib/protocol-fees/src/interfaces/IV4FeeAdapter.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {IPoolManager} from \"v4-core/interfaces/IPoolManager.sol\";\nimport {PoolKey} from \"v4-core/types/PoolKey.sol\";\nimport {PoolId} from \"v4-core/types/PoolId.sol\";\nimport {Currency} from \"v4-core/types/Currency.sol\";\nimport {IV4FeePolicy} from \"./IV4FeePolicy.sol\";\n\n/// @title IV4FeeAdapter\n/// @notice Interface for the V4 fee adapter — the protocolFeeController registered on the\n/// PoolManager. Resolves fees via pool overrides or policy delegation, triggers fee updates,\n/// and collects accrued fees to the TokenJar.\n/// @custom:security-contact security@uniswap.org\ninterface IV4FeeAdapter {\n  // --- Errors ---\n\n  /// @notice Thrown when an unauthorized address calls a restricted function.\n  error Unauthorized();\n\n  /// @notice Thrown when a zero address is provided.\n  error ZeroAddress();\n\n  /// @notice Thrown when a fee value fails ProtocolFeeLibrary.isValidProtocolFee.\n  error InvalidFeeValue();\n\n  // --- Events ---\n\n  /// @notice Emitted when the policy contract is updated.\n  /// @param oldPolicy The previous policy address.\n  /// @param newPolicy The new policy address.\n  event PolicyUpdated(address indexed oldPolicy, address indexed newPolicy);\n\n  /// @notice Emitted when a pool override is set or removed.\n  /// @dev `feeValue` is the encoded storage value: 0 = removed/unset,\n  /// ZERO_FEE_SENTINEL = explicit zero fee.\n  /// @param poolId The pool whose override changed.\n  /// @param feeValue The new encoded fee value.\n  event PoolOverrideUpdated(PoolId indexed poolId, uint24 feeValue);\n\n  /// @notice Emitted when the fee setter address is updated.\n  /// @param oldFeeSetter The previous fee setter address.\n  /// @param newFeeSetter The new fee setter address.\n  event FeeSetterUpdated(address indexed oldFeeSetter, address indexed newFeeSetter);\n\n  /// @notice Emitted when a fee update is triggered for a pool.\n  /// @param caller The address that triggered the update.\n  /// @param poolId The pool that was updated.\n  /// @param feeValue The protocol fee that was set on the PoolManager.\n  event FeeUpdateTriggered(address indexed caller, PoolId indexed poolId, uint24 feeValue);\n\n  /// @notice Emitted when protocol fees are collected.\n  /// @param currency The currency that was collected.\n  /// @param amount The amount collected.\n  event FeesCollected(Currency indexed currency, uint256 amount);\n\n  // --- Structs ---\n\n  /// @notice Parameters for collecting protocol fees.\n  struct CollectParams {\n    /// @dev The currency to collect.\n    Currency currency;\n    /// @dev The amount to collect. 0 = collect all accrued.\n    uint256 amount;\n  }\n\n  // --- Immutables ---\n\n  /// @notice The Uniswap V4 PoolManager this adapter controls fees for.\n  /// @return The PoolManager contract.\n  function POOL_MANAGER() external view returns (IPoolManager);\n\n  /// @notice The address where collected fees are sent.\n  /// @return The TokenJar address.\n  function TOKEN_JAR() external view returns (address);\n\n  /// @notice Sentinel value representing an explicit zero fee in storage.\n  /// @dev type(uint24).max — safe because isValidProtocolFee rejects it.\n  /// @return The sentinel value (0xFFFFFF).\n  function ZERO_FEE_SENTINEL() external pure returns (uint24);\n\n  // --- State ---\n\n  /// @notice The address authorized to set pool overrides.\n  /// @return The current fee setter address.\n  function feeSetter() external view returns (address);\n\n  /// @notice The current fee policy contract.\n  /// @return The policy contract address.\n  function policy() external view returns (IV4FeePolicy);\n\n  /// @notice Returns the pool-specific fee override.\n  /// @param poolId The pool to query.\n  /// @return The sentinel-encoded fee override. 0 = not set.\n  function poolOverrides(PoolId poolId) external view returns (uint24);\n\n  // --- Admin (onlyOwner) ---\n\n  /// @notice Sets the fee policy contract. Only callable by owner.\n  /// @dev Setting address(0) disables policy — all non-overridden pools get fee 0.\n  /// @param newPolicy The new policy contract address.\n  function setPolicy(IV4FeePolicy newPolicy) external;\n\n  /// @notice Sets the fee setter address. Only callable by owner.\n  /// @param newFeeSetter The new fee setter address.\n  function setFeeSetter(address newFeeSetter) external;\n\n  // --- Pool Overrides (onlyFeeSetter) ---\n\n  /// @notice Sets a pool-specific fee override (highest priority in waterfall).\n  /// @dev Setting 0 sets an explicit zero fee (does NOT fall through to policy).\n  /// Use clearPoolOverride to remove the override entirely.\n  /// @param poolId The pool to override.\n  /// @param feeValue The protocol fee to set. Must pass isValidProtocolFee if non-zero.\n  function setPoolOverride(PoolId poolId, uint24 feeValue) external;\n\n  /// @notice Removes a pool-specific fee override, falling through to policy.\n  /// @param poolId The pool to clear the override for.\n  function clearPoolOverride(PoolId poolId) external;\n\n  // --- Fee Resolution ---\n\n  /// @notice Resolves the protocol fee for a pool: pool override → policy → 0.\n  /// @param key The pool key to resolve the fee for.\n  /// @return fee The resolved protocol fee.\n  function getFee(PoolKey memory key) external view returns (uint24 fee);\n\n  // --- Permissionless Triggering ---\n\n  /// @notice Triggers a fee update for a single pool. Permissionless.\n  /// @dev Silently skips uninitialized pools (sqrtPriceX96 == 0).\n  /// @param key The pool key to update.\n  function triggerFeeUpdate(PoolKey calldata key) external;\n\n  /// @notice Triggers fee updates for multiple pools. Permissionless.\n  /// @dev Silently skips uninitialized pools.\n  /// @param keys The pool keys to update.\n  function batchTriggerFeeUpdate(PoolKey[] calldata keys) external;\n\n  // --- Collection ---\n\n  /// @notice Collects protocol fees to the TOKEN_JAR. Permissionless.\n  /// @dev Safe because funds always go to the immutable TOKEN_JAR. The PoolManager\n  /// enforces that only the protocolFeeController (this contract) can call\n  /// collectProtocolFees.\n  /// @param params Array of currencies and amounts to collect.\n  function collect(CollectParams[] calldata params) external;\n}\n"},"lib/v4-core/src/libraries/FullMath.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n/// @title Contains 512-bit math functions\n/// @notice Facilitates multiplication and division that can have overflow of an intermediate value without any loss of precision\n/// @dev Handles \"phantom overflow\" i.e., allows multiplication and division where an intermediate value overflows 256 bits\nlibrary FullMath {\n    /// @notice Calculates floor(a×b÷denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\n    /// @param a The multiplicand\n    /// @param b The multiplier\n    /// @param denominator The divisor\n    /// @return result The 256-bit result\n    /// @dev Credit to Remco Bloemen under MIT license https://xn--2-umb.com/21/muldiv\n    function mulDiv(uint256 a, uint256 b, uint256 denominator) internal pure returns (uint256 result) {\n        unchecked {\n            // 512-bit multiply [prod1 prod0] = a * b\n            // Compute the product mod 2**256 and mod 2**256 - 1\n            // then use the Chinese Remainder Theorem to reconstruct\n            // the 512 bit result. The result is stored in two 256\n            // variables such that product = prod1 * 2**256 + prod0\n            uint256 prod0 = a * b; // Least significant 256 bits of the product\n            uint256 prod1; // Most significant 256 bits of the product\n            assembly (\"memory-safe\") {\n                let mm := mulmod(a, b, not(0))\n                prod1 := sub(sub(mm, prod0), lt(mm, prod0))\n            }\n\n            // Make sure the result is less than 2**256.\n            // Also prevents denominator == 0\n            require(denominator > prod1);\n\n            // Handle non-overflow cases, 256 by 256 division\n            if (prod1 == 0) {\n                assembly (\"memory-safe\") {\n                    result := div(prod0, denominator)\n                }\n                return result;\n            }\n\n            ///////////////////////////////////////////////\n            // 512 by 256 division.\n            ///////////////////////////////////////////////\n\n            // Make division exact by subtracting the remainder from [prod1 prod0]\n            // Compute remainder using mulmod\n            uint256 remainder;\n            assembly (\"memory-safe\") {\n                remainder := mulmod(a, b, denominator)\n            }\n            // Subtract 256 bit number from 512 bit number\n            assembly (\"memory-safe\") {\n                prod1 := sub(prod1, gt(remainder, prod0))\n                prod0 := sub(prod0, remainder)\n            }\n\n            // Factor powers of two out of denominator\n            // Compute largest power of two divisor of denominator.\n            // Always >= 1.\n            uint256 twos = (0 - denominator) & denominator;\n            // Divide denominator by power of two\n            assembly (\"memory-safe\") {\n                denominator := div(denominator, twos)\n            }\n\n            // Divide [prod1 prod0] by the factors of two\n            assembly (\"memory-safe\") {\n                prod0 := div(prod0, twos)\n            }\n            // Shift in bits from prod1 into prod0. For this we need\n            // to flip `twos` such that it is 2**256 / twos.\n            // If twos is zero, then it becomes one\n            assembly (\"memory-safe\") {\n                twos := add(div(sub(0, twos), twos), 1)\n            }\n            prod0 |= prod1 * twos;\n\n            // Invert denominator mod 2**256\n            // Now that denominator is an odd number, it has an inverse\n            // modulo 2**256 such that denominator * inv = 1 mod 2**256.\n            // Compute the inverse by starting with a seed that is correct\n            // correct for four bits. That is, denominator * inv = 1 mod 2**4\n            uint256 inv = (3 * denominator) ^ 2;\n            // Now use Newton-Raphson iteration to improve the precision.\n            // Thanks to Hensel's lifting lemma, this also works in modular\n            // arithmetic, doubling the correct bits in each step.\n            inv *= 2 - denominator * inv; // inverse mod 2**8\n            inv *= 2 - denominator * inv; // inverse mod 2**16\n            inv *= 2 - denominator * inv; // inverse mod 2**32\n            inv *= 2 - denominator * inv; // inverse mod 2**64\n            inv *= 2 - denominator * inv; // inverse mod 2**128\n            inv *= 2 - denominator * inv; // inverse mod 2**256\n\n            // Because the division is now exact we can divide by multiplying\n            // with the modular inverse of denominator. This will give us the\n            // correct result modulo 2**256. Since the preconditions guarantee\n            // that the outcome is less than 2**256, this is the final result.\n            // We don't need to compute the high bits of the result and prod1\n            // is no longer required.\n            result = prod0 * inv;\n            return result;\n        }\n    }\n\n    /// @notice Calculates ceil(a×b÷denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\n    /// @param a The multiplicand\n    /// @param b The multiplier\n    /// @param denominator The divisor\n    /// @return result The 256-bit result\n    function mulDivRoundingUp(uint256 a, uint256 b, uint256 denominator) internal pure returns (uint256 result) {\n        unchecked {\n            result = mulDiv(a, b, denominator);\n            if (mulmod(a, b, denominator) != 0) {\n                require(++result > 0);\n            }\n        }\n    }\n}\n"},"lib/v4-core/src/libraries/FixedPoint128.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n/// @title FixedPoint128\n/// @notice A library for handling binary fixed point numbers, see https://en.wikipedia.org/wiki/Q_(number_format)\nlibrary FixedPoint128 {\n    uint256 internal constant Q128 = 0x100000000000000000000000000000000;\n}\n"},"lib/v4-core/src/libraries/LiquidityMath.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n/// @title Math library for liquidity\nlibrary LiquidityMath {\n    /// @notice Add a signed liquidity delta to liquidity and revert if it overflows or underflows\n    /// @param x The liquidity before change\n    /// @param y The delta by which liquidity should be changed\n    /// @return z The liquidity delta\n    function addDelta(uint128 x, int128 y) internal pure returns (uint128 z) {\n        assembly (\"memory-safe\") {\n            z := add(and(x, 0xffffffffffffffffffffffffffffffff), signextend(15, y))\n            if shr(128, z) {\n                // revert SafeCastOverflow()\n                mstore(0, 0x93dafdf1)\n                revert(0x1c, 0x04)\n            }\n        }\n    }\n}\n"},"lib/openzeppelin-contracts/contracts/interfaces/IERC20.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC20.sol)\n\npragma solidity >=0.4.16;\n\nimport {IERC20} from \"../token/ERC20/IERC20.sol\";\n"},"lib/openzeppelin-contracts/contracts/interfaces/IERC165.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC165.sol)\n\npragma solidity >=0.4.16;\n\nimport {IERC165} from \"../utils/introspection/IERC165.sol\";\n"},"lib/v4-periphery/src/interfaces/IImmutableState.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {IPoolManager} from \"@uniswap/v4-core/src/interfaces/IPoolManager.sol\";\n\n/// @title IImmutableState\n/// @notice Interface for the ImmutableState contract\ninterface IImmutableState {\n    /// @notice The Uniswap v4 PoolManager contract\n    function poolManager() external view returns (IPoolManager);\n}\n"},"lib/v4-core/src/libraries/CurrencyReserves.sol":{"content":"// SPDX-License-Identifier: BUSL-1.1\npragma solidity ^0.8.24;\n\nimport {Currency} from \"../types/Currency.sol\";\nimport {CustomRevert} from \"./CustomRevert.sol\";\n\nlibrary CurrencyReserves {\n    using CustomRevert for bytes4;\n\n    /// bytes32(uint256(keccak256(\"ReservesOf\")) - 1)\n    bytes32 constant RESERVES_OF_SLOT = 0x1e0745a7db1623981f0b2a5d4232364c00787266eb75ad546f190e6cebe9bd95;\n    /// bytes32(uint256(keccak256(\"Currency\")) - 1)\n    bytes32 constant CURRENCY_SLOT = 0x27e098c505d44ec3574004bca052aabf76bd35004c182099d8c575fb238593b9;\n\n    function getSyncedCurrency() internal view returns (Currency currency) {\n        assembly (\"memory-safe\") {\n            currency := tload(CURRENCY_SLOT)\n        }\n    }\n\n    function resetCurrency() internal {\n        assembly (\"memory-safe\") {\n            tstore(CURRENCY_SLOT, 0)\n        }\n    }\n\n    function syncCurrencyAndReserves(Currency currency, uint256 value) internal {\n        assembly (\"memory-safe\") {\n            tstore(CURRENCY_SLOT, and(currency, 0xffffffffffffffffffffffffffffffffffffffff))\n            tstore(RESERVES_OF_SLOT, value)\n        }\n    }\n\n    function getSyncedReserves() internal view returns (uint256 value) {\n        assembly (\"memory-safe\") {\n            value := tload(RESERVES_OF_SLOT)\n        }\n    }\n}\n"},"lib/v4-core/src/libraries/NonzeroDeltaCount.sol":{"content":"// SPDX-License-Identifier: BUSL-1.1\npragma solidity ^0.8.24;\n\n/// @notice This is a temporary library that allows us to use transient storage (tstore/tload)\n/// for the nonzero delta count.\n/// TODO: This library can be deleted when we have the transient keyword support in solidity.\nlibrary NonzeroDeltaCount {\n    // The slot holding the number of nonzero deltas. bytes32(uint256(keccak256(\"NonzeroDeltaCount\")) - 1)\n    bytes32 internal constant NONZERO_DELTA_COUNT_SLOT =\n        0x7d4b3164c6e45b97e7d87b7125a44c5828d005af88f9d751cfd78729c5d99a0b;\n\n    function read() internal view returns (uint256 count) {\n        assembly (\"memory-safe\") {\n            count := tload(NONZERO_DELTA_COUNT_SLOT)\n        }\n    }\n\n    function increment() internal {\n        assembly (\"memory-safe\") {\n            let count := tload(NONZERO_DELTA_COUNT_SLOT)\n            count := add(count, 1)\n            tstore(NONZERO_DELTA_COUNT_SLOT, count)\n        }\n    }\n\n    /// @notice Potential to underflow. Ensure checks are performed by integrating contracts to ensure this does not happen.\n    /// Current usage ensures this will not happen because we call decrement with known boundaries (only up to the number of times we call increment).\n    function decrement() internal {\n        assembly (\"memory-safe\") {\n            let count := tload(NONZERO_DELTA_COUNT_SLOT)\n            count := sub(count, 1)\n            tstore(NONZERO_DELTA_COUNT_SLOT, count)\n        }\n    }\n}\n"},"lib/v4-core/src/libraries/Lock.sol":{"content":"// SPDX-License-Identifier: BUSL-1.1\npragma solidity ^0.8.24;\n\n/// @notice This is a temporary library that allows us to use transient storage (tstore/tload)\n/// TODO: This library can be deleted when we have the transient keyword support in solidity.\nlibrary Lock {\n    // The slot holding the unlocked state, transiently. bytes32(uint256(keccak256(\"Unlocked\")) - 1)\n    bytes32 internal constant IS_UNLOCKED_SLOT = 0xc090fc4683624cfc3884e9d8de5eca132f2d0ec062aff75d43c0465d5ceeab23;\n\n    function unlock() internal {\n        assembly (\"memory-safe\") {\n            // unlock\n            tstore(IS_UNLOCKED_SLOT, true)\n        }\n    }\n\n    function lock() internal {\n        assembly (\"memory-safe\") {\n            tstore(IS_UNLOCKED_SLOT, false)\n        }\n    }\n\n    function isUnlocked() internal view returns (bool unlocked) {\n        assembly (\"memory-safe\") {\n            unlocked := tload(IS_UNLOCKED_SLOT)\n        }\n    }\n}\n"},"lib/protocol-fees/src/interfaces/IV4FeePolicy.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {IPoolManager} from \"v4-core/interfaces/IPoolManager.sol\";\nimport {PoolKey} from \"v4-core/types/PoolKey.sol\";\nimport {Currency} from \"v4-core/types/Currency.sol\";\n\n/// @dev A single segment of the piecewise-linear protocol-fee schedule on the\n/// StaticNativeMath path. Buckets are stored in an ascending-by-lpFeeFloor array.\n/// For a given `key.fee`, evaluation finds the bucket with the largest floor\n/// <= key.fee (or bucket 0 if key.fee < floor_0) and returns\n/// alpha + beta * (key.fee - floor) / 1_000_000 per direction (clamped to\n/// MAX_PROTOCOL_FEE).\nstruct FeeBucket {\n  /// @dev LP-fee floor for this bucket, in pips. Ascending across the array; matches v4-core fee\n  /// type.\n  uint24 lpFeeFloor;\n  /// @dev Flat base fee per direction in pips. Must be <= MAX_PROTOCOL_FEE (1000).\n  uint24 alphaPips;\n  /// @dev Slope: pips of protocol fee per pip of (lpFee - floor). Capped to 1_000_000_000\n  /// (above which any 1-pip delta saturates the per-direction MAX_PROTOCOL_FEE clamp).\n  uint32 betaPips;\n}\n\n/// @dev A flag-to-family mapping rule. The policy walks rules in order; the first rule\n/// whose requiredFlags are all present in the hook's self-reported flags wins.\nstruct FlagRule {\n  /// @dev Bitmask of flags that must ALL be set in the hook's protocolFeeFlags() return\n  /// value for this rule to match. The bits are an opaque convention between governance\n  /// and hooks; see the governance guide for the values in active use.\n  uint256 requiredFlags;\n  /// @dev The family ID assigned when this rule matches. Must be > 0.\n  uint8 familyId;\n}\n\n/// @dev Hook address and family for `batchSetHookFamily`.\nstruct HookFamilyAssignment {\n  address hook;\n  uint8 familyId;\n}\n\n/// @dev Token pair, family slot, and fee for `batchSetPairClassFee`.\nstruct PairClassFeeAssignment {\n  Currency currency0;\n  Currency currency1;\n  uint8 familyId;\n  uint24 feeValue;\n}\n\n/// @dev Token pair and family slot for `batchClearPairClassFee`.\nstruct PairClassFeeClear {\n  Currency currency0;\n  Currency currency1;\n  uint8 familyId;\n}\n\n/// @title IV4FeePolicy\n/// @notice Interface for the V4 fee policy contract that computes protocol fees based on\n/// automated hook classification and governance-configured parameters.\n/// @dev Governance hook family IDs are 1-255. 0 = unclassified. `NATIVE_MATH_FAMILY_ID`\n/// (255) is also used internally for native-math resolution on static pools; governance may\n/// reuse 255 for classified config when appropriate.\n/// Hooks can self-report behavioral flags via IFeeClassifiedHook.protocolFeeFlags();\n/// governance-configured flag rules map flag patterns to families automatically.\n/// Static NativeMath pools bypass hook classification and derive their protocol fee from\n/// `pairClassFees[pair][NATIVE_MATH_FAMILY_ID]` or a piecewise-linear fee-bucket schedule.\n/// Custom-accounting hooks and dynamic fee pools require classification (governance\n/// override, flag rule match, or defaultFee fallback).\n/// @custom:security-contact security@uniswap.org\ninterface IV4FeePolicy {\n  // --- Errors ---\n\n  /// @notice Thrown when an unauthorized address calls a restricted function.\n  error Unauthorized();\n\n  /// @notice Thrown when a fee value fails ProtocolFeeLibrary.isValidProtocolFee.\n  error InvalidFeeValue();\n\n  /// @notice Thrown when familyId is 0 or `NATIVE_MATH_FAMILY_ID` on family-default setters.\n  error InvalidFamilyId();\n\n  /// @notice Thrown when a fee bucket's `betaPips` exceeds 1_000_000_000.\n  error MultiplierTooLarge();\n\n  /// @notice Thrown when currency0 >= currency1 in setPairClassFee.\n  error CurrenciesOutOfOrder();\n\n  /// @notice Thrown when a flag rule has requiredFlags == 0 or a non-governance familyId.\n  error InvalidFlagRule();\n\n  /// @notice Thrown when flag rules exceed the maximum allowed count.\n  error TooManyFlagRules();\n\n  /// @notice Thrown when flag rules are not sorted from most to least specific.\n  error FlagRulesNotSorted();\n\n  /// @notice Thrown when setFeeBuckets is called with an empty array.\n  error EmptyBuckets();\n\n  /// @notice Thrown when fee buckets are not in strictly ascending order of lpFeeFloor.\n  error BucketsNotAscending();\n\n  /// @notice Thrown when fee buckets exceed the maximum allowed count.\n  error TooManyBuckets();\n\n  // --- Events ---\n\n  /// @notice Emitted when the fee setter address is updated.\n  /// @param oldFeeSetter The previous fee setter address.\n  /// @param newFeeSetter The new fee setter address.\n  event FeeSetterUpdated(address indexed oldFeeSetter, address indexed newFeeSetter);\n\n  /// @notice Emitted when a hook's family classification is set or cleared.\n  /// @param hook The hook address that was classified.\n  /// @param familyId The assigned family ID (0 = unclassified).\n  event HookFamilySet(address indexed hook, uint8 familyId);\n\n  /// @notice Emitted when a family's default protocol fee is updated.\n  /// @dev `feeValue` is the encoded storage value: 0 = removed/unset,\n  /// ZERO_FEE_SENTINEL = explicit zero fee.\n  /// @param familyId The family whose default was changed.\n  /// @param feeValue The new encoded default fee.\n  event FamilyDefaultUpdated(uint8 indexed familyId, uint24 feeValue);\n\n  /// @notice Emitted when a pair class fee is updated.\n  /// @dev `feeValue` is the encoded storage value: 0 = removed/unset,\n  /// ZERO_FEE_SENTINEL = explicit zero fee. `familyId` is `NATIVE_MATH_FAMILY_ID` for\n  /// native-math pair overrides, or a governance family ID (1-255) otherwise.\n  /// @param pairHash The canonical hash of the token pair.\n  /// @param familyId The family slot that was changed.\n  /// @param feeValue The new encoded fee.\n  event PairClassFeeUpdated(bytes32 indexed pairHash, uint8 indexed familyId, uint24 feeValue);\n\n  /// @notice Emitted when the fee buckets array is replaced.\n  /// @param bucketCount The number of buckets in the new array.\n  event FeeBucketsUpdated(uint256 bucketCount);\n\n  /// @notice Emitted when the default classified fee is updated.\n  /// @dev `feeValue` is the encoded storage value: 0 = removed/unset,\n  /// ZERO_FEE_SENTINEL = explicit zero fee.\n  /// @param feeValue The new encoded default fee.\n  event DefaultFeeUpdated(uint24 feeValue);\n\n  /// @notice Emitted when the hooked native-math fee switch is toggled.\n  /// @param enabled True if hooked native-math pools are now classified as native math.\n  event HookedNativeMathFeeOnUpdated(bool enabled);\n\n  /// @notice Emitted when the flag rules array is replaced.\n  /// @param ruleCount The number of rules in the new array.\n  event FlagRulesUpdated(uint256 ruleCount);\n\n  // --- Constants ---\n\n  /// @notice Bitmask for the four RETURNS_DELTA flags (bits 0-3 of hook address).\n  /// @dev BEFORE_SWAP_RETURNS_DELTA (bit 3) | AFTER_SWAP_RETURNS_DELTA (bit 2) |\n  /// AFTER_ADD_LIQUIDITY_RETURNS_DELTA (bit 1) | AFTER_REMOVE_LIQUIDITY_RETURNS_DELTA (bit 0)\n  /// @return The bitmask value (0xF).\n  function CUSTOM_ACCOUNTING_MASK() external pure returns (uint160);\n\n  /// @notice Reserved `pairClassFees` family slot for native-math pair overrides.\n  /// @dev Not assignable as a governance hook family. Distinct from `hookFamilyId == 0`.\n  /// @return 0xFF (255 == `type(uint8).max`).\n  function NATIVE_MATH_FAMILY_ID() external pure returns (uint8);\n\n  /// @notice Reserved `pairClassFees` family slot for unclassified hooks.\n  /// @dev Not assignable as a governance hook family. Distinct from `NATIVE_MATH_FAMILY_ID`.\n  /// @return 0 (unclassified).\n  function UNCLASSIFIED_FAMILY_ID() external pure returns (uint8);\n\n  // --- Immutables ---\n\n  /// @notice The Uniswap V4 PoolManager this policy reads state from.\n  /// @return The PoolManager contract.\n  function POOL_MANAGER() external view returns (IPoolManager);\n\n  // --- State ---\n\n  /// @notice The address authorized to configure fees.\n  /// @return The current fee setter address.\n  function feeSetter() external view returns (address);\n\n  /// @notice Fallback fee for classified pools when no family-specific config applies.\n  /// @dev Also used for unclassified hooks (familyId == 0). Sentinel-encoded in storage.\n  /// @return The sentinel-encoded default fee.\n  function defaultFee() external view returns (uint24);\n\n  /// @notice Whether native-math pools that carry a hook are classified as native math.\n  /// @dev Hookless native-math pools are always native math. When false (the default),\n  /// hooked native-math pools bypass the native-math family and fall through to flag-rule\n  /// classification / `defaultFee`, so the bucket schedule does not apply to them. Flip to\n  /// true to bring hooked native-math pools onto the same native-math fee path as hookless\n  /// pools.\n  /// @return True if hooked native-math pools are treated as native math.\n  function isHookedNativeMathFeeOn() external view returns (bool);\n\n  /// @notice Returns the governance-assigned family ID for a hook.\n  /// @dev 0 = unclassified on the classified path. StaticNativeMath pools do not use this.\n  /// @param hook The hook address to query.\n  /// @return The family ID (0-255).\n  function hookFamilyId(address hook) external view returns (uint8);\n\n  /// @notice Returns the default protocol fee for a given family ID.\n  /// @param familyId The family to query (must be > 0 when set via admin).\n  /// @return The sentinel-encoded default fee for the family.\n  function familyDefaults(uint8 familyId) external view returns (uint24);\n\n  /// @notice Returns the pair class fee for a token pair and family slot.\n  /// @dev `familyId == NATIVE_MATH_FAMILY_ID` is the StaticNativeMath pair override.\n  /// Governance families use IDs 1-255; `NATIVE_MATH_FAMILY_ID` is the native-math slot.\n  /// 0 in storage = not set.\n  /// @param pairHash The canonical keccak256 hash of the sorted token pair.\n  /// @param familyId The family slot to query.\n  /// @return The sentinel-encoded fee (0 = not set).\n  function pairClassFees(bytes32 pairHash, uint8 familyId) external view returns (uint24);\n\n  /// @notice Returns the number of fee buckets configured.\n  /// @return The count of fee buckets.\n  function feeBucketsLength() external view returns (uint256);\n\n  /// @notice Returns the fee bucket at the given index.\n  /// @param index The zero-based index into the buckets array.\n  /// @return lpFeeFloor The LP-fee floor for this bucket.\n  /// @return alphaPips The flat base fee per direction in pips.\n  /// @return betaPips The slope: pips of protocol fee per pip of (lpFee - floor).\n  function feeBucket(uint256 index)\n    external\n    view\n    returns (uint24 lpFeeFloor, uint24 alphaPips, uint32 betaPips);\n\n  /// @notice Returns the number of flag rules configured.\n  /// @return The count of flag rules.\n  function flagRulesLength() external view returns (uint256);\n\n  /// @notice Returns the flag rule at the given index.\n  /// @param index The zero-based index into the rules array.\n  /// @return requiredFlags The flags that must all be present for a match.\n  /// @return familyId The family ID assigned on match.\n  function flagRules(uint256 index) external view returns (uint256 requiredFlags, uint8 familyId);\n\n  // --- Pure Classification ---\n\n  /// @notice Returns true if the hook has any RETURNS_DELTA flag set (bits 0-3).\n  /// @dev Pure function of the hook address — no storage reads, no external calls.\n  /// @param hook The hook address to check.\n  /// @return True if the hook performs custom accounting.\n  function isCustomAccounting(address hook) external pure returns (bool);\n\n  // --- Fee Computation ---\n\n  /// @notice Computes the protocol fee for a pool.\n  /// @dev Resolve family, then: native math (`NATIVE_MATH_FAMILY_ID` on static pools) →\n  /// `pairClassFees[pair][family]` → `familyDefaults[family]` → `defaultFee`.\n  /// Unclassified custom-accounting / dynamic-fee pools (`family == 0`) → `defaultFee` only.\n  /// Callable by anyone (no access control) for offchain tooling.\n  /// @param key The pool key to compute the fee for.\n  /// @return fee The computed protocol fee (two 12-bit directional components packed).\n  function computeFee(PoolKey calldata key) external view returns (uint24 fee);\n\n  // --- Admin (onlyOwner) ---\n\n  /// @notice Sets the fee setter address. Only callable by owner.\n  /// @param newFeeSetter The new fee setter address.\n  function setFeeSetter(address newFeeSetter) external;\n\n  // --- Classification (onlyFeeSetter) ---\n\n  /// @notice Assign a hook to a governance-defined family.\n  /// @dev familyId 0 unclassifies the hook. Overwrites any existing classification.\n  /// @param hook The hook address to classify.\n  /// @param familyId The family ID to assign (0 = unclassify).\n  function setHookFamily(address hook, uint8 familyId) external;\n\n  /// @notice Assigns multiple hooks to families in one transaction.\n  /// @param assignments Hook/family pairs. Emits `HookFamilySet` per entry.\n  function batchSetHookFamily(HookFamilyAssignment[] calldata assignments) external;\n\n  // --- Flag Rules (onlyFeeSetter) ---\n\n  /// @notice Replaces the entire flag rules array atomically.\n  /// @dev Rules are checked in order; the first rule whose requiredFlags are all present\n  /// in the hook's self-reported flags wins. Rules must be sorted by non-increasing\n  /// number of set bits in requiredFlags, so more specific patterns come first. Each\n  /// rule must have requiredFlags != 0 and familyId > 0. Max 32 rules.\n  /// @param rules The new flag rules, ordered by match priority (first match wins).\n  function setFlagRules(FlagRule[] calldata rules) external;\n\n  /// @notice Removes all flag rules.\n  function clearFlagRules() external;\n\n  // --- Default Fee (onlyFeeSetter) ---\n\n  /// @notice Sets the fallback fee for classified pools (including unclassified hooks).\n  /// @dev Setting 0 sets an explicit zero fee. Use clearDefaultFee to remove entirely.\n  /// @param feeValue The protocol fee to set. Must pass isValidProtocolFee if non-zero.\n  function setDefaultFee(uint24 feeValue) external;\n\n  /// @notice Removes the default fee, so unclassified pools return 0.\n  function clearDefaultFee() external;\n\n  /// @notice Toggles whether hooked native-math pools are classified as native math.\n  /// @dev Only callable by feeSetter. When enabled, native-math pools that carry a hook\n  /// resolve to `NATIVE_MATH_FAMILY_ID` and follow the same pair-class-fee / bucket schedule\n  /// as hookless pools. When disabled (the default), they fall through to flag-rule\n  /// classification / `defaultFee`. Hookless native-math pools are unaffected.\n  /// @param enabled True to bring hooked native-math pools onto the native-math fee path.\n  function setHookedNativeMathFeeOn(bool enabled) external;\n\n  // --- Fee Bucket Configuration (onlyFeeSetter) ---\n\n  /// @notice Replaces the entire fee-buckets array atomically.\n  /// @dev Must be non-empty, ascending by `lpFeeFloor` (strict), and at most 16 buckets.\n  /// Each bucket: `alphaPips <= MAX_PROTOCOL_FEE` (1000), `betaPips <= 1_000_000_000`.\n  /// The lowest bucket's `alpha` acts as a minimum-fee floor for very-low-LP-fee pools\n  /// because of the snap-to-lowest behavior in `computeFee`.\n  /// Reverts: `EmptyBuckets`, `TooManyBuckets`, `BucketsNotAscending`,\n  /// `InvalidFeeValue` (alpha out of range), `MultiplierTooLarge` (beta out of range).\n  /// @param buckets The new fee buckets, ordered ascending by lpFeeFloor.\n  function setFeeBuckets(FeeBucket[] calldata buckets) external;\n\n  /// @notice Removes all fee buckets. StaticNativeMath returns 0 when no pair class fee is set.\n  function clearFeeBuckets() external;\n\n  // --- Family Defaults (onlyFeeSetter) ---\n\n  /// @notice Sets the default protocol fee for a governance family (1-254).\n  /// @dev Reverts for 0 and `NATIVE_MATH_FAMILY_ID` (use pair class fees / buckets for 255).\n  /// Setting fee 0 sets explicit zero. Use clearFamilyDefault to remove entirely.\n  /// @param familyId The family to configure.\n  /// @param feeValue The default fee. Must pass isValidProtocolFee if non-zero.\n  function setFamilyDefault(uint8 familyId, uint24 feeValue) external;\n\n  /// @notice Removes the default fee for a governance family (1-254).\n  /// @dev Reverts for 0 and `NATIVE_MATH_FAMILY_ID`.\n  /// @param familyId The family to clear.\n  function clearFamilyDefault(uint8 familyId) external;\n\n  // --- Pair Class Fees (onlyFeeSetter) ---\n\n  /// @notice Sets the pair class fee for a token pair and family slot.\n  /// @dev Use `NATIVE_MATH_FAMILY_ID` for native-math pair overrides, or 1-255 for\n  /// governance families. Setting fee 0 sets explicit zero and does not fall through.\n  /// Use clearPairClassFee to remove entirely.\n  /// @param currency0 The lower currency of the pair (must be < currency1).\n  /// @param currency1 The higher currency of the pair.\n  /// @param familyId The family slot (`NATIVE_MATH_FAMILY_ID` or 1-255).\n  /// @param feeValue The protocol fee. Must pass isValidProtocolFee if non-zero.\n  function setPairClassFee(Currency currency0, Currency currency1, uint8 familyId, uint24 feeValue)\n    external;\n\n  /// @notice Sets multiple pair class fees in one transaction.\n  /// @param assignments Pair/family/fee tuples. Emits `PairClassFeeUpdated` per entry.\n  function batchSetPairClassFee(PairClassFeeAssignment[] calldata assignments) external;\n\n  /// @notice Removes the pair class fee for a family slot.\n  /// @param currency0 The lower currency of the pair (must be < currency1).\n  /// @param currency1 The higher currency of the pair.\n  /// @param familyId The family slot to clear.\n  function clearPairClassFee(Currency currency0, Currency currency1, uint8 familyId) external;\n\n  /// @notice Clears multiple pair class fees in one transaction.\n  /// @param clears Pair/family slots to remove. Emits `PairClassFeeUpdated` with fee 0 per entry.\n  function batchClearPairClassFee(PairClassFeeClear[] calldata clears) external;\n}\n"},"lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (utils/introspection/IERC165.sol)\n\npragma solidity >=0.4.16;\n\n/**\n * @dev Interface of the ERC-165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[ERC].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165 {\n    /**\n     * @dev Returns true if this contract implements the interface defined by\n     * `interfaceId`. See the corresponding\n     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[ERC section]\n     * to learn more about how these ids are created.\n     *\n     * This function call must use less than 30 000 gas.\n     */\n    function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n"}},"compilation":{"language":"Solidity","compiler":"solc","compilerVersion":"0.8.29+commit.ab55807c","compilerSettings":{"viaIR":false,"metadata":{"appendCBOR":true,"bytecodeHash":"none","useLiteralContent":false},"optimizer":{"runs":44444444,"enabled":true},"evmVersion":"cancun","remappings":["@uniswap/v4-core/=lib/v4-core/","@uniswap/v4-periphery/=lib/v4-periphery/","@uniswap/blocknumberish/=lib/blocknumberish/","@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/","@protocol-fees/=lib/protocol-fees/src/","forge-std/=lib/forge-std/src/","solmate/=lib/v4-core/lib/solmate/","solady/=lib/solady/src/","v4-core/=lib/v4-core/src/","@uniswap/v3-core/=lib/v3-core/","@uniswap/v3-periphery/=lib/v3-periphery/","@uniswap/v2-core/contracts/=lib/v2-core/contracts/","@pancakeswap/v3-core/=lib/pancake-v3-contracts/projects/v3-core/contracts/","@uniswapx/=lib/uniswapx/src/","permit2/=lib/v4-periphery/lib/permit2/","openzeppelin-contracts/=lib/v4-periphery/lib/permit2/lib/openzeppelin-contracts/contracts/","@ensdomains/=lib/v4-core/node_modules/@ensdomains/","@eth-optimism-bedrock/=lib/protocol-fees/lib/optimism/packages/contracts-bedrock/","@nomad-xyz/=lib/slipstream/lib/ExcessivelySafeCall/","@solidity-parser/=lib/slipstream/node_modules/solhint/node_modules/@solidity-parser/","BokkyPooBahsDateTimeLibrary/=lib/protocol-fees/lib/BokkyPooBahsDateTimeLibrary/","ExcessivelySafeCall/=lib/slipstream/lib/ExcessivelySafeCall/src/","FreshCryptoLib/=lib/uniswapx/lib/calibur/lib/webauthn-sol/lib/FreshCryptoLib/solidity/src/","Tribunal/=lib/uniswapx/lib/Tribunal/src/","account-abstraction/=lib/uniswapx/lib/calibur/lib/account-abstraction/contracts/","base64-sol/=lib/slipstream/lib/base64/","base64/=lib/slipstream/lib/base64/","blocknumberish/=lib/blocknumberish/src/","briefcase/=lib/briefcase/src/","calibur/=lib/uniswapx/lib/calibur/","dao-signer/=lib/protocol-fees/lib/dao-signer/","ds-test/=lib/protocol-fees/lib/solmate/lib/ds-test/src/","eas-contracts/=lib/protocol-fees/lib/dao-signer/lib/eas-contracts/contracts/","erc20-eth/=lib/uniswapx/lib/calibur/lib/erc20-eth/src/","erc4626-tests/=lib/fluid-contracts-public/lib/erc4626-tests/","fluid-contracts-public/=lib/fluid-contracts-public/contracts/","forge-gas-snapshot/=lib/uniswapx/lib/forge-gas-snapshot/src/","halmos-cheatcodes/=lib/openzeppelin-contracts/lib/halmos-cheatcodes/src/","hardhat/=lib/v4-core/node_modules/hardhat/","kontrol-cheatcodes/=lib/protocol-fees/lib/optimism/packages/contracts-bedrock/lib/kontrol-cheatcodes/src/","lib-keccak/=lib/protocol-fees/lib/optimism/packages/contracts-bedrock/lib/lib-keccak/contracts/","murky/=lib/protocol-fees/lib/murky/","native-token-transfers/=lib/protocol-fees/lib/","openzeppelin-contracts-upgradeable/=lib/fluid-contracts-public/lib/openzeppelin-contracts-upgradeable/","openzeppelin-contracts-v5/=lib/protocol-fees/lib/optimism/packages/contracts-bedrock/lib/openzeppelin-contracts-v5/","openzeppelin/=lib/uniswapx/lib/openzeppelin-contracts/contracts/","optimism/=lib/protocol-fees/lib/optimism/","pancake-v3-contracts/=lib/pancake-v3-contracts/","protocol-fees/=lib/protocol-fees/","safe-contracts/=lib/protocol-fees/lib/optimism/packages/contracts-bedrock/lib/safe-contracts/","scripts/libraries/Config.sol=lib/protocol-fees/lib/optimism/packages/contracts-bedrock/scripts/libraries/Config.sol","slipstream/=lib/slipstream/","solady-v0.0.245/=lib/protocol-fees/lib/optimism/packages/contracts-bedrock/lib/solady-v0.0.245/src/","solarray/=lib/uniswapx/lib/solarray/src/","soledge/=lib/uniswapx/lib/Tribunal/lib/the-compact/lib/soledge/src/","solidity-bytes-utils/=lib/protocol-fees/lib/native-token-transfers/evm/lib/solidity-bytes-utils/contracts/","solidity-lib/=lib/slipstream/lib/solidity-lib/contracts/","src/AgreementAnchor.sol=lib/protocol-fees/lib/dao-signer/src/AgreementAnchor.sol","src/AgreementAnchorFactory.sol=lib/protocol-fees/lib/dao-signer/src/AgreementAnchorFactory.sol","src/interfaces/IAgreementAnchorFactory.sol=lib/protocol-fees/lib/dao-signer/src/interfaces/IAgreementAnchorFactory.sol","the-compact/=lib/uniswapx/lib/Tribunal/lib/the-compact/","tribunal/=lib/uniswapx/lib/Tribunal/","uniswapx/=lib/uniswapx/","v2-core/=lib/v2-core/contracts/","v3-core/=lib/v3-core/","v3-periphery/=lib/v3-periphery/contracts/","v4-periphery/=lib/v4-periphery/","webauthn-sol/=lib/uniswapx/lib/calibur/lib/webauthn-sol/","wormhole-solidity-sdk/=lib/protocol-fees/lib/native-token-transfers/evm/lib/wormhole-solidity-sdk/src/"]},"name":"StableSwapNGAggregator","fullyQualifiedName":"src/aggregator-hooks/implementations/StableSwapNG/StableSwapNGAggregator.sol:StableSwapNGAggregator"},"abi":[{"type":"constructor","inputs":[{"name":"_manager","type":"address","internalType":"contract IPoolManager"},{"name":"_pool","type":"address","internalType":"contract ICurveStableSwapNG"},{"name":"_curveFactory","type":"address","internalType":"contract ICurveStableSwapFactoryNG"}],"stateMutability":"nonpayable"},{"name":"AmountOutExceeded","type":"error","inputs":[]},{"name":"DeltaNotNegative","type":"error","inputs":[{"name":"currency","type":"address","internalType":"Currency"}]},{"name":"DeltaNotPositive","type":"error","inputs":[{"name":"currency","type":"address","internalType":"Currency"}]},{"name":"HookNotImplemented","type":"error","inputs":[]},{"name":"InsufficientBalance","type":"error","inputs":[]},{"name":"InvalidPoolId","type":"error","inputs":[]},{"name":"LiquidityNotAllowed","type":"error","inputs":[]},{"name":"NativeCurrencyNotSupported","type":"error","inputs":[]},{"name":"NotPoolManager","type":"error","inputs":[]},{"name":"PoolDoesNotExist","type":"error","inputs":[]},{"name":"PoolIsMetaPool","type":"error","inputs":[]},{"name":"SafeERC20FailedOperation","type":"error","inputs":[{"name":"token","type":"address","internalType":"address"}]},{"name":"TokenNotInPool","type":"error","inputs":[{"name":"token","type":"address","internalType":"address"}]},{"name":"TokensNotInPool","type":"error","inputs":[{"name":"token0","type":"address","internalType":"address"},{"name":"token1","type":"address","internalType":"address"}]},{"name":"UnspecifiedAmountExceeded","type":"error","inputs":[]},{"name":"AggregatorPoolRegistered","type":"event","inputs":[{"name":"poolId","type":"bytes32","indexed":true,"internalType":"PoolId"}],"anonymous":false},{"name":"HookSwap","type":"event","inputs":[{"name":"poolId","type":"bytes32","indexed":true,"internalType":"PoolId"},{"name":"sender","type":"address","indexed":true,"internalType":"address"},{"name":"amount0","type":"int256","indexed":false,"internalType":"int256"},{"name":"amount1","type":"int256","indexed":false,"internalType":"int256"},{"name":"swapFee","type":"uint24","indexed":false,"internalType":"uint24"}],"anonymous":false},{"name":"ProtocolFeesCollected","type":"event","inputs":[{"name":"recipient","type":"address","indexed":true,"internalType":"address"},{"name":"currency","type":"address","indexed":true,"internalType":"Currency"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"name":"TokenJarUpdated","type":"event","inputs":[{"name":"tokenJar","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"name":"afterAddLiquidity","type":"function","inputs":[{"name":"sender","type":"address","internalType":"address"},{"name":"key","type":"tuple","components":[{"name":"currency0","type":"address","internalType":"Currency"},{"name":"currency1","type":"address","internalType":"Currency"},{"name":"fee","type":"uint24","internalType":"uint24"},{"name":"tickSpacing","type":"int24","internalType":"int24"},{"name":"hooks","type":"address","internalType":"contract IHooks"}],"internalType":"struct PoolKey"},{"name":"params","type":"tuple","components":[{"name":"tickLower","type":"int24","internalType":"int24"},{"name":"tickUpper","type":"int24","internalType":"int24"},{"name":"liquidityDelta","type":"int256","internalType":"int256"},{"name":"salt","type":"bytes32","internalType":"bytes32"}],"internalType":"struct ModifyLiquidityParams"},{"name":"delta","type":"int256","internalType":"BalanceDelta"},{"name":"feesAccrued","type":"int256","internalType":"BalanceDelta"},{"name":"hookData","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"","type":"bytes4","internalType":"bytes4"},{"name":"","type":"int256","internalType":"BalanceDelta"}],"stateMutability":"nonpayable"},{"name":"afterDonate","type":"function","inputs":[{"name":"sender","type":"address","internalType":"address"},{"name":"key","type":"tuple","components":[{"name":"currency0","type":"address","internalType":"Currency"},{"name":"currency1","type":"address","internalType":"Currency"},{"name":"fee","type":"uint24","internalType":"uint24"},{"name":"tickSpacing","type":"int24","internalType":"int24"},{"name":"hooks","type":"address","internalType":"contract IHooks"}],"internalType":"struct PoolKey"},{"name":"amount0","type":"uint256","internalType":"uint256"},{"name":"amount1","type":"uint256","internalType":"uint256"},{"name":"hookData","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"","type":"bytes4","internalType":"bytes4"}],"stateMutability":"nonpayable"},{"name":"afterInitialize","type":"function","inputs":[{"name":"sender","type":"address","internalType":"address"},{"name":"key","type":"tuple","components":[{"name":"currency0","type":"address","internalType":"Currency"},{"name":"currency1","type":"address","internalType":"Currency"},{"name":"fee","type":"uint24","internalType":"uint24"},{"name":"tickSpacing","type":"int24","internalType":"int24"},{"name":"hooks","type":"address","internalType":"contract IHooks"}],"internalType":"struct PoolKey"},{"name":"sqrtPriceX96","type":"uint160","internalType":"uint160"},{"name":"tick","type":"int24","internalType":"int24"}],"outputs":[{"name":"","type":"bytes4","internalType":"bytes4"}],"stateMutability":"nonpayable"},{"name":"afterRemoveLiquidity","type":"function","inputs":[{"name":"sender","type":"address","internalType":"address"},{"name":"key","type":"tuple","components":[{"name":"currency0","type":"address","internalType":"Currency"},{"name":"currency1","type":"address","internalType":"Currency"},{"name":"fee","type":"uint24","internalType":"uint24"},{"name":"tickSpacing","type":"int24","internalType":"int24"},{"name":"hooks","type":"address","internalType":"contract IHooks"}],"internalType":"struct PoolKey"},{"name":"params","type":"tuple","components":[{"name":"tickLower","type":"int24","internalType":"int24"},{"name":"tickUpper","type":"int24","internalType":"int24"},{"name":"liquidityDelta","type":"int256","internalType":"int256"},{"name":"salt","type":"bytes32","internalType":"bytes32"}],"internalType":"struct ModifyLiquidityParams"},{"name":"delta","type":"int256","internalType":"BalanceDelta"},{"name":"feesAccrued","type":"int256","internalType":"BalanceDelta"},{"name":"hookData","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"","type":"bytes4","internalType":"bytes4"},{"name":"","type":"int256","internalType":"BalanceDelta"}],"stateMutability":"nonpayable"},{"name":"afterSwap","type":"function","inputs":[{"name":"sender","type":"address","internalType":"address"},{"name":"key","type":"tuple","components":[{"name":"currency0","type":"address","internalType":"Currency"},{"name":"currency1","type":"address","internalType":"Currency"},{"name":"fee","type":"uint24","internalType":"uint24"},{"name":"tickSpacing","type":"int24","internalType":"int24"},{"name":"hooks","type":"address","internalType":"contract IHooks"}],"internalType":"struct PoolKey"},{"name":"params","type":"tuple","components":[{"name":"zeroForOne","type":"bool","internalType":"bool"},{"name":"amountSpecified","type":"int256","internalType":"int256"},{"name":"sqrtPriceLimitX96","type":"uint160","internalType":"uint160"}],"internalType":"struct SwapParams"},{"name":"delta","type":"int256","internalType":"BalanceDelta"},{"name":"hookData","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"","type":"bytes4","internalType":"bytes4"},{"name":"","type":"int128","internalType":"int128"}],"stateMutability":"nonpayable"},{"name":"aggregatorHookVersion","type":"function","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"view"},{"name":"beforeAddLiquidity","type":"function","inputs":[{"name":"sender","type":"address","internalType":"address"},{"name":"key","type":"tuple","components":[{"name":"currency0","type":"address","internalType":"Currency"},{"name":"currency1","type":"address","internalType":"Currency"},{"name":"fee","type":"uint24","internalType":"uint24"},{"name":"tickSpacing","type":"int24","internalType":"int24"},{"name":"hooks","type":"address","internalType":"contract IHooks"}],"internalType":"struct PoolKey"},{"name":"params","type":"tuple","components":[{"name":"tickLower","type":"int24","internalType":"int24"},{"name":"tickUpper","type":"int24","internalType":"int24"},{"name":"liquidityDelta","type":"int256","internalType":"int256"},{"name":"salt","type":"bytes32","internalType":"bytes32"}],"internalType":"struct ModifyLiquidityParams"},{"name":"hookData","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"","type":"bytes4","internalType":"bytes4"}],"stateMutability":"nonpayable"},{"name":"beforeDonate","type":"function","inputs":[{"name":"sender","type":"address","internalType":"address"},{"name":"key","type":"tuple","components":[{"name":"currency0","type":"address","internalType":"Currency"},{"name":"currency1","type":"address","internalType":"Currency"},{"name":"fee","type":"uint24","internalType":"uint24"},{"name":"tickSpacing","type":"int24","internalType":"int24"},{"name":"hooks","type":"address","internalType":"contract IHooks"}],"internalType":"struct PoolKey"},{"name":"amount0","type":"uint256","internalType":"uint256"},{"name":"amount1","type":"uint256","internalType":"uint256"},{"name":"hookData","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"","type":"bytes4","internalType":"bytes4"}],"stateMutability":"nonpayable"},{"name":"beforeInitialize","type":"function","inputs":[{"name":"sender","type":"address","internalType":"address"},{"name":"key","type":"tuple","components":[{"name":"currency0","type":"address","internalType":"Currency"},{"name":"currency1","type":"address","internalType":"Currency"},{"name":"fee","type":"uint24","internalType":"uint24"},{"name":"tickSpacing","type":"int24","internalType":"int24"},{"name":"hooks","type":"address","internalType":"contract IHooks"}],"internalType":"struct PoolKey"},{"name":"sqrtPriceX96","type":"uint160","internalType":"uint160"}],"outputs":[{"name":"","type":"bytes4","internalType":"bytes4"}],"stateMutability":"nonpayable"},{"name":"beforeRemoveLiquidity","type":"function","inputs":[{"name":"sender","type":"address","internalType":"address"},{"name":"key","type":"tuple","components":[{"name":"currency0","type":"address","internalType":"Currency"},{"name":"currency1","type":"address","internalType":"Currency"},{"name":"fee","type":"uint24","internalType":"uint24"},{"name":"tickSpacing","type":"int24","internalType":"int24"},{"name":"hooks","type":"address","internalType":"contract IHooks"}],"internalType":"struct PoolKey"},{"name":"params","type":"tuple","components":[{"name":"tickLower","type":"int24","internalType":"int24"},{"name":"tickUpper","type":"int24","internalType":"int24"},{"name":"liquidityDelta","type":"int256","internalType":"int256"},{"name":"salt","type":"bytes32","internalType":"bytes32"}],"internalType":"struct ModifyLiquidityParams"},{"name":"hookData","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"","type":"bytes4","internalType":"bytes4"}],"stateMutability":"nonpayable"},{"name":"beforeSwap","type":"function","inputs":[{"name":"sender","type":"address","internalType":"address"},{"name":"key","type":"tuple","components":[{"name":"currency0","type":"address","internalType":"Currency"},{"name":"currency1","type":"address","internalType":"Currency"},{"name":"fee","type":"uint24","internalType":"uint24"},{"name":"tickSpacing","type":"int24","internalType":"int24"},{"name":"hooks","type":"address","internalType":"contract IHooks"}],"internalType":"struct PoolKey"},{"name":"params","type":"tuple","components":[{"name":"zeroForOne","type":"bool","internalType":"bool"},{"name":"amountSpecified","type":"int256","internalType":"int256"},{"name":"sqrtPriceLimitX96","type":"uint160","internalType":"uint160"}],"internalType":"struct SwapParams"},{"name":"hookData","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"","type":"bytes4","internalType":"bytes4"},{"name":"","type":"int256","internalType":"BeforeSwapDelta"},{"name":"","type":"uint24","internalType":"uint24"}],"stateMutability":"nonpayable"},{"name":"curveFactory","type":"function","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract ICurveStableSwapFactoryNG"}],"stateMutability":"view"},{"name":"getHookPermissions","type":"function","inputs":[],"outputs":[{"name":"permissions","type":"tuple","components":[{"name":"beforeInitialize","type":"bool","internalType":"bool"},{"name":"afterInitialize","type":"bool","internalType":"bool"},{"name":"beforeAddLiquidity","type":"bool","internalType":"bool"},{"name":"afterAddLiquidity","type":"bool","internalType":"bool"},{"name":"beforeRemoveLiquidity","type":"bool","internalType":"bool"},{"name":"afterRemoveLiquidity","type":"bool","internalType":"bool"},{"name":"beforeSwap","type":"bool","internalType":"bool"},{"name":"afterSwap","type":"bool","internalType":"bool"},{"name":"beforeDonate","type":"bool","internalType":"bool"},{"name":"afterDonate","type":"bool","internalType":"bool"},{"name":"beforeSwapReturnDelta","type":"bool","internalType":"bool"},{"name":"afterSwapReturnDelta","type":"bool","internalType":"bool"},{"name":"afterAddLiquidityReturnDelta","type":"bool","internalType":"bool"},{"name":"afterRemoveLiquidityReturnDelta","type":"bool","internalType":"bool"}],"internalType":"struct Hooks.Permissions"}],"stateMutability":"pure"},{"name":"pollTokenJar","type":"function","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"nonpayable"},{"name":"pool","type":"function","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract ICurveStableSwapNG"}],"stateMutability":"view"},{"name":"poolIdToTokenInfo","type":"function","inputs":[{"name":"","type":"bytes32","internalType":"PoolId"}],"outputs":[{"name":"token0Index","type":"int128","internalType":"int128"},{"name":"token1Index","type":"int128","internalType":"int128"}],"stateMutability":"view"},{"name":"poolManager","type":"function","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract IPoolManager"}],"stateMutability":"view"},{"name":"protocolFeeFlags","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"protocolFeeMultiplier","type":"function","inputs":[],"outputs":[{"name":"","type":"uint24","internalType":"uint24"}],"stateMutability":"view"},{"name":"pseudoTotalValueLocked","type":"function","inputs":[{"name":"poolId","type":"bytes32","internalType":"PoolId"}],"outputs":[{"name":"amount0","type":"uint256","internalType":"uint256"},{"name":"amount1","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"quote","type":"function","inputs":[{"name":"zeroToOne","type":"bool","internalType":"bool"},{"name":"amountSpecified","type":"int256","internalType":"int256"},{"name":"poolId","type":"bytes32","internalType":"PoolId"}],"outputs":[{"name":"amountUnspecified","type":"uint256","internalType":"uint256"}],"stateMutability":"nonpayable"},{"name":"tokenJar","type":"function","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"receive","stateMutability":"payable"}],"metadata":{"compiler":{"version":"0.8.29+commit.ab55807c"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"contract IPoolManager","name":"_manager","type":"address"},{"internalType":"contract ICurveStableSwapNG","name":"_pool","type":"address"},{"internalType":"contract ICurveStableSwapFactoryNG","name":"_curveFactory","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AmountOutExceeded","type":"error"},{"inputs":[{"internalType":"Currency","name":"currency","type":"address"}],"name":"DeltaNotNegative","type":"error"},{"inputs":[{"internalType":"Currency","name":"currency","type":"address"}],"name":"DeltaNotPositive","type":"error"},{"inputs":[],"name":"HookNotImplemented","type":"error"},{"inputs":[],"name":"InsufficientBalance","type":"error"},{"inputs":[],"name":"InvalidPoolId","type":"error"},{"inputs":[],"name":"LiquidityNotAllowed","type":"error"},{"inputs":[],"name":"NativeCurrencyNotSupported","type":"error"},{"inputs":[],"name":"NotPoolManager","type":"error"},{"inputs":[],"name":"PoolDoesNotExist","type":"error"},{"inputs":[],"name":"PoolIsMetaPool","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"SafeERC20FailedOperation","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"TokenNotInPool","type":"error"},{"inputs":[{"internalType":"address","name":"token0","type":"address"},{"internalType":"address","name":"token1","type":"address"}],"name":"TokensNotInPool","type":"error"},{"inputs":[],"name":"UnspecifiedAmountExceeded","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"PoolId","name":"poolId","type":"bytes32"}],"name":"AggregatorPoolRegistered","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"PoolId","name":"poolId","type":"bytes32"},{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"int256","name":"amount0","type":"int256"},{"indexed":false,"internalType":"int256","name":"amount1","type":"int256"},{"indexed":false,"internalType":"uint24","name":"swapFee","type":"uint24"}],"name":"HookSwap","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"recipient","type":"address"},{"indexed":true,"internalType":"Currency","name":"currency","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ProtocolFeesCollected","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"tokenJar","type":"address"}],"name":"TokenJarUpdated","type":"event"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"components":[{"internalType":"Currency","name":"currency0","type":"address"},{"internalType":"Currency","name":"currency1","type":"address"},{"internalType":"uint24","name":"fee","type":"uint24"},{"internalType":"int24","name":"tickSpacing","type":"int24"},{"internalType":"contract IHooks","name":"hooks","type":"address"}],"internalType":"struct PoolKey","name":"key","type":"tuple"},{"components":[{"internalType":"int24","name":"tickLower","type":"int24"},{"internalType":"int24","name":"tickUpper","type":"int24"},{"internalType":"int256","name":"liquidityDelta","type":"int256"},{"internalType":"bytes32","name":"salt","type":"bytes32"}],"internalType":"struct ModifyLiquidityParams","name":"params","type":"tuple"},{"internalType":"BalanceDelta","name":"delta","type":"int256"},{"internalType":"BalanceDelta","name":"feesAccrued","type":"int256"},{"internalType":"bytes","name":"hookData","type":"bytes"}],"name":"afterAddLiquidity","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"},{"internalType":"BalanceDelta","name":"","type":"int256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"components":[{"internalType":"Currency","name":"currency0","type":"address"},{"internalType":"Currency","name":"currency1","type":"address"},{"internalType":"uint24","name":"fee","type":"uint24"},{"internalType":"int24","name":"tickSpacing","type":"int24"},{"internalType":"contract IHooks","name":"hooks","type":"address"}],"internalType":"struct PoolKey","name":"key","type":"tuple"},{"internalType":"uint256","name":"amount0","type":"uint256"},{"internalType":"uint256","name":"amount1","type":"uint256"},{"internalType":"bytes","name":"hookData","type":"bytes"}],"name":"afterDonate","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"components":[{"internalType":"Currency","name":"currency0","type":"address"},{"internalType":"Currency","name":"currency1","type":"address"},{"internalType":"uint24","name":"fee","type":"uint24"},{"internalType":"int24","name":"tickSpacing","type":"int24"},{"internalType":"contract IHooks","name":"hooks","type":"address"}],"internalType":"struct PoolKey","name":"key","type":"tuple"},{"internalType":"uint160","name":"sqrtPriceX96","type":"uint160"},{"internalType":"int24","name":"tick","type":"int24"}],"name":"afterInitialize","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"components":[{"internalType":"Currency","name":"currency0","type":"address"},{"internalType":"Currency","name":"currency1","type":"address"},{"internalType":"uint24","name":"fee","type":"uint24"},{"internalType":"int24","name":"tickSpacing","type":"int24"},{"internalType":"contract IHooks","name":"hooks","type":"address"}],"internalType":"struct PoolKey","name":"key","type":"tuple"},{"components":[{"internalType":"int24","name":"tickLower","type":"int24"},{"internalType":"int24","name":"tickUpper","type":"int24"},{"internalType":"int256","name":"liquidityDelta","type":"int256"},{"internalType":"bytes32","name":"salt","type":"bytes32"}],"internalType":"struct ModifyLiquidityParams","name":"params","type":"tuple"},{"internalType":"BalanceDelta","name":"delta","type":"int256"},{"internalType":"BalanceDelta","name":"feesAccrued","type":"int256"},{"internalType":"bytes","name":"hookData","type":"bytes"}],"name":"afterRemoveLiquidity","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"},{"internalType":"BalanceDelta","name":"","type":"int256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"components":[{"internalType":"Currency","name":"currency0","type":"address"},{"internalType":"Currency","name":"currency1","type":"address"},{"internalType":"uint24","name":"fee","type":"uint24"},{"internalType":"int24","name":"tickSpacing","type":"int24"},{"internalType":"contract IHooks","name":"hooks","type":"address"}],"internalType":"struct PoolKey","name":"key","type":"tuple"},{"components":[{"internalType":"bool","name":"zeroForOne","type":"bool"},{"internalType":"int256","name":"amountSpecified","type":"int256"},{"internalType":"uint160","name":"sqrtPriceLimitX96","type":"uint160"}],"internalType":"struct SwapParams","name":"params","type":"tuple"},{"internalType":"BalanceDelta","name":"delta","type":"int256"},{"internalType":"bytes","name":"hookData","type":"bytes"}],"name":"afterSwap","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"},{"internalType":"int128","name":"","type":"int128"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"aggregatorHookVersion","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"components":[{"internalType":"Currency","name":"currency0","type":"address"},{"internalType":"Currency","name":"currency1","type":"address"},{"internalType":"uint24","name":"fee","type":"uint24"},{"internalType":"int24","name":"tickSpacing","type":"int24"},{"internalType":"contract IHooks","name":"hooks","type":"address"}],"internalType":"struct PoolKey","name":"key","type":"tuple"},{"components":[{"internalType":"int24","name":"tickLower","type":"int24"},{"internalType":"int24","name":"tickUpper","type":"int24"},{"internalType":"int256","name":"liquidityDelta","type":"int256"},{"internalType":"bytes32","name":"salt","type":"bytes32"}],"internalType":"struct ModifyLiquidityParams","name":"params","type":"tuple"},{"internalType":"bytes","name":"hookData","type":"bytes"}],"name":"beforeAddLiquidity","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"components":[{"internalType":"Currency","name":"currency0","type":"address"},{"internalType":"Currency","name":"currency1","type":"address"},{"internalType":"uint24","name":"fee","type":"uint24"},{"internalType":"int24","name":"tickSpacing","type":"int24"},{"internalType":"contract IHooks","name":"hooks","type":"address"}],"internalType":"struct PoolKey","name":"key","type":"tuple"},{"internalType":"uint256","name":"amount0","type":"uint256"},{"internalType":"uint256","name":"amount1","type":"uint256"},{"internalType":"bytes","name":"hookData","type":"bytes"}],"name":"beforeDonate","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"components":[{"internalType":"Currency","name":"currency0","type":"address"},{"internalType":"Currency","name":"currency1","type":"address"},{"internalType":"uint24","name":"fee","type":"uint24"},{"internalType":"int24","name":"tickSpacing","type":"int24"},{"internalType":"contract IHooks","name":"hooks","type":"address"}],"internalType":"struct PoolKey","name":"key","type":"tuple"},{"internalType":"uint160","name":"sqrtPriceX96","type":"uint160"}],"name":"beforeInitialize","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"components":[{"internalType":"Currency","name":"currency0","type":"address"},{"internalType":"Currency","name":"currency1","type":"address"},{"internalType":"uint24","name":"fee","type":"uint24"},{"internalType":"int24","name":"tickSpacing","type":"int24"},{"internalType":"contract IHooks","name":"hooks","type":"address"}],"internalType":"struct PoolKey","name":"key","type":"tuple"},{"components":[{"internalType":"int24","name":"tickLower","type":"int24"},{"internalType":"int24","name":"tickUpper","type":"int24"},{"internalType":"int256","name":"liquidityDelta","type":"int256"},{"internalType":"bytes32","name":"salt","type":"bytes32"}],"internalType":"struct ModifyLiquidityParams","name":"params","type":"tuple"},{"internalType":"bytes","name":"hookData","type":"bytes"}],"name":"beforeRemoveLiquidity","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"components":[{"internalType":"Currency","name":"currency0","type":"address"},{"internalType":"Currency","name":"currency1","type":"address"},{"internalType":"uint24","name":"fee","type":"uint24"},{"internalType":"int24","name":"tickSpacing","type":"int24"},{"internalType":"contract IHooks","name":"hooks","type":"address"}],"internalType":"struct PoolKey","name":"key","type":"tuple"},{"components":[{"internalType":"bool","name":"zeroForOne","type":"bool"},{"internalType":"int256","name":"amountSpecified","type":"int256"},{"internalType":"uint160","name":"sqrtPriceLimitX96","type":"uint160"}],"internalType":"struct SwapParams","name":"params","type":"tuple"},{"internalType":"bytes","name":"hookData","type":"bytes"}],"name":"beforeSwap","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"},{"internalType":"BeforeSwapDelta","name":"","type":"int256"},{"internalType":"uint24","name":"","type":"uint24"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"curveFactory","outputs":[{"internalType":"contract ICurveStableSwapFactoryNG","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getHookPermissions","outputs":[{"components":[{"internalType":"bool","name":"beforeInitialize","type":"bool"},{"internalType":"bool","name":"afterInitialize","type":"bool"},{"internalType":"bool","name":"beforeAddLiquidity","type":"bool"},{"internalType":"bool","name":"afterAddLiquidity","type":"bool"},{"internalType":"bool","name":"beforeRemoveLiquidity","type":"bool"},{"internalType":"bool","name":"afterRemoveLiquidity","type":"bool"},{"internalType":"bool","name":"beforeSwap","type":"bool"},{"internalType":"bool","name":"afterSwap","type":"bool"},{"internalType":"bool","name":"beforeDonate","type":"bool"},{"internalType":"bool","name":"afterDonate","type":"bool"},{"internalType":"bool","name":"beforeSwapReturnDelta","type":"bool"},{"internalType":"bool","name":"afterSwapReturnDelta","type":"bool"},{"internalType":"bool","name":"afterAddLiquidityReturnDelta","type":"bool"},{"internalType":"bool","name":"afterRemoveLiquidityReturnDelta","type":"bool"}],"internalType":"struct Hooks.Permissions","name":"permissions","type":"tuple"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"pollTokenJar","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"pool","outputs":[{"internalType":"contract ICurveStableSwapNG","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"PoolId","name":"","type":"bytes32"}],"name":"poolIdToTokenInfo","outputs":[{"internalType":"int128","name":"token0Index","type":"int128"},{"internalType":"int128","name":"token1Index","type":"int128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolManager","outputs":[{"internalType":"contract IPoolManager","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"protocolFeeFlags","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"protocolFeeMultiplier","outputs":[{"internalType":"uint24","name":"","type":"uint24"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"PoolId","name":"poolId","type":"bytes32"}],"name":"pseudoTotalValueLocked","outputs":[{"internalType":"uint256","name":"amount0","type":"uint256"},{"internalType":"uint256","name":"amount1","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"zeroToOne","type":"bool"},{"internalType":"int256","name":"amountSpecified","type":"int256"},{"internalType":"PoolId","name":"poolId","type":"bytes32"}],"name":"quote","outputs":[{"internalType":"uint256","name":"amountUnspecified","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"tokenJar","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}],"devdoc":{"details":"Supports both exact-input and exact-output swaps","errors":{"SafeERC20FailedOperation(address)":[{"details":"An operation with an ERC-20 token failed."}]},"kind":"dev","methods":{"afterAddLiquidity(address,(address,address,uint24,int24,address),(int24,int24,int256,bytes32),int256,int256,bytes)":{"params":{"delta":"The caller's balance delta after adding liquidity; the sum of principal delta, fees accrued, and hook delta","feesAccrued":"The fees accrued since the last time fees were collected from this position","hookData":"Arbitrary data handed into the PoolManager by the liquidity provider to be passed on to the hook","key":"The key for the pool","params":"The parameters for adding liquidity","sender":"The initial msg.sender for the add liquidity call"},"returns":{"_0":"bytes4 The function selector for the hook","_1":"BalanceDelta The hook's delta in token0 and token1. Positive: the hook is owed/took currency, negative: the hook owes/sent currency"}},"afterDonate(address,(address,address,uint24,int24,address),uint256,uint256,bytes)":{"params":{"amount0":"The amount of token0 being donated","amount1":"The amount of token1 being donated","hookData":"Arbitrary data handed into the PoolManager by the donor to be be passed on to the hook","key":"The key for the pool","sender":"The initial msg.sender for the donate call"},"returns":{"_0":"bytes4 The function selector for the hook"}},"afterInitialize(address,(address,address,uint24,int24,address),uint160,int24)":{"params":{"key":"The key for the pool being initialized","sender":"The initial msg.sender for the initialize call","sqrtPriceX96":"The sqrt(price) of the pool as a Q64.96","tick":"The current tick after the state of a pool is initialized"},"returns":{"_0":"bytes4 The function selector for the hook"}},"afterRemoveLiquidity(address,(address,address,uint24,int24,address),(int24,int24,int256,bytes32),int256,int256,bytes)":{"params":{"delta":"The caller's balance delta after removing liquidity; the sum of principal delta, fees accrued, and hook delta","feesAccrued":"The fees accrued since the last time fees were collected from this position","hookData":"Arbitrary data handed into the PoolManager by the liquidity provider to be be passed on to the hook","key":"The key for the pool","params":"The parameters for removing liquidity","sender":"The initial msg.sender for the remove liquidity call"},"returns":{"_0":"bytes4 The function selector for the hook","_1":"BalanceDelta The hook's delta in token0 and token1. Positive: the hook is owed/took currency, negative: the hook owes/sent currency"}},"afterSwap(address,(address,address,uint24,int24,address),(bool,int256,uint160),int256,bytes)":{"params":{"delta":"The amount owed to the caller (positive) or owed to the pool (negative)","hookData":"Arbitrary data handed into the PoolManager by the swapper to be be passed on to the hook","key":"The key for the pool","params":"The parameters for the swap","sender":"The initial msg.sender for the swap call"},"returns":{"_0":"bytes4 The function selector for the hook","_1":"int128 The hook's delta in unspecified currency. Positive: the hook is owed/took currency, negative: the hook owes/sent currency"}},"beforeAddLiquidity(address,(address,address,uint24,int24,address),(int24,int24,int256,bytes32),bytes)":{"params":{"hookData":"Arbitrary data handed into the PoolManager by the liquidity provider to be passed on to the hook","key":"The key for the pool","params":"The parameters for adding liquidity","sender":"The initial msg.sender for the add liquidity call"},"returns":{"_0":"bytes4 The function selector for the hook"}},"beforeDonate(address,(address,address,uint24,int24,address),uint256,uint256,bytes)":{"params":{"amount0":"The amount of token0 being donated","amount1":"The amount of token1 being donated","hookData":"Arbitrary data handed into the PoolManager by the donor to be be passed on to the hook","key":"The key for the pool","sender":"The initial msg.sender for the donate call"},"returns":{"_0":"bytes4 The function selector for the hook"}},"beforeInitialize(address,(address,address,uint24,int24,address),uint160)":{"params":{"key":"The key for the pool being initialized","sender":"The initial msg.sender for the initialize call","sqrtPriceX96":"The sqrt(price) of the pool as a Q64.96"},"returns":{"_0":"bytes4 The function selector for the hook"}},"beforeRemoveLiquidity(address,(address,address,uint24,int24,address),(int24,int24,int256,bytes32),bytes)":{"params":{"hookData":"Arbitrary data handed into the PoolManager by the liquidity provider to be be passed on to the hook","key":"The key for the pool","params":"The parameters for removing liquidity","sender":"The initial msg.sender for the remove liquidity call"},"returns":{"_0":"bytes4 The function selector for the hook"}},"beforeSwap(address,(address,address,uint24,int24,address),(bool,int256,uint160),bytes)":{"params":{"hookData":"Arbitrary data handed into the PoolManager by the swapper to be be passed on to the hook","key":"The key for the pool","params":"The parameters for the swap","sender":"The initial msg.sender for the swap call"},"returns":{"_0":"bytes4 The function selector for the hook","_1":"BeforeSwapDelta The hook's delta in specified and unspecified currencies. Positive: the hook is owed/took currency, negative: the hook owes/sent currency","_2":"uint24 Optionally override the lp fee, only used if three conditions are met: 1. the Pool has a dynamic fee, 2. the value's 2nd highest bit is set (23rd bit, 0x400000), and 3. the value is less than or equal to the maximum fee (1 million)"}},"getHookPermissions()":{"details":"Used at deployment to validate the address correctly represents the expected permissions","returns":{"permissions":"Permissions struct"}},"pollTokenJar()":{"details":"This function should not need to be called externally except in the case of the tokenJar address changing after the protocol fee has been set","returns":{"_0":"The token jar address"}},"protocolFeeFlags()":{"details":"Return 0 to indicate no self-classification (falls through to defaultFee). The bitfield is opaque to the policy; see the governance guide for active conventions."},"pseudoTotalValueLocked(bytes32)":{"params":{"poolId":"The pool ID of the UniswapV4 pool"},"returns":{"amount0":"The amount of token0 in the aggregated pool","amount1":"The amount of token1 in the aggregated pool"}},"quote(bool,int256,bytes32)":{"details":"This function is meant to be called as a view function even though it is not one. This is because the swap might be simulated but not finalized. Applies protocol fee on top of the raw quote from the underlying liquidity source","params":{"amountSpecified":"The amount of tokens in or out (negative for exact-in, positive for exact-out)","zeroToOne":"Whether the swap is from token0 to token1 or from token1 to token0"},"returns":{"amountUnspecified":"amount of unspecified side (always positive to adhere to practices by other quote functions)"}}},"title":"StableSwapNGAggregator","version":1},"userdoc":{"errors":{"DeltaNotNegative(address)":[{"notice":"Emitted when unexpected positive delta is found."}],"DeltaNotPositive(address)":[{"notice":"Emitted when unexpected negative delta is found."}],"InsufficientBalance()":[{"notice":"Emitted when the contract does not have enough balance to wrap or unwrap."}],"NotPoolManager()":[{"notice":"Thrown when the caller is not PoolManager"}]},"kind":"user","methods":{"afterAddLiquidity(address,(address,address,uint24,int24,address),(int24,int24,int256,bytes32),int256,int256,bytes)":{"notice":"The hook called after liquidity is added"},"afterDonate(address,(address,address,uint24,int24,address),uint256,uint256,bytes)":{"notice":"The hook called after donate"},"afterInitialize(address,(address,address,uint24,int24,address),uint160,int24)":{"notice":"The hook called after the state of a pool is initialized"},"afterRemoveLiquidity(address,(address,address,uint24,int24,address),(int24,int24,int256,bytes32),int256,int256,bytes)":{"notice":"The hook called after liquidity is removed"},"afterSwap(address,(address,address,uint24,int24,address),(bool,int256,uint160),int256,bytes)":{"notice":"The hook called after a swap"},"aggregatorHookVersion()":{"notice":"The publicly displayed version of the aggregator hook."},"beforeAddLiquidity(address,(address,address,uint24,int24,address),(int24,int24,int256,bytes32),bytes)":{"notice":"The hook called before liquidity is added"},"beforeDonate(address,(address,address,uint24,int24,address),uint256,uint256,bytes)":{"notice":"The hook called before donate"},"beforeInitialize(address,(address,address,uint24,int24,address),uint160)":{"notice":"The hook called before the state of a pool is initialized"},"beforeRemoveLiquidity(address,(address,address,uint24,int24,address),(int24,int24,int256,bytes32),bytes)":{"notice":"The hook called before liquidity is removed"},"beforeSwap(address,(address,address,uint24,int24,address),(bool,int256,uint160),bytes)":{"notice":"The hook called before a swap"},"curveFactory()":{"notice":"The Curve StableSwap NG factory for checking meta pool status"},"getHookPermissions()":{"notice":"Returns a struct of permissions to signal which hook functions are to be implemented"},"pollTokenJar()":{"notice":"Queries the token jar from the pool manager and emits an event if it is updated"},"pool()":{"notice":"The Curve StableSwap NG pool"},"poolIdToTokenInfo(bytes32)":{"notice":"Maps Uniswap V4 pool IDs to their corresponding token indices in the Curve pool"},"poolManager()":{"notice":"The Uniswap v4 PoolManager contract"},"protocolFeeFlags()":{"notice":"Returns the hook's self-reported behavioral flags."},"pseudoTotalValueLocked(bytes32)":{"notice":"Returns the pseudo TVL: the amount of the UniswapV4 pool's tokens locked in the aggregated pool"},"quote(bool,int256,bytes32)":{"notice":"Quotes amount of unspecified side for a given amount of specified side"}},"notice":"Uniswap V4 hook that aggregates liquidity from Curve StableSwap NG pools","version":1}},"settings":{"compilationTarget":{"src/aggregator-hooks/implementations/StableSwapNG/StableSwapNGAggregator.sol":"StableSwapNGAggregator"},"evmVersion":"cancun","libraries":{},"metadata":{"bytecodeHash":"none"},"optimizer":{"enabled":true,"runs":44444444},"remappings":[":@ensdomains/=lib/v4-core/node_modules/@ensdomains/",":@eth-optimism-bedrock/=lib/protocol-fees/lib/optimism/packages/contracts-bedrock/",":@nomad-xyz/=lib/slipstream/lib/ExcessivelySafeCall/",":@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",":@pancakeswap/v3-core/=lib/pancake-v3-contracts/projects/v3-core/contracts/",":@protocol-fees/=lib/protocol-fees/src/",":@solidity-parser/=lib/slipstream/node_modules/solhint/node_modules/@solidity-parser/",":@uniswap/blocknumberish/=lib/blocknumberish/",":@uniswap/v2-core/contracts/=lib/v2-core/contracts/",":@uniswap/v3-core/=lib/v3-core/",":@uniswap/v3-periphery/=lib/v3-periphery/",":@uniswap/v4-core/=lib/v4-core/",":@uniswap/v4-periphery/=lib/v4-periphery/",":@uniswapx/=lib/uniswapx/src/",":BokkyPooBahsDateTimeLibrary/=lib/protocol-fees/lib/BokkyPooBahsDateTimeLibrary/",":ExcessivelySafeCall/=lib/slipstream/lib/ExcessivelySafeCall/src/",":FreshCryptoLib/=lib/uniswapx/lib/calibur/lib/webauthn-sol/lib/FreshCryptoLib/solidity/src/",":Tribunal/=lib/uniswapx/lib/Tribunal/src/",":account-abstraction/=lib/uniswapx/lib/calibur/lib/account-abstraction/contracts/",":base64-sol/=lib/slipstream/lib/base64/",":base64/=lib/slipstream/lib/base64/",":blocknumberish/=lib/blocknumberish/src/",":briefcase/=lib/briefcase/src/",":calibur/=lib/uniswapx/lib/calibur/",":dao-signer/=lib/protocol-fees/lib/dao-signer/",":ds-test/=lib/protocol-fees/lib/solmate/lib/ds-test/src/",":eas-contracts/=lib/protocol-fees/lib/dao-signer/lib/eas-contracts/contracts/",":erc20-eth/=lib/uniswapx/lib/calibur/lib/erc20-eth/src/",":erc4626-tests/=lib/fluid-contracts-public/lib/erc4626-tests/",":fluid-contracts-public/=lib/fluid-contracts-public/contracts/",":forge-gas-snapshot/=lib/uniswapx/lib/forge-gas-snapshot/src/",":forge-std/=lib/forge-std/src/",":halmos-cheatcodes/=lib/openzeppelin-contracts/lib/halmos-cheatcodes/src/",":hardhat/=lib/v4-core/node_modules/hardhat/",":kontrol-cheatcodes/=lib/protocol-fees/lib/optimism/packages/contracts-bedrock/lib/kontrol-cheatcodes/src/",":lib-keccak/=lib/protocol-fees/lib/optimism/packages/contracts-bedrock/lib/lib-keccak/contracts/",":murky/=lib/protocol-fees/lib/murky/",":native-token-transfers/=lib/protocol-fees/lib/",":openzeppelin-contracts-upgradeable/=lib/fluid-contracts-public/lib/openzeppelin-contracts-upgradeable/",":openzeppelin-contracts-v5/=lib/protocol-fees/lib/optimism/packages/contracts-bedrock/lib/openzeppelin-contracts-v5/",":openzeppelin-contracts/=lib/v4-periphery/lib/permit2/lib/openzeppelin-contracts/contracts/",":openzeppelin/=lib/uniswapx/lib/openzeppelin-contracts/contracts/",":optimism/=lib/protocol-fees/lib/optimism/",":pancake-v3-contracts/=lib/pancake-v3-contracts/",":permit2/=lib/v4-periphery/lib/permit2/",":protocol-fees/=lib/protocol-fees/",":safe-contracts/=lib/protocol-fees/lib/optimism/packages/contracts-bedrock/lib/safe-contracts/",":scripts/libraries/Config.sol=lib/protocol-fees/lib/optimism/packages/contracts-bedrock/scripts/libraries/Config.sol",":slipstream/=lib/slipstream/",":solady-v0.0.245/=lib/protocol-fees/lib/optimism/packages/contracts-bedrock/lib/solady-v0.0.245/src/",":solady/=lib/solady/src/",":solarray/=lib/uniswapx/lib/solarray/src/",":soledge/=lib/uniswapx/lib/Tribunal/lib/the-compact/lib/soledge/src/",":solidity-bytes-utils/=lib/protocol-fees/lib/native-token-transfers/evm/lib/solidity-bytes-utils/contracts/",":solidity-lib/=lib/slipstream/lib/solidity-lib/contracts/",":solmate/=lib/v4-core/lib/solmate/",":src/AgreementAnchor.sol=lib/protocol-fees/lib/dao-signer/src/AgreementAnchor.sol",":src/AgreementAnchorFactory.sol=lib/protocol-fees/lib/dao-signer/src/AgreementAnchorFactory.sol",":src/interfaces/IAgreementAnchorFactory.sol=lib/protocol-fees/lib/dao-signer/src/interfaces/IAgreementAnchorFactory.sol",":the-compact/=lib/uniswapx/lib/Tribunal/lib/the-compact/",":tribunal/=lib/uniswapx/lib/Tribunal/",":uniswapx/=lib/uniswapx/",":v2-core/=lib/v2-core/contracts/",":v3-core/=lib/v3-core/",":v3-periphery/=lib/v3-periphery/contracts/",":v4-core/=lib/v4-core/src/",":v4-periphery/=lib/v4-periphery/",":webauthn-sol/=lib/uniswapx/lib/calibur/lib/webauthn-sol/",":wormhole-solidity-sdk/=lib/protocol-fees/lib/native-token-transfers/evm/lib/wormhole-solidity-sdk/src/"]},"sources":{"lib/openzeppelin-contracts/contracts/interfaces/IERC1363.sol":{"keccak256":"0xd5ea07362ab630a6a3dee4285a74cf2377044ca2e4be472755ad64d7c5d4b69d","license":"MIT","urls":["bzz-raw://da5e832b40fc5c3145d3781e2e5fa60ac2052c9d08af7e300dc8ab80c4343100","dweb:/ipfs/QmTzf7N5ZUdh5raqtzbM11yexiUoLC9z3Ws632MCuycq1d"]},"lib/openzeppelin-contracts/contracts/interfaces/IERC165.sol":{"keccak256":"0x0afcb7e740d1537b252cb2676f600465ce6938398569f09ba1b9ca240dde2dfc","license":"MIT","urls":["bzz-raw://1c299900ac4ec268d4570ecef0d697a3013cd11a6eb74e295ee3fbc945056037","dweb:/ipfs/Qmab9owJoxcA7vJT5XNayCMaUR1qxqj1NDzzisduwaJMcZ"]},"lib/openzeppelin-contracts/contracts/interfaces/IERC20.sol":{"keccak256":"0x1a6221315ce0307746c2c4827c125d821ee796c74a676787762f4778671d4f44","license":"MIT","urls":["bzz-raw://1bb2332a7ee26dd0b0de9b7fe266749f54820c99ab6a3bcb6f7e6b751d47ee2d","dweb:/ipfs/QmcRWpaBeCYkhy68PR3B4AgD7asuQk7PwkWxrvJbZcikLF"]},"lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol":{"keccak256":"0x74ed01eb66b923d0d0cfe3be84604ac04b76482a55f9dd655e1ef4d367f95bc2","license":"MIT","urls":["bzz-raw://5282825a626cfe924e504274b864a652b0023591fa66f06a067b25b51ba9b303","dweb:/ipfs/QmeCfPykghhMc81VJTrHTC7sF6CRvaA1FXVq2pJhwYp1dV"]},"lib/openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol":{"keccak256":"0x304d732678032a9781ae85c8f204c8fba3d3a5e31c02616964e75cfdc5049098","license":"MIT","urls":["bzz-raw://299ced486011781dc98f638059678323c03079fefae1482abaa2135b22fa92d0","dweb:/ipfs/QmbZNbcPTBxNvwChavN2kkZZs7xHhYL7mv51KrxMhsMs3j"]},"lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol":{"keccak256":"0x8891738ffe910f0cf2da09566928589bf5d63f4524dd734fd9cedbac3274dd5c","license":"MIT","urls":["bzz-raw://971f954442df5c2ef5b5ebf1eb245d7105d9fbacc7386ee5c796df1d45b21617","dweb:/ipfs/QmadRjHbkicwqwwh61raUEapaVEtaLMcYbQZWs9gUkgj3u"]},"lib/protocol-fees/src/interfaces/IFeeClassifiedHook.sol":{"keccak256":"0xd54878f6a1043291c171aeb6785170499534b5c520efa67757ed42ae7d93329b","license":"AGPL-3.0-only","urls":["bzz-raw://dcb8f9a5dbc2dab8697b06aa12008b6ac76b6715790d8f484bae54283d5d6797","dweb:/ipfs/QmfLziggTZXZuFNfH5hTbTBV8zwwjJocKWgQ9vVmPniekU"]},"lib/protocol-fees/src/interfaces/IV4FeeAdapter.sol":{"keccak256":"0x3accea31dca865172321cbd3a4ede1f0457a523477a0890637ffc163bc72cb31","license":"MIT","urls":["bzz-raw://d71d50ec7849d3ccc5bd9149253cb6cb3bf184693874a252fe958348634f4cae","dweb:/ipfs/QmZ22sP4jLKS4J148WZy8qEkt6CDea7Z159gL16Yh13E5S"]},"lib/protocol-fees/src/interfaces/IV4FeePolicy.sol":{"keccak256":"0xe86c0e269da1a08be4386827581354dbd7278564ce9b817d81450b64bc6dc627","license":"MIT","urls":["bzz-raw://a9a819a5b9b4a167d1a7ee9c879d5fc45a0037cbae7d6e556690b97947352504","dweb:/ipfs/QmYjqMmNUT8CjhC4x8sPZWBdBAzx7jmDNMoJJR29YSp75p"]},"lib/v4-core/src/interfaces/IExtsload.sol":{"keccak256":"0x80b53ca4907d6f0088c3b931f2b72cad1dc4615a95094d96bd0fb8dff8d5ba43","license":"MIT","urls":["bzz-raw://375c69148622aab7a3537d5fd37d373a8e9731022c8d87bdaee46233b0a99fe1","dweb:/ipfs/QmXFjdoYRxsA5B1kyuxEXgNf3FBoL1zPvy26Qy8EtpdFRN"]},"lib/v4-core/src/interfaces/IExttload.sol":{"keccak256":"0xc6b68283ebd8d1c789df536756726eed51c589134bb20821b236a0d22a135937","license":"MIT","urls":["bzz-raw://294394f72dfc219689209f4130d85601dfd0d63c8d47578050d312db70f9b6c8","dweb:/ipfs/QmTDMQ3oxCGHgEBU48a3Lp4S1rRjc8vVCxkhE5ZNej1bsY"]},"lib/v4-core/src/interfaces/IHooks.sol":{"keccak256":"0xc131ffa2d04c10a012fe715fe2c115811526b7ea34285cf0a04ce7ce8320da8d","license":"MIT","urls":["bzz-raw://3b212358897db5d99c21244d88f97b2e788527552cb430629b472a8cc6289aec","dweb:/ipfs/QmQtwV4dDe2RYk2ErLpaAX7U82jWh1L6Lw2HRuKDvBi84G"]},"lib/v4-core/src/interfaces/IPoolManager.sol":{"keccak256":"0xbdab3544da3d32dfdf7457baa94e17d5a3012952428559e013ffac45d067038e","license":"MIT","urls":["bzz-raw://ce95ff864468e37c76adf71df061d4f3d6f3a5ec1f9bc3aea090463bc72798f4","dweb:/ipfs/QmSbWh1pLbz51yQF4HEu5NRhr8XVv9JYGEw1hq1HudAnCi"]},"lib/v4-core/src/interfaces/IProtocolFees.sol":{"keccak256":"0x32a666e588a2f66334430357bb1e2424fe7eebeb98a3364b1dd16eb6ccca9848","license":"MIT","urls":["bzz-raw://85751d302125881f72e5f8af051c2d5d9b1f606ebaea8ca7d04fccdd27cc252d","dweb:/ipfs/QmeRwomeh9NWm6A6fgNA4KZPQZHPpdKsPQyYsHSFmvud7J"]},"lib/v4-core/src/interfaces/external/IERC20Minimal.sol":{"keccak256":"0xeccadf1bf69ba2eb51f2fe4fa511bc7bb05bbd6b9f9a3cb8e5d83d9582613e0f","license":"MIT","urls":["bzz-raw://118757369892687b99ef46ce28d6861f62c098285bd7687a4f17f7e44e5f81de","dweb:/ipfs/QmUxqbYqQtcEwwFbb9e6BBMePEaSgN8C45v6RKubD4ib8d"]},"lib/v4-core/src/interfaces/external/IERC6909Claims.sol":{"keccak256":"0xa586f345739e52b0488a0fe40b6e375cce67fdd25758408b0efcb5133ad96a48","license":"MIT","urls":["bzz-raw://e8c557b7e52abdbbd82e415a1acc27921446a7fd090b7d4877e52be72619547f","dweb:/ipfs/QmXE2KNPbXmGX8BQF3ei6zhzRTnhoTQg39XmqMnkhbr6QK"]},"lib/v4-core/src/libraries/CurrencyReserves.sol":{"keccak256":"0x1576616129933fcdf3b684cea33cffd9c95e18fafbd2832a8c48ac3d8526d4c3","license":"BUSL-1.1","urls":["bzz-raw://33b050efb9b81803b18f562271e7cca2ec5362c4d505860d6419b4a345636725","dweb:/ipfs/QmQtFtTwKZ5pFVGD2ENDUXvp7ECFvzqeCuJ1miJcUHdmiX"]},"lib/v4-core/src/libraries/CustomRevert.sol":{"keccak256":"0x111ed3031b6990c80a93ae35dde6b6ac0b7e6af471388fdd7461e91edda9b7de","license":"MIT","urls":["bzz-raw://c9ea883c98d6ae1829160d0977bb5195761cfd5bc81692d0a941f45717f594cd","dweb:/ipfs/QmZPwxzaeMNv536wzrAMrMswu7vMHuqPVpjcqL3YvCMoxt"]},"lib/v4-core/src/libraries/FixedPoint128.sol":{"keccak256":"0xad236e10853f4b4b20a35a9bb52b857c4fc79874846b7e444e06ead7f2630542","license":"MIT","urls":["bzz-raw://0de1f9a06520b1a689660943faa14fc0b8344ab41fab9e6012ea34bff4b9b3eb","dweb:/ipfs/QmRNMPTyko7W6d6KxuTsnDBa9oZgDK4xiwRRq3H9ASTbwy"]},"lib/v4-core/src/libraries/FullMath.sol":{"keccak256":"0x4fc73a00817193fd3cac1cc03d8167d21af97d75f1815a070ee31a90c702b4c2","license":"MIT","urls":["bzz-raw://c3b2d66d36b1ad56b1ab6e2eb8a816740877b40b461c93f125e88621c8378e52","dweb:/ipfs/QmPGvMZzKQvNiWKd8aRzzdW7oAizwrMgcMtnaworDkVHFC"]},"lib/v4-core/src/libraries/Hooks.sol":{"keccak256":"0xd679b4b2d429689bc44f136050ebc958fb2d7d0d3a3c7b3e48c08ab4fba09aaa","license":"MIT","urls":["bzz-raw://287190cb72840e5eb63cc7a8a1d0b9150af17d8e4ea0323f47c7e7928f2033cb","dweb:/ipfs/QmVfqWBnAQM2jUcuREDdvjcP21gNuLU35CoL3NG5CEhNcx"]},"lib/v4-core/src/libraries/LPFeeLibrary.sol":{"keccak256":"0xbf6914e01014e7c1044111feb7df7a3d96bb503b3da827ad8464b1955580d13b","license":"MIT","urls":["bzz-raw://33823c20a91882c9aacdcbb02f0558c05209f4d5954aa6dd4fa17c95664db475","dweb:/ipfs/QmR7owkFgpfztpp1QUg3ut3nw9iPVQqLGP4hzgmZtRUQ2J"]},"lib/v4-core/src/libraries/LiquidityMath.sol":{"keccak256":"0x000ef2eadcc1eb7b2c18a77655f94e76e0e860f605783484657ef65fd6eda353","license":"MIT","urls":["bzz-raw://a766b620a7a22798b43c6c1f23b5c6cff0ebf588deb89842bad05208d448cd99","dweb:/ipfs/QmVKjaFJdzkqA3ey2Byum8iTCMssWVD8MmVC8rw62Tj5WD"]},"lib/v4-core/src/libraries/Lock.sol":{"keccak256":"0x9338be4b5695f1da5f3d3f7a3eeaf7a356c1045458289586ac0cbe9cef77c6d5","license":"BUSL-1.1","urls":["bzz-raw://485ec42ed6155469d612a9a0c18068ebfbad74448792a338a435503de3ef1b2c","dweb:/ipfs/QmVnnv5u74MYatfRmBgrcfFYQcsMAJMG9jQ6ju8UiydKNF"]},"lib/v4-core/src/libraries/NonzeroDeltaCount.sol":{"keccak256":"0x0666ebd5d3528d7d52c48538296367a4cff97a578cf13365c51983fae3219b87","license":"BUSL-1.1","urls":["bzz-raw://d27f1be3bd09d85c53d3e6a539dd6529ddd8b2b764ccb47fd7765fc81f9add59","dweb:/ipfs/QmQdZujNXhKEXQBkKtF5jbdvo1yXMqPDUoBBaF9S5u3Kpm"]},"lib/v4-core/src/libraries/ParseBytes.sol":{"keccak256":"0x7533b13f53ee2c2c55500100b22ffd6e37e7523c27874edc98663d53a8672b15","license":"MIT","urls":["bzz-raw://82449058634fde28a085f3c59a6a5f412550c02181590593fd84c3e8b329aa17","dweb:/ipfs/Qmev4E9Au6SsE4wsArChCwfg94KhHc5gYsEsZUnjF5sRLa"]},"lib/v4-core/src/libraries/Position.sol":{"keccak256":"0xddab2a831f1befb6abf5567e77c4582169ca8156cf69eb4f22d8e87f7226a3f9","license":"BUSL-1.1","urls":["bzz-raw://c79fe61b50f3b70cff503abfa6f5643fcbefb9b794855bee1019b1e6d9c083b2","dweb:/ipfs/QmbKmYNQesaMz8bo1b7TMHQcAwaDd3eDPrE5pAdPPZTtk5"]},"lib/v4-core/src/libraries/ProtocolFeeLibrary.sol":{"keccak256":"0xf483001899229ab10f5a626fe1c5866134d9e965b48ce6cf55ce0d7f74f7d8ec","license":"MIT","urls":["bzz-raw://6ba9211a7f69bbb44649c35211eb29d193c09032ec600064ef9d04b4625dd8ba","dweb:/ipfs/QmQSjQvtguYgMJSkkKRhHjxasfX9xfTbrbcZ1QmjUVb787"]},"lib/v4-core/src/libraries/SafeCast.sol":{"keccak256":"0x42c4a24f996a14d358be397b71f7ec9d7daf666aaec78002c63315a6ee67aa86","license":"MIT","urls":["bzz-raw://c3db86e2ba3679105fc32edec656c70282e1fede6cab11217702443f6c26fa59","dweb:/ipfs/QmX4yaaSPdKQzYNRsezjTvZKsubzS8JRTEGFD3fPpTTCcj"]},"lib/v4-core/src/libraries/StateLibrary.sol":{"keccak256":"0x96db333ee126a841dd959e38e452cc59d73583cb0437a1d48b2052e33a74f952","license":"MIT","urls":["bzz-raw://8672bba1eb69608299b0904f4ff305238eb18479d371c26518f278c9ee184cd0","dweb:/ipfs/QmTLu3s6ECvsEDHStQv8HTVHYtvkviBbdjPrFJd4SpVRFY"]},"lib/v4-core/src/libraries/TransientStateLibrary.sol":{"keccak256":"0x7d1e0875747bd89b32c25f1a48da2766e5f4aff1f671ad5f3c0c07ebbbcb946a","license":"MIT","urls":["bzz-raw://d76cfeb1cb60595b41ecc51c8a12fb4bf63a7fc733d0b1a2e3adb55abeb1f9d5","dweb:/ipfs/Qmb8oX7DtsRpw3tTtdWZwGhauj1evq43d3PLwe4nSDAKkV"]},"lib/v4-core/src/types/BalanceDelta.sol":{"keccak256":"0xa719c8fe51e0a9524280178f19f6851bcc3b3b60e73618f3d60905d35ae5569f","license":"MIT","urls":["bzz-raw://7436928dc9de35c6c7c5c636cb51adaf295cfd590da83b19a004ae33cbec9ef9","dweb:/ipfs/QmRJ9yZkUpzk4433GX3LgVVL8jwpbSYSUwXcucKisf3v4H"]},"lib/v4-core/src/types/BeforeSwapDelta.sol":{"keccak256":"0x2a774312d91285313d569da1a718c909655da5432310417692097a1d4dc83a78","license":"MIT","urls":["bzz-raw://a2c7a0379955cff9c17ab9e61f95e42909aa5947c22740f86ce940d09856f782","dweb:/ipfs/QmaAuo8UBYXsGrVuKh8iRoAAdqwtg1jDq515cW1ZRP5m9K"]},"lib/v4-core/src/types/Currency.sol":{"keccak256":"0x4a0b84b282577ff6f8acf13ec9f4d32dbb9348748b49611d00e68bee96609c93","license":"MIT","urls":["bzz-raw://45f9d62ab3d51b52957279e353853ba1547c3182c9a1e3d1846ada4a90263b01","dweb:/ipfs/QmS8NG84ccQS1yXVD8cv3eKX7J1UKxuJhbUfHTQR2opKF5"]},"lib/v4-core/src/types/PoolId.sol":{"keccak256":"0x308311916ea0f5c2fd878b6a2751eb223d170a69e33f601fae56dfe3c5d392af","license":"MIT","urls":["bzz-raw://669c2cd7ac17690b5d8831e0bda72822376c3a04b36afed6d31df4d75fe60918","dweb:/ipfs/QmT6EpkxqU8VF3WsgrZ66F3s1cCQRffR95z1HDYZz7ph6y"]},"lib/v4-core/src/types/PoolKey.sol":{"keccak256":"0xf89856e0580d7a4856d3187a76858377ccee9d59702d230c338d84388221b786","license":"MIT","urls":["bzz-raw://6f3118fa189025695c37fdf0bdd1190f085ad097484d3c88cf4c56d1db65f639","dweb:/ipfs/QmamXpgtB8GV1CaFLvqefPWSoikLDhMk1yU4heBnVzU8gi"]},"lib/v4-core/src/types/PoolOperation.sol":{"keccak256":"0x7a1a107fc1f2208abb2c9364c8c54e56e98dca27673e9441bed2b949b6382162","license":"MIT","urls":["bzz-raw://4ad2470383bc5595d5af17840c64971f457adac68895a4db41ba5c71a4478e07","dweb:/ipfs/QmdwKhBHDZFuqXrR2BfDBD9r7rB2ULGQBznsajRTkTmL4c"]},"lib/v4-periphery/src/base/DeltaResolver.sol":{"keccak256":"0xb85e3fa537501d083ab7d53694e790ef78e3ad8f7fecf127bcf1e86ce5a63c74","license":"MIT","urls":["bzz-raw://150036746ada031e680b37411b263c98f1d10be6b331dfee12fe8bf32b60e839","dweb:/ipfs/QmSZAhjgKJQcH7emdGmd9uKGWUA8PqjckGCNco48aWbuBk"]},"lib/v4-periphery/src/base/ImmutableState.sol":{"keccak256":"0x1867c9fa2f9b4fa73bab0fcdc9d19ccef4eeac552273d8b84a170cd1cc90350a","license":"MIT","urls":["bzz-raw://af2d699b439e13b599632fddfe82718aebd41055fba7c075f186675c588d1337","dweb:/ipfs/Qmc111gckSKb9aESn3wRFLeLiS4KGujaUcaYJgRnCRfwQU"]},"lib/v4-periphery/src/interfaces/IImmutableState.sol":{"keccak256":"0x36ab3100e87457ecf04887f4f540e34fd7f21d8e3b83880cb679239e60b7b06b","license":"MIT","urls":["bzz-raw://7f290c7ce8e4832608d637a51b13dff95abecf6549485448e647a11c8ed01341","dweb:/ipfs/QmfD1R6mTp8j4EjQXmQZW3vCh11EYFjnvoaw8rXRP27mMq"]},"lib/v4-periphery/src/libraries/ActionConstants.sol":{"keccak256":"0x3d6f0e5b4a7b1e60bad93e73dce5db67fb66bebef11c31ed8355014a79aa03b3","license":"MIT","urls":["bzz-raw://6dfa42e24b1b5c7f66e75304ab034fbb6768518eb2410ccfff8b3defdd1658f2","dweb:/ipfs/QmQQ7fud9mmv7PEWPAQiNzeZhNkWf28Z6nCHc2e6WJFfa7"]},"src/aggregator-hooks/BaseAggregatorHook.sol":{"keccak256":"0x46f53e2d375e705c580442c75239eb0e9f516aad7c182c6ea24b2186d72fb060","license":"MIT","urls":["bzz-raw://572d3833efc836a74dcb8300ed55186ff76731e62c49ba7d03f5665dcd8d1d7f","dweb:/ipfs/QmZGKWa7XEJXBjNgRQpxQ4E7P8afZimFv6Pjfc3PtwnHKd"]},"src/aggregator-hooks/ProtocolFees.sol":{"keccak256":"0xecd60d8ba702c5673478b69371339b29eb22d0209760b9159f1da82a9a965658","license":"AGPL-3.0-only","urls":["bzz-raw://d84b4f888f9a2238a04dadf68f04ce30aaf2919e26480ab70d569d3bd29aad3b","dweb:/ipfs/QmQmAmJDMLXzHUT6c822usCTKtXM1m37HAnCZGwfME5VFT"]},"src/aggregator-hooks/implementations/StableSwapNG/StableSwapNGAggregator.sol":{"keccak256":"0x0f2fd4c35e63b810c0ab2a1c64ed45b700f99399f50384e3a71d8d2fd435570f","license":"MIT","urls":["bzz-raw://e1b62facb006ba3e7af2d4ddcc264b398e0bbefad46dd32a6c23162ae43f1252","dweb:/ipfs/QmaqctCBw24eGG42BP3hkTGYdqB652TFmeXhgKa1WpuKmo"]},"src/aggregator-hooks/implementations/StableSwapNG/interfaces/ICurveStableSwapFactoryNG.sol":{"keccak256":"0xe424b019436109c900ee6cac505afb85569745d71a6b290cfe638b6008671907","license":"MIT","urls":["bzz-raw://f3d70ab3e92b14bb768bd69e3015d0088269ad9928887b386f262cf461ae2254","dweb:/ipfs/QmQwrCzzamTstTvkmZDewjic5hWCu4x1KF8UqTCCE5dptt"]},"src/aggregator-hooks/implementations/StableSwapNG/interfaces/ICurveStableSwapNG.sol":{"keccak256":"0x95f1c81f74bdf11762e9a2bb6ecf653b1fdef98a970b2e4d56513d68c54fa6fa","license":"MIT","urls":["bzz-raw://f44034586eb8c6f5a22057e9142a64dd70a988010c6785b8b2c2fb0574ffd4be","dweb:/ipfs/Qmc6CGES2StDkwuRoQkK5L9Ufne385ZtgvBke27xg9Qfkv"]},"src/aggregator-hooks/interfaces/IAggregatorHook.sol":{"keccak256":"0xa42115b44bb4e61bd7dd206961f4b759856891e16a528e5c2e0728737303bcc3","license":"MIT","urls":["bzz-raw://312c08fe91dd3cd4fb03d3afec41ebf5565c280ef77d6c4328d0ab5cbbdab60a","dweb:/ipfs/QmQA3fJPFLc2BfwZCUbyXJ5tZd9beRGQj9sCELQiWsQM6f"]},"src/base/BaseHook.sol":{"keccak256":"0x148c72be0b0ac82664090d23ead3dda27410845afa809273c4d6956bc87a0c2c","license":"MIT","urls":["bzz-raw://c7c80c77d9abbf610070edebb55d7d107bb30e5d69efba8c4c26b85dba249e7a","dweb:/ipfs/QmTZR77BMjguXEjxex9PmtPGNnViwHpn6KYTEsVTQ4iMDD"]}},"version":1},"storageLayout":{"types":{"t_int128":{"label":"int128","encoding":"inplace","numberOfBytes":"16"},"t_address":{"label":"address","encoding":"inplace","numberOfBytes":"20"},"t_string_storage":{"label":"string","encoding":"bytes","numberOfBytes":"32"},"t_struct(PoolInfo)7015_storage":{"label":"struct StableSwapNGAggregator.PoolInfo","members":[{"slot":"0","type":"t_int128","astId":7012,"label":"token0Index","offset":0,"contract":"src/aggregator-hooks/implementations/StableSwapNG/StableSwapNGAggregator.sol:StableSwapNGAggregator"},{"slot":"0","type":"t_int128","astId":7014,"label":"token1Index","offset":16,"contract":"src/aggregator-hooks/implementations/StableSwapNG/StableSwapNGAggregator.sol:StableSwapNGAggregator"}],"encoding":"inplace","numberOfBytes":"32"},"t_userDefinedValueType(PoolId)5469":{"label":"PoolId","encoding":"inplace","numberOfBytes":"32"},"t_mapping(t_userDefinedValueType(PoolId)5469,t_struct(PoolInfo)7015_storage)":{"key":"t_userDefinedValueType(PoolId)5469","label":"mapping(PoolId => struct StableSwapNGAggregator.PoolInfo)","value":"t_struct(PoolInfo)7015_storage","encoding":"mapping","numberOfBytes":"32"}},"storage":[{"slot":"0","type":"t_address","astId":6659,"label":"tokenJar","offset":0,"contract":"src/aggregator-hooks/implementations/StableSwapNG/StableSwapNGAggregator.sol:StableSwapNGAggregator"},{"slot":"1","type":"t_string_storage","astId":5999,"label":"aggregatorHookVersion","offset":0,"contract":"src/aggregator-hooks/implementations/StableSwapNG/StableSwapNGAggregator.sol:StableSwapNGAggregator"},{"slot":"2","type":"t_mapping(t_userDefinedValueType(PoolId)5469,t_struct(PoolInfo)7015_storage)","astId":7022,"label":"poolIdToTokenInfo","offset":0,"contract":"src/aggregator-hooks/implementations/StableSwapNG/StableSwapNGAggregator.sol:StableSwapNGAggregator"}]},"transientStorageLayout":{"types":null,"storage":[]},"userdoc":{"kind":"user","errors":{"NotPoolManager()":[{"notice":"Thrown when the caller is not PoolManager"}],"InsufficientBalance()":[{"notice":"Emitted when the contract does not have enough balance to wrap or unwrap."}],"DeltaNotNegative(address)":[{"notice":"Emitted when unexpected positive delta is found."}],"DeltaNotPositive(address)":[{"notice":"Emitted when unexpected negative delta is found."}]},"notice":"Uniswap V4 hook that aggregates liquidity from Curve StableSwap NG pools","methods":{"pool()":{"notice":"The Curve StableSwap NG pool"},"poolManager()":{"notice":"The Uniswap v4 PoolManager contract"},"curveFactory()":{"notice":"The Curve StableSwap NG factory for checking meta pool status"},"pollTokenJar()":{"notice":"Queries the token jar from the pool manager and emits an event if it is updated"},"protocolFeeFlags()":{"notice":"Returns the hook's self-reported behavioral flags."},"getHookPermissions()":{"notice":"Returns a struct of permissions to signal which hook functions are to be implemented"},"aggregatorHookVersion()":{"notice":"The publicly displayed version of the aggregator hook."},"poolIdToTokenInfo(bytes32)":{"notice":"Maps Uniswap V4 pool IDs to their corresponding token indices in the Curve pool"},"quote(bool,int256,bytes32)":{"notice":"Quotes amount of unspecified side for a given amount of specified side"},"pseudoTotalValueLocked(bytes32)":{"notice":"Returns the pseudo TVL: the amount of the UniswapV4 pool's tokens locked in the aggregated pool"},"beforeInitialize(address,(address,address,uint24,int24,address),uint160)":{"notice":"The hook called before the state of a pool is initialized"},"afterInitialize(address,(address,address,uint24,int24,address),uint160,int24)":{"notice":"The hook called after the state of a pool is initialized"},"afterDonate(address,(address,address,uint24,int24,address),uint256,uint256,bytes)":{"notice":"The hook called after donate"},"beforeDonate(address,(address,address,uint24,int24,address),uint256,uint256,bytes)":{"notice":"The hook called before donate"},"beforeSwap(address,(address,address,uint24,int24,address),(bool,int256,uint160),bytes)":{"notice":"The hook called before a swap"},"afterSwap(address,(address,address,uint24,int24,address),(bool,int256,uint160),int256,bytes)":{"notice":"The hook called after a swap"},"beforeAddLiquidity(address,(address,address,uint24,int24,address),(int24,int24,int256,bytes32),bytes)":{"notice":"The hook called before liquidity is added"},"beforeRemoveLiquidity(address,(address,address,uint24,int24,address),(int24,int24,int256,bytes32),bytes)":{"notice":"The hook called before liquidity is removed"},"afterAddLiquidity(address,(address,address,uint24,int24,address),(int24,int24,int256,bytes32),int256,int256,bytes)":{"notice":"The hook called after liquidity is added"},"afterRemoveLiquidity(address,(address,address,uint24,int24,address),(int24,int24,int256,bytes32),int256,int256,bytes)":{"notice":"The hook called after liquidity is removed"}},"version":1},"devdoc":{"kind":"dev","title":"StableSwapNGAggregator","errors":{"SafeERC20FailedOperation(address)":[{"details":"An operation with an ERC-20 token failed."}]},"details":"Supports both exact-input and exact-output swaps","methods":{"pollTokenJar()":{"details":"This function should not need to be called externally except in the case of the tokenJar address changing after the protocol fee has been set","returns":{"_0":"The token jar address"}},"protocolFeeFlags()":{"details":"Return 0 to indicate no self-classification (falls through to defaultFee). The bitfield is opaque to the policy; see the governance guide for active conventions."},"getHookPermissions()":{"details":"Used at deployment to validate the address correctly represents the expected permissions","returns":{"permissions":"Permissions struct"}},"quote(bool,int256,bytes32)":{"params":{"zeroToOne":"Whether the swap is from token0 to token1 or from token1 to token0","amountSpecified":"The amount of tokens in or out (negative for exact-in, positive for exact-out)"},"details":"This function is meant to be called as a view function even though it is not one. This is because the swap might be simulated but not finalized. Applies protocol fee on top of the raw quote from the underlying liquidity source","returns":{"amountUnspecified":"amount of unspecified side (always positive to adhere to practices by other quote functions)"}},"pseudoTotalValueLocked(bytes32)":{"params":{"poolId":"The pool ID of the UniswapV4 pool"},"returns":{"amount0":"The amount of token0 in the aggregated pool","amount1":"The amount of token1 in the aggregated pool"}},"beforeInitialize(address,(address,address,uint24,int24,address),uint160)":{"params":{"key":"The key for the pool being initialized","sender":"The initial msg.sender for the initialize call","sqrtPriceX96":"The sqrt(price) of the pool as a Q64.96"},"returns":{"_0":"bytes4 The function selector for the hook"}},"afterInitialize(address,(address,address,uint24,int24,address),uint160,int24)":{"params":{"key":"The key for the pool being initialized","tick":"The current tick after the state of a pool is initialized","sender":"The initial msg.sender for the initialize call","sqrtPriceX96":"The sqrt(price) of the pool as a Q64.96"},"returns":{"_0":"bytes4 The function selector for the hook"}},"afterDonate(address,(address,address,uint24,int24,address),uint256,uint256,bytes)":{"params":{"key":"The key for the pool","sender":"The initial msg.sender for the donate call","amount0":"The amount of token0 being donated","amount1":"The amount of token1 being donated","hookData":"Arbitrary data handed into the PoolManager by the donor to be be passed on to the hook"},"returns":{"_0":"bytes4 The function selector for the hook"}},"beforeDonate(address,(address,address,uint24,int24,address),uint256,uint256,bytes)":{"params":{"key":"The key for the pool","sender":"The initial msg.sender for the donate call","amount0":"The amount of token0 being donated","amount1":"The amount of token1 being donated","hookData":"Arbitrary data handed into the PoolManager by the donor to be be passed on to the hook"},"returns":{"_0":"bytes4 The function selector for the hook"}},"beforeSwap(address,(address,address,uint24,int24,address),(bool,int256,uint160),bytes)":{"params":{"key":"The key for the pool","params":"The parameters for the swap","sender":"The initial msg.sender for the swap call","hookData":"Arbitrary data handed into the PoolManager by the swapper to be be passed on to the hook"},"returns":{"_0":"bytes4 The function selector for the hook","_1":"BeforeSwapDelta The hook's delta in specified and unspecified currencies. Positive: the hook is owed/took currency, negative: the hook owes/sent currency","_2":"uint24 Optionally override the lp fee, only used if three conditions are met: 1. the Pool has a dynamic fee, 2. the value's 2nd highest bit is set (23rd bit, 0x400000), and 3. the value is less than or equal to the maximum fee (1 million)"}},"afterSwap(address,(address,address,uint24,int24,address),(bool,int256,uint160),int256,bytes)":{"params":{"key":"The key for the pool","delta":"The amount owed to the caller (positive) or owed to the pool (negative)","params":"The parameters for the swap","sender":"The initial msg.sender for the swap call","hookData":"Arbitrary data handed into the PoolManager by the swapper to be be passed on to the hook"},"returns":{"_0":"bytes4 The function selector for the hook","_1":"int128 The hook's delta in unspecified currency. Positive: the hook is owed/took currency, negative: the hook owes/sent currency"}},"beforeAddLiquidity(address,(address,address,uint24,int24,address),(int24,int24,int256,bytes32),bytes)":{"params":{"key":"The key for the pool","params":"The parameters for adding liquidity","sender":"The initial msg.sender for the add liquidity call","hookData":"Arbitrary data handed into the PoolManager by the liquidity provider to be passed on to the hook"},"returns":{"_0":"bytes4 The function selector for the hook"}},"beforeRemoveLiquidity(address,(address,address,uint24,int24,address),(int24,int24,int256,bytes32),bytes)":{"params":{"key":"The key for the pool","params":"The parameters for removing liquidity","sender":"The initial msg.sender for the remove liquidity call","hookData":"Arbitrary data handed into the PoolManager by the liquidity provider to be be passed on to the hook"},"returns":{"_0":"bytes4 The function selector for the hook"}},"afterAddLiquidity(address,(address,address,uint24,int24,address),(int24,int24,int256,bytes32),int256,int256,bytes)":{"params":{"key":"The key for the pool","delta":"The caller's balance delta after adding liquidity; the sum of principal delta, fees accrued, and hook delta","params":"The parameters for adding liquidity","sender":"The initial msg.sender for the add liquidity call","hookData":"Arbitrary data handed into the PoolManager by the liquidity provider to be passed on to the hook","feesAccrued":"The fees accrued since the last time fees were collected from this position"},"returns":{"_0":"bytes4 The function selector for the hook","_1":"BalanceDelta The hook's delta in token0 and token1. Positive: the hook is owed/took currency, negative: the hook owes/sent currency"}},"afterRemoveLiquidity(address,(address,address,uint24,int24,address),(int24,int24,int256,bytes32),int256,int256,bytes)":{"params":{"key":"The key for the pool","delta":"The caller's balance delta after removing liquidity; the sum of principal delta, fees accrued, and hook delta","params":"The parameters for removing liquidity","sender":"The initial msg.sender for the remove liquidity call","hookData":"Arbitrary data handed into the PoolManager by the liquidity provider to be be passed on to the hook","feesAccrued":"The fees accrued since the last time fees were collected from this position"},"returns":{"_0":"bytes4 The function selector for the hook","_1":"BalanceDelta The hook's delta in token0 and token1. Positive: the hook is owed/took currency, negative: the hook owes/sent currency"}}},"version":1},"sourceIds":{"src/base/BaseHook.sol":{"id":47},"lib/v4-core/src/types/PoolId.sol":{"id":34},"lib/v4-core/src/types/PoolKey.sol":{"id":35},"lib/v4-core/src/libraries/Lock.sol":{"id":23},"lib/v4-core/src/types/Currency.sol":{"id":33},"lib/v4-core/src/libraries/Hooks.sol":{"id":20},"lib/v4-core/src/interfaces/IHooks.sol":{"id":11},"src/aggregator-hooks/ProtocolFees.sol":{"id":42},"lib/v4-core/src/libraries/FullMath.sol":{"id":19},"lib/v4-core/src/libraries/Position.sol":{"id":26},"lib/v4-core/src/libraries/SafeCast.sol":{"id":28},"lib/v4-core/src/types/BalanceDelta.sol":{"id":31},"lib/v4-core/src/types/PoolOperation.sol":{"id":36},"lib/v4-core/src/interfaces/IExtsload.sol":{"id":9},"lib/v4-core/src/interfaces/IExttload.sol":{"id":10},"lib/v4-core/src/libraries/ParseBytes.sol":{"id":25},"lib/v4-core/src/types/BeforeSwapDelta.sol":{"id":32},"lib/v4-core/src/libraries/CustomRevert.sol":{"id":17},"lib/v4-core/src/libraries/LPFeeLibrary.sol":{"id":21},"lib/v4-core/src/libraries/StateLibrary.sol":{"id":29},"lib/v4-core/src/interfaces/IPoolManager.sol":{"id":12},"lib/v4-core/src/libraries/FixedPoint128.sol":{"id":18},"lib/v4-core/src/libraries/LiquidityMath.sol":{"id":22},"lib/v4-periphery/src/base/DeltaResolver.sol":{"id":37},"src/aggregator-hooks/BaseAggregatorHook.sol":{"id":41},"lib/v4-core/src/interfaces/IProtocolFees.sol":{"id":13},"lib/v4-periphery/src/base/ImmutableState.sol":{"id":38},"lib/v4-core/src/libraries/CurrencyReserves.sol":{"id":16},"lib/v4-core/src/libraries/NonzeroDeltaCount.sol":{"id":24},"lib/v4-core/src/libraries/ProtocolFeeLibrary.sol":{"id":27},"lib/protocol-fees/src/interfaces/IV4FeePolicy.sol":{"id":8},"lib/protocol-fees/src/interfaces/IV4FeeAdapter.sol":{"id":7},"lib/v4-periphery/src/libraries/ActionConstants.sol":{"id":40},"lib/v4-core/src/libraries/TransientStateLibrary.sol":{"id":30},"lib/v4-periphery/src/interfaces/IImmutableState.sol":{"id":39},"src/aggregator-hooks/interfaces/IAggregatorHook.sol":{"id":46},"lib/v4-core/src/interfaces/external/IERC20Minimal.sol":{"id":14},"lib/v4-core/src/interfaces/external/IERC6909Claims.sol":{"id":15},"lib/protocol-fees/src/interfaces/IFeeClassifiedHook.sol":{"id":6},"lib/openzeppelin-contracts/contracts/interfaces/IERC20.sol":{"id":2},"lib/openzeppelin-contracts/contracts/interfaces/IERC165.sol":{"id":1},"lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol":{"id":3},"lib/openzeppelin-contracts/contracts/interfaces/IERC1363.sol":{"id":0},"lib/openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol":{"id":4},"lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol":{"id":5},"src/aggregator-hooks/implementations/StableSwapNG/StableSwapNGAggregator.sol":{"id":43},"src/aggregator-hooks/implementations/StableSwapNG/interfaces/ICurveStableSwapNG.sol":{"id":45},"src/aggregator-hooks/implementations/StableSwapNG/interfaces/ICurveStableSwapFactoryNG.sol":{"id":44}},"additionalInput":null,"stdJsonInput":{"sources":{"src/base/BaseHook.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {Hooks} from \"@uniswap/v4-core/src/libraries/Hooks.sol\";\nimport {IPoolManager} from \"@uniswap/v4-core/src/interfaces/IPoolManager.sol\";\nimport {IHooks} from \"@uniswap/v4-core/src/interfaces/IHooks.sol\";\nimport {BalanceDelta} from \"@uniswap/v4-core/src/types/BalanceDelta.sol\";\nimport {PoolKey} from \"@uniswap/v4-core/src/types/PoolKey.sol\";\nimport {BeforeSwapDelta} from \"@uniswap/v4-core/src/types/BeforeSwapDelta.sol\";\nimport {ImmutableState} from \"@uniswap/v4-periphery/src/base/ImmutableState.sol\";\nimport {ModifyLiquidityParams, SwapParams} from \"@uniswap/v4-core/src/types/PoolOperation.sol\";\n\n/// @title Base Hook\n/// @notice abstract contract for hook implementations\nabstract contract BaseHook is IHooks, ImmutableState {\n    error HookNotImplemented();\n\n    constructor(IPoolManager _manager) ImmutableState(_manager) {\n        validateHookAddress(this);\n    }\n\n    /// @notice Returns a struct of permissions to signal which hook functions are to be implemented\n    /// @dev Used at deployment to validate the address correctly represents the expected permissions\n    /// @return Permissions struct\n    function getHookPermissions() public pure virtual returns (Hooks.Permissions memory);\n\n    /// @notice Validates the deployed hook address agrees with the expected permissions of the hook\n    /// @dev this function is virtual so that we can override it during testing,\n    /// which allows us to deploy an implementation to any address\n    /// and then etch the bytecode into the correct address\n    function validateHookAddress(BaseHook _this) internal pure virtual {\n        Hooks.validateHookPermissions(_this, getHookPermissions());\n    }\n\n    /// @inheritdoc IHooks\n    function beforeInitialize(address sender, PoolKey calldata key, uint160 sqrtPriceX96)\n        external\n        onlyPoolManager\n        returns (bytes4)\n    {\n        return _beforeInitialize(sender, key, sqrtPriceX96);\n    }\n\n    function _beforeInitialize(address, PoolKey calldata, uint160) internal virtual returns (bytes4) {\n        revert HookNotImplemented();\n    }\n\n    /// @inheritdoc IHooks\n    function afterInitialize(address sender, PoolKey calldata key, uint160 sqrtPriceX96, int24 tick)\n        external\n        onlyPoolManager\n        returns (bytes4)\n    {\n        return _afterInitialize(sender, key, sqrtPriceX96, tick);\n    }\n\n    function _afterInitialize(address, PoolKey calldata, uint160, int24) internal virtual returns (bytes4) {\n        revert HookNotImplemented();\n    }\n\n    /// @inheritdoc IHooks\n    function beforeAddLiquidity(\n        address sender,\n        PoolKey calldata key,\n        ModifyLiquidityParams calldata params,\n        bytes calldata hookData\n    ) external onlyPoolManager returns (bytes4) {\n        return _beforeAddLiquidity(sender, key, params, hookData);\n    }\n\n    function _beforeAddLiquidity(address, PoolKey calldata, ModifyLiquidityParams calldata, bytes calldata)\n        internal\n        virtual\n        returns (bytes4)\n    {\n        revert HookNotImplemented();\n    }\n\n    /// @inheritdoc IHooks\n    function beforeRemoveLiquidity(\n        address sender,\n        PoolKey calldata key,\n        ModifyLiquidityParams calldata params,\n        bytes calldata hookData\n    ) external onlyPoolManager returns (bytes4) {\n        return _beforeRemoveLiquidity(sender, key, params, hookData);\n    }\n\n    function _beforeRemoveLiquidity(address, PoolKey calldata, ModifyLiquidityParams calldata, bytes calldata)\n        internal\n        virtual\n        returns (bytes4)\n    {\n        revert HookNotImplemented();\n    }\n\n    /// @inheritdoc IHooks\n    function afterAddLiquidity(\n        address sender,\n        PoolKey calldata key,\n        ModifyLiquidityParams calldata params,\n        BalanceDelta delta,\n        BalanceDelta feesAccrued,\n        bytes calldata hookData\n    ) external onlyPoolManager returns (bytes4, BalanceDelta) {\n        return _afterAddLiquidity(sender, key, params, delta, feesAccrued, hookData);\n    }\n\n    function _afterAddLiquidity(\n        address,\n        PoolKey calldata,\n        ModifyLiquidityParams calldata,\n        BalanceDelta,\n        BalanceDelta,\n        bytes calldata\n    ) internal virtual returns (bytes4, BalanceDelta) {\n        revert HookNotImplemented();\n    }\n\n    /// @inheritdoc IHooks\n    function afterRemoveLiquidity(\n        address sender,\n        PoolKey calldata key,\n        ModifyLiquidityParams calldata params,\n        BalanceDelta delta,\n        BalanceDelta feesAccrued,\n        bytes calldata hookData\n    ) external onlyPoolManager returns (bytes4, BalanceDelta) {\n        return _afterRemoveLiquidity(sender, key, params, delta, feesAccrued, hookData);\n    }\n\n    function _afterRemoveLiquidity(\n        address,\n        PoolKey calldata,\n        ModifyLiquidityParams calldata,\n        BalanceDelta,\n        BalanceDelta,\n        bytes calldata\n    ) internal virtual returns (bytes4, BalanceDelta) {\n        revert HookNotImplemented();\n    }\n\n    /// @inheritdoc IHooks\n    function beforeSwap(address sender, PoolKey calldata key, SwapParams calldata params, bytes calldata hookData)\n        external\n        onlyPoolManager\n        returns (bytes4, BeforeSwapDelta, uint24)\n    {\n        return _beforeSwap(sender, key, params, hookData);\n    }\n\n    function _beforeSwap(address, PoolKey calldata, SwapParams calldata, bytes calldata)\n        internal\n        virtual\n        returns (bytes4, BeforeSwapDelta, uint24)\n    {\n        revert HookNotImplemented();\n    }\n\n    /// @inheritdoc IHooks\n    function afterSwap(\n        address sender,\n        PoolKey calldata key,\n        SwapParams calldata params,\n        BalanceDelta delta,\n        bytes calldata hookData\n    ) external onlyPoolManager returns (bytes4, int128) {\n        return _afterSwap(sender, key, params, delta, hookData);\n    }\n\n    function _afterSwap(address, PoolKey calldata, SwapParams calldata, BalanceDelta, bytes calldata)\n        internal\n        virtual\n        returns (bytes4, int128)\n    {\n        revert HookNotImplemented();\n    }\n\n    /// @inheritdoc IHooks\n    function beforeDonate(\n        address sender,\n        PoolKey calldata key,\n        uint256 amount0,\n        uint256 amount1,\n        bytes calldata hookData\n    ) external onlyPoolManager returns (bytes4) {\n        return _beforeDonate(sender, key, amount0, amount1, hookData);\n    }\n\n    function _beforeDonate(address, PoolKey calldata, uint256, uint256, bytes calldata)\n        internal\n        virtual\n        returns (bytes4)\n    {\n        revert HookNotImplemented();\n    }\n\n    /// @inheritdoc IHooks\n    function afterDonate(\n        address sender,\n        PoolKey calldata key,\n        uint256 amount0,\n        uint256 amount1,\n        bytes calldata hookData\n    ) external onlyPoolManager returns (bytes4) {\n        return _afterDonate(sender, key, amount0, amount1, hookData);\n    }\n\n    function _afterDonate(address, PoolKey calldata, uint256, uint256, bytes calldata)\n        internal\n        virtual\n        returns (bytes4)\n    {\n        revert HookNotImplemented();\n    }\n}\n"},"lib/v4-core/src/types/PoolId.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {PoolKey} from \"./PoolKey.sol\";\n\ntype PoolId is bytes32;\n\n/// @notice Library for computing the ID of a pool\nlibrary PoolIdLibrary {\n    /// @notice Returns value equal to keccak256(abi.encode(poolKey))\n    function toId(PoolKey memory poolKey) internal pure returns (PoolId poolId) {\n        assembly (\"memory-safe\") {\n            // 0xa0 represents the total size of the poolKey struct (5 slots of 32 bytes)\n            poolId := keccak256(poolKey, 0xa0)\n        }\n    }\n}\n"},"lib/v4-core/src/types/PoolKey.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {Currency} from \"./Currency.sol\";\nimport {IHooks} from \"../interfaces/IHooks.sol\";\nimport {PoolIdLibrary} from \"./PoolId.sol\";\n\nusing PoolIdLibrary for PoolKey global;\n\n/// @notice Returns the key for identifying a pool\nstruct PoolKey {\n    /// @notice The lower currency of the pool, sorted numerically\n    Currency currency0;\n    /// @notice The higher currency of the pool, sorted numerically\n    Currency currency1;\n    /// @notice The pool LP fee, capped at 1_000_000. If the highest bit is 1, the pool has a dynamic fee and must be exactly equal to 0x800000\n    uint24 fee;\n    /// @notice Ticks that involve positions must be a multiple of tick spacing\n    int24 tickSpacing;\n    /// @notice The hooks of the pool\n    IHooks hooks;\n}\n"},"lib/v4-core/src/libraries/Lock.sol":{"content":"// SPDX-License-Identifier: BUSL-1.1\npragma solidity ^0.8.24;\n\n/// @notice This is a temporary library that allows us to use transient storage (tstore/tload)\n/// TODO: This library can be deleted when we have the transient keyword support in solidity.\nlibrary Lock {\n    // The slot holding the unlocked state, transiently. bytes32(uint256(keccak256(\"Unlocked\")) - 1)\n    bytes32 internal constant IS_UNLOCKED_SLOT = 0xc090fc4683624cfc3884e9d8de5eca132f2d0ec062aff75d43c0465d5ceeab23;\n\n    function unlock() internal {\n        assembly (\"memory-safe\") {\n            // unlock\n            tstore(IS_UNLOCKED_SLOT, true)\n        }\n    }\n\n    function lock() internal {\n        assembly (\"memory-safe\") {\n            tstore(IS_UNLOCKED_SLOT, false)\n        }\n    }\n\n    function isUnlocked() internal view returns (bool unlocked) {\n        assembly (\"memory-safe\") {\n            unlocked := tload(IS_UNLOCKED_SLOT)\n        }\n    }\n}\n"},"lib/v4-core/src/types/Currency.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {IERC20Minimal} from \"../interfaces/external/IERC20Minimal.sol\";\nimport {CustomRevert} from \"../libraries/CustomRevert.sol\";\n\ntype Currency is address;\n\nusing {greaterThan as >, lessThan as <, greaterThanOrEqualTo as >=, equals as ==} for Currency global;\nusing CurrencyLibrary for Currency global;\n\nfunction equals(Currency currency, Currency other) pure returns (bool) {\n    return Currency.unwrap(currency) == Currency.unwrap(other);\n}\n\nfunction greaterThan(Currency currency, Currency other) pure returns (bool) {\n    return Currency.unwrap(currency) > Currency.unwrap(other);\n}\n\nfunction lessThan(Currency currency, Currency other) pure returns (bool) {\n    return Currency.unwrap(currency) < Currency.unwrap(other);\n}\n\nfunction greaterThanOrEqualTo(Currency currency, Currency other) pure returns (bool) {\n    return Currency.unwrap(currency) >= Currency.unwrap(other);\n}\n\n/// @title CurrencyLibrary\n/// @dev This library allows for transferring and holding native tokens and ERC20 tokens\nlibrary CurrencyLibrary {\n    /// @notice Additional context for ERC-7751 wrapped error when a native transfer fails\n    error NativeTransferFailed();\n\n    /// @notice Additional context for ERC-7751 wrapped error when an ERC20 transfer fails\n    error ERC20TransferFailed();\n\n    /// @notice A constant to represent the native currency\n    Currency public constant ADDRESS_ZERO = Currency.wrap(address(0));\n\n    function transfer(Currency currency, address to, uint256 amount) internal {\n        // altered from https://github.com/transmissions11/solmate/blob/44a9963d4c78111f77caa0e65d677b8b46d6f2e6/src/utils/SafeTransferLib.sol\n        // modified custom error selectors\n\n        bool success;\n        if (currency.isAddressZero()) {\n            assembly (\"memory-safe\") {\n                // Transfer the ETH and revert if it fails.\n                success := call(gas(), to, amount, 0, 0, 0, 0)\n            }\n            // revert with NativeTransferFailed, containing the bubbled up error as an argument\n            if (!success) {\n                CustomRevert.bubbleUpAndRevertWith(to, bytes4(0), NativeTransferFailed.selector);\n            }\n        } else {\n            assembly (\"memory-safe\") {\n                // Get a pointer to some free memory.\n                let fmp := mload(0x40)\n\n                // Write the abi-encoded calldata into memory, beginning with the function selector.\n                mstore(fmp, 0xa9059cbb00000000000000000000000000000000000000000000000000000000)\n                mstore(add(fmp, 4), and(to, 0xffffffffffffffffffffffffffffffffffffffff)) // Append and mask the \"to\" argument.\n                mstore(add(fmp, 36), amount) // Append the \"amount\" argument. Masking not required as it's a full 32 byte type.\n\n                success :=\n                    and(\n                        // Set success to whether the call reverted, if not we check it either\n                        // returned exactly 1 (can't just be non-zero data), or had no return data.\n                        or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize())),\n                        // We use 68 because the length of our calldata totals up like so: 4 + 32 * 2.\n                        // We use 0 and 32 to copy up to 32 bytes of return data into the scratch space.\n                        // Counterintuitively, this call must be positioned second to the or() call in the\n                        // surrounding and() call or else returndatasize() will be zero during the computation.\n                        call(gas(), currency, 0, fmp, 68, 0, 32)\n                    )\n\n                // Now clean the memory we used\n                mstore(fmp, 0) // 4 byte `selector` and 28 bytes of `to` were stored here\n                mstore(add(fmp, 0x20), 0) // 4 bytes of `to` and 28 bytes of `amount` were stored here\n                mstore(add(fmp, 0x40), 0) // 4 bytes of `amount` were stored here\n            }\n            // revert with ERC20TransferFailed, containing the bubbled up error as an argument\n            if (!success) {\n                CustomRevert.bubbleUpAndRevertWith(\n                    Currency.unwrap(currency), IERC20Minimal.transfer.selector, ERC20TransferFailed.selector\n                );\n            }\n        }\n    }\n\n    function balanceOfSelf(Currency currency) internal view returns (uint256) {\n        if (currency.isAddressZero()) {\n            return address(this).balance;\n        } else {\n            return IERC20Minimal(Currency.unwrap(currency)).balanceOf(address(this));\n        }\n    }\n\n    function balanceOf(Currency currency, address owner) internal view returns (uint256) {\n        if (currency.isAddressZero()) {\n            return owner.balance;\n        } else {\n            return IERC20Minimal(Currency.unwrap(currency)).balanceOf(owner);\n        }\n    }\n\n    function isAddressZero(Currency currency) internal pure returns (bool) {\n        return Currency.unwrap(currency) == Currency.unwrap(ADDRESS_ZERO);\n    }\n\n    function toId(Currency currency) internal pure returns (uint256) {\n        return uint160(Currency.unwrap(currency));\n    }\n\n    // If the upper 12 bytes are non-zero, they will be zero-ed out\n    // Therefore, fromId() and toId() are not inverses of each other\n    function fromId(uint256 id) internal pure returns (Currency) {\n        return Currency.wrap(address(uint160(id)));\n    }\n}\n"},"lib/v4-core/src/libraries/Hooks.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {PoolKey} from \"../types/PoolKey.sol\";\nimport {IHooks} from \"../interfaces/IHooks.sol\";\nimport {SafeCast} from \"./SafeCast.sol\";\nimport {LPFeeLibrary} from \"./LPFeeLibrary.sol\";\nimport {BalanceDelta, toBalanceDelta, BalanceDeltaLibrary} from \"../types/BalanceDelta.sol\";\nimport {BeforeSwapDelta, BeforeSwapDeltaLibrary} from \"../types/BeforeSwapDelta.sol\";\nimport {IPoolManager} from \"../interfaces/IPoolManager.sol\";\nimport {ModifyLiquidityParams, SwapParams} from \"../types/PoolOperation.sol\";\nimport {ParseBytes} from \"./ParseBytes.sol\";\nimport {CustomRevert} from \"./CustomRevert.sol\";\n\n/// @notice V4 decides whether to invoke specific hooks by inspecting the least significant bits\n/// of the address that the hooks contract is deployed to.\n/// For example, a hooks contract deployed to address: 0x0000000000000000000000000000000000002400\n/// has the lowest bits '10 0100 0000 0000' which would cause the 'before initialize' and 'after add liquidity' hooks to be used.\nlibrary Hooks {\n    using LPFeeLibrary for uint24;\n    using Hooks for IHooks;\n    using SafeCast for int256;\n    using BeforeSwapDeltaLibrary for BeforeSwapDelta;\n    using ParseBytes for bytes;\n    using CustomRevert for bytes4;\n\n    uint160 internal constant ALL_HOOK_MASK = uint160((1 << 14) - 1);\n\n    uint160 internal constant BEFORE_INITIALIZE_FLAG = 1 << 13;\n    uint160 internal constant AFTER_INITIALIZE_FLAG = 1 << 12;\n\n    uint160 internal constant BEFORE_ADD_LIQUIDITY_FLAG = 1 << 11;\n    uint160 internal constant AFTER_ADD_LIQUIDITY_FLAG = 1 << 10;\n\n    uint160 internal constant BEFORE_REMOVE_LIQUIDITY_FLAG = 1 << 9;\n    uint160 internal constant AFTER_REMOVE_LIQUIDITY_FLAG = 1 << 8;\n\n    uint160 internal constant BEFORE_SWAP_FLAG = 1 << 7;\n    uint160 internal constant AFTER_SWAP_FLAG = 1 << 6;\n\n    uint160 internal constant BEFORE_DONATE_FLAG = 1 << 5;\n    uint160 internal constant AFTER_DONATE_FLAG = 1 << 4;\n\n    uint160 internal constant BEFORE_SWAP_RETURNS_DELTA_FLAG = 1 << 3;\n    uint160 internal constant AFTER_SWAP_RETURNS_DELTA_FLAG = 1 << 2;\n    uint160 internal constant AFTER_ADD_LIQUIDITY_RETURNS_DELTA_FLAG = 1 << 1;\n    uint160 internal constant AFTER_REMOVE_LIQUIDITY_RETURNS_DELTA_FLAG = 1 << 0;\n\n    struct Permissions {\n        bool beforeInitialize;\n        bool afterInitialize;\n        bool beforeAddLiquidity;\n        bool afterAddLiquidity;\n        bool beforeRemoveLiquidity;\n        bool afterRemoveLiquidity;\n        bool beforeSwap;\n        bool afterSwap;\n        bool beforeDonate;\n        bool afterDonate;\n        bool beforeSwapReturnDelta;\n        bool afterSwapReturnDelta;\n        bool afterAddLiquidityReturnDelta;\n        bool afterRemoveLiquidityReturnDelta;\n    }\n\n    /// @notice Thrown if the address will not lead to the specified hook calls being called\n    /// @param hooks The address of the hooks contract\n    error HookAddressNotValid(address hooks);\n\n    /// @notice Hook did not return its selector\n    error InvalidHookResponse();\n\n    /// @notice Additional context for ERC-7751 wrapped error when a hook call fails\n    error HookCallFailed();\n\n    /// @notice The hook's delta changed the swap from exactIn to exactOut or vice versa\n    error HookDeltaExceedsSwapAmount();\n\n    /// @notice Utility function intended to be used in hook constructors to ensure\n    /// the deployed hooks address causes the intended hooks to be called\n    /// @param permissions The hooks that are intended to be called\n    /// @dev permissions param is memory as the function will be called from constructors\n    function validateHookPermissions(IHooks self, Permissions memory permissions) internal pure {\n        if (\n            permissions.beforeInitialize != self.hasPermission(BEFORE_INITIALIZE_FLAG)\n                || permissions.afterInitialize != self.hasPermission(AFTER_INITIALIZE_FLAG)\n                || permissions.beforeAddLiquidity != self.hasPermission(BEFORE_ADD_LIQUIDITY_FLAG)\n                || permissions.afterAddLiquidity != self.hasPermission(AFTER_ADD_LIQUIDITY_FLAG)\n                || permissions.beforeRemoveLiquidity != self.hasPermission(BEFORE_REMOVE_LIQUIDITY_FLAG)\n                || permissions.afterRemoveLiquidity != self.hasPermission(AFTER_REMOVE_LIQUIDITY_FLAG)\n                || permissions.beforeSwap != self.hasPermission(BEFORE_SWAP_FLAG)\n                || permissions.afterSwap != self.hasPermission(AFTER_SWAP_FLAG)\n                || permissions.beforeDonate != self.hasPermission(BEFORE_DONATE_FLAG)\n                || permissions.afterDonate != self.hasPermission(AFTER_DONATE_FLAG)\n                || permissions.beforeSwapReturnDelta != self.hasPermission(BEFORE_SWAP_RETURNS_DELTA_FLAG)\n                || permissions.afterSwapReturnDelta != self.hasPermission(AFTER_SWAP_RETURNS_DELTA_FLAG)\n                || permissions.afterAddLiquidityReturnDelta != self.hasPermission(AFTER_ADD_LIQUIDITY_RETURNS_DELTA_FLAG)\n                || permissions.afterRemoveLiquidityReturnDelta\n                    != self.hasPermission(AFTER_REMOVE_LIQUIDITY_RETURNS_DELTA_FLAG)\n        ) {\n            HookAddressNotValid.selector.revertWith(address(self));\n        }\n    }\n\n    /// @notice Ensures that the hook address includes at least one hook flag or dynamic fees, or is the 0 address\n    /// @param self The hook to verify\n    /// @param fee The fee of the pool the hook is used with\n    /// @return bool True if the hook address is valid\n    function isValidHookAddress(IHooks self, uint24 fee) internal pure returns (bool) {\n        // The hook can only have a flag to return a hook delta on an action if it also has the corresponding action flag\n        if (!self.hasPermission(BEFORE_SWAP_FLAG) && self.hasPermission(BEFORE_SWAP_RETURNS_DELTA_FLAG)) return false;\n        if (!self.hasPermission(AFTER_SWAP_FLAG) && self.hasPermission(AFTER_SWAP_RETURNS_DELTA_FLAG)) return false;\n        if (!self.hasPermission(AFTER_ADD_LIQUIDITY_FLAG) && self.hasPermission(AFTER_ADD_LIQUIDITY_RETURNS_DELTA_FLAG))\n        {\n            return false;\n        }\n        if (\n            !self.hasPermission(AFTER_REMOVE_LIQUIDITY_FLAG)\n                && self.hasPermission(AFTER_REMOVE_LIQUIDITY_RETURNS_DELTA_FLAG)\n        ) return false;\n\n        // If there is no hook contract set, then fee cannot be dynamic\n        // If a hook contract is set, it must have at least 1 flag set, or have a dynamic fee\n        return address(self) == address(0)\n            ? !fee.isDynamicFee()\n            : (uint160(address(self)) & ALL_HOOK_MASK > 0 || fee.isDynamicFee());\n    }\n\n    /// @notice performs a hook call using the given calldata on the given hook that doesn't return a delta\n    /// @return result The complete data returned by the hook\n    function callHook(IHooks self, bytes memory data) internal returns (bytes memory result) {\n        bool success;\n        assembly (\"memory-safe\") {\n            success := call(gas(), self, 0, add(data, 0x20), mload(data), 0, 0)\n        }\n        // Revert with FailedHookCall, containing any error message to bubble up\n        if (!success) CustomRevert.bubbleUpAndRevertWith(address(self), bytes4(data), HookCallFailed.selector);\n\n        // The call was successful, fetch the returned data\n        assembly (\"memory-safe\") {\n            // allocate result byte array from the free memory pointer\n            result := mload(0x40)\n            // store new free memory pointer at the end of the array padded to 32 bytes\n            mstore(0x40, add(result, and(add(returndatasize(), 0x3f), not(0x1f))))\n            // store length in memory\n            mstore(result, returndatasize())\n            // copy return data to result\n            returndatacopy(add(result, 0x20), 0, returndatasize())\n        }\n\n        // Length must be at least 32 to contain the selector. Check expected selector and returned selector match.\n        if (result.length < 32 || result.parseSelector() != data.parseSelector()) {\n            InvalidHookResponse.selector.revertWith();\n        }\n    }\n\n    /// @notice performs a hook call using the given calldata on the given hook\n    /// @return int256 The delta returned by the hook\n    function callHookWithReturnDelta(IHooks self, bytes memory data, bool parseReturn) internal returns (int256) {\n        bytes memory result = callHook(self, data);\n\n        // If this hook wasn't meant to return something, default to 0 delta\n        if (!parseReturn) return 0;\n\n        // A length of 64 bytes is required to return a bytes4, and a 32 byte delta\n        if (result.length != 64) InvalidHookResponse.selector.revertWith();\n        return result.parseReturnDelta();\n    }\n\n    /// @notice modifier to prevent calling a hook if they initiated the action\n    modifier noSelfCall(IHooks self) {\n        if (msg.sender != address(self)) {\n            _;\n        }\n    }\n\n    /// @notice calls beforeInitialize hook if permissioned and validates return value\n    function beforeInitialize(IHooks self, PoolKey memory key, uint160 sqrtPriceX96) internal noSelfCall(self) {\n        if (self.hasPermission(BEFORE_INITIALIZE_FLAG)) {\n            self.callHook(abi.encodeCall(IHooks.beforeInitialize, (msg.sender, key, sqrtPriceX96)));\n        }\n    }\n\n    /// @notice calls afterInitialize hook if permissioned and validates return value\n    function afterInitialize(IHooks self, PoolKey memory key, uint160 sqrtPriceX96, int24 tick)\n        internal\n        noSelfCall(self)\n    {\n        if (self.hasPermission(AFTER_INITIALIZE_FLAG)) {\n            self.callHook(abi.encodeCall(IHooks.afterInitialize, (msg.sender, key, sqrtPriceX96, tick)));\n        }\n    }\n\n    /// @notice calls beforeModifyLiquidity hook if permissioned and validates return value\n    function beforeModifyLiquidity(\n        IHooks self,\n        PoolKey memory key,\n        ModifyLiquidityParams memory params,\n        bytes calldata hookData\n    ) internal noSelfCall(self) {\n        if (params.liquidityDelta > 0 && self.hasPermission(BEFORE_ADD_LIQUIDITY_FLAG)) {\n            self.callHook(abi.encodeCall(IHooks.beforeAddLiquidity, (msg.sender, key, params, hookData)));\n        } else if (params.liquidityDelta <= 0 && self.hasPermission(BEFORE_REMOVE_LIQUIDITY_FLAG)) {\n            self.callHook(abi.encodeCall(IHooks.beforeRemoveLiquidity, (msg.sender, key, params, hookData)));\n        }\n    }\n\n    /// @notice calls afterModifyLiquidity hook if permissioned and validates return value\n    function afterModifyLiquidity(\n        IHooks self,\n        PoolKey memory key,\n        ModifyLiquidityParams memory params,\n        BalanceDelta delta,\n        BalanceDelta feesAccrued,\n        bytes calldata hookData\n    ) internal returns (BalanceDelta callerDelta, BalanceDelta hookDelta) {\n        if (msg.sender == address(self)) return (delta, BalanceDeltaLibrary.ZERO_DELTA);\n\n        callerDelta = delta;\n        if (params.liquidityDelta > 0) {\n            if (self.hasPermission(AFTER_ADD_LIQUIDITY_FLAG)) {\n                hookDelta = BalanceDelta.wrap(\n                    self.callHookWithReturnDelta(\n                        abi.encodeCall(\n                            IHooks.afterAddLiquidity, (msg.sender, key, params, delta, feesAccrued, hookData)\n                        ),\n                        self.hasPermission(AFTER_ADD_LIQUIDITY_RETURNS_DELTA_FLAG)\n                    )\n                );\n                callerDelta = callerDelta - hookDelta;\n            }\n        } else {\n            if (self.hasPermission(AFTER_REMOVE_LIQUIDITY_FLAG)) {\n                hookDelta = BalanceDelta.wrap(\n                    self.callHookWithReturnDelta(\n                        abi.encodeCall(\n                            IHooks.afterRemoveLiquidity, (msg.sender, key, params, delta, feesAccrued, hookData)\n                        ),\n                        self.hasPermission(AFTER_REMOVE_LIQUIDITY_RETURNS_DELTA_FLAG)\n                    )\n                );\n                callerDelta = callerDelta - hookDelta;\n            }\n        }\n    }\n\n    /// @notice calls beforeSwap hook if permissioned and validates return value\n    function beforeSwap(IHooks self, PoolKey memory key, SwapParams memory params, bytes calldata hookData)\n        internal\n        returns (int256 amountToSwap, BeforeSwapDelta hookReturn, uint24 lpFeeOverride)\n    {\n        amountToSwap = params.amountSpecified;\n        if (msg.sender == address(self)) return (amountToSwap, BeforeSwapDeltaLibrary.ZERO_DELTA, lpFeeOverride);\n\n        if (self.hasPermission(BEFORE_SWAP_FLAG)) {\n            bytes memory result = callHook(self, abi.encodeCall(IHooks.beforeSwap, (msg.sender, key, params, hookData)));\n\n            // A length of 96 bytes is required to return a bytes4, a 32 byte delta, and an LP fee\n            if (result.length != 96) InvalidHookResponse.selector.revertWith();\n\n            // dynamic fee pools that want to override the cache fee, return a valid fee with the override flag. If override flag\n            // is set but an invalid fee is returned, the transaction will revert. Otherwise the current LP fee will be used\n            if (key.fee.isDynamicFee()) lpFeeOverride = result.parseFee();\n\n            // skip this logic for the case where the hook return is 0\n            if (self.hasPermission(BEFORE_SWAP_RETURNS_DELTA_FLAG)) {\n                hookReturn = BeforeSwapDelta.wrap(result.parseReturnDelta());\n\n                // any return in unspecified is passed to the afterSwap hook for handling\n                int128 hookDeltaSpecified = hookReturn.getSpecifiedDelta();\n\n                // Update the swap amount according to the hook's return, and check that the swap type doesn't change (exact input/output)\n                if (hookDeltaSpecified != 0) {\n                    bool exactInput = amountToSwap < 0;\n                    amountToSwap += hookDeltaSpecified;\n                    if (exactInput ? amountToSwap > 0 : amountToSwap < 0) {\n                        HookDeltaExceedsSwapAmount.selector.revertWith();\n                    }\n                }\n            }\n        }\n    }\n\n    /// @notice calls afterSwap hook if permissioned and validates return value\n    function afterSwap(\n        IHooks self,\n        PoolKey memory key,\n        SwapParams memory params,\n        BalanceDelta swapDelta,\n        bytes calldata hookData,\n        BeforeSwapDelta beforeSwapHookReturn\n    ) internal returns (BalanceDelta, BalanceDelta) {\n        if (msg.sender == address(self)) return (swapDelta, BalanceDeltaLibrary.ZERO_DELTA);\n\n        int128 hookDeltaSpecified = beforeSwapHookReturn.getSpecifiedDelta();\n        int128 hookDeltaUnspecified = beforeSwapHookReturn.getUnspecifiedDelta();\n\n        if (self.hasPermission(AFTER_SWAP_FLAG)) {\n            hookDeltaUnspecified += self.callHookWithReturnDelta(\n                abi.encodeCall(IHooks.afterSwap, (msg.sender, key, params, swapDelta, hookData)),\n                self.hasPermission(AFTER_SWAP_RETURNS_DELTA_FLAG)\n            ).toInt128();\n        }\n\n        BalanceDelta hookDelta;\n        if (hookDeltaUnspecified != 0 || hookDeltaSpecified != 0) {\n            hookDelta = (params.amountSpecified < 0 == params.zeroForOne)\n                ? toBalanceDelta(hookDeltaSpecified, hookDeltaUnspecified)\n                : toBalanceDelta(hookDeltaUnspecified, hookDeltaSpecified);\n\n            // the caller has to pay for (or receive) the hook's delta\n            swapDelta = swapDelta - hookDelta;\n        }\n        return (swapDelta, hookDelta);\n    }\n\n    /// @notice calls beforeDonate hook if permissioned and validates return value\n    function beforeDonate(IHooks self, PoolKey memory key, uint256 amount0, uint256 amount1, bytes calldata hookData)\n        internal\n        noSelfCall(self)\n    {\n        if (self.hasPermission(BEFORE_DONATE_FLAG)) {\n            self.callHook(abi.encodeCall(IHooks.beforeDonate, (msg.sender, key, amount0, amount1, hookData)));\n        }\n    }\n\n    /// @notice calls afterDonate hook if permissioned and validates return value\n    function afterDonate(IHooks self, PoolKey memory key, uint256 amount0, uint256 amount1, bytes calldata hookData)\n        internal\n        noSelfCall(self)\n    {\n        if (self.hasPermission(AFTER_DONATE_FLAG)) {\n            self.callHook(abi.encodeCall(IHooks.afterDonate, (msg.sender, key, amount0, amount1, hookData)));\n        }\n    }\n\n    function hasPermission(IHooks self, uint160 flag) internal pure returns (bool) {\n        return uint160(address(self)) & flag != 0;\n    }\n}\n"},"lib/v4-core/src/interfaces/IHooks.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {PoolKey} from \"../types/PoolKey.sol\";\nimport {BalanceDelta} from \"../types/BalanceDelta.sol\";\nimport {ModifyLiquidityParams, SwapParams} from \"../types/PoolOperation.sol\";\nimport {BeforeSwapDelta} from \"../types/BeforeSwapDelta.sol\";\n\n/// @notice V4 decides whether to invoke specific hooks by inspecting the least significant bits\n/// of the address that the hooks contract is deployed to.\n/// For example, a hooks contract deployed to address: 0x0000000000000000000000000000000000002400\n/// has the lowest bits '10 0100 0000 0000' which would cause the 'before initialize' and 'after add liquidity' hooks to be used.\n/// See the Hooks library for the full spec.\n/// @dev Should only be callable by the v4 PoolManager.\ninterface IHooks {\n    /// @notice The hook called before the state of a pool is initialized\n    /// @param sender The initial msg.sender for the initialize call\n    /// @param key The key for the pool being initialized\n    /// @param sqrtPriceX96 The sqrt(price) of the pool as a Q64.96\n    /// @return bytes4 The function selector for the hook\n    function beforeInitialize(address sender, PoolKey calldata key, uint160 sqrtPriceX96) external returns (bytes4);\n\n    /// @notice The hook called after the state of a pool is initialized\n    /// @param sender The initial msg.sender for the initialize call\n    /// @param key The key for the pool being initialized\n    /// @param sqrtPriceX96 The sqrt(price) of the pool as a Q64.96\n    /// @param tick The current tick after the state of a pool is initialized\n    /// @return bytes4 The function selector for the hook\n    function afterInitialize(address sender, PoolKey calldata key, uint160 sqrtPriceX96, int24 tick)\n        external\n        returns (bytes4);\n\n    /// @notice The hook called before liquidity is added\n    /// @param sender The initial msg.sender for the add liquidity call\n    /// @param key The key for the pool\n    /// @param params The parameters for adding liquidity\n    /// @param hookData Arbitrary data handed into the PoolManager by the liquidity provider to be passed on to the hook\n    /// @return bytes4 The function selector for the hook\n    function beforeAddLiquidity(\n        address sender,\n        PoolKey calldata key,\n        ModifyLiquidityParams calldata params,\n        bytes calldata hookData\n    ) external returns (bytes4);\n\n    /// @notice The hook called after liquidity is added\n    /// @param sender The initial msg.sender for the add liquidity call\n    /// @param key The key for the pool\n    /// @param params The parameters for adding liquidity\n    /// @param delta The caller's balance delta after adding liquidity; the sum of principal delta, fees accrued, and hook delta\n    /// @param feesAccrued The fees accrued since the last time fees were collected from this position\n    /// @param hookData Arbitrary data handed into the PoolManager by the liquidity provider to be passed on to the hook\n    /// @return bytes4 The function selector for the hook\n    /// @return BalanceDelta The hook's delta in token0 and token1. Positive: the hook is owed/took currency, negative: the hook owes/sent currency\n    function afterAddLiquidity(\n        address sender,\n        PoolKey calldata key,\n        ModifyLiquidityParams calldata params,\n        BalanceDelta delta,\n        BalanceDelta feesAccrued,\n        bytes calldata hookData\n    ) external returns (bytes4, BalanceDelta);\n\n    /// @notice The hook called before liquidity is removed\n    /// @param sender The initial msg.sender for the remove liquidity call\n    /// @param key The key for the pool\n    /// @param params The parameters for removing liquidity\n    /// @param hookData Arbitrary data handed into the PoolManager by the liquidity provider to be be passed on to the hook\n    /// @return bytes4 The function selector for the hook\n    function beforeRemoveLiquidity(\n        address sender,\n        PoolKey calldata key,\n        ModifyLiquidityParams calldata params,\n        bytes calldata hookData\n    ) external returns (bytes4);\n\n    /// @notice The hook called after liquidity is removed\n    /// @param sender The initial msg.sender for the remove liquidity call\n    /// @param key The key for the pool\n    /// @param params The parameters for removing liquidity\n    /// @param delta The caller's balance delta after removing liquidity; the sum of principal delta, fees accrued, and hook delta\n    /// @param feesAccrued The fees accrued since the last time fees were collected from this position\n    /// @param hookData Arbitrary data handed into the PoolManager by the liquidity provider to be be passed on to the hook\n    /// @return bytes4 The function selector for the hook\n    /// @return BalanceDelta The hook's delta in token0 and token1. Positive: the hook is owed/took currency, negative: the hook owes/sent currency\n    function afterRemoveLiquidity(\n        address sender,\n        PoolKey calldata key,\n        ModifyLiquidityParams calldata params,\n        BalanceDelta delta,\n        BalanceDelta feesAccrued,\n        bytes calldata hookData\n    ) external returns (bytes4, BalanceDelta);\n\n    /// @notice The hook called before a swap\n    /// @param sender The initial msg.sender for the swap call\n    /// @param key The key for the pool\n    /// @param params The parameters for the swap\n    /// @param hookData Arbitrary data handed into the PoolManager by the swapper to be be passed on to the hook\n    /// @return bytes4 The function selector for the hook\n    /// @return BeforeSwapDelta The hook's delta in specified and unspecified currencies. Positive: the hook is owed/took currency, negative: the hook owes/sent currency\n    /// @return uint24 Optionally override the lp fee, only used if three conditions are met: 1. the Pool has a dynamic fee, 2. the value's 2nd highest bit is set (23rd bit, 0x400000), and 3. the value is less than or equal to the maximum fee (1 million)\n    function beforeSwap(address sender, PoolKey calldata key, SwapParams calldata params, bytes calldata hookData)\n        external\n        returns (bytes4, BeforeSwapDelta, uint24);\n\n    /// @notice The hook called after a swap\n    /// @param sender The initial msg.sender for the swap call\n    /// @param key The key for the pool\n    /// @param params The parameters for the swap\n    /// @param delta The amount owed to the caller (positive) or owed to the pool (negative)\n    /// @param hookData Arbitrary data handed into the PoolManager by the swapper to be be passed on to the hook\n    /// @return bytes4 The function selector for the hook\n    /// @return int128 The hook's delta in unspecified currency. Positive: the hook is owed/took currency, negative: the hook owes/sent currency\n    function afterSwap(\n        address sender,\n        PoolKey calldata key,\n        SwapParams calldata params,\n        BalanceDelta delta,\n        bytes calldata hookData\n    ) external returns (bytes4, int128);\n\n    /// @notice The hook called before donate\n    /// @param sender The initial msg.sender for the donate call\n    /// @param key The key for the pool\n    /// @param amount0 The amount of token0 being donated\n    /// @param amount1 The amount of token1 being donated\n    /// @param hookData Arbitrary data handed into the PoolManager by the donor to be be passed on to the hook\n    /// @return bytes4 The function selector for the hook\n    function beforeDonate(\n        address sender,\n        PoolKey calldata key,\n        uint256 amount0,\n        uint256 amount1,\n        bytes calldata hookData\n    ) external returns (bytes4);\n\n    /// @notice The hook called after donate\n    /// @param sender The initial msg.sender for the donate call\n    /// @param key The key for the pool\n    /// @param amount0 The amount of token0 being donated\n    /// @param amount1 The amount of token1 being donated\n    /// @param hookData Arbitrary data handed into the PoolManager by the donor to be be passed on to the hook\n    /// @return bytes4 The function selector for the hook\n    function afterDonate(\n        address sender,\n        PoolKey calldata key,\n        uint256 amount0,\n        uint256 amount1,\n        bytes calldata hookData\n    ) external returns (bytes4);\n}\n"},"src/aggregator-hooks/ProtocolFees.sol":{"content":"// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity ^0.8.0;\n\nimport {IPoolManager} from \"@uniswap/v4-core/src/interfaces/IPoolManager.sol\";\nimport {PoolKey} from \"@uniswap/v4-core/src/types/PoolKey.sol\";\nimport {SwapParams} from \"@uniswap/v4-core/src/types/PoolOperation.sol\";\nimport {Currency} from \"@uniswap/v4-core/src/types/Currency.sol\";\nimport {ProtocolFeeLibrary} from \"@uniswap/v4-core/src/libraries/ProtocolFeeLibrary.sol\";\nimport {PoolId} from \"@uniswap/v4-core/src/types/PoolId.sol\";\nimport {IV4FeeAdapter} from \"@protocol-fees/interfaces/IV4FeeAdapter.sol\";\nimport {PoolIdLibrary} from \"@uniswap/v4-core/src/types/PoolId.sol\";\nimport {StateLibrary} from \"@uniswap/v4-core/src/libraries/StateLibrary.sol\";\nimport {FullMath} from \"@uniswap/v4-core/src/libraries/FullMath.sol\";\n\nabstract contract ProtocolFees {\n    using ProtocolFeeLibrary for uint24;\n    using PoolIdLibrary for PoolKey;\n    using StateLibrary for IPoolManager;\n\n    address public tokenJar;\n    uint24 public immutable protocolFeeMultiplier;\n\n    constructor(uint24 _protocolFeeMultiplier) {\n        protocolFeeMultiplier = _protocolFeeMultiplier;\n    }\n\n    event ProtocolFeesCollected(address indexed recipient, Currency indexed currency, uint256 amount);\n\n    /// @notice Queries the token jar from the pool manager and emits an event if it is updated\n    /// @return The token jar address\n    /// @dev This function should not need to be called externally except in the case of the tokenJar address changing\n    /// after the protocol fee has been set\n    function pollTokenJar() public virtual returns (address);\n\n    function _applyProtocolFee(\n        IPoolManager poolManager,\n        PoolKey calldata key,\n        SwapParams calldata params,\n        int128 unspecifiedDelta\n    ) internal returns (int128) {\n        uint24 protocolFee = _getProtocolFee(poolManager, params.zeroForOne, key.toId());\n        return _applyWithProtocolFee(poolManager, key, params, unspecifiedDelta, protocolFee);\n    }\n\n    function _applyWithProtocolFee(\n        IPoolManager poolManager,\n        PoolKey calldata key,\n        SwapParams calldata params,\n        int128 unspecifiedDelta,\n        uint24 protocolFee\n    ) internal returns (int128) {\n        if (protocolFee == 0) return 0;\n        // Assumes that if a protocol fee is set, there should be a token jar.\n        if (tokenJar == address(0)) pollTokenJar();\n        if (tokenJar == address(0)) return 0;\n\n        bool isExactInput = params.amountSpecified < 0;\n\n        // Determine the unspecified currency (the side protocol fee is taken from)\n        Currency unspecifiedCurrency = params.zeroForOne == isExactInput ? key.currency1 : key.currency0;\n\n        uint256 absUnspecified = uint256(uint128(unspecifiedDelta < 0 ? -unspecifiedDelta : unspecifiedDelta));\n        uint256 protocolFeeAmount = _calculateProtocolFeeAmount(protocolFee, params.amountSpecified < 0, absUnspecified);\n\n        // Send the protocol fee to the token jar\n        emit ProtocolFeesCollected(tokenJar, unspecifiedCurrency, protocolFeeAmount);\n        poolManager.take(unspecifiedCurrency, tokenJar, protocolFeeAmount);\n\n        return int128(uint128(protocolFeeAmount));\n    }\n\n    function _calculateProtocolFeeAmount(uint24 protocolFee, bool isExactInput, uint256 amountUnspecified)\n        internal\n        pure\n        returns (uint256)\n    {\n        if (isExactInput) {\n            return FullMath.mulDivRoundingUp(amountUnspecified, protocolFee, ProtocolFeeLibrary.PIPS_DENOMINATOR);\n        } else {\n            // This calculation ensures the fee is the correct proportion of the total input.\n            // For a protocol fee of X%, the fee amount will be X% of the total input rather than X%\n            // of the pre-protocol fee input.\n            return FullMath.mulDivRoundingUp(\n                amountUnspecified, protocolFee, ProtocolFeeLibrary.PIPS_DENOMINATOR - protocolFee\n            );\n        }\n    }\n\n    /// @dev The protocol fee is multiplied by the protocol fee multiplier\n    function _getProtocolFee(IPoolManager poolManager, bool zeroToOne, PoolId poolId)\n        internal\n        view\n        returns (uint24 protocolFee)\n    {\n        (,, uint24 protocolFeeRaw,) = poolManager.getSlot0(poolId);\n        protocolFee = zeroToOne\n            ? ProtocolFeeLibrary.getZeroForOneFee(protocolFeeRaw)\n            : ProtocolFeeLibrary.getOneForZeroFee(protocolFeeRaw);\n        protocolFee *= protocolFeeMultiplier;\n    }\n\n    function _getTokenJar(IPoolManager poolManager) internal view returns (address currentJar) {\n        address protocolFeeAdapterAddress = poolManager.protocolFeeController();\n        if (protocolFeeAdapterAddress == address(0) || protocolFeeAdapterAddress.code.length == 0) return address(0);\n        try IV4FeeAdapter(protocolFeeAdapterAddress).TOKEN_JAR() returns (address _currentJar) {\n            currentJar = _currentJar;\n        } catch {\n            // keep currentJar as address(0)\n        }\n    }\n}\n"},"lib/v4-core/src/libraries/FullMath.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n/// @title Contains 512-bit math functions\n/// @notice Facilitates multiplication and division that can have overflow of an intermediate value without any loss of precision\n/// @dev Handles \"phantom overflow\" i.e., allows multiplication and division where an intermediate value overflows 256 bits\nlibrary FullMath {\n    /// @notice Calculates floor(a×b÷denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\n    /// @param a The multiplicand\n    /// @param b The multiplier\n    /// @param denominator The divisor\n    /// @return result The 256-bit result\n    /// @dev Credit to Remco Bloemen under MIT license https://xn--2-umb.com/21/muldiv\n    function mulDiv(uint256 a, uint256 b, uint256 denominator) internal pure returns (uint256 result) {\n        unchecked {\n            // 512-bit multiply [prod1 prod0] = a * b\n            // Compute the product mod 2**256 and mod 2**256 - 1\n            // then use the Chinese Remainder Theorem to reconstruct\n            // the 512 bit result. The result is stored in two 256\n            // variables such that product = prod1 * 2**256 + prod0\n            uint256 prod0 = a * b; // Least significant 256 bits of the product\n            uint256 prod1; // Most significant 256 bits of the product\n            assembly (\"memory-safe\") {\n                let mm := mulmod(a, b, not(0))\n                prod1 := sub(sub(mm, prod0), lt(mm, prod0))\n            }\n\n            // Make sure the result is less than 2**256.\n            // Also prevents denominator == 0\n            require(denominator > prod1);\n\n            // Handle non-overflow cases, 256 by 256 division\n            if (prod1 == 0) {\n                assembly (\"memory-safe\") {\n                    result := div(prod0, denominator)\n                }\n                return result;\n            }\n\n            ///////////////////////////////////////////////\n            // 512 by 256 division.\n            ///////////////////////////////////////////////\n\n            // Make division exact by subtracting the remainder from [prod1 prod0]\n            // Compute remainder using mulmod\n            uint256 remainder;\n            assembly (\"memory-safe\") {\n                remainder := mulmod(a, b, denominator)\n            }\n            // Subtract 256 bit number from 512 bit number\n            assembly (\"memory-safe\") {\n                prod1 := sub(prod1, gt(remainder, prod0))\n                prod0 := sub(prod0, remainder)\n            }\n\n            // Factor powers of two out of denominator\n            // Compute largest power of two divisor of denominator.\n            // Always >= 1.\n            uint256 twos = (0 - denominator) & denominator;\n            // Divide denominator by power of two\n            assembly (\"memory-safe\") {\n                denominator := div(denominator, twos)\n            }\n\n            // Divide [prod1 prod0] by the factors of two\n            assembly (\"memory-safe\") {\n                prod0 := div(prod0, twos)\n            }\n            // Shift in bits from prod1 into prod0. For this we need\n            // to flip `twos` such that it is 2**256 / twos.\n            // If twos is zero, then it becomes one\n            assembly (\"memory-safe\") {\n                twos := add(div(sub(0, twos), twos), 1)\n            }\n            prod0 |= prod1 * twos;\n\n            // Invert denominator mod 2**256\n            // Now that denominator is an odd number, it has an inverse\n            // modulo 2**256 such that denominator * inv = 1 mod 2**256.\n            // Compute the inverse by starting with a seed that is correct\n            // correct for four bits. That is, denominator * inv = 1 mod 2**4\n            uint256 inv = (3 * denominator) ^ 2;\n            // Now use Newton-Raphson iteration to improve the precision.\n            // Thanks to Hensel's lifting lemma, this also works in modular\n            // arithmetic, doubling the correct bits in each step.\n            inv *= 2 - denominator * inv; // inverse mod 2**8\n            inv *= 2 - denominator * inv; // inverse mod 2**16\n            inv *= 2 - denominator * inv; // inverse mod 2**32\n            inv *= 2 - denominator * inv; // inverse mod 2**64\n            inv *= 2 - denominator * inv; // inverse mod 2**128\n            inv *= 2 - denominator * inv; // inverse mod 2**256\n\n            // Because the division is now exact we can divide by multiplying\n            // with the modular inverse of denominator. This will give us the\n            // correct result modulo 2**256. Since the preconditions guarantee\n            // that the outcome is less than 2**256, this is the final result.\n            // We don't need to compute the high bits of the result and prod1\n            // is no longer required.\n            result = prod0 * inv;\n            return result;\n        }\n    }\n\n    /// @notice Calculates ceil(a×b÷denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\n    /// @param a The multiplicand\n    /// @param b The multiplier\n    /// @param denominator The divisor\n    /// @return result The 256-bit result\n    function mulDivRoundingUp(uint256 a, uint256 b, uint256 denominator) internal pure returns (uint256 result) {\n        unchecked {\n            result = mulDiv(a, b, denominator);\n            if (mulmod(a, b, denominator) != 0) {\n                require(++result > 0);\n            }\n        }\n    }\n}\n"},"lib/v4-core/src/libraries/Position.sol":{"content":"// SPDX-License-Identifier: BUSL-1.1\npragma solidity ^0.8.0;\n\nimport {FullMath} from \"./FullMath.sol\";\nimport {FixedPoint128} from \"./FixedPoint128.sol\";\nimport {LiquidityMath} from \"./LiquidityMath.sol\";\nimport {CustomRevert} from \"./CustomRevert.sol\";\n\n/// @title Position\n/// @notice Positions represent an owner address' liquidity between a lower and upper tick boundary\n/// @dev Positions store additional state for tracking fees owed to the position\nlibrary Position {\n    using CustomRevert for bytes4;\n\n    /// @notice Cannot update a position with no liquidity\n    error CannotUpdateEmptyPosition();\n\n    // info stored for each user's position\n    struct State {\n        // the amount of liquidity owned by this position\n        uint128 liquidity;\n        // fee growth per unit of liquidity as of the last update to liquidity or fees owed\n        uint256 feeGrowthInside0LastX128;\n        uint256 feeGrowthInside1LastX128;\n    }\n\n    /// @notice Returns the State struct of a position, given an owner and position boundaries\n    /// @param self The mapping containing all user positions\n    /// @param owner The address of the position owner\n    /// @param tickLower The lower tick boundary of the position\n    /// @param tickUpper The upper tick boundary of the position\n    /// @param salt A unique value to differentiate between multiple positions in the same range\n    /// @return position The position info struct of the given owners' position\n    function get(mapping(bytes32 => State) storage self, address owner, int24 tickLower, int24 tickUpper, bytes32 salt)\n        internal\n        view\n        returns (State storage position)\n    {\n        bytes32 positionKey = calculatePositionKey(owner, tickLower, tickUpper, salt);\n        position = self[positionKey];\n    }\n\n    /// @notice A helper function to calculate the position key\n    /// @param owner The address of the position owner\n    /// @param tickLower the lower tick boundary of the position\n    /// @param tickUpper the upper tick boundary of the position\n    /// @param salt A unique value to differentiate between multiple positions in the same range, by the same owner. Passed in by the caller.\n    function calculatePositionKey(address owner, int24 tickLower, int24 tickUpper, bytes32 salt)\n        internal\n        pure\n        returns (bytes32 positionKey)\n    {\n        // positionKey = keccak256(abi.encodePacked(owner, tickLower, tickUpper, salt))\n        assembly (\"memory-safe\") {\n            let fmp := mload(0x40)\n            mstore(add(fmp, 0x26), salt) // [0x26, 0x46)\n            mstore(add(fmp, 0x06), tickUpper) // [0x23, 0x26)\n            mstore(add(fmp, 0x03), tickLower) // [0x20, 0x23)\n            mstore(fmp, owner) // [0x0c, 0x20)\n            positionKey := keccak256(add(fmp, 0x0c), 0x3a) // len is 58 bytes\n\n            // now clean the memory we used\n            mstore(add(fmp, 0x40), 0) // fmp+0x40 held salt\n            mstore(add(fmp, 0x20), 0) // fmp+0x20 held tickLower, tickUpper, salt\n            mstore(fmp, 0) // fmp held owner\n        }\n    }\n\n    /// @notice Credits accumulated fees to a user's position\n    /// @param self The individual position to update\n    /// @param liquidityDelta The change in pool liquidity as a result of the position update\n    /// @param feeGrowthInside0X128 The all-time fee growth in currency0, per unit of liquidity, inside the position's tick boundaries\n    /// @param feeGrowthInside1X128 The all-time fee growth in currency1, per unit of liquidity, inside the position's tick boundaries\n    /// @return feesOwed0 The amount of currency0 owed to the position owner\n    /// @return feesOwed1 The amount of currency1 owed to the position owner\n    function update(\n        State storage self,\n        int128 liquidityDelta,\n        uint256 feeGrowthInside0X128,\n        uint256 feeGrowthInside1X128\n    ) internal returns (uint256 feesOwed0, uint256 feesOwed1) {\n        uint128 liquidity = self.liquidity;\n\n        if (liquidityDelta == 0) {\n            // disallow pokes for 0 liquidity positions\n            if (liquidity == 0) CannotUpdateEmptyPosition.selector.revertWith();\n        } else {\n            self.liquidity = LiquidityMath.addDelta(liquidity, liquidityDelta);\n        }\n\n        // calculate accumulated fees. overflow in the subtraction of fee growth is expected\n        unchecked {\n            feesOwed0 =\n                FullMath.mulDiv(feeGrowthInside0X128 - self.feeGrowthInside0LastX128, liquidity, FixedPoint128.Q128);\n            feesOwed1 =\n                FullMath.mulDiv(feeGrowthInside1X128 - self.feeGrowthInside1LastX128, liquidity, FixedPoint128.Q128);\n        }\n\n        // update the position\n        self.feeGrowthInside0LastX128 = feeGrowthInside0X128;\n        self.feeGrowthInside1LastX128 = feeGrowthInside1X128;\n    }\n}\n"},"lib/v4-core/src/libraries/SafeCast.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {CustomRevert} from \"./CustomRevert.sol\";\n\n/// @title Safe casting methods\n/// @notice Contains methods for safely casting between types\nlibrary SafeCast {\n    using CustomRevert for bytes4;\n\n    error SafeCastOverflow();\n\n    /// @notice Cast a uint256 to a uint160, revert on overflow\n    /// @param x The uint256 to be downcasted\n    /// @return y The downcasted integer, now type uint160\n    function toUint160(uint256 x) internal pure returns (uint160 y) {\n        y = uint160(x);\n        if (y != x) SafeCastOverflow.selector.revertWith();\n    }\n\n    /// @notice Cast a uint256 to a uint128, revert on overflow\n    /// @param x The uint256 to be downcasted\n    /// @return y The downcasted integer, now type uint128\n    function toUint128(uint256 x) internal pure returns (uint128 y) {\n        y = uint128(x);\n        if (x != y) SafeCastOverflow.selector.revertWith();\n    }\n\n    /// @notice Cast a int128 to a uint128, revert on overflow or underflow\n    /// @param x The int128 to be casted\n    /// @return y The casted integer, now type uint128\n    function toUint128(int128 x) internal pure returns (uint128 y) {\n        if (x < 0) SafeCastOverflow.selector.revertWith();\n        y = uint128(x);\n    }\n\n    /// @notice Cast a int256 to a int128, revert on overflow or underflow\n    /// @param x The int256 to be downcasted\n    /// @return y The downcasted integer, now type int128\n    function toInt128(int256 x) internal pure returns (int128 y) {\n        y = int128(x);\n        if (y != x) SafeCastOverflow.selector.revertWith();\n    }\n\n    /// @notice Cast a uint256 to a int256, revert on overflow\n    /// @param x The uint256 to be casted\n    /// @return y The casted integer, now type int256\n    function toInt256(uint256 x) internal pure returns (int256 y) {\n        y = int256(x);\n        if (y < 0) SafeCastOverflow.selector.revertWith();\n    }\n\n    /// @notice Cast a uint256 to a int128, revert on overflow\n    /// @param x The uint256 to be downcasted\n    /// @return The downcasted integer, now type int128\n    function toInt128(uint256 x) internal pure returns (int128) {\n        if (x >= 1 << 127) SafeCastOverflow.selector.revertWith();\n        return int128(int256(x));\n    }\n}\n"},"lib/v4-core/src/types/BalanceDelta.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {SafeCast} from \"../libraries/SafeCast.sol\";\n\n/// @dev Two `int128` values packed into a single `int256` where the upper 128 bits represent the amount0\n/// and the lower 128 bits represent the amount1.\ntype BalanceDelta is int256;\n\nusing {add as +, sub as -, eq as ==, neq as !=} for BalanceDelta global;\nusing BalanceDeltaLibrary for BalanceDelta global;\nusing SafeCast for int256;\n\nfunction toBalanceDelta(int128 _amount0, int128 _amount1) pure returns (BalanceDelta balanceDelta) {\n    assembly (\"memory-safe\") {\n        balanceDelta := or(shl(128, _amount0), and(sub(shl(128, 1), 1), _amount1))\n    }\n}\n\nfunction add(BalanceDelta a, BalanceDelta b) pure returns (BalanceDelta) {\n    int256 res0;\n    int256 res1;\n    assembly (\"memory-safe\") {\n        let a0 := sar(128, a)\n        let a1 := signextend(15, a)\n        let b0 := sar(128, b)\n        let b1 := signextend(15, b)\n        res0 := add(a0, b0)\n        res1 := add(a1, b1)\n    }\n    return toBalanceDelta(res0.toInt128(), res1.toInt128());\n}\n\nfunction sub(BalanceDelta a, BalanceDelta b) pure returns (BalanceDelta) {\n    int256 res0;\n    int256 res1;\n    assembly (\"memory-safe\") {\n        let a0 := sar(128, a)\n        let a1 := signextend(15, a)\n        let b0 := sar(128, b)\n        let b1 := signextend(15, b)\n        res0 := sub(a0, b0)\n        res1 := sub(a1, b1)\n    }\n    return toBalanceDelta(res0.toInt128(), res1.toInt128());\n}\n\nfunction eq(BalanceDelta a, BalanceDelta b) pure returns (bool) {\n    return BalanceDelta.unwrap(a) == BalanceDelta.unwrap(b);\n}\n\nfunction neq(BalanceDelta a, BalanceDelta b) pure returns (bool) {\n    return BalanceDelta.unwrap(a) != BalanceDelta.unwrap(b);\n}\n\n/// @notice Library for getting the amount0 and amount1 deltas from the BalanceDelta type\nlibrary BalanceDeltaLibrary {\n    /// @notice A BalanceDelta of 0\n    BalanceDelta public constant ZERO_DELTA = BalanceDelta.wrap(0);\n\n    function amount0(BalanceDelta balanceDelta) internal pure returns (int128 _amount0) {\n        assembly (\"memory-safe\") {\n            _amount0 := sar(128, balanceDelta)\n        }\n    }\n\n    function amount1(BalanceDelta balanceDelta) internal pure returns (int128 _amount1) {\n        assembly (\"memory-safe\") {\n            _amount1 := signextend(15, balanceDelta)\n        }\n    }\n}\n"},"lib/v4-core/src/types/PoolOperation.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.24;\n\nimport {PoolKey} from \"../types/PoolKey.sol\";\nimport {BalanceDelta} from \"../types/BalanceDelta.sol\";\n\n/// @notice Parameter struct for `ModifyLiquidity` pool operations\nstruct ModifyLiquidityParams {\n    // the lower and upper tick of the position\n    int24 tickLower;\n    int24 tickUpper;\n    // how to modify the liquidity\n    int256 liquidityDelta;\n    // a value to set if you want unique liquidity positions at the same range\n    bytes32 salt;\n}\n\n/// @notice Parameter struct for `Swap` pool operations\nstruct SwapParams {\n    /// Whether to swap token0 for token1 or vice versa\n    bool zeroForOne;\n    /// The desired input amount if negative (exactIn), or the desired output amount if positive (exactOut)\n    int256 amountSpecified;\n    /// The sqrt price at which, if reached, the swap will stop executing\n    uint160 sqrtPriceLimitX96;\n}\n"},"lib/v4-core/src/interfaces/IExtsload.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n/// @notice Interface for functions to access any storage slot in a contract\ninterface IExtsload {\n    /// @notice Called by external contracts to access granular pool state\n    /// @param slot Key of slot to sload\n    /// @return value The value of the slot as bytes32\n    function extsload(bytes32 slot) external view returns (bytes32 value);\n\n    /// @notice Called by external contracts to access granular pool state\n    /// @param startSlot Key of slot to start sloading from\n    /// @param nSlots Number of slots to load into return value\n    /// @return values List of loaded values.\n    function extsload(bytes32 startSlot, uint256 nSlots) external view returns (bytes32[] memory values);\n\n    /// @notice Called by external contracts to access sparse pool state\n    /// @param slots List of slots to SLOAD from.\n    /// @return values List of loaded values.\n    function extsload(bytes32[] calldata slots) external view returns (bytes32[] memory values);\n}\n"},"lib/v4-core/src/interfaces/IExttload.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.24;\n\n/// @notice Interface for functions to access any transient storage slot in a contract\ninterface IExttload {\n    /// @notice Called by external contracts to access transient storage of the contract\n    /// @param slot Key of slot to tload\n    /// @return value The value of the slot as bytes32\n    function exttload(bytes32 slot) external view returns (bytes32 value);\n\n    /// @notice Called by external contracts to access sparse transient pool state\n    /// @param slots List of slots to tload\n    /// @return values List of loaded values\n    function exttload(bytes32[] calldata slots) external view returns (bytes32[] memory values);\n}\n"},"lib/v4-core/src/libraries/ParseBytes.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/// @notice Parses bytes returned from hooks and the byte selector used to check return selectors from hooks.\n/// @dev parseSelector also is used to parse the expected selector\n/// For parsing hook returns, note that all hooks return either bytes4 or (bytes4, 32-byte-delta) or (bytes4, 32-byte-delta, uint24).\nlibrary ParseBytes {\n    function parseSelector(bytes memory result) internal pure returns (bytes4 selector) {\n        // equivalent: (selector,) = abi.decode(result, (bytes4, int256));\n        assembly (\"memory-safe\") {\n            selector := mload(add(result, 0x20))\n        }\n    }\n\n    function parseFee(bytes memory result) internal pure returns (uint24 lpFee) {\n        // equivalent: (,, lpFee) = abi.decode(result, (bytes4, int256, uint24));\n        assembly (\"memory-safe\") {\n            lpFee := mload(add(result, 0x60))\n        }\n    }\n\n    function parseReturnDelta(bytes memory result) internal pure returns (int256 hookReturn) {\n        // equivalent: (, hookReturnDelta) = abi.decode(result, (bytes4, int256));\n        assembly (\"memory-safe\") {\n            hookReturn := mload(add(result, 0x40))\n        }\n    }\n}\n"},"lib/v4-core/src/types/BeforeSwapDelta.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n// Return type of the beforeSwap hook.\n// Upper 128 bits is the delta in specified tokens. Lower 128 bits is delta in unspecified tokens (to match the afterSwap hook)\ntype BeforeSwapDelta is int256;\n\n// Creates a BeforeSwapDelta from specified and unspecified\nfunction toBeforeSwapDelta(int128 deltaSpecified, int128 deltaUnspecified)\n    pure\n    returns (BeforeSwapDelta beforeSwapDelta)\n{\n    assembly (\"memory-safe\") {\n        beforeSwapDelta := or(shl(128, deltaSpecified), and(sub(shl(128, 1), 1), deltaUnspecified))\n    }\n}\n\n/// @notice Library for getting the specified and unspecified deltas from the BeforeSwapDelta type\nlibrary BeforeSwapDeltaLibrary {\n    /// @notice A BeforeSwapDelta of 0\n    BeforeSwapDelta public constant ZERO_DELTA = BeforeSwapDelta.wrap(0);\n\n    /// extracts int128 from the upper 128 bits of the BeforeSwapDelta\n    /// returned by beforeSwap\n    function getSpecifiedDelta(BeforeSwapDelta delta) internal pure returns (int128 deltaSpecified) {\n        assembly (\"memory-safe\") {\n            deltaSpecified := sar(128, delta)\n        }\n    }\n\n    /// extracts int128 from the lower 128 bits of the BeforeSwapDelta\n    /// returned by beforeSwap and afterSwap\n    function getUnspecifiedDelta(BeforeSwapDelta delta) internal pure returns (int128 deltaUnspecified) {\n        assembly (\"memory-safe\") {\n            deltaUnspecified := signextend(15, delta)\n        }\n    }\n}\n"},"lib/v4-core/src/libraries/CustomRevert.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n/// @title Library for reverting with custom errors efficiently\n/// @notice Contains functions for reverting with custom errors with different argument types efficiently\n/// @dev To use this library, declare `using CustomRevert for bytes4;` and replace `revert CustomError()` with\n/// `CustomError.selector.revertWith()`\n/// @dev The functions may tamper with the free memory pointer but it is fine since the call context is exited immediately\nlibrary CustomRevert {\n    /// @dev ERC-7751 error for wrapping bubbled up reverts\n    error WrappedError(address target, bytes4 selector, bytes reason, bytes details);\n\n    /// @dev Reverts with the selector of a custom error in the scratch space\n    function revertWith(bytes4 selector) internal pure {\n        assembly (\"memory-safe\") {\n            mstore(0, selector)\n            revert(0, 0x04)\n        }\n    }\n\n    /// @dev Reverts with a custom error with an address argument in the scratch space\n    function revertWith(bytes4 selector, address addr) internal pure {\n        assembly (\"memory-safe\") {\n            mstore(0, selector)\n            mstore(0x04, and(addr, 0xffffffffffffffffffffffffffffffffffffffff))\n            revert(0, 0x24)\n        }\n    }\n\n    /// @dev Reverts with a custom error with an int24 argument in the scratch space\n    function revertWith(bytes4 selector, int24 value) internal pure {\n        assembly (\"memory-safe\") {\n            mstore(0, selector)\n            mstore(0x04, signextend(2, value))\n            revert(0, 0x24)\n        }\n    }\n\n    /// @dev Reverts with a custom error with a uint160 argument in the scratch space\n    function revertWith(bytes4 selector, uint160 value) internal pure {\n        assembly (\"memory-safe\") {\n            mstore(0, selector)\n            mstore(0x04, and(value, 0xffffffffffffffffffffffffffffffffffffffff))\n            revert(0, 0x24)\n        }\n    }\n\n    /// @dev Reverts with a custom error with two int24 arguments\n    function revertWith(bytes4 selector, int24 value1, int24 value2) internal pure {\n        assembly (\"memory-safe\") {\n            let fmp := mload(0x40)\n            mstore(fmp, selector)\n            mstore(add(fmp, 0x04), signextend(2, value1))\n            mstore(add(fmp, 0x24), signextend(2, value2))\n            revert(fmp, 0x44)\n        }\n    }\n\n    /// @dev Reverts with a custom error with two uint160 arguments\n    function revertWith(bytes4 selector, uint160 value1, uint160 value2) internal pure {\n        assembly (\"memory-safe\") {\n            let fmp := mload(0x40)\n            mstore(fmp, selector)\n            mstore(add(fmp, 0x04), and(value1, 0xffffffffffffffffffffffffffffffffffffffff))\n            mstore(add(fmp, 0x24), and(value2, 0xffffffffffffffffffffffffffffffffffffffff))\n            revert(fmp, 0x44)\n        }\n    }\n\n    /// @dev Reverts with a custom error with two address arguments\n    function revertWith(bytes4 selector, address value1, address value2) internal pure {\n        assembly (\"memory-safe\") {\n            let fmp := mload(0x40)\n            mstore(fmp, selector)\n            mstore(add(fmp, 0x04), and(value1, 0xffffffffffffffffffffffffffffffffffffffff))\n            mstore(add(fmp, 0x24), and(value2, 0xffffffffffffffffffffffffffffffffffffffff))\n            revert(fmp, 0x44)\n        }\n    }\n\n    /// @notice bubble up the revert message returned by a call and revert with a wrapped ERC-7751 error\n    /// @dev this method can be vulnerable to revert data bombs\n    function bubbleUpAndRevertWith(\n        address revertingContract,\n        bytes4 revertingFunctionSelector,\n        bytes4 additionalContext\n    ) internal pure {\n        bytes4 wrappedErrorSelector = WrappedError.selector;\n        assembly (\"memory-safe\") {\n            // Ensure the size of the revert data is a multiple of 32 bytes\n            let encodedDataSize := mul(div(add(returndatasize(), 31), 32), 32)\n\n            let fmp := mload(0x40)\n\n            // Encode wrapped error selector, address, function selector, offset, additional context, size, revert reason\n            mstore(fmp, wrappedErrorSelector)\n            mstore(add(fmp, 0x04), and(revertingContract, 0xffffffffffffffffffffffffffffffffffffffff))\n            mstore(\n                add(fmp, 0x24),\n                and(revertingFunctionSelector, 0xffffffff00000000000000000000000000000000000000000000000000000000)\n            )\n            // offset revert reason\n            mstore(add(fmp, 0x44), 0x80)\n            // offset additional context\n            mstore(add(fmp, 0x64), add(0xa0, encodedDataSize))\n            // size revert reason\n            mstore(add(fmp, 0x84), returndatasize())\n            // revert reason\n            returndatacopy(add(fmp, 0xa4), 0, returndatasize())\n            // size additional context\n            mstore(add(fmp, add(0xa4, encodedDataSize)), 0x04)\n            // additional context\n            mstore(\n                add(fmp, add(0xc4, encodedDataSize)),\n                and(additionalContext, 0xffffffff00000000000000000000000000000000000000000000000000000000)\n            )\n            revert(fmp, add(0xe4, encodedDataSize))\n        }\n    }\n}\n"},"lib/v4-core/src/libraries/LPFeeLibrary.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {CustomRevert} from \"./CustomRevert.sol\";\n\n/// @notice Library of helper functions for a pools LP fee\nlibrary LPFeeLibrary {\n    using LPFeeLibrary for uint24;\n    using CustomRevert for bytes4;\n\n    /// @notice Thrown when the static or dynamic fee on a pool exceeds 100%.\n    error LPFeeTooLarge(uint24 fee);\n\n    /// @notice An lp fee of exactly 0b1000000... signals a dynamic fee pool. This isn't a valid static fee as it is > MAX_LP_FEE\n    uint24 public constant DYNAMIC_FEE_FLAG = 0x800000;\n\n    /// @notice the second bit of the fee returned by beforeSwap is used to signal if the stored LP fee should be overridden in this swap\n    // only dynamic-fee pools can return a fee via the beforeSwap hook\n    uint24 public constant OVERRIDE_FEE_FLAG = 0x400000;\n\n    /// @notice mask to remove the override fee flag from a fee returned by the beforeSwaphook\n    uint24 public constant REMOVE_OVERRIDE_MASK = 0xBFFFFF;\n\n    /// @notice the lp fee is represented in hundredths of a bip, so the max is 100%\n    uint24 public constant MAX_LP_FEE = 1000000;\n\n    /// @notice returns true if a pool's LP fee signals that the pool has a dynamic fee\n    /// @param self The fee to check\n    /// @return bool True of the fee is dynamic\n    function isDynamicFee(uint24 self) internal pure returns (bool) {\n        return self == DYNAMIC_FEE_FLAG;\n    }\n\n    /// @notice returns true if an LP fee is valid, aka not above the maximum permitted fee\n    /// @param self The fee to check\n    /// @return bool True of the fee is valid\n    function isValid(uint24 self) internal pure returns (bool) {\n        return self <= MAX_LP_FEE;\n    }\n\n    /// @notice validates whether an LP fee is larger than the maximum, and reverts if invalid\n    /// @param self The fee to validate\n    function validate(uint24 self) internal pure {\n        if (!self.isValid()) LPFeeTooLarge.selector.revertWith(self);\n    }\n\n    /// @notice gets and validates the initial LP fee for a pool. Dynamic fee pools have an initial fee of 0.\n    /// @dev if a dynamic fee pool wants a non-0 initial fee, it should call `updateDynamicLPFee` in the afterInitialize hook\n    /// @param self The fee to get the initial LP from\n    /// @return initialFee 0 if the fee is dynamic, otherwise the fee (if valid)\n    function getInitialLPFee(uint24 self) internal pure returns (uint24) {\n        // the initial fee for a dynamic fee pool is 0\n        if (self.isDynamicFee()) return 0;\n        self.validate();\n        return self;\n    }\n\n    /// @notice returns true if the fee has the override flag set (2nd highest bit of the uint24)\n    /// @param self The fee to check\n    /// @return bool True of the fee has the override flag set\n    function isOverride(uint24 self) internal pure returns (bool) {\n        return self & OVERRIDE_FEE_FLAG != 0;\n    }\n\n    /// @notice returns a fee with the override flag removed\n    /// @param self The fee to remove the override flag from\n    /// @return fee The fee without the override flag set\n    function removeOverrideFlag(uint24 self) internal pure returns (uint24) {\n        return self & REMOVE_OVERRIDE_MASK;\n    }\n\n    /// @notice Removes the override flag and validates the fee (reverts if the fee is too large)\n    /// @param self The fee to remove the override flag from, and then validate\n    /// @return fee The fee without the override flag set (if valid)\n    function removeOverrideFlagAndValidate(uint24 self) internal pure returns (uint24 fee) {\n        fee = self.removeOverrideFlag();\n        fee.validate();\n    }\n}\n"},"lib/v4-core/src/libraries/StateLibrary.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {PoolId} from \"../types/PoolId.sol\";\nimport {IPoolManager} from \"../interfaces/IPoolManager.sol\";\nimport {Position} from \"./Position.sol\";\n\n/// @notice A helper library to provide state getters that use extsload\nlibrary StateLibrary {\n    /// @notice index of pools mapping in the PoolManager\n    bytes32 public constant POOLS_SLOT = bytes32(uint256(6));\n\n    /// @notice index of feeGrowthGlobal0X128 in Pool.State\n    uint256 public constant FEE_GROWTH_GLOBAL0_OFFSET = 1;\n\n    // feeGrowthGlobal1X128 offset in Pool.State = 2\n\n    /// @notice index of liquidity in Pool.State\n    uint256 public constant LIQUIDITY_OFFSET = 3;\n\n    /// @notice index of TicksInfo mapping in Pool.State: mapping(int24 => TickInfo) ticks;\n    uint256 public constant TICKS_OFFSET = 4;\n\n    /// @notice index of tickBitmap mapping in Pool.State\n    uint256 public constant TICK_BITMAP_OFFSET = 5;\n\n    /// @notice index of Position.State mapping in Pool.State: mapping(bytes32 => Position.State) positions;\n    uint256 public constant POSITIONS_OFFSET = 6;\n\n    /**\n     * @notice Get Slot0 of the pool: sqrtPriceX96, tick, protocolFee, lpFee\n     * @dev Corresponds to pools[poolId].slot0\n     * @param manager The pool manager contract.\n     * @param poolId The ID of the pool.\n     * @return sqrtPriceX96 The square root of the price of the pool, in Q96 precision.\n     * @return tick The current tick of the pool.\n     * @return protocolFee The protocol fee of the pool.\n     * @return lpFee The swap fee of the pool.\n     */\n    function getSlot0(IPoolManager manager, PoolId poolId)\n        internal\n        view\n        returns (uint160 sqrtPriceX96, int24 tick, uint24 protocolFee, uint24 lpFee)\n    {\n        // slot key of Pool.State value: `pools[poolId]`\n        bytes32 stateSlot = _getPoolStateSlot(poolId);\n\n        bytes32 data = manager.extsload(stateSlot);\n\n        //   24 bits  |24bits|24bits      |24 bits|160 bits\n        // 0x000000   |000bb8|000000      |ffff75 |0000000000000000fe3aa841ba359daa0ea9eff7\n        // ---------- | fee  |protocolfee | tick  | sqrtPriceX96\n        assembly (\"memory-safe\") {\n            // bottom 160 bits of data\n            sqrtPriceX96 := and(data, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF)\n            // next 24 bits of data\n            tick := signextend(2, shr(160, data))\n            // next 24 bits of data\n            protocolFee := and(shr(184, data), 0xFFFFFF)\n            // last 24 bits of data\n            lpFee := and(shr(208, data), 0xFFFFFF)\n        }\n    }\n\n    /**\n     * @notice Retrieves the tick information of a pool at a specific tick.\n     * @dev Corresponds to pools[poolId].ticks[tick]\n     * @param manager The pool manager contract.\n     * @param poolId The ID of the pool.\n     * @param tick The tick to retrieve information for.\n     * @return liquidityGross The total position liquidity that references this tick\n     * @return liquidityNet The amount of net liquidity added (subtracted) when tick is crossed from left to right (right to left)\n     * @return feeGrowthOutside0X128 fee growth per unit of liquidity on the _other_ side of this tick (relative to the current tick)\n     * @return feeGrowthOutside1X128 fee growth per unit of liquidity on the _other_ side of this tick (relative to the current tick)\n     */\n    function getTickInfo(IPoolManager manager, PoolId poolId, int24 tick)\n        internal\n        view\n        returns (\n            uint128 liquidityGross,\n            int128 liquidityNet,\n            uint256 feeGrowthOutside0X128,\n            uint256 feeGrowthOutside1X128\n        )\n    {\n        bytes32 slot = _getTickInfoSlot(poolId, tick);\n\n        // read all 3 words of the TickInfo struct\n        bytes32[] memory data = manager.extsload(slot, 3);\n        assembly (\"memory-safe\") {\n            let firstWord := mload(add(data, 32))\n            liquidityNet := sar(128, firstWord)\n            liquidityGross := and(firstWord, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF)\n            feeGrowthOutside0X128 := mload(add(data, 64))\n            feeGrowthOutside1X128 := mload(add(data, 96))\n        }\n    }\n\n    /**\n     * @notice Retrieves the liquidity information of a pool at a specific tick.\n     * @dev Corresponds to pools[poolId].ticks[tick].liquidityGross and pools[poolId].ticks[tick].liquidityNet. A more gas efficient version of getTickInfo\n     * @param manager The pool manager contract.\n     * @param poolId The ID of the pool.\n     * @param tick The tick to retrieve liquidity for.\n     * @return liquidityGross The total position liquidity that references this tick\n     * @return liquidityNet The amount of net liquidity added (subtracted) when tick is crossed from left to right (right to left)\n     */\n    function getTickLiquidity(IPoolManager manager, PoolId poolId, int24 tick)\n        internal\n        view\n        returns (uint128 liquidityGross, int128 liquidityNet)\n    {\n        bytes32 slot = _getTickInfoSlot(poolId, tick);\n\n        bytes32 value = manager.extsload(slot);\n        assembly (\"memory-safe\") {\n            liquidityNet := sar(128, value)\n            liquidityGross := and(value, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF)\n        }\n    }\n\n    /**\n     * @notice Retrieves the fee growth outside a tick range of a pool\n     * @dev Corresponds to pools[poolId].ticks[tick].feeGrowthOutside0X128 and pools[poolId].ticks[tick].feeGrowthOutside1X128. A more gas efficient version of getTickInfo\n     * @param manager The pool manager contract.\n     * @param poolId The ID of the pool.\n     * @param tick The tick to retrieve fee growth for.\n     * @return feeGrowthOutside0X128 fee growth per unit of liquidity on the _other_ side of this tick (relative to the current tick)\n     * @return feeGrowthOutside1X128 fee growth per unit of liquidity on the _other_ side of this tick (relative to the current tick)\n     */\n    function getTickFeeGrowthOutside(IPoolManager manager, PoolId poolId, int24 tick)\n        internal\n        view\n        returns (uint256 feeGrowthOutside0X128, uint256 feeGrowthOutside1X128)\n    {\n        bytes32 slot = _getTickInfoSlot(poolId, tick);\n\n        // offset by 1 word, since the first word is liquidityGross + liquidityNet\n        bytes32[] memory data = manager.extsload(bytes32(uint256(slot) + 1), 2);\n        assembly (\"memory-safe\") {\n            feeGrowthOutside0X128 := mload(add(data, 32))\n            feeGrowthOutside1X128 := mload(add(data, 64))\n        }\n    }\n\n    /**\n     * @notice Retrieves the global fee growth of a pool.\n     * @dev Corresponds to pools[poolId].feeGrowthGlobal0X128 and pools[poolId].feeGrowthGlobal1X128\n     * @param manager The pool manager contract.\n     * @param poolId The ID of the pool.\n     * @return feeGrowthGlobal0 The global fee growth for token0.\n     * @return feeGrowthGlobal1 The global fee growth for token1.\n     * @dev Note that feeGrowthGlobal can be artificially inflated\n     * For pools with a single liquidity position, actors can donate to themselves to freely inflate feeGrowthGlobal\n     * atomically donating and collecting fees in the same unlockCallback may make the inflated value more extreme\n     */\n    function getFeeGrowthGlobals(IPoolManager manager, PoolId poolId)\n        internal\n        view\n        returns (uint256 feeGrowthGlobal0, uint256 feeGrowthGlobal1)\n    {\n        // slot key of Pool.State value: `pools[poolId]`\n        bytes32 stateSlot = _getPoolStateSlot(poolId);\n\n        // Pool.State, `uint256 feeGrowthGlobal0X128`\n        bytes32 slot_feeGrowthGlobal0X128 = bytes32(uint256(stateSlot) + FEE_GROWTH_GLOBAL0_OFFSET);\n\n        // read the 2 words of feeGrowthGlobal\n        bytes32[] memory data = manager.extsload(slot_feeGrowthGlobal0X128, 2);\n        assembly (\"memory-safe\") {\n            feeGrowthGlobal0 := mload(add(data, 32))\n            feeGrowthGlobal1 := mload(add(data, 64))\n        }\n    }\n\n    /**\n     * @notice Retrieves total the liquidity of a pool.\n     * @dev Corresponds to pools[poolId].liquidity\n     * @param manager The pool manager contract.\n     * @param poolId The ID of the pool.\n     * @return liquidity The liquidity of the pool.\n     */\n    function getLiquidity(IPoolManager manager, PoolId poolId) internal view returns (uint128 liquidity) {\n        // slot key of Pool.State value: `pools[poolId]`\n        bytes32 stateSlot = _getPoolStateSlot(poolId);\n\n        // Pool.State: `uint128 liquidity`\n        bytes32 slot = bytes32(uint256(stateSlot) + LIQUIDITY_OFFSET);\n\n        liquidity = uint128(uint256(manager.extsload(slot)));\n    }\n\n    /**\n     * @notice Retrieves the tick bitmap of a pool at a specific tick.\n     * @dev Corresponds to pools[poolId].tickBitmap[tick]\n     * @param manager The pool manager contract.\n     * @param poolId The ID of the pool.\n     * @param tick The tick to retrieve the bitmap for.\n     * @return tickBitmap The bitmap of the tick.\n     */\n    function getTickBitmap(IPoolManager manager, PoolId poolId, int16 tick)\n        internal\n        view\n        returns (uint256 tickBitmap)\n    {\n        // slot key of Pool.State value: `pools[poolId]`\n        bytes32 stateSlot = _getPoolStateSlot(poolId);\n\n        // Pool.State: `mapping(int16 => uint256) tickBitmap;`\n        bytes32 tickBitmapMapping = bytes32(uint256(stateSlot) + TICK_BITMAP_OFFSET);\n\n        // slot id of the mapping key: `pools[poolId].tickBitmap[tick]\n        bytes32 slot = keccak256(abi.encodePacked(int256(tick), tickBitmapMapping));\n\n        tickBitmap = uint256(manager.extsload(slot));\n    }\n\n    /**\n     * @notice Retrieves the position information of a pool without needing to calculate the `positionId`.\n     * @dev Corresponds to pools[poolId].positions[positionId]\n     * @param poolId The ID of the pool.\n     * @param owner The owner of the liquidity position.\n     * @param tickLower The lower tick of the liquidity range.\n     * @param tickUpper The upper tick of the liquidity range.\n     * @param salt The bytes32 randomness to further distinguish position state.\n     * @return liquidity The liquidity of the position.\n     * @return feeGrowthInside0LastX128 The fee growth inside the position for token0.\n     * @return feeGrowthInside1LastX128 The fee growth inside the position for token1.\n     */\n    function getPositionInfo(\n        IPoolManager manager,\n        PoolId poolId,\n        address owner,\n        int24 tickLower,\n        int24 tickUpper,\n        bytes32 salt\n    ) internal view returns (uint128 liquidity, uint256 feeGrowthInside0LastX128, uint256 feeGrowthInside1LastX128) {\n        // positionKey = keccak256(abi.encodePacked(owner, tickLower, tickUpper, salt))\n        bytes32 positionKey = Position.calculatePositionKey(owner, tickLower, tickUpper, salt);\n\n        (liquidity, feeGrowthInside0LastX128, feeGrowthInside1LastX128) = getPositionInfo(manager, poolId, positionKey);\n    }\n\n    /**\n     * @notice Retrieves the position information of a pool at a specific position ID.\n     * @dev Corresponds to pools[poolId].positions[positionId]\n     * @param manager The pool manager contract.\n     * @param poolId The ID of the pool.\n     * @param positionId The ID of the position.\n     * @return liquidity The liquidity of the position.\n     * @return feeGrowthInside0LastX128 The fee growth inside the position for token0.\n     * @return feeGrowthInside1LastX128 The fee growth inside the position for token1.\n     */\n    function getPositionInfo(IPoolManager manager, PoolId poolId, bytes32 positionId)\n        internal\n        view\n        returns (uint128 liquidity, uint256 feeGrowthInside0LastX128, uint256 feeGrowthInside1LastX128)\n    {\n        bytes32 slot = _getPositionInfoSlot(poolId, positionId);\n\n        // read all 3 words of the Position.State struct\n        bytes32[] memory data = manager.extsload(slot, 3);\n\n        assembly (\"memory-safe\") {\n            liquidity := mload(add(data, 32))\n            feeGrowthInside0LastX128 := mload(add(data, 64))\n            feeGrowthInside1LastX128 := mload(add(data, 96))\n        }\n    }\n\n    /**\n     * @notice Retrieves the liquidity of a position.\n     * @dev Corresponds to pools[poolId].positions[positionId].liquidity. More gas efficient for just retrieiving liquidity as compared to getPositionInfo\n     * @param manager The pool manager contract.\n     * @param poolId The ID of the pool.\n     * @param positionId The ID of the position.\n     * @return liquidity The liquidity of the position.\n     */\n    function getPositionLiquidity(IPoolManager manager, PoolId poolId, bytes32 positionId)\n        internal\n        view\n        returns (uint128 liquidity)\n    {\n        bytes32 slot = _getPositionInfoSlot(poolId, positionId);\n        liquidity = uint128(uint256(manager.extsload(slot)));\n    }\n\n    /**\n     * @notice Calculate the fee growth inside a tick range of a pool\n     * @dev pools[poolId].feeGrowthInside0LastX128 in Position.State is cached and can become stale. This function will calculate the up to date feeGrowthInside\n     * @param manager The pool manager contract.\n     * @param poolId The ID of the pool.\n     * @param tickLower The lower tick of the range.\n     * @param tickUpper The upper tick of the range.\n     * @return feeGrowthInside0X128 The fee growth inside the tick range for token0.\n     * @return feeGrowthInside1X128 The fee growth inside the tick range for token1.\n     */\n    function getFeeGrowthInside(IPoolManager manager, PoolId poolId, int24 tickLower, int24 tickUpper)\n        internal\n        view\n        returns (uint256 feeGrowthInside0X128, uint256 feeGrowthInside1X128)\n    {\n        (uint256 feeGrowthGlobal0X128, uint256 feeGrowthGlobal1X128) = getFeeGrowthGlobals(manager, poolId);\n\n        (uint256 lowerFeeGrowthOutside0X128, uint256 lowerFeeGrowthOutside1X128) =\n            getTickFeeGrowthOutside(manager, poolId, tickLower);\n        (uint256 upperFeeGrowthOutside0X128, uint256 upperFeeGrowthOutside1X128) =\n            getTickFeeGrowthOutside(manager, poolId, tickUpper);\n        (, int24 tickCurrent,,) = getSlot0(manager, poolId);\n        unchecked {\n            if (tickCurrent < tickLower) {\n                feeGrowthInside0X128 = lowerFeeGrowthOutside0X128 - upperFeeGrowthOutside0X128;\n                feeGrowthInside1X128 = lowerFeeGrowthOutside1X128 - upperFeeGrowthOutside1X128;\n            } else if (tickCurrent >= tickUpper) {\n                feeGrowthInside0X128 = upperFeeGrowthOutside0X128 - lowerFeeGrowthOutside0X128;\n                feeGrowthInside1X128 = upperFeeGrowthOutside1X128 - lowerFeeGrowthOutside1X128;\n            } else {\n                feeGrowthInside0X128 = feeGrowthGlobal0X128 - lowerFeeGrowthOutside0X128 - upperFeeGrowthOutside0X128;\n                feeGrowthInside1X128 = feeGrowthGlobal1X128 - lowerFeeGrowthOutside1X128 - upperFeeGrowthOutside1X128;\n            }\n        }\n    }\n\n    function _getPoolStateSlot(PoolId poolId) internal pure returns (bytes32) {\n        return keccak256(abi.encodePacked(PoolId.unwrap(poolId), POOLS_SLOT));\n    }\n\n    function _getTickInfoSlot(PoolId poolId, int24 tick) internal pure returns (bytes32) {\n        // slot key of Pool.State value: `pools[poolId]`\n        bytes32 stateSlot = _getPoolStateSlot(poolId);\n\n        // Pool.State: `mapping(int24 => TickInfo) ticks`\n        bytes32 ticksMappingSlot = bytes32(uint256(stateSlot) + TICKS_OFFSET);\n\n        // slot key of the tick key: `pools[poolId].ticks[tick]\n        return keccak256(abi.encodePacked(int256(tick), ticksMappingSlot));\n    }\n\n    function _getPositionInfoSlot(PoolId poolId, bytes32 positionId) internal pure returns (bytes32) {\n        // slot key of Pool.State value: `pools[poolId]`\n        bytes32 stateSlot = _getPoolStateSlot(poolId);\n\n        // Pool.State: `mapping(bytes32 => Position.State) positions;`\n        bytes32 positionMapping = bytes32(uint256(stateSlot) + POSITIONS_OFFSET);\n\n        // slot of the mapping key: `pools[poolId].positions[positionId]\n        return keccak256(abi.encodePacked(positionId, positionMapping));\n    }\n}\n"},"lib/v4-core/src/interfaces/IPoolManager.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.24;\n\nimport {Currency} from \"../types/Currency.sol\";\nimport {PoolKey} from \"../types/PoolKey.sol\";\nimport {IHooks} from \"./IHooks.sol\";\nimport {IERC6909Claims} from \"./external/IERC6909Claims.sol\";\nimport {IProtocolFees} from \"./IProtocolFees.sol\";\nimport {BalanceDelta} from \"../types/BalanceDelta.sol\";\nimport {PoolId} from \"../types/PoolId.sol\";\nimport {IExtsload} from \"./IExtsload.sol\";\nimport {IExttload} from \"./IExttload.sol\";\nimport {ModifyLiquidityParams, SwapParams} from \"../types/PoolOperation.sol\";\n\n/// @notice Interface for the PoolManager\ninterface IPoolManager is IProtocolFees, IERC6909Claims, IExtsload, IExttload {\n    /// @notice Thrown when a currency is not netted out after the contract is unlocked\n    error CurrencyNotSettled();\n\n    /// @notice Thrown when trying to interact with a non-initialized pool\n    error PoolNotInitialized();\n\n    /// @notice Thrown when unlock is called, but the contract is already unlocked\n    error AlreadyUnlocked();\n\n    /// @notice Thrown when a function is called that requires the contract to be unlocked, but it is not\n    error ManagerLocked();\n\n    /// @notice Pools are limited to type(int16).max tickSpacing in #initialize, to prevent overflow\n    error TickSpacingTooLarge(int24 tickSpacing);\n\n    /// @notice Pools must have a positive non-zero tickSpacing passed to #initialize\n    error TickSpacingTooSmall(int24 tickSpacing);\n\n    /// @notice PoolKey must have currencies where address(currency0) < address(currency1)\n    error CurrenciesOutOfOrderOrEqual(address currency0, address currency1);\n\n    /// @notice Thrown when a call to updateDynamicLPFee is made by an address that is not the hook,\n    /// or on a pool that does not have a dynamic swap fee.\n    error UnauthorizedDynamicLPFeeUpdate();\n\n    /// @notice Thrown when trying to swap amount of 0\n    error SwapAmountCannotBeZero();\n\n    ///@notice Thrown when native currency is passed to a non native settlement\n    error NonzeroNativeValue();\n\n    /// @notice Thrown when `clear` is called with an amount that is not exactly equal to the open currency delta.\n    error MustClearExactPositiveDelta();\n\n    /// @notice Emitted when a new pool is initialized\n    /// @param id The abi encoded hash of the pool key struct for the new pool\n    /// @param currency0 The first currency of the pool by address sort order\n    /// @param currency1 The second currency of the pool by address sort order\n    /// @param fee The fee collected upon every swap in the pool, denominated in hundredths of a bip\n    /// @param tickSpacing The minimum number of ticks between initialized ticks\n    /// @param hooks The hooks contract address for the pool, or address(0) if none\n    /// @param sqrtPriceX96 The price of the pool on initialization\n    /// @param tick The initial tick of the pool corresponding to the initialized price\n    event Initialize(\n        PoolId indexed id,\n        Currency indexed currency0,\n        Currency indexed currency1,\n        uint24 fee,\n        int24 tickSpacing,\n        IHooks hooks,\n        uint160 sqrtPriceX96,\n        int24 tick\n    );\n\n    /// @notice Emitted when a liquidity position is modified\n    /// @param id The abi encoded hash of the pool key struct for the pool that was modified\n    /// @param sender The address that modified the pool\n    /// @param tickLower The lower tick of the position\n    /// @param tickUpper The upper tick of the position\n    /// @param liquidityDelta The amount of liquidity that was added or removed\n    /// @param salt The extra data to make positions unique\n    event ModifyLiquidity(\n        PoolId indexed id, address indexed sender, int24 tickLower, int24 tickUpper, int256 liquidityDelta, bytes32 salt\n    );\n\n    /// @notice Emitted for swaps between currency0 and currency1\n    /// @param id The abi encoded hash of the pool key struct for the pool that was modified\n    /// @param sender The address that initiated the swap call, and that received the callback\n    /// @param amount0 The delta of the currency0 balance of the pool\n    /// @param amount1 The delta of the currency1 balance of the pool\n    /// @param sqrtPriceX96 The sqrt(price) of the pool after the swap, as a Q64.96\n    /// @param liquidity The liquidity of the pool after the swap\n    /// @param tick The log base 1.0001 of the price of the pool after the swap\n    /// @param fee The swap fee in hundredths of a bip\n    event Swap(\n        PoolId indexed id,\n        address indexed sender,\n        int128 amount0,\n        int128 amount1,\n        uint160 sqrtPriceX96,\n        uint128 liquidity,\n        int24 tick,\n        uint24 fee\n    );\n\n    /// @notice Emitted for donations\n    /// @param id The abi encoded hash of the pool key struct for the pool that was donated to\n    /// @param sender The address that initiated the donate call\n    /// @param amount0 The amount donated in currency0\n    /// @param amount1 The amount donated in currency1\n    event Donate(PoolId indexed id, address indexed sender, uint256 amount0, uint256 amount1);\n\n    /// @notice All interactions on the contract that account deltas require unlocking. A caller that calls `unlock` must implement\n    /// `IUnlockCallback(msg.sender).unlockCallback(data)`, where they interact with the remaining functions on this contract.\n    /// @dev The only functions callable without an unlocking are `initialize` and `updateDynamicLPFee`\n    /// @param data Any data to pass to the callback, via `IUnlockCallback(msg.sender).unlockCallback(data)`\n    /// @return The data returned by the call to `IUnlockCallback(msg.sender).unlockCallback(data)`\n    function unlock(bytes calldata data) external returns (bytes memory);\n\n    /// @notice Initialize the state for a given pool ID\n    /// @dev A swap fee totaling MAX_SWAP_FEE (100%) makes exact output swaps impossible since the input is entirely consumed by the fee\n    /// @param key The pool key for the pool to initialize\n    /// @param sqrtPriceX96 The initial square root price\n    /// @return tick The initial tick of the pool\n    function initialize(PoolKey memory key, uint160 sqrtPriceX96) external returns (int24 tick);\n\n    /// @notice Modify the liquidity for the given pool\n    /// @dev Poke by calling with a zero liquidityDelta\n    /// @param key The pool to modify liquidity in\n    /// @param params The parameters for modifying the liquidity\n    /// @param hookData The data to pass through to the add/removeLiquidity hooks\n    /// @return callerDelta The balance delta of the caller of modifyLiquidity. This is the total of both principal, fee deltas, and hook deltas if applicable\n    /// @return feesAccrued The balance delta of the fees generated in the liquidity range. Returned for informational purposes\n    /// @dev Note that feesAccrued can be artificially inflated by a malicious actor and integrators should be careful using the value\n    /// For pools with a single liquidity position, actors can donate to themselves to inflate feeGrowthGlobal (and consequently feesAccrued)\n    /// atomically donating and collecting fees in the same unlockCallback may make the inflated value more extreme\n    function modifyLiquidity(PoolKey memory key, ModifyLiquidityParams memory params, bytes calldata hookData)\n        external\n        returns (BalanceDelta callerDelta, BalanceDelta feesAccrued);\n\n    /// @notice Swap against the given pool\n    /// @param key The pool to swap in\n    /// @param params The parameters for swapping\n    /// @param hookData The data to pass through to the swap hooks\n    /// @return swapDelta The balance delta of the address swapping\n    /// @dev Swapping on low liquidity pools may cause unexpected swap amounts when liquidity available is less than amountSpecified.\n    /// Additionally note that if interacting with hooks that have the BEFORE_SWAP_RETURNS_DELTA_FLAG or AFTER_SWAP_RETURNS_DELTA_FLAG\n    /// the hook may alter the swap input/output. Integrators should perform checks on the returned swapDelta.\n    function swap(PoolKey memory key, SwapParams memory params, bytes calldata hookData)\n        external\n        returns (BalanceDelta swapDelta);\n\n    /// @notice Donate the given currency amounts to the in-range liquidity providers of a pool\n    /// @dev Calls to donate can be frontrun adding just-in-time liquidity, with the aim of receiving a portion donated funds.\n    /// Donors should keep this in mind when designing donation mechanisms.\n    /// @dev This function donates to in-range LPs at slot0.tick. In certain edge-cases of the swap algorithm, the `sqrtPrice` of\n    /// a pool can be at the lower boundary of tick `n`, but the `slot0.tick` of the pool is already `n - 1`. In this case a call to\n    /// `donate` would donate to tick `n - 1` (slot0.tick) not tick `n` (getTickAtSqrtPrice(slot0.sqrtPriceX96)).\n    /// Read the comments in `Pool.swap()` for more information about this.\n    /// @param key The key of the pool to donate to\n    /// @param amount0 The amount of currency0 to donate\n    /// @param amount1 The amount of currency1 to donate\n    /// @param hookData The data to pass through to the donate hooks\n    /// @return BalanceDelta The delta of the caller after the donate\n    function donate(PoolKey memory key, uint256 amount0, uint256 amount1, bytes calldata hookData)\n        external\n        returns (BalanceDelta);\n\n    /// @notice Writes the current ERC20 balance of the specified currency to transient storage\n    /// This is used to checkpoint balances for the manager and derive deltas for the caller.\n    /// @dev This MUST be called before any ERC20 tokens are sent into the contract, but can be skipped\n    /// for native tokens because the amount to settle is determined by the sent value.\n    /// However, if an ERC20 token has been synced and not settled, and the caller instead wants to settle\n    /// native funds, this function can be called with the native currency to then be able to settle the native currency\n    function sync(Currency currency) external;\n\n    /// @notice Called by the user to net out some value owed to the user\n    /// @dev Will revert if the requested amount is not available, consider using `mint` instead\n    /// @dev Can also be used as a mechanism for free flash loans\n    /// @param currency The currency to withdraw from the pool manager\n    /// @param to The address to withdraw to\n    /// @param amount The amount of currency to withdraw\n    function take(Currency currency, address to, uint256 amount) external;\n\n    /// @notice Called by the user to pay what is owed\n    /// @return paid The amount of currency settled\n    function settle() external payable returns (uint256 paid);\n\n    /// @notice Called by the user to pay on behalf of another address\n    /// @param recipient The address to credit for the payment\n    /// @return paid The amount of currency settled\n    function settleFor(address recipient) external payable returns (uint256 paid);\n\n    /// @notice WARNING - Any currency that is cleared, will be non-retrievable, and locked in the contract permanently.\n    /// A call to clear will zero out a positive balance WITHOUT a corresponding transfer.\n    /// @dev This could be used to clear a balance that is considered dust.\n    /// Additionally, the amount must be the exact positive balance. This is to enforce that the caller is aware of the amount being cleared.\n    function clear(Currency currency, uint256 amount) external;\n\n    /// @notice Called by the user to move value into ERC6909 balance\n    /// @param to The address to mint the tokens to\n    /// @param id The currency address to mint to ERC6909s, as a uint256\n    /// @param amount The amount of currency to mint\n    /// @dev The id is converted to a uint160 to correspond to a currency address\n    /// If the upper 12 bytes are not 0, they will be 0-ed out\n    function mint(address to, uint256 id, uint256 amount) external;\n\n    /// @notice Called by the user to move value from ERC6909 balance\n    /// @param from The address to burn the tokens from\n    /// @param id The currency address to burn from ERC6909s, as a uint256\n    /// @param amount The amount of currency to burn\n    /// @dev The id is converted to a uint160 to correspond to a currency address\n    /// If the upper 12 bytes are not 0, they will be 0-ed out\n    function burn(address from, uint256 id, uint256 amount) external;\n\n    /// @notice Updates the pools lp fees for the a pool that has enabled dynamic lp fees.\n    /// @dev A swap fee totaling MAX_SWAP_FEE (100%) makes exact output swaps impossible since the input is entirely consumed by the fee\n    /// @param key The key of the pool to update dynamic LP fees for\n    /// @param newDynamicLPFee The new dynamic pool LP fee\n    function updateDynamicLPFee(PoolKey memory key, uint24 newDynamicLPFee) external;\n}\n"},"lib/v4-core/src/libraries/FixedPoint128.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n/// @title FixedPoint128\n/// @notice A library for handling binary fixed point numbers, see https://en.wikipedia.org/wiki/Q_(number_format)\nlibrary FixedPoint128 {\n    uint256 internal constant Q128 = 0x100000000000000000000000000000000;\n}\n"},"lib/v4-core/src/libraries/LiquidityMath.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n/// @title Math library for liquidity\nlibrary LiquidityMath {\n    /// @notice Add a signed liquidity delta to liquidity and revert if it overflows or underflows\n    /// @param x The liquidity before change\n    /// @param y The delta by which liquidity should be changed\n    /// @return z The liquidity delta\n    function addDelta(uint128 x, int128 y) internal pure returns (uint128 z) {\n        assembly (\"memory-safe\") {\n            z := add(and(x, 0xffffffffffffffffffffffffffffffff), signextend(15, y))\n            if shr(128, z) {\n                // revert SafeCastOverflow()\n                mstore(0, 0x93dafdf1)\n                revert(0x1c, 0x04)\n            }\n        }\n    }\n}\n"},"lib/v4-periphery/src/base/DeltaResolver.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.24;\n\nimport {Currency} from \"@uniswap/v4-core/src/types/Currency.sol\";\nimport {TransientStateLibrary} from \"@uniswap/v4-core/src/libraries/TransientStateLibrary.sol\";\nimport {IPoolManager} from \"@uniswap/v4-core/src/interfaces/IPoolManager.sol\";\nimport {ImmutableState} from \"./ImmutableState.sol\";\nimport {ActionConstants} from \"../libraries/ActionConstants.sol\";\n\n/// @notice Abstract contract used to sync, send, and settle funds to the pool manager\n/// @dev Note that sync() is called before any erc-20 transfer in `settle`.\nabstract contract DeltaResolver is ImmutableState {\n    using TransientStateLibrary for IPoolManager;\n\n    /// @notice Emitted when unexpected negative delta is found.\n    error DeltaNotPositive(Currency currency);\n    /// @notice Emitted when unexpected positive delta is found.\n    error DeltaNotNegative(Currency currency);\n    /// @notice Emitted when the contract does not have enough balance to wrap or unwrap.\n    error InsufficientBalance();\n\n    /// @notice Take an amount of currency out of the PoolManager\n    /// @param currency Currency to take\n    /// @param recipient Address to receive the currency\n    /// @param amount Amount to take\n    /// @dev Returns early if the amount is 0\n    function _take(Currency currency, address recipient, uint256 amount) internal virtual {\n        if (amount == 0) return;\n        poolManager.take(currency, recipient, amount);\n    }\n\n    /// @notice Pay and settle a currency to the PoolManager\n    /// @dev The implementing contract must ensure that the `payer` is a secure address\n    /// @param currency Currency to settle\n    /// @param payer Address of the payer\n    /// @param amount Amount to send\n    /// @dev Returns early if the amount is 0\n    function _settle(Currency currency, address payer, uint256 amount) internal {\n        if (amount == 0) return;\n\n        poolManager.sync(currency);\n        if (currency.isAddressZero()) {\n            poolManager.settle{value: amount}();\n        } else {\n            _pay(currency, payer, amount);\n            poolManager.settle();\n        }\n    }\n\n    /// @notice Abstract function for contracts to implement paying tokens to the poolManager\n    /// @dev The recipient of the payment should be the poolManager\n    /// @param token The token to settle. This is known not to be the native currency\n    /// @param payer The address who should pay tokens\n    /// @param amount The number of tokens to send\n    function _pay(Currency token, address payer, uint256 amount) internal virtual;\n\n    /// @notice Obtain the full amount owed by this contract (negative delta)\n    /// @param currency Currency to get the delta for\n    /// @return amount The amount owed by this contract as a uint256\n    function _getFullDebt(Currency currency) internal view returns (uint256 amount) {\n        int256 _amount = poolManager.currencyDelta(address(this), currency);\n        // If the amount is positive, it should be taken not settled.\n        if (_amount > 0) revert DeltaNotNegative(currency);\n        // Casting is safe due to limits on the total supply of a pool\n        amount = uint256(-_amount);\n    }\n\n    /// @notice Obtain the full credit owed to this contract (positive delta)\n    /// @param currency Currency to get the delta for\n    /// @return amount The amount owed to this contract as a uint256\n    function _getFullCredit(Currency currency) internal view returns (uint256 amount) {\n        int256 _amount = poolManager.currencyDelta(address(this), currency);\n        // If the amount is negative, it should be settled not taken.\n        if (_amount < 0) revert DeltaNotPositive(currency);\n        amount = uint256(_amount);\n    }\n\n    /// @notice Calculates the amount for a settle action\n    function _mapSettleAmount(uint256 amount, Currency currency) internal view virtual returns (uint256) {\n        if (amount == ActionConstants.CONTRACT_BALANCE) {\n            return currency.balanceOfSelf();\n        } else if (amount == ActionConstants.OPEN_DELTA) {\n            return _getFullDebt(currency);\n        } else {\n            return amount;\n        }\n    }\n\n    /// @notice Calculates the amount for a take action\n    function _mapTakeAmount(uint256 amount, Currency currency) internal view returns (uint256) {\n        if (amount == ActionConstants.OPEN_DELTA) {\n            return _getFullCredit(currency);\n        } else {\n            return amount;\n        }\n    }\n\n    /// @notice Calculates the sanitized amount before wrapping/unwrapping.\n    /// @param inputCurrency The currency, either native or wrapped native, that this contract holds\n    /// @param amount The amount to wrap or unwrap. Can be CONTRACT_BALANCE, OPEN_DELTA or a specific amount\n    /// @param outputCurrency The currency after the wrap/unwrap that the user may owe a balance in on the poolManager\n    function _mapWrapUnwrapAmount(Currency inputCurrency, uint256 amount, Currency outputCurrency)\n        internal\n        view\n        returns (uint256)\n    {\n        // if wrapping, the balance in this contract is in ETH\n        // if unwrapping, the balance in this contract is in WETH\n        uint256 balance = inputCurrency.balanceOf(address(this));\n        if (amount == ActionConstants.CONTRACT_BALANCE) {\n            // return early to avoid unnecessary balance check\n            return balance;\n        }\n        if (amount == ActionConstants.OPEN_DELTA) {\n            // if wrapping, the open currency on the PoolManager is WETH.\n            // if unwrapping, the open currency on the PoolManager is ETH.\n            // note that we use the DEBT amount. Positive deltas can be taken and then wrapped.\n            amount = _getFullDebt(outputCurrency);\n        }\n        if (amount > balance) revert InsufficientBalance();\n        return amount;\n    }\n}\n"},"src/aggregator-hooks/BaseAggregatorHook.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {IPoolManager} from \"@uniswap/v4-core/src/interfaces/IPoolManager.sol\";\nimport {IHooks} from \"@uniswap/v4-core/src/interfaces/IHooks.sol\";\nimport {PoolKey} from \"@uniswap/v4-core/src/types/PoolKey.sol\";\nimport {Hooks} from \"@uniswap/v4-core/src/libraries/Hooks.sol\";\nimport {BeforeSwapDelta, toBeforeSwapDelta} from \"@uniswap/v4-core/src/types/BeforeSwapDelta.sol\";\nimport {Currency, CurrencyLibrary} from \"@uniswap/v4-core/src/types/Currency.sol\";\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport {PoolId} from \"@uniswap/v4-core/src/types/PoolId.sol\";\nimport {PoolIdLibrary} from \"@uniswap/v4-core/src/types/PoolId.sol\";\nimport {ModifyLiquidityParams, SwapParams} from \"@uniswap/v4-core/src/types/PoolOperation.sol\";\nimport {BaseHook} from \"../base/BaseHook.sol\";\nimport {SafeERC20} from \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\nimport {StateLibrary} from \"@uniswap/v4-core/src/libraries/StateLibrary.sol\";\nimport {DeltaResolver} from \"@uniswap/v4-periphery/src/base/DeltaResolver.sol\";\nimport {IAggregatorHook} from \"./interfaces/IAggregatorHook.sol\";\nimport {ProtocolFees} from \"./ProtocolFees.sol\";\nimport {IFeeClassifiedHook} from \"@protocol-fees/interfaces/IFeeClassifiedHook.sol\";\n\n/// @title BaseAggregatorHook\n/// @notice Abstract contract for implementing aggregator hooks in Uniswap V4\n/// @dev Implements the IAggregatorHook interface, leverages the ProtocolFees contract, and extends the BaseHook contract\nabstract contract BaseAggregatorHook is IAggregatorHook, IFeeClassifiedHook, ProtocolFees, BaseHook, DeltaResolver {\n    using CurrencyLibrary for Currency;\n    using PoolIdLibrary for PoolKey;\n    using SafeERC20 for IERC20;\n    using StateLibrary for IPoolManager;\n\n    /// @notice The publicly displayed version of the aggregator hook.\n    /// @dev Although this should never change after construction, strings cannot be labelled immutable.\n    string public aggregatorHookVersion;\n\n    /// @notice Initializes the hook with required dependencies\n    /// @param _manager The Uniswap V4 PoolManager contract\n    constructor(IPoolManager _manager, string memory _aggregatorHookVersion) BaseHook(_manager) ProtocolFees(25) {\n        aggregatorHookVersion = _aggregatorHookVersion;\n    }\n\n    /// @inheritdoc ProtocolFees\n    function pollTokenJar() public virtual override returns (address) {\n        address newTokenJar = _getTokenJar(poolManager);\n        if (tokenJar != newTokenJar) {\n            tokenJar = newTokenJar;\n            emit TokenJarUpdated(tokenJar);\n        }\n        return tokenJar;\n    }\n\n    /// @inheritdoc IAggregatorHook\n    function pseudoTotalValueLocked(PoolId poolId) external virtual returns (uint256 amount0, uint256 amount1);\n\n    /// @inheritdoc IAggregatorHook\n    function quote(bool zeroToOne, int256 amountSpecified, PoolId poolId) external returns (uint256 amountUnspecified) {\n        return _innerQuote(zeroToOne, amountSpecified, poolId, _rawQuote(zeroToOne, amountSpecified, poolId));\n    }\n\n    /// @notice Shared quote tail: applies the protocol fee to a raw quote. Called by every quote variant so\n    ///         this fee adjustment lives in exactly one place.\n    /// @param zeroToOne Whether the swap is from token0 to token1\n    /// @param amountSpecified The amount specified (negative for exact-in, positive for exact-out)\n    /// @param poolId The pool ID\n    /// @param amountUnspecified The raw unspecified amount before protocol fee adjustment\n    /// @return The unspecified amount after protocol fee adjustment\n    function _innerQuote(bool zeroToOne, int256 amountSpecified, PoolId poolId, uint256 amountUnspecified)\n        internal\n        returns (uint256)\n    {\n        uint24 protocolFee = _getProtocolFee(poolManager, zeroToOne, poolId);\n\n        if (protocolFee == 0) return amountUnspecified;\n\n        if (tokenJar == address(0)) pollTokenJar();\n        if (tokenJar == address(0)) return amountUnspecified;\n\n        bool isExactInput = amountSpecified < 0;\n        uint256 feeAmount = _calculateProtocolFeeAmount(protocolFee, isExactInput, amountUnspecified);\n\n        return isExactInput ? amountUnspecified - feeAmount : amountUnspecified + feeAmount;\n    }\n\n    /// @inheritdoc BaseHook\n    function getHookPermissions() public pure override returns (Hooks.Permissions memory permissions) {\n        permissions.beforeSwap = true;\n        permissions.beforeSwapReturnDelta = true;\n        permissions.beforeInitialize = true;\n        permissions.beforeAddLiquidity = true;\n    }\n\n    /// @inheritdoc IFeeClassifiedHook\n    function protocolFeeFlags() external view virtual override returns (uint256) {\n        return 1 << 11;\n    }\n\n    /// @notice Abstract function for contracts to implement conducting the swap on the aggregated liquidity source\n    /// @param settleCurrency The currency to be settled on the V4 PoolManager (swapper's output currency)\n    /// @param takeCurrency The currency to be taken from the V4 PoolManager (swapper's input currency)\n    /// @param params The swap parameters\n    /// @param poolId The V4 Pool ID\n    /// @return amountSettle The amount of the currency being settled (swapper's output amount)\n    /// @return amountTake The amount of the currency being taken (swapper's input amount)\n    /// @return hasSettled Whether the swap has been settled inside of the _conductSwap function\n    /// @dev To settle the swap inside of the _conductSwap function, you must follow the 'sync, send,\n    ///      settle' pattern and set hasSettled to true\n    function _conductSwap(Currency settleCurrency, Currency takeCurrency, SwapParams calldata params, PoolId poolId)\n        internal\n        virtual\n        returns (uint256 amountSettle, uint256 amountTake, bool hasSettled);\n\n    /// @notice Returns the raw quote from the underlying liquidity source without protocol fees\n    /// @param zeroToOne Whether the swap is from token0 to token1\n    /// @param amountSpecified The amount specified (negative for exact-in, positive for exact-out)\n    /// @param poolId The pool ID\n    /// @return amountUnspecified The raw unspecified amount before protocol fee adjustment\n    function _rawQuote(bool zeroToOne, int256 amountSpecified, PoolId poolId)\n        internal\n        virtual\n        returns (uint256 amountUnspecified);\n\n    function _beforeInitialize(address, PoolKey calldata key, uint160) internal virtual override returns (bytes4) {\n        emit AggregatorPoolRegistered(key.toId());\n        // NOTE: Token jar will be grabbed in first protocol fee payment if not done here.\n        pollTokenJar();\n        return IHooks.beforeInitialize.selector;\n    }\n\n    function _beforeAddLiquidity(address, PoolKey calldata, ModifyLiquidityParams calldata, bytes calldata)\n        internal\n        pure\n        override\n        returns (bytes4)\n    {\n        revert LiquidityNotAllowed();\n    }\n\n    function _beforeSwap(address sender, PoolKey calldata key, SwapParams calldata params, bytes calldata)\n        internal\n        virtual\n        override\n        returns (bytes4, BeforeSwapDelta, uint24)\n    {\n        (uint256 amountIn, uint256 amountOut) = _internalSettle(key, params);\n        return _innerBeforeSwap(sender, key, params, amountIn, amountOut);\n    }\n\n    /// @notice Shared `beforeSwap` tail: turns the settled amounts into the BeforeSwapDelta and applies the\n    ///         protocol fee. Called by every `_beforeSwap` variant so this accounting lives in exactly one place.\n    /// @param sender The address that initiated the swap\n    /// @param key The pool key\n    /// @param params The swap parameters\n    /// @param amountIn The swapper's input amount resolved by settlement (the `takeCurrency` amount)\n    /// @param amountOut The swapper's output amount resolved by settlement (the `settleCurrency` amount)\n    function _innerBeforeSwap(\n        address sender,\n        PoolKey calldata key,\n        SwapParams calldata params,\n        uint256 amountIn,\n        uint256 amountOut\n    ) internal returns (bytes4, BeforeSwapDelta, uint24) {\n        int128 unspecifiedDelta = _processAmounts(amountIn, amountOut, params.amountSpecified < 0);\n        int128 specified = int128(-params.amountSpecified); // cancel core\n\n        uint24 protocolFee = _getProtocolFee(poolManager, params.zeroForOne, key.toId());\n        unspecifiedDelta += _applyWithProtocolFee(poolManager, key, params, unspecifiedDelta, protocolFee);\n\n        if (params.amountSpecified >= 0) {\n            // For exactOut, in cases where the implementation's amountOut may be off.\n            // NOTE: it would be up to the router to handle this\n            specified = -int128(uint128(amountOut));\n        }\n\n        int256 amount0;\n        int256 amount1;\n        if (params.zeroForOne == params.amountSpecified < 0) {\n            amount0 = specified;\n            amount1 = unspecifiedDelta;\n        } else {\n            amount0 = unspecifiedDelta;\n            amount1 = specified;\n        }\n\n        emit HookSwap(key.toId(), sender, amount0, amount1, protocolFee);\n\n        return (IHooks.beforeSwap.selector, toBeforeSwapDelta(specified, unspecifiedDelta), 0);\n    }\n\n    function _processAmounts(uint256 amountIn, uint256 amountOut, bool exactInput)\n        internal\n        pure\n        returns (int128 unspecifiedDelta)\n    {\n        uint256 unspecified;\n        if (exactInput) {\n            // Exact-In\n            unspecified = amountOut;\n            unspecifiedDelta = -int128(uint128(unspecified));\n        } else {\n            // Exact-Out\n            unspecified = amountIn;\n            unspecifiedDelta = int128(uint128(unspecified));\n        }\n    }\n\n    function _internalSettle(PoolKey calldata key, SwapParams calldata params)\n        internal\n        returns (uint256 amountIn, uint256 amountOut)\n    {\n        Currency settleCurrency = params.zeroForOne ? key.currency1 : key.currency0;\n        Currency takeCurrency = params.zeroForOne ? key.currency0 : key.currency1;\n\n        (uint256 amountSettle, uint256 amountTake, bool hasSettled) =\n            _conductSwap(settleCurrency, takeCurrency, params, key.toId());\n\n        if (!hasSettled) {\n            _settle(settleCurrency, address(this), amountSettle);\n        }\n\n        return (amountTake, amountSettle);\n    }\n\n    function _pay(Currency token, address payer, uint256 amount) internal override {\n        if (payer == address(this)) {\n            token.transfer(address(poolManager), amount);\n        } else {\n            IERC20(Currency.unwrap(token)).safeTransferFrom(payer, address(poolManager), amount);\n        }\n    }\n\n    /// @notice Allows the contract to receive ETH for native currency swaps\n    /// @dev Required for handling native ETH transfers during swap operations\n    receive() external payable virtual {}\n}\n"},"lib/v4-core/src/interfaces/IProtocolFees.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {Currency} from \"../types/Currency.sol\";\nimport {PoolId} from \"../types/PoolId.sol\";\nimport {PoolKey} from \"../types/PoolKey.sol\";\n\n/// @notice Interface for all protocol-fee related functions in the pool manager\ninterface IProtocolFees {\n    /// @notice Thrown when protocol fee is set too high\n    error ProtocolFeeTooLarge(uint24 fee);\n\n    /// @notice Thrown when collectProtocolFees or setProtocolFee is not called by the controller.\n    error InvalidCaller();\n\n    /// @notice Thrown when collectProtocolFees is attempted on a token that is synced.\n    error ProtocolFeeCurrencySynced();\n\n    /// @notice Emitted when the protocol fee controller address is updated in setProtocolFeeController.\n    event ProtocolFeeControllerUpdated(address indexed protocolFeeController);\n\n    /// @notice Emitted when the protocol fee is updated for a pool.\n    event ProtocolFeeUpdated(PoolId indexed id, uint24 protocolFee);\n\n    /// @notice Given a currency address, returns the protocol fees accrued in that currency\n    /// @param currency The currency to check\n    /// @return amount The amount of protocol fees accrued in the currency\n    function protocolFeesAccrued(Currency currency) external view returns (uint256 amount);\n\n    /// @notice Sets the protocol fee for the given pool\n    /// @param key The key of the pool to set a protocol fee for\n    /// @param newProtocolFee The fee to set\n    function setProtocolFee(PoolKey memory key, uint24 newProtocolFee) external;\n\n    /// @notice Sets the protocol fee controller\n    /// @param controller The new protocol fee controller\n    function setProtocolFeeController(address controller) external;\n\n    /// @notice Collects the protocol fees for a given recipient and currency, returning the amount collected\n    /// @dev This will revert if the contract is unlocked\n    /// @param recipient The address to receive the protocol fees\n    /// @param currency The currency to withdraw\n    /// @param amount The amount of currency to withdraw\n    /// @return amountCollected The amount of currency successfully withdrawn\n    function collectProtocolFees(address recipient, Currency currency, uint256 amount)\n        external\n        returns (uint256 amountCollected);\n\n    /// @notice Returns the current protocol fee controller address\n    /// @return address The current protocol fee controller address\n    function protocolFeeController() external view returns (address);\n}\n"},"lib/v4-periphery/src/base/ImmutableState.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {IPoolManager} from \"@uniswap/v4-core/src/interfaces/IPoolManager.sol\";\nimport {IImmutableState} from \"../interfaces/IImmutableState.sol\";\n\n/// @title Immutable State\n/// @notice A collection of immutable state variables, commonly used across multiple contracts\ncontract ImmutableState is IImmutableState {\n    /// @inheritdoc IImmutableState\n    IPoolManager public immutable poolManager;\n\n    /// @notice Thrown when the caller is not PoolManager\n    error NotPoolManager();\n\n    /// @notice Only allow calls from the PoolManager contract\n    modifier onlyPoolManager() {\n        if (msg.sender != address(poolManager)) revert NotPoolManager();\n        _;\n    }\n\n    constructor(IPoolManager _poolManager) {\n        poolManager = _poolManager;\n    }\n}\n"},"lib/v4-core/src/libraries/CurrencyReserves.sol":{"content":"// SPDX-License-Identifier: BUSL-1.1\npragma solidity ^0.8.24;\n\nimport {Currency} from \"../types/Currency.sol\";\nimport {CustomRevert} from \"./CustomRevert.sol\";\n\nlibrary CurrencyReserves {\n    using CustomRevert for bytes4;\n\n    /// bytes32(uint256(keccak256(\"ReservesOf\")) - 1)\n    bytes32 constant RESERVES_OF_SLOT = 0x1e0745a7db1623981f0b2a5d4232364c00787266eb75ad546f190e6cebe9bd95;\n    /// bytes32(uint256(keccak256(\"Currency\")) - 1)\n    bytes32 constant CURRENCY_SLOT = 0x27e098c505d44ec3574004bca052aabf76bd35004c182099d8c575fb238593b9;\n\n    function getSyncedCurrency() internal view returns (Currency currency) {\n        assembly (\"memory-safe\") {\n            currency := tload(CURRENCY_SLOT)\n        }\n    }\n\n    function resetCurrency() internal {\n        assembly (\"memory-safe\") {\n            tstore(CURRENCY_SLOT, 0)\n        }\n    }\n\n    function syncCurrencyAndReserves(Currency currency, uint256 value) internal {\n        assembly (\"memory-safe\") {\n            tstore(CURRENCY_SLOT, and(currency, 0xffffffffffffffffffffffffffffffffffffffff))\n            tstore(RESERVES_OF_SLOT, value)\n        }\n    }\n\n    function getSyncedReserves() internal view returns (uint256 value) {\n        assembly (\"memory-safe\") {\n            value := tload(RESERVES_OF_SLOT)\n        }\n    }\n}\n"},"lib/v4-core/src/libraries/NonzeroDeltaCount.sol":{"content":"// SPDX-License-Identifier: BUSL-1.1\npragma solidity ^0.8.24;\n\n/// @notice This is a temporary library that allows us to use transient storage (tstore/tload)\n/// for the nonzero delta count.\n/// TODO: This library can be deleted when we have the transient keyword support in solidity.\nlibrary NonzeroDeltaCount {\n    // The slot holding the number of nonzero deltas. bytes32(uint256(keccak256(\"NonzeroDeltaCount\")) - 1)\n    bytes32 internal constant NONZERO_DELTA_COUNT_SLOT =\n        0x7d4b3164c6e45b97e7d87b7125a44c5828d005af88f9d751cfd78729c5d99a0b;\n\n    function read() internal view returns (uint256 count) {\n        assembly (\"memory-safe\") {\n            count := tload(NONZERO_DELTA_COUNT_SLOT)\n        }\n    }\n\n    function increment() internal {\n        assembly (\"memory-safe\") {\n            let count := tload(NONZERO_DELTA_COUNT_SLOT)\n            count := add(count, 1)\n            tstore(NONZERO_DELTA_COUNT_SLOT, count)\n        }\n    }\n\n    /// @notice Potential to underflow. Ensure checks are performed by integrating contracts to ensure this does not happen.\n    /// Current usage ensures this will not happen because we call decrement with known boundaries (only up to the number of times we call increment).\n    function decrement() internal {\n        assembly (\"memory-safe\") {\n            let count := tload(NONZERO_DELTA_COUNT_SLOT)\n            count := sub(count, 1)\n            tstore(NONZERO_DELTA_COUNT_SLOT, count)\n        }\n    }\n}\n"},"lib/v4-core/src/libraries/ProtocolFeeLibrary.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n/// @notice library of functions related to protocol fees\nlibrary ProtocolFeeLibrary {\n    /// @notice Max protocol fee is 0.1% (1000 pips)\n    /// @dev Increasing these values could lead to overflow in Pool.swap\n    uint16 public constant MAX_PROTOCOL_FEE = 1000;\n\n    /// @notice Thresholds used for optimized bounds checks on protocol fees\n    uint24 internal constant FEE_0_THRESHOLD = 1001;\n    uint24 internal constant FEE_1_THRESHOLD = 1001 << 12;\n\n    /// @notice the protocol fee is represented in hundredths of a bip\n    uint256 internal constant PIPS_DENOMINATOR = 1_000_000;\n\n    function getZeroForOneFee(uint24 self) internal pure returns (uint16) {\n        return uint16(self & 0xfff);\n    }\n\n    function getOneForZeroFee(uint24 self) internal pure returns (uint16) {\n        return uint16(self >> 12);\n    }\n\n    function isValidProtocolFee(uint24 self) internal pure returns (bool valid) {\n        // Equivalent to: getZeroForOneFee(self) <= MAX_PROTOCOL_FEE && getOneForZeroFee(self) <= MAX_PROTOCOL_FEE\n        assembly (\"memory-safe\") {\n            let isZeroForOneFeeOk := lt(and(self, 0xfff), FEE_0_THRESHOLD)\n            let isOneForZeroFeeOk := lt(and(self, 0xfff000), FEE_1_THRESHOLD)\n            valid := and(isZeroForOneFeeOk, isOneForZeroFeeOk)\n        }\n    }\n\n    // The protocol fee is taken from the input amount first and then the LP fee is taken from the remaining\n    // The swap fee is capped at 100%\n    // Equivalent to protocolFee + lpFee(1_000_000 - protocolFee) / 1_000_000 (rounded up)\n    /// @dev here `self` is just a single direction's protocol fee, not a packed type of 2 protocol fees\n    function calculateSwapFee(uint16 self, uint24 lpFee) internal pure returns (uint24 swapFee) {\n        // protocolFee + lpFee - (protocolFee * lpFee / 1_000_000)\n        assembly (\"memory-safe\") {\n            self := and(self, 0xfff)\n            lpFee := and(lpFee, 0xffffff)\n            let numerator := mul(self, lpFee)\n            swapFee := sub(add(self, lpFee), div(numerator, PIPS_DENOMINATOR))\n        }\n    }\n}\n"},"lib/protocol-fees/src/interfaces/IV4FeePolicy.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {IPoolManager} from \"v4-core/interfaces/IPoolManager.sol\";\nimport {PoolKey} from \"v4-core/types/PoolKey.sol\";\nimport {Currency} from \"v4-core/types/Currency.sol\";\n\n/// @dev A single segment of the piecewise-linear protocol-fee schedule on the\n/// StaticNativeMath path. Buckets are stored in an ascending-by-lpFeeFloor array.\n/// For a given `key.fee`, evaluation finds the bucket with the largest floor\n/// <= key.fee (or bucket 0 if key.fee < floor_0) and returns\n/// alpha + beta * (key.fee - floor) / 1_000_000 per direction (clamped to\n/// MAX_PROTOCOL_FEE).\nstruct FeeBucket {\n  /// @dev LP-fee floor for this bucket, in pips. Ascending across the array; matches v4-core fee\n  /// type.\n  uint24 lpFeeFloor;\n  /// @dev Flat base fee per direction in pips. Must be <= MAX_PROTOCOL_FEE (1000).\n  uint24 alphaPips;\n  /// @dev Slope: pips of protocol fee per pip of (lpFee - floor). Capped to 1_000_000_000\n  /// (above which any 1-pip delta saturates the per-direction MAX_PROTOCOL_FEE clamp).\n  uint32 betaPips;\n}\n\n/// @dev A flag-to-family mapping rule. The policy walks rules in order; the first rule\n/// whose requiredFlags are all present in the hook's self-reported flags wins.\nstruct FlagRule {\n  /// @dev Bitmask of flags that must ALL be set in the hook's protocolFeeFlags() return\n  /// value for this rule to match. The bits are an opaque convention between governance\n  /// and hooks; see the governance guide for the values in active use.\n  uint256 requiredFlags;\n  /// @dev The family ID assigned when this rule matches. Must be > 0.\n  uint8 familyId;\n}\n\n/// @dev Hook address and family for `batchSetHookFamily`.\nstruct HookFamilyAssignment {\n  address hook;\n  uint8 familyId;\n}\n\n/// @dev Token pair, family slot, and fee for `batchSetPairClassFee`.\nstruct PairClassFeeAssignment {\n  Currency currency0;\n  Currency currency1;\n  uint8 familyId;\n  uint24 feeValue;\n}\n\n/// @dev Token pair and family slot for `batchClearPairClassFee`.\nstruct PairClassFeeClear {\n  Currency currency0;\n  Currency currency1;\n  uint8 familyId;\n}\n\n/// @title IV4FeePolicy\n/// @notice Interface for the V4 fee policy contract that computes protocol fees based on\n/// automated hook classification and governance-configured parameters.\n/// @dev Governance hook family IDs are 1-255. 0 = unclassified. `NATIVE_MATH_FAMILY_ID`\n/// (255) is also used internally for native-math resolution on static pools; governance may\n/// reuse 255 for classified config when appropriate.\n/// Hooks can self-report behavioral flags via IFeeClassifiedHook.protocolFeeFlags();\n/// governance-configured flag rules map flag patterns to families automatically.\n/// Static NativeMath pools bypass hook classification and derive their protocol fee from\n/// `pairClassFees[pair][NATIVE_MATH_FAMILY_ID]` or a piecewise-linear fee-bucket schedule.\n/// Custom-accounting hooks and dynamic fee pools require classification (governance\n/// override, flag rule match, or defaultFee fallback).\n/// @custom:security-contact security@uniswap.org\ninterface IV4FeePolicy {\n  // --- Errors ---\n\n  /// @notice Thrown when an unauthorized address calls a restricted function.\n  error Unauthorized();\n\n  /// @notice Thrown when a fee value fails ProtocolFeeLibrary.isValidProtocolFee.\n  error InvalidFeeValue();\n\n  /// @notice Thrown when familyId is 0 or `NATIVE_MATH_FAMILY_ID` on family-default setters.\n  error InvalidFamilyId();\n\n  /// @notice Thrown when a fee bucket's `betaPips` exceeds 1_000_000_000.\n  error MultiplierTooLarge();\n\n  /// @notice Thrown when currency0 >= currency1 in setPairClassFee.\n  error CurrenciesOutOfOrder();\n\n  /// @notice Thrown when a flag rule has requiredFlags == 0 or a non-governance familyId.\n  error InvalidFlagRule();\n\n  /// @notice Thrown when flag rules exceed the maximum allowed count.\n  error TooManyFlagRules();\n\n  /// @notice Thrown when flag rules are not sorted from most to least specific.\n  error FlagRulesNotSorted();\n\n  /// @notice Thrown when setFeeBuckets is called with an empty array.\n  error EmptyBuckets();\n\n  /// @notice Thrown when fee buckets are not in strictly ascending order of lpFeeFloor.\n  error BucketsNotAscending();\n\n  /// @notice Thrown when fee buckets exceed the maximum allowed count.\n  error TooManyBuckets();\n\n  // --- Events ---\n\n  /// @notice Emitted when the fee setter address is updated.\n  /// @param oldFeeSetter The previous fee setter address.\n  /// @param newFeeSetter The new fee setter address.\n  event FeeSetterUpdated(address indexed oldFeeSetter, address indexed newFeeSetter);\n\n  /// @notice Emitted when a hook's family classification is set or cleared.\n  /// @param hook The hook address that was classified.\n  /// @param familyId The assigned family ID (0 = unclassified).\n  event HookFamilySet(address indexed hook, uint8 familyId);\n\n  /// @notice Emitted when a family's default protocol fee is updated.\n  /// @dev `feeValue` is the encoded storage value: 0 = removed/unset,\n  /// ZERO_FEE_SENTINEL = explicit zero fee.\n  /// @param familyId The family whose default was changed.\n  /// @param feeValue The new encoded default fee.\n  event FamilyDefaultUpdated(uint8 indexed familyId, uint24 feeValue);\n\n  /// @notice Emitted when a pair class fee is updated.\n  /// @dev `feeValue` is the encoded storage value: 0 = removed/unset,\n  /// ZERO_FEE_SENTINEL = explicit zero fee. `familyId` is `NATIVE_MATH_FAMILY_ID` for\n  /// native-math pair overrides, or a governance family ID (1-255) otherwise.\n  /// @param pairHash The canonical hash of the token pair.\n  /// @param familyId The family slot that was changed.\n  /// @param feeValue The new encoded fee.\n  event PairClassFeeUpdated(bytes32 indexed pairHash, uint8 indexed familyId, uint24 feeValue);\n\n  /// @notice Emitted when the fee buckets array is replaced.\n  /// @param bucketCount The number of buckets in the new array.\n  event FeeBucketsUpdated(uint256 bucketCount);\n\n  /// @notice Emitted when the default classified fee is updated.\n  /// @dev `feeValue` is the encoded storage value: 0 = removed/unset,\n  /// ZERO_FEE_SENTINEL = explicit zero fee.\n  /// @param feeValue The new encoded default fee.\n  event DefaultFeeUpdated(uint24 feeValue);\n\n  /// @notice Emitted when the hooked native-math fee switch is toggled.\n  /// @param enabled True if hooked native-math pools are now classified as native math.\n  event HookedNativeMathFeeOnUpdated(bool enabled);\n\n  /// @notice Emitted when the flag rules array is replaced.\n  /// @param ruleCount The number of rules in the new array.\n  event FlagRulesUpdated(uint256 ruleCount);\n\n  // --- Constants ---\n\n  /// @notice Bitmask for the four RETURNS_DELTA flags (bits 0-3 of hook address).\n  /// @dev BEFORE_SWAP_RETURNS_DELTA (bit 3) | AFTER_SWAP_RETURNS_DELTA (bit 2) |\n  /// AFTER_ADD_LIQUIDITY_RETURNS_DELTA (bit 1) | AFTER_REMOVE_LIQUIDITY_RETURNS_DELTA (bit 0)\n  /// @return The bitmask value (0xF).\n  function CUSTOM_ACCOUNTING_MASK() external pure returns (uint160);\n\n  /// @notice Reserved `pairClassFees` family slot for native-math pair overrides.\n  /// @dev Not assignable as a governance hook family. Distinct from `hookFamilyId == 0`.\n  /// @return 0xFF (255 == `type(uint8).max`).\n  function NATIVE_MATH_FAMILY_ID() external pure returns (uint8);\n\n  /// @notice Reserved `pairClassFees` family slot for unclassified hooks.\n  /// @dev Not assignable as a governance hook family. Distinct from `NATIVE_MATH_FAMILY_ID`.\n  /// @return 0 (unclassified).\n  function UNCLASSIFIED_FAMILY_ID() external pure returns (uint8);\n\n  // --- Immutables ---\n\n  /// @notice The Uniswap V4 PoolManager this policy reads state from.\n  /// @return The PoolManager contract.\n  function POOL_MANAGER() external view returns (IPoolManager);\n\n  // --- State ---\n\n  /// @notice The address authorized to configure fees.\n  /// @return The current fee setter address.\n  function feeSetter() external view returns (address);\n\n  /// @notice Fallback fee for classified pools when no family-specific config applies.\n  /// @dev Also used for unclassified hooks (familyId == 0). Sentinel-encoded in storage.\n  /// @return The sentinel-encoded default fee.\n  function defaultFee() external view returns (uint24);\n\n  /// @notice Whether native-math pools that carry a hook are classified as native math.\n  /// @dev Hookless native-math pools are always native math. When false (the default),\n  /// hooked native-math pools bypass the native-math family and fall through to flag-rule\n  /// classification / `defaultFee`, so the bucket schedule does not apply to them. Flip to\n  /// true to bring hooked native-math pools onto the same native-math fee path as hookless\n  /// pools.\n  /// @return True if hooked native-math pools are treated as native math.\n  function isHookedNativeMathFeeOn() external view returns (bool);\n\n  /// @notice Returns the governance-assigned family ID for a hook.\n  /// @dev 0 = unclassified on the classified path. StaticNativeMath pools do not use this.\n  /// @param hook The hook address to query.\n  /// @return The family ID (0-255).\n  function hookFamilyId(address hook) external view returns (uint8);\n\n  /// @notice Returns the default protocol fee for a given family ID.\n  /// @param familyId The family to query (must be > 0 when set via admin).\n  /// @return The sentinel-encoded default fee for the family.\n  function familyDefaults(uint8 familyId) external view returns (uint24);\n\n  /// @notice Returns the pair class fee for a token pair and family slot.\n  /// @dev `familyId == NATIVE_MATH_FAMILY_ID` is the StaticNativeMath pair override.\n  /// Governance families use IDs 1-255; `NATIVE_MATH_FAMILY_ID` is the native-math slot.\n  /// 0 in storage = not set.\n  /// @param pairHash The canonical keccak256 hash of the sorted token pair.\n  /// @param familyId The family slot to query.\n  /// @return The sentinel-encoded fee (0 = not set).\n  function pairClassFees(bytes32 pairHash, uint8 familyId) external view returns (uint24);\n\n  /// @notice Returns the number of fee buckets configured.\n  /// @return The count of fee buckets.\n  function feeBucketsLength() external view returns (uint256);\n\n  /// @notice Returns the fee bucket at the given index.\n  /// @param index The zero-based index into the buckets array.\n  /// @return lpFeeFloor The LP-fee floor for this bucket.\n  /// @return alphaPips The flat base fee per direction in pips.\n  /// @return betaPips The slope: pips of protocol fee per pip of (lpFee - floor).\n  function feeBucket(uint256 index)\n    external\n    view\n    returns (uint24 lpFeeFloor, uint24 alphaPips, uint32 betaPips);\n\n  /// @notice Returns the number of flag rules configured.\n  /// @return The count of flag rules.\n  function flagRulesLength() external view returns (uint256);\n\n  /// @notice Returns the flag rule at the given index.\n  /// @param index The zero-based index into the rules array.\n  /// @return requiredFlags The flags that must all be present for a match.\n  /// @return familyId The family ID assigned on match.\n  function flagRules(uint256 index) external view returns (uint256 requiredFlags, uint8 familyId);\n\n  // --- Pure Classification ---\n\n  /// @notice Returns true if the hook has any RETURNS_DELTA flag set (bits 0-3).\n  /// @dev Pure function of the hook address — no storage reads, no external calls.\n  /// @param hook The hook address to check.\n  /// @return True if the hook performs custom accounting.\n  function isCustomAccounting(address hook) external pure returns (bool);\n\n  // --- Fee Computation ---\n\n  /// @notice Computes the protocol fee for a pool.\n  /// @dev Resolve family, then: native math (`NATIVE_MATH_FAMILY_ID` on static pools) →\n  /// `pairClassFees[pair][family]` → `familyDefaults[family]` → `defaultFee`.\n  /// Unclassified custom-accounting / dynamic-fee pools (`family == 0`) → `defaultFee` only.\n  /// Callable by anyone (no access control) for offchain tooling.\n  /// @param key The pool key to compute the fee for.\n  /// @return fee The computed protocol fee (two 12-bit directional components packed).\n  function computeFee(PoolKey calldata key) external view returns (uint24 fee);\n\n  // --- Admin (onlyOwner) ---\n\n  /// @notice Sets the fee setter address. Only callable by owner.\n  /// @param newFeeSetter The new fee setter address.\n  function setFeeSetter(address newFeeSetter) external;\n\n  // --- Classification (onlyFeeSetter) ---\n\n  /// @notice Assign a hook to a governance-defined family.\n  /// @dev familyId 0 unclassifies the hook. Overwrites any existing classification.\n  /// @param hook The hook address to classify.\n  /// @param familyId The family ID to assign (0 = unclassify).\n  function setHookFamily(address hook, uint8 familyId) external;\n\n  /// @notice Assigns multiple hooks to families in one transaction.\n  /// @param assignments Hook/family pairs. Emits `HookFamilySet` per entry.\n  function batchSetHookFamily(HookFamilyAssignment[] calldata assignments) external;\n\n  // --- Flag Rules (onlyFeeSetter) ---\n\n  /// @notice Replaces the entire flag rules array atomically.\n  /// @dev Rules are checked in order; the first rule whose requiredFlags are all present\n  /// in the hook's self-reported flags wins. Rules must be sorted by non-increasing\n  /// number of set bits in requiredFlags, so more specific patterns come first. Each\n  /// rule must have requiredFlags != 0 and familyId > 0. Max 32 rules.\n  /// @param rules The new flag rules, ordered by match priority (first match wins).\n  function setFlagRules(FlagRule[] calldata rules) external;\n\n  /// @notice Removes all flag rules.\n  function clearFlagRules() external;\n\n  // --- Default Fee (onlyFeeSetter) ---\n\n  /// @notice Sets the fallback fee for classified pools (including unclassified hooks).\n  /// @dev Setting 0 sets an explicit zero fee. Use clearDefaultFee to remove entirely.\n  /// @param feeValue The protocol fee to set. Must pass isValidProtocolFee if non-zero.\n  function setDefaultFee(uint24 feeValue) external;\n\n  /// @notice Removes the default fee, so unclassified pools return 0.\n  function clearDefaultFee() external;\n\n  /// @notice Toggles whether hooked native-math pools are classified as native math.\n  /// @dev Only callable by feeSetter. When enabled, native-math pools that carry a hook\n  /// resolve to `NATIVE_MATH_FAMILY_ID` and follow the same pair-class-fee / bucket schedule\n  /// as hookless pools. When disabled (the default), they fall through to flag-rule\n  /// classification / `defaultFee`. Hookless native-math pools are unaffected.\n  /// @param enabled True to bring hooked native-math pools onto the native-math fee path.\n  function setHookedNativeMathFeeOn(bool enabled) external;\n\n  // --- Fee Bucket Configuration (onlyFeeSetter) ---\n\n  /// @notice Replaces the entire fee-buckets array atomically.\n  /// @dev Must be non-empty, ascending by `lpFeeFloor` (strict), and at most 16 buckets.\n  /// Each bucket: `alphaPips <= MAX_PROTOCOL_FEE` (1000), `betaPips <= 1_000_000_000`.\n  /// The lowest bucket's `alpha` acts as a minimum-fee floor for very-low-LP-fee pools\n  /// because of the snap-to-lowest behavior in `computeFee`.\n  /// Reverts: `EmptyBuckets`, `TooManyBuckets`, `BucketsNotAscending`,\n  /// `InvalidFeeValue` (alpha out of range), `MultiplierTooLarge` (beta out of range).\n  /// @param buckets The new fee buckets, ordered ascending by lpFeeFloor.\n  function setFeeBuckets(FeeBucket[] calldata buckets) external;\n\n  /// @notice Removes all fee buckets. StaticNativeMath returns 0 when no pair class fee is set.\n  function clearFeeBuckets() external;\n\n  // --- Family Defaults (onlyFeeSetter) ---\n\n  /// @notice Sets the default protocol fee for a governance family (1-254).\n  /// @dev Reverts for 0 and `NATIVE_MATH_FAMILY_ID` (use pair class fees / buckets for 255).\n  /// Setting fee 0 sets explicit zero. Use clearFamilyDefault to remove entirely.\n  /// @param familyId The family to configure.\n  /// @param feeValue The default fee. Must pass isValidProtocolFee if non-zero.\n  function setFamilyDefault(uint8 familyId, uint24 feeValue) external;\n\n  /// @notice Removes the default fee for a governance family (1-254).\n  /// @dev Reverts for 0 and `NATIVE_MATH_FAMILY_ID`.\n  /// @param familyId The family to clear.\n  function clearFamilyDefault(uint8 familyId) external;\n\n  // --- Pair Class Fees (onlyFeeSetter) ---\n\n  /// @notice Sets the pair class fee for a token pair and family slot.\n  /// @dev Use `NATIVE_MATH_FAMILY_ID` for native-math pair overrides, or 1-255 for\n  /// governance families. Setting fee 0 sets explicit zero and does not fall through.\n  /// Use clearPairClassFee to remove entirely.\n  /// @param currency0 The lower currency of the pair (must be < currency1).\n  /// @param currency1 The higher currency of the pair.\n  /// @param familyId The family slot (`NATIVE_MATH_FAMILY_ID` or 1-255).\n  /// @param feeValue The protocol fee. Must pass isValidProtocolFee if non-zero.\n  function setPairClassFee(Currency currency0, Currency currency1, uint8 familyId, uint24 feeValue)\n    external;\n\n  /// @notice Sets multiple pair class fees in one transaction.\n  /// @param assignments Pair/family/fee tuples. Emits `PairClassFeeUpdated` per entry.\n  function batchSetPairClassFee(PairClassFeeAssignment[] calldata assignments) external;\n\n  /// @notice Removes the pair class fee for a family slot.\n  /// @param currency0 The lower currency of the pair (must be < currency1).\n  /// @param currency1 The higher currency of the pair.\n  /// @param familyId The family slot to clear.\n  function clearPairClassFee(Currency currency0, Currency currency1, uint8 familyId) external;\n\n  /// @notice Clears multiple pair class fees in one transaction.\n  /// @param clears Pair/family slots to remove. Emits `PairClassFeeUpdated` with fee 0 per entry.\n  function batchClearPairClassFee(PairClassFeeClear[] calldata clears) external;\n}\n"},"lib/protocol-fees/src/interfaces/IV4FeeAdapter.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {IPoolManager} from \"v4-core/interfaces/IPoolManager.sol\";\nimport {PoolKey} from \"v4-core/types/PoolKey.sol\";\nimport {PoolId} from \"v4-core/types/PoolId.sol\";\nimport {Currency} from \"v4-core/types/Currency.sol\";\nimport {IV4FeePolicy} from \"./IV4FeePolicy.sol\";\n\n/// @title IV4FeeAdapter\n/// @notice Interface for the V4 fee adapter — the protocolFeeController registered on the\n/// PoolManager. Resolves fees via pool overrides or policy delegation, triggers fee updates,\n/// and collects accrued fees to the TokenJar.\n/// @custom:security-contact security@uniswap.org\ninterface IV4FeeAdapter {\n  // --- Errors ---\n\n  /// @notice Thrown when an unauthorized address calls a restricted function.\n  error Unauthorized();\n\n  /// @notice Thrown when a zero address is provided.\n  error ZeroAddress();\n\n  /// @notice Thrown when a fee value fails ProtocolFeeLibrary.isValidProtocolFee.\n  error InvalidFeeValue();\n\n  // --- Events ---\n\n  /// @notice Emitted when the policy contract is updated.\n  /// @param oldPolicy The previous policy address.\n  /// @param newPolicy The new policy address.\n  event PolicyUpdated(address indexed oldPolicy, address indexed newPolicy);\n\n  /// @notice Emitted when a pool override is set or removed.\n  /// @dev `feeValue` is the encoded storage value: 0 = removed/unset,\n  /// ZERO_FEE_SENTINEL = explicit zero fee.\n  /// @param poolId The pool whose override changed.\n  /// @param feeValue The new encoded fee value.\n  event PoolOverrideUpdated(PoolId indexed poolId, uint24 feeValue);\n\n  /// @notice Emitted when the fee setter address is updated.\n  /// @param oldFeeSetter The previous fee setter address.\n  /// @param newFeeSetter The new fee setter address.\n  event FeeSetterUpdated(address indexed oldFeeSetter, address indexed newFeeSetter);\n\n  /// @notice Emitted when a fee update is triggered for a pool.\n  /// @param caller The address that triggered the update.\n  /// @param poolId The pool that was updated.\n  /// @param feeValue The protocol fee that was set on the PoolManager.\n  event FeeUpdateTriggered(address indexed caller, PoolId indexed poolId, uint24 feeValue);\n\n  /// @notice Emitted when protocol fees are collected.\n  /// @param currency The currency that was collected.\n  /// @param amount The amount collected.\n  event FeesCollected(Currency indexed currency, uint256 amount);\n\n  // --- Structs ---\n\n  /// @notice Parameters for collecting protocol fees.\n  struct CollectParams {\n    /// @dev The currency to collect.\n    Currency currency;\n    /// @dev The amount to collect. 0 = collect all accrued.\n    uint256 amount;\n  }\n\n  // --- Immutables ---\n\n  /// @notice The Uniswap V4 PoolManager this adapter controls fees for.\n  /// @return The PoolManager contract.\n  function POOL_MANAGER() external view returns (IPoolManager);\n\n  /// @notice The address where collected fees are sent.\n  /// @return The TokenJar address.\n  function TOKEN_JAR() external view returns (address);\n\n  /// @notice Sentinel value representing an explicit zero fee in storage.\n  /// @dev type(uint24).max — safe because isValidProtocolFee rejects it.\n  /// @return The sentinel value (0xFFFFFF).\n  function ZERO_FEE_SENTINEL() external pure returns (uint24);\n\n  // --- State ---\n\n  /// @notice The address authorized to set pool overrides.\n  /// @return The current fee setter address.\n  function feeSetter() external view returns (address);\n\n  /// @notice The current fee policy contract.\n  /// @return The policy contract address.\n  function policy() external view returns (IV4FeePolicy);\n\n  /// @notice Returns the pool-specific fee override.\n  /// @param poolId The pool to query.\n  /// @return The sentinel-encoded fee override. 0 = not set.\n  function poolOverrides(PoolId poolId) external view returns (uint24);\n\n  // --- Admin (onlyOwner) ---\n\n  /// @notice Sets the fee policy contract. Only callable by owner.\n  /// @dev Setting address(0) disables policy — all non-overridden pools get fee 0.\n  /// @param newPolicy The new policy contract address.\n  function setPolicy(IV4FeePolicy newPolicy) external;\n\n  /// @notice Sets the fee setter address. Only callable by owner.\n  /// @param newFeeSetter The new fee setter address.\n  function setFeeSetter(address newFeeSetter) external;\n\n  // --- Pool Overrides (onlyFeeSetter) ---\n\n  /// @notice Sets a pool-specific fee override (highest priority in waterfall).\n  /// @dev Setting 0 sets an explicit zero fee (does NOT fall through to policy).\n  /// Use clearPoolOverride to remove the override entirely.\n  /// @param poolId The pool to override.\n  /// @param feeValue The protocol fee to set. Must pass isValidProtocolFee if non-zero.\n  function setPoolOverride(PoolId poolId, uint24 feeValue) external;\n\n  /// @notice Removes a pool-specific fee override, falling through to policy.\n  /// @param poolId The pool to clear the override for.\n  function clearPoolOverride(PoolId poolId) external;\n\n  // --- Fee Resolution ---\n\n  /// @notice Resolves the protocol fee for a pool: pool override → policy → 0.\n  /// @param key The pool key to resolve the fee for.\n  /// @return fee The resolved protocol fee.\n  function getFee(PoolKey memory key) external view returns (uint24 fee);\n\n  // --- Permissionless Triggering ---\n\n  /// @notice Triggers a fee update for a single pool. Permissionless.\n  /// @dev Silently skips uninitialized pools (sqrtPriceX96 == 0).\n  /// @param key The pool key to update.\n  function triggerFeeUpdate(PoolKey calldata key) external;\n\n  /// @notice Triggers fee updates for multiple pools. Permissionless.\n  /// @dev Silently skips uninitialized pools.\n  /// @param keys The pool keys to update.\n  function batchTriggerFeeUpdate(PoolKey[] calldata keys) external;\n\n  // --- Collection ---\n\n  /// @notice Collects protocol fees to the TOKEN_JAR. Permissionless.\n  /// @dev Safe because funds always go to the immutable TOKEN_JAR. The PoolManager\n  /// enforces that only the protocolFeeController (this contract) can call\n  /// collectProtocolFees.\n  /// @param params Array of currencies and amounts to collect.\n  function collect(CollectParams[] calldata params) external;\n}\n"},"lib/v4-periphery/src/libraries/ActionConstants.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n/// @title Action Constants\n/// @notice Common constants used in actions\n/// @dev Constants are gas efficient alternatives to their literal values\nlibrary ActionConstants {\n    /// @notice used to signal that an action should use the input value of the open delta on the pool manager\n    /// or of the balance that the contract holds\n    uint128 internal constant OPEN_DELTA = 0;\n    /// @notice used to signal that an action should use the contract's entire balance of a currency\n    /// This value is equivalent to 1<<255, i.e. a singular 1 in the most significant bit.\n    uint256 internal constant CONTRACT_BALANCE = 0x8000000000000000000000000000000000000000000000000000000000000000;\n\n    /// @notice used to signal that the recipient of an action should be the msgSender\n    address internal constant MSG_SENDER = address(1);\n\n    /// @notice used to signal that the recipient of an action should be the address(this)\n    address internal constant ADDRESS_THIS = address(2);\n}\n"},"lib/v4-core/src/libraries/TransientStateLibrary.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.24;\n\nimport {IPoolManager} from \"../interfaces/IPoolManager.sol\";\nimport {Currency} from \"../types/Currency.sol\";\nimport {CurrencyReserves} from \"./CurrencyReserves.sol\";\nimport {NonzeroDeltaCount} from \"./NonzeroDeltaCount.sol\";\nimport {Lock} from \"./Lock.sol\";\n\n/// @notice A helper library to provide state getters that use exttload\nlibrary TransientStateLibrary {\n    /// @notice returns the reserves for the synced currency\n    /// @param manager The pool manager contract.\n\n    /// @return uint256 The reserves of the currency.\n    /// @dev returns 0 if the reserves are not synced or value is 0.\n    /// Checks the synced currency to only return valid reserve values (after a sync and before a settle).\n    function getSyncedReserves(IPoolManager manager) internal view returns (uint256) {\n        if (getSyncedCurrency(manager).isAddressZero()) return 0;\n        return uint256(manager.exttload(CurrencyReserves.RESERVES_OF_SLOT));\n    }\n\n    function getSyncedCurrency(IPoolManager manager) internal view returns (Currency) {\n        return Currency.wrap(address(uint160(uint256(manager.exttload(CurrencyReserves.CURRENCY_SLOT)))));\n    }\n\n    /// @notice Returns the number of nonzero deltas open on the PoolManager that must be zeroed out before the contract is locked\n    function getNonzeroDeltaCount(IPoolManager manager) internal view returns (uint256) {\n        return uint256(manager.exttload(NonzeroDeltaCount.NONZERO_DELTA_COUNT_SLOT));\n    }\n\n    /// @notice Get the current delta for a caller in the given currency\n    /// @param target The credited account address\n    /// @param currency The currency for which to lookup the delta\n    function currencyDelta(IPoolManager manager, address target, Currency currency) internal view returns (int256) {\n        bytes32 key;\n        assembly (\"memory-safe\") {\n            mstore(0, and(target, 0xffffffffffffffffffffffffffffffffffffffff))\n            mstore(32, and(currency, 0xffffffffffffffffffffffffffffffffffffffff))\n            key := keccak256(0, 64)\n        }\n        return int256(uint256(manager.exttload(key)));\n    }\n\n    /// @notice Returns whether the contract is unlocked or not\n    function isUnlocked(IPoolManager manager) internal view returns (bool) {\n        return manager.exttload(Lock.IS_UNLOCKED_SLOT) != 0x0;\n    }\n}\n"},"lib/v4-periphery/src/interfaces/IImmutableState.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {IPoolManager} from \"@uniswap/v4-core/src/interfaces/IPoolManager.sol\";\n\n/// @title IImmutableState\n/// @notice Interface for the ImmutableState contract\ninterface IImmutableState {\n    /// @notice The Uniswap v4 PoolManager contract\n    function poolManager() external view returns (IPoolManager);\n}\n"},"src/aggregator-hooks/interfaces/IAggregatorHook.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {PoolId} from \"@uniswap/v4-core/src/types/PoolId.sol\";\n\n/// @title IAggregatorHook\n/// @notice Interface for the AggregatorHook contract. An implemented aggregator hook should be able to use liquidity from external sources\ninterface IAggregatorHook {\n    error UnspecifiedAmountExceeded();\n    error PoolDoesNotExist();\n    error LiquidityNotAllowed();\n\n    event AggregatorPoolRegistered(PoolId indexed poolId);\n    event TokenJarUpdated(address indexed tokenJar);\n    event HookSwap(PoolId indexed poolId, address indexed sender, int256 amount0, int256 amount1, uint24 swapFee);\n\n    /// @notice Quotes amount of unspecified side for a given amount of specified side\n    /// @param zeroToOne Whether the swap is from token0 to token1 or from token1 to token0\n    /// @param amountSpecified The amount of tokens in or out (negative for exact-in, positive for exact-out)\n    /// @return amountUnspecified amount of unspecified side (always positive to adhere to practices by other quote functions)\n    /// @dev This function is meant to be called as a view function even though it is not one. This is because the swap\n    /// might be simulated but not finalized. Applies protocol fee on top of the raw quote from the underlying liquidity source\n    function quote(bool zeroToOne, int256 amountSpecified, PoolId poolId) external returns (uint256 amountUnspecified);\n\n    /// @notice Returns the pseudo TVL: the amount of the UniswapV4 pool's tokens locked in the aggregated pool\n    /// @param poolId The pool ID of the UniswapV4 pool\n    /// @return amount0 The amount of token0 in the aggregated pool\n    /// @return amount1 The amount of token1 in the aggregated pool\n    function pseudoTotalValueLocked(PoolId poolId) external returns (uint256 amount0, uint256 amount1);\n}\n"},"lib/v4-core/src/interfaces/external/IERC20Minimal.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n/// @title Minimal ERC20 interface for Uniswap\n/// @notice Contains a subset of the full ERC20 interface that is used in Uniswap V3\ninterface IERC20Minimal {\n    /// @notice Returns an account's balance in the token\n    /// @param account The account for which to look up the number of tokens it has, i.e. its balance\n    /// @return The number of tokens held by the account\n    function balanceOf(address account) external view returns (uint256);\n\n    /// @notice Transfers the amount of token from the `msg.sender` to the recipient\n    /// @param recipient The account that will receive the amount transferred\n    /// @param amount The number of tokens to send from the sender to the recipient\n    /// @return Returns true for a successful transfer, false for an unsuccessful transfer\n    function transfer(address recipient, uint256 amount) external returns (bool);\n\n    /// @notice Returns the current allowance given to a spender by an owner\n    /// @param owner The account of the token owner\n    /// @param spender The account of the token spender\n    /// @return The current allowance granted by `owner` to `spender`\n    function allowance(address owner, address spender) external view returns (uint256);\n\n    /// @notice Sets the allowance of a spender from the `msg.sender` to the value `amount`\n    /// @param spender The account which will be allowed to spend a given amount of the owners tokens\n    /// @param amount The amount of tokens allowed to be used by `spender`\n    /// @return Returns true for a successful approval, false for unsuccessful\n    function approve(address spender, uint256 amount) external returns (bool);\n\n    /// @notice Transfers `amount` tokens from `sender` to `recipient` up to the allowance given to the `msg.sender`\n    /// @param sender The account from which the transfer will be initiated\n    /// @param recipient The recipient of the transfer\n    /// @param amount The amount of the transfer\n    /// @return Returns true for a successful transfer, false for unsuccessful\n    function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);\n\n    /// @notice Event emitted when tokens are transferred from one address to another, either via `#transfer` or `#transferFrom`.\n    /// @param from The account from which the tokens were sent, i.e. the balance decreased\n    /// @param to The account to which the tokens were sent, i.e. the balance increased\n    /// @param value The amount of tokens that were transferred\n    event Transfer(address indexed from, address indexed to, uint256 value);\n\n    /// @notice Event emitted when the approval amount for the spender of a given owner's tokens changes.\n    /// @param owner The account that approved spending of its tokens\n    /// @param spender The account for which the spending allowance was modified\n    /// @param value The new allowance from the owner to the spender\n    event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n"},"lib/v4-core/src/interfaces/external/IERC6909Claims.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n/// @notice Interface for claims over a contract balance, wrapped as a ERC6909\ninterface IERC6909Claims {\n    /*//////////////////////////////////////////////////////////////\n                                 EVENTS\n    //////////////////////////////////////////////////////////////*/\n\n    event OperatorSet(address indexed owner, address indexed operator, bool approved);\n\n    event Approval(address indexed owner, address indexed spender, uint256 indexed id, uint256 amount);\n\n    event Transfer(address caller, address indexed from, address indexed to, uint256 indexed id, uint256 amount);\n\n    /*//////////////////////////////////////////////////////////////\n                                 FUNCTIONS\n    //////////////////////////////////////////////////////////////*/\n\n    /// @notice Owner balance of an id.\n    /// @param owner The address of the owner.\n    /// @param id The id of the token.\n    /// @return amount The balance of the token.\n    function balanceOf(address owner, uint256 id) external view returns (uint256 amount);\n\n    /// @notice Spender allowance of an id.\n    /// @param owner The address of the owner.\n    /// @param spender The address of the spender.\n    /// @param id The id of the token.\n    /// @return amount The allowance of the token.\n    function allowance(address owner, address spender, uint256 id) external view returns (uint256 amount);\n\n    /// @notice Checks if a spender is approved by an owner as an operator\n    /// @param owner The address of the owner.\n    /// @param spender The address of the spender.\n    /// @return approved The approval status.\n    function isOperator(address owner, address spender) external view returns (bool approved);\n\n    /// @notice Transfers an amount of an id from the caller to a receiver.\n    /// @param receiver The address of the receiver.\n    /// @param id The id of the token.\n    /// @param amount The amount of the token.\n    /// @return bool True, always, unless the function reverts\n    function transfer(address receiver, uint256 id, uint256 amount) external returns (bool);\n\n    /// @notice Transfers an amount of an id from a sender to a receiver.\n    /// @param sender The address of the sender.\n    /// @param receiver The address of the receiver.\n    /// @param id The id of the token.\n    /// @param amount The amount of the token.\n    /// @return bool True, always, unless the function reverts\n    function transferFrom(address sender, address receiver, uint256 id, uint256 amount) external returns (bool);\n\n    /// @notice Approves an amount of an id to a spender.\n    /// @param spender The address of the spender.\n    /// @param id The id of the token.\n    /// @param amount The amount of the token.\n    /// @return bool True, always\n    function approve(address spender, uint256 id, uint256 amount) external returns (bool);\n\n    /// @notice Sets or removes an operator for the caller.\n    /// @param operator The address of the operator.\n    /// @param approved The approval status.\n    /// @return bool True, always\n    function setOperator(address operator, bool approved) external returns (bool);\n}\n"},"lib/protocol-fees/src/interfaces/IFeeClassifiedHook.sol":{"content":"// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity ^0.8.26;\n\n/// @title IFeeClassifiedHook\n/// @notice Optional interface for v4 hooks to self-report behavioral flags for\n/// protocol fee classification.\n/// @dev Hooks return an opaque uint256 bitfield. The V4FeePolicy ascribes no meaning\n/// to individual bits — it only matches the returned value against governance-configured\n/// flag rules to derive a family ID. Gas-capped staticcall prevents griefing.\n/// Governance can always override via setHookFamily(). See the governance guide for the\n/// bit conventions in active use.\n/// @custom:security-contact security@uniswap.org\ninterface IFeeClassifiedHook {\n  /// @notice Returns the hook's self-reported behavioral flags.\n  /// @dev Return 0 to indicate no self-classification (falls through to defaultFee).\n  /// The bitfield is opaque to the policy; see the governance guide for active conventions.\n  function protocolFeeFlags() external view returns (uint256);\n}\n"},"lib/openzeppelin-contracts/contracts/interfaces/IERC20.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC20.sol)\n\npragma solidity >=0.4.16;\n\nimport {IERC20} from \"../token/ERC20/IERC20.sol\";\n"},"lib/openzeppelin-contracts/contracts/interfaces/IERC165.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC165.sol)\n\npragma solidity >=0.4.16;\n\nimport {IERC165} from \"../utils/introspection/IERC165.sol\";\n"},"lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol)\n\npragma solidity >=0.4.16;\n\n/**\n * @dev Interface of the ERC-20 standard as defined in the ERC.\n */\ninterface IERC20 {\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    /**\n     * @dev Returns the value of tokens in existence.\n     */\n    function totalSupply() external view returns (uint256);\n\n    /**\n     * @dev Returns the value of tokens owned by `account`.\n     */\n    function balanceOf(address account) external view returns (uint256);\n\n    /**\n     * @dev Moves a `value` amount of tokens from the caller's account to `to`.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transfer(address to, uint256 value) 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 a `value` amount of tokens as the allowance of `spender` over the\n     * 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 value) external returns (bool);\n\n    /**\n     * @dev Moves a `value` amount of tokens from `from` to `to` using the\n     * allowance mechanism. `value` 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(address from, address to, uint256 value) external returns (bool);\n}\n"},"lib/openzeppelin-contracts/contracts/interfaces/IERC1363.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC1363.sol)\n\npragma solidity >=0.6.2;\n\nimport {IERC20} from \"./IERC20.sol\";\nimport {IERC165} from \"./IERC165.sol\";\n\n/**\n * @title IERC1363\n * @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363].\n *\n * Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract\n * after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction.\n */\ninterface IERC1363 is IERC20, IERC165 {\n    /*\n     * Note: the ERC-165 identifier for this interface is 0xb0202a11.\n     * 0xb0202a11 ===\n     *   bytes4(keccak256('transferAndCall(address,uint256)')) ^\n     *   bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^\n     *   bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^\n     *   bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^\n     *   bytes4(keccak256('approveAndCall(address,uint256)')) ^\n     *   bytes4(keccak256('approveAndCall(address,uint256,bytes)'))\n     */\n\n    /**\n     * @dev Moves a `value` amount of tokens from the caller's account to `to`\n     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n     * @param to The address which you want to transfer to.\n     * @param value The amount of tokens to be transferred.\n     * @return A boolean value indicating whether the operation succeeded unless throwing.\n     */\n    function transferAndCall(address to, uint256 value) external returns (bool);\n\n    /**\n     * @dev Moves a `value` amount of tokens from the caller's account to `to`\n     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n     * @param to The address which you want to transfer to.\n     * @param value The amount of tokens to be transferred.\n     * @param data Additional data with no specified format, sent in call to `to`.\n     * @return A boolean value indicating whether the operation succeeded unless throwing.\n     */\n    function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool);\n\n    /**\n     * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\n     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n     * @param from The address which you want to send tokens from.\n     * @param to The address which you want to transfer to.\n     * @param value The amount of tokens to be transferred.\n     * @return A boolean value indicating whether the operation succeeded unless throwing.\n     */\n    function transferFromAndCall(address from, address to, uint256 value) external returns (bool);\n\n    /**\n     * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\n     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n     * @param from The address which you want to send tokens from.\n     * @param to The address which you want to transfer to.\n     * @param value The amount of tokens to be transferred.\n     * @param data Additional data with no specified format, sent in call to `to`.\n     * @return A boolean value indicating whether the operation succeeded unless throwing.\n     */\n    function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool);\n\n    /**\n     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\n     * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\n     * @param spender The address which will spend the funds.\n     * @param value The amount of tokens to be spent.\n     * @return A boolean value indicating whether the operation succeeded unless throwing.\n     */\n    function approveAndCall(address spender, uint256 value) external returns (bool);\n\n    /**\n     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\n     * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\n     * @param spender The address which will spend the funds.\n     * @param value The amount of tokens to be spent.\n     * @param data Additional data with no specified format, sent in call to `spender`.\n     * @return A boolean value indicating whether the operation succeeded unless throwing.\n     */\n    function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool);\n}\n"},"lib/openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.5.0) (token/ERC20/utils/SafeERC20.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"../IERC20.sol\";\nimport {IERC1363} from \"../../../interfaces/IERC1363.sol\";\n\n/**\n * @title SafeERC20\n * @dev Wrappers around ERC-20 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    /**\n     * @dev An operation with an ERC-20 token failed.\n     */\n    error SafeERC20FailedOperation(address token);\n\n    /**\n     * @dev Indicates a failed `decreaseAllowance` request.\n     */\n    error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease);\n\n    /**\n     * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,\n     * non-reverting calls are assumed to be successful.\n     */\n    function safeTransfer(IERC20 token, address to, uint256 value) internal {\n        if (!_safeTransfer(token, to, value, true)) {\n            revert SafeERC20FailedOperation(address(token));\n        }\n    }\n\n    /**\n     * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the\n     * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.\n     */\n    function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\n        if (!_safeTransferFrom(token, from, to, value, true)) {\n            revert SafeERC20FailedOperation(address(token));\n        }\n    }\n\n    /**\n     * @dev Variant of {safeTransfer} that returns a bool instead of reverting if the operation is not successful.\n     */\n    function trySafeTransfer(IERC20 token, address to, uint256 value) internal returns (bool) {\n        return _safeTransfer(token, to, value, false);\n    }\n\n    /**\n     * @dev Variant of {safeTransferFrom} that returns a bool instead of reverting if the operation is not successful.\n     */\n    function trySafeTransferFrom(IERC20 token, address from, address to, uint256 value) internal returns (bool) {\n        return _safeTransferFrom(token, from, to, value, false);\n    }\n\n    /**\n     * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\n     * non-reverting calls are assumed to be successful.\n     *\n     * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \"client\"\n     * smart contract uses ERC-7674 to set temporary allowances, then the \"client\" smart contract should avoid using\n     * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\n     * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\n     */\n    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n        uint256 oldAllowance = token.allowance(address(this), spender);\n        forceApprove(token, spender, oldAllowance + value);\n    }\n\n    /**\n     * @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no\n     * value, non-reverting calls are assumed to be successful.\n     *\n     * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \"client\"\n     * smart contract uses ERC-7674 to set temporary allowances, then the \"client\" smart contract should avoid using\n     * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\n     * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\n     */\n    function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal {\n        unchecked {\n            uint256 currentAllowance = token.allowance(address(this), spender);\n            if (currentAllowance < requestedDecrease) {\n                revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease);\n            }\n            forceApprove(token, spender, currentAllowance - requestedDecrease);\n        }\n    }\n\n    /**\n     * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,\n     * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval\n     * to be set to zero before setting it to a non-zero value, such as USDT.\n     *\n     * NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function\n     * only sets the \"standard\" allowance. Any temporary allowance will remain active, in addition to the value being\n     * set here.\n     */\n    function forceApprove(IERC20 token, address spender, uint256 value) internal {\n        if (!_safeApprove(token, spender, value, false)) {\n            if (!_safeApprove(token, spender, 0, true)) revert SafeERC20FailedOperation(address(token));\n            if (!_safeApprove(token, spender, value, true)) revert SafeERC20FailedOperation(address(token));\n        }\n    }\n\n    /**\n     * @dev Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no\n     * code. This can be used to implement an {ERC721}-like safe transfer that relies on {ERC1363} checks when\n     * targeting contracts.\n     *\n     * Reverts if the returned value is other than `true`.\n     */\n    function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\n        if (to.code.length == 0) {\n            safeTransfer(token, to, value);\n        } else if (!token.transferAndCall(to, value, data)) {\n            revert SafeERC20FailedOperation(address(token));\n        }\n    }\n\n    /**\n     * @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target\n     * has no code. This can be used to implement an {ERC721}-like safe transfer that relies on {ERC1363} checks when\n     * targeting contracts.\n     *\n     * Reverts if the returned value is other than `true`.\n     */\n    function transferFromAndCallRelaxed(\n        IERC1363 token,\n        address from,\n        address to,\n        uint256 value,\n        bytes memory data\n    ) internal {\n        if (to.code.length == 0) {\n            safeTransferFrom(token, from, to, value);\n        } else if (!token.transferFromAndCall(from, to, value, data)) {\n            revert SafeERC20FailedOperation(address(token));\n        }\n    }\n\n    /**\n     * @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no\n     * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\n     * targeting contracts.\n     *\n     * NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}.\n     * Oppositely, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall}\n     * once without retrying, and relies on the returned value to be true.\n     *\n     * Reverts if the returned value is other than `true`.\n     */\n    function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\n        if (to.code.length == 0) {\n            forceApprove(token, to, value);\n        } else if (!token.approveAndCall(to, value, data)) {\n            revert SafeERC20FailedOperation(address(token));\n        }\n    }\n\n    /**\n     * @dev Imitates a Solidity `token.transfer(to, value)` call, relaxing the requirement on the return value: the\n     * return value is optional (but if data is returned, it must not be false).\n     *\n     * @param token The token targeted by the call.\n     * @param to The recipient of the tokens\n     * @param value The amount of token to transfer\n     * @param bubble Behavior switch if the transfer call reverts: bubble the revert reason or return a false boolean.\n     */\n    function _safeTransfer(IERC20 token, address to, uint256 value, bool bubble) private returns (bool success) {\n        bytes4 selector = IERC20.transfer.selector;\n\n        assembly (\"memory-safe\") {\n            let fmp := mload(0x40)\n            mstore(0x00, selector)\n            mstore(0x04, and(to, shr(96, not(0))))\n            mstore(0x24, value)\n            success := call(gas(), token, 0, 0x00, 0x44, 0x00, 0x20)\n            // if call success and return is true, all is good.\n            // otherwise (not success or return is not true), we need to perform further checks\n            if iszero(and(success, eq(mload(0x00), 1))) {\n                // if the call was a failure and bubble is enabled, bubble the error\n                if and(iszero(success), bubble) {\n                    returndatacopy(fmp, 0x00, returndatasize())\n                    revert(fmp, returndatasize())\n                }\n                // if the return value is not true, then the call is only successful if:\n                // - the token address has code\n                // - the returndata is empty\n                success := and(success, and(iszero(returndatasize()), gt(extcodesize(token), 0)))\n            }\n            mstore(0x40, fmp)\n        }\n    }\n\n    /**\n     * @dev Imitates a Solidity `token.transferFrom(from, to, value)` call, relaxing the requirement on the return\n     * value: the return value is optional (but if data is returned, it must not be false).\n     *\n     * @param token The token targeted by the call.\n     * @param from The sender of the tokens\n     * @param to The recipient of the tokens\n     * @param value The amount of token to transfer\n     * @param bubble Behavior switch if the transfer call reverts: bubble the revert reason or return a false boolean.\n     */\n    function _safeTransferFrom(\n        IERC20 token,\n        address from,\n        address to,\n        uint256 value,\n        bool bubble\n    ) private returns (bool success) {\n        bytes4 selector = IERC20.transferFrom.selector;\n\n        assembly (\"memory-safe\") {\n            let fmp := mload(0x40)\n            mstore(0x00, selector)\n            mstore(0x04, and(from, shr(96, not(0))))\n            mstore(0x24, and(to, shr(96, not(0))))\n            mstore(0x44, value)\n            success := call(gas(), token, 0, 0x00, 0x64, 0x00, 0x20)\n            // if call success and return is true, all is good.\n            // otherwise (not success or return is not true), we need to perform further checks\n            if iszero(and(success, eq(mload(0x00), 1))) {\n                // if the call was a failure and bubble is enabled, bubble the error\n                if and(iszero(success), bubble) {\n                    returndatacopy(fmp, 0x00, returndatasize())\n                    revert(fmp, returndatasize())\n                }\n                // if the return value is not true, then the call is only successful if:\n                // - the token address has code\n                // - the returndata is empty\n                success := and(success, and(iszero(returndatasize()), gt(extcodesize(token), 0)))\n            }\n            mstore(0x40, fmp)\n            mstore(0x60, 0)\n        }\n    }\n\n    /**\n     * @dev Imitates a Solidity `token.approve(spender, value)` call, relaxing the requirement on the return value:\n     * the return value is optional (but if data is returned, it must not be false).\n     *\n     * @param token The token targeted by the call.\n     * @param spender The spender of the tokens\n     * @param value The amount of token to transfer\n     * @param bubble Behavior switch if the transfer call reverts: bubble the revert reason or return a false boolean.\n     */\n    function _safeApprove(IERC20 token, address spender, uint256 value, bool bubble) private returns (bool success) {\n        bytes4 selector = IERC20.approve.selector;\n\n        assembly (\"memory-safe\") {\n            let fmp := mload(0x40)\n            mstore(0x00, selector)\n            mstore(0x04, and(spender, shr(96, not(0))))\n            mstore(0x24, value)\n            success := call(gas(), token, 0, 0x00, 0x44, 0x00, 0x20)\n            // if call success and return is true, all is good.\n            // otherwise (not success or return is not true), we need to perform further checks\n            if iszero(and(success, eq(mload(0x00), 1))) {\n                // if the call was a failure and bubble is enabled, bubble the error\n                if and(iszero(success), bubble) {\n                    returndatacopy(fmp, 0x00, returndatasize())\n                    revert(fmp, returndatasize())\n                }\n                // if the return value is not true, then the call is only successful if:\n                // - the token address has code\n                // - the returndata is empty\n                success := and(success, and(iszero(returndatasize()), gt(extcodesize(token), 0)))\n            }\n            mstore(0x40, fmp)\n        }\n    }\n}\n"},"lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (utils/introspection/IERC165.sol)\n\npragma solidity >=0.4.16;\n\n/**\n * @dev Interface of the ERC-165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[ERC].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165 {\n    /**\n     * @dev Returns true if this contract implements the interface defined by\n     * `interfaceId`. See the corresponding\n     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[ERC section]\n     * to learn more about how these ids are created.\n     *\n     * This function call must use less than 30 000 gas.\n     */\n    function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n"},"src/aggregator-hooks/implementations/StableSwapNG/StableSwapNGAggregator.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity 0.8.29;\n\nimport {BaseAggregatorHook} from \"../../BaseAggregatorHook.sol\";\nimport {ICurveStableSwapNG} from \"./interfaces/ICurveStableSwapNG.sol\";\nimport {ICurveStableSwapFactoryNG} from \"./interfaces/ICurveStableSwapFactoryNG.sol\";\nimport {StateLibrary} from \"@uniswap/v4-core/src/libraries/StateLibrary.sol\";\nimport {PoolId} from \"@uniswap/v4-core/src/types/PoolId.sol\";\nimport {IPoolManager} from \"@uniswap/v4-core/src/interfaces/IPoolManager.sol\";\nimport {PoolKey} from \"@uniswap/v4-core/src/types/PoolKey.sol\";\nimport {SwapParams} from \"@uniswap/v4-core/src/types/PoolOperation.sol\";\nimport {Currency} from \"@uniswap/v4-core/src/types/Currency.sol\";\nimport {IHooks} from \"@uniswap/v4-core/src/interfaces/IHooks.sol\";\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport {SafeERC20} from \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\n\n/// @title StableSwapNGAggregator\n/// @notice Uniswap V4 hook that aggregates liquidity from Curve StableSwap NG pools\n/// @dev Supports both exact-input and exact-output swaps\ncontract StableSwapNGAggregator is BaseAggregatorHook {\n    using StateLibrary for IPoolManager;\n    using SafeERC20 for IERC20;\n\n    /// @notice The Curve StableSwap NG pool\n    ICurveStableSwapNG public immutable pool;\n\n    /// @notice The Curve StableSwap NG factory for checking meta pool status\n    ICurveStableSwapFactoryNG public immutable curveFactory;\n\n    uint256 internal constant INACCURACY_BUFFER = 20;\n    uint256 internal constant INACCURACY_SCALE = 1_000_000;\n\n    struct PoolInfo {\n        int128 token0Index;\n        int128 token1Index;\n    }\n\n    /// @notice Maps Uniswap V4 pool IDs to their corresponding token indices in the Curve pool\n    mapping(PoolId => PoolInfo) public poolIdToTokenInfo;\n\n    error NativeCurrencyNotSupported();\n    error AmountOutExceeded();\n    error TokenNotInPool(address token);\n    error TokensNotInPool(address token0, address token1);\n    error PoolIsMetaPool();\n    error InvalidPoolId();\n\n    constructor(IPoolManager _manager, ICurveStableSwapNG _pool, ICurveStableSwapFactoryNG _curveFactory)\n        BaseAggregatorHook(_manager, \"StableSwapNGAggregator v1.0\")\n    {\n        pool = _pool;\n        curveFactory = _curveFactory;\n    }\n\n    /// @inheritdoc BaseAggregatorHook\n    function _rawQuote(bool zeroToOne, int256 amountSpecified, PoolId poolId)\n        internal\n        view\n        override\n        returns (uint256 amountUnspecified)\n    {\n        PoolInfo storage poolInfo = poolIdToTokenInfo[poolId];\n        if (amountSpecified < 0) {\n            if (zeroToOne) {\n                amountUnspecified = pool.get_dy(poolInfo.token0Index, poolInfo.token1Index, uint256(-amountSpecified));\n            } else {\n                amountUnspecified = pool.get_dy(poolInfo.token1Index, poolInfo.token0Index, uint256(-amountSpecified));\n            }\n        } else {\n            uint256 amount = uint256(amountSpecified);\n            uint256 _amountSpecified = amount + _getBuffer(amount);\n            if (zeroToOne) {\n                amountUnspecified = pool.get_dx(poolInfo.token0Index, poolInfo.token1Index, _amountSpecified);\n            } else {\n                amountUnspecified = pool.get_dx(poolInfo.token1Index, poolInfo.token0Index, _amountSpecified);\n            }\n        }\n    }\n\n    /// @inheritdoc BaseAggregatorHook\n    function pseudoTotalValueLocked(PoolId poolId) external view override returns (uint256 amount0, uint256 amount1) {\n        PoolInfo memory poolInfo = poolIdToTokenInfo[poolId];\n        if (poolInfo.token0Index == 0 && poolInfo.token1Index == 0) revert InvalidPoolId();\n        amount0 = pool.balances(uint256(uint128(poolInfo.token0Index)));\n        amount1 = pool.balances(uint256(uint128(poolInfo.token1Index)));\n    }\n\n    function _beforeInitialize(address, PoolKey calldata key, uint160) internal override returns (bytes4) {\n        if (curveFactory.is_meta(address(pool))) revert PoolIsMetaPool();\n\n        uint256 totalCoins = curveFactory.get_n_coins(address(pool));\n        bool token0Found = false;\n        bool token1Found = false;\n        int128 token0Index;\n        int128 token1Index;\n        for (uint256 i = 0; i < totalCoins; i++) {\n            address coin = pool.coins(i);\n            if (coin == Currency.unwrap(key.currency0)) {\n                token0Index = int128(int256(i));\n                token0Found = true;\n            } else if (coin == Currency.unwrap(key.currency1)) {\n                token1Index = int128(int256(i));\n                token1Found = true;\n            }\n        }\n\n        if (!token0Found && !token1Found) {\n            revert TokensNotInPool(Currency.unwrap(key.currency0), Currency.unwrap(key.currency1));\n        }\n        if (!token0Found) {\n            revert TokenNotInPool(Currency.unwrap(key.currency0));\n        }\n        if (!token1Found) {\n            revert TokenNotInPool(Currency.unwrap(key.currency1));\n        }\n\n        poolIdToTokenInfo[key.toId()] = PoolInfo({token0Index: token0Index, token1Index: token1Index});\n\n        IERC20(Currency.unwrap(key.currency0)).forceApprove(address(pool), type(uint256).max);\n        IERC20(Currency.unwrap(key.currency1)).forceApprove(address(pool), type(uint256).max);\n\n        emit AggregatorPoolRegistered(key.toId());\n        pollTokenJar();\n        return IHooks.beforeInitialize.selector;\n    }\n\n    /// @inheritdoc BaseAggregatorHook\n    function _conductSwap(Currency settleCurrency, Currency takeCurrency, SwapParams calldata params, PoolId poolId)\n        internal\n        override\n        returns (uint256 amountSettle, uint256 amountTake, bool hasSettled)\n    {\n        PoolInfo storage poolInfo = poolIdToTokenInfo[poolId];\n        int128 tokenInIndex;\n        int128 tokenOutIndex;\n        if (params.zeroForOne) {\n            tokenInIndex = poolInfo.token0Index;\n            tokenOutIndex = poolInfo.token1Index;\n        } else {\n            tokenInIndex = poolInfo.token1Index;\n            tokenOutIndex = poolInfo.token0Index;\n        }\n\n        if (params.amountSpecified < 0) {\n            // Exact-In\n            amountTake = uint256(-params.amountSpecified);\n        } else {\n            // Exact-Out: find out how much in (add buffer to cover precision loss)\n            uint256 amount = uint256(params.amountSpecified);\n            amountTake = pool.get_dx(tokenInIndex, tokenOutIndex, amount + _getBuffer(amount));\n        }\n\n        poolManager.take(takeCurrency, address(this), amountTake);\n\n        amountSettle = _handleSwap(amountTake, tokenInIndex, tokenOutIndex, settleCurrency, params);\n        hasSettled = true;\n\n        return (amountSettle, amountTake, hasSettled);\n    }\n\n    function _handleSwap(\n        uint256 amountTake,\n        int128 tokenInIndex,\n        int128 tokenOutIndex,\n        Currency settleCurrency,\n        SwapParams calldata params\n    ) internal returns (uint256 amountOut) {\n        poolManager.sync(settleCurrency);\n        // Is exactOut has accuracy issues on Curve, so we do the gas inefficient way of transferring here first to ensure exact amount\n        if (params.amountSpecified > 0) {\n            // MinAmountOut is 0 to avoid slippage check because it is checked in the router\n            pool.exchange(tokenInIndex, tokenOutIndex, amountTake, 0, address(this));\n            amountOut = uint256(params.amountSpecified);\n            settleCurrency.transfer(address(poolManager), uint256(params.amountSpecified));\n        } else {\n            // MinAmountOut is 0 to avoid slippage check because it is checked in the router\n            amountOut = pool.exchange(tokenInIndex, tokenOutIndex, amountTake, 0, address(poolManager));\n        }\n        poolManager.settle();\n    }\n\n    function _getBuffer(uint256 amount) internal pure returns (uint256) {\n        uint256 scaled = amount / INACCURACY_SCALE;\n        return scaled > INACCURACY_BUFFER ? scaled : INACCURACY_BUFFER;\n    }\n\n    receive() external payable override {\n        revert NativeCurrencyNotSupported();\n    }\n}\n"},"src/aggregator-hooks/implementations/StableSwapNG/interfaces/ICurveStableSwapNG.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n/// @title ICurveStableSwapNG\n/// @notice Interface for Curve StableSwap NG pools\n/// @dev Based on the Vyper implementation at https://github.com/curvefi/stableswap-ng\n/// @dev We have to write our own interface file since the source code is in vyper\ninterface ICurveStableSwapNG {\n    /// @notice Calculates the required input amount for a desired output (inverse quote)\n    /// @param i Index of the input token in the pool\n    /// @param j Index of the output token in the pool\n    /// @param dy Desired amount of output tokens\n    /// @return The required amount of input tokens\n    function get_dx(int128 i, int128 j, uint256 dy) external view returns (uint256);\n\n    /// @notice Calculates the expected output amount for a swap\n    /// @param i Index of the input token in the pool\n    /// @param j Index of the output token in the pool\n    /// @param dx Amount of input tokens to swap\n    /// @return The expected amount of output tokens\n    function get_dy(int128 i, int128 j, uint256 dx) external view returns (uint256);\n\n    /// @notice Executes a token swap with custom receiver\n    /// @param i Index of the input token in the pool\n    /// @param j Index of the output token in the pool\n    /// @param dx Amount of input tokens to swap\n    /// @param min_dy Minimum amount of output tokens to receive (slippage protection)\n    /// @param receiver Address to receive the output tokens\n    /// @return The actual amount of output tokens received\n    function exchange(int128 i, int128 j, uint256 dx, uint256 min_dy, address receiver) external returns (uint256);\n\n    /// @notice Returns the number of coins in the pool\n    /// @return The number of tokens in this pool\n    function N_COINS() external view returns (uint256);\n\n    /// @notice Returns the token address at a given index\n    /// @param i Index of the token in the pool\n    /// @return The token address at that index\n    function coins(uint256 i) external view returns (address);\n\n    /// @notice Returns the balance of a token at a given index\n    /// @param i Index of the token in the pool\n    /// @return The balance of the token at that index\n    function balances(uint256 i) external view returns (uint256);\n}\n"},"src/aggregator-hooks/implementations/StableSwapNG/interfaces/ICurveStableSwapFactoryNG.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n/// @title ICurveStableSwapFactoryNG\n/// @notice Interface for Curve StableSwap NG Factory\n/// @dev Based on the Vyper implementation at https://github.com/curvefi/stableswap-ng\ninterface ICurveStableSwapFactoryNG {\n    /// @notice Deploy a new plain pool\n    /// @param _name Name of the new plain pool\n    /// @param _symbol Symbol for the new plain pool\n    /// @param _coins List of addresses of the coins being used in the pool\n    /// @param _A Amplification coefficient (suggested: 5-10 for algo stables, 100 for non-redeemable, 200-400 for redeemable)\n    /// @param _fee Trade fee with 1e10 precision (max 1% = 100000000)\n    /// @param _offpeg_fee_multiplier Off-peg fee multiplier\n    /// @param _ma_exp_time Moving average time window (e.g., 866 for 10 min EMA)\n    /// @param _implementation_idx Index of the implementation to use\n    /// @param _asset_types Asset types (0=Standard, 1=Oracle, 2=Rebasing, 3=ERC4626)\n    /// @param _method_ids Method IDs for rate oracles (use bytes4(0) for standard tokens)\n    /// @param _oracles Oracle addresses (use address(0) for standard tokens)\n    /// @return The address of the deployed pool\n    function deploy_plain_pool(\n        string memory _name,\n        string memory _symbol,\n        address[] memory _coins,\n        uint256 _A,\n        uint256 _fee,\n        uint256 _offpeg_fee_multiplier,\n        uint256 _ma_exp_time,\n        uint256 _implementation_idx,\n        uint8[] memory _asset_types,\n        bytes4[] memory _method_ids,\n        address[] memory _oracles\n    ) external returns (address);\n\n    /// @notice Set implementation contracts for pools\n    /// @param _implementation_index Implementation index where implementation is stored\n    /// @param _implementation Implementation address to use when deploying plain pools\n    function set_pool_implementations(uint256 _implementation_index, address _implementation) external;\n\n    /// @notice Set implementation contracts for metapools\n    /// @param _implementation_index Implementation index where implementation is stored\n    /// @param _implementation Implementation address to use when deploying metapools\n    function set_metapool_implementations(uint256 _implementation_index, address _implementation) external;\n\n    /// @notice Set implementation contract for StableSwap Math\n    /// @param _math_implementation Address of the math implementation contract\n    function set_math_implementation(address _math_implementation) external;\n\n    /// @notice Set implementation contract for Views methods\n    /// @param _views_implementation Implementation address of views contract\n    function set_views_implementation(address _views_implementation) external;\n\n    /// @notice Set gauge implementation address\n    /// @param _gauge_implementation Address of the gauge implementation\n    function set_gauge_implementation(address _gauge_implementation) external;\n\n    /// @notice Returns the admin address\n    function admin() external view returns (address);\n\n    /// @notice Returns the fee receiver address\n    function fee_receiver() external view returns (address);\n\n    /// @notice Returns the math implementation address\n    function math_implementation() external view returns (address);\n\n    /// @notice Returns the views implementation address\n    function views_implementation() external view returns (address);\n\n    /// @notice Returns the pool implementation at the given index\n    function pool_implementations(uint256 index) external view returns (address);\n\n    /// @notice Returns the number of deployed pools\n    function pool_count() external view returns (uint256);\n\n    /// @notice Returns the pool address at the given index\n    function pool_list(uint256 index) external view returns (address);\n\n    /// @notice Check if a pool is a metapool\n    /// @param _pool Address of the pool\n    /// @return True if the pool is a metapool\n    function is_meta(address _pool) external view returns (bool);\n\n    /// @notice Get the number of coins in a pool\n    /// @param _pool Pool address (must be deployed by this factory)\n    /// @return Number of coins in the pool\n    /// @dev Reverts if pool was not deployed by this factory\n    function get_n_coins(address _pool) external view returns (uint256);\n}\n"}},"language":"Solidity","settings":{"viaIR":false,"metadata":{"appendCBOR":true,"bytecodeHash":"none","useLiteralContent":false},"optimizer":{"runs":44444444,"enabled":true},"evmVersion":"cancun","remappings":["@uniswap/v4-core/=lib/v4-core/","@uniswap/v4-periphery/=lib/v4-periphery/","@uniswap/blocknumberish/=lib/blocknumberish/","@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/","@protocol-fees/=lib/protocol-fees/src/","forge-std/=lib/forge-std/src/","solmate/=lib/v4-core/lib/solmate/","solady/=lib/solady/src/","v4-core/=lib/v4-core/src/","@uniswap/v3-core/=lib/v3-core/","@uniswap/v3-periphery/=lib/v3-periphery/","@uniswap/v2-core/contracts/=lib/v2-core/contracts/","@pancakeswap/v3-core/=lib/pancake-v3-contracts/projects/v3-core/contracts/","@uniswapx/=lib/uniswapx/src/","permit2/=lib/v4-periphery/lib/permit2/","openzeppelin-contracts/=lib/v4-periphery/lib/permit2/lib/openzeppelin-contracts/contracts/","@ensdomains/=lib/v4-core/node_modules/@ensdomains/","@eth-optimism-bedrock/=lib/protocol-fees/lib/optimism/packages/contracts-bedrock/","@nomad-xyz/=lib/slipstream/lib/ExcessivelySafeCall/","@solidity-parser/=lib/slipstream/node_modules/solhint/node_modules/@solidity-parser/","BokkyPooBahsDateTimeLibrary/=lib/protocol-fees/lib/BokkyPooBahsDateTimeLibrary/","ExcessivelySafeCall/=lib/slipstream/lib/ExcessivelySafeCall/src/","FreshCryptoLib/=lib/uniswapx/lib/calibur/lib/webauthn-sol/lib/FreshCryptoLib/solidity/src/","Tribunal/=lib/uniswapx/lib/Tribunal/src/","account-abstraction/=lib/uniswapx/lib/calibur/lib/account-abstraction/contracts/","base64-sol/=lib/slipstream/lib/base64/","base64/=lib/slipstream/lib/base64/","blocknumberish/=lib/blocknumberish/src/","briefcase/=lib/briefcase/src/","calibur/=lib/uniswapx/lib/calibur/","dao-signer/=lib/protocol-fees/lib/dao-signer/","ds-test/=lib/protocol-fees/lib/solmate/lib/ds-test/src/","eas-contracts/=lib/protocol-fees/lib/dao-signer/lib/eas-contracts/contracts/","erc20-eth/=lib/uniswapx/lib/calibur/lib/erc20-eth/src/","erc4626-tests/=lib/fluid-contracts-public/lib/erc4626-tests/","fluid-contracts-public/=lib/fluid-contracts-public/contracts/","forge-gas-snapshot/=lib/uniswapx/lib/forge-gas-snapshot/src/","halmos-cheatcodes/=lib/openzeppelin-contracts/lib/halmos-cheatcodes/src/","hardhat/=lib/v4-core/node_modules/hardhat/","kontrol-cheatcodes/=lib/protocol-fees/lib/optimism/packages/contracts-bedrock/lib/kontrol-cheatcodes/src/","lib-keccak/=lib/protocol-fees/lib/optimism/packages/contracts-bedrock/lib/lib-keccak/contracts/","murky/=lib/protocol-fees/lib/murky/","native-token-transfers/=lib/protocol-fees/lib/","openzeppelin-contracts-upgradeable/=lib/fluid-contracts-public/lib/openzeppelin-contracts-upgradeable/","openzeppelin-contracts-v5/=lib/protocol-fees/lib/optimism/packages/contracts-bedrock/lib/openzeppelin-contracts-v5/","openzeppelin/=lib/uniswapx/lib/openzeppelin-contracts/contracts/","optimism/=lib/protocol-fees/lib/optimism/","pancake-v3-contracts/=lib/pancake-v3-contracts/","protocol-fees/=lib/protocol-fees/","safe-contracts/=lib/protocol-fees/lib/optimism/packages/contracts-bedrock/lib/safe-contracts/","scripts/libraries/Config.sol=lib/protocol-fees/lib/optimism/packages/contracts-bedrock/scripts/libraries/Config.sol","slipstream/=lib/slipstream/","solady-v0.0.245/=lib/protocol-fees/lib/optimism/packages/contracts-bedrock/lib/solady-v0.0.245/src/","solarray/=lib/uniswapx/lib/solarray/src/","soledge/=lib/uniswapx/lib/Tribunal/lib/the-compact/lib/soledge/src/","solidity-bytes-utils/=lib/protocol-fees/lib/native-token-transfers/evm/lib/solidity-bytes-utils/contracts/","solidity-lib/=lib/slipstream/lib/solidity-lib/contracts/","src/AgreementAnchor.sol=lib/protocol-fees/lib/dao-signer/src/AgreementAnchor.sol","src/AgreementAnchorFactory.sol=lib/protocol-fees/lib/dao-signer/src/AgreementAnchorFactory.sol","src/interfaces/IAgreementAnchorFactory.sol=lib/protocol-fees/lib/dao-signer/src/interfaces/IAgreementAnchorFactory.sol","the-compact/=lib/uniswapx/lib/Tribunal/lib/the-compact/","tribunal/=lib/uniswapx/lib/Tribunal/","uniswapx/=lib/uniswapx/","v2-core/=lib/v2-core/contracts/","v3-core/=lib/v3-core/","v3-periphery/=lib/v3-periphery/contracts/","v4-periphery/=lib/v4-periphery/","webauthn-sol/=lib/uniswapx/lib/calibur/lib/webauthn-sol/","wormhole-solidity-sdk/=lib/protocol-fees/lib/native-token-transfers/evm/lib/wormhole-solidity-sdk/src/"]}},"stdJsonOutput":{"sources":{"src/base/BaseHook.sol":{"id":47},"lib/v4-core/src/types/PoolId.sol":{"id":34},"lib/v4-core/src/types/PoolKey.sol":{"id":35},"lib/v4-core/src/libraries/Lock.sol":{"id":23},"lib/v4-core/src/types/Currency.sol":{"id":33},"lib/v4-core/src/libraries/Hooks.sol":{"id":20},"lib/v4-core/src/interfaces/IHooks.sol":{"id":11},"src/aggregator-hooks/ProtocolFees.sol":{"id":42},"lib/v4-core/src/libraries/FullMath.sol":{"id":19},"lib/v4-core/src/libraries/Position.sol":{"id":26},"lib/v4-core/src/libraries/SafeCast.sol":{"id":28},"lib/v4-core/src/types/BalanceDelta.sol":{"id":31},"lib/v4-core/src/types/PoolOperation.sol":{"id":36},"lib/v4-core/src/interfaces/IExtsload.sol":{"id":9},"lib/v4-core/src/interfaces/IExttload.sol":{"id":10},"lib/v4-core/src/libraries/ParseBytes.sol":{"id":25},"lib/v4-core/src/types/BeforeSwapDelta.sol":{"id":32},"lib/v4-core/src/libraries/CustomRevert.sol":{"id":17},"lib/v4-core/src/libraries/LPFeeLibrary.sol":{"id":21},"lib/v4-core/src/libraries/StateLibrary.sol":{"id":29},"lib/v4-core/src/interfaces/IPoolManager.sol":{"id":12},"lib/v4-core/src/libraries/FixedPoint128.sol":{"id":18},"lib/v4-core/src/libraries/LiquidityMath.sol":{"id":22},"lib/v4-periphery/src/base/DeltaResolver.sol":{"id":37},"src/aggregator-hooks/BaseAggregatorHook.sol":{"id":41},"lib/v4-core/src/interfaces/IProtocolFees.sol":{"id":13},"lib/v4-periphery/src/base/ImmutableState.sol":{"id":38},"lib/v4-core/src/libraries/CurrencyReserves.sol":{"id":16},"lib/v4-core/src/libraries/NonzeroDeltaCount.sol":{"id":24},"lib/v4-core/src/libraries/ProtocolFeeLibrary.sol":{"id":27},"lib/protocol-fees/src/interfaces/IV4FeePolicy.sol":{"id":8},"lib/protocol-fees/src/interfaces/IV4FeeAdapter.sol":{"id":7},"lib/v4-periphery/src/libraries/ActionConstants.sol":{"id":40},"lib/v4-core/src/libraries/TransientStateLibrary.sol":{"id":30},"lib/v4-periphery/src/interfaces/IImmutableState.sol":{"id":39},"src/aggregator-hooks/interfaces/IAggregatorHook.sol":{"id":46},"lib/v4-core/src/interfaces/external/IERC20Minimal.sol":{"id":14},"lib/v4-core/src/interfaces/external/IERC6909Claims.sol":{"id":15},"lib/protocol-fees/src/interfaces/IFeeClassifiedHook.sol":{"id":6},"lib/openzeppelin-contracts/contracts/interfaces/IERC20.sol":{"id":2},"lib/openzeppelin-contracts/contracts/interfaces/IERC165.sol":{"id":1},"lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol":{"id":3},"lib/openzeppelin-contracts/contracts/interfaces/IERC1363.sol":{"id":0},"lib/openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol":{"id":4},"lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol":{"id":5},"src/aggregator-hooks/implementations/StableSwapNG/StableSwapNGAggregator.sol":{"id":43},"src/aggregator-hooks/implementations/StableSwapNG/interfaces/ICurveStableSwapNG.sol":{"id":45},"src/aggregator-hooks/implementations/StableSwapNG/interfaces/ICurveStableSwapFactoryNG.sol":{"id":44}},"contracts":{"src/aggregator-hooks/implementations/StableSwapNG/StableSwapNGAggregator.sol":{"StableSwapNGAggregator":{"abi":[{"type":"constructor","inputs":[{"name":"_manager","type":"address","internalType":"contract IPoolManager"},{"name":"_pool","type":"address","internalType":"contract ICurveStableSwapNG"},{"name":"_curveFactory","type":"address","internalType":"contract ICurveStableSwapFactoryNG"}],"stateMutability":"nonpayable"},{"name":"AmountOutExceeded","type":"error","inputs":[]},{"name":"DeltaNotNegative","type":"error","inputs":[{"name":"currency","type":"address","internalType":"Currency"}]},{"name":"DeltaNotPositive","type":"error","inputs":[{"name":"currency","type":"address","internalType":"Currency"}]},{"name":"HookNotImplemented","type":"error","inputs":[]},{"name":"InsufficientBalance","type":"error","inputs":[]},{"name":"InvalidPoolId","type":"error","inputs":[]},{"name":"LiquidityNotAllowed","type":"error","inputs":[]},{"name":"NativeCurrencyNotSupported","type":"error","inputs":[]},{"name":"NotPoolManager","type":"error","inputs":[]},{"name":"PoolDoesNotExist","type":"error","inputs":[]},{"name":"PoolIsMetaPool","type":"error","inputs":[]},{"name":"SafeERC20FailedOperation","type":"error","inputs":[{"name":"token","type":"address","internalType":"address"}]},{"name":"TokenNotInPool","type":"error","inputs":[{"name":"token","type":"address","internalType":"address"}]},{"name":"TokensNotInPool","type":"error","inputs":[{"name":"token0","type":"address","internalType":"address"},{"name":"token1","type":"address","internalType":"address"}]},{"name":"UnspecifiedAmountExceeded","type":"error","inputs":[]},{"name":"AggregatorPoolRegistered","type":"event","inputs":[{"name":"poolId","type":"bytes32","indexed":true,"internalType":"PoolId"}],"anonymous":false},{"name":"HookSwap","type":"event","inputs":[{"name":"poolId","type":"bytes32","indexed":true,"internalType":"PoolId"},{"name":"sender","type":"address","indexed":true,"internalType":"address"},{"name":"amount0","type":"int256","indexed":false,"internalType":"int256"},{"name":"amount1","type":"int256","indexed":false,"internalType":"int256"},{"name":"swapFee","type":"uint24","indexed":false,"internalType":"uint24"}],"anonymous":false},{"name":"ProtocolFeesCollected","type":"event","inputs":[{"name":"recipient","type":"address","indexed":true,"internalType":"address"},{"name":"currency","type":"address","indexed":true,"internalType":"Currency"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"name":"TokenJarUpdated","type":"event","inputs":[{"name":"tokenJar","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"name":"afterAddLiquidity","type":"function","inputs":[{"name":"sender","type":"address","internalType":"address"},{"name":"key","type":"tuple","components":[{"name":"currency0","type":"address","internalType":"Currency"},{"name":"currency1","type":"address","internalType":"Currency"},{"name":"fee","type":"uint24","internalType":"uint24"},{"name":"tickSpacing","type":"int24","internalType":"int24"},{"name":"hooks","type":"address","internalType":"contract IHooks"}],"internalType":"struct PoolKey"},{"name":"params","type":"tuple","components":[{"name":"tickLower","type":"int24","internalType":"int24"},{"name":"tickUpper","type":"int24","internalType":"int24"},{"name":"liquidityDelta","type":"int256","internalType":"int256"},{"name":"salt","type":"bytes32","internalType":"bytes32"}],"internalType":"struct ModifyLiquidityParams"},{"name":"delta","type":"int256","internalType":"BalanceDelta"},{"name":"feesAccrued","type":"int256","internalType":"BalanceDelta"},{"name":"hookData","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"","type":"bytes4","internalType":"bytes4"},{"name":"","type":"int256","internalType":"BalanceDelta"}],"stateMutability":"nonpayable"},{"name":"afterDonate","type":"function","inputs":[{"name":"sender","type":"address","internalType":"address"},{"name":"key","type":"tuple","components":[{"name":"currency0","type":"address","internalType":"Currency"},{"name":"currency1","type":"address","internalType":"Currency"},{"name":"fee","type":"uint24","internalType":"uint24"},{"name":"tickSpacing","type":"int24","internalType":"int24"},{"name":"hooks","type":"address","internalType":"contract IHooks"}],"internalType":"struct PoolKey"},{"name":"amount0","type":"uint256","internalType":"uint256"},{"name":"amount1","type":"uint256","internalType":"uint256"},{"name":"hookData","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"","type":"bytes4","internalType":"bytes4"}],"stateMutability":"nonpayable"},{"name":"afterInitialize","type":"function","inputs":[{"name":"sender","type":"address","internalType":"address"},{"name":"key","type":"tuple","components":[{"name":"currency0","type":"address","internalType":"Currency"},{"name":"currency1","type":"address","internalType":"Currency"},{"name":"fee","type":"uint24","internalType":"uint24"},{"name":"tickSpacing","type":"int24","internalType":"int24"},{"name":"hooks","type":"address","internalType":"contract IHooks"}],"internalType":"struct PoolKey"},{"name":"sqrtPriceX96","type":"uint160","internalType":"uint160"},{"name":"tick","type":"int24","internalType":"int24"}],"outputs":[{"name":"","type":"bytes4","internalType":"bytes4"}],"stateMutability":"nonpayable"},{"name":"afterRemoveLiquidity","type":"function","inputs":[{"name":"sender","type":"address","internalType":"address"},{"name":"key","type":"tuple","components":[{"name":"currency0","type":"address","internalType":"Currency"},{"name":"currency1","type":"address","internalType":"Currency"},{"name":"fee","type":"uint24","internalType":"uint24"},{"name":"tickSpacing","type":"int24","internalType":"int24"},{"name":"hooks","type":"address","internalType":"contract IHooks"}],"internalType":"struct PoolKey"},{"name":"params","type":"tuple","components":[{"name":"tickLower","type":"int24","internalType":"int24"},{"name":"tickUpper","type":"int24","internalType":"int24"},{"name":"liquidityDelta","type":"int256","internalType":"int256"},{"name":"salt","type":"bytes32","internalType":"bytes32"}],"internalType":"struct ModifyLiquidityParams"},{"name":"delta","type":"int256","internalType":"BalanceDelta"},{"name":"feesAccrued","type":"int256","internalType":"BalanceDelta"},{"name":"hookData","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"","type":"bytes4","internalType":"bytes4"},{"name":"","type":"int256","internalType":"BalanceDelta"}],"stateMutability":"nonpayable"},{"name":"afterSwap","type":"function","inputs":[{"name":"sender","type":"address","internalType":"address"},{"name":"key","type":"tuple","components":[{"name":"currency0","type":"address","internalType":"Currency"},{"name":"currency1","type":"address","internalType":"Currency"},{"name":"fee","type":"uint24","internalType":"uint24"},{"name":"tickSpacing","type":"int24","internalType":"int24"},{"name":"hooks","type":"address","internalType":"contract IHooks"}],"internalType":"struct PoolKey"},{"name":"params","type":"tuple","components":[{"name":"zeroForOne","type":"bool","internalType":"bool"},{"name":"amountSpecified","type":"int256","internalType":"int256"},{"name":"sqrtPriceLimitX96","type":"uint160","internalType":"uint160"}],"internalType":"struct SwapParams"},{"name":"delta","type":"int256","internalType":"BalanceDelta"},{"name":"hookData","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"","type":"bytes4","internalType":"bytes4"},{"name":"","type":"int128","internalType":"int128"}],"stateMutability":"nonpayable"},{"name":"aggregatorHookVersion","type":"function","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"view"},{"name":"beforeAddLiquidity","type":"function","inputs":[{"name":"sender","type":"address","internalType":"address"},{"name":"key","type":"tuple","components":[{"name":"currency0","type":"address","internalType":"Currency"},{"name":"currency1","type":"address","internalType":"Currency"},{"name":"fee","type":"uint24","internalType":"uint24"},{"name":"tickSpacing","type":"int24","internalType":"int24"},{"name":"hooks","type":"address","internalType":"contract IHooks"}],"internalType":"struct PoolKey"},{"name":"params","type":"tuple","components":[{"name":"tickLower","type":"int24","internalType":"int24"},{"name":"tickUpper","type":"int24","internalType":"int24"},{"name":"liquidityDelta","type":"int256","internalType":"int256"},{"name":"salt","type":"bytes32","internalType":"bytes32"}],"internalType":"struct ModifyLiquidityParams"},{"name":"hookData","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"","type":"bytes4","internalType":"bytes4"}],"stateMutability":"nonpayable"},{"name":"beforeDonate","type":"function","inputs":[{"name":"sender","type":"address","internalType":"address"},{"name":"key","type":"tuple","components":[{"name":"currency0","type":"address","internalType":"Currency"},{"name":"currency1","type":"address","internalType":"Currency"},{"name":"fee","type":"uint24","internalType":"uint24"},{"name":"tickSpacing","type":"int24","internalType":"int24"},{"name":"hooks","type":"address","internalType":"contract IHooks"}],"internalType":"struct PoolKey"},{"name":"amount0","type":"uint256","internalType":"uint256"},{"name":"amount1","type":"uint256","internalType":"uint256"},{"name":"hookData","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"","type":"bytes4","internalType":"bytes4"}],"stateMutability":"nonpayable"},{"name":"beforeInitialize","type":"function","inputs":[{"name":"sender","type":"address","internalType":"address"},{"name":"key","type":"tuple","components":[{"name":"currency0","type":"address","internalType":"Currency"},{"name":"currency1","type":"address","internalType":"Currency"},{"name":"fee","type":"uint24","internalType":"uint24"},{"name":"tickSpacing","type":"int24","internalType":"int24"},{"name":"hooks","type":"address","internalType":"contract IHooks"}],"internalType":"struct PoolKey"},{"name":"sqrtPriceX96","type":"uint160","internalType":"uint160"}],"outputs":[{"name":"","type":"bytes4","internalType":"bytes4"}],"stateMutability":"nonpayable"},{"name":"beforeRemoveLiquidity","type":"function","inputs":[{"name":"sender","type":"address","internalType":"address"},{"name":"key","type":"tuple","components":[{"name":"currency0","type":"address","internalType":"Currency"},{"name":"currency1","type":"address","internalType":"Currency"},{"name":"fee","type":"uint24","internalType":"uint24"},{"name":"tickSpacing","type":"int24","internalType":"int24"},{"name":"hooks","type":"address","internalType":"contract IHooks"}],"internalType":"struct PoolKey"},{"name":"params","type":"tuple","components":[{"name":"tickLower","type":"int24","internalType":"int24"},{"name":"tickUpper","type":"int24","internalType":"int24"},{"name":"liquidityDelta","type":"int256","internalType":"int256"},{"name":"salt","type":"bytes32","internalType":"bytes32"}],"internalType":"struct ModifyLiquidityParams"},{"name":"hookData","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"","type":"bytes4","internalType":"bytes4"}],"stateMutability":"nonpayable"},{"name":"beforeSwap","type":"function","inputs":[{"name":"sender","type":"address","internalType":"address"},{"name":"key","type":"tuple","components":[{"name":"currency0","type":"address","internalType":"Currency"},{"name":"currency1","type":"address","internalType":"Currency"},{"name":"fee","type":"uint24","internalType":"uint24"},{"name":"tickSpacing","type":"int24","internalType":"int24"},{"name":"hooks","type":"address","internalType":"contract IHooks"}],"internalType":"struct PoolKey"},{"name":"params","type":"tuple","components":[{"name":"zeroForOne","type":"bool","internalType":"bool"},{"name":"amountSpecified","type":"int256","internalType":"int256"},{"name":"sqrtPriceLimitX96","type":"uint160","internalType":"uint160"}],"internalType":"struct SwapParams"},{"name":"hookData","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"","type":"bytes4","internalType":"bytes4"},{"name":"","type":"int256","internalType":"BeforeSwapDelta"},{"name":"","type":"uint24","internalType":"uint24"}],"stateMutability":"nonpayable"},{"name":"curveFactory","type":"function","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract ICurveStableSwapFactoryNG"}],"stateMutability":"view"},{"name":"getHookPermissions","type":"function","inputs":[],"outputs":[{"name":"permissions","type":"tuple","components":[{"name":"beforeInitialize","type":"bool","internalType":"bool"},{"name":"afterInitialize","type":"bool","internalType":"bool"},{"name":"beforeAddLiquidity","type":"bool","internalType":"bool"},{"name":"afterAddLiquidity","type":"bool","internalType":"bool"},{"name":"beforeRemoveLiquidity","type":"bool","internalType":"bool"},{"name":"afterRemoveLiquidity","type":"bool","internalType":"bool"},{"name":"beforeSwap","type":"bool","internalType":"bool"},{"name":"afterSwap","type":"bool","internalType":"bool"},{"name":"beforeDonate","type":"bool","internalType":"bool"},{"name":"afterDonate","type":"bool","internalType":"bool"},{"name":"beforeSwapReturnDelta","type":"bool","internalType":"bool"},{"name":"afterSwapReturnDelta","type":"bool","internalType":"bool"},{"name":"afterAddLiquidityReturnDelta","type":"bool","internalType":"bool"},{"name":"afterRemoveLiquidityReturnDelta","type":"bool","internalType":"bool"}],"internalType":"struct Hooks.Permissions"}],"stateMutability":"pure"},{"name":"pollTokenJar","type":"function","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"nonpayable"},{"name":"pool","type":"function","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract ICurveStableSwapNG"}],"stateMutability":"view"},{"name":"poolIdToTokenInfo","type":"function","inputs":[{"name":"","type":"bytes32","internalType":"PoolId"}],"outputs":[{"name":"token0Index","type":"int128","internalType":"int128"},{"name":"token1Index","type":"int128","internalType":"int128"}],"stateMutability":"view"},{"name":"poolManager","type":"function","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract IPoolManager"}],"stateMutability":"view"},{"name":"protocolFeeFlags","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"protocolFeeMultiplier","type":"function","inputs":[],"outputs":[{"name":"","type":"uint24","internalType":"uint24"}],"stateMutability":"view"},{"name":"pseudoTotalValueLocked","type":"function","inputs":[{"name":"poolId","type":"bytes32","internalType":"PoolId"}],"outputs":[{"name":"amount0","type":"uint256","internalType":"uint256"},{"name":"amount1","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"quote","type":"function","inputs":[{"name":"zeroToOne","type":"bool","internalType":"bool"},{"name":"amountSpecified","type":"int256","internalType":"int256"},{"name":"poolId","type":"bytes32","internalType":"PoolId"}],"outputs":[{"name":"amountUnspecified","type":"uint256","internalType":"uint256"}],"stateMutability":"nonpayable"},{"name":"tokenJar","type":"function","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"receive","stateMutability":"payable"}],"metadata":"{\"compiler\":{\"version\":\"0.8.29+commit.ab55807c\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IPoolManager\",\"name\":\"_manager\",\"type\":\"address\"},{\"internalType\":\"contract ICurveStableSwapNG\",\"name\":\"_pool\",\"type\":\"address\"},{\"internalType\":\"contract ICurveStableSwapFactoryNG\",\"name\":\"_curveFactory\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AmountOutExceeded\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"Currency\",\"name\":\"currency\",\"type\":\"address\"}],\"name\":\"DeltaNotNegative\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"Currency\",\"name\":\"currency\",\"type\":\"address\"}],\"name\":\"DeltaNotPositive\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"HookNotImplemented\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InsufficientBalance\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidPoolId\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"LiquidityNotAllowed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NativeCurrencyNotSupported\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotPoolManager\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PoolDoesNotExist\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PoolIsMetaPool\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"SafeERC20FailedOperation\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"TokenNotInPool\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token0\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"token1\",\"type\":\"address\"}],\"name\":\"TokensNotInPool\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnspecifiedAmountExceeded\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"PoolId\",\"name\":\"poolId\",\"type\":\"bytes32\"}],\"name\":\"AggregatorPoolRegistered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"PoolId\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"amount0\",\"type\":\"int256\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"amount1\",\"type\":\"int256\"},{\"indexed\":false,\"internalType\":\"uint24\",\"name\":\"swapFee\",\"type\":\"uint24\"}],\"name\":\"HookSwap\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"Currency\",\"name\":\"currency\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"ProtocolFeesCollected\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"tokenJar\",\"type\":\"address\"}],\"name\":\"TokenJarUpdated\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"Currency\",\"name\":\"currency0\",\"type\":\"address\"},{\"internalType\":\"Currency\",\"name\":\"currency1\",\"type\":\"address\"},{\"internalType\":\"uint24\",\"name\":\"fee\",\"type\":\"uint24\"},{\"internalType\":\"int24\",\"name\":\"tickSpacing\",\"type\":\"int24\"},{\"internalType\":\"contract IHooks\",\"name\":\"hooks\",\"type\":\"address\"}],\"internalType\":\"struct PoolKey\",\"name\":\"key\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"int24\",\"name\":\"tickLower\",\"type\":\"int24\"},{\"internalType\":\"int24\",\"name\":\"tickUpper\",\"type\":\"int24\"},{\"internalType\":\"int256\",\"name\":\"liquidityDelta\",\"type\":\"int256\"},{\"internalType\":\"bytes32\",\"name\":\"salt\",\"type\":\"bytes32\"}],\"internalType\":\"struct ModifyLiquidityParams\",\"name\":\"params\",\"type\":\"tuple\"},{\"internalType\":\"BalanceDelta\",\"name\":\"delta\",\"type\":\"int256\"},{\"internalType\":\"BalanceDelta\",\"name\":\"feesAccrued\",\"type\":\"int256\"},{\"internalType\":\"bytes\",\"name\":\"hookData\",\"type\":\"bytes\"}],\"name\":\"afterAddLiquidity\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"},{\"internalType\":\"BalanceDelta\",\"name\":\"\",\"type\":\"int256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"Currency\",\"name\":\"currency0\",\"type\":\"address\"},{\"internalType\":\"Currency\",\"name\":\"currency1\",\"type\":\"address\"},{\"internalType\":\"uint24\",\"name\":\"fee\",\"type\":\"uint24\"},{\"internalType\":\"int24\",\"name\":\"tickSpacing\",\"type\":\"int24\"},{\"internalType\":\"contract IHooks\",\"name\":\"hooks\",\"type\":\"address\"}],\"internalType\":\"struct PoolKey\",\"name\":\"key\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"amount0\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount1\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"hookData\",\"type\":\"bytes\"}],\"name\":\"afterDonate\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"Currency\",\"name\":\"currency0\",\"type\":\"address\"},{\"internalType\":\"Currency\",\"name\":\"currency1\",\"type\":\"address\"},{\"internalType\":\"uint24\",\"name\":\"fee\",\"type\":\"uint24\"},{\"internalType\":\"int24\",\"name\":\"tickSpacing\",\"type\":\"int24\"},{\"internalType\":\"contract IHooks\",\"name\":\"hooks\",\"type\":\"address\"}],\"internalType\":\"struct PoolKey\",\"name\":\"key\",\"type\":\"tuple\"},{\"internalType\":\"uint160\",\"name\":\"sqrtPriceX96\",\"type\":\"uint160\"},{\"internalType\":\"int24\",\"name\":\"tick\",\"type\":\"int24\"}],\"name\":\"afterInitialize\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"Currency\",\"name\":\"currency0\",\"type\":\"address\"},{\"internalType\":\"Currency\",\"name\":\"currency1\",\"type\":\"address\"},{\"internalType\":\"uint24\",\"name\":\"fee\",\"type\":\"uint24\"},{\"internalType\":\"int24\",\"name\":\"tickSpacing\",\"type\":\"int24\"},{\"internalType\":\"contract IHooks\",\"name\":\"hooks\",\"type\":\"address\"}],\"internalType\":\"struct PoolKey\",\"name\":\"key\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"int24\",\"name\":\"tickLower\",\"type\":\"int24\"},{\"internalType\":\"int24\",\"name\":\"tickUpper\",\"type\":\"int24\"},{\"internalType\":\"int256\",\"name\":\"liquidityDelta\",\"type\":\"int256\"},{\"internalType\":\"bytes32\",\"name\":\"salt\",\"type\":\"bytes32\"}],\"internalType\":\"struct ModifyLiquidityParams\",\"name\":\"params\",\"type\":\"tuple\"},{\"internalType\":\"BalanceDelta\",\"name\":\"delta\",\"type\":\"int256\"},{\"internalType\":\"BalanceDelta\",\"name\":\"feesAccrued\",\"type\":\"int256\"},{\"internalType\":\"bytes\",\"name\":\"hookData\",\"type\":\"bytes\"}],\"name\":\"afterRemoveLiquidity\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"},{\"internalType\":\"BalanceDelta\",\"name\":\"\",\"type\":\"int256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"Currency\",\"name\":\"currency0\",\"type\":\"address\"},{\"internalType\":\"Currency\",\"name\":\"currency1\",\"type\":\"address\"},{\"internalType\":\"uint24\",\"name\":\"fee\",\"type\":\"uint24\"},{\"internalType\":\"int24\",\"name\":\"tickSpacing\",\"type\":\"int24\"},{\"internalType\":\"contract IHooks\",\"name\":\"hooks\",\"type\":\"address\"}],\"internalType\":\"struct PoolKey\",\"name\":\"key\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"zeroForOne\",\"type\":\"bool\"},{\"internalType\":\"int256\",\"name\":\"amountSpecified\",\"type\":\"int256\"},{\"internalType\":\"uint160\",\"name\":\"sqrtPriceLimitX96\",\"type\":\"uint160\"}],\"internalType\":\"struct SwapParams\",\"name\":\"params\",\"type\":\"tuple\"},{\"internalType\":\"BalanceDelta\",\"name\":\"delta\",\"type\":\"int256\"},{\"internalType\":\"bytes\",\"name\":\"hookData\",\"type\":\"bytes\"}],\"name\":\"afterSwap\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"},{\"internalType\":\"int128\",\"name\":\"\",\"type\":\"int128\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"aggregatorHookVersion\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"Currency\",\"name\":\"currency0\",\"type\":\"address\"},{\"internalType\":\"Currency\",\"name\":\"currency1\",\"type\":\"address\"},{\"internalType\":\"uint24\",\"name\":\"fee\",\"type\":\"uint24\"},{\"internalType\":\"int24\",\"name\":\"tickSpacing\",\"type\":\"int24\"},{\"internalType\":\"contract IHooks\",\"name\":\"hooks\",\"type\":\"address\"}],\"internalType\":\"struct PoolKey\",\"name\":\"key\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"int24\",\"name\":\"tickLower\",\"type\":\"int24\"},{\"internalType\":\"int24\",\"name\":\"tickUpper\",\"type\":\"int24\"},{\"internalType\":\"int256\",\"name\":\"liquidityDelta\",\"type\":\"int256\"},{\"internalType\":\"bytes32\",\"name\":\"salt\",\"type\":\"bytes32\"}],\"internalType\":\"struct ModifyLiquidityParams\",\"name\":\"params\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"hookData\",\"type\":\"bytes\"}],\"name\":\"beforeAddLiquidity\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"Currency\",\"name\":\"currency0\",\"type\":\"address\"},{\"internalType\":\"Currency\",\"name\":\"currency1\",\"type\":\"address\"},{\"internalType\":\"uint24\",\"name\":\"fee\",\"type\":\"uint24\"},{\"internalType\":\"int24\",\"name\":\"tickSpacing\",\"type\":\"int24\"},{\"internalType\":\"contract IHooks\",\"name\":\"hooks\",\"type\":\"address\"}],\"internalType\":\"struct PoolKey\",\"name\":\"key\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"amount0\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount1\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"hookData\",\"type\":\"bytes\"}],\"name\":\"beforeDonate\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"Currency\",\"name\":\"currency0\",\"type\":\"address\"},{\"internalType\":\"Currency\",\"name\":\"currency1\",\"type\":\"address\"},{\"internalType\":\"uint24\",\"name\":\"fee\",\"type\":\"uint24\"},{\"internalType\":\"int24\",\"name\":\"tickSpacing\",\"type\":\"int24\"},{\"internalType\":\"contract IHooks\",\"name\":\"hooks\",\"type\":\"address\"}],\"internalType\":\"struct PoolKey\",\"name\":\"key\",\"type\":\"tuple\"},{\"internalType\":\"uint160\",\"name\":\"sqrtPriceX96\",\"type\":\"uint160\"}],\"name\":\"beforeInitialize\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"Currency\",\"name\":\"currency0\",\"type\":\"address\"},{\"internalType\":\"Currency\",\"name\":\"currency1\",\"type\":\"address\"},{\"internalType\":\"uint24\",\"name\":\"fee\",\"type\":\"uint24\"},{\"internalType\":\"int24\",\"name\":\"tickSpacing\",\"type\":\"int24\"},{\"internalType\":\"contract IHooks\",\"name\":\"hooks\",\"type\":\"address\"}],\"internalType\":\"struct PoolKey\",\"name\":\"key\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"int24\",\"name\":\"tickLower\",\"type\":\"int24\"},{\"internalType\":\"int24\",\"name\":\"tickUpper\",\"type\":\"int24\"},{\"internalType\":\"int256\",\"name\":\"liquidityDelta\",\"type\":\"int256\"},{\"internalType\":\"bytes32\",\"name\":\"salt\",\"type\":\"bytes32\"}],\"internalType\":\"struct ModifyLiquidityParams\",\"name\":\"params\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"hookData\",\"type\":\"bytes\"}],\"name\":\"beforeRemoveLiquidity\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"Currency\",\"name\":\"currency0\",\"type\":\"address\"},{\"internalType\":\"Currency\",\"name\":\"currency1\",\"type\":\"address\"},{\"internalType\":\"uint24\",\"name\":\"fee\",\"type\":\"uint24\"},{\"internalType\":\"int24\",\"name\":\"tickSpacing\",\"type\":\"int24\"},{\"internalType\":\"contract IHooks\",\"name\":\"hooks\",\"type\":\"address\"}],\"internalType\":\"struct PoolKey\",\"name\":\"key\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"zeroForOne\",\"type\":\"bool\"},{\"internalType\":\"int256\",\"name\":\"amountSpecified\",\"type\":\"int256\"},{\"internalType\":\"uint160\",\"name\":\"sqrtPriceLimitX96\",\"type\":\"uint160\"}],\"internalType\":\"struct SwapParams\",\"name\":\"params\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"hookData\",\"type\":\"bytes\"}],\"name\":\"beforeSwap\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"},{\"internalType\":\"BeforeSwapDelta\",\"name\":\"\",\"type\":\"int256\"},{\"internalType\":\"uint24\",\"name\":\"\",\"type\":\"uint24\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"curveFactory\",\"outputs\":[{\"internalType\":\"contract ICurveStableSwapFactoryNG\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getHookPermissions\",\"outputs\":[{\"components\":[{\"internalType\":\"bool\",\"name\":\"beforeInitialize\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"afterInitialize\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"beforeAddLiquidity\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"afterAddLiquidity\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"beforeRemoveLiquidity\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"afterRemoveLiquidity\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"beforeSwap\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"afterSwap\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"beforeDonate\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"afterDonate\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"beforeSwapReturnDelta\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"afterSwapReturnDelta\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"afterAddLiquidityReturnDelta\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"afterRemoveLiquidityReturnDelta\",\"type\":\"bool\"}],\"internalType\":\"struct Hooks.Permissions\",\"name\":\"permissions\",\"type\":\"tuple\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pollTokenJar\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pool\",\"outputs\":[{\"internalType\":\"contract ICurveStableSwapNG\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"PoolId\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"poolIdToTokenInfo\",\"outputs\":[{\"internalType\":\"int128\",\"name\":\"token0Index\",\"type\":\"int128\"},{\"internalType\":\"int128\",\"name\":\"token1Index\",\"type\":\"int128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"poolManager\",\"outputs\":[{\"internalType\":\"contract IPoolManager\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"protocolFeeFlags\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"protocolFeeMultiplier\",\"outputs\":[{\"internalType\":\"uint24\",\"name\":\"\",\"type\":\"uint24\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"PoolId\",\"name\":\"poolId\",\"type\":\"bytes32\"}],\"name\":\"pseudoTotalValueLocked\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount0\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount1\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"zeroToOne\",\"type\":\"bool\"},{\"internalType\":\"int256\",\"name\":\"amountSpecified\",\"type\":\"int256\"},{\"internalType\":\"PoolId\",\"name\":\"poolId\",\"type\":\"bytes32\"}],\"name\":\"quote\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountUnspecified\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"tokenJar\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"details\":\"Supports both exact-input and exact-output swaps\",\"errors\":{\"SafeERC20FailedOperation(address)\":[{\"details\":\"An operation with an ERC-20 token failed.\"}]},\"kind\":\"dev\",\"methods\":{\"afterAddLiquidity(address,(address,address,uint24,int24,address),(int24,int24,int256,bytes32),int256,int256,bytes)\":{\"params\":{\"delta\":\"The caller's balance delta after adding liquidity; the sum of principal delta, fees accrued, and hook delta\",\"feesAccrued\":\"The fees accrued since the last time fees were collected from this position\",\"hookData\":\"Arbitrary data handed into the PoolManager by the liquidity provider to be passed on to the hook\",\"key\":\"The key for the pool\",\"params\":\"The parameters for adding liquidity\",\"sender\":\"The initial msg.sender for the add liquidity call\"},\"returns\":{\"_0\":\"bytes4 The function selector for the hook\",\"_1\":\"BalanceDelta The hook's delta in token0 and token1. Positive: the hook is owed/took currency, negative: the hook owes/sent currency\"}},\"afterDonate(address,(address,address,uint24,int24,address),uint256,uint256,bytes)\":{\"params\":{\"amount0\":\"The amount of token0 being donated\",\"amount1\":\"The amount of token1 being donated\",\"hookData\":\"Arbitrary data handed into the PoolManager by the donor to be be passed on to the hook\",\"key\":\"The key for the pool\",\"sender\":\"The initial msg.sender for the donate call\"},\"returns\":{\"_0\":\"bytes4 The function selector for the hook\"}},\"afterInitialize(address,(address,address,uint24,int24,address),uint160,int24)\":{\"params\":{\"key\":\"The key for the pool being initialized\",\"sender\":\"The initial msg.sender for the initialize call\",\"sqrtPriceX96\":\"The sqrt(price) of the pool as a Q64.96\",\"tick\":\"The current tick after the state of a pool is initialized\"},\"returns\":{\"_0\":\"bytes4 The function selector for the hook\"}},\"afterRemoveLiquidity(address,(address,address,uint24,int24,address),(int24,int24,int256,bytes32),int256,int256,bytes)\":{\"params\":{\"delta\":\"The caller's balance delta after removing liquidity; the sum of principal delta, fees accrued, and hook delta\",\"feesAccrued\":\"The fees accrued since the last time fees were collected from this position\",\"hookData\":\"Arbitrary data handed into the PoolManager by the liquidity provider to be be passed on to the hook\",\"key\":\"The key for the pool\",\"params\":\"The parameters for removing liquidity\",\"sender\":\"The initial msg.sender for the remove liquidity call\"},\"returns\":{\"_0\":\"bytes4 The function selector for the hook\",\"_1\":\"BalanceDelta The hook's delta in token0 and token1. Positive: the hook is owed/took currency, negative: the hook owes/sent currency\"}},\"afterSwap(address,(address,address,uint24,int24,address),(bool,int256,uint160),int256,bytes)\":{\"params\":{\"delta\":\"The amount owed to the caller (positive) or owed to the pool (negative)\",\"hookData\":\"Arbitrary data handed into the PoolManager by the swapper to be be passed on to the hook\",\"key\":\"The key for the pool\",\"params\":\"The parameters for the swap\",\"sender\":\"The initial msg.sender for the swap call\"},\"returns\":{\"_0\":\"bytes4 The function selector for the hook\",\"_1\":\"int128 The hook's delta in unspecified currency. Positive: the hook is owed/took currency, negative: the hook owes/sent currency\"}},\"beforeAddLiquidity(address,(address,address,uint24,int24,address),(int24,int24,int256,bytes32),bytes)\":{\"params\":{\"hookData\":\"Arbitrary data handed into the PoolManager by the liquidity provider to be passed on to the hook\",\"key\":\"The key for the pool\",\"params\":\"The parameters for adding liquidity\",\"sender\":\"The initial msg.sender for the add liquidity call\"},\"returns\":{\"_0\":\"bytes4 The function selector for the hook\"}},\"beforeDonate(address,(address,address,uint24,int24,address),uint256,uint256,bytes)\":{\"params\":{\"amount0\":\"The amount of token0 being donated\",\"amount1\":\"The amount of token1 being donated\",\"hookData\":\"Arbitrary data handed into the PoolManager by the donor to be be passed on to the hook\",\"key\":\"The key for the pool\",\"sender\":\"The initial msg.sender for the donate call\"},\"returns\":{\"_0\":\"bytes4 The function selector for the hook\"}},\"beforeInitialize(address,(address,address,uint24,int24,address),uint160)\":{\"params\":{\"key\":\"The key for the pool being initialized\",\"sender\":\"The initial msg.sender for the initialize call\",\"sqrtPriceX96\":\"The sqrt(price) of the pool as a Q64.96\"},\"returns\":{\"_0\":\"bytes4 The function selector for the hook\"}},\"beforeRemoveLiquidity(address,(address,address,uint24,int24,address),(int24,int24,int256,bytes32),bytes)\":{\"params\":{\"hookData\":\"Arbitrary data handed into the PoolManager by the liquidity provider to be be passed on to the hook\",\"key\":\"The key for the pool\",\"params\":\"The parameters for removing liquidity\",\"sender\":\"The initial msg.sender for the remove liquidity call\"},\"returns\":{\"_0\":\"bytes4 The function selector for the hook\"}},\"beforeSwap(address,(address,address,uint24,int24,address),(bool,int256,uint160),bytes)\":{\"params\":{\"hookData\":\"Arbitrary data handed into the PoolManager by the swapper to be be passed on to the hook\",\"key\":\"The key for the pool\",\"params\":\"The parameters for the swap\",\"sender\":\"The initial msg.sender for the swap call\"},\"returns\":{\"_0\":\"bytes4 The function selector for the hook\",\"_1\":\"BeforeSwapDelta The hook's delta in specified and unspecified currencies. Positive: the hook is owed/took currency, negative: the hook owes/sent currency\",\"_2\":\"uint24 Optionally override the lp fee, only used if three conditions are met: 1. the Pool has a dynamic fee, 2. the value's 2nd highest bit is set (23rd bit, 0x400000), and 3. the value is less than or equal to the maximum fee (1 million)\"}},\"getHookPermissions()\":{\"details\":\"Used at deployment to validate the address correctly represents the expected permissions\",\"returns\":{\"permissions\":\"Permissions struct\"}},\"pollTokenJar()\":{\"details\":\"This function should not need to be called externally except in the case of the tokenJar address changing after the protocol fee has been set\",\"returns\":{\"_0\":\"The token jar address\"}},\"protocolFeeFlags()\":{\"details\":\"Return 0 to indicate no self-classification (falls through to defaultFee). The bitfield is opaque to the policy; see the governance guide for active conventions.\"},\"pseudoTotalValueLocked(bytes32)\":{\"params\":{\"poolId\":\"The pool ID of the UniswapV4 pool\"},\"returns\":{\"amount0\":\"The amount of token0 in the aggregated pool\",\"amount1\":\"The amount of token1 in the aggregated pool\"}},\"quote(bool,int256,bytes32)\":{\"details\":\"This function is meant to be called as a view function even though it is not one. This is because the swap might be simulated but not finalized. Applies protocol fee on top of the raw quote from the underlying liquidity source\",\"params\":{\"amountSpecified\":\"The amount of tokens in or out (negative for exact-in, positive for exact-out)\",\"zeroToOne\":\"Whether the swap is from token0 to token1 or from token1 to token0\"},\"returns\":{\"amountUnspecified\":\"amount of unspecified side (always positive to adhere to practices by other quote functions)\"}}},\"title\":\"StableSwapNGAggregator\",\"version\":1},\"userdoc\":{\"errors\":{\"DeltaNotNegative(address)\":[{\"notice\":\"Emitted when unexpected positive delta is found.\"}],\"DeltaNotPositive(address)\":[{\"notice\":\"Emitted when unexpected negative delta is found.\"}],\"InsufficientBalance()\":[{\"notice\":\"Emitted when the contract does not have enough balance to wrap or unwrap.\"}],\"NotPoolManager()\":[{\"notice\":\"Thrown when the caller is not PoolManager\"}]},\"kind\":\"user\",\"methods\":{\"afterAddLiquidity(address,(address,address,uint24,int24,address),(int24,int24,int256,bytes32),int256,int256,bytes)\":{\"notice\":\"The hook called after liquidity is added\"},\"afterDonate(address,(address,address,uint24,int24,address),uint256,uint256,bytes)\":{\"notice\":\"The hook called after donate\"},\"afterInitialize(address,(address,address,uint24,int24,address),uint160,int24)\":{\"notice\":\"The hook called after the state of a pool is initialized\"},\"afterRemoveLiquidity(address,(address,address,uint24,int24,address),(int24,int24,int256,bytes32),int256,int256,bytes)\":{\"notice\":\"The hook called after liquidity is removed\"},\"afterSwap(address,(address,address,uint24,int24,address),(bool,int256,uint160),int256,bytes)\":{\"notice\":\"The hook called after a swap\"},\"aggregatorHookVersion()\":{\"notice\":\"The publicly displayed version of the aggregator hook.\"},\"beforeAddLiquidity(address,(address,address,uint24,int24,address),(int24,int24,int256,bytes32),bytes)\":{\"notice\":\"The hook called before liquidity is added\"},\"beforeDonate(address,(address,address,uint24,int24,address),uint256,uint256,bytes)\":{\"notice\":\"The hook called before donate\"},\"beforeInitialize(address,(address,address,uint24,int24,address),uint160)\":{\"notice\":\"The hook called before the state of a pool is initialized\"},\"beforeRemoveLiquidity(address,(address,address,uint24,int24,address),(int24,int24,int256,bytes32),bytes)\":{\"notice\":\"The hook called before liquidity is removed\"},\"beforeSwap(address,(address,address,uint24,int24,address),(bool,int256,uint160),bytes)\":{\"notice\":\"The hook called before a swap\"},\"curveFactory()\":{\"notice\":\"The Curve StableSwap NG factory for checking meta pool status\"},\"getHookPermissions()\":{\"notice\":\"Returns a struct of permissions to signal which hook functions are to be implemented\"},\"pollTokenJar()\":{\"notice\":\"Queries the token jar from the pool manager and emits an event if it is updated\"},\"pool()\":{\"notice\":\"The Curve StableSwap NG pool\"},\"poolIdToTokenInfo(bytes32)\":{\"notice\":\"Maps Uniswap V4 pool IDs to their corresponding token indices in the Curve pool\"},\"poolManager()\":{\"notice\":\"The Uniswap v4 PoolManager contract\"},\"protocolFeeFlags()\":{\"notice\":\"Returns the hook's self-reported behavioral flags.\"},\"pseudoTotalValueLocked(bytes32)\":{\"notice\":\"Returns the pseudo TVL: the amount of the UniswapV4 pool's tokens locked in the aggregated pool\"},\"quote(bool,int256,bytes32)\":{\"notice\":\"Quotes amount of unspecified side for a given amount of specified side\"}},\"notice\":\"Uniswap V4 hook that aggregates liquidity from Curve StableSwap NG pools\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/aggregator-hooks/implementations/StableSwapNG/StableSwapNGAggregator.sol\":\"StableSwapNGAggregator\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\"},\"optimizer\":{\"enabled\":true,\"runs\":44444444},\"remappings\":[\":@ensdomains/=lib/v4-core/node_modules/@ensdomains/\",\":@eth-optimism-bedrock/=lib/protocol-fees/lib/optimism/packages/contracts-bedrock/\",\":@nomad-xyz/=lib/slipstream/lib/ExcessivelySafeCall/\",\":@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/\",\":@pancakeswap/v3-core/=lib/pancake-v3-contracts/projects/v3-core/contracts/\",\":@protocol-fees/=lib/protocol-fees/src/\",\":@solidity-parser/=lib/slipstream/node_modules/solhint/node_modules/@solidity-parser/\",\":@uniswap/blocknumberish/=lib/blocknumberish/\",\":@uniswap/v2-core/contracts/=lib/v2-core/contracts/\",\":@uniswap/v3-core/=lib/v3-core/\",\":@uniswap/v3-periphery/=lib/v3-periphery/\",\":@uniswap/v4-core/=lib/v4-core/\",\":@uniswap/v4-periphery/=lib/v4-periphery/\",\":@uniswapx/=lib/uniswapx/src/\",\":BokkyPooBahsDateTimeLibrary/=lib/protocol-fees/lib/BokkyPooBahsDateTimeLibrary/\",\":ExcessivelySafeCall/=lib/slipstream/lib/ExcessivelySafeCall/src/\",\":FreshCryptoLib/=lib/uniswapx/lib/calibur/lib/webauthn-sol/lib/FreshCryptoLib/solidity/src/\",\":Tribunal/=lib/uniswapx/lib/Tribunal/src/\",\":account-abstraction/=lib/uniswapx/lib/calibur/lib/account-abstraction/contracts/\",\":base64-sol/=lib/slipstream/lib/base64/\",\":base64/=lib/slipstream/lib/base64/\",\":blocknumberish/=lib/blocknumberish/src/\",\":briefcase/=lib/briefcase/src/\",\":calibur/=lib/uniswapx/lib/calibur/\",\":dao-signer/=lib/protocol-fees/lib/dao-signer/\",\":ds-test/=lib/protocol-fees/lib/solmate/lib/ds-test/src/\",\":eas-contracts/=lib/protocol-fees/lib/dao-signer/lib/eas-contracts/contracts/\",\":erc20-eth/=lib/uniswapx/lib/calibur/lib/erc20-eth/src/\",\":erc4626-tests/=lib/fluid-contracts-public/lib/erc4626-tests/\",\":fluid-contracts-public/=lib/fluid-contracts-public/contracts/\",\":forge-gas-snapshot/=lib/uniswapx/lib/forge-gas-snapshot/src/\",\":forge-std/=lib/forge-std/src/\",\":halmos-cheatcodes/=lib/openzeppelin-contracts/lib/halmos-cheatcodes/src/\",\":hardhat/=lib/v4-core/node_modules/hardhat/\",\":kontrol-cheatcodes/=lib/protocol-fees/lib/optimism/packages/contracts-bedrock/lib/kontrol-cheatcodes/src/\",\":lib-keccak/=lib/protocol-fees/lib/optimism/packages/contracts-bedrock/lib/lib-keccak/contracts/\",\":murky/=lib/protocol-fees/lib/murky/\",\":native-token-transfers/=lib/protocol-fees/lib/\",\":openzeppelin-contracts-upgradeable/=lib/fluid-contracts-public/lib/openzeppelin-contracts-upgradeable/\",\":openzeppelin-contracts-v5/=lib/protocol-fees/lib/optimism/packages/contracts-bedrock/lib/openzeppelin-contracts-v5/\",\":openzeppelin-contracts/=lib/v4-periphery/lib/permit2/lib/openzeppelin-contracts/contracts/\",\":openzeppelin/=lib/uniswapx/lib/openzeppelin-contracts/contracts/\",\":optimism/=lib/protocol-fees/lib/optimism/\",\":pancake-v3-contracts/=lib/pancake-v3-contracts/\",\":permit2/=lib/v4-periphery/lib/permit2/\",\":protocol-fees/=lib/protocol-fees/\",\":safe-contracts/=lib/protocol-fees/lib/optimism/packages/contracts-bedrock/lib/safe-contracts/\",\":scripts/libraries/Config.sol=lib/protocol-fees/lib/optimism/packages/contracts-bedrock/scripts/libraries/Config.sol\",\":slipstream/=lib/slipstream/\",\":solady-v0.0.245/=lib/protocol-fees/lib/optimism/packages/contracts-bedrock/lib/solady-v0.0.245/src/\",\":solady/=lib/solady/src/\",\":solarray/=lib/uniswapx/lib/solarray/src/\",\":soledge/=lib/uniswapx/lib/Tribunal/lib/the-compact/lib/soledge/src/\",\":solidity-bytes-utils/=lib/protocol-fees/lib/native-token-transfers/evm/lib/solidity-bytes-utils/contracts/\",\":solidity-lib/=lib/slipstream/lib/solidity-lib/contracts/\",\":solmate/=lib/v4-core/lib/solmate/\",\":src/AgreementAnchor.sol=lib/protocol-fees/lib/dao-signer/src/AgreementAnchor.sol\",\":src/AgreementAnchorFactory.sol=lib/protocol-fees/lib/dao-signer/src/AgreementAnchorFactory.sol\",\":src/interfaces/IAgreementAnchorFactory.sol=lib/protocol-fees/lib/dao-signer/src/interfaces/IAgreementAnchorFactory.sol\",\":the-compact/=lib/uniswapx/lib/Tribunal/lib/the-compact/\",\":tribunal/=lib/uniswapx/lib/Tribunal/\",\":uniswapx/=lib/uniswapx/\",\":v2-core/=lib/v2-core/contracts/\",\":v3-core/=lib/v3-core/\",\":v3-periphery/=lib/v3-periphery/contracts/\",\":v4-core/=lib/v4-core/src/\",\":v4-periphery/=lib/v4-periphery/\",\":webauthn-sol/=lib/uniswapx/lib/calibur/lib/webauthn-sol/\",\":wormhole-solidity-sdk/=lib/protocol-fees/lib/native-token-transfers/evm/lib/wormhole-solidity-sdk/src/\"]},\"sources\":{\"lib/openzeppelin-contracts/contracts/interfaces/IERC1363.sol\":{\"keccak256\":\"0xd5ea07362ab630a6a3dee4285a74cf2377044ca2e4be472755ad64d7c5d4b69d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://da5e832b40fc5c3145d3781e2e5fa60ac2052c9d08af7e300dc8ab80c4343100\",\"dweb:/ipfs/QmTzf7N5ZUdh5raqtzbM11yexiUoLC9z3Ws632MCuycq1d\"]},\"lib/openzeppelin-contracts/contracts/interfaces/IERC165.sol\":{\"keccak256\":\"0x0afcb7e740d1537b252cb2676f600465ce6938398569f09ba1b9ca240dde2dfc\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1c299900ac4ec268d4570ecef0d697a3013cd11a6eb74e295ee3fbc945056037\",\"dweb:/ipfs/Qmab9owJoxcA7vJT5XNayCMaUR1qxqj1NDzzisduwaJMcZ\"]},\"lib/openzeppelin-contracts/contracts/interfaces/IERC20.sol\":{\"keccak256\":\"0x1a6221315ce0307746c2c4827c125d821ee796c74a676787762f4778671d4f44\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1bb2332a7ee26dd0b0de9b7fe266749f54820c99ab6a3bcb6f7e6b751d47ee2d\",\"dweb:/ipfs/QmcRWpaBeCYkhy68PR3B4AgD7asuQk7PwkWxrvJbZcikLF\"]},\"lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x74ed01eb66b923d0d0cfe3be84604ac04b76482a55f9dd655e1ef4d367f95bc2\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5282825a626cfe924e504274b864a652b0023591fa66f06a067b25b51ba9b303\",\"dweb:/ipfs/QmeCfPykghhMc81VJTrHTC7sF6CRvaA1FXVq2pJhwYp1dV\"]},\"lib/openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol\":{\"keccak256\":\"0x304d732678032a9781ae85c8f204c8fba3d3a5e31c02616964e75cfdc5049098\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://299ced486011781dc98f638059678323c03079fefae1482abaa2135b22fa92d0\",\"dweb:/ipfs/QmbZNbcPTBxNvwChavN2kkZZs7xHhYL7mv51KrxMhsMs3j\"]},\"lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol\":{\"keccak256\":\"0x8891738ffe910f0cf2da09566928589bf5d63f4524dd734fd9cedbac3274dd5c\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://971f954442df5c2ef5b5ebf1eb245d7105d9fbacc7386ee5c796df1d45b21617\",\"dweb:/ipfs/QmadRjHbkicwqwwh61raUEapaVEtaLMcYbQZWs9gUkgj3u\"]},\"lib/protocol-fees/src/interfaces/IFeeClassifiedHook.sol\":{\"keccak256\":\"0xd54878f6a1043291c171aeb6785170499534b5c520efa67757ed42ae7d93329b\",\"license\":\"AGPL-3.0-only\",\"urls\":[\"bzz-raw://dcb8f9a5dbc2dab8697b06aa12008b6ac76b6715790d8f484bae54283d5d6797\",\"dweb:/ipfs/QmfLziggTZXZuFNfH5hTbTBV8zwwjJocKWgQ9vVmPniekU\"]},\"lib/protocol-fees/src/interfaces/IV4FeeAdapter.sol\":{\"keccak256\":\"0x3accea31dca865172321cbd3a4ede1f0457a523477a0890637ffc163bc72cb31\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://d71d50ec7849d3ccc5bd9149253cb6cb3bf184693874a252fe958348634f4cae\",\"dweb:/ipfs/QmZ22sP4jLKS4J148WZy8qEkt6CDea7Z159gL16Yh13E5S\"]},\"lib/protocol-fees/src/interfaces/IV4FeePolicy.sol\":{\"keccak256\":\"0xe86c0e269da1a08be4386827581354dbd7278564ce9b817d81450b64bc6dc627\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://a9a819a5b9b4a167d1a7ee9c879d5fc45a0037cbae7d6e556690b97947352504\",\"dweb:/ipfs/QmYjqMmNUT8CjhC4x8sPZWBdBAzx7jmDNMoJJR29YSp75p\"]},\"lib/v4-core/src/interfaces/IExtsload.sol\":{\"keccak256\":\"0x80b53ca4907d6f0088c3b931f2b72cad1dc4615a95094d96bd0fb8dff8d5ba43\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://375c69148622aab7a3537d5fd37d373a8e9731022c8d87bdaee46233b0a99fe1\",\"dweb:/ipfs/QmXFjdoYRxsA5B1kyuxEXgNf3FBoL1zPvy26Qy8EtpdFRN\"]},\"lib/v4-core/src/interfaces/IExttload.sol\":{\"keccak256\":\"0xc6b68283ebd8d1c789df536756726eed51c589134bb20821b236a0d22a135937\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://294394f72dfc219689209f4130d85601dfd0d63c8d47578050d312db70f9b6c8\",\"dweb:/ipfs/QmTDMQ3oxCGHgEBU48a3Lp4S1rRjc8vVCxkhE5ZNej1bsY\"]},\"lib/v4-core/src/interfaces/IHooks.sol\":{\"keccak256\":\"0xc131ffa2d04c10a012fe715fe2c115811526b7ea34285cf0a04ce7ce8320da8d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://3b212358897db5d99c21244d88f97b2e788527552cb430629b472a8cc6289aec\",\"dweb:/ipfs/QmQtwV4dDe2RYk2ErLpaAX7U82jWh1L6Lw2HRuKDvBi84G\"]},\"lib/v4-core/src/interfaces/IPoolManager.sol\":{\"keccak256\":\"0xbdab3544da3d32dfdf7457baa94e17d5a3012952428559e013ffac45d067038e\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ce95ff864468e37c76adf71df061d4f3d6f3a5ec1f9bc3aea090463bc72798f4\",\"dweb:/ipfs/QmSbWh1pLbz51yQF4HEu5NRhr8XVv9JYGEw1hq1HudAnCi\"]},\"lib/v4-core/src/interfaces/IProtocolFees.sol\":{\"keccak256\":\"0x32a666e588a2f66334430357bb1e2424fe7eebeb98a3364b1dd16eb6ccca9848\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://85751d302125881f72e5f8af051c2d5d9b1f606ebaea8ca7d04fccdd27cc252d\",\"dweb:/ipfs/QmeRwomeh9NWm6A6fgNA4KZPQZHPpdKsPQyYsHSFmvud7J\"]},\"lib/v4-core/src/interfaces/external/IERC20Minimal.sol\":{\"keccak256\":\"0xeccadf1bf69ba2eb51f2fe4fa511bc7bb05bbd6b9f9a3cb8e5d83d9582613e0f\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://118757369892687b99ef46ce28d6861f62c098285bd7687a4f17f7e44e5f81de\",\"dweb:/ipfs/QmUxqbYqQtcEwwFbb9e6BBMePEaSgN8C45v6RKubD4ib8d\"]},\"lib/v4-core/src/interfaces/external/IERC6909Claims.sol\":{\"keccak256\":\"0xa586f345739e52b0488a0fe40b6e375cce67fdd25758408b0efcb5133ad96a48\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://e8c557b7e52abdbbd82e415a1acc27921446a7fd090b7d4877e52be72619547f\",\"dweb:/ipfs/QmXE2KNPbXmGX8BQF3ei6zhzRTnhoTQg39XmqMnkhbr6QK\"]},\"lib/v4-core/src/libraries/CurrencyReserves.sol\":{\"keccak256\":\"0x1576616129933fcdf3b684cea33cffd9c95e18fafbd2832a8c48ac3d8526d4c3\",\"license\":\"BUSL-1.1\",\"urls\":[\"bzz-raw://33b050efb9b81803b18f562271e7cca2ec5362c4d505860d6419b4a345636725\",\"dweb:/ipfs/QmQtFtTwKZ5pFVGD2ENDUXvp7ECFvzqeCuJ1miJcUHdmiX\"]},\"lib/v4-core/src/libraries/CustomRevert.sol\":{\"keccak256\":\"0x111ed3031b6990c80a93ae35dde6b6ac0b7e6af471388fdd7461e91edda9b7de\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c9ea883c98d6ae1829160d0977bb5195761cfd5bc81692d0a941f45717f594cd\",\"dweb:/ipfs/QmZPwxzaeMNv536wzrAMrMswu7vMHuqPVpjcqL3YvCMoxt\"]},\"lib/v4-core/src/libraries/FixedPoint128.sol\":{\"keccak256\":\"0xad236e10853f4b4b20a35a9bb52b857c4fc79874846b7e444e06ead7f2630542\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://0de1f9a06520b1a689660943faa14fc0b8344ab41fab9e6012ea34bff4b9b3eb\",\"dweb:/ipfs/QmRNMPTyko7W6d6KxuTsnDBa9oZgDK4xiwRRq3H9ASTbwy\"]},\"lib/v4-core/src/libraries/FullMath.sol\":{\"keccak256\":\"0x4fc73a00817193fd3cac1cc03d8167d21af97d75f1815a070ee31a90c702b4c2\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c3b2d66d36b1ad56b1ab6e2eb8a816740877b40b461c93f125e88621c8378e52\",\"dweb:/ipfs/QmPGvMZzKQvNiWKd8aRzzdW7oAizwrMgcMtnaworDkVHFC\"]},\"lib/v4-core/src/libraries/Hooks.sol\":{\"keccak256\":\"0xd679b4b2d429689bc44f136050ebc958fb2d7d0d3a3c7b3e48c08ab4fba09aaa\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://287190cb72840e5eb63cc7a8a1d0b9150af17d8e4ea0323f47c7e7928f2033cb\",\"dweb:/ipfs/QmVfqWBnAQM2jUcuREDdvjcP21gNuLU35CoL3NG5CEhNcx\"]},\"lib/v4-core/src/libraries/LPFeeLibrary.sol\":{\"keccak256\":\"0xbf6914e01014e7c1044111feb7df7a3d96bb503b3da827ad8464b1955580d13b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://33823c20a91882c9aacdcbb02f0558c05209f4d5954aa6dd4fa17c95664db475\",\"dweb:/ipfs/QmR7owkFgpfztpp1QUg3ut3nw9iPVQqLGP4hzgmZtRUQ2J\"]},\"lib/v4-core/src/libraries/LiquidityMath.sol\":{\"keccak256\":\"0x000ef2eadcc1eb7b2c18a77655f94e76e0e860f605783484657ef65fd6eda353\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://a766b620a7a22798b43c6c1f23b5c6cff0ebf588deb89842bad05208d448cd99\",\"dweb:/ipfs/QmVKjaFJdzkqA3ey2Byum8iTCMssWVD8MmVC8rw62Tj5WD\"]},\"lib/v4-core/src/libraries/Lock.sol\":{\"keccak256\":\"0x9338be4b5695f1da5f3d3f7a3eeaf7a356c1045458289586ac0cbe9cef77c6d5\",\"license\":\"BUSL-1.1\",\"urls\":[\"bzz-raw://485ec42ed6155469d612a9a0c18068ebfbad74448792a338a435503de3ef1b2c\",\"dweb:/ipfs/QmVnnv5u74MYatfRmBgrcfFYQcsMAJMG9jQ6ju8UiydKNF\"]},\"lib/v4-core/src/libraries/NonzeroDeltaCount.sol\":{\"keccak256\":\"0x0666ebd5d3528d7d52c48538296367a4cff97a578cf13365c51983fae3219b87\",\"license\":\"BUSL-1.1\",\"urls\":[\"bzz-raw://d27f1be3bd09d85c53d3e6a539dd6529ddd8b2b764ccb47fd7765fc81f9add59\",\"dweb:/ipfs/QmQdZujNXhKEXQBkKtF5jbdvo1yXMqPDUoBBaF9S5u3Kpm\"]},\"lib/v4-core/src/libraries/ParseBytes.sol\":{\"keccak256\":\"0x7533b13f53ee2c2c55500100b22ffd6e37e7523c27874edc98663d53a8672b15\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://82449058634fde28a085f3c59a6a5f412550c02181590593fd84c3e8b329aa17\",\"dweb:/ipfs/Qmev4E9Au6SsE4wsArChCwfg94KhHc5gYsEsZUnjF5sRLa\"]},\"lib/v4-core/src/libraries/Position.sol\":{\"keccak256\":\"0xddab2a831f1befb6abf5567e77c4582169ca8156cf69eb4f22d8e87f7226a3f9\",\"license\":\"BUSL-1.1\",\"urls\":[\"bzz-raw://c79fe61b50f3b70cff503abfa6f5643fcbefb9b794855bee1019b1e6d9c083b2\",\"dweb:/ipfs/QmbKmYNQesaMz8bo1b7TMHQcAwaDd3eDPrE5pAdPPZTtk5\"]},\"lib/v4-core/src/libraries/ProtocolFeeLibrary.sol\":{\"keccak256\":\"0xf483001899229ab10f5a626fe1c5866134d9e965b48ce6cf55ce0d7f74f7d8ec\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6ba9211a7f69bbb44649c35211eb29d193c09032ec600064ef9d04b4625dd8ba\",\"dweb:/ipfs/QmQSjQvtguYgMJSkkKRhHjxasfX9xfTbrbcZ1QmjUVb787\"]},\"lib/v4-core/src/libraries/SafeCast.sol\":{\"keccak256\":\"0x42c4a24f996a14d358be397b71f7ec9d7daf666aaec78002c63315a6ee67aa86\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c3db86e2ba3679105fc32edec656c70282e1fede6cab11217702443f6c26fa59\",\"dweb:/ipfs/QmX4yaaSPdKQzYNRsezjTvZKsubzS8JRTEGFD3fPpTTCcj\"]},\"lib/v4-core/src/libraries/StateLibrary.sol\":{\"keccak256\":\"0x96db333ee126a841dd959e38e452cc59d73583cb0437a1d48b2052e33a74f952\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8672bba1eb69608299b0904f4ff305238eb18479d371c26518f278c9ee184cd0\",\"dweb:/ipfs/QmTLu3s6ECvsEDHStQv8HTVHYtvkviBbdjPrFJd4SpVRFY\"]},\"lib/v4-core/src/libraries/TransientStateLibrary.sol\":{\"keccak256\":\"0x7d1e0875747bd89b32c25f1a48da2766e5f4aff1f671ad5f3c0c07ebbbcb946a\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://d76cfeb1cb60595b41ecc51c8a12fb4bf63a7fc733d0b1a2e3adb55abeb1f9d5\",\"dweb:/ipfs/Qmb8oX7DtsRpw3tTtdWZwGhauj1evq43d3PLwe4nSDAKkV\"]},\"lib/v4-core/src/types/BalanceDelta.sol\":{\"keccak256\":\"0xa719c8fe51e0a9524280178f19f6851bcc3b3b60e73618f3d60905d35ae5569f\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://7436928dc9de35c6c7c5c636cb51adaf295cfd590da83b19a004ae33cbec9ef9\",\"dweb:/ipfs/QmRJ9yZkUpzk4433GX3LgVVL8jwpbSYSUwXcucKisf3v4H\"]},\"lib/v4-core/src/types/BeforeSwapDelta.sol\":{\"keccak256\":\"0x2a774312d91285313d569da1a718c909655da5432310417692097a1d4dc83a78\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://a2c7a0379955cff9c17ab9e61f95e42909aa5947c22740f86ce940d09856f782\",\"dweb:/ipfs/QmaAuo8UBYXsGrVuKh8iRoAAdqwtg1jDq515cW1ZRP5m9K\"]},\"lib/v4-core/src/types/Currency.sol\":{\"keccak256\":\"0x4a0b84b282577ff6f8acf13ec9f4d32dbb9348748b49611d00e68bee96609c93\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://45f9d62ab3d51b52957279e353853ba1547c3182c9a1e3d1846ada4a90263b01\",\"dweb:/ipfs/QmS8NG84ccQS1yXVD8cv3eKX7J1UKxuJhbUfHTQR2opKF5\"]},\"lib/v4-core/src/types/PoolId.sol\":{\"keccak256\":\"0x308311916ea0f5c2fd878b6a2751eb223d170a69e33f601fae56dfe3c5d392af\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://669c2cd7ac17690b5d8831e0bda72822376c3a04b36afed6d31df4d75fe60918\",\"dweb:/ipfs/QmT6EpkxqU8VF3WsgrZ66F3s1cCQRffR95z1HDYZz7ph6y\"]},\"lib/v4-core/src/types/PoolKey.sol\":{\"keccak256\":\"0xf89856e0580d7a4856d3187a76858377ccee9d59702d230c338d84388221b786\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6f3118fa189025695c37fdf0bdd1190f085ad097484d3c88cf4c56d1db65f639\",\"dweb:/ipfs/QmamXpgtB8GV1CaFLvqefPWSoikLDhMk1yU4heBnVzU8gi\"]},\"lib/v4-core/src/types/PoolOperation.sol\":{\"keccak256\":\"0x7a1a107fc1f2208abb2c9364c8c54e56e98dca27673e9441bed2b949b6382162\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://4ad2470383bc5595d5af17840c64971f457adac68895a4db41ba5c71a4478e07\",\"dweb:/ipfs/QmdwKhBHDZFuqXrR2BfDBD9r7rB2ULGQBznsajRTkTmL4c\"]},\"lib/v4-periphery/src/base/DeltaResolver.sol\":{\"keccak256\":\"0xb85e3fa537501d083ab7d53694e790ef78e3ad8f7fecf127bcf1e86ce5a63c74\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://150036746ada031e680b37411b263c98f1d10be6b331dfee12fe8bf32b60e839\",\"dweb:/ipfs/QmSZAhjgKJQcH7emdGmd9uKGWUA8PqjckGCNco48aWbuBk\"]},\"lib/v4-periphery/src/base/ImmutableState.sol\":{\"keccak256\":\"0x1867c9fa2f9b4fa73bab0fcdc9d19ccef4eeac552273d8b84a170cd1cc90350a\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://af2d699b439e13b599632fddfe82718aebd41055fba7c075f186675c588d1337\",\"dweb:/ipfs/Qmc111gckSKb9aESn3wRFLeLiS4KGujaUcaYJgRnCRfwQU\"]},\"lib/v4-periphery/src/interfaces/IImmutableState.sol\":{\"keccak256\":\"0x36ab3100e87457ecf04887f4f540e34fd7f21d8e3b83880cb679239e60b7b06b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://7f290c7ce8e4832608d637a51b13dff95abecf6549485448e647a11c8ed01341\",\"dweb:/ipfs/QmfD1R6mTp8j4EjQXmQZW3vCh11EYFjnvoaw8rXRP27mMq\"]},\"lib/v4-periphery/src/libraries/ActionConstants.sol\":{\"keccak256\":\"0x3d6f0e5b4a7b1e60bad93e73dce5db67fb66bebef11c31ed8355014a79aa03b3\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6dfa42e24b1b5c7f66e75304ab034fbb6768518eb2410ccfff8b3defdd1658f2\",\"dweb:/ipfs/QmQQ7fud9mmv7PEWPAQiNzeZhNkWf28Z6nCHc2e6WJFfa7\"]},\"src/aggregator-hooks/BaseAggregatorHook.sol\":{\"keccak256\":\"0x46f53e2d375e705c580442c75239eb0e9f516aad7c182c6ea24b2186d72fb060\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://572d3833efc836a74dcb8300ed55186ff76731e62c49ba7d03f5665dcd8d1d7f\",\"dweb:/ipfs/QmZGKWa7XEJXBjNgRQpxQ4E7P8afZimFv6Pjfc3PtwnHKd\"]},\"src/aggregator-hooks/ProtocolFees.sol\":{\"keccak256\":\"0xecd60d8ba702c5673478b69371339b29eb22d0209760b9159f1da82a9a965658\",\"license\":\"AGPL-3.0-only\",\"urls\":[\"bzz-raw://d84b4f888f9a2238a04dadf68f04ce30aaf2919e26480ab70d569d3bd29aad3b\",\"dweb:/ipfs/QmQmAmJDMLXzHUT6c822usCTKtXM1m37HAnCZGwfME5VFT\"]},\"src/aggregator-hooks/implementations/StableSwapNG/StableSwapNGAggregator.sol\":{\"keccak256\":\"0x0f2fd4c35e63b810c0ab2a1c64ed45b700f99399f50384e3a71d8d2fd435570f\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://e1b62facb006ba3e7af2d4ddcc264b398e0bbefad46dd32a6c23162ae43f1252\",\"dweb:/ipfs/QmaqctCBw24eGG42BP3hkTGYdqB652TFmeXhgKa1WpuKmo\"]},\"src/aggregator-hooks/implementations/StableSwapNG/interfaces/ICurveStableSwapFactoryNG.sol\":{\"keccak256\":\"0xe424b019436109c900ee6cac505afb85569745d71a6b290cfe638b6008671907\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://f3d70ab3e92b14bb768bd69e3015d0088269ad9928887b386f262cf461ae2254\",\"dweb:/ipfs/QmQwrCzzamTstTvkmZDewjic5hWCu4x1KF8UqTCCE5dptt\"]},\"src/aggregator-hooks/implementations/StableSwapNG/interfaces/ICurveStableSwapNG.sol\":{\"keccak256\":\"0x95f1c81f74bdf11762e9a2bb6ecf653b1fdef98a970b2e4d56513d68c54fa6fa\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://f44034586eb8c6f5a22057e9142a64dd70a988010c6785b8b2c2fb0574ffd4be\",\"dweb:/ipfs/Qmc6CGES2StDkwuRoQkK5L9Ufne385ZtgvBke27xg9Qfkv\"]},\"src/aggregator-hooks/interfaces/IAggregatorHook.sol\":{\"keccak256\":\"0xa42115b44bb4e61bd7dd206961f4b759856891e16a528e5c2e0728737303bcc3\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://312c08fe91dd3cd4fb03d3afec41ebf5565c280ef77d6c4328d0ab5cbbdab60a\",\"dweb:/ipfs/QmQA3fJPFLc2BfwZCUbyXJ5tZd9beRGQj9sCELQiWsQM6f\"]},\"src/base/BaseHook.sol\":{\"keccak256\":\"0x148c72be0b0ac82664090d23ead3dda27410845afa809273c4d6956bc87a0c2c\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c7c80c77d9abbf610070edebb55d7d107bb30e5d69efba8c4c26b85dba249e7a\",\"dweb:/ipfs/QmTZR77BMjguXEjxex9PmtPGNnViwHpn6KYTEsVTQ4iMDD\"]}},\"version\":1}","userdoc":{"kind":"user","errors":{"NotPoolManager()":[{"notice":"Thrown when the caller is not PoolManager"}],"InsufficientBalance()":[{"notice":"Emitted when the contract does not have enough balance to wrap or unwrap."}],"DeltaNotNegative(address)":[{"notice":"Emitted when unexpected positive delta is found."}],"DeltaNotPositive(address)":[{"notice":"Emitted when unexpected negative delta is found."}]},"notice":"Uniswap V4 hook that aggregates liquidity from Curve StableSwap NG pools","methods":{"pool()":{"notice":"The Curve StableSwap NG pool"},"poolManager()":{"notice":"The Uniswap v4 PoolManager contract"},"curveFactory()":{"notice":"The Curve StableSwap NG factory for checking meta pool status"},"pollTokenJar()":{"notice":"Queries the token jar from the pool manager and emits an event if it is updated"},"protocolFeeFlags()":{"notice":"Returns the hook's self-reported behavioral flags."},"getHookPermissions()":{"notice":"Returns a struct of permissions to signal which hook functions are to be implemented"},"aggregatorHookVersion()":{"notice":"The publicly displayed version of the aggregator hook."},"poolIdToTokenInfo(bytes32)":{"notice":"Maps Uniswap V4 pool IDs to their corresponding token indices in the Curve pool"},"quote(bool,int256,bytes32)":{"notice":"Quotes amount of unspecified side for a given amount of specified side"},"pseudoTotalValueLocked(bytes32)":{"notice":"Returns the pseudo TVL: the amount of the UniswapV4 pool's tokens locked in the aggregated pool"},"beforeInitialize(address,(address,address,uint24,int24,address),uint160)":{"notice":"The hook called before the state of a pool is initialized"},"afterInitialize(address,(address,address,uint24,int24,address),uint160,int24)":{"notice":"The hook called after the state of a pool is initialized"},"afterDonate(address,(address,address,uint24,int24,address),uint256,uint256,bytes)":{"notice":"The hook called after donate"},"beforeDonate(address,(address,address,uint24,int24,address),uint256,uint256,bytes)":{"notice":"The hook called before donate"},"beforeSwap(address,(address,address,uint24,int24,address),(bool,int256,uint160),bytes)":{"notice":"The hook called before a swap"},"afterSwap(address,(address,address,uint24,int24,address),(bool,int256,uint160),int256,bytes)":{"notice":"The hook called after a swap"},"beforeAddLiquidity(address,(address,address,uint24,int24,address),(int24,int24,int256,bytes32),bytes)":{"notice":"The hook called before liquidity is added"},"beforeRemoveLiquidity(address,(address,address,uint24,int24,address),(int24,int24,int256,bytes32),bytes)":{"notice":"The hook called before liquidity is removed"},"afterAddLiquidity(address,(address,address,uint24,int24,address),(int24,int24,int256,bytes32),int256,int256,bytes)":{"notice":"The hook called after liquidity is added"},"afterRemoveLiquidity(address,(address,address,uint24,int24,address),(int24,int24,int256,bytes32),int256,int256,bytes)":{"notice":"The hook called after liquidity is removed"}},"version":1},"devdoc":{"kind":"dev","title":"StableSwapNGAggregator","errors":{"SafeERC20FailedOperation(address)":[{"details":"An operation with an ERC-20 token failed."}]},"details":"Supports both exact-input and exact-output swaps","methods":{"pollTokenJar()":{"details":"This function should not need to be called externally except in the case of the tokenJar address changing after the protocol fee has been set","returns":{"_0":"The token jar address"}},"protocolFeeFlags()":{"details":"Return 0 to indicate no self-classification (falls through to defaultFee). The bitfield is opaque to the policy; see the governance guide for active conventions."},"getHookPermissions()":{"details":"Used at deployment to validate the address correctly represents the expected permissions","returns":{"permissions":"Permissions struct"}},"quote(bool,int256,bytes32)":{"params":{"zeroToOne":"Whether the swap is from token0 to token1 or from token1 to token0","amountSpecified":"The amount of tokens in or out (negative for exact-in, positive for exact-out)"},"details":"This function is meant to be called as a view function even though it is not one. This is because the swap might be simulated but not finalized. Applies protocol fee on top of the raw quote from the underlying liquidity source","returns":{"amountUnspecified":"amount of unspecified side (always positive to adhere to practices by other quote functions)"}},"pseudoTotalValueLocked(bytes32)":{"params":{"poolId":"The pool ID of the UniswapV4 pool"},"returns":{"amount0":"The amount of token0 in the aggregated pool","amount1":"The amount of token1 in the aggregated pool"}},"beforeInitialize(address,(address,address,uint24,int24,address),uint160)":{"params":{"key":"The key for the pool being initialized","sender":"The initial msg.sender for the initialize call","sqrtPriceX96":"The sqrt(price) of the pool as a Q64.96"},"returns":{"_0":"bytes4 The function selector for the hook"}},"afterInitialize(address,(address,address,uint24,int24,address),uint160,int24)":{"params":{"key":"The key for the pool being initialized","tick":"The current tick after the state of a pool is initialized","sender":"The initial msg.sender for the initialize call","sqrtPriceX96":"The sqrt(price) of the pool as a Q64.96"},"returns":{"_0":"bytes4 The function selector for the hook"}},"afterDonate(address,(address,address,uint24,int24,address),uint256,uint256,bytes)":{"params":{"key":"The key for the pool","sender":"The initial msg.sender for the donate call","amount0":"The amount of token0 being donated","amount1":"The amount of token1 being donated","hookData":"Arbitrary data handed into the PoolManager by the donor to be be passed on to the hook"},"returns":{"_0":"bytes4 The function selector for the hook"}},"beforeDonate(address,(address,address,uint24,int24,address),uint256,uint256,bytes)":{"params":{"key":"The key for the pool","sender":"The initial msg.sender for the donate call","amount0":"The amount of token0 being donated","amount1":"The amount of token1 being donated","hookData":"Arbitrary data handed into the PoolManager by the donor to be be passed on to the hook"},"returns":{"_0":"bytes4 The function selector for the hook"}},"beforeSwap(address,(address,address,uint24,int24,address),(bool,int256,uint160),bytes)":{"params":{"key":"The key for the pool","params":"The parameters for the swap","sender":"The initial msg.sender for the swap call","hookData":"Arbitrary data handed into the PoolManager by the swapper to be be passed on to the hook"},"returns":{"_0":"bytes4 The function selector for the hook","_1":"BeforeSwapDelta The hook's delta in specified and unspecified currencies. Positive: the hook is owed/took currency, negative: the hook owes/sent currency","_2":"uint24 Optionally override the lp fee, only used if three conditions are met: 1. the Pool has a dynamic fee, 2. the value's 2nd highest bit is set (23rd bit, 0x400000), and 3. the value is less than or equal to the maximum fee (1 million)"}},"afterSwap(address,(address,address,uint24,int24,address),(bool,int256,uint160),int256,bytes)":{"params":{"key":"The key for the pool","delta":"The amount owed to the caller (positive) or owed to the pool (negative)","params":"The parameters for the swap","sender":"The initial msg.sender for the swap call","hookData":"Arbitrary data handed into the PoolManager by the swapper to be be passed on to the hook"},"returns":{"_0":"bytes4 The function selector for the hook","_1":"int128 The hook's delta in unspecified currency. Positive: the hook is owed/took currency, negative: the hook owes/sent currency"}},"beforeAddLiquidity(address,(address,address,uint24,int24,address),(int24,int24,int256,bytes32),bytes)":{"params":{"key":"The key for the pool","params":"The parameters for adding liquidity","sender":"The initial msg.sender for the add liquidity call","hookData":"Arbitrary data handed into the PoolManager by the liquidity provider to be passed on to the hook"},"returns":{"_0":"bytes4 The function selector for the hook"}},"beforeRemoveLiquidity(address,(address,address,uint24,int24,address),(int24,int24,int256,bytes32),bytes)":{"params":{"key":"The key for the pool","params":"The parameters for removing liquidity","sender":"The initial msg.sender for the remove liquidity call","hookData":"Arbitrary data handed into the PoolManager by the liquidity provider to be be passed on to the hook"},"returns":{"_0":"bytes4 The function selector for the hook"}},"afterAddLiquidity(address,(address,address,uint24,int24,address),(int24,int24,int256,bytes32),int256,int256,bytes)":{"params":{"key":"The key for the pool","delta":"The caller's balance delta after adding liquidity; the sum of principal delta, fees accrued, and hook delta","params":"The parameters for adding liquidity","sender":"The initial msg.sender for the add liquidity call","hookData":"Arbitrary data handed into the PoolManager by the liquidity provider to be passed on to the hook","feesAccrued":"The fees accrued since the last time fees were collected from this position"},"returns":{"_0":"bytes4 The function selector for the hook","_1":"BalanceDelta The hook's delta in token0 and token1. Positive: the hook is owed/took currency, negative: the hook owes/sent currency"}},"afterRemoveLiquidity(address,(address,address,uint24,int24,address),(int24,int24,int256,bytes32),int256,int256,bytes)":{"params":{"key":"The key for the pool","delta":"The caller's balance delta after removing liquidity; the sum of principal delta, fees accrued, and hook delta","params":"The parameters for removing liquidity","sender":"The initial msg.sender for the remove liquidity call","hookData":"Arbitrary data handed into the PoolManager by the liquidity provider to be be passed on to the hook","feesAccrued":"The fees accrued since the last time fees were collected from this position"},"returns":{"_0":"bytes4 The function selector for the hook","_1":"BalanceDelta The hook's delta in token0 and token1. Positive: the hook is owed/took currency, negative: the hook owes/sent currency"}}},"version":1},"storageLayout":{"types":{"t_int128":{"label":"int128","encoding":"inplace","numberOfBytes":"16"},"t_address":{"label":"address","encoding":"inplace","numberOfBytes":"20"},"t_string_storage":{"label":"string","encoding":"bytes","numberOfBytes":"32"},"t_struct(PoolInfo)7015_storage":{"label":"struct StableSwapNGAggregator.PoolInfo","members":[{"slot":"0","type":"t_int128","astId":7012,"label":"token0Index","offset":0,"contract":"src/aggregator-hooks/implementations/StableSwapNG/StableSwapNGAggregator.sol:StableSwapNGAggregator"},{"slot":"0","type":"t_int128","astId":7014,"label":"token1Index","offset":16,"contract":"src/aggregator-hooks/implementations/StableSwapNG/StableSwapNGAggregator.sol:StableSwapNGAggregator"}],"encoding":"inplace","numberOfBytes":"32"},"t_userDefinedValueType(PoolId)5469":{"label":"PoolId","encoding":"inplace","numberOfBytes":"32"},"t_mapping(t_userDefinedValueType(PoolId)5469,t_struct(PoolInfo)7015_storage)":{"key":"t_userDefinedValueType(PoolId)5469","label":"mapping(PoolId => struct StableSwapNGAggregator.PoolInfo)","value":"t_struct(PoolInfo)7015_storage","encoding":"mapping","numberOfBytes":"32"}},"storage":[{"slot":"0","type":"t_address","astId":6659,"label":"tokenJar","offset":0,"contract":"src/aggregator-hooks/implementations/StableSwapNG/StableSwapNGAggregator.sol:StableSwapNGAggregator"},{"slot":"1","type":"t_string_storage","astId":5999,"label":"aggregatorHookVersion","offset":0,"contract":"src/aggregator-hooks/implementations/StableSwapNG/StableSwapNGAggregator.sol:StableSwapNGAggregator"},{"slot":"2","type":"t_mapping(t_userDefinedValueType(PoolId)5469,t_struct(PoolInfo)7015_storage)","astId":7022,"label":"poolIdToTokenInfo","offset":0,"contract":"src/aggregator-hooks/implementations/StableSwapNG/StableSwapNGAggregator.sol:StableSwapNGAggregator"}]},"transientStorageLayout":{"types":null,"storage":[]},"evm":{"bytecode":{"object":"610100604052348015610010575f5ffd5b50604051613bc9380380613bc983398101604081905261002f916102a4565b60408051808201909152601b81527f537461626c65537761704e4741676772656761746f722076312e300000000000602082015260196080526001600160a01b03841660a052839081610081306100a9565b50600161008e8282610386565b5050506001600160a01b0391821660c0521660e05250610440565b61012881610123604080516101c0810182525f60208201819052606082018190526080820181905260a0820181905260e0820181905261010082018190526101208201819052610160820181905261018082018190526101a0820152600160c0820181905261014082018190528082529181019190915290565b61012b565b50565b805115156120008316151514158061014f5750602081015115156110008316151514155b806101665750604081015115156108008316151514155b8061017d5750606081015115156104008316151514155b806101945750608081015115156102008316151514155b806101ab575060a081015115156101008316151514155b806101c1575060c0810151151560808316151514155b806101d7575060e0810151151560408316151514155b806101ee5750610100810151151560208316151514155b806102055750610120810151151560108316151514155b8061021c5750610140810151151560088316151514155b806102335750610160810151151560048316151514155b8061024a5750610180810151151560028316151514155b8061026157506101a0810151151560018316151514155b1561027757610277630732d7b560e51b8361027b565b5050565b815f526001600160a01b03811660045260245ffd5b6001600160a01b0381168114610128575f5ffd5b5f5f5f606084860312156102b6575f5ffd5b83516102c181610290565b60208501519093506102d281610290565b60408501519092506102e381610290565b809150509250925092565b634e487b7160e01b5f52604160045260245ffd5b600181811c9082168061031657607f821691505b60208210810361033457634e487b7160e01b5f52602260045260245ffd5b50919050565b601f82111561038157805f5260205f20601f840160051c8101602085101561035f5750805b601f840160051c820191505b8181101561037e575f815560010161036b565b50505b505050565b81516001600160401b0381111561039f5761039f6102ee565b6103b3816103ad8454610302565b8461033a565b6020601f8211600181146103e5575f83156103ce5750848201515b5f19600385901b1c1916600184901b17845561037e565b5f84815260208120601f198516915b8281101561041457878501518255602094850194600190920191016103f4565b508482101561043157868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b60805160a05160c05160e0516136456105845f395f8181610499015281816114c201526115cb01525f81816101bc0152818161081e015281816108fa0152818161107101528181611166015281816112270152818161130401528181611498015281816115a1015281816116770152818161190e0152818161197e01528181611ef4015281816126f7015261284701525f81816105e901528181610664015281816106ed0152818161097201528181610a5c01528181610aeb01528181610b7a01528181610c0201528181610c8f01528181610d390152818161139701528181611b1f01528181611b690152818161200d015281816120d501528181612149015281816121ea01528181612645015281816127990152818161281f015281816128b60152818161298501526129c701525f81816102190152611d1c01526136455ff3fe608060405260043610610170575f3560e01c80636fe7e6eb116100c6578063c4e833ce1161007c578063dc98354e11610057578063dc98354e1461060b578063e1b4af6914610515578063f777ce221461062a575f5ffd5b8063c4e833ce14610534578063cd272714146105b9578063dc4c90d3146105d8575f5ffd5b8063ae6836d6116100ac578063ae6836d614610488578063b47b2fb1146104bb578063b6a8b0fa14610515575f5ffd5b80636fe7e6eb146104695780639f063efc14610412575f5ffd5b80632c2efcac11610126578063490c98f511610101578063490c98f514610385578063575e24b4146103b05780636c2bbe7e14610412575f5ffd5b80632c2efcac1461031f5780632d910fb41461033d5780633f7d117914610371575f5ffd5b806321d0ee701161015657806321d0ee701461024f578063259982e51461029f57806328401c10146102be575f5ffd5b806316f0115b146101ab5780631ce4c78b14610208575f5ffd5b366101a7576040517fa80433dc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5ffd5b3480156101b6575f5ffd5b506101de7f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b348015610213575f5ffd5b5061023b7f000000000000000000000000000000000000000000000000000000000000000081565b60405162ffffff90911681526020016101ff565b34801561025a575f5ffd5b5061026e610269366004612e4f565b61064b565b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020016101ff565b3480156102aa575f5ffd5b5061026e6102b9366004612e4f565b6106d4565b3480156102c9575f5ffd5b506103056102d8366004612ec6565b60026020525f9081526040902054600f81810b917001000000000000000000000000000000009004900b82565b60408051600f93840b81529190920b6020820152016101ff565b34801561032a575f5ffd5b506108005b6040519081526020016101ff565b348015610348575f5ffd5b5061035c610357366004612ec6565b610751565b604080519283526020830191909152016101ff565b34801561037c575f5ffd5b506101de61096b565b348015610390575f5ffd5b505f546101de9073ffffffffffffffffffffffffffffffffffffffff1681565b3480156103bb575f5ffd5b506103cf6103ca366004612eed565b610a41565b604080517fffffffff000000000000000000000000000000000000000000000000000000009094168452602084019290925262ffffff16908201526060016101ff565b34801561041d575f5ffd5b5061043161042c366004612f47565b610ad1565b604080517fffffffff0000000000000000000000000000000000000000000000000000000090931683526020830191909152016101ff565b348015610474575f5ffd5b5061026e610483366004612fe3565b610b61565b348015610493575f5ffd5b506101de7f000000000000000000000000000000000000000000000000000000000000000081565b3480156104c6575f5ffd5b506104da6104d536600461303a565b610be8565b604080517fffffffff000000000000000000000000000000000000000000000000000000009093168352600f9190910b6020830152016101ff565b348015610520575f5ffd5b5061026e61052f3660046130bb565b610c76565b34801561053f575f5ffd5b50604080516101c0810182525f60208201819052606082018190526080820181905260a0820181905260e0820181905261010082018190526101208201819052610160820181905261018082018190526101a0820152600160c0820181905261014082018190528082528183015290516101ff9190613115565b3480156105c4575f5ffd5b5061032f6105d3366004613243565b610cff565b3480156105e3575f5ffd5b506101de7f000000000000000000000000000000000000000000000000000000000000000081565b348015610616575f5ffd5b5061026e610625366004613275565b610d20565b348015610635575f5ffd5b5061063e610d9b565b6040516101ff91906132bc565b5f3373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016146106bb576040517fae18210a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6106c88686868686610e27565b90505b95945050505050565b5f3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610744576040517fae18210a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6106c88686868686610e5a565b5f818152600260209081526040808320815180830190925254600f81810b808452700100000000000000000000000000000000909204900b9282019290925282911580156107a457506020810151600f0b155b156107db576040517f0afa7ee800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80516040517f4903b0d10000000000000000000000000000000000000000000000000000000081526fffffffffffffffffffffffffffffffff90911660048201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1690634903b0d190602401602060405180830381865afa158015610878573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061089c919061330f565b60208201516040517f4903b0d10000000000000000000000000000000000000000000000000000000081526fffffffffffffffffffffffffffffffff909116600482015290935073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001690634903b0d190602401602060405180830381865afa15801561093f573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610963919061330f565b915050915091565b5f5f6109967f0000000000000000000000000000000000000000000000000000000000000000610e8d565b5f5490915073ffffffffffffffffffffffffffffffffffffffff808316911614610a24575f80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8316908117825560405190917f9aafce815f6249ca174c3adc0232e8758909994867884013369549fbe000d51791a25b50505f5473ffffffffffffffffffffffffffffffffffffffff1690565b5f80803373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610ab3576040517fae18210a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ac08888888888610fd6565b925092509250955095509592505050565b5f803373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610b42576040517fae18210a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610b5189898989898989611009565b9150915097509795505050505050565b5f3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610bd1576040517fae18210a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610bdd85858585610e27565b90505b949350505050565b5f803373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610c59576040517fae18210a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610c67888888888888611009565b91509150965096945050505050565b5f3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610ce6576040517fae18210a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610cf4878787878787610e27565b979650505050505050565b5f610d16848484610d1188888861103d565b611390565b90505b9392505050565b5f3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610d90576040517fae18210a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610d1684848461145b565b60018054610da890613326565b80601f0160208091040260200160405190810160405280929190818152602001828054610dd490613326565b8015610e1f5780601f10610df657610100808354040283529160200191610e1f565b820191905f5260205f20905b815481529060010190602001808311610e0257829003601f168201915b505050505081565b5f6040517f0a85dc2900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f6040517f78895c1300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f8273ffffffffffffffffffffffffffffffffffffffff1663f02de3b26040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ed8573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610efc9190613371565b905073ffffffffffffffffffffffffffffffffffffffff81161580610f36575073ffffffffffffffffffffffffffffffffffffffff81163b155b15610f4357505f92915050565b8073ffffffffffffffffffffffffffffffffffffffff1663e0ef2b4b6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610fc8575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201909252610fc591810190613371565b60015b15610fd05791505b50919050565b5f5f5f5f5f610fe58989611a3f565b91509150610ff68a8a8a8585611af2565b9450945094505050955095509592505050565b5f5f6040517f0a85dc2900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f818152600260205260408120818412156111b257841561114d57805473ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001690635e0d443f90600f81810b917001000000000000000000000000000000009004900b6110bd886133b9565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b168152600f93840b60048201529190920b60248201526044810191909152606401602060405180830381865afa158015611122573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611146919061330f565b9150611388565b805473ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001690635e0d443f907001000000000000000000000000000000008104600f90810b91900b6110bd886133b9565b835f6111bd82611cab565b6111c790836133ef565b905086156112ac5782546040517f67df02ca000000000000000000000000000000000000000000000000000000008152600f82810b600483015270010000000000000000000000000000000090920490910b6024820152604481018290527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906367df02ca90606401602060405180830381865afa158015611281573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906112a5919061330f565b9350611385565b82546040517f67df02ca0000000000000000000000000000000000000000000000000000000081527001000000000000000000000000000000008204600f90810b60048301529190910b6024820152604481018290527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906367df02ca90606401602060405180830381865afa15801561135e573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611382919061330f565b93505b50505b509392505050565b5f5f6113bd7f00000000000000000000000000000000000000000000000000000000000000008786611cd1565b90508062ffffff165f036113d45782915050610be0565b5f5473ffffffffffffffffffffffffffffffffffffffff166113fa576113f861096b565b505b5f5473ffffffffffffffffffffffffffffffffffffffff1661141f5782915050610be0565b5f8086129061142f838387611d41565b9050816114455761144081866133ef565b61144f565b61144f8186613402565b98975050505050505050565b6040517fe4d332a900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000811660048301525f917f00000000000000000000000000000000000000000000000000000000000000009091169063e4d332a990602401602060405180830381865afa158015611509573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061152d9190613415565b15611564576040517f57fa586900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517f940494f100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000811660048301525f917f00000000000000000000000000000000000000000000000000000000000000009091169063940494f190602401602060405180830381865afa158015611612573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611636919061330f565b90505f808080805b85811015611795576040517fc6610657000000000000000000000000000000000000000000000000000000008152600481018290525f907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063c661065790602401602060405180830381865afa1580156116d1573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906116f59190613371565b905061170460208b018b613430565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611742578193506001955061178c565b61175260408b0160208c01613430565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361178c57819250600194505b5060010161163e565b50831580156117a2575082155b1561181b576117b46020890189613430565b6117c460408a0160208b01613430565b6040517f97956d6e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9283166004820152911660248201526044015b60405180910390fd5b836118785761182d6020890189613430565b6040517f8466f04600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091166004820152602401611812565b8261188d5761182d6040890160208a01613430565b60408051808201909152600f83810b825282900b602082015260025f6118c26118bb368d90038d018d61345d565b60a0902090565b81526020808201929092526040015f208251928201516fffffffffffffffffffffffffffffffff90811670010000000000000000000000000000000002931692909217909155611979907f0000000000000000000000000000000000000000000000000000000000000000907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9061195c908c018c613430565b73ffffffffffffffffffffffffffffffffffffffff169190611d7e565b6119ce7f00000000000000000000000000000000000000000000000000000000000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff61195c60408c0160208d01613430565b6119e06118bb368a90038a018a61345d565b6040517fe4e250d624b5ed2f65699d87988884c47eac735ffb1dcccead084c5254b14373905f90a2611a1061096b565b507fdc98354e000000000000000000000000000000000000000000000000000000009998505050505050505050565b5f8080611a4f6020850185613510565b611a6557611a606020860186613430565b611a75565b611a756040860160208701613430565b90505f611a856020860186613510565b611a9e57611a996040870160208801613430565b611aab565b611aab6020870187613430565b90505f8080611acd85858a611ac86118bb368f90038f018f61345d565b611e49565b92509250925080611ae357611ae3853085612084565b509450925050505b9250929050565b5f5f5f5f611b0786865f8a6020013512612276565b90505f611b1760208901356133b9565b90505f611b627f0000000000000000000000000000000000000000000000000000000000000000611b4b60208c018c613510565b611b5d6118bb368f90038f018f61345d565b611cd1565b9050611b917f00000000000000000000000000000000000000000000000000000000000000008b8b8685612292565b611b9b908461352b565b92505f896020013512611bb457611bb187613579565b91505b5f8060208b018035821390611bc9908d613510565b151503611be15783600f0b915084600f0b9050611bee565b84600f0b915083600f0b90505b73ffffffffffffffffffffffffffffffffffffffff8d16611c176118bb368f90038f018f61345d565b604080518581526020810185905262ffffff87168183015290517f6150bb53cd76c5702d6074239fc7b6c2a5495d339eb122fdc06252f3efdbbc1b9181900360600190a37f575e24b4000000000000000000000000000000000000000000000000000000006fffffffffffffffffffffffffffffffff8616608086901b17909e909d505f9c509a5050505050505050505050565b5f80611cba620f4240846135e2565b905060148111611ccb576014610d19565b92915050565b5f80611cf373ffffffffffffffffffffffffffffffffffffffff861684612461565b509250505083611d0b57600c81901c610fff16611d11565b610fff81165b61ffff1691506106cb7f00000000000000000000000000000000000000000000000000000000000000008361361a565b5f8215611d6257611d5b828562ffffff16620f4240612546565b9050610d19565b611d5b8262ffffff8616611d7981620f4240613402565b612546565b611d8a8383835f612576565b611e4457611d9b83835f6001612576565b611de9576040517f5274afe700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84166004820152602401611812565b611df68383836001612576565b611e44576040517f5274afe700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84166004820152602401611812565b505050565b5f8181526002602090815260408220829182919082908190611e6d90890189613510565b15611e975750508054600f81810b917001000000000000000000000000000000009004900b611eb8565b505080547001000000000000000000000000000000008104600f90810b91900b5b5f88602001351215611ed857611ed160208901356133b9565b9450611fbb565b602088013573ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000166367df02ca8484611f2485611cab565b611f2e90866133ef565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b168152600f93840b60048201529190920b60248201526044810191909152606401602060405180830381865afa158015611f93573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611fb7919061330f565b9550505b6040517f0b0d9c0900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8a81166004830152306024830152604482018790527f00000000000000000000000000000000000000000000000000000000000000001690630b0d9c09906064015f604051808303815f87803b15801561204e575f5ffd5b505af1158015612060573d5f5f3e3d5ffd5b505050506120718583838d8c6125fe565b9550600193505050509450945094915050565b805f0361209057505050565b6040517fa584119400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063a5841194906024015f604051808303815f87803b158015612116575f5ffd5b505af1158015612128573d5f5f3e3d5ffd5b5050505073ffffffffffffffffffffffffffffffffffffffff83166121dd577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166311da60b4826040518263ffffffff1660e01b815260040160206040518083038185885af11580156121b2573d5f5f3e3d5ffd5b50505050506040513d601f19601f820116820180604052508101906121d7919061330f565b50505050565b6121e883838361294c565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166311da60b46040518163ffffffff1660e01b81526004016020604051808303815f875af1158015612252573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906121d7919061330f565b5f5f821561228957508261114681613579565b50929392505050565b5f8162ffffff165f036122a657505f6106cb565b5f5473ffffffffffffffffffffffffffffffffffffffff166122cc576122ca61096b565b505b5f5473ffffffffffffffffffffffffffffffffffffffff166122ef57505f6106cb565b5f6020850180358213919082906123069088613510565b15151461231f5761231a6020880188613430565b61232f565b61232f6040880160208901613430565b90505f5f86600f0b12612342578561234b565b61234b86613579565b6fffffffffffffffffffffffffffffffff1690505f612371865f8a602001351284611d41565b5f5460405182815291925073ffffffffffffffffffffffffffffffffffffffff858116929116907fdb249cf7a102711dda1beaba415bb011ee0e1402c7f67617236fed5739235d6c9060200160405180910390a35f546040517f0b0d9c0900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8581166004830152918216602482015260448101839052908b1690630b0d9c09906064015f604051808303815f87803b15801561243d575f5ffd5b505af115801561244f573d5f5f3e3d5ffd5b50929c9b505050505050505050505050565b5f5f5f5f5f61246f866129ec565b6040517f1e2eaeaf000000000000000000000000000000000000000000000000000000008152600481018290529091505f9073ffffffffffffffffffffffffffffffffffffffff891690631e2eaeaf90602401602060405180830381865afa1580156124dd573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612501919061330f565b905073ffffffffffffffffffffffffffffffffffffffff811695508060a01c60020b945062ffffff8160b81c16935062ffffff8160d01c169250505092959194509250565b5f612552848484612a28565b90508180612562576125626135b5565b83850915610d195760010180610d19575f5ffd5b6040517f095ea7b3000000000000000000000000000000000000000000000000000000005f81815273ffffffffffffffffffffffffffffffffffffffff8616600452602485905291602083604481808b5af1925060015f511483166125f25783831516156125e6573d5f823e3d81fd5b5f873b113d1516831692505b60405250949350505050565b6040517fa584119400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83811660048301525f917f00000000000000000000000000000000000000000000000000000000000000009091169063a5841194906024015f604051808303815f87803b158015612688575f5ffd5b505af115801561269a573d5f5f3e3d5ffd5b505050505f826020013513156127c3576040517fddc1f59d000000000000000000000000000000000000000000000000000000008152600f86810b600483015285900b6024820152604481018790525f60648201523060848201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063ddc1f59d9060a4016020604051808303815f875af1158015612752573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612776919061330f565b505060208101356127be73ffffffffffffffffffffffffffffffffffffffff84167f000000000000000000000000000000000000000000000000000000000000000083612ae3565b6128b4565b6040517fddc1f59d000000000000000000000000000000000000000000000000000000008152600f86810b600483015285900b6024820152604481018790525f606482015273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000811660848301527f0000000000000000000000000000000000000000000000000000000000000000169063ddc1f59d9060a4016020604051808303815f875af115801561288d573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906128b1919061330f565b90505b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166311da60b46040518163ffffffff1660e01b81526004016020604051808303815f875af115801561291e573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612942919061330f565b5095945050505050565b3073ffffffffffffffffffffffffffffffffffffffff8316036129aa57611e4473ffffffffffffffffffffffffffffffffffffffff84167f000000000000000000000000000000000000000000000000000000000000000083612ae3565b611e4473ffffffffffffffffffffffffffffffffffffffff8416837f000000000000000000000000000000000000000000000000000000000000000084612c00565b6040515f90612a0b908390600690602001918252602082015260400190565b604051602081830303815290604052805190602001209050919050565b5f838302817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff85870982811083820303915050808411612a66575f5ffd5b805f03612a7857508290049050610d19565b5f848688095f868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010186841190950394909402919094039290920491909117919091029150509392505050565b5f73ffffffffffffffffffffffffffffffffffffffff8416612b3e575f5f5f5f85875af1905080612b3957612b39835f7ff4b3b1bc00000000000000000000000000000000000000000000000000000000612c5c565b6121d7565b6040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8416600482015282602482015260205f6044835f895af13d15601f3d1160015f511416171691505f81525f60208201525f604082015250806121d7576121d7847fa9059cbb000000000000000000000000000000000000000000000000000000007ff27f64e400000000000000000000000000000000000000000000000000000000612c5c565b612c0e848484846001612d2a565b6121d7576040517f5274afe700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85166004820152602401611812565b6040517f90bfb8650000000000000000000000000000000000000000000000000000000080825273ffffffffffffffffffffffffffffffffffffffff851660048301527fffffffff0000000000000000000000000000000000000000000000000000000084166024830152608060448301526020601f3d018190040260a0810160648401523d608484015290913d5f60a483013e60048260a4018201527fffffffff0000000000000000000000000000000000000000000000000000000084168260c4018201528160e40181fd5b6040517f23b872dd000000000000000000000000000000000000000000000000000000005f81815273ffffffffffffffffffffffffffffffffffffffff8781166004528616602452604485905291602083606481808c5af1925060015f51148316612dac578383151615612da0573d5f823e3d81fd5b5f883b113d1516831692505b604052505f60605295945050505050565b73ffffffffffffffffffffffffffffffffffffffff81168114612dde575f5ffd5b50565b8035612dec81612dbd565b919050565b5f60a08284031215610fd0575f5ffd5b5f60808284031215610fd0575f5ffd5b5f5f83601f840112612e21575f5ffd5b50813567ffffffffffffffff811115612e38575f5ffd5b602083019150836020828501011115611aeb575f5ffd5b5f5f5f5f5f6101608688031215612e64575f5ffd5b8535612e6f81612dbd565b9450612e7e8760208801612df1565b9350612e8d8760c08801612e01565b925061014086013567ffffffffffffffff811115612ea9575f5ffd5b612eb588828901612e11565b969995985093965092949392505050565b5f60208284031215612ed6575f5ffd5b5035919050565b5f60608284031215610fd0575f5ffd5b5f5f5f5f5f6101408688031215612f02575f5ffd5b8535612f0d81612dbd565b9450612f1c8760208801612df1565b9350612f2b8760c08801612edd565b925061012086013567ffffffffffffffff811115612ea9575f5ffd5b5f5f5f5f5f5f5f6101a0888a031215612f5e575f5ffd5b8735612f6981612dbd565b9650612f788960208a01612df1565b9550612f878960c08a01612e01565b94506101408801359350610160880135925061018088013567ffffffffffffffff811115612fb3575f5ffd5b612fbf8a828b01612e11565b989b979a50959850939692959293505050565b8035600281900b8114612dec575f5ffd5b5f5f5f5f6101008587031215612ff7575f5ffd5b843561300281612dbd565b93506130118660208701612df1565b925060c085013561302181612dbd565b915061302f60e08601612fd2565b905092959194509250565b5f5f5f5f5f5f6101608789031215613050575f5ffd5b863561305b81612dbd565b955061306a8860208901612df1565b94506130798860c08901612edd565b9350610120870135925061014087013567ffffffffffffffff81111561309d575f5ffd5b6130a989828a01612e11565b979a9699509497509295939492505050565b5f5f5f5f5f5f61012087890312156130d1575f5ffd5b86356130dc81612dbd565b95506130eb8860208901612df1565b945060c0870135935060e0870135925061010087013567ffffffffffffffff81111561309d575f5ffd5b8151151581526101c081016020830151613133602084018215159052565b506040830151613147604084018215159052565b50606083015161315b606084018215159052565b50608083015161316f608084018215159052565b5060a083015161318360a084018215159052565b5060c083015161319760c084018215159052565b5060e08301516131ab60e084018215159052565b506101008301516131c161010084018215159052565b506101208301516131d761012084018215159052565b506101408301516131ed61014084018215159052565b5061016083015161320361016084018215159052565b5061018083015161321961018084018215159052565b506101a083015161322f6101a084018215159052565b5092915050565b8015158114612dde575f5ffd5b5f5f5f60608486031215613255575f5ffd5b833561326081613236565b95602085013595506040909401359392505050565b5f5f5f60e08486031215613287575f5ffd5b833561329281612dbd565b92506132a18560208601612df1565b915060c08401356132b181612dbd565b809150509250925092565b602081525f82518060208401528060208501604085015e5f6040828501015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011684010191505092915050565b5f6020828403121561331f575f5ffd5b5051919050565b600181811c9082168061333a57607f821691505b602082108103610fd0577f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f60208284031215613381575f5ffd5b8151610d1981612dbd565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f7f800000000000000000000000000000000000000000000000000000000000000082036133e9576133e961338c565b505f0390565b80820180821115611ccb57611ccb61338c565b81810381811115611ccb57611ccb61338c565b5f60208284031215613425575f5ffd5b8151610d1981613236565b5f60208284031215613440575f5ffd5b8135610d1981612dbd565b803562ffffff81168114612dec575f5ffd5b5f60a082840312801561346e575f5ffd5b5060405160a0810167ffffffffffffffff811182821017156134b7577f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6040526134c383612de1565b81526134d160208401612de1565b60208201526134e26040840161344b565b60408201526134f360608401612fd2565b606082015261350460808401612de1565b60808201529392505050565b5f60208284031215613520575f5ffd5b8135610d1981613236565b600f81810b9083900b016f7fffffffffffffffffffffffffffffff81137fffffffffffffffffffffffffffffffff8000000000000000000000000000000082121715611ccb57611ccb61338c565b5f81600f0b7fffffffffffffffffffffffffffffffff8000000000000000000000000000000081036135ad576135ad61338c565b5f0392915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f82613615577f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b500490565b62ffffff818116838216029081169081811461322f5761322f61338c56fea164736f6c634300081d000a","sourceMap":"1101:6937:43:-:0;;;2049:241;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;2144:172:41;;;;;;;;;;;;;;;;;2249:2;1085:46:42;;-1:-1:-1;;;;;782:26:38;;;;2178:8:43;;;902:25:47::1;922:4;902:19;:25::i;:::-;-1:-1:-1::0;2263:21:41::2;:46;2287:22:::0;2263:21;:46:::2;:::i;:::-;-1:-1:-1::0;;;;;;;;2233:12:43;;::::1;;::::0;2255:28:::1;;::::0;-1:-1:-1;1101:6937:43;;1578:142:47;1655:58;1685:5;1692:20;1101:6937:43;;;;;;;;-1:-1:-1;1101:6937:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4425:4:41;1101:6937:43;;;4400:29:41;;;1101:6937:43;;;4439:40:41;;;4489:35;;;1101:6937:43;;;4534:37:41;;;;1101:6937:43;4292:286:41;1692:20:47;1655:29;:58::i;:::-;1578:142;:::o;3610:1599:20:-;3729:28;;:74;;1397:7;16467:29;;:34;;3729:74;;;:166;;-1:-1:-1;3823:27:20;;;;:72;;1460:7;16467:29;;:34;;3823:72;;3729:166;:265;;;-1:-1:-1;3915:30:20;;;;:79;;1528:7;16467:29;;:34;;3915:79;;3729:265;:362;;;-1:-1:-1;4014:29:20;;;;:77;;1594:7;16467:29;;:34;;4014:77;;3729:362;:467;;;-1:-1:-1;4111:33:20;;;;:85;;1665:6;16467:29;;:34;;4111:85;;3729:467;:570;;;-1:-1:-1;4216:32:20;;;;:83;;1733:6;16467:29;;:34;;4216:83;;3729:570;:652;;;-1:-1:-1;4319:22:20;;;;:62;;1791:6;16467:29;;:34;;4319:62;;3729:652;:732;;;-1:-1:-1;4401:21:20;;;;:60;;1847:6;16467:29;;:34;;4401:60;;3729:732;:818;;;-1:-1:-1;4481:24:20;;;;:66;;1907:6;16467:29;;:34;;4481:66;;3729:818;:902;;;-1:-1:-1;4567:23:20;;;;:64;;1965:6;16467:29;;:34;;4567:64;;3729:902;:1009;;;-1:-1:-1;4651:33:20;;;;:87;;2037:6;16467:29;;:34;;4651:87;;3729:1009;:1114;;;-1:-1:-1;4758:32:20;;;;:85;;2107:6;16467:29;;:34;;4758:85;;3729:1114;:1236;;;-1:-1:-1;4863:40:20;;;;:102;;2186:6;16467:29;;:34;;4863:102;;3729:1236;:1384;;;-1:-1:-1;4985:43:20;;;;:128;;2268:6;16467:29;;:34;;4985:128;;3729:1384;3712:1491;;;5138:54;-1:-1:-1;;;5186:4:20;5138:39;:54::i;:::-;3610:1599;;:::o;1009:257:17:-;1133:8;1130:1;1123:19;-1:-1:-1;;;;;1172:4:17;1168:53;1162:4;1155:67;1245:4;1242:1;1235:15;14:145:48;-1:-1:-1;;;;;103:31:48;;93:42;;83:70;;149:1;146;139:12;164:643;334:6;342;350;403:2;391:9;382:7;378:23;374:32;371:52;;;419:1;416;409:12;371:52;451:9;445:16;470:45;509:5;470:45;:::i;:::-;584:2;569:18;;563:25;534:5;;-1:-1:-1;597:47:48;563:25;597:47;:::i;:::-;715:2;700:18;;694:25;663:7;;-1:-1:-1;728:47:48;694:25;728:47;:::i;:::-;794:7;784:17;;;164:643;;;;;:::o;812:127::-;873:10;868:3;864:20;861:1;854:31;904:4;901:1;894:15;928:4;925:1;918:15;944:380;1023:1;1019:12;;;;1066;;;1087:61;;1141:4;1133:6;1129:17;1119:27;;1087:61;1194:2;1186:6;1183:14;1163:18;1160:38;1157:161;;1240:10;1235:3;1231:20;1228:1;1221:31;1275:4;1272:1;1265:15;1303:4;1300:1;1293:15;1157:161;;944:380;;;:::o;1455:518::-;1557:2;1552:3;1549:11;1546:421;;;1593:5;1590:1;1583:16;1637:4;1634:1;1624:18;1707:2;1695:10;1691:19;1688:1;1684:27;1678:4;1674:38;1743:4;1731:10;1728:20;1725:47;;;-1:-1:-1;1766:4:48;1725:47;1821:2;1816:3;1812:12;1809:1;1805:20;1799:4;1795:31;1785:41;;1876:81;1894:2;1887:5;1884:13;1876:81;;;1953:1;1939:16;;1920:1;1909:13;1876:81;;;1880:3;;1546:421;1455:518;;;:::o;2149:1299::-;2269:10;;-1:-1:-1;;;;;2291:30:48;;2288:56;;;2324:18;;:::i;:::-;2353:97;2443:6;2403:38;2435:4;2429:11;2403:38;:::i;:::-;2397:4;2353:97;:::i;:::-;2499:4;2530:2;2519:14;;2547:1;2542:649;;;;3235:1;3252:6;3249:89;;;-1:-1:-1;3304:19:48;;;3298:26;3249:89;-1:-1:-1;;2106:1:48;2102:11;;;2098:24;2094:29;2084:40;2130:1;2126:11;;;2081:57;3351:81;;2512:930;;2542:649;1402:1;1395:14;;;1439:4;1426:18;;-1:-1:-1;;2578:20:48;;;2696:222;2710:7;2707:1;2704:14;2696:222;;;2792:19;;;2786:26;2771:42;;2899:4;2884:20;;;;2852:1;2840:14;;;;2726:12;2696:222;;;2700:3;2946:6;2937:7;2934:19;2931:201;;;3007:19;;;3001:26;-1:-1:-1;;3090:1:48;3086:14;;;3102:3;3082:24;3078:37;3074:42;3059:58;3044:74;;2931:201;-1:-1:-1;;;;3178:1:48;3162:14;;;3158:22;3145:36;;-1:-1:-1;2149:1299:48:o;:::-;1101:6937:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","linkReferences":{}},"deployedBytecode":{"object":"608060405260043610610170575f3560e01c80636fe7e6eb116100c6578063c4e833ce1161007c578063dc98354e11610057578063dc98354e1461060b578063e1b4af6914610515578063f777ce221461062a575f5ffd5b8063c4e833ce14610534578063cd272714146105b9578063dc4c90d3146105d8575f5ffd5b8063ae6836d6116100ac578063ae6836d614610488578063b47b2fb1146104bb578063b6a8b0fa14610515575f5ffd5b80636fe7e6eb146104695780639f063efc14610412575f5ffd5b80632c2efcac11610126578063490c98f511610101578063490c98f514610385578063575e24b4146103b05780636c2bbe7e14610412575f5ffd5b80632c2efcac1461031f5780632d910fb41461033d5780633f7d117914610371575f5ffd5b806321d0ee701161015657806321d0ee701461024f578063259982e51461029f57806328401c10146102be575f5ffd5b806316f0115b146101ab5780631ce4c78b14610208575f5ffd5b366101a7576040517fa80433dc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5ffd5b3480156101b6575f5ffd5b506101de7f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b348015610213575f5ffd5b5061023b7f000000000000000000000000000000000000000000000000000000000000000081565b60405162ffffff90911681526020016101ff565b34801561025a575f5ffd5b5061026e610269366004612e4f565b61064b565b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020016101ff565b3480156102aa575f5ffd5b5061026e6102b9366004612e4f565b6106d4565b3480156102c9575f5ffd5b506103056102d8366004612ec6565b60026020525f9081526040902054600f81810b917001000000000000000000000000000000009004900b82565b60408051600f93840b81529190920b6020820152016101ff565b34801561032a575f5ffd5b506108005b6040519081526020016101ff565b348015610348575f5ffd5b5061035c610357366004612ec6565b610751565b604080519283526020830191909152016101ff565b34801561037c575f5ffd5b506101de61096b565b348015610390575f5ffd5b505f546101de9073ffffffffffffffffffffffffffffffffffffffff1681565b3480156103bb575f5ffd5b506103cf6103ca366004612eed565b610a41565b604080517fffffffff000000000000000000000000000000000000000000000000000000009094168452602084019290925262ffffff16908201526060016101ff565b34801561041d575f5ffd5b5061043161042c366004612f47565b610ad1565b604080517fffffffff0000000000000000000000000000000000000000000000000000000090931683526020830191909152016101ff565b348015610474575f5ffd5b5061026e610483366004612fe3565b610b61565b348015610493575f5ffd5b506101de7f000000000000000000000000000000000000000000000000000000000000000081565b3480156104c6575f5ffd5b506104da6104d536600461303a565b610be8565b604080517fffffffff000000000000000000000000000000000000000000000000000000009093168352600f9190910b6020830152016101ff565b348015610520575f5ffd5b5061026e61052f3660046130bb565b610c76565b34801561053f575f5ffd5b50604080516101c0810182525f60208201819052606082018190526080820181905260a0820181905260e0820181905261010082018190526101208201819052610160820181905261018082018190526101a0820152600160c0820181905261014082018190528082528183015290516101ff9190613115565b3480156105c4575f5ffd5b5061032f6105d3366004613243565b610cff565b3480156105e3575f5ffd5b506101de7f000000000000000000000000000000000000000000000000000000000000000081565b348015610616575f5ffd5b5061026e610625366004613275565b610d20565b348015610635575f5ffd5b5061063e610d9b565b6040516101ff91906132bc565b5f3373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016146106bb576040517fae18210a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6106c88686868686610e27565b90505b95945050505050565b5f3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610744576040517fae18210a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6106c88686868686610e5a565b5f818152600260209081526040808320815180830190925254600f81810b808452700100000000000000000000000000000000909204900b9282019290925282911580156107a457506020810151600f0b155b156107db576040517f0afa7ee800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80516040517f4903b0d10000000000000000000000000000000000000000000000000000000081526fffffffffffffffffffffffffffffffff90911660048201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1690634903b0d190602401602060405180830381865afa158015610878573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061089c919061330f565b60208201516040517f4903b0d10000000000000000000000000000000000000000000000000000000081526fffffffffffffffffffffffffffffffff909116600482015290935073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001690634903b0d190602401602060405180830381865afa15801561093f573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610963919061330f565b915050915091565b5f5f6109967f0000000000000000000000000000000000000000000000000000000000000000610e8d565b5f5490915073ffffffffffffffffffffffffffffffffffffffff808316911614610a24575f80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8316908117825560405190917f9aafce815f6249ca174c3adc0232e8758909994867884013369549fbe000d51791a25b50505f5473ffffffffffffffffffffffffffffffffffffffff1690565b5f80803373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610ab3576040517fae18210a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ac08888888888610fd6565b925092509250955095509592505050565b5f803373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610b42576040517fae18210a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610b5189898989898989611009565b9150915097509795505050505050565b5f3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610bd1576040517fae18210a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610bdd85858585610e27565b90505b949350505050565b5f803373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610c59576040517fae18210a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610c67888888888888611009565b91509150965096945050505050565b5f3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610ce6576040517fae18210a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610cf4878787878787610e27565b979650505050505050565b5f610d16848484610d1188888861103d565b611390565b90505b9392505050565b5f3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610d90576040517fae18210a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610d1684848461145b565b60018054610da890613326565b80601f0160208091040260200160405190810160405280929190818152602001828054610dd490613326565b8015610e1f5780601f10610df657610100808354040283529160200191610e1f565b820191905f5260205f20905b815481529060010190602001808311610e0257829003601f168201915b505050505081565b5f6040517f0a85dc2900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f6040517f78895c1300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f8273ffffffffffffffffffffffffffffffffffffffff1663f02de3b26040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ed8573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610efc9190613371565b905073ffffffffffffffffffffffffffffffffffffffff81161580610f36575073ffffffffffffffffffffffffffffffffffffffff81163b155b15610f4357505f92915050565b8073ffffffffffffffffffffffffffffffffffffffff1663e0ef2b4b6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610fc8575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201909252610fc591810190613371565b60015b15610fd05791505b50919050565b5f5f5f5f5f610fe58989611a3f565b91509150610ff68a8a8a8585611af2565b9450945094505050955095509592505050565b5f5f6040517f0a85dc2900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f818152600260205260408120818412156111b257841561114d57805473ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001690635e0d443f90600f81810b917001000000000000000000000000000000009004900b6110bd886133b9565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b168152600f93840b60048201529190920b60248201526044810191909152606401602060405180830381865afa158015611122573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611146919061330f565b9150611388565b805473ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001690635e0d443f907001000000000000000000000000000000008104600f90810b91900b6110bd886133b9565b835f6111bd82611cab565b6111c790836133ef565b905086156112ac5782546040517f67df02ca000000000000000000000000000000000000000000000000000000008152600f82810b600483015270010000000000000000000000000000000090920490910b6024820152604481018290527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906367df02ca90606401602060405180830381865afa158015611281573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906112a5919061330f565b9350611385565b82546040517f67df02ca0000000000000000000000000000000000000000000000000000000081527001000000000000000000000000000000008204600f90810b60048301529190910b6024820152604481018290527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906367df02ca90606401602060405180830381865afa15801561135e573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611382919061330f565b93505b50505b509392505050565b5f5f6113bd7f00000000000000000000000000000000000000000000000000000000000000008786611cd1565b90508062ffffff165f036113d45782915050610be0565b5f5473ffffffffffffffffffffffffffffffffffffffff166113fa576113f861096b565b505b5f5473ffffffffffffffffffffffffffffffffffffffff1661141f5782915050610be0565b5f8086129061142f838387611d41565b9050816114455761144081866133ef565b61144f565b61144f8186613402565b98975050505050505050565b6040517fe4d332a900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000811660048301525f917f00000000000000000000000000000000000000000000000000000000000000009091169063e4d332a990602401602060405180830381865afa158015611509573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061152d9190613415565b15611564576040517f57fa586900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517f940494f100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000811660048301525f917f00000000000000000000000000000000000000000000000000000000000000009091169063940494f190602401602060405180830381865afa158015611612573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611636919061330f565b90505f808080805b85811015611795576040517fc6610657000000000000000000000000000000000000000000000000000000008152600481018290525f907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063c661065790602401602060405180830381865afa1580156116d1573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906116f59190613371565b905061170460208b018b613430565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611742578193506001955061178c565b61175260408b0160208c01613430565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361178c57819250600194505b5060010161163e565b50831580156117a2575082155b1561181b576117b46020890189613430565b6117c460408a0160208b01613430565b6040517f97956d6e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9283166004820152911660248201526044015b60405180910390fd5b836118785761182d6020890189613430565b6040517f8466f04600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091166004820152602401611812565b8261188d5761182d6040890160208a01613430565b60408051808201909152600f83810b825282900b602082015260025f6118c26118bb368d90038d018d61345d565b60a0902090565b81526020808201929092526040015f208251928201516fffffffffffffffffffffffffffffffff90811670010000000000000000000000000000000002931692909217909155611979907f0000000000000000000000000000000000000000000000000000000000000000907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9061195c908c018c613430565b73ffffffffffffffffffffffffffffffffffffffff169190611d7e565b6119ce7f00000000000000000000000000000000000000000000000000000000000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff61195c60408c0160208d01613430565b6119e06118bb368a90038a018a61345d565b6040517fe4e250d624b5ed2f65699d87988884c47eac735ffb1dcccead084c5254b14373905f90a2611a1061096b565b507fdc98354e000000000000000000000000000000000000000000000000000000009998505050505050505050565b5f8080611a4f6020850185613510565b611a6557611a606020860186613430565b611a75565b611a756040860160208701613430565b90505f611a856020860186613510565b611a9e57611a996040870160208801613430565b611aab565b611aab6020870187613430565b90505f8080611acd85858a611ac86118bb368f90038f018f61345d565b611e49565b92509250925080611ae357611ae3853085612084565b509450925050505b9250929050565b5f5f5f5f611b0786865f8a6020013512612276565b90505f611b1760208901356133b9565b90505f611b627f0000000000000000000000000000000000000000000000000000000000000000611b4b60208c018c613510565b611b5d6118bb368f90038f018f61345d565b611cd1565b9050611b917f00000000000000000000000000000000000000000000000000000000000000008b8b8685612292565b611b9b908461352b565b92505f896020013512611bb457611bb187613579565b91505b5f8060208b018035821390611bc9908d613510565b151503611be15783600f0b915084600f0b9050611bee565b84600f0b915083600f0b90505b73ffffffffffffffffffffffffffffffffffffffff8d16611c176118bb368f90038f018f61345d565b604080518581526020810185905262ffffff87168183015290517f6150bb53cd76c5702d6074239fc7b6c2a5495d339eb122fdc06252f3efdbbc1b9181900360600190a37f575e24b4000000000000000000000000000000000000000000000000000000006fffffffffffffffffffffffffffffffff8616608086901b17909e909d505f9c509a5050505050505050505050565b5f80611cba620f4240846135e2565b905060148111611ccb576014610d19565b92915050565b5f80611cf373ffffffffffffffffffffffffffffffffffffffff861684612461565b509250505083611d0b57600c81901c610fff16611d11565b610fff81165b61ffff1691506106cb7f00000000000000000000000000000000000000000000000000000000000000008361361a565b5f8215611d6257611d5b828562ffffff16620f4240612546565b9050610d19565b611d5b8262ffffff8616611d7981620f4240613402565b612546565b611d8a8383835f612576565b611e4457611d9b83835f6001612576565b611de9576040517f5274afe700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84166004820152602401611812565b611df68383836001612576565b611e44576040517f5274afe700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84166004820152602401611812565b505050565b5f8181526002602090815260408220829182919082908190611e6d90890189613510565b15611e975750508054600f81810b917001000000000000000000000000000000009004900b611eb8565b505080547001000000000000000000000000000000008104600f90810b91900b5b5f88602001351215611ed857611ed160208901356133b9565b9450611fbb565b602088013573ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000166367df02ca8484611f2485611cab565b611f2e90866133ef565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b168152600f93840b60048201529190920b60248201526044810191909152606401602060405180830381865afa158015611f93573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611fb7919061330f565b9550505b6040517f0b0d9c0900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8a81166004830152306024830152604482018790527f00000000000000000000000000000000000000000000000000000000000000001690630b0d9c09906064015f604051808303815f87803b15801561204e575f5ffd5b505af1158015612060573d5f5f3e3d5ffd5b505050506120718583838d8c6125fe565b9550600193505050509450945094915050565b805f0361209057505050565b6040517fa584119400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063a5841194906024015f604051808303815f87803b158015612116575f5ffd5b505af1158015612128573d5f5f3e3d5ffd5b5050505073ffffffffffffffffffffffffffffffffffffffff83166121dd577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166311da60b4826040518263ffffffff1660e01b815260040160206040518083038185885af11580156121b2573d5f5f3e3d5ffd5b50505050506040513d601f19601f820116820180604052508101906121d7919061330f565b50505050565b6121e883838361294c565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166311da60b46040518163ffffffff1660e01b81526004016020604051808303815f875af1158015612252573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906121d7919061330f565b5f5f821561228957508261114681613579565b50929392505050565b5f8162ffffff165f036122a657505f6106cb565b5f5473ffffffffffffffffffffffffffffffffffffffff166122cc576122ca61096b565b505b5f5473ffffffffffffffffffffffffffffffffffffffff166122ef57505f6106cb565b5f6020850180358213919082906123069088613510565b15151461231f5761231a6020880188613430565b61232f565b61232f6040880160208901613430565b90505f5f86600f0b12612342578561234b565b61234b86613579565b6fffffffffffffffffffffffffffffffff1690505f612371865f8a602001351284611d41565b5f5460405182815291925073ffffffffffffffffffffffffffffffffffffffff858116929116907fdb249cf7a102711dda1beaba415bb011ee0e1402c7f67617236fed5739235d6c9060200160405180910390a35f546040517f0b0d9c0900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8581166004830152918216602482015260448101839052908b1690630b0d9c09906064015f604051808303815f87803b15801561243d575f5ffd5b505af115801561244f573d5f5f3e3d5ffd5b50929c9b505050505050505050505050565b5f5f5f5f5f61246f866129ec565b6040517f1e2eaeaf000000000000000000000000000000000000000000000000000000008152600481018290529091505f9073ffffffffffffffffffffffffffffffffffffffff891690631e2eaeaf90602401602060405180830381865afa1580156124dd573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612501919061330f565b905073ffffffffffffffffffffffffffffffffffffffff811695508060a01c60020b945062ffffff8160b81c16935062ffffff8160d01c169250505092959194509250565b5f612552848484612a28565b90508180612562576125626135b5565b83850915610d195760010180610d19575f5ffd5b6040517f095ea7b3000000000000000000000000000000000000000000000000000000005f81815273ffffffffffffffffffffffffffffffffffffffff8616600452602485905291602083604481808b5af1925060015f511483166125f25783831516156125e6573d5f823e3d81fd5b5f873b113d1516831692505b60405250949350505050565b6040517fa584119400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83811660048301525f917f00000000000000000000000000000000000000000000000000000000000000009091169063a5841194906024015f604051808303815f87803b158015612688575f5ffd5b505af115801561269a573d5f5f3e3d5ffd5b505050505f826020013513156127c3576040517fddc1f59d000000000000000000000000000000000000000000000000000000008152600f86810b600483015285900b6024820152604481018790525f60648201523060848201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063ddc1f59d9060a4016020604051808303815f875af1158015612752573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612776919061330f565b505060208101356127be73ffffffffffffffffffffffffffffffffffffffff84167f000000000000000000000000000000000000000000000000000000000000000083612ae3565b6128b4565b6040517fddc1f59d000000000000000000000000000000000000000000000000000000008152600f86810b600483015285900b6024820152604481018790525f606482015273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000811660848301527f0000000000000000000000000000000000000000000000000000000000000000169063ddc1f59d9060a4016020604051808303815f875af115801561288d573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906128b1919061330f565b90505b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166311da60b46040518163ffffffff1660e01b81526004016020604051808303815f875af115801561291e573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612942919061330f565b5095945050505050565b3073ffffffffffffffffffffffffffffffffffffffff8316036129aa57611e4473ffffffffffffffffffffffffffffffffffffffff84167f000000000000000000000000000000000000000000000000000000000000000083612ae3565b611e4473ffffffffffffffffffffffffffffffffffffffff8416837f000000000000000000000000000000000000000000000000000000000000000084612c00565b6040515f90612a0b908390600690602001918252602082015260400190565b604051602081830303815290604052805190602001209050919050565b5f838302817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff85870982811083820303915050808411612a66575f5ffd5b805f03612a7857508290049050610d19565b5f848688095f868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010186841190950394909402919094039290920491909117919091029150509392505050565b5f73ffffffffffffffffffffffffffffffffffffffff8416612b3e575f5f5f5f85875af1905080612b3957612b39835f7ff4b3b1bc00000000000000000000000000000000000000000000000000000000612c5c565b6121d7565b6040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8416600482015282602482015260205f6044835f895af13d15601f3d1160015f511416171691505f81525f60208201525f604082015250806121d7576121d7847fa9059cbb000000000000000000000000000000000000000000000000000000007ff27f64e400000000000000000000000000000000000000000000000000000000612c5c565b612c0e848484846001612d2a565b6121d7576040517f5274afe700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85166004820152602401611812565b6040517f90bfb8650000000000000000000000000000000000000000000000000000000080825273ffffffffffffffffffffffffffffffffffffffff851660048301527fffffffff0000000000000000000000000000000000000000000000000000000084166024830152608060448301526020601f3d018190040260a0810160648401523d608484015290913d5f60a483013e60048260a4018201527fffffffff0000000000000000000000000000000000000000000000000000000084168260c4018201528160e40181fd5b6040517f23b872dd000000000000000000000000000000000000000000000000000000005f81815273ffffffffffffffffffffffffffffffffffffffff8781166004528616602452604485905291602083606481808c5af1925060015f51148316612dac578383151615612da0573d5f823e3d81fd5b5f883b113d1516831692505b604052505f60605295945050505050565b73ffffffffffffffffffffffffffffffffffffffff81168114612dde575f5ffd5b50565b8035612dec81612dbd565b919050565b5f60a08284031215610fd0575f5ffd5b5f60808284031215610fd0575f5ffd5b5f5f83601f840112612e21575f5ffd5b50813567ffffffffffffffff811115612e38575f5ffd5b602083019150836020828501011115611aeb575f5ffd5b5f5f5f5f5f6101608688031215612e64575f5ffd5b8535612e6f81612dbd565b9450612e7e8760208801612df1565b9350612e8d8760c08801612e01565b925061014086013567ffffffffffffffff811115612ea9575f5ffd5b612eb588828901612e11565b969995985093965092949392505050565b5f60208284031215612ed6575f5ffd5b5035919050565b5f60608284031215610fd0575f5ffd5b5f5f5f5f5f6101408688031215612f02575f5ffd5b8535612f0d81612dbd565b9450612f1c8760208801612df1565b9350612f2b8760c08801612edd565b925061012086013567ffffffffffffffff811115612ea9575f5ffd5b5f5f5f5f5f5f5f6101a0888a031215612f5e575f5ffd5b8735612f6981612dbd565b9650612f788960208a01612df1565b9550612f878960c08a01612e01565b94506101408801359350610160880135925061018088013567ffffffffffffffff811115612fb3575f5ffd5b612fbf8a828b01612e11565b989b979a50959850939692959293505050565b8035600281900b8114612dec575f5ffd5b5f5f5f5f6101008587031215612ff7575f5ffd5b843561300281612dbd565b93506130118660208701612df1565b925060c085013561302181612dbd565b915061302f60e08601612fd2565b905092959194509250565b5f5f5f5f5f5f6101608789031215613050575f5ffd5b863561305b81612dbd565b955061306a8860208901612df1565b94506130798860c08901612edd565b9350610120870135925061014087013567ffffffffffffffff81111561309d575f5ffd5b6130a989828a01612e11565b979a9699509497509295939492505050565b5f5f5f5f5f5f61012087890312156130d1575f5ffd5b86356130dc81612dbd565b95506130eb8860208901612df1565b945060c0870135935060e0870135925061010087013567ffffffffffffffff81111561309d575f5ffd5b8151151581526101c081016020830151613133602084018215159052565b506040830151613147604084018215159052565b50606083015161315b606084018215159052565b50608083015161316f608084018215159052565b5060a083015161318360a084018215159052565b5060c083015161319760c084018215159052565b5060e08301516131ab60e084018215159052565b506101008301516131c161010084018215159052565b506101208301516131d761012084018215159052565b506101408301516131ed61014084018215159052565b5061016083015161320361016084018215159052565b5061018083015161321961018084018215159052565b506101a083015161322f6101a084018215159052565b5092915050565b8015158114612dde575f5ffd5b5f5f5f60608486031215613255575f5ffd5b833561326081613236565b95602085013595506040909401359392505050565b5f5f5f60e08486031215613287575f5ffd5b833561329281612dbd565b92506132a18560208601612df1565b915060c08401356132b181612dbd565b809150509250925092565b602081525f82518060208401528060208501604085015e5f6040828501015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011684010191505092915050565b5f6020828403121561331f575f5ffd5b5051919050565b600181811c9082168061333a57607f821691505b602082108103610fd0577f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f60208284031215613381575f5ffd5b8151610d1981612dbd565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f7f800000000000000000000000000000000000000000000000000000000000000082036133e9576133e961338c565b505f0390565b80820180821115611ccb57611ccb61338c565b81810381811115611ccb57611ccb61338c565b5f60208284031215613425575f5ffd5b8151610d1981613236565b5f60208284031215613440575f5ffd5b8135610d1981612dbd565b803562ffffff81168114612dec575f5ffd5b5f60a082840312801561346e575f5ffd5b5060405160a0810167ffffffffffffffff811182821017156134b7577f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6040526134c383612de1565b81526134d160208401612de1565b60208201526134e26040840161344b565b60408201526134f360608401612fd2565b606082015261350460808401612de1565b60808201529392505050565b5f60208284031215613520575f5ffd5b8135610d1981613236565b600f81810b9083900b016f7fffffffffffffffffffffffffffffff81137fffffffffffffffffffffffffffffffff8000000000000000000000000000000082121715611ccb57611ccb61338c565b5f81600f0b7fffffffffffffffffffffffffffffffff8000000000000000000000000000000081036135ad576135ad61338c565b5f0392915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f82613615577f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b500490565b62ffffff818116838216029081169081811461322f5761322f61338c56fea164736f6c634300081d000a","sourceMap":"1101:6937:43:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8001:28;;;;;;;;;;;;;;1101:6937;;;;1280:40;;;;;;;;;;;;;;;;;;217:42:48;205:55;;;187:74;;175:2;160:18;1280:40:43;;;;;;;;980:45:42;;;;;;;;;;;;;;;;;;446:8:48;434:21;;;416:40;;404:2;389:18;980:45:42;272:190:48;3116:290:47;;;;;;;;;;-1:-1:-1;3116:290:47;;;;;:::i;:::-;;:::i;:::-;;;2459:66:48;2447:79;;;2429:98;;2417:2;2402:18;3116:290:47;2285:248:48;2583:284:47;;;;;;;;;;-1:-1:-1;2583:284:47;;;;;:::i;:::-;;:::i;1763:52:43:-;;;;;;;;;;-1:-1:-1;1763:52:43;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;2995:2:48;2984:22;;;2966:41;;3043:22;;;;3038:2;3023:18;;3016:50;2939:18;1763:52:43;2796:276:48;4623:108:41;;;;;;;;;;-1:-1:-1;4717:7:41;4623:108;;;3223:25:48;;;3211:2;3196:18;4623:108:41;3077:177:48;3394:420:43;;;;;;;;;;-1:-1:-1;3394:420:43;;;;;:::i;:::-;;:::i;:::-;;;;3433:25:48;;;3489:2;3474:18;;3467:34;;;;3406:18;3394:420:43;3259:248:48;2355:284:41;;;;;;;;;;;;;:::i;951:23:42:-;;;;;;;;;;-1:-1:-1;951:23:42;;;;;;;;5055:272:47;;;;;;;;;;-1:-1:-1;5055:272:47;;;;;:::i;:::-;;:::i;:::-;;;;4979:66:48;4967:79;;;4949:98;;5078:2;5063:18;;5056:34;;;;5138:8;5126:21;5106:18;;;5099:49;4937:2;4922:18;5055:272:47;4716:438:48;4352:384:47;;;;;;;;;;-1:-1:-1;4352:384:47;;;;;:::i;:::-;;:::i;:::-;;;;6533:66:48;6521:79;;;6503:98;;6632:2;6617:18;;6610:34;;;;6476:18;4352:384:47;6299:351:48;2157:240:47;;;;;;;;;;-1:-1:-1;2157:240:47;;;;;:::i;:::-;;:::i;1405:55:43:-;;;;;;;;;;;;;;;5582:298:47;;;;;;;;;;-1:-1:-1;5582:298:47;;;;;:::i;:::-;;:::i;:::-;;;;8841:66:48;8829:79;;;8811:98;;8956:2;8945:22;;;;8940:2;8925:18;;8918:50;8784:18;5582:298:47;8641:333:48;6131:285:47;;;;;;;;;;-1:-1:-1;6131:285:47;;;;;:::i;:::-;;:::i;4292:286:41:-;;;;;;;;;;-1:-1:-1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4425:4:41;-1:-1:-1;;;4400:29:41;;;-1:-1:-1;;;4439:40:41;;;4489:35;;;-1:-1:-1;;;4534:37:41;4292:286;;;;-1:-1:-1;4292:286:41;:::i;2830:233::-;;;;;;;;;;-1:-1:-1;2830:233:41;;;;;:::i;:::-;;:::i;411:41:38:-;;;;;;;;;;;;;;;1753:224:47;;;;;;;;;;-1:-1:-1;1753:224:47;;;;;:::i;:::-;;:::i;1978:35:41:-;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;3116:290:47:-;3321:6;650:10:38;:34;672:11;650:34;;646:63;;693:16;;;;;;;;;;;;;;646:63;3346:53:47::1;3369:6;3377:3;3382:6;3390:8;;3346:22;:53::i;:::-;3339:60;;719:1:38;3116:290:47::0;;;;;;;:::o;2583:284::-;2785:6;650:10:38;:34;672:11;650:34;;646:63;;693:16;;;;;;;;;;;;;;646:63;2810:50:47::1;2830:6;2838:3;2843:6;2851:8;;2810:19;:50::i;3394:420:43:-:0;3473:15;3544:25;;;:17;:25;;;;;;;;3517:52;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3473:15;;3583:25;:54;;;;-1:-1:-1;3612:20:43;;;;:25;;;3583:54;3579:82;;;3646:15;;;;;;;;;;;;;;3579:82;3711:20;;3681:53;;;;;3695:38;;;;3681:53;;;3223:25:48;3681:4:43;:13;;;;;3196:18:48;;3681:53:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;3784:20;;;;3754:53;;;;;3768:38;;;;3754:53;;;3223:25:48;3671:63:43;;-1:-1:-1;3754:13:43;:4;:13;;;;3196:18:48;;3754:53:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;3744:63;;3507:307;3394:420;;;:::o;2355:284:41:-;2412:7;2431:19;2453:25;2466:11;2453:12;:25::i;:::-;2492:8;;2431:47;;-1:-1:-1;2492:23:41;;;;:8;;:23;2488:120;;2531:8;:22;;;;;;;;;;;;2572:25;;2531:22;;2572:25;;;2488:120;-1:-1:-1;;2624:8:41;;;;;2355:284::o;5055:272:47:-;5224:6;;;650:10:38;:34;672:11;650:34;;646:63;;693:16;;;;;;;;;;;;;;646:63;5278:42:47::1;5290:6;5298:3;5303:6;5311:8;;5278:11;:42::i;:::-;5271:49;;;;;;5055:272:::0;;;;;;;;;:::o;4352:384::-;4618:6;;650:10:38;:34;672:11;650:34;;646:63;;693:16;;;;;;;;;;;;;;646:63;4657:72:47::1;4679:6;4687:3;4692:6;4700:5;4707:11;4720:8;;4657:21;:72::i;:::-;4650:79;;;;4352:384:::0;;;;;;;;;;:::o;2157:240::-;2312:6;650:10:38;:34;672:11;650:34;;646:63;;693:16;;;;;;;;;;;;;;646:63;2341:49:47::1;2358:6;2366:3;2371:12;2385:4;2341:16;:49::i;:::-;2334:56;;719:1:38;2157:240:47::0;;;;;;:::o;5582:298::-;5792:6;;650:10:38;:34;672:11;650:34;;646:63;;693:16;;;;;;;;;;;;;;646:63;5825:48:47::1;5836:6;5844:3;5849:6;5857:5;5864:8;;5825:10;:48::i;:::-;5818:55;;;;5582:298:::0;;;;;;;;;:::o;6131:285::-;6330:6;650:10:38;:34;672:11;650:34;;646:63;;693:16;;;;;;;;;;;;;;646:63;6355:54:47::1;6369:6;6377:3;6382:7;6391;6400:8;;6355:13;:54::i;:::-;6348:61:::0;6131:285;-1:-1:-1;;;;;;;6131:285:47:o;2830:233:41:-;2918:25;2962:94;2974:9;2985:15;3002:6;3010:45;3020:9;3031:15;3048:6;3010:9;:45::i;:::-;2962:11;:94::i;:::-;2955:101;;2830:233;;;;;;:::o;1753:224:47:-;1897:6;650:10:38;:34;672:11;650:34;;646:63;;693:16;;;;;;;;;;;;;;646:63;1926:44:47::1;1944:6;1952:3;1957:12;1926:17;:44::i;1978:35:41:-:0;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;3412:213:47:-;3569:6;3598:20;;;;;;;;;;;;;;6698:225:41;6866:6;6895:21;;;;;;;;;;;;;;4466:505:42;4537:18;4567:33;4603:11;:33;;;:35;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;4567:71;-1:-1:-1;4652:39:42;;;;;:85;;-1:-1:-1;4695:37:42;;;;:42;4652:85;4648:108;;;-1:-1:-1;4754:1:42;;4466:505;-1:-1:-1;;4466:505:42:o;4648:108::-;4784:25;4770:50;;;:52;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4770:52:42;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;4766:199;;;4880:11;-1:-1:-1;4766:199:42;4557:414;4466:505;;;:::o;6929:367:41:-;7099:6;7107:15;7124:6;7147:16;7165:17;7186:28;7202:3;7207:6;7186:15;:28::i;:::-;7146:68;;;;7231:58;7248:6;7256:3;7261:6;7269:8;7279:9;7231:16;:58::i;:::-;7224:65;;;;;;;;6929:367;;;;;;;;;:::o;4742:280:47:-;4956:6;4964:12;4995:20;;;;;;;;;;;;;;2335:1014:43;2473:25;2542;;;:17;:25;;;;;2581:19;;;2577:766;;;2620:9;2616:291;;;2681:20;;2669:11;:4;:11;;;;2681:20;;;;;2703;;;;;2733:16;2734:15;2733:16;:::i;:::-;2669:82;;;;;;;;;;15187:2:48;15176:22;;;2669:82:43;;;15158:41:48;15235:22;;;;15215:18;;;15208:50;15274:18;;;15267:34;;;;15131:18;;2669:82:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;2649:102;;2577:766;;2616:291;2822:20;;2810:11;:4;:11;;;;2822:20;;;;;;;;2844;;2874:16;2875:15;2874:16;:::i;2577:766::-;2962:15;2937:14;3028:18;2962:15;3028:10;:18::i;:::-;3019:27;;:6;:27;:::i;:::-;2992:54;;3064:9;3060:273;;;3125:20;;3113:73;;;;;3125:20;;;;3113:73;;;15158:41:48;3147:20:43;;;;;;;15215:18:48;;;15208:50;15274:18;;;15267:34;;;3113:4:43;:11;;;;;15131:18:48;;3113:73:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;3093:93;;3060:273;;;3257:20;;3245:73;;;;;3257:20;;;;;;;3245:73;;;15158:41:48;3279:20:43;;;;15215:18:48;;;15208:50;15274:18;;;15267:34;;;3245:4:43;:11;;;;;15131:18:48;;3245:73:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;3225:93;;3060:273;2923:420;;2577:766;2504:845;2335:1014;;;;;:::o;3603:654:41:-;3740:7;3763:18;3784:47;3800:11;3813:9;3824:6;3784:15;:47::i;:::-;3763:68;;3846:11;:16;;3861:1;3846:16;3842:46;;3871:17;3864:24;;;;;3842:46;3923:1;3903:8;:22;:8;3899:42;;3927:14;:12;:14::i;:::-;;3899:42;3975:1;3955:8;:22;:8;3951:52;;3986:17;3979:24;;;;;3951:52;4014:17;4034:19;;;;4083:73;4111:11;4034:19;4138:17;4083:27;:73::i;:::-;4063:93;;4174:12;:76;;4221:29;4241:9;4221:17;:29;:::i;:::-;4174:76;;;4189:29;4209:9;4189:17;:29;:::i;:::-;4167:83;3603:654;-1:-1:-1;;;;;;;;3603:654:41:o;3820:1574:43:-;3936:35;;;;;:20;3965:4;205:55:48;;3936:35:43;;;187:74:48;-1:-1:-1;;3936:12:43;:20;;;;;;160:18:48;;3936:35:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;3932:64;;;3980:16;;;;;;;;;;;;;;3932:64;4028:39;;;;;:24;4061:4;205:55:48;;4028:39:43;;;187:74:48;-1:-1:-1;;4028:12:43;:24;;;;;;160:18:48;;4028:39:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;4007:60;-1:-1:-1;4077:16:43;;;;;4201:401;4225:10;4221:1;:14;4201:401;;;4271:13;;;;;;;;3223:25:48;;;4256:12:43;;4271:4;:10;;;;;3196:18:48;;4271:13:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;4256:28;-1:-1:-1;4326:13:43;;;;:3;:13;:::i;:::-;4302:38;;:4;:38;;;4298:294;;4388:1;4360:31;;4423:4;4409:18;;4298:294;;;4476:13;;;;;;;;:::i;:::-;4452:38;;:4;:38;;;4448:144;;4538:1;4510:31;;4573:4;4559:18;;4448:144;-1:-1:-1;4237:3:43;;4201:401;;;;4617:11;4616:12;:28;;;;;4633:11;4632:12;4616:28;4612:145;;;4699:13;;;;:3;:13;:::i;:::-;4731;;;;;;;;:::i;:::-;4667:79;;;;;16310:42:48;16298:55;;;4667:79:43;;;16280:74:48;16390:55;;16370:18;;;16363:83;16253:18;;4667:79:43;;;;;;;;4612:145;4771:11;4766:96;;4836:13;;;;:3;:13;:::i;:::-;4805:46;;;;;217:42:48;205:55;;;4805:46:43;;;187:74:48;160:18;;4805:46:43;14:253:48;4766:96:43;4876:11;4871:96;;4941:13;;;;;;;;:::i;4871:96::-;5009:62;;;;;;;;;;;;;;;;;;;;;;4977:17;-1:-1:-1;4995:10:43;:8;;;;;;;:3;:8;:::i;:::-;515:4:34;496:24;;;271:265;4995:10:43;4977:29;;;;;;;;;;;;-1:-1:-1;4977:29:43;:94;;;;;;;;;;;;;;;;;;;;;5082:85;;5142:4;;5149:17;;5105:13;;;;:3;:13;:::i;:::-;5082:51;;;:85;:51;:85::i;:::-;5177;5237:4;5244:17;5200:13;;;;;;;;:::i;5177:85::-;5303:10;:8;;;;;;;:3;:8;:::i;:10::-;5278:36;;;;;;;5324:14;:12;:14::i;:::-;-1:-1:-1;5355:32:43;;3820:1574;-1:-1:-1;;;;;;;;;3820:1574:43:o;9690:620:41:-;9799:16;;;9876:17;;;;:6;:17;:::i;:::-;:49;;9912:13;;;;:3;:13;:::i;:::-;9876:49;;;9896:13;;;;;;;;:::i;:::-;9850:75;-1:-1:-1;9935:21:41;9959:17;;;;:6;:17;:::i;:::-;:49;;9995:13;;;;;;;;:::i;:::-;9959:49;;;9979:13;;;;:3;:13;:::i;:::-;9935:73;-1:-1:-1;10020:20:41;;;10093:62;10106:14;9935:73;10136:6;10144:10;:8;;;;;;;:3;:8;:::i;:10::-;10093:12;:62::i;:::-;10019:136;;;;;;10171:10;10166:94;;10197:52;10205:14;10229:4;10236:12;10197:7;:52::i;:::-;-1:-1:-1;10278:10:41;-1:-1:-1;10290:12:41;-1:-1:-1;;;9690:620:41;;;;;;:::o;7866:1323::-;8059:6;8067:15;8084:6;8102:23;8128:64;8144:8;8154:9;8190:1;8165:6;:22;;;:26;8128:15;:64::i;:::-;8102:90;-1:-1:-1;8202:16:41;8228:23;8229:22;;;;8228:23;:::i;:::-;8202:50;-1:-1:-1;8278:18:41;8299:59;8315:11;8328:17;;;;:6;:17;:::i;:::-;8347:10;:8;;;;;;;:3;:8;:::i;:10::-;8299:15;:59::i;:::-;8278:80;;8388:78;8410:11;8423:3;8428:6;8436:16;8454:11;8388:21;:78::i;:::-;8368:98;;;;:::i;:::-;;;8507:1;8481:6;:22;;;:27;8477:249;;8688:27;8704:9;8688:27;:::i;:::-;8676:39;;8477:249;8736:14;;8809:22;;;;;:26;-1:-1:-1;8809:26:41;8788:17;;8809:6;8788:17;:::i;:::-;:47;;;8784:227;;8861:9;8851:19;;;;8894:16;8884:26;;;;8784:227;;;8951:16;8941:26;;;;8991:9;8981:19;;;;8784:227;9026:59;;;9035:10;:8;;;;;;;:3;:8;:::i;:10::-;9026:59;;;18516:25:48;;;18572:2;18557:18;;18550:34;;;18632:8;18620:21;;18600:18;;;18593:49;9026:59:41;;;;;;;18504:2:48;9026:59:41;;;9104:26;540:19:32;536:42;;548:3;510:24;;;507:72;9096:86:41;;;;-1:-1:-1;9180:1:41;;-1:-1:-1;7866:1323:41;-1:-1:-1;;;;;;;;;;;7866:1323:41:o;7743:199:43:-;7802:7;;7838:25;1566:9;7838:6;:25;:::i;:::-;7821:42;;1513:2;7880:6;:26;:55;;1513:2;7880:55;;;7909:6;7873:62;-1:-1:-1;;7743:199:43:o;4021:439:42:-;4150:18;;4214:28;:20;;;4235:6;4214:20;:28::i;:::-;4184:58;;;;;4266:9;:141;;871:2:27;863:10;;;;;4266:141:42;;;750:5:27;743:12;;4290:51:42;4252:155;;;-1:-1:-1;4417:36:42;4432:21;4252:155;4417:36;:::i;3200:740::-;3350:7;3377:12;3373:561;;;3412:94;3438:17;3457:11;3412:94;;633:9:27;3412:25:42;:94::i;:::-;3405:101;;;;3373:561;3785:138;3828:17;3785:138;;;3860:49;3785:138;633:9:27;3860:49:42;:::i;:::-;3785:25;:138::i;5098:367:4:-;5190:42;5203:5;5210:7;5219:5;5226;5190:12;:42::i;:::-;5185:274;;5253:37;5266:5;5273:7;5282:1;5285:4;5253:12;:37::i;:::-;5248:91;;5299:40;;;;;217:42:48;205:55;;5299:40:4;;;187:74:48;160:18;;5299:40:4;14:253:48;5248:91:4;5358:41;5371:5;5378:7;5387:5;5394:4;5358:12;:41::i;:::-;5353:95;;5408:40;;;;;217:42:48;205:55;;5408:40:4;;;187:74:48;160:18;;5408:40:4;14:253:48;5353:95:4;5098:367;;;:::o;5439:1262:43:-;5603:20;5704:25;;;:17;:25;;;;;;;5603:20;;;;5704:25;5603:20;;;;5802:17;;;;:6;:17;:::i;:::-;5798:249;;;-1:-1:-1;;5850:20:43;;;;;;;5900;;;;;5798:249;;;-1:-1:-1;;5966:20:43;;;;;;;;;;6016;;5798:249;6086:1;6061:6;:22;;;:26;6057:385;;;6148:23;6149:22;;;;6148:23;:::i;:::-;6127:45;;6057:385;;;6312:22;;;;6362:11;:4;:11;;6374:12;6388:13;6412:18;6312:22;6412:10;:18::i;:::-;6403:27;;:6;:27;:::i;:::-;6362:69;;;;;;;;;;15187:2:48;15176:22;;;6362:69:43;;;15158:41:48;15235:22;;;;15215:18;;;15208:50;15274:18;;;15267:34;;;;15131:18;;6362:69:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;6349:82;;6189:253;6057:385;6452:57;;;;;:16;19613:55:48;;;6452:57:43;;;19595:74:48;6491:4:43;19685:18:48;;;19678:83;19777:18;;;19770:34;;;6452:11:43;:16;;;;19568:18:48;;6452:57:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6535:76;6547:10;6559:12;6573:13;6588:14;6604:6;6535:11;:76::i;:::-;6520:91;;6634:4;6621:17;;6649:45;;;5439:1262;;;;;;;;:::o;1788:346:37:-;1878:6;1888:1;1878:11;1874:24;;1788:346;;;:::o;1874:24::-;1908:26;;;;;:16;205:55:48;;;1908:26:37;;;187:74:48;1908:11:37;:16;;;;160:18:48;;1908:26:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;1948:22:37;;;1944:184;;1988:11;:18;;;2014:6;1988:35;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;5098:367:4;;;:::o;1944:184:37:-;2054:29;2059:8;2069:5;2076:6;2054:4;:29::i;:::-;2097:11;:18;;;:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;9195:489:41:-;9321:23;9360:19;9393:10;9389:289;;;-1:-1:-1;9457:9:41;9499:29;9457:9;9499:29;:::i;9389:289::-;-1:-1:-1;9598:8:41;;9195:489;-1:-1:-1;;;9195:489:41:o;1998:1196:42:-;2214:6;2236:11;:16;;2251:1;2236:16;2232:30;;-1:-1:-1;2261:1:42;2254:8;;2232:30;2375:1;2355:8;:22;:8;2351:42;;2379:14;:12;:14::i;:::-;;2351:42;2427:1;2407:8;:22;:8;2403:36;;-1:-1:-1;2438:1:42;2431:8;;2403:36;2450:17;2470:22;;;;;:26;-1:-1:-1;2470:26:42;2450:17;2470:26;;2622:17;;2470:6;2622:17;:::i;:::-;:33;;;:65;;2674:13;;;;:3;:13;:::i;:::-;2622:65;;;2658:13;;;;;;;;:::i;:::-;2591:96;;2698:22;2758:1;2739:16;:20;;;:59;;2782:16;2739:59;;;2762:17;2763:16;2762:17;:::i;:::-;2723:77;;2698:102;;2810:25;2838:84;2866:11;2904:1;2879:6;:22;;;:26;2907:14;2838:27;:84::i;:::-;3010:8;;2988:71;;3223:25:48;;;2810:112:42;;-1:-1:-1;2988:71:42;;;;;3010:8;;;2988:71;;3211:2:48;3196:18;2988:71:42;;;;;;;3107:8;;3069:66;;;;;:16;19613:55:48;;;3069:66:42;;;19595:74:48;3107:8:42;;;19685:18:48;;;19678:83;19777:18;;;19770:34;;;3069:16:42;;;;;;19568:18:48;;3069:66:42;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3168:17:42;;1998:1196;-1:-1:-1;;;;;;;;;;;;1998:1196:42:o;1580:996:29:-;1682:20;1704:10;1716:18;1736:12;1821:17;1841:25;1859:6;1841:17;:25::i;:::-;1892:27;;;;;;;;3223:25:48;;;1821:45:29;;-1:-1:-1;1877:12:29;;1892:16;;;;;;3196:18:48;;1892:27:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1877:42;;2251;2245:4;2241:53;2225:69;;2374:4;2369:3;2365:14;2362:1;2351:29;2343:37;;2464:8;2457:4;2452:3;2448:14;2444:29;2429:44;;2551:8;2544:4;2539:3;2535:14;2531:29;2522:38;;2172:398;;1580:996;;;;;;;:::o;5164:296:19:-;5256:14;5315:25;5322:1;5325;5328:11;5315:6;:25::i;:::-;5306:34;;5371:11;5358:25;;;;;:::i;:::-;5368:1;5365;5358:25;:30;5354:90;;5416:8;;:12;5408:21;;;;;12059:1252:4;12289:4;12283:11;12199:23;12157:12;12307:22;;;12368:15;12355:29;;12349:4;12342:43;12405:4;12398:19;;;12157:12;12481:4;12157:12;12469:4;12157:12;;12453:5;12446;12441:45;12430:56;;12698:1;12691:4;12685:11;12682:18;12673:7;12669:32;12659:606;;12830:6;12820:7;12813:15;12809:28;12806:165;;;12886:16;12880:4;12875:3;12860:43;12936:16;12931:3;12924:29;12806:165;13247:1;13239:5;13227:18;13224:25;13205:16;13198:24;13194:56;13185:7;13181:70;13170:81;;12659:606;13285:4;13278:17;-1:-1:-1;12059:1252:4;;-1:-1:-1;;;;12059:1252:4:o;6707:1030:43:-;6937:32;;;;;:16;205:55:48;;;6937:32:43;;;187:74:48;6908:17:43;;6937:11;:16;;;;;;160:18:48;;6937:32:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7144:1;7119:6;:22;;;:26;7115:586;;;7254:72;;;;;20738:2:48;20727:22;;;7254:72:43;;;20709:41:48;20786:22;;;20766:18;;;20759:50;20825:18;;;20818:34;;;7309:1:43;20868:18:48;;;20861:34;7320:4:43;20911:19:48;;;20904:84;7254:4:43;:13;;;;;20681:19:48;;7254:72:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;;7360:22:43;;;;7397:78;:23;;;7429:11;7360:22;7397:23;:78::i;:::-;7115:586;;;7611:79;;;;;20738:2:48;20727:22;;;7611:79:43;;;20709:41:48;20786:22;;;20766:18;;;20759:50;20825:18;;;20818:34;;;-1:-1:-1;20868:18:48;;;20861:34;7611:13:43;7677:11;20932:55:48;;20911:19;;;20904:84;7611:4:43;:13;;;;20681:19:48;;7611:79:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;7599:91;;7115:586;7710:11;:18;;;:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;6707:1030;;;;;;;:::o;10316:307:41:-;10426:4;10409:22;;;;10405:212;;10447:44;:14;;;10470:11;10484:6;10447:14;:44::i;10405:212::-;10522:84;:47;;;10570:5;10585:11;10599:6;10522:47;:84::i;14852:160:29:-;14953:51;;14917:7;;14953:51;;14984:6;;414:1;;14953:51;;21156:19:48;;;21200:2;21191:12;;21184:28;21237:2;21228:12;;20999:247;14953:51:29;;;;;;;;;;;;;14943:62;;;;;;14936:69;;14852:160;;;:::o;741:4141:19:-;823:14;1212:5;;;823:14;1413:6;1216:1;1212;1400:20;1473:5;1469:2;1466:13;1458:5;1454:2;1450:14;1446:34;1437:43;;;1633:5;1619:11;:19;1611:28;;;;;;1720:5;1729:1;1720:10;1716:177;;-1:-1:-1;1807:23:19;;;;-1:-1:-1;1865:13:19;;1716:177;2193:17;2293:11;2290:1;2287;2280:25;2701:12;2717:15;;;2716:31;;2869:22;;;;;3776:1;3757;:15;;3756:21;;4019:17;;;4015:21;;4008:28;4081:17;;;4077:21;;4070:28;4144:17;;;4140:21;;4133:28;4207:17;;;4203:21;;4196:28;4270:17;;;4266:21;;4259:28;4334:17;;;4330:21;;;4323:28;3313:12;;;;3309:23;;;3334:1;3305:31;2454:20;;;2443:32;;;3372:12;;;;2501:21;;;;3029:16;;;;3363:21;;;;4827:11;;;;;-1:-1:-1;;741:4141:19;;;;;:::o;1472:2873:33:-;1743:12;1769:22;;;1765:2574;;1956:1;1953;1950;1947;1939:6;1935:2;1928:5;1923:35;1912:46;;2086:7;2081:127;;2113:80;2148:2;2159:1;2163:29;2113:34;:80::i;:::-;1765:2574;;;2352:4;2346:11;2488:66;2483:3;2476:79;2600:42;2596:2;2592:51;2588:1;2583:3;2579:11;2572:72;2720:6;2715:2;2710:3;2706:12;2699:28;3649:2;3646:1;3642:2;3637:3;3634:1;3624:8;3617:5;3612:40;3141:16;3134:24;3128:2;3110:16;3107:24;3103:1;3099;3093:8;3090:15;3086:46;3083:76;2859:815;2828:846;;3752:1;3747:3;3740:14;3853:1;3846:4;3841:3;3837:14;3830:25;3956:1;3949:4;3944:3;3940:14;3933:25;;4125:7;4120:209;;4152:162;4224:8;4235:31;4268:28;4152:34;:162::i;1662:232:4:-;1767:47;1785:5;1792:4;1798:2;1802:5;1809:4;1767:17;:47::i;:::-;1762:126;;1837:40;;;;;217:42:48;205:55;;1837:40:4;;;187:74:48;160:18;;1837:40:4;14:253:48;3508:1663:17;3953:4;3947:11;3710:21;4094:33;;;4186:42;4163:66;;4156:4;4147:14;;4140:90;4330:66;4299:98;;4276:4;4267:14;;4243:168;4483:4;4476;4467:14;;4460:28;3919:2;3909;3891:16;3887:25;3883:34;;;3879:43;4569:4;4565:26;;4558:4;4549:14;;4542:50;4662:16;4655:4;4646:14;;4639:40;3710:21;;4755:16;-1:-1:-1;4745:4:17;4736:14;;4721:51;4869:4;4850:15;4844:4;4840:26;4835:3;4831:36;4824:50;5022:66;5003:17;4999:90;4964:15;4958:4;4954:26;4949:3;4945:36;4921:182;5138:15;5132:4;5128:26;5123:3;5116:39;10165:1393:4;10460:4;10454:11;10365:28;10323:12;10478:22;;;10536:15;10526:26;;;10520:4;10513:40;10579:24;;10573:4;10566:38;10624:4;10617:19;;;10323:12;10700:4;10323:12;10688:4;10323:12;;10672:5;10665;10660:45;10649:56;;10917:1;10910:4;10904:11;10901:18;10892:7;10888:32;10878:606;;11049:6;11039:7;11032:15;11028:28;11025:165;;;11105:16;11099:4;11094:3;11079:43;11155:16;11150:3;11143:29;11025:165;11466:1;11458:5;11446:18;11443:25;11424:16;11417:24;11413:56;11404:7;11400:70;11389:81;;10878:606;11504:4;11497:17;-1:-1:-1;11540:1:4;11534:4;11527:15;10165:1393;;-1:-1:-1;;;;;10165:1393:4:o;467:154:48:-;553:42;546:5;542:54;535:5;532:65;522:93;;611:1;608;601:12;522:93;467:154;:::o;626:134::-;694:20;;723:31;694:20;723:31;:::i;:::-;626:134;;;:::o;765:156::-;825:5;870:3;861:6;856:3;852:16;848:26;845:46;;;887:1;884;877:12;926:170;1000:5;1045:3;1036:6;1031:3;1027:16;1023:26;1020:46;;;1062:1;1059;1052:12;1101:347;1152:8;1162:6;1216:3;1209:4;1201:6;1197:17;1193:27;1183:55;;1234:1;1231;1224:12;1183:55;-1:-1:-1;1257:20:48;;1300:18;1289:30;;1286:50;;;1332:1;1329;1322:12;1286:50;1369:4;1361:6;1357:17;1345:29;;1421:3;1414:4;1405:6;1397;1393:19;1389:30;1386:39;1383:59;;;1438:1;1435;1428:12;1453:827;1618:6;1626;1634;1642;1650;1703:3;1691:9;1682:7;1678:23;1674:33;1671:53;;;1720:1;1717;1710:12;1671:53;1759:9;1746:23;1778:31;1803:5;1778:31;:::i;:::-;1828:5;-1:-1:-1;1852:63:48;1907:7;1902:2;1887:18;;1852:63;:::i;:::-;1842:73;;1934:78;2004:7;1998:3;1987:9;1983:19;1934:78;:::i;:::-;1924:88;;2063:3;2052:9;2048:19;2035:33;2091:18;2083:6;2080:30;2077:50;;;2123:1;2120;2113:12;2077:50;2162:58;2212:7;2203:6;2192:9;2188:22;2162:58;:::i;:::-;1453:827;;;;-1:-1:-1;1453:827:48;;-1:-1:-1;2239:8:48;;2136:84;1453:827;-1:-1:-1;;;1453:827:48:o;2538:253::-;2624:6;2677:2;2665:9;2656:7;2652:23;2648:32;2645:52;;;2693:1;2690;2683:12;2645:52;-1:-1:-1;2738:23:48;;2538:253;-1:-1:-1;2538:253:48:o;3743:158::-;3806:5;3851:2;3842:6;3837:3;3833:16;3829:25;3826:45;;;3867:1;3864;3857:12;3906:805;4060:6;4068;4076;4084;4092;4145:3;4133:9;4124:7;4120:23;4116:33;4113:53;;;4162:1;4159;4152:12;4113:53;4201:9;4188:23;4220:31;4245:5;4220:31;:::i;:::-;4270:5;-1:-1:-1;4294:63:48;4349:7;4344:2;4329:18;;4294:63;:::i;:::-;4284:73;;4376:67;4435:7;4429:3;4418:9;4414:19;4376:67;:::i;:::-;4366:77;;4494:3;4483:9;4479:19;4466:33;4522:18;4514:6;4511:30;4508:50;;;4554:1;4551;4544:12;5159:1135;5408:6;5416;5424;5432;5440;5448;5456;5509:3;5497:9;5488:7;5484:23;5480:33;5477:53;;;5526:1;5523;5516:12;5477:53;5565:9;5552:23;5584:31;5609:5;5584:31;:::i;:::-;5634:5;-1:-1:-1;5658:63:48;5713:7;5708:2;5693:18;;5658:63;:::i;:::-;5648:73;;5740:78;5810:7;5804:3;5793:9;5789:19;5740:78;:::i;:::-;5730:88;-1:-1:-1;5891:3:48;5876:19;;5863:33;;-1:-1:-1;5995:3:48;5980:19;;5967:33;;-1:-1:-1;6077:3:48;6062:19;;6049:33;6105:18;6094:30;;6091:50;;;6137:1;6134;6127:12;6091:50;6176:58;6226:7;6217:6;6206:9;6202:22;6176:58;:::i;:::-;5159:1135;;;;-1:-1:-1;5159:1135:48;;-1:-1:-1;5159:1135:48;;;;6150:84;;-1:-1:-1;;;5159:1135:48:o;6655:160::-;6721:20;;6781:1;6770:20;;;6760:31;;6750:59;;6805:1;6802;6795:12;6820:587;6931:6;6939;6947;6955;7008:3;6996:9;6987:7;6983:23;6979:33;6976:53;;;7025:1;7022;7015:12;6976:53;7064:9;7051:23;7083:31;7108:5;7083:31;:::i;:::-;7133:5;-1:-1:-1;7157:63:48;7212:7;7207:2;7192:18;;7157:63;:::i;:::-;7147:73;;7272:3;7261:9;7257:19;7244:33;7286;7311:7;7286:33;:::i;:::-;7338:7;-1:-1:-1;7364:37:48;7396:3;7381:19;;7364:37;:::i;:::-;7354:47;;6820:587;;;;;;;:::o;7677:959::-;7873:6;7881;7889;7897;7905;7913;7966:3;7954:9;7945:7;7941:23;7937:33;7934:53;;;7983:1;7980;7973:12;7934:53;8022:9;8009:23;8041:31;8066:5;8041:31;:::i;:::-;8091:5;-1:-1:-1;8115:63:48;8170:7;8165:2;8150:18;;8115:63;:::i;:::-;8105:73;;8197:67;8256:7;8250:3;8239:9;8235:19;8197:67;:::i;:::-;8187:77;-1:-1:-1;8337:3:48;8322:19;;8309:33;;-1:-1:-1;8419:3:48;8404:19;;8391:33;8447:18;8436:30;;8433:50;;;8479:1;8476;8469:12;8433:50;8518:58;8568:7;8559:6;8548:9;8544:22;8518:58;:::i;:::-;7677:959;;;;-1:-1:-1;7677:959:48;;-1:-1:-1;7677:959:48;;8595:8;;7677:959;-1:-1:-1;;;7677:959:48:o;8979:914::-;9112:6;9120;9128;9136;9144;9152;9205:3;9193:9;9184:7;9180:23;9176:33;9173:53;;;9222:1;9219;9212:12;9173:53;9261:9;9248:23;9280:31;9305:5;9280:31;:::i;:::-;9330:5;-1:-1:-1;9354:63:48;9409:7;9404:2;9389:18;;9354:63;:::i;:::-;9344:73;-1:-1:-1;9490:3:48;9475:19;;9462:33;;-1:-1:-1;9594:3:48;9579:19;;9566:33;;-1:-1:-1;9676:3:48;9661:19;;9648:33;9704:18;9693:30;;9690:50;;;9736:1;9733;9726:12;9994:1799;10215:13;;9968;9961:21;9949:34;;10186:3;10171:19;;10287:4;10279:6;10275:17;10269:24;10302:51;10347:4;10336:9;10332:20;10318:12;9968:13;9961:21;9949:34;;9898:91;10302:51;;10402:4;10394:6;10390:17;10384:24;10417:53;10464:4;10453:9;10449:20;10433:14;9968:13;9961:21;9949:34;;9898:91;10417:53;;10519:4;10511:6;10507:17;10501:24;10534:53;10581:4;10570:9;10566:20;10550:14;9968:13;9961:21;9949:34;;9898:91;10534:53;;10636:4;10628:6;10624:17;10618:24;10651:53;10698:4;10687:9;10683:20;10667:14;9968:13;9961:21;9949:34;;9898:91;10651:53;;10753:4;10745:6;10741:17;10735:24;10768:53;10815:4;10804:9;10800:20;10784:14;9968:13;9961:21;9949:34;;9898:91;10768:53;;10870:4;10862:6;10858:17;10852:24;10885:53;10932:4;10921:9;10917:20;10901:14;9968:13;9961:21;9949:34;;9898:91;10885:53;;10987:4;10979:6;10975:17;10969:24;11002:53;11049:4;11038:9;11034:20;11018:14;9968:13;9961:21;9949:34;;9898:91;11002:53;;11104:6;11096;11092:19;11086:26;11121:55;11168:6;11157:9;11153:22;11137:14;9968:13;9961:21;9949:34;;9898:91;11121:55;;11225:6;11217;11213:19;11207:26;11242:55;11289:6;11278:9;11274:22;11258:14;9968:13;9961:21;9949:34;;9898:91;11242:55;;11346:6;11338;11334:19;11328:26;11363:55;11410:6;11399:9;11395:22;11379:14;9968:13;9961:21;9949:34;;9898:91;11363:55;;11468:6;11460;11456:19;11450:26;11485:56;11533:6;11522:9;11518:22;11501:15;9968:13;9961:21;9949:34;;9898:91;11485:56;;11591:6;11583;11579:19;11573:26;11608:56;11656:6;11645:9;11641:22;11624:15;9968:13;9961:21;9949:34;;9898:91;11608:56;;11714:6;11706;11702:19;11696:26;11731:56;11779:6;11768:9;11764:22;11747:15;9968:13;9961:21;9949:34;;9898:91;11731:56;;9994:1799;;;;:::o;11798:118::-;11884:5;11877:13;11870:21;11863:5;11860:32;11850:60;;11906:1;11903;11896:12;11921:507;12021:6;12029;12037;12090:2;12078:9;12069:7;12065:23;12061:32;12058:52;;;12106:1;12103;12096:12;12058:52;12145:9;12132:23;12164:28;12186:5;12164:28;:::i;:::-;12211:5;12289:2;12274:18;;12261:32;;-1:-1:-1;12392:2:48;12377:18;;;12364:32;;11921:507;-1:-1:-1;;;11921:507:48:o;12685:516::-;12789:6;12797;12805;12858:3;12846:9;12837:7;12833:23;12829:33;12826:53;;;12875:1;12872;12865:12;12826:53;12914:9;12901:23;12933:31;12958:5;12933:31;:::i;:::-;12983:5;-1:-1:-1;13007:63:48;13062:7;13057:2;13042:18;;13007:63;:::i;:::-;12997:73;;13122:3;13111:9;13107:19;13094:33;13136;13161:7;13136:33;:::i;:::-;13188:7;13178:17;;;12685:516;;;;;:::o;13206:477::-;13355:2;13344:9;13337:21;13318:4;13387:6;13381:13;13430:6;13425:2;13414:9;13410:18;13403:34;13489:6;13484:2;13476:6;13472:15;13467:2;13456:9;13452:18;13446:50;13545:1;13540:2;13531:6;13520:9;13516:22;13512:31;13505:42;13674:2;13604:66;13599:2;13591:6;13587:15;13583:88;13572:9;13568:104;13564:113;13556:121;;;13206:477;;;;:::o;13688:184::-;13758:6;13811:2;13799:9;13790:7;13786:23;13782:32;13779:52;;;13827:1;13824;13817:12;13779:52;-1:-1:-1;13850:16:48;;13688:184;-1:-1:-1;13688:184:48:o;13877:437::-;13956:1;13952:12;;;;13999;;;14020:61;;14074:4;14066:6;14062:17;14052:27;;14020:61;14127:2;14119:6;14116:14;14096:18;14093:38;14090:218;;14164:77;14161:1;14154:88;14265:4;14262:1;14255:15;14293:4;14290:1;14283:15;14319:251;14389:6;14442:2;14430:9;14421:7;14417:23;14413:32;14410:52;;;14458:1;14455;14448:12;14410:52;14490:9;14484:16;14509:31;14534:5;14509:31;:::i;14575:184::-;14627:77;14624:1;14617:88;14724:4;14721:1;14714:15;14748:4;14745:1;14738:15;14764:191;14799:3;14830:66;14823:5;14820:77;14817:103;;14900:18;;:::i;:::-;-1:-1:-1;14940:1:48;14936:13;;14764:191::o;15312:125::-;15377:9;;;15398:10;;;15395:36;;;15411:18;;:::i;15442:128::-;15509:9;;;15530:11;;;15527:37;;;15544:18;;:::i;15575:245::-;15642:6;15695:2;15683:9;15674:7;15670:23;15666:32;15663:52;;;15711:1;15708;15701:12;15663:52;15743:9;15737:16;15762:28;15784:5;15762:28;:::i;15825:276::-;15913:6;15966:2;15954:9;15945:7;15941:23;15937:32;15934:52;;;15982:1;15979;15972:12;15934:52;16021:9;16008:23;16040:31;16065:5;16040:31;:::i;16457:161::-;16524:20;;16584:8;16573:20;;16563:31;;16553:59;;16608:1;16605;16598:12;16623:924;16707:6;16767:3;16755:9;16746:7;16742:23;16738:33;16783:2;16780:22;;;16798:1;16795;16788:12;16780:22;-1:-1:-1;16847:2:48;16841:9;16889:3;16877:16;;16923:18;16908:34;;16944:22;;;16905:62;16902:242;;;17000:77;16997:1;16990:88;17101:4;17098:1;17091:15;17129:4;17126:1;17119:15;16902:242;17160:2;17153:22;17199:29;17218:9;17199:29;:::i;:::-;17191:6;17184:45;17262:38;17296:2;17285:9;17281:18;17262:38;:::i;:::-;17257:2;17249:6;17245:15;17238:63;17334:37;17367:2;17356:9;17352:18;17334:37;:::i;:::-;17329:2;17321:6;17317:15;17310:62;17405:36;17437:2;17426:9;17422:18;17405:36;:::i;:::-;17400:2;17392:6;17388:15;17381:61;17476:39;17510:3;17499:9;17495:19;17476:39;:::i;:::-;17470:3;17458:16;;17451:65;17462:6;16623:924;-1:-1:-1;;;16623:924:48:o;17552:241::-;17608:6;17661:2;17649:9;17640:7;17636:23;17632:32;17629:52;;;17677:1;17674;17667:12;17629:52;17716:9;17703:23;17735:28;17757:5;17735:28;:::i;17798:272::-;17896:2;17866:17;;;17885;;;;17862:41;17927:34;17918:44;;17973:66;17964:76;;17915:126;17912:152;;;18044:18;;:::i;18075:240::-;18110:3;18158:5;18154:2;18143:21;18188:66;18179:7;18176:79;18173:105;;18258:18;;:::i;:::-;18298:1;18294:15;;18075:240;-1:-1:-1;;18075:240:48:o;18653:184::-;18705:77;18702:1;18695:88;18802:4;18799:1;18792:15;18826:4;18823:1;18816:15;18842:274;18882:1;18908;18898:189;;18943:77;18940:1;18933:88;19044:4;19041:1;19034:15;19072:4;19069:1;19062:15;18898:189;-1:-1:-1;19101:9:48;;18842:274::o;19121:238::-;19230:8;19205:16;;;19223;;;19201:39;19260:26;;;;19305:24;;;19295:58;;19333:18;;:::i","linkReferences":{},"immutableReferences":{"5860":[{"start":1513,"length":32},{"start":1636,"length":32},{"start":1773,"length":32},{"start":2418,"length":32},{"start":2652,"length":32},{"start":2795,"length":32},{"start":2938,"length":32},{"start":3074,"length":32},{"start":3215,"length":32},{"start":3385,"length":32},{"start":5015,"length":32},{"start":6943,"length":32},{"start":7017,"length":32},{"start":8205,"length":32},{"start":8405,"length":32},{"start":8521,"length":32},{"start":8682,"length":32},{"start":9797,"length":32},{"start":10137,"length":32},{"start":10271,"length":32},{"start":10422,"length":32},{"start":10629,"length":32},{"start":10695,"length":32}],"6661":[{"start":537,"length":32},{"start":7452,"length":32}],"7000":[{"start":444,"length":32},{"start":2078,"length":32},{"start":2298,"length":32},{"start":4209,"length":32},{"start":4454,"length":32},{"start":4647,"length":32},{"start":4868,"length":32},{"start":5272,"length":32},{"start":5537,"length":32},{"start":5751,"length":32},{"start":6414,"length":32},{"start":6526,"length":32},{"start":7924,"length":32},{"start":9975,"length":32},{"start":10311,"length":32}],"7004":[{"start":1177,"length":32},{"start":5314,"length":32},{"start":5579,"length":32}]}}}}}}},"signatures":{"function":[{"signature":"afterAddLiquidity(address,(address,address,uint24,int24,address),(int24,int24,int256,bytes32),int256,int256,bytes)","signatureHash4":"0x9f063efc","signatureHash32":"0x9f063efc0e7905d302491c9da772361c0faa77174cc43ec9e94aa9141b6a6b67"},{"signature":"afterDonate(address,(address,address,uint24,int24,address),uint256,uint256,bytes)","signatureHash4":"0xe1b4af69","signatureHash32":"0xe1b4af69b30a88bed49d94820f012d5d3a111a00764242f510270492aeb7fb1e"},{"signature":"afterInitialize(address,(address,address,uint24,int24,address),uint160,int24)","signatureHash4":"0x6fe7e6eb","signatureHash32":"0x6fe7e6ebae9b6648ee9582d3769da9a44fdb4ec83c36a0ffb490e9461143ec16"},{"signature":"afterRemoveLiquidity(address,(address,address,uint24,int24,address),(int24,int24,int256,bytes32),int256,int256,bytes)","signatureHash4":"0x6c2bbe7e","signatureHash32":"0x6c2bbe7e4f0f51f6ee10b6409b7088135645d7ae479b8f0be3d7250f85988483"},{"signature":"afterSwap(address,(address,address,uint24,int24,address),(bool,int256,uint160),int256,bytes)","signatureHash4":"0xb47b2fb1","signatureHash32":"0xb47b2fb18a5a173c64a43e7f7fe55e43e298f5436a0e265b15e662727cb0695f"},{"signature":"aggregatorHookVersion()","signatureHash4":"0xf777ce22","signatureHash32":"0xf777ce22db9bbe220916819702d19243406038fbcea10220d96895fb74b6c695"},{"signature":"beforeAddLiquidity(address,(address,address,uint24,int24,address),(int24,int24,int256,bytes32),bytes)","signatureHash4":"0x259982e5","signatureHash32":"0x259982e524ca348fcfeda0fb247c362c89fadb178685b3f748fe9b5beeeff045"},{"signature":"beforeDonate(address,(address,address,uint24,int24,address),uint256,uint256,bytes)","signatureHash4":"0xb6a8b0fa","signatureHash32":"0xb6a8b0faa8fd517d727f03c7c72b0a7828d05348cbc4253b7cbd9609aad5559c"},{"signature":"beforeInitialize(address,(address,address,uint24,int24,address),uint160)","signatureHash4":"0xdc98354e","signatureHash32":"0xdc98354e711e2be5d28eff54c09e2e61c5b15fb066d17daaa5b71151b4ae5c5a"},{"signature":"beforeRemoveLiquidity(address,(address,address,uint24,int24,address),(int24,int24,int256,bytes32),bytes)","signatureHash4":"0x21d0ee70","signatureHash32":"0x21d0ee70669b208d8af4dc382eaa03dea2d745370926da496c872bb9c9b98692"},{"signature":"beforeSwap(address,(address,address,uint24,int24,address),(bool,int256,uint160),bytes)","signatureHash4":"0x575e24b4","signatureHash32":"0x575e24b486f1b1168e84028b6b7338846844275788c5ca5249def3be2dfc2c03"},{"signature":"curveFactory()","signatureHash4":"0xae6836d6","signatureHash32":"0xae6836d6409947abb47b62ad490f5f04333ba70fa75aba326a416f57c766de8c"},{"signature":"getHookPermissions()","signatureHash4":"0xc4e833ce","signatureHash32":"0xc4e833ce370f836b5a97086f8fc61e3c79efec9e6b02dbfe7965a512e92af68d"},{"signature":"pollTokenJar()","signatureHash4":"0x3f7d1179","signatureHash32":"0x3f7d11795492366c1483896404ed0b076e96aab3daa55961d1b24f0dc66f19e8"},{"signature":"pool()","signatureHash4":"0x16f0115b","signatureHash32":"0x16f0115b5901d3f6295e520505af05475e18f6f1e134f347475c881a6302260d"},{"signature":"poolIdToTokenInfo(bytes32)","signatureHash4":"0x28401c10","signatureHash32":"0x28401c1027ec4f37a294db9dc0c4893faea6a040fe045d1ecf5756ae9ea805c4"},{"signature":"poolManager()","signatureHash4":"0xdc4c90d3","signatureHash32":"0xdc4c90d3c2342c5afe26871a21a4ecf482fcb45ae1ac8294d1dcff7a134352c0"},{"signature":"protocolFeeFlags()","signatureHash4":"0x2c2efcac","signatureHash32":"0x2c2efcac0ad01b6c3d14cb6d762d4344c25951b9f9708718f5346362368053ef"},{"signature":"protocolFeeMultiplier()","signatureHash4":"0x1ce4c78b","signatureHash32":"0x1ce4c78b5512a2a366ee8809c0e47fb418a9a339591248367e5d27c5b171d31e"},{"signature":"pseudoTotalValueLocked(bytes32)","signatureHash4":"0x2d910fb4","signatureHash32":"0x2d910fb4a45bea3502dc7772983aa13b78bc2e5ee120ec1e9c65fadbfb0b6a44"},{"signature":"quote(bool,int256,bytes32)","signatureHash4":"0xcd272714","signatureHash32":"0xcd272714f1dc850ca50a08a7bdaa2b30a160d72772603d76df334c5266fe7281"},{"signature":"tokenJar()","signatureHash4":"0x490c98f5","signatureHash32":"0x490c98f5f7805cb29ace234e06ccb25bc911272796e69a906c57ba5b5c3f6000"}],"event":[{"signature":"AggregatorPoolRegistered(bytes32)","signatureHash4":"0xe4e250d6","signatureHash32":"0xe4e250d624b5ed2f65699d87988884c47eac735ffb1dcccead084c5254b14373"},{"signature":"HookSwap(bytes32,address,int256,int256,uint24)","signatureHash4":"0x6150bb53","signatureHash32":"0x6150bb53cd76c5702d6074239fc7b6c2a5495d339eb122fdc06252f3efdbbc1b"},{"signature":"ProtocolFeesCollected(address,address,uint256)","signatureHash4":"0xdb249cf7","signatureHash32":"0xdb249cf7a102711dda1beaba415bb011ee0e1402c7f67617236fed5739235d6c"},{"signature":"TokenJarUpdated(address)","signatureHash4":"0x9aafce81","signatureHash32":"0x9aafce815f6249ca174c3adc0232e8758909994867884013369549fbe000d517"}],"error":[{"signature":"AmountOutExceeded()","signatureHash4":"0x19f1353f","signatureHash32":"0x19f1353f70b16ad572b8be0c66c8cf2e84ed56ec97d3b836de168692170221ef"},{"signature":"DeltaNotNegative(address)","signatureHash4":"0x3351b260","signatureHash32":"0x3351b260c56ee317e9019cab265508cc7e2db5349b6ce55a7ba5e552a9daf668"},{"signature":"DeltaNotPositive(address)","signatureHash4":"0x4c085bf1","signatureHash32":"0x4c085bf124a640cac97277ad37e631c22de363105353a6916fee8597226a6245"},{"signature":"HookNotImplemented()","signatureHash4":"0x0a85dc29","signatureHash32":"0x0a85dc29bcc4d20e8373328a2a3f1b6cb998fd2fbddf45b4db05514aef5c184d"},{"signature":"InsufficientBalance()","signatureHash4":"0xf4d678b8","signatureHash32":"0xf4d678b8ce6b5157126b1484a53523762a93571537a7d5ae97d8014a44715c94"},{"signature":"InvalidPoolId()","signatureHash4":"0x0afa7ee8","signatureHash32":"0x0afa7ee8aa4367910d5856a37f6b4089daa295089d0dcd462775aaff9059abbf"},{"signature":"LiquidityNotAllowed()","signatureHash4":"0x78895c13","signatureHash32":"0x78895c135a161aa29d61fd7472a52276f841251c8e83e1fce006ad4c79b6fb7c"},{"signature":"NativeCurrencyNotSupported()","signatureHash4":"0xa80433dc","signatureHash32":"0xa80433dc4ab44cc4c12039baf73eb98fa11c3e9ceea4005cf8ca078c659ada50"},{"signature":"NotPoolManager()","signatureHash4":"0xae18210a","signatureHash32":"0xae18210ab62e9620e84799499bafdb3202a30943ba8cb533c4bac9cdc8ced60b"},{"signature":"PoolDoesNotExist()","signatureHash4":"0x9c8787c0","signatureHash32":"0x9c8787c02ab43cbce7796a08dac3b3f4309a6bc09e8b8f916a07724aca347119"},{"signature":"PoolIsMetaPool()","signatureHash4":"0x57fa5869","signatureHash32":"0x57fa586900b7b5a1466798cf1e96fda8ef4fdf1074a3e26a3621c3b55eac7d24"},{"signature":"SafeERC20FailedOperation(address)","signatureHash4":"0x5274afe7","signatureHash32":"0x5274afe73c98b4749fc91ffae6b7b574e7842cb2144a159e9377a5f20b32edf9"},{"signature":"TokenNotInPool(address)","signatureHash4":"0x8466f046","signatureHash32":"0x8466f0469fd02795ee56b8579b4e63ce6ccf0d84a059b16ca6d485f0edcdaa7d"},{"signature":"TokensNotInPool(address,address)","signatureHash4":"0x97956d6e","signatureHash32":"0x97956d6e118f441e1b8d5c04b6d539bd49b24098c6d484f8315c5f4c123f9fdc"},{"signature":"UnspecifiedAmountExceeded()","signatureHash4":"0x38d99525","signatureHash32":"0x38d9952586fceff04606e210b008f6ab54818366c5892ca28502c2b53ba2e37e"}]},"proxyResolution":{"isProxy":false,"proxyType":null,"implementations":[]},"match":"match","chainId":"1","address":"0xC274641fBd3c01D8457bCF03183Cdf209dBce888"}