{"matchId":"51419122","creationMatch":"match","runtimeMatch":"match","verifiedAt":"2026-09-21T09:29:40Z","creationBytecode":{"onchainBytecode":"0x6101c0604052348015610010575f5ffd5b5060405161302e38038061302e83398101604081905261002f916102ed565b8282826040518060400160405280601481526020017f41617665563341646170746572466163746f7279000000000000000000000000815250604051806040016040528060018152602001603160f81b8152508181845f6001600160a01b0316816001600160a01b0316036100be57604051631e4fbdf760e01b81525f60048201526024015b60405180910390fd5b6100c781610214565b506100d3826001610263565b610120526100e2816002610263565b61014052815160208084019190912060e052815190820120610100524660a05261016e60e05161010051604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201529081019290925260608201524660808201523060a08201525f9060c00160405160208183030381529060405280519060200120905090565b60805250503060c0526001600160a01b0385161580159061019757506001600160a01b03841615155b80156101ab57506001600160a01b03831615155b6101c85760405163f6b2911f60e01b815260040160405180910390fd5b5050506001600160a01b039182166101605281166101805284166101ff5760405163f6b2911f60e01b815260040160405180910390fd5b5050506001600160a01b03166101a0526104e8565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b5f60208351101561027e5761027783610295565b905061028f565b8161028984826103d6565b5060ff90505b92915050565b5f5f829050601f815111156102bf578260405163305a27a960e01b81526004016100b59190610490565b80516102ca826104c5565b179392505050565b80516001600160a01b03811681146102e8575f5ffd5b919050565b5f5f5f5f60808587031215610300575f5ffd5b610309856102d2565b9350610317602086016102d2565b9250610325604086016102d2565b9150610333606086016102d2565b905092959194509250565b634e487b7160e01b5f52604160045260245ffd5b600181811c9082168061036657607f821691505b60208210810361038457634e487b7160e01b5f52602260045260245ffd5b50919050565b601f8211156103d157805f5260205f20601f840160051c810160208510156103af5750805b601f840160051c820191505b818110156103ce575f81556001016103bb565b50505b505050565b81516001600160401b038111156103ef576103ef61033e565b610403816103fd8454610352565b8461038a565b6020601f821160018114610435575f831561041e5750848201515b5f19600385901b1c1916600184901b1784556103ce565b5f84815260208120601f198516915b828110156104645787850151825560209485019460019092019101610444565b508482101561048157868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b80516020808301519190811015610384575f1960209190910360031b1b16919050565b60805160a05160c05160e05161010051610120516101405161016051610180516101a051612a9f61058f5f395f81816102c501528181610527015281816108ea01528181610fef01528181611247015281816112e6015261143701525f8181610230015281816107e7015261162e01525f61020901525f6115c901525f61159c01525f6110fa01525f6110d201525f61102d01525f61105701525f6110810152612a9f5ff3fe608060405234801561000f575f5ffd5b506004361061018e575f3560e01c80637535d246116100dd5780638da5cb5b11610088578063e5209f2c11610063578063e5209f2c14610415578063e56c8cb414610428578063f2fde38b1461043b575f5ffd5b80638da5cb5b146103d2578063920f5c84146103ef578063b1b6308b14610402575f5ffd5b80638456cb59116100b85780638456cb591461038257806384b0196e1461038a5780638c01220c146103a5575f5ffd5b80637535d246146102c05780637bf703b4146102e75780638115192f14610309575f5ffd5b80633644e5151161013d5780635678d216116101185780635678d216146102835780635c975abb14610296578063715018a6146102b8575f5ffd5b80633644e515146102525780633f4ba83a146102685780634743582f14610270575f5ffd5b80630be6c2aa1161016d5780630be6c2aa146101fc5780631f273c8e1461020457806332fe7b261461022b575f5ffd5b8062ae3bf8146101925780630542975c146101a757806309802f6d146101d9575b5f5ffd5b6101a56101a036600461203b565b61044e565b005b6101af610524565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b6101ec6101e7366004612188565b6105b7565b60405190151581526020016101d0565b6101a56106b4565b6101af7f000000000000000000000000000000000000000000000000000000000000000081565b6101af7f000000000000000000000000000000000000000000000000000000000000000081565b61025a610798565b6040519081526020016101d0565b6101a56107a1565b6101af61027e3660046122b6565b6107b3565b6101a5610291366004612407565b6107c7565b5f5474010000000000000000000000000000000000000000900460ff166101ec565b6101a5610852565b6101af7f000000000000000000000000000000000000000000000000000000000000000081565b6101ec6102f536600461203b565b60036020525f908152604090205460ff1681565b61035061031736600461203b565b60046020525f90815260409020805460019091015460ff821691610100900473ffffffffffffffffffffffffffffffffffffffff169083565b60408051931515845273ffffffffffffffffffffffffffffffffffffffff9092166020840152908201526060016101d0565b6101a5610863565b610392610873565b6040516101d097969594939291906124fb565b6101ec6103b3366004612591565b600560209081525f928352604080842090915290825290205460ff1681565b5f5473ffffffffffffffffffffffffffffffffffffffff166101af565b6101ec6103fd366004612609565b6108d1565b6101a56104103660046122b6565b61098f565b6101a561042336600461203b565b610b94565b6101a56104363660046126eb565b610c64565b6101a561044936600461203b565b610d42565b610456610da7565b6105216104775f5473ffffffffffffffffffffffffffffffffffffffff1690565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff8416906370a0823190602401602060405180830381865afa1580156104df573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610503919061271e565b73ffffffffffffffffffffffffffffffffffffffff84169190610df9565b50565b5f7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16630542975c6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561058e573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105b29190612735565b905090565b5f6105c0610e7f565b82516020808501516060860151608087015161010088015160a089015160c08a015160405133985f9861069b98610680987f1ca15395c04ac473d5b42656e3782ae1fce1a113fdb5432b57f8fb0870fa3178988d989497929691959094930198895273ffffffffffffffffffffffffffffffffffffffff97881660208a01529587166040890152939095166060870152608086019190915260a085015260c084019290925263ffffffff9190911660e08301526101008201526101200190565b60405160208183030381529060405280519060200120610ed3565b90506106a8868286610f1a565b925050505b9392505050565b6106bc610e7f565b335f908152600460205260409020805460ff16610705576040517f60f6234100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f816001015411610742576040517fd32e7fc600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8054600182015461077091610100900473ffffffffffffffffffffffffffffffffffffffff16903390610fb1565b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055565b5f6105b2611014565b6107a9610da7565b6107b161114a565b565b5f6107be83836111c6565b90505b92915050565b6107cf610e7f565b3373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161461083e576040517febe91ae200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61084b8585858585611245565b5050505050565b61085a610da7565b6107b15f6114b3565b61086b610da7565b6107b1611527565b5f6060805f5f5f6060610884611595565b61088c6115c2565b604080515f808252602082019092527f0f000000000000000000000000000000000000000000000000000000000000009b939a50919850469750309650945092509050565b5f3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610941576040517f7ffc0b6500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61097f83838080601f0160208091040260200160405190810160405280939291908181526020018383808284375f920191909152506115ef92505050565b90505b9998505050505050505050565b610997610e7f565b5f6109a28383611698565b825173ffffffffffffffffffffffffffffffffffffffff9081165f9081526005602090815260408083209385168352929052205490915060ff1615610a13576040517f785fa2f400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16826020015173ffffffffffffffffffffffffffffffffffffffff1614610a7c576040517f05886ddd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ab081836101000151846040015173ffffffffffffffffffffffffffffffffffffffff16610df99092919063ffffffff16565b6040518060600160405280600115158152602001836040015173ffffffffffffffffffffffffffffffffffffffff168152602001836101200151846101000151610afa9190612750565b905273ffffffffffffffffffffffffffffffffffffffff9182165f9081526004602090815260409182902083518154928501517fffffffffffffffffffffff0000000000000000000000000000000000000000009093169015157fffffffffffffffffffffff0000000000000000000000000000000000000000ff1617610100929095169190910293909317835501516001909101555050565b73ffffffffffffffffffffffffffffffffffffffff8116610be1576040517ff6b2911f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b335f81815260056020908152604080832073ffffffffffffffffffffffffffffffffffffffff8616808552925280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055519092917f856f0b5ddd2d41f4778c648c0ab55f0285fb87f0f35b6749889ae0d8ebef3c6c91a350565b610c6c610da7565b73ffffffffffffffffffffffffffffffffffffffff8216610cb9576040517ff6b2911f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff82165f8181526003602090815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001685151590811790915591519182527fad58a21bee8db31c6b4cfcdeaf806d8b7dfa187c5da0dc88e4bffc740ce5b91a910160405180910390a25050565b610d4a610da7565b73ffffffffffffffffffffffffffffffffffffffff8116610d9e576040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081525f60048201526024015b60405180910390fd5b610521816114b3565b5f5473ffffffffffffffffffffffffffffffffffffffff1633146107b1576040517f118cdaa7000000000000000000000000000000000000000000000000000000008152336004820152602401610d95565b60405173ffffffffffffffffffffffffffffffffffffffff838116602483015260448201839052610e7a91859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611840565b505050565b5f5474010000000000000000000000000000000000000000900460ff16156107b1576040517fd93c066500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f6107c1610edf611014565b836040517f19010000000000000000000000000000000000000000000000000000000000008152600281019290925260228201526042902090565b5f8373ffffffffffffffffffffffffffffffffffffffff163b5f03610f9f575f5f610f4585856118e5565b5090925090505f816003811115610f5e57610f5e612788565b148015610f9657508573ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b925050506106ad565b610faa84848461192e565b90506106ad565b610fd373ffffffffffffffffffffffffffffffffffffffff8416833084611a76565b610e7a73ffffffffffffffffffffffffffffffffffffffff84167f000000000000000000000000000000000000000000000000000000000000000083611abc565b5f3073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614801561107957507f000000000000000000000000000000000000000000000000000000000000000046145b156110a357507f000000000000000000000000000000000000000000000000000000000000000090565b6105b2604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527f0000000000000000000000000000000000000000000000000000000000000000918101919091527f000000000000000000000000000000000000000000000000000000000000000060608201524660808201523060a08201525f9060c00160405160208183030381529060405280519060200120905090565b611152611b93565b5f80547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390a1565b5f6107be836111d58585611be6565b6040513060388201526f5af43d82803e903d91602b57fd5bf3ff60248201526014810192909252733d602d80600a3d3981f3363d3d373d3d3d363d73825260588201526037600c8201206078820152605560439091012073ffffffffffffffffffffffffffffffffffffffff1690565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16146112ca576040517f21eeab0000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61130b73ffffffffffffffffffffffffffffffffffffffff85167f00000000000000000000000000000000000000000000000000000000000000005f611abc565b6040805160018082528183019092525f916020808301908036833750506040805160018082528183019092529293505f9291506020808301908036833750506040805160018082528183019092529293505f9291506020808301908036833701905050905086835f81518110611383576113836127b5565b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505085825f815181106113d0576113d06127b5565b6020026020010181815250505f815f815181106113ef576113ef6127b5565b60209081029190910101526040517fab9c4b5d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063ab9c4b5d9061147c90309087908790879084908d908d906110cc90600401612829565b5f604051808303815f87803b158015611493575f5ffd5b505af11580156114a5573d5f5f3e3d5ffd5b505050505050505050505050565b5f805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b61152f610e7f565b5f80547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16740100000000000000000000000000000000000000001790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861119c3390565b60606105b27f00000000000000000000000000000000000000000000000000000000000000006001611ccb565b60606105b27f00000000000000000000000000000000000000000000000000000000000000006002611ccb565b6040517f0dae46860000000000000000000000000000000000000000000000000000000081525f9073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001690630dae468690611663908590600401612904565b5f604051808303815f87803b15801561167a575f5ffd5b505af115801561168c573d5f5f3e3d5ffd5b50600195945050505050565b73ffffffffffffffffffffffffffffffffffffffff82165f9081526003602052604081205460ff166116f6576040517f18dd5cd200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f6117018484611be6565b6040513060388201526f5af43d82803e903d91602b57fd5bf3ff602482015260148101869052733d602d80600a3d3981f3363d3d373d3d3d363d738152605881018290526037600c8201206078820152605560439091012090915073ffffffffffffffffffffffffffffffffffffffff16803b156117ab576040517f9b4d6ca600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6117b58583611d74565b6040517ff361d2d700000000000000000000000000000000000000000000000000000000815290915073ffffffffffffffffffffffffffffffffffffffff82169063f361d2d79061180a908790600401612916565b5f604051808303815f87803b158015611821575f5ffd5b505af1158015611833573d5f5f3e3d5ffd5b5092979650505050505050565b5f5f60205f8451602086015f885af18061185f576040513d5f823e3d81fd5b50505f513d91508115611876578060011415611890565b73ffffffffffffffffffffffffffffffffffffffff84163b155b156118df576040517f5274afe700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85166004820152602401610d95565b50505050565b5f5f5f835160410361191c576020840151604085015160608601515f1a61190e88828585611d80565b955095509550505050611927565b505081515f91506002905b9250925092565b5f5f5f8573ffffffffffffffffffffffffffffffffffffffff16858560405160240161195b929190612a0b565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f1626ba7e00000000000000000000000000000000000000000000000000000000179052516119dc9190612a2b565b5f60405180830381855afa9150503d805f8114611a14576040519150601f19603f3d011682016040523d82523d5f602084013e611a19565b606091505b5091509150818015611a2d57506020815110155b80156106a8575080517f1626ba7e0000000000000000000000000000000000000000000000000000000090611a6b908301602090810190840161271e565b149695505050505050565b60405173ffffffffffffffffffffffffffffffffffffffff84811660248301528381166044830152606482018390526118df9186918216906323b872dd90608401610e33565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f095ea7b300000000000000000000000000000000000000000000000000000000179052611b488482611e73565b6118df5760405173ffffffffffffffffffffffffffffffffffffffff84811660248301525f6044830152611b8991869182169063095ea7b390606401610e33565b6118df8482611840565b5f5474010000000000000000000000000000000000000000900460ff166107b1576040517f8dfc202b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f82825f01518360400151846060015185608001518660a001518760c001518860e001518961010001518a61012001518b61014001518c6101600151604051602001611cad9c9b9a9998979695949392919073ffffffffffffffffffffffffffffffffffffffff9c8d1681529a8c1660208c0152988b1660408b0152969099166060890152608088019490945260a087019290925260c086015260e08501526101008401526101208301939093526101408201929092526101608101919091526101800190565b60405160208183030381529060405280519060200120905092915050565b606060ff8314611ce557611cde83611ec9565b90506107c1565b818054611cf190612a41565b80601f0160208091040260200160405190810160405280929190818152602001828054611d1d90612a41565b8015611d685780601f10611d3f57610100808354040283529160200191611d68565b820191905f5260205f20905b815481529060010190602001808311611d4b57829003601f168201915b505050505090506107c1565b5f6107be83835f611f06565b5f80807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115611db957505f91506003905082611e69565b604080515f808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015611e0a573d5f5f3e3d5ffd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff8116611e6057505f925060019150829050611e69565b92505f91508190505b9450945094915050565b5f5f5f5f60205f8651602088015f8a5af192503d91505f519050828015611ebf57508115611ea45780600114611ebf565b5f8673ffffffffffffffffffffffffffffffffffffffff163b115b9695505050505050565b60605f611ed583611fda565b6040805160208082528183019092529192505f91906020820181803683375050509182525060208101929092525090565b5f81471015611f4a576040517fcf47918100000000000000000000000000000000000000000000000000000000815247600482015260248101839052604401610d95565b763d602d80600a3d3981f3363d3d373d3d3d363d730000008460601b60e81c175f526e5af43d82803e903d91602b57fd5bf38460781b17602052826037600984f5905073ffffffffffffffffffffffffffffffffffffffff81166106ad576040517fb06ebf3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f60ff8216601f8111156107c1576040517fb3512b0c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff81168114610521575f5ffd5b5f6020828403121561204b575f5ffd5b81356106ad8161201a565b80356120618161201a565b919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b604051610180810167ffffffffffffffff811182821017156120b7576120b7612066565b60405290565b803563ffffffff81168114612061575f5ffd5b80358015158114612061575f5ffd5b5f82601f8301126120ee575f5ffd5b813567ffffffffffffffff81111561210857612108612066565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810167ffffffffffffffff8111828210171561215557612155612066565b60405281815283820160200185101561216c575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f5f5f8385036101c081121561219c575f5ffd5b84356121a78161201a565b93506101807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0820112156121d9575f5ffd5b506121e2612093565b6121ee60208601612056565b81526121fc60408601612056565b602082015261220d60608601612056565b6040820152608085810135606083015260a08601359082015261223260c086016120bd565b60a082015260e08581013560c083015261010080870135918301919091526101208601359082015261226761014086016120d0565b610120820152610160858101356101408301526101808601359082015291506101a084013567ffffffffffffffff8111156122a0575f5ffd5b6122ac868287016120df565b9150509250925092565b5f5f8284036101a08112156122c9575f5ffd5b83356122d48161201a565b92506101807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe082011215612306575f5ffd5b5061230f612093565b61231b60208501612056565b815261232960408501612056565b602082015261233a60608501612056565b604082015261234b60808501612056565b606082015260a084810135608083015260c0808601359183019190915260e08086013591830191909152610100808601359183019190915261012080860135918301919091526101408086013591830191909152610160808601359183019190915261018090940135938101939093525092909150565b5f5f83601f8401126123d2575f5ffd5b50813567ffffffffffffffff8111156123e9575f5ffd5b602083019150836020828501011115612400575f5ffd5b9250929050565b5f5f5f5f5f6080868803121561241b575f5ffd5b85356124268161201a565b945060208601356124368161201a565b935060408601359250606086013567ffffffffffffffff811115612458575f5ffd5b612464888289016123c2565b969995985093965092949392505050565b5f81518084528060208401602086015e5f6020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b5f8151808452602084019350602083015f5b828110156124f15781518652602095860195909101906001016124d3565b5093949350505050565b7fff000000000000000000000000000000000000000000000000000000000000008816815260e060208201525f61253560e0830189612475565b82810360408401526125478189612475565b905086606084015273ffffffffffffffffffffffffffffffffffffffff861660808401528460a084015282810360c084015261258381856124c1565b9a9950505050505050505050565b5f5f604083850312156125a2575f5ffd5b82356125ad8161201a565b915060208301356125bd8161201a565b809150509250929050565b5f5f83601f8401126125d8575f5ffd5b50813567ffffffffffffffff8111156125ef575f5ffd5b6020830191508360208260051b8501011115612400575f5ffd5b5f5f5f5f5f5f5f5f5f60a08a8c031215612621575f5ffd5b893567ffffffffffffffff811115612637575f5ffd5b6126438c828d016125c8565b909a5098505060208a013567ffffffffffffffff811115612662575f5ffd5b61266e8c828d016125c8565b90985096505060408a013567ffffffffffffffff81111561268d575f5ffd5b6126998c828d016125c8565b90965094505060608a01356126ad8161201a565b925060808a013567ffffffffffffffff8111156126c8575f5ffd5b6126d48c828d016123c2565b915080935050809150509295985092959850929598565b5f5f604083850312156126fc575f5ffd5b82356127078161201a565b9150612715602084016120d0565b90509250929050565b5f6020828403121561272e575f5ffd5b5051919050565b5f60208284031215612745575f5ffd5b81516106ad8161201a565b808201808211156107c1577f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b81835281816020850137505f602082840101525f60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b5f60e0820173ffffffffffffffffffffffffffffffffffffffff8b16835260e06020840152808a518083526101008501915060208c0192505f5b8181101561289757835173ffffffffffffffffffffffffffffffffffffffff16835260209384019390920191600101612863565b505083810360408501526128ab818b6124c1565b91505082810360608401526128c081896124c1565b73ffffffffffffffffffffffffffffffffffffffff88166080850152905082810360a08401526128f18186886127e2565b91505061098260c083018461ffff169052565b602081525f6107be6020830184612475565b815173ffffffffffffffffffffffffffffffffffffffff1681526101808101602083015161295c602084018273ffffffffffffffffffffffffffffffffffffffff169052565b506040830151612984604084018273ffffffffffffffffffffffffffffffffffffffff169052565b5060608301516129ac606084018273ffffffffffffffffffffffffffffffffffffffff169052565b506080830151608083015260a083015160a083015260c083015160c083015260e083015160e083015261010083015161010083015261012083015161012083015261014083015161014083015261016083015161016083015292915050565b828152604060208201525f612a236040830184612475565b949350505050565b5f82518060208501845e5f920191825250919050565b600181811c90821680612a5557607f821691505b602082108103612a8c577f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5091905056fea164736f6c634300081c000a00000000000000000000000087870bca3f3fd6335c3f4ce8392d69350b4fa4e20000000000000000000000009008d19f58aabd9ed0d60971565aa8510560ab410000000000000000000000009da8b48441583a2b93e2ef8213aad0ec0b392c69000000000000000000000000df0a18f9be8cecc1d4fde078d99ee2ed4885ac5e","recompiledBytecode":"0x6101c0604052348015610010575f5ffd5b5060405161302e38038061302e83398101604081905261002f916102ed565b8282826040518060400160405280601481526020017f41617665563341646170746572466163746f7279000000000000000000000000815250604051806040016040528060018152602001603160f81b8152508181845f6001600160a01b0316816001600160a01b0316036100be57604051631e4fbdf760e01b81525f60048201526024015b60405180910390fd5b6100c781610214565b506100d3826001610263565b610120526100e2816002610263565b61014052815160208084019190912060e052815190820120610100524660a05261016e60e05161010051604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201529081019290925260608201524660808201523060a08201525f9060c00160405160208183030381529060405280519060200120905090565b60805250503060c0526001600160a01b0385161580159061019757506001600160a01b03841615155b80156101ab57506001600160a01b03831615155b6101c85760405163f6b2911f60e01b815260040160405180910390fd5b5050506001600160a01b039182166101605281166101805284166101ff5760405163f6b2911f60e01b815260040160405180910390fd5b5050506001600160a01b03166101a0526104e8565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b5f60208351101561027e5761027783610295565b905061028f565b8161028984826103d6565b5060ff90505b92915050565b5f5f829050601f815111156102bf578260405163305a27a960e01b81526004016100b59190610490565b80516102ca826104c5565b179392505050565b80516001600160a01b03811681146102e8575f5ffd5b919050565b5f5f5f5f60808587031215610300575f5ffd5b610309856102d2565b9350610317602086016102d2565b9250610325604086016102d2565b9150610333606086016102d2565b905092959194509250565b634e487b7160e01b5f52604160045260245ffd5b600181811c9082168061036657607f821691505b60208210810361038457634e487b7160e01b5f52602260045260245ffd5b50919050565b601f8211156103d157805f5260205f20601f840160051c810160208510156103af5750805b601f840160051c820191505b818110156103ce575f81556001016103bb565b50505b505050565b81516001600160401b038111156103ef576103ef61033e565b610403816103fd8454610352565b8461038a565b6020601f821160018114610435575f831561041e5750848201515b5f19600385901b1c1916600184901b1784556103ce565b5f84815260208120601f198516915b828110156104645787850151825560209485019460019092019101610444565b508482101561048157868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b80516020808301519190811015610384575f1960209190910360031b1b16919050565b60805160a05160c05160e05161010051610120516101405161016051610180516101a051612a9f61058f5f395f81816102c501528181610527015281816108ea01528181610fef01528181611247015281816112e6015261143701525f8181610230015281816107e7015261162e01525f61020901525f6115c901525f61159c01525f6110fa01525f6110d201525f61102d01525f61105701525f6110810152612a9f5ff3fe608060405234801561000f575f5ffd5b506004361061018e575f3560e01c80637535d246116100dd5780638da5cb5b11610088578063e5209f2c11610063578063e5209f2c14610415578063e56c8cb414610428578063f2fde38b1461043b575f5ffd5b80638da5cb5b146103d2578063920f5c84146103ef578063b1b6308b14610402575f5ffd5b80638456cb59116100b85780638456cb591461038257806384b0196e1461038a5780638c01220c146103a5575f5ffd5b80637535d246146102c05780637bf703b4146102e75780638115192f14610309575f5ffd5b80633644e5151161013d5780635678d216116101185780635678d216146102835780635c975abb14610296578063715018a6146102b8575f5ffd5b80633644e515146102525780633f4ba83a146102685780634743582f14610270575f5ffd5b80630be6c2aa1161016d5780630be6c2aa146101fc5780631f273c8e1461020457806332fe7b261461022b575f5ffd5b8062ae3bf8146101925780630542975c146101a757806309802f6d146101d9575b5f5ffd5b6101a56101a036600461203b565b61044e565b005b6101af610524565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b6101ec6101e7366004612188565b6105b7565b60405190151581526020016101d0565b6101a56106b4565b6101af7f000000000000000000000000000000000000000000000000000000000000000081565b6101af7f000000000000000000000000000000000000000000000000000000000000000081565b61025a610798565b6040519081526020016101d0565b6101a56107a1565b6101af61027e3660046122b6565b6107b3565b6101a5610291366004612407565b6107c7565b5f5474010000000000000000000000000000000000000000900460ff166101ec565b6101a5610852565b6101af7f000000000000000000000000000000000000000000000000000000000000000081565b6101ec6102f536600461203b565b60036020525f908152604090205460ff1681565b61035061031736600461203b565b60046020525f90815260409020805460019091015460ff821691610100900473ffffffffffffffffffffffffffffffffffffffff169083565b60408051931515845273ffffffffffffffffffffffffffffffffffffffff9092166020840152908201526060016101d0565b6101a5610863565b610392610873565b6040516101d097969594939291906124fb565b6101ec6103b3366004612591565b600560209081525f928352604080842090915290825290205460ff1681565b5f5473ffffffffffffffffffffffffffffffffffffffff166101af565b6101ec6103fd366004612609565b6108d1565b6101a56104103660046122b6565b61098f565b6101a561042336600461203b565b610b94565b6101a56104363660046126eb565b610c64565b6101a561044936600461203b565b610d42565b610456610da7565b6105216104775f5473ffffffffffffffffffffffffffffffffffffffff1690565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff8416906370a0823190602401602060405180830381865afa1580156104df573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610503919061271e565b73ffffffffffffffffffffffffffffffffffffffff84169190610df9565b50565b5f7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16630542975c6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561058e573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105b29190612735565b905090565b5f6105c0610e7f565b82516020808501516060860151608087015161010088015160a089015160c08a015160405133985f9861069b98610680987f1ca15395c04ac473d5b42656e3782ae1fce1a113fdb5432b57f8fb0870fa3178988d989497929691959094930198895273ffffffffffffffffffffffffffffffffffffffff97881660208a01529587166040890152939095166060870152608086019190915260a085015260c084019290925263ffffffff9190911660e08301526101008201526101200190565b60405160208183030381529060405280519060200120610ed3565b90506106a8868286610f1a565b925050505b9392505050565b6106bc610e7f565b335f908152600460205260409020805460ff16610705576040517f60f6234100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f816001015411610742576040517fd32e7fc600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8054600182015461077091610100900473ffffffffffffffffffffffffffffffffffffffff16903390610fb1565b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055565b5f6105b2611014565b6107a9610da7565b6107b161114a565b565b5f6107be83836111c6565b90505b92915050565b6107cf610e7f565b3373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161461083e576040517febe91ae200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61084b8585858585611245565b5050505050565b61085a610da7565b6107b15f6114b3565b61086b610da7565b6107b1611527565b5f6060805f5f5f6060610884611595565b61088c6115c2565b604080515f808252602082019092527f0f000000000000000000000000000000000000000000000000000000000000009b939a50919850469750309650945092509050565b5f3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610941576040517f7ffc0b6500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61097f83838080601f0160208091040260200160405190810160405280939291908181526020018383808284375f920191909152506115ef92505050565b90505b9998505050505050505050565b610997610e7f565b5f6109a28383611698565b825173ffffffffffffffffffffffffffffffffffffffff9081165f9081526005602090815260408083209385168352929052205490915060ff1615610a13576040517f785fa2f400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16826020015173ffffffffffffffffffffffffffffffffffffffff1614610a7c576040517f05886ddd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ab081836101000151846040015173ffffffffffffffffffffffffffffffffffffffff16610df99092919063ffffffff16565b6040518060600160405280600115158152602001836040015173ffffffffffffffffffffffffffffffffffffffff168152602001836101200151846101000151610afa9190612750565b905273ffffffffffffffffffffffffffffffffffffffff9182165f9081526004602090815260409182902083518154928501517fffffffffffffffffffffff0000000000000000000000000000000000000000009093169015157fffffffffffffffffffffff0000000000000000000000000000000000000000ff1617610100929095169190910293909317835501516001909101555050565b73ffffffffffffffffffffffffffffffffffffffff8116610be1576040517ff6b2911f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b335f81815260056020908152604080832073ffffffffffffffffffffffffffffffffffffffff8616808552925280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055519092917f856f0b5ddd2d41f4778c648c0ab55f0285fb87f0f35b6749889ae0d8ebef3c6c91a350565b610c6c610da7565b73ffffffffffffffffffffffffffffffffffffffff8216610cb9576040517ff6b2911f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff82165f8181526003602090815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001685151590811790915591519182527fad58a21bee8db31c6b4cfcdeaf806d8b7dfa187c5da0dc88e4bffc740ce5b91a910160405180910390a25050565b610d4a610da7565b73ffffffffffffffffffffffffffffffffffffffff8116610d9e576040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081525f60048201526024015b60405180910390fd5b610521816114b3565b5f5473ffffffffffffffffffffffffffffffffffffffff1633146107b1576040517f118cdaa7000000000000000000000000000000000000000000000000000000008152336004820152602401610d95565b60405173ffffffffffffffffffffffffffffffffffffffff838116602483015260448201839052610e7a91859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611840565b505050565b5f5474010000000000000000000000000000000000000000900460ff16156107b1576040517fd93c066500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f6107c1610edf611014565b836040517f19010000000000000000000000000000000000000000000000000000000000008152600281019290925260228201526042902090565b5f8373ffffffffffffffffffffffffffffffffffffffff163b5f03610f9f575f5f610f4585856118e5565b5090925090505f816003811115610f5e57610f5e612788565b148015610f9657508573ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b925050506106ad565b610faa84848461192e565b90506106ad565b610fd373ffffffffffffffffffffffffffffffffffffffff8416833084611a76565b610e7a73ffffffffffffffffffffffffffffffffffffffff84167f000000000000000000000000000000000000000000000000000000000000000083611abc565b5f3073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614801561107957507f000000000000000000000000000000000000000000000000000000000000000046145b156110a357507f000000000000000000000000000000000000000000000000000000000000000090565b6105b2604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527f0000000000000000000000000000000000000000000000000000000000000000918101919091527f000000000000000000000000000000000000000000000000000000000000000060608201524660808201523060a08201525f9060c00160405160208183030381529060405280519060200120905090565b611152611b93565b5f80547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390a1565b5f6107be836111d58585611be6565b6040513060388201526f5af43d82803e903d91602b57fd5bf3ff60248201526014810192909252733d602d80600a3d3981f3363d3d373d3d3d363d73825260588201526037600c8201206078820152605560439091012073ffffffffffffffffffffffffffffffffffffffff1690565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16146112ca576040517f21eeab0000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61130b73ffffffffffffffffffffffffffffffffffffffff85167f00000000000000000000000000000000000000000000000000000000000000005f611abc565b6040805160018082528183019092525f916020808301908036833750506040805160018082528183019092529293505f9291506020808301908036833750506040805160018082528183019092529293505f9291506020808301908036833701905050905086835f81518110611383576113836127b5565b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505085825f815181106113d0576113d06127b5565b6020026020010181815250505f815f815181106113ef576113ef6127b5565b60209081029190910101526040517fab9c4b5d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063ab9c4b5d9061147c90309087908790879084908d908d906110cc90600401612829565b5f604051808303815f87803b158015611493575f5ffd5b505af11580156114a5573d5f5f3e3d5ffd5b505050505050505050505050565b5f805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b61152f610e7f565b5f80547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16740100000000000000000000000000000000000000001790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861119c3390565b60606105b27f00000000000000000000000000000000000000000000000000000000000000006001611ccb565b60606105b27f00000000000000000000000000000000000000000000000000000000000000006002611ccb565b6040517f0dae46860000000000000000000000000000000000000000000000000000000081525f9073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001690630dae468690611663908590600401612904565b5f604051808303815f87803b15801561167a575f5ffd5b505af115801561168c573d5f5f3e3d5ffd5b50600195945050505050565b73ffffffffffffffffffffffffffffffffffffffff82165f9081526003602052604081205460ff166116f6576040517f18dd5cd200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f6117018484611be6565b6040513060388201526f5af43d82803e903d91602b57fd5bf3ff602482015260148101869052733d602d80600a3d3981f3363d3d373d3d3d363d738152605881018290526037600c8201206078820152605560439091012090915073ffffffffffffffffffffffffffffffffffffffff16803b156117ab576040517f9b4d6ca600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6117b58583611d74565b6040517ff361d2d700000000000000000000000000000000000000000000000000000000815290915073ffffffffffffffffffffffffffffffffffffffff82169063f361d2d79061180a908790600401612916565b5f604051808303815f87803b158015611821575f5ffd5b505af1158015611833573d5f5f3e3d5ffd5b5092979650505050505050565b5f5f60205f8451602086015f885af18061185f576040513d5f823e3d81fd5b50505f513d91508115611876578060011415611890565b73ffffffffffffffffffffffffffffffffffffffff84163b155b156118df576040517f5274afe700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85166004820152602401610d95565b50505050565b5f5f5f835160410361191c576020840151604085015160608601515f1a61190e88828585611d80565b955095509550505050611927565b505081515f91506002905b9250925092565b5f5f5f8573ffffffffffffffffffffffffffffffffffffffff16858560405160240161195b929190612a0b565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f1626ba7e00000000000000000000000000000000000000000000000000000000179052516119dc9190612a2b565b5f60405180830381855afa9150503d805f8114611a14576040519150601f19603f3d011682016040523d82523d5f602084013e611a19565b606091505b5091509150818015611a2d57506020815110155b80156106a8575080517f1626ba7e0000000000000000000000000000000000000000000000000000000090611a6b908301602090810190840161271e565b149695505050505050565b60405173ffffffffffffffffffffffffffffffffffffffff84811660248301528381166044830152606482018390526118df9186918216906323b872dd90608401610e33565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f095ea7b300000000000000000000000000000000000000000000000000000000179052611b488482611e73565b6118df5760405173ffffffffffffffffffffffffffffffffffffffff84811660248301525f6044830152611b8991869182169063095ea7b390606401610e33565b6118df8482611840565b5f5474010000000000000000000000000000000000000000900460ff166107b1576040517f8dfc202b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f82825f01518360400151846060015185608001518660a001518760c001518860e001518961010001518a61012001518b61014001518c6101600151604051602001611cad9c9b9a9998979695949392919073ffffffffffffffffffffffffffffffffffffffff9c8d1681529a8c1660208c0152988b1660408b0152969099166060890152608088019490945260a087019290925260c086015260e08501526101008401526101208301939093526101408201929092526101608101919091526101800190565b60405160208183030381529060405280519060200120905092915050565b606060ff8314611ce557611cde83611ec9565b90506107c1565b818054611cf190612a41565b80601f0160208091040260200160405190810160405280929190818152602001828054611d1d90612a41565b8015611d685780601f10611d3f57610100808354040283529160200191611d68565b820191905f5260205f20905b815481529060010190602001808311611d4b57829003601f168201915b505050505090506107c1565b5f6107be83835f611f06565b5f80807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115611db957505f91506003905082611e69565b604080515f808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015611e0a573d5f5f3e3d5ffd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff8116611e6057505f925060019150829050611e69565b92505f91508190505b9450945094915050565b5f5f5f5f60205f8651602088015f8a5af192503d91505f519050828015611ebf57508115611ea45780600114611ebf565b5f8673ffffffffffffffffffffffffffffffffffffffff163b115b9695505050505050565b60605f611ed583611fda565b6040805160208082528183019092529192505f91906020820181803683375050509182525060208101929092525090565b5f81471015611f4a576040517fcf47918100000000000000000000000000000000000000000000000000000000815247600482015260248101839052604401610d95565b763d602d80600a3d3981f3363d3d373d3d3d363d730000008460601b60e81c175f526e5af43d82803e903d91602b57fd5bf38460781b17602052826037600984f5905073ffffffffffffffffffffffffffffffffffffffff81166106ad576040517fb06ebf3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f60ff8216601f8111156107c1576040517fb3512b0c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff81168114610521575f5ffd5b5f6020828403121561204b575f5ffd5b81356106ad8161201a565b80356120618161201a565b919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b604051610180810167ffffffffffffffff811182821017156120b7576120b7612066565b60405290565b803563ffffffff81168114612061575f5ffd5b80358015158114612061575f5ffd5b5f82601f8301126120ee575f5ffd5b813567ffffffffffffffff81111561210857612108612066565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810167ffffffffffffffff8111828210171561215557612155612066565b60405281815283820160200185101561216c575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f5f5f8385036101c081121561219c575f5ffd5b84356121a78161201a565b93506101807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0820112156121d9575f5ffd5b506121e2612093565b6121ee60208601612056565b81526121fc60408601612056565b602082015261220d60608601612056565b6040820152608085810135606083015260a08601359082015261223260c086016120bd565b60a082015260e08581013560c083015261010080870135918301919091526101208601359082015261226761014086016120d0565b610120820152610160858101356101408301526101808601359082015291506101a084013567ffffffffffffffff8111156122a0575f5ffd5b6122ac868287016120df565b9150509250925092565b5f5f8284036101a08112156122c9575f5ffd5b83356122d48161201a565b92506101807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe082011215612306575f5ffd5b5061230f612093565b61231b60208501612056565b815261232960408501612056565b602082015261233a60608501612056565b604082015261234b60808501612056565b606082015260a084810135608083015260c0808601359183019190915260e08086013591830191909152610100808601359183019190915261012080860135918301919091526101408086013591830191909152610160808601359183019190915261018090940135938101939093525092909150565b5f5f83601f8401126123d2575f5ffd5b50813567ffffffffffffffff8111156123e9575f5ffd5b602083019150836020828501011115612400575f5ffd5b9250929050565b5f5f5f5f5f6080868803121561241b575f5ffd5b85356124268161201a565b945060208601356124368161201a565b935060408601359250606086013567ffffffffffffffff811115612458575f5ffd5b612464888289016123c2565b969995985093965092949392505050565b5f81518084528060208401602086015e5f6020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b5f8151808452602084019350602083015f5b828110156124f15781518652602095860195909101906001016124d3565b5093949350505050565b7fff000000000000000000000000000000000000000000000000000000000000008816815260e060208201525f61253560e0830189612475565b82810360408401526125478189612475565b905086606084015273ffffffffffffffffffffffffffffffffffffffff861660808401528460a084015282810360c084015261258381856124c1565b9a9950505050505050505050565b5f5f604083850312156125a2575f5ffd5b82356125ad8161201a565b915060208301356125bd8161201a565b809150509250929050565b5f5f83601f8401126125d8575f5ffd5b50813567ffffffffffffffff8111156125ef575f5ffd5b6020830191508360208260051b8501011115612400575f5ffd5b5f5f5f5f5f5f5f5f5f60a08a8c031215612621575f5ffd5b893567ffffffffffffffff811115612637575f5ffd5b6126438c828d016125c8565b909a5098505060208a013567ffffffffffffffff811115612662575f5ffd5b61266e8c828d016125c8565b90985096505060408a013567ffffffffffffffff81111561268d575f5ffd5b6126998c828d016125c8565b90965094505060608a01356126ad8161201a565b925060808a013567ffffffffffffffff8111156126c8575f5ffd5b6126d48c828d016123c2565b915080935050809150509295985092959850929598565b5f5f604083850312156126fc575f5ffd5b82356127078161201a565b9150612715602084016120d0565b90509250929050565b5f6020828403121561272e575f5ffd5b5051919050565b5f60208284031215612745575f5ffd5b81516106ad8161201a565b808201808211156107c1577f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b81835281816020850137505f602082840101525f60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b5f60e0820173ffffffffffffffffffffffffffffffffffffffff8b16835260e06020840152808a518083526101008501915060208c0192505f5b8181101561289757835173ffffffffffffffffffffffffffffffffffffffff16835260209384019390920191600101612863565b505083810360408501526128ab818b6124c1565b91505082810360608401526128c081896124c1565b73ffffffffffffffffffffffffffffffffffffffff88166080850152905082810360a08401526128f18186886127e2565b91505061098260c083018461ffff169052565b602081525f6107be6020830184612475565b815173ffffffffffffffffffffffffffffffffffffffff1681526101808101602083015161295c602084018273ffffffffffffffffffffffffffffffffffffffff169052565b506040830151612984604084018273ffffffffffffffffffffffffffffffffffffffff169052565b5060608301516129ac606084018273ffffffffffffffffffffffffffffffffffffffff169052565b506080830151608083015260a083015160a083015260c083015160c083015260e083015160e083015261010083015161010083015261012083015161012083015261014083015161014083015261016083015161016083015292915050565b828152604060208201525f612a236040830184612475565b949350505050565b5f82518060208501845e5f920191825250919050565b600181811c90821680612a5557607f821691505b602082108103612a8c577f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5091905056fea164736f6c634300081c000a","sourceMap":"730:2686:39:-:0;;;1384:277;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1508:11;1521:7;1530:6;2246:404:40;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;2246:404:40;;;2404:5;2411:8;2389:6;1297:1:12;-1:-1:-1;;;;;1273:26:12;:12;-1:-1:-1;;;;;1273:26:12;;1269:95;;1322:31;;-1:-1:-1;;;1322:31:12;;1350:1;1322:31;;;811:51:45;784:18;;1322:31:12;;;;;;;;1269:95;1373:32;1392:12;1373:18;:32::i;:::-;-1:-1:-1;3501:45:32;:4;3532:13;3501:30;:45::i;:::-;3493:53;;3567:51;:7;3601:16;3567:33;:51::i;:::-;3556:62;;3642:22;;;;;;;;;;3628:36;;3691:25;;;;;;3674:42;;3744:13;3727:30;;3792:23;4326:11;;4339:14;;4304:80;;;2079:95;4304:80;;;3773:25:45;3814:18;;;3807:34;;;;3857:18;;;3850:34;4355:13:32;3900:18:45;;;3893:34;4378:4:32;3943:19:45;;;3936:61;4268:7:32;;3745:19:45;;4304:80:32;;;;;;;;;;;;4294:91;;;;;;4287:98;;4213:179;;3792:23;3767:48;;-1:-1:-1;;3847:4:32;3825:27;;-1:-1:-1;;;;;2442:25:40;::::2;::::0;;::::2;::::0;:50:::2;;-1:-1:-1::0;;;;;;2471:21:40;::::2;::::0;::::2;2442:50;:74;;;;-1:-1:-1::0;;;;;;2496:20:40;::::2;::::0;::::2;2442:74;2427:123;;;;-1:-1:-1::0;;;2427:123:40::2;;;;;;;;;;;;-1:-1:-1::0;;;;;;;;2556:49:40;;::::2;;::::0;2611:34;::::2;;::::0;1581:23:39;::::1;1573:54;;;;-1:-1:-1::0;;;1573:54:39::1;;;;;;;;;;;;-1:-1:-1::0;;;;;;;;1633:23:39::1;;::::0;730:2686;;2912:187:12;2985:16;3004:6;;-1:-1:-1;;;;;3020:17:12;;;-1:-1:-1;;;;;;3020:17:12;;;;;;3052:40;;3004:6;;;;;;;3052:40;;2985:16;3052:40;2975:124;2912:187;:::o;2887:340:28:-;2983:11;3032:2;3016:5;3010:19;:24;3006:215;;;3057:20;3071:5;3057:13;:20::i;:::-;3050:27;;;;3006:215;3134:5;3108:46;3149:5;3134;3108:46;:::i;:::-;-1:-1:-1;1390:66:28;;-1:-1:-1;3006:215:28;2887:340;;;;:::o;1708:286::-;1773:11;1796:17;1822:3;1796:30;;1854:2;1840:4;:11;:16;1836:72;;;1893:3;1879:18;;-1:-1:-1;;;1879:18:28;;;;;;;;:::i;1836:72::-;1974:11;;1957:13;1974:4;1957:13;:::i;:::-;1949:36;;1708:286;-1:-1:-1;;;1708:286:28:o;14:177:45:-;93:13;;-1:-1:-1;;;;;135:31:45;;125:42;;115:70;;181:1;178;171:12;115:70;14:177;;;:::o;196:464::-;293:6;301;309;317;370:3;358:9;349:7;345:23;341:33;338:53;;;387:1;384;377:12;338:53;410:40;440:9;410:40;:::i;:::-;400:50;;469:49;514:2;503:9;499:18;469:49;:::i;:::-;459:59;;537:49;582:2;571:9;567:18;537:49;:::i;:::-;527:59;;605:49;650:2;639:9;635:18;605:49;:::i;:::-;595:59;;196:464;;;;;;;:::o;873:127::-;934:10;929:3;925:20;922:1;915:31;965:4;962:1;955:15;989:4;986:1;979:15;1005:380;1084:1;1080:12;;;;1127;;;1148:61;;1202:4;1194:6;1190:17;1180:27;;1148:61;1255:2;1247:6;1244:14;1224:18;1221:38;1218:161;;1301:10;1296:3;1292:20;1289:1;1282:31;1336:4;1333:1;1326:15;1364:4;1361:1;1354:15;1218:161;;1005:380;;;:::o;1516:518::-;1618:2;1613:3;1610:11;1607:421;;;1654:5;1651:1;1644:16;1698:4;1695:1;1685:18;1768:2;1756:10;1752:19;1749:1;1745:27;1739:4;1735:38;1804:4;1792:10;1789:20;1786:47;;;-1:-1:-1;1827:4:45;1786:47;1882:2;1877:3;1873:12;1870:1;1866:20;1860:4;1856:31;1846:41;;1937:81;1955:2;1948:5;1945:13;1937:81;;;2014:1;2000:16;;1981:1;1970:13;1937:81;;;1941:3;;1607:421;1516:518;;;:::o;2210:1299::-;2330:10;;-1:-1:-1;;;;;2352:30:45;;2349:56;;;2385:18;;:::i;:::-;2414:97;2504:6;2464:38;2496:4;2490:11;2464:38;:::i;:::-;2458:4;2414:97;:::i;:::-;2560:4;2591:2;2580:14;;2608:1;2603:649;;;;3296:1;3313:6;3310:89;;;-1:-1:-1;3365:19:45;;;3359:26;3310:89;-1:-1:-1;;2167:1:45;2163:11;;;2159:24;2155:29;2145:40;2191:1;2187:11;;;2142:57;3412:81;;2573:930;;2603:649;1463:1;1456:14;;;1500:4;1487:18;;-1:-1:-1;;2639:20:45;;;2757:222;2771:7;2768:1;2765:14;2757:222;;;2853:19;;;2847:26;2832:42;;2960:4;2945:20;;;;2913:1;2901:14;;;;2787:12;2757:222;;;2761:3;3007:6;2998:7;2995:19;2992:201;;;3068:19;;;3062:26;-1:-1:-1;;3151:1:45;3147:14;;;3163:3;3143:24;3139:37;3135:42;3120:58;3105:74;;2992:201;-1:-1:-1;;;;3239:1:45;3223:14;;;3219:22;3206:36;;-1:-1:-1;2210:1299:45:o;4008:418::-;4157:2;4146:9;4139:21;4120:4;4189:6;4183:13;4232:6;4227:2;4216:9;4212:18;4205:34;4291:6;4286:2;4278:6;4274:15;4269:2;4258:9;4254:18;4248:50;4347:1;4342:2;4333:6;4322:9;4318:22;4314:31;4307:42;4417:2;4410;4406:7;4401:2;4393:6;4389:15;4385:29;4374:9;4370:45;4366:54;4358:62;;;4008:418;;;;:::o;4431:297::-;4549:12;;4596:4;4585:16;;;4579:23;;4549:12;4614:16;;4611:111;;;-1:-1:-1;;4688:4:45;4684:17;;;;4681:1;4677:25;4673:38;4662:50;;4431:297;-1:-1:-1;4431:297:45:o;:::-;730:2686:39;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","linkReferences":{},"cborAuxdata":{"1":{"value":"0xa164736f6c634300081c000a","offset":12322}},"transformations":[{"type":"insert","offset":12334,"reason":"constructorArguments"}],"transformationValues":{"constructorArguments":"0x00000000000000000000000087870bca3f3fd6335c3f4ce8392d69350b4fa4e20000000000000000000000009008d19f58aabd9ed0d60971565aa8510560ab410000000000000000000000009da8b48441583a2b93e2ef8213aad0ec0b392c69000000000000000000000000df0a18f9be8cecc1d4fde078d99ee2ed4885ac5e"}},"runtimeBytecode":{"onchainBytecode":"0x608060405234801561000f575f5ffd5b506004361061018e575f3560e01c80637535d246116100dd5780638da5cb5b11610088578063e5209f2c11610063578063e5209f2c14610415578063e56c8cb414610428578063f2fde38b1461043b575f5ffd5b80638da5cb5b146103d2578063920f5c84146103ef578063b1b6308b14610402575f5ffd5b80638456cb59116100b85780638456cb591461038257806384b0196e1461038a5780638c01220c146103a5575f5ffd5b80637535d246146102c05780637bf703b4146102e75780638115192f14610309575f5ffd5b80633644e5151161013d5780635678d216116101185780635678d216146102835780635c975abb14610296578063715018a6146102b8575f5ffd5b80633644e515146102525780633f4ba83a146102685780634743582f14610270575f5ffd5b80630be6c2aa1161016d5780630be6c2aa146101fc5780631f273c8e1461020457806332fe7b261461022b575f5ffd5b8062ae3bf8146101925780630542975c146101a757806309802f6d146101d9575b5f5ffd5b6101a56101a036600461203b565b61044e565b005b6101af610524565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b6101ec6101e7366004612188565b6105b7565b60405190151581526020016101d0565b6101a56106b4565b6101af7f0000000000000000000000009008d19f58aabd9ed0d60971565aa8510560ab4181565b6101af7f0000000000000000000000009da8b48441583a2b93e2ef8213aad0ec0b392c6981565b61025a610798565b6040519081526020016101d0565b6101a56107a1565b6101af61027e3660046122b6565b6107b3565b6101a5610291366004612407565b6107c7565b5f5474010000000000000000000000000000000000000000900460ff166101ec565b6101a5610852565b6101af7f00000000000000000000000087870bca3f3fd6335c3f4ce8392d69350b4fa4e281565b6101ec6102f536600461203b565b60036020525f908152604090205460ff1681565b61035061031736600461203b565b60046020525f90815260409020805460019091015460ff821691610100900473ffffffffffffffffffffffffffffffffffffffff169083565b60408051931515845273ffffffffffffffffffffffffffffffffffffffff9092166020840152908201526060016101d0565b6101a5610863565b610392610873565b6040516101d097969594939291906124fb565b6101ec6103b3366004612591565b600560209081525f928352604080842090915290825290205460ff1681565b5f5473ffffffffffffffffffffffffffffffffffffffff166101af565b6101ec6103fd366004612609565b6108d1565b6101a56104103660046122b6565b61098f565b6101a561042336600461203b565b610b94565b6101a56104363660046126eb565b610c64565b6101a561044936600461203b565b610d42565b610456610da7565b6105216104775f5473ffffffffffffffffffffffffffffffffffffffff1690565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff8416906370a0823190602401602060405180830381865afa1580156104df573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610503919061271e565b73ffffffffffffffffffffffffffffffffffffffff84169190610df9565b50565b5f7f00000000000000000000000087870bca3f3fd6335c3f4ce8392d69350b4fa4e273ffffffffffffffffffffffffffffffffffffffff16630542975c6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561058e573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105b29190612735565b905090565b5f6105c0610e7f565b82516020808501516060860151608087015161010088015160a089015160c08a015160405133985f9861069b98610680987f1ca15395c04ac473d5b42656e3782ae1fce1a113fdb5432b57f8fb0870fa3178988d989497929691959094930198895273ffffffffffffffffffffffffffffffffffffffff97881660208a01529587166040890152939095166060870152608086019190915260a085015260c084019290925263ffffffff9190911660e08301526101008201526101200190565b60405160208183030381529060405280519060200120610ed3565b90506106a8868286610f1a565b925050505b9392505050565b6106bc610e7f565b335f908152600460205260409020805460ff16610705576040517f60f6234100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f816001015411610742576040517fd32e7fc600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8054600182015461077091610100900473ffffffffffffffffffffffffffffffffffffffff16903390610fb1565b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055565b5f6105b2611014565b6107a9610da7565b6107b161114a565b565b5f6107be83836111c6565b90505b92915050565b6107cf610e7f565b3373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000009da8b48441583a2b93e2ef8213aad0ec0b392c69161461083e576040517febe91ae200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61084b8585858585611245565b5050505050565b61085a610da7565b6107b15f6114b3565b61086b610da7565b6107b1611527565b5f6060805f5f5f6060610884611595565b61088c6115c2565b604080515f808252602082019092527f0f000000000000000000000000000000000000000000000000000000000000009b939a50919850469750309650945092509050565b5f3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000087870bca3f3fd6335c3f4ce8392d69350b4fa4e21614610941576040517f7ffc0b6500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61097f83838080601f0160208091040260200160405190810160405280939291908181526020018383808284375f920191909152506115ef92505050565b90505b9998505050505050505050565b610997610e7f565b5f6109a28383611698565b825173ffffffffffffffffffffffffffffffffffffffff9081165f9081526005602090815260408083209385168352929052205490915060ff1615610a13576040517f785fa2f400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16826020015173ffffffffffffffffffffffffffffffffffffffff1614610a7c576040517f05886ddd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ab081836101000151846040015173ffffffffffffffffffffffffffffffffffffffff16610df99092919063ffffffff16565b6040518060600160405280600115158152602001836040015173ffffffffffffffffffffffffffffffffffffffff168152602001836101200151846101000151610afa9190612750565b905273ffffffffffffffffffffffffffffffffffffffff9182165f9081526004602090815260409182902083518154928501517fffffffffffffffffffffff0000000000000000000000000000000000000000009093169015157fffffffffffffffffffffff0000000000000000000000000000000000000000ff1617610100929095169190910293909317835501516001909101555050565b73ffffffffffffffffffffffffffffffffffffffff8116610be1576040517ff6b2911f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b335f81815260056020908152604080832073ffffffffffffffffffffffffffffffffffffffff8616808552925280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055519092917f856f0b5ddd2d41f4778c648c0ab55f0285fb87f0f35b6749889ae0d8ebef3c6c91a350565b610c6c610da7565b73ffffffffffffffffffffffffffffffffffffffff8216610cb9576040517ff6b2911f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff82165f8181526003602090815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001685151590811790915591519182527fad58a21bee8db31c6b4cfcdeaf806d8b7dfa187c5da0dc88e4bffc740ce5b91a910160405180910390a25050565b610d4a610da7565b73ffffffffffffffffffffffffffffffffffffffff8116610d9e576040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081525f60048201526024015b60405180910390fd5b610521816114b3565b5f5473ffffffffffffffffffffffffffffffffffffffff1633146107b1576040517f118cdaa7000000000000000000000000000000000000000000000000000000008152336004820152602401610d95565b60405173ffffffffffffffffffffffffffffffffffffffff838116602483015260448201839052610e7a91859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611840565b505050565b5f5474010000000000000000000000000000000000000000900460ff16156107b1576040517fd93c066500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f6107c1610edf611014565b836040517f19010000000000000000000000000000000000000000000000000000000000008152600281019290925260228201526042902090565b5f8373ffffffffffffffffffffffffffffffffffffffff163b5f03610f9f575f5f610f4585856118e5565b5090925090505f816003811115610f5e57610f5e612788565b148015610f9657508573ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b925050506106ad565b610faa84848461192e565b90506106ad565b610fd373ffffffffffffffffffffffffffffffffffffffff8416833084611a76565b610e7a73ffffffffffffffffffffffffffffffffffffffff84167f00000000000000000000000087870bca3f3fd6335c3f4ce8392d69350b4fa4e283611abc565b5f3073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000decc46a4b09162f5369c5c80383aaa9159bcf1921614801561107957507f000000000000000000000000000000000000000000000000000000000000000146145b156110a357507fc80442d9ad9af65b1ef289d0d63e27803e42585c930314fd4a38e9fde2b14abd90565b6105b2604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527fecf8efb847a395668c83db182da25f83b4e23191261ce0d86ee34d77602eb951918101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a08201525f9060c00160405160208183030381529060405280519060200120905090565b611152611b93565b5f80547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390a1565b5f6107be836111d58585611be6565b6040513060388201526f5af43d82803e903d91602b57fd5bf3ff60248201526014810192909252733d602d80600a3d3981f3363d3d373d3d3d363d73825260588201526037600c8201206078820152605560439091012073ffffffffffffffffffffffffffffffffffffffff1690565b7f00000000000000000000000087870bca3f3fd6335c3f4ce8392d69350b4fa4e273ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16146112ca576040517f21eeab0000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61130b73ffffffffffffffffffffffffffffffffffffffff85167f00000000000000000000000087870bca3f3fd6335c3f4ce8392d69350b4fa4e25f611abc565b6040805160018082528183019092525f916020808301908036833750506040805160018082528183019092529293505f9291506020808301908036833750506040805160018082528183019092529293505f9291506020808301908036833701905050905086835f81518110611383576113836127b5565b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505085825f815181106113d0576113d06127b5565b6020026020010181815250505f815f815181106113ef576113ef6127b5565b60209081029190910101526040517fab9c4b5d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000087870bca3f3fd6335c3f4ce8392d69350b4fa4e2169063ab9c4b5d9061147c90309087908790879084908d908d906110cc90600401612829565b5f604051808303815f87803b158015611493575f5ffd5b505af11580156114a5573d5f5f3e3d5ffd5b505050505050505050505050565b5f805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b61152f610e7f565b5f80547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16740100000000000000000000000000000000000000001790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861119c3390565b60606105b27f41617665563341646170746572466163746f72790000000000000000000000146001611ccb565b60606105b27f31000000000000000000000000000000000000000000000000000000000000016002611ccb565b6040517f0dae46860000000000000000000000000000000000000000000000000000000081525f9073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000009da8b48441583a2b93e2ef8213aad0ec0b392c691690630dae468690611663908590600401612904565b5f604051808303815f87803b15801561167a575f5ffd5b505af115801561168c573d5f5f3e3d5ffd5b50600195945050505050565b73ffffffffffffffffffffffffffffffffffffffff82165f9081526003602052604081205460ff166116f6576040517f18dd5cd200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f6117018484611be6565b6040513060388201526f5af43d82803e903d91602b57fd5bf3ff602482015260148101869052733d602d80600a3d3981f3363d3d373d3d3d363d738152605881018290526037600c8201206078820152605560439091012090915073ffffffffffffffffffffffffffffffffffffffff16803b156117ab576040517f9b4d6ca600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6117b58583611d74565b6040517ff361d2d700000000000000000000000000000000000000000000000000000000815290915073ffffffffffffffffffffffffffffffffffffffff82169063f361d2d79061180a908790600401612916565b5f604051808303815f87803b158015611821575f5ffd5b505af1158015611833573d5f5f3e3d5ffd5b5092979650505050505050565b5f5f60205f8451602086015f885af18061185f576040513d5f823e3d81fd5b50505f513d91508115611876578060011415611890565b73ffffffffffffffffffffffffffffffffffffffff84163b155b156118df576040517f5274afe700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85166004820152602401610d95565b50505050565b5f5f5f835160410361191c576020840151604085015160608601515f1a61190e88828585611d80565b955095509550505050611927565b505081515f91506002905b9250925092565b5f5f5f8573ffffffffffffffffffffffffffffffffffffffff16858560405160240161195b929190612a0b565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f1626ba7e00000000000000000000000000000000000000000000000000000000179052516119dc9190612a2b565b5f60405180830381855afa9150503d805f8114611a14576040519150601f19603f3d011682016040523d82523d5f602084013e611a19565b606091505b5091509150818015611a2d57506020815110155b80156106a8575080517f1626ba7e0000000000000000000000000000000000000000000000000000000090611a6b908301602090810190840161271e565b149695505050505050565b60405173ffffffffffffffffffffffffffffffffffffffff84811660248301528381166044830152606482018390526118df9186918216906323b872dd90608401610e33565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f095ea7b300000000000000000000000000000000000000000000000000000000179052611b488482611e73565b6118df5760405173ffffffffffffffffffffffffffffffffffffffff84811660248301525f6044830152611b8991869182169063095ea7b390606401610e33565b6118df8482611840565b5f5474010000000000000000000000000000000000000000900460ff166107b1576040517f8dfc202b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f82825f01518360400151846060015185608001518660a001518760c001518860e001518961010001518a61012001518b61014001518c6101600151604051602001611cad9c9b9a9998979695949392919073ffffffffffffffffffffffffffffffffffffffff9c8d1681529a8c1660208c0152988b1660408b0152969099166060890152608088019490945260a087019290925260c086015260e08501526101008401526101208301939093526101408201929092526101608101919091526101800190565b60405160208183030381529060405280519060200120905092915050565b606060ff8314611ce557611cde83611ec9565b90506107c1565b818054611cf190612a41565b80601f0160208091040260200160405190810160405280929190818152602001828054611d1d90612a41565b8015611d685780601f10611d3f57610100808354040283529160200191611d68565b820191905f5260205f20905b815481529060010190602001808311611d4b57829003601f168201915b505050505090506107c1565b5f6107be83835f611f06565b5f80807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115611db957505f91506003905082611e69565b604080515f808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015611e0a573d5f5f3e3d5ffd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff8116611e6057505f925060019150829050611e69565b92505f91508190505b9450945094915050565b5f5f5f5f60205f8651602088015f8a5af192503d91505f519050828015611ebf57508115611ea45780600114611ebf565b5f8673ffffffffffffffffffffffffffffffffffffffff163b115b9695505050505050565b60605f611ed583611fda565b6040805160208082528183019092529192505f91906020820181803683375050509182525060208101929092525090565b5f81471015611f4a576040517fcf47918100000000000000000000000000000000000000000000000000000000815247600482015260248101839052604401610d95565b763d602d80600a3d3981f3363d3d373d3d3d363d730000008460601b60e81c175f526e5af43d82803e903d91602b57fd5bf38460781b17602052826037600984f5905073ffffffffffffffffffffffffffffffffffffffff81166106ad576040517fb06ebf3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f60ff8216601f8111156107c1576040517fb3512b0c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff81168114610521575f5ffd5b5f6020828403121561204b575f5ffd5b81356106ad8161201a565b80356120618161201a565b919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b604051610180810167ffffffffffffffff811182821017156120b7576120b7612066565b60405290565b803563ffffffff81168114612061575f5ffd5b80358015158114612061575f5ffd5b5f82601f8301126120ee575f5ffd5b813567ffffffffffffffff81111561210857612108612066565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810167ffffffffffffffff8111828210171561215557612155612066565b60405281815283820160200185101561216c575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f5f5f8385036101c081121561219c575f5ffd5b84356121a78161201a565b93506101807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0820112156121d9575f5ffd5b506121e2612093565b6121ee60208601612056565b81526121fc60408601612056565b602082015261220d60608601612056565b6040820152608085810135606083015260a08601359082015261223260c086016120bd565b60a082015260e08581013560c083015261010080870135918301919091526101208601359082015261226761014086016120d0565b610120820152610160858101356101408301526101808601359082015291506101a084013567ffffffffffffffff8111156122a0575f5ffd5b6122ac868287016120df565b9150509250925092565b5f5f8284036101a08112156122c9575f5ffd5b83356122d48161201a565b92506101807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe082011215612306575f5ffd5b5061230f612093565b61231b60208501612056565b815261232960408501612056565b602082015261233a60608501612056565b604082015261234b60808501612056565b606082015260a084810135608083015260c0808601359183019190915260e08086013591830191909152610100808601359183019190915261012080860135918301919091526101408086013591830191909152610160808601359183019190915261018090940135938101939093525092909150565b5f5f83601f8401126123d2575f5ffd5b50813567ffffffffffffffff8111156123e9575f5ffd5b602083019150836020828501011115612400575f5ffd5b9250929050565b5f5f5f5f5f6080868803121561241b575f5ffd5b85356124268161201a565b945060208601356124368161201a565b935060408601359250606086013567ffffffffffffffff811115612458575f5ffd5b612464888289016123c2565b969995985093965092949392505050565b5f81518084528060208401602086015e5f6020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b5f8151808452602084019350602083015f5b828110156124f15781518652602095860195909101906001016124d3565b5093949350505050565b7fff000000000000000000000000000000000000000000000000000000000000008816815260e060208201525f61253560e0830189612475565b82810360408401526125478189612475565b905086606084015273ffffffffffffffffffffffffffffffffffffffff861660808401528460a084015282810360c084015261258381856124c1565b9a9950505050505050505050565b5f5f604083850312156125a2575f5ffd5b82356125ad8161201a565b915060208301356125bd8161201a565b809150509250929050565b5f5f83601f8401126125d8575f5ffd5b50813567ffffffffffffffff8111156125ef575f5ffd5b6020830191508360208260051b8501011115612400575f5ffd5b5f5f5f5f5f5f5f5f5f60a08a8c031215612621575f5ffd5b893567ffffffffffffffff811115612637575f5ffd5b6126438c828d016125c8565b909a5098505060208a013567ffffffffffffffff811115612662575f5ffd5b61266e8c828d016125c8565b90985096505060408a013567ffffffffffffffff81111561268d575f5ffd5b6126998c828d016125c8565b90965094505060608a01356126ad8161201a565b925060808a013567ffffffffffffffff8111156126c8575f5ffd5b6126d48c828d016123c2565b915080935050809150509295985092959850929598565b5f5f604083850312156126fc575f5ffd5b82356127078161201a565b9150612715602084016120d0565b90509250929050565b5f6020828403121561272e575f5ffd5b5051919050565b5f60208284031215612745575f5ffd5b81516106ad8161201a565b808201808211156107c1577f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b81835281816020850137505f602082840101525f60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b5f60e0820173ffffffffffffffffffffffffffffffffffffffff8b16835260e06020840152808a518083526101008501915060208c0192505f5b8181101561289757835173ffffffffffffffffffffffffffffffffffffffff16835260209384019390920191600101612863565b505083810360408501526128ab818b6124c1565b91505082810360608401526128c081896124c1565b73ffffffffffffffffffffffffffffffffffffffff88166080850152905082810360a08401526128f18186886127e2565b91505061098260c083018461ffff169052565b602081525f6107be6020830184612475565b815173ffffffffffffffffffffffffffffffffffffffff1681526101808101602083015161295c602084018273ffffffffffffffffffffffffffffffffffffffff169052565b506040830151612984604084018273ffffffffffffffffffffffffffffffffffffffff169052565b5060608301516129ac606084018273ffffffffffffffffffffffffffffffffffffffff169052565b506080830151608083015260a083015160a083015260c083015160c083015260e083015160e083015261010083015161010083015261012083015161012083015261014083015161014083015261016083015161016083015292915050565b828152604060208201525f612a236040830184612475565b949350505050565b5f82518060208501845e5f920191825250919050565b600181811c90821680612a5557607f821691505b602082108103612a8c577f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5091905056fea164736f6c634300081c000a","recompiledBytecode":"0x608060405234801561000f575f5ffd5b506004361061018e575f3560e01c80637535d246116100dd5780638da5cb5b11610088578063e5209f2c11610063578063e5209f2c14610415578063e56c8cb414610428578063f2fde38b1461043b575f5ffd5b80638da5cb5b146103d2578063920f5c84146103ef578063b1b6308b14610402575f5ffd5b80638456cb59116100b85780638456cb591461038257806384b0196e1461038a5780638c01220c146103a5575f5ffd5b80637535d246146102c05780637bf703b4146102e75780638115192f14610309575f5ffd5b80633644e5151161013d5780635678d216116101185780635678d216146102835780635c975abb14610296578063715018a6146102b8575f5ffd5b80633644e515146102525780633f4ba83a146102685780634743582f14610270575f5ffd5b80630be6c2aa1161016d5780630be6c2aa146101fc5780631f273c8e1461020457806332fe7b261461022b575f5ffd5b8062ae3bf8146101925780630542975c146101a757806309802f6d146101d9575b5f5ffd5b6101a56101a036600461203b565b61044e565b005b6101af610524565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b6101ec6101e7366004612188565b6105b7565b60405190151581526020016101d0565b6101a56106b4565b6101af7f000000000000000000000000000000000000000000000000000000000000000081565b6101af7f000000000000000000000000000000000000000000000000000000000000000081565b61025a610798565b6040519081526020016101d0565b6101a56107a1565b6101af61027e3660046122b6565b6107b3565b6101a5610291366004612407565b6107c7565b5f5474010000000000000000000000000000000000000000900460ff166101ec565b6101a5610852565b6101af7f000000000000000000000000000000000000000000000000000000000000000081565b6101ec6102f536600461203b565b60036020525f908152604090205460ff1681565b61035061031736600461203b565b60046020525f90815260409020805460019091015460ff821691610100900473ffffffffffffffffffffffffffffffffffffffff169083565b60408051931515845273ffffffffffffffffffffffffffffffffffffffff9092166020840152908201526060016101d0565b6101a5610863565b610392610873565b6040516101d097969594939291906124fb565b6101ec6103b3366004612591565b600560209081525f928352604080842090915290825290205460ff1681565b5f5473ffffffffffffffffffffffffffffffffffffffff166101af565b6101ec6103fd366004612609565b6108d1565b6101a56104103660046122b6565b61098f565b6101a561042336600461203b565b610b94565b6101a56104363660046126eb565b610c64565b6101a561044936600461203b565b610d42565b610456610da7565b6105216104775f5473ffffffffffffffffffffffffffffffffffffffff1690565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff8416906370a0823190602401602060405180830381865afa1580156104df573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610503919061271e565b73ffffffffffffffffffffffffffffffffffffffff84169190610df9565b50565b5f7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16630542975c6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561058e573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105b29190612735565b905090565b5f6105c0610e7f565b82516020808501516060860151608087015161010088015160a089015160c08a015160405133985f9861069b98610680987f1ca15395c04ac473d5b42656e3782ae1fce1a113fdb5432b57f8fb0870fa3178988d989497929691959094930198895273ffffffffffffffffffffffffffffffffffffffff97881660208a01529587166040890152939095166060870152608086019190915260a085015260c084019290925263ffffffff9190911660e08301526101008201526101200190565b60405160208183030381529060405280519060200120610ed3565b90506106a8868286610f1a565b925050505b9392505050565b6106bc610e7f565b335f908152600460205260409020805460ff16610705576040517f60f6234100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f816001015411610742576040517fd32e7fc600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8054600182015461077091610100900473ffffffffffffffffffffffffffffffffffffffff16903390610fb1565b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055565b5f6105b2611014565b6107a9610da7565b6107b161114a565b565b5f6107be83836111c6565b90505b92915050565b6107cf610e7f565b3373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161461083e576040517febe91ae200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61084b8585858585611245565b5050505050565b61085a610da7565b6107b15f6114b3565b61086b610da7565b6107b1611527565b5f6060805f5f5f6060610884611595565b61088c6115c2565b604080515f808252602082019092527f0f000000000000000000000000000000000000000000000000000000000000009b939a50919850469750309650945092509050565b5f3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610941576040517f7ffc0b6500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61097f83838080601f0160208091040260200160405190810160405280939291908181526020018383808284375f920191909152506115ef92505050565b90505b9998505050505050505050565b610997610e7f565b5f6109a28383611698565b825173ffffffffffffffffffffffffffffffffffffffff9081165f9081526005602090815260408083209385168352929052205490915060ff1615610a13576040517f785fa2f400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16826020015173ffffffffffffffffffffffffffffffffffffffff1614610a7c576040517f05886ddd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ab081836101000151846040015173ffffffffffffffffffffffffffffffffffffffff16610df99092919063ffffffff16565b6040518060600160405280600115158152602001836040015173ffffffffffffffffffffffffffffffffffffffff168152602001836101200151846101000151610afa9190612750565b905273ffffffffffffffffffffffffffffffffffffffff9182165f9081526004602090815260409182902083518154928501517fffffffffffffffffffffff0000000000000000000000000000000000000000009093169015157fffffffffffffffffffffff0000000000000000000000000000000000000000ff1617610100929095169190910293909317835501516001909101555050565b73ffffffffffffffffffffffffffffffffffffffff8116610be1576040517ff6b2911f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b335f81815260056020908152604080832073ffffffffffffffffffffffffffffffffffffffff8616808552925280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055519092917f856f0b5ddd2d41f4778c648c0ab55f0285fb87f0f35b6749889ae0d8ebef3c6c91a350565b610c6c610da7565b73ffffffffffffffffffffffffffffffffffffffff8216610cb9576040517ff6b2911f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff82165f8181526003602090815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001685151590811790915591519182527fad58a21bee8db31c6b4cfcdeaf806d8b7dfa187c5da0dc88e4bffc740ce5b91a910160405180910390a25050565b610d4a610da7565b73ffffffffffffffffffffffffffffffffffffffff8116610d9e576040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081525f60048201526024015b60405180910390fd5b610521816114b3565b5f5473ffffffffffffffffffffffffffffffffffffffff1633146107b1576040517f118cdaa7000000000000000000000000000000000000000000000000000000008152336004820152602401610d95565b60405173ffffffffffffffffffffffffffffffffffffffff838116602483015260448201839052610e7a91859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611840565b505050565b5f5474010000000000000000000000000000000000000000900460ff16156107b1576040517fd93c066500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f6107c1610edf611014565b836040517f19010000000000000000000000000000000000000000000000000000000000008152600281019290925260228201526042902090565b5f8373ffffffffffffffffffffffffffffffffffffffff163b5f03610f9f575f5f610f4585856118e5565b5090925090505f816003811115610f5e57610f5e612788565b148015610f9657508573ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b925050506106ad565b610faa84848461192e565b90506106ad565b610fd373ffffffffffffffffffffffffffffffffffffffff8416833084611a76565b610e7a73ffffffffffffffffffffffffffffffffffffffff84167f000000000000000000000000000000000000000000000000000000000000000083611abc565b5f3073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614801561107957507f000000000000000000000000000000000000000000000000000000000000000046145b156110a357507f000000000000000000000000000000000000000000000000000000000000000090565b6105b2604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527f0000000000000000000000000000000000000000000000000000000000000000918101919091527f000000000000000000000000000000000000000000000000000000000000000060608201524660808201523060a08201525f9060c00160405160208183030381529060405280519060200120905090565b611152611b93565b5f80547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390a1565b5f6107be836111d58585611be6565b6040513060388201526f5af43d82803e903d91602b57fd5bf3ff60248201526014810192909252733d602d80600a3d3981f3363d3d373d3d3d363d73825260588201526037600c8201206078820152605560439091012073ffffffffffffffffffffffffffffffffffffffff1690565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16146112ca576040517f21eeab0000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61130b73ffffffffffffffffffffffffffffffffffffffff85167f00000000000000000000000000000000000000000000000000000000000000005f611abc565b6040805160018082528183019092525f916020808301908036833750506040805160018082528183019092529293505f9291506020808301908036833750506040805160018082528183019092529293505f9291506020808301908036833701905050905086835f81518110611383576113836127b5565b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505085825f815181106113d0576113d06127b5565b6020026020010181815250505f815f815181106113ef576113ef6127b5565b60209081029190910101526040517fab9c4b5d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063ab9c4b5d9061147c90309087908790879084908d908d906110cc90600401612829565b5f604051808303815f87803b158015611493575f5ffd5b505af11580156114a5573d5f5f3e3d5ffd5b505050505050505050505050565b5f805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b61152f610e7f565b5f80547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16740100000000000000000000000000000000000000001790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861119c3390565b60606105b27f00000000000000000000000000000000000000000000000000000000000000006001611ccb565b60606105b27f00000000000000000000000000000000000000000000000000000000000000006002611ccb565b6040517f0dae46860000000000000000000000000000000000000000000000000000000081525f9073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001690630dae468690611663908590600401612904565b5f604051808303815f87803b15801561167a575f5ffd5b505af115801561168c573d5f5f3e3d5ffd5b50600195945050505050565b73ffffffffffffffffffffffffffffffffffffffff82165f9081526003602052604081205460ff166116f6576040517f18dd5cd200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f6117018484611be6565b6040513060388201526f5af43d82803e903d91602b57fd5bf3ff602482015260148101869052733d602d80600a3d3981f3363d3d373d3d3d363d738152605881018290526037600c8201206078820152605560439091012090915073ffffffffffffffffffffffffffffffffffffffff16803b156117ab576040517f9b4d6ca600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6117b58583611d74565b6040517ff361d2d700000000000000000000000000000000000000000000000000000000815290915073ffffffffffffffffffffffffffffffffffffffff82169063f361d2d79061180a908790600401612916565b5f604051808303815f87803b158015611821575f5ffd5b505af1158015611833573d5f5f3e3d5ffd5b5092979650505050505050565b5f5f60205f8451602086015f885af18061185f576040513d5f823e3d81fd5b50505f513d91508115611876578060011415611890565b73ffffffffffffffffffffffffffffffffffffffff84163b155b156118df576040517f5274afe700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85166004820152602401610d95565b50505050565b5f5f5f835160410361191c576020840151604085015160608601515f1a61190e88828585611d80565b955095509550505050611927565b505081515f91506002905b9250925092565b5f5f5f8573ffffffffffffffffffffffffffffffffffffffff16858560405160240161195b929190612a0b565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f1626ba7e00000000000000000000000000000000000000000000000000000000179052516119dc9190612a2b565b5f60405180830381855afa9150503d805f8114611a14576040519150601f19603f3d011682016040523d82523d5f602084013e611a19565b606091505b5091509150818015611a2d57506020815110155b80156106a8575080517f1626ba7e0000000000000000000000000000000000000000000000000000000090611a6b908301602090810190840161271e565b149695505050505050565b60405173ffffffffffffffffffffffffffffffffffffffff84811660248301528381166044830152606482018390526118df9186918216906323b872dd90608401610e33565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f095ea7b300000000000000000000000000000000000000000000000000000000179052611b488482611e73565b6118df5760405173ffffffffffffffffffffffffffffffffffffffff84811660248301525f6044830152611b8991869182169063095ea7b390606401610e33565b6118df8482611840565b5f5474010000000000000000000000000000000000000000900460ff166107b1576040517f8dfc202b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f82825f01518360400151846060015185608001518660a001518760c001518860e001518961010001518a61012001518b61014001518c6101600151604051602001611cad9c9b9a9998979695949392919073ffffffffffffffffffffffffffffffffffffffff9c8d1681529a8c1660208c0152988b1660408b0152969099166060890152608088019490945260a087019290925260c086015260e08501526101008401526101208301939093526101408201929092526101608101919091526101800190565b60405160208183030381529060405280519060200120905092915050565b606060ff8314611ce557611cde83611ec9565b90506107c1565b818054611cf190612a41565b80601f0160208091040260200160405190810160405280929190818152602001828054611d1d90612a41565b8015611d685780601f10611d3f57610100808354040283529160200191611d68565b820191905f5260205f20905b815481529060010190602001808311611d4b57829003601f168201915b505050505090506107c1565b5f6107be83835f611f06565b5f80807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115611db957505f91506003905082611e69565b604080515f808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015611e0a573d5f5f3e3d5ffd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff8116611e6057505f925060019150829050611e69565b92505f91508190505b9450945094915050565b5f5f5f5f60205f8651602088015f8a5af192503d91505f519050828015611ebf57508115611ea45780600114611ebf565b5f8673ffffffffffffffffffffffffffffffffffffffff163b115b9695505050505050565b60605f611ed583611fda565b6040805160208082528183019092529192505f91906020820181803683375050509182525060208101929092525090565b5f81471015611f4a576040517fcf47918100000000000000000000000000000000000000000000000000000000815247600482015260248101839052604401610d95565b763d602d80600a3d3981f3363d3d373d3d3d363d730000008460601b60e81c175f526e5af43d82803e903d91602b57fd5bf38460781b17602052826037600984f5905073ffffffffffffffffffffffffffffffffffffffff81166106ad576040517fb06ebf3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f60ff8216601f8111156107c1576040517fb3512b0c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff81168114610521575f5ffd5b5f6020828403121561204b575f5ffd5b81356106ad8161201a565b80356120618161201a565b919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b604051610180810167ffffffffffffffff811182821017156120b7576120b7612066565b60405290565b803563ffffffff81168114612061575f5ffd5b80358015158114612061575f5ffd5b5f82601f8301126120ee575f5ffd5b813567ffffffffffffffff81111561210857612108612066565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810167ffffffffffffffff8111828210171561215557612155612066565b60405281815283820160200185101561216c575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f5f5f8385036101c081121561219c575f5ffd5b84356121a78161201a565b93506101807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0820112156121d9575f5ffd5b506121e2612093565b6121ee60208601612056565b81526121fc60408601612056565b602082015261220d60608601612056565b6040820152608085810135606083015260a08601359082015261223260c086016120bd565b60a082015260e08581013560c083015261010080870135918301919091526101208601359082015261226761014086016120d0565b610120820152610160858101356101408301526101808601359082015291506101a084013567ffffffffffffffff8111156122a0575f5ffd5b6122ac868287016120df565b9150509250925092565b5f5f8284036101a08112156122c9575f5ffd5b83356122d48161201a565b92506101807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe082011215612306575f5ffd5b5061230f612093565b61231b60208501612056565b815261232960408501612056565b602082015261233a60608501612056565b604082015261234b60808501612056565b606082015260a084810135608083015260c0808601359183019190915260e08086013591830191909152610100808601359183019190915261012080860135918301919091526101408086013591830191909152610160808601359183019190915261018090940135938101939093525092909150565b5f5f83601f8401126123d2575f5ffd5b50813567ffffffffffffffff8111156123e9575f5ffd5b602083019150836020828501011115612400575f5ffd5b9250929050565b5f5f5f5f5f6080868803121561241b575f5ffd5b85356124268161201a565b945060208601356124368161201a565b935060408601359250606086013567ffffffffffffffff811115612458575f5ffd5b612464888289016123c2565b969995985093965092949392505050565b5f81518084528060208401602086015e5f6020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b5f8151808452602084019350602083015f5b828110156124f15781518652602095860195909101906001016124d3565b5093949350505050565b7fff000000000000000000000000000000000000000000000000000000000000008816815260e060208201525f61253560e0830189612475565b82810360408401526125478189612475565b905086606084015273ffffffffffffffffffffffffffffffffffffffff861660808401528460a084015282810360c084015261258381856124c1565b9a9950505050505050505050565b5f5f604083850312156125a2575f5ffd5b82356125ad8161201a565b915060208301356125bd8161201a565b809150509250929050565b5f5f83601f8401126125d8575f5ffd5b50813567ffffffffffffffff8111156125ef575f5ffd5b6020830191508360208260051b8501011115612400575f5ffd5b5f5f5f5f5f5f5f5f5f60a08a8c031215612621575f5ffd5b893567ffffffffffffffff811115612637575f5ffd5b6126438c828d016125c8565b909a5098505060208a013567ffffffffffffffff811115612662575f5ffd5b61266e8c828d016125c8565b90985096505060408a013567ffffffffffffffff81111561268d575f5ffd5b6126998c828d016125c8565b90965094505060608a01356126ad8161201a565b925060808a013567ffffffffffffffff8111156126c8575f5ffd5b6126d48c828d016123c2565b915080935050809150509295985092959850929598565b5f5f604083850312156126fc575f5ffd5b82356127078161201a565b9150612715602084016120d0565b90509250929050565b5f6020828403121561272e575f5ffd5b5051919050565b5f60208284031215612745575f5ffd5b81516106ad8161201a565b808201808211156107c1577f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b81835281816020850137505f602082840101525f60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b5f60e0820173ffffffffffffffffffffffffffffffffffffffff8b16835260e06020840152808a518083526101008501915060208c0192505f5b8181101561289757835173ffffffffffffffffffffffffffffffffffffffff16835260209384019390920191600101612863565b505083810360408501526128ab818b6124c1565b91505082810360608401526128c081896124c1565b73ffffffffffffffffffffffffffffffffffffffff88166080850152905082810360a08401526128f18186886127e2565b91505061098260c083018461ffff169052565b602081525f6107be6020830184612475565b815173ffffffffffffffffffffffffffffffffffffffff1681526101808101602083015161295c602084018273ffffffffffffffffffffffffffffffffffffffff169052565b506040830151612984604084018273ffffffffffffffffffffffffffffffffffffffff169052565b5060608301516129ac606084018273ffffffffffffffffffffffffffffffffffffffff169052565b506080830151608083015260a083015160a083015260c083015160c083015260e083015160e083015261010083015161010083015261012083015161012083015261014083015161014083015261016083015161016083015292915050565b828152604060208201525f612a236040830184612475565b949350505050565b5f82518060208501845e5f920191825250919050565b600181811c90821680612a5557607f821691505b602082108103612a8c577f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5091905056fea164736f6c634300081c000a","sourceMap":"730:2686:39:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3279:125:40;;;;;;:::i;:::-;;:::i;:::-;;2085:120:39;;;:::i;:::-;;;662:42:45;650:55;;;632:74;;620:2;605:18;2085:120:39;;;;;;;;5593:644:40;;;;;;:::i;:::-;;:::i;:::-;;;4593:14:45;;4586:22;4568:41;;4556:2;4541:18;5593:644:40;4428:187:45;4829:462:40;;;:::i;1439:51::-;;;;;1532:40;;;;;6279:98;;;:::i;:::-;;;5276:25:45;;;5264:2;5249:18;6279:98:40;5130:177:45;3539:59:40;;;:::i;6419:240::-;;;;;;:::i;:::-;;:::i;3635:284::-;;;;;;:::i;:::-;;:::i;1726:84:27:-;1773:4;1796:7;;;;;;1726:84;;2293:101:12;;;:::i;973:27:39:-;;;;;1627:55:40;;;;;;:::i;:::-;;;;;;;;;;;;;;;;1745:65;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9364:14:45;;9357:22;9339:41;;9428:42;9416:55;;;9411:2;9396:18;;9389:83;9488:18;;;9481:34;9327:2;9312:18;1745:65:40;9143:378:45;3443:55:40;;;:::i;5228:557:32:-;;;:::i;:::-;;;;;;;;;;;;;:::i;1867:71:40:-;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;1638:85:12;1684:7;1710:6;;;1638:85;;1702:342:39;;;;;;:::i;:::-;;:::i;3961:826:40:-;;;;;;:::i;:::-;;:::i;5333:218::-;;;;;;:::i;:::-;;:::i;2692:303::-;;;;;;:::i;:::-;;:::i;2543:215:12:-;;;;;;:::i;:::-;;:::i;3279:125:40:-;1531:13:12;:11;:13::i;:::-;3340:59:40::1;3359:7;1684::12::0;1710:6;;;;1638:85;3359:7:40::1;3368:30;::::0;;;;3392:4:::1;3368:30;::::0;::::1;632:74:45::0;3368:15:40::1;::::0;::::1;::::0;::::1;::::0;605:18:45;;3368:30:40::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;3340:18;::::0;::::1;::::0;:59;:18:::1;:59::i;:::-;3279:125:::0;:::o;2085:120:39:-;2138:22;2175:4;:23;;;:25;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;2168:32;;2085:120;:::o;5593:644:40:-;5749:4;1350:19:27;:17;:19::i;:::-;5950:15:40;;5986:14:::1;::::0;;::::1;::::0;6013:16:::1;::::0;::::1;::::0;6041:15:::1;::::0;::::1;::::0;6068:10:::1;::::0;::::1;::::0;6090:13:::1;::::0;::::1;::::0;6115::::1;::::0;::::1;::::0;5856:282:::1;::::0;5780:10:::1;::::0;5761:16:::1;::::0;5813:339:::1;::::0;5856:282:::1;::::0;652:66:44::1;::::0;5780:10:40;;5950:15;;5986:14;;6013:16;;6041:15;;6068:10;5856:282:::1;14818:25:45::0;;;14891:42;14879:55;;;14874:2;14859:18;;14852:83;14971:55;;;14966:2;14951:18;;14944:83;15063:55;;;;15058:2;15043:18;;15036:83;15150:3;15135:19;;15128:35;;;;15194:3;15179:19;;15172:35;15238:3;15223:19;;15216:35;;;;15300:10;15288:23;;;;15282:3;15267:19;;15260:52;15343:3;15328:19;;15321:35;14805:3;14790:19;;14449:913;5856:282:40::1;;;;;;;;;;;;;5837:309;;;;;;5813:16;:339::i;:::-;5796:356;;6165:67;6202:10;6214:6;6222:9;6165:36;:67::i;:::-;6158:74;;;;1379:1:27;5593:644:40::0;;;;;:::o;4829:462::-;1350:19:27;:17;:19::i;:::-;5016:10:40::1;4953:45;5001:26:::0;;;:14:::1;:26;::::0;;;;5041:28;;::::1;;5033:58;;;;;;;;;;;;;;;;;5133:1;5105:13;:25;;;:29;5097:56;;;;;;;;;;;;;;;;;5183:19:::0;;::::1;5217:25:::0;::::1;::::0;5160:83:::1;::::0;5183:19:::1;::::0;::::1;;;::::0;5205:10:::1;::::0;5160:15:::1;:83::i;:::-;5250:36:::0;;;::::1;::::0;;4829:462::o;6279:98::-;6330:7;6352:20;:18;:20::i;3539:59::-;1531:13:12;:11;:13::i;:::-;3583:10:40::1;:8;:10::i;:::-;3539:59::o:0;6419:240::-;6567:7;6589:65;6622:21;6645:8;6589:32;:65::i;:::-;6582:72;;6419:240;;;;;:::o;3635:284::-;1350:19:27;:17;:19::i;:::-;3805:10:40::1;:29;3827:6;3805:29;;3797:57;;;;;;;;;;;;;;;;;3860:54;3878:6;3886:5;3893:6;3901:12;;3860:17;:54::i;:::-;3635:284:::0;;;;;:::o;2293:101:12:-;1531:13;:11;:13::i;:::-;2357:30:::1;2384:1;2357:18;:30::i;3443:55:40:-:0;1531:13:12;:11;:13::i;:::-;3485:8:40::1;:6;:8::i;5228:557:32:-:0;5326:13;5353:18;5385:21;5420:15;5449:25;5488:12;5514:27;5617:13;:11;:13::i;:::-;5644:16;:14;:16::i;:::-;5752;;;5736:1;5752:16;;;;;;;;;5566:212;;;;-1:-1:-1;5566:212:32;;-1:-1:-1;5674:13:32;;-1:-1:-1;5709:4:32;;-1:-1:-1;5736:1:32;-1:-1:-1;5752:16:32;-1:-1:-1;5566:212:32;-1:-1:-1;5228:557:32:o;1702:342:39:-;1926:4;1946:10;:27;1968:4;1946:27;;1938:57;;;;;;;;;;;;;;;;;2008:31;2026:12;;2008:31;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2008:17:39;;-1:-1:-1;;;2008:31:39:i;:::-;2001:38;;1702:342;;;;;;;;;;;;:::o;3961:826:40:-;1350:19:27;:17;:19::i;:::-;4145:23:40::1;4171:51;4190:21;4213:8;4171:18;:51::i;:::-;4258:14:::0;;4238:35:::1;::::0;;::::1;;::::0;;;:19:::1;:35;::::0;;;;;;;:52;;::::1;::::0;;;;;;;4145:77;;-1:-1:-1;4238:52:40::1;;4237:53;4229:83;;;;;;;;;;;;;;;;;4347:15;4326:36;;:8;:17;;;:36;;;4318:69;;;;;;;;;;;;;;;;;4457:82;4497:15;4514:8;:24;;;4464:8;:18;;;4457:39;;;;:82;;;;;:::i;:::-;4615:167;;;;;;;;4663:4;4615:167;;;;;;4682:8;:18;;;4615:167;;;;;;4748:8;:27;;;4721:8;:24;;;:54;;;;:::i;:::-;4615:167:::0;;4581:31:::1;::::0;;::::1;;::::0;;;:14:::1;:31;::::0;;;;;;;;:201;;;;;;::::1;::::0;;;;;;::::1;;::::0;;;::::1;::::0;;;::::1;::::0;;;::::1;::::0;;;::::1;::::0;;::::1;::::0;-1:-1:-1;4581:201:40;;::::1;::::0;-1:-1:-1;;3961:826:40:o;5333:218::-;5398:22;;;5390:53;;;;;;;;;;;;;;;;;5470:10;5450:31;;;;:19;:31;;;;;;;;;:41;;;;;;;;;;:48;;;;5494:4;5450:48;;;5510:36;5450:41;;5470:10;5510:36;;;5333:218;:::o;2692:303::-;1531:13:12;:11;:13::i;:::-;2803:35:40::1;::::0;::::1;2795:66;;;;;;;;;;;;;;;;;2868:46;::::0;::::1;;::::0;;;:23:::1;:46;::::0;;;;;;;;:55;;;::::1;::::0;::::1;;::::0;;::::1;::::0;;;2935;;4568:41:45;;;2935:55:40::1;::::0;4541:18:45;2935:55:40::1;;;;;;;2692:303:::0;;:::o;2543:215:12:-;1531:13;:11;:13::i;:::-;2627:22:::1;::::0;::::1;2623:91;;2672:31;::::0;::::1;::::0;;2700:1:::1;2672:31;::::0;::::1;632:74:45::0;605:18;;2672:31:12::1;;;;;;;;2623:91;2723:28;2742:8;2723:18;:28::i;1796:162::-:0;1684:7;1710:6;1855:23;1710:6;735:10:23;1855:23:12;1851:101;;1901:40;;;;;735:10:23;1901:40:12;;;632:74:45;605:18;;1901:40:12;456:256:45;1219:160:21;1328:43;;1343:14;15843:55:45;;;1328:43:21;;;15825:74:45;15915:18;;;15908:34;;;1301:71:21;;1321:5;;1343:14;;;;;15798:18:45;;1328:43:21;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1301:19;:71::i;:::-;1219:160;;;:::o;1878:128:27:-;1773:4;1796:7;;;;;;1939:61;;;1974:15;;;;;;;;;;;;;;5017:176:32;5094:7;5120:66;5153:20;:18;:20::i;:::-;5175:10;4049:4:33;4043:11;4079:10;4067:23;;4119:4;4110:14;;4103:39;;;;4171:4;4162:14;;4155:34;4227:4;4212:20;;;3874:374;1494:429:34;1600:4;1620:6;:18;;;1642:1;1620:23;1616:301;;1660:17;1679:22;1707:33;1724:4;1730:9;1707:16;:33::i;:::-;-1:-1:-1;1659:81:34;;-1:-1:-1;1659:81:34;-1:-1:-1;1768:26:34;1761:3;:33;;;;;;;;:::i;:::-;;:56;;;;;1811:6;1798:19;;:9;:19;;;1761:56;1754:63;;;;;;1616:301;1855:51;1882:6;1890:4;1896:9;1855:26;:51::i;:::-;1848:58;;;;3218:196:39;3311:51;:22;;;3334:4;3348;3355:6;3311:22;:51::i;:::-;3368:41;:18;;;3395:4;3402:6;3368:18;:41::i;3945:262:32:-;3998:7;4029:4;4021:28;4038:11;4021:28;;:63;;;;;4070:14;4053:13;:31;4021:63;4017:184;;;-1:-1:-1;4107:22:32;;3945:262::o;4017:184::-;4167:23;4304:80;;;2079:95;4304:80;;;21418:25:45;4326:11:32;21459:18:45;;;21452:34;;;;4339:14:32;21502:18:45;;;21495:34;4355:13:32;21545:18:45;;;21538:34;4378:4:32;21588:19:45;;;21581:84;4268:7:32;;21390:19:45;;4304:80:32;;;;;;;;;;;;4294:91;;;;;;4287:98;;4213:179;;2586:117:27;1597:16;:14;:16::i;:::-;2654:5:::1;2644:15:::0;;;::::1;::::0;;2674:22:::1;735:10:23::0;2683:12:27::1;2674:22;::::0;662:42:45;650:55;;;632:74;;620:2;605:18;2674:22:27::1;;;;;;;2586:117::o:0;8609:436:40:-;8758:7;8880:160;8924:21;8955:54;8977:21;9000:8;8955:21;:54::i;:::-;4780:4:19;4774:11;9027:4:40;4814::19;4805:14;;4798:32;4866:34;4859:4;4850:14;;4843:58;-1:-1:-1;4921:14:19;;4914:38;;;;4977:42;4965:55;;5049:4;5040:14;;5033:28;5123:4;5116;5107:14;;5097:31;5090:4;5081:14;;5074:55;5185:4;5178;5169:14;;;5159:31;5192:42;5155:80;;4549:702;2414:652:39;2586:4;2568:23;;:6;:23;;;2560:49;;;;;;;;;;;;;;;;;2616:36;:18;;;2643:4;2650:1;2616:18;:36::i;:::-;2685:16;;;2699:1;2685:16;;;;;;;;;2659:23;;2685:16;;;;;;;;;-1:-1:-1;;2734:16:39;;;2748:1;2734:16;;;;;;;;;2659:42;;-1:-1:-1;2707:24:39;;2734:16;-1:-1:-1;2734:16:39;;;;;;;;;-1:-1:-1;;2793:16:39;;;2807:1;2793:16;;;;;;;;;2707:43;;-1:-1:-1;2756:34:39;;2793:16;-1:-1:-1;2793:16:39;;;;;;;;;;;-1:-1:-1;2793:16:39;2756:53;;2836:5;2816:6;2823:1;2816:9;;;;;;;;:::i;:::-;;;;;;:26;;;;;;;;;;;2861:6;2848:7;2856:1;2848:10;;;;;;;;:::i;:::-;;;;;;:19;;;;;2896:1;2873:17;2891:1;2873:20;;;;;;;;:::i;:::-;;;;;;;;;;:24;2904:157;;;;;:14;:4;:14;;;;:157;;2934:4;;2947:6;;2961:7;;2976:17;;2934:4;;3022:12;;;;927:4;;2904:157;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2554:512;;;2414:652;;;;;:::o;2912:187:12:-;2985:16;3004:6;;;3020:17;;;;;;;;;;3052:40;;3004:6;;;;;;;3052:40;;2985:16;3052:40;2975:124;2912:187;:::o;2339:115:27:-;1350:19;:17;:19::i;:::-;2398:7:::1;:14:::0;;;::::1;::::0;::::1;::::0;;2427:20:::1;2434:12;735:10:23::0;;656:96;6105:126:32;6151:13;6183:41;:5;6210:13;6183:26;:41::i;6557:135::-;6606:13;6638:47;:8;6668:16;6638:29;:47::i;7185:241:40:-;7367:37;;;;;7257:4;;7367:23;:6;:23;;;;:37;;7391:12;;7367:37;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;7417:4:40;;7185:241;-1:-1:-1;;;;;7185:241:40:o;7740:865::-;7893:46;;;7870:7;7893:46;;;:23;:46;;;;;;;;7885:82;;;;;;;;;;;;;;;;;8046:12;8061:54;8083:21;8106:8;8061:21;:54::i;:::-;4780:4:19;4774:11;8239:4:40;4814::19;4805:14;;4798:32;4866:34;4859:4;4850:14;;4843:58;-1:-1:-1;4921:14:19;;4914:38;;;4977:42;4965:55;;5049:4;5040:14;;5033:28;;;5123:4;5116;5107:14;;5097:31;5090:4;5081:14;;5074:55;5185:4;5178;5169:14;;;5159:31;5033:28;;-1:-1:-1;5192:42:19;5155:80;8264:27:40;;:32;8256:68;;;;;;;;;;;;;;;;;8384:54;8410:21;8433:4;8384:25;:54::i;:::-;8514:57;;;;;8366:72;;-1:-1:-1;8514:47:40;;;;;;:57;;8562:8;;8514:57;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;8585:15:40;;7740:865;-1:-1:-1;;;;;;;7740:865:40:o;8370:720:21:-;8450:18;8478:19;8616:4;8613:1;8606:4;8600:11;8593:4;8587;8583:15;8580:1;8573:5;8566;8561:60;8673:7;8663:176;;8717:4;8711:11;8762:16;8759:1;8754:3;8739:40;8808:16;8803:3;8796:29;8663:176;-1:-1:-1;;8916:1:21;8910:8;8866:16;;-1:-1:-1;8942:15:21;;:68;;8994:11;9009:1;8994:16;;8942:68;;;8960:26;;;;:31;8942:68;8938:146;;;9033:40;;;;;662:42:45;650:55;;9033:40:21;;;632:74:45;605:18;;9033:40:21;456:256:45;8938:146:21;8440:650;;8370:720;;:::o;2129:778:31:-;2232:17;2251:16;2269:14;2299:9;:16;2319:2;2299:22;2295:606;;2604:4;2589:20;;2583:27;2653:4;2638:20;;2632:27;2710:4;2695:20;;2689:27;2337:9;2681:36;2751:25;2762:4;2681:36;2583:27;2632;2751:10;:25::i;:::-;2744:32;;;;;;;;;;;2295:606;-1:-1:-1;;2872:16:31;;2823:1;;-1:-1:-1;2827:35:31;;2295:606;2129:778;;;;;:::o;2330:458:34:-;2473:4;2490:12;2504:19;2527:6;:17;;2601:4;2607:9;2558:60;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;2527:101;;;2558:60;2527:101;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2489:139;;;;2646:7;:42;;;;;2686:2;2669:6;:13;:19;;2646:42;:134;;;;-1:-1:-1;2704:29:34;;2745:34;;2704:29;;;;;;;;;;;;:::i;:::-;:76;;2330:458;-1:-1:-1;;;;;;2330:458:34:o;1618:188:21:-;1745:53;;1760:18;20647:55:45;;;1745:53:21;;;20629:74:45;20739:55;;;20719:18;;;20712:83;20811:18;;;20804:34;;;1718:81:21;;1738:5;;1760:18;;;;;20602::45;;1745:53:21;20427:417:45;5084:380:21;5199:47;;;5214:13;15843:55:45;;5199:47:21;;;15825:74:45;15915:18;;;;15908:34;;;5199:47:21;;;;;;;;;;15798:18:45;;;;5199:47:21;;;;;;;;;;;;;;5262:44;5214:13;5199:47;5262:23;:44::i;:::-;5257:201;;5349:43;;5364:13;15843:55:45;;;5349:43:21;;;15825:74:45;5389:1:21;15915:18:45;;;15908:34;5322:71:21;;5342:5;;5364:13;;;;;15798:18:45;;5349:43:21;15651:297:45;5322:71:21;5407:40;5427:5;5434:12;5407:19;:40::i;2078:126:27:-;1773:4;1796:7;;;;;;2136:62;;2172:15;;;;;;;;;;;;;;9049:604:40;9187:7;9256:21;9289:8;:14;;;9315:8;:18;;;9345:8;:17;;;9374:8;:19;;;9405:8;:18;;;9435:8;:13;;;9460:8;:16;;;9488:8;:24;;;9524:8;:27;;;9563:8;:28;;;9603:8;:27;;;9234:406;;;;;;;;;;;;;;;;;;22163:42:45;22151:55;;;22133:74;;22243:55;;;22238:2;22223:18;;22216:83;22335:55;;;22330:2;22315:18;;22308:83;22427:55;;;;22422:2;22407:18;;22400:83;22514:3;22499:19;;22492:35;;;;22558:3;22543:19;;22536:35;;;;22602:3;22587:19;;22580:35;22646:3;22631:19;;22624:35;22690:3;22675:19;;22668:35;22734:3;22719:19;;22712:35;;;;22778:3;22763:19;;22756:36;;;;22823:3;22808:19;;22801:36;;;;22120:3;22105:19;;21676:1167;9234:406:40;;;;;;;;;;;;;9215:433;;;;;;9202:446;;9049:604;;;;:::o;3368:267:28:-;3462:13;1390:66;3491:46;;3487:142;;3560:15;3569:5;3560:8;:15::i;:::-;3553:22;;;;3487:142;3613:5;3606:12;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2870:169:19;2954:16;2989:43;3008:14;3024:4;3030:1;2989:18;:43::i;5203:1551:31:-;5329:17;;;6283:66;6270:79;;6266:164;;;-1:-1:-1;6381:1:31;;-1:-1:-1;6385:30:31;;-1:-1:-1;6417:1:31;6365:54;;6266:164;6541:24;;;6524:14;6541:24;;;;;;;;;23517:25:45;;;23590:4;23578:17;;23558:18;;;23551:45;;;;23612:18;;;23605:34;;;23655:18;;;23648:34;;;6541:24:31;;23489:19:45;;6541:24:31;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;6541:24:31;;;;;;-1:-1:-1;;6579:20:31;;;6575:113;;-1:-1:-1;6631:1:31;;-1:-1:-1;6635:29:31;;-1:-1:-1;6631:1:31;;-1:-1:-1;6615:62:31;;6575:113;6706:6;-1:-1:-1;6714:20:31;;-1:-1:-1;6714:20:31;;-1:-1:-1;5203:1551:31;;;;;;;;;:::o;9592:480:21:-;9675:4;9691:12;9713:18;9741:19;9875:4;9872:1;9865:4;9859:11;9852:4;9846;9842:15;9839:1;9832:5;9825;9820:60;9809:71;;9907:16;9893:30;;9957:1;9951:8;9936:23;;9985:7;:80;;;;-1:-1:-1;9997:15:21;;:67;;10048:11;10063:1;10048:16;9997:67;;;10044:1;10023:5;10015:26;;;:30;9997:67;9978:87;9592:480;-1:-1:-1;;;;;;9592:480:21:o;2078:378:28:-;2137:13;2162:11;2176:16;2187:4;2176:10;:16::i;:::-;2300:14;;;2311:2;2300:14;;;;;;;;;2162:30;;-1:-1:-1;2280:17:28;;2300:14;;;;;;;;;-1:-1:-1;;;2363:16:28;;;-1:-1:-1;2408:4:28;2399:14;;2392:28;;;;-1:-1:-1;2363:16:28;2078:378::o;3465:974:19:-;3594:16;3650:5;3626:21;:29;3622:123;;;3678:56;;;;;3705:21;3678:56;;;23867:25:45;23908:18;;;23901:34;;;23840:18;;3678:56:19;23693:248:45;3622:123:19;4031:48;4013:14;4007:4;4003:25;3997:4;3993:36;3990:90;3984:4;3977:104;4238:32;4221:14;4215:4;4211:25;4208:63;4202:4;4195:77;4324:4;4318;4312;4305:5;4297:32;4285:44;-1:-1:-1;4352:22:19;;;4348:85;;4397:25;;;;;;;;;;;;;;2528:245:28;2589:7;2661:4;2625:40;;2688:2;2679:11;;2675:69;;;2713:20;;;;;;;;;;;;;;14:162:45;108:42;101:5;97:54;90:5;87:65;77:93;;166:1;163;156:12;181:270;255:6;308:2;296:9;287:7;283:23;279:32;276:52;;;324:1;321;314:12;276:52;363:9;350:23;382:39;415:5;382:39;:::i;717:142::-;785:20;;814:39;785:20;814:39;:::i;:::-;717:142;;;:::o;864:184::-;916:77;913:1;906:88;1013:4;1010:1;1003:15;1037:4;1034:1;1027:15;1053:250;1120:2;1114:9;1162:6;1150:19;;1199:18;1184:34;;1220:22;;;1181:62;1178:88;;;1246:18;;:::i;:::-;1282:2;1275:22;1053:250;:::o;1308:163::-;1375:20;;1435:10;1424:22;;1414:33;;1404:61;;1461:1;1458;1451:12;1476:160;1541:20;;1597:13;;1590:21;1580:32;;1570:60;;1626:1;1623;1616:12;1641:863;1683:5;1736:3;1729:4;1721:6;1717:17;1713:27;1703:55;;1754:1;1751;1744:12;1703:55;1794:6;1781:20;1824:18;1816:6;1813:30;1810:56;;;1846:18;;:::i;:::-;1915:2;1909:9;1981:4;1969:17;;2062:66;1965:90;;;2057:2;1961:99;1957:172;1945:185;;2160:18;2145:34;;2181:22;;;2142:62;2139:88;;;2207:18;;:::i;:::-;2243:2;2236:22;2267;;;2308:19;;;2329:4;2304:30;2301:39;-1:-1:-1;2298:59:45;;;2353:1;2350;2343:12;2298:59;2417:6;2410:4;2402:6;2398:17;2391:4;2383:6;2379:17;2366:58;2472:1;2444:19;;;2465:4;2440:30;2433:41;;;;2448:6;1641:863;-1:-1:-1;;;1641:863:45:o;2509:1914::-;2617:6;2625;2633;2677:9;2668:7;2664:23;2707:3;2703:2;2699:12;2696:32;;;2724:1;2721;2714:12;2696:32;2763:9;2750:23;2782:39;2815:5;2782:39;:::i;:::-;2840:5;-1:-1:-1;2938:6:45;2869:66;2861:75;;2857:88;2854:108;;;2958:1;2955;2948:12;2854:108;;2986:17;;:::i;:::-;3028:38;3062:2;3051:9;3047:18;3028:38;:::i;:::-;3019:7;3012:55;3101:38;3135:2;3124:9;3120:18;3101:38;:::i;:::-;3096:2;3087:7;3083:16;3076:64;3174:38;3208:2;3197:9;3193:18;3174:38;:::i;:::-;3169:2;3156:16;;3149:64;3286:3;3271:19;;;3258:33;3320:2;3307:16;;3300:33;3406:3;3391:19;;3378:33;3427:17;;;3420:34;3489:38;3522:3;3507:19;;3489:38;:::i;:::-;3483:3;3470:17;;3463:65;3601:3;3586:19;;;3573:33;3635:3;3622:17;;3615:34;3722:3;3707:19;;;3694:33;3743:17;;;3736:34;;;;3843:3;3828:19;;3815:33;3864:17;;;3857:34;3926:36;3957:3;3942:19;;3926:36;:::i;:::-;3920:3;3907:17;;3900:63;4036:3;4021:19;;;4008:33;4070:3;4057:17;;4050:34;4157:6;4142:22;;4129:36;4181:17;;;4174:34;3911:7;-1:-1:-1;4285:3:45;4270:19;;4257:33;4313:18;4302:30;;4299:50;;;4345:1;4342;4335:12;4299:50;4368:49;4409:7;4400:6;4389:9;4385:22;4368:49;:::i;:::-;4358:59;;;2509:1914;;;;;:::o;5312:1765::-;5412:6;5420;5464:9;5455:7;5451:23;5494:3;5490:2;5486:12;5483:32;;;5511:1;5508;5501:12;5483:32;5550:9;5537:23;5569:39;5602:5;5569:39;:::i;:::-;5627:5;-1:-1:-1;5725:6:45;5656:66;5648:75;;5644:88;5641:108;;;5745:1;5742;5735:12;5641:108;;5773:17;;:::i;:::-;5815:38;5849:2;5838:9;5834:18;5815:38;:::i;:::-;5806:7;5799:55;5888:38;5922:2;5911:9;5907:18;5888:38;:::i;:::-;5883:2;5874:7;5870:16;5863:64;5961:38;5995:2;5984:9;5980:18;5961:38;:::i;:::-;5956:2;5947:7;5943:16;5936:64;6034:39;6068:3;6057:9;6053:19;6034:39;:::i;:::-;6029:2;6016:16;;6009:65;6147:3;6132:19;;;6119:33;6181:3;6168:17;;6161:34;6268:3;6253:19;;;6240:33;6289:17;;;6282:34;;;;6389:3;6374:19;;;6361:33;6410:17;;;6403:34;;;;6510:3;6495:19;;;6482:33;6531:17;;;6524:34;;;;6631:3;6616:19;;;6603:33;6652:17;;;6645:34;;;;6752:3;6737:19;;;6724:33;6773:17;;;6766:34;;;;6873:3;6858:19;;;6845:33;6894:17;;;6887:34;;;;6994:6;6979:22;;;6966:36;7018:17;;;7011:34;;;;-1:-1:-1;5312:1765:45;6020:7;;-1:-1:-1;5312:1765:45:o;7445:347::-;7496:8;7506:6;7560:3;7553:4;7545:6;7541:17;7537:27;7527:55;;7578:1;7575;7568:12;7527:55;-1:-1:-1;7601:20:45;;7644:18;7633:30;;7630:50;;;7676:1;7673;7666:12;7630:50;7713:4;7705:6;7701:17;7689:29;;7765:3;7758:4;7749:6;7741;7737:19;7733:30;7730:39;7727:59;;;7782:1;7779;7772:12;7727:59;7445:347;;;;;:::o;7797:837::-;7909:6;7917;7925;7933;7941;7994:3;7982:9;7973:7;7969:23;7965:33;7962:53;;;8011:1;8008;8001:12;7962:53;8050:9;8037:23;8069:39;8102:5;8069:39;:::i;:::-;8127:5;-1:-1:-1;8184:2:45;8169:18;;8156:32;8197:41;8156:32;8197:41;:::i;:::-;8257:7;-1:-1:-1;8337:2:45;8322:18;;8309:32;;-1:-1:-1;8418:2:45;8403:18;;8390:32;8445:18;8434:30;;8431:50;;;8477:1;8474;8467:12;8431:50;8516:58;8566:7;8557:6;8546:9;8542:22;8516:58;:::i;:::-;7797:837;;;;-1:-1:-1;7797:837:45;;-1:-1:-1;8593:8:45;;8490:84;7797:837;-1:-1:-1;;;7797:837:45:o;9526:348::-;9568:3;9606:5;9600:12;9633:6;9628:3;9621:19;9689:6;9682:4;9675:5;9671:16;9664:4;9659:3;9655:14;9649:47;9741:1;9734:4;9725:6;9720:3;9716:16;9712:27;9705:38;9863:4;9793:66;9788:2;9780:6;9776:15;9772:88;9767:3;9763:98;9759:109;9752:116;;;9526:348;;;;:::o;9879:420::-;9932:3;9970:5;9964:12;9997:6;9992:3;9985:19;10029:4;10024:3;10020:14;10013:21;;10068:4;10061:5;10057:16;10091:1;10101:173;10115:6;10112:1;10109:13;10101:173;;;10176:13;;10164:26;;10219:4;10210:14;;;;10247:17;;;;10137:1;10130:9;10101:173;;;-1:-1:-1;10290:3:45;;9879:420;-1:-1:-1;;;;9879:420:45:o;10304:996::-;10701:66;10693:6;10689:79;10678:9;10671:98;10805:3;10800:2;10789:9;10785:18;10778:31;10652:4;10832:46;10873:3;10862:9;10858:19;10850:6;10832:46;:::i;:::-;10926:9;10918:6;10914:22;10909:2;10898:9;10894:18;10887:50;10960:33;10986:6;10978;10960:33;:::i;:::-;10946:47;;11029:6;11024:2;11013:9;11009:18;11002:34;11085:42;11077:6;11073:55;11067:3;11056:9;11052:19;11045:84;11166:6;11160:3;11149:9;11145:19;11138:35;11222:9;11214:6;11210:22;11204:3;11193:9;11189:19;11182:51;11250:44;11287:6;11279;11250:44;:::i;:::-;11242:52;10304:996;-1:-1:-1;;;;;;;;;;10304:996:45:o;11305:404::-;11373:6;11381;11434:2;11422:9;11413:7;11409:23;11405:32;11402:52;;;11450:1;11447;11440:12;11402:52;11489:9;11476:23;11508:39;11541:5;11508:39;:::i;:::-;11566:5;-1:-1:-1;11623:2:45;11608:18;;11595:32;11636:41;11595:32;11636:41;:::i;:::-;11696:7;11686:17;;;11305:404;;;;;:::o;11714:367::-;11777:8;11787:6;11841:3;11834:4;11826:6;11822:17;11818:27;11808:55;;11859:1;11856;11849:12;11808:55;-1:-1:-1;11882:20:45;;11925:18;11914:30;;11911:50;;;11957:1;11954;11947:12;11911:50;11994:4;11986:6;11982:17;11970:29;;12054:3;12047:4;12037:6;12034:1;12030:14;12022:6;12018:27;12014:38;12011:47;12008:67;;;12071:1;12068;12061:12;12086:1547;12273:6;12281;12289;12297;12305;12313;12321;12329;12337;12390:3;12378:9;12369:7;12365:23;12361:33;12358:53;;;12407:1;12404;12397:12;12358:53;12447:9;12434:23;12480:18;12472:6;12469:30;12466:50;;;12512:1;12509;12502:12;12466:50;12551:70;12613:7;12604:6;12593:9;12589:22;12551:70;:::i;:::-;12640:8;;-1:-1:-1;12525:96:45;-1:-1:-1;;12728:2:45;12713:18;;12700:32;12757:18;12744:32;;12741:52;;;12789:1;12786;12779:12;12741:52;12828:72;12892:7;12881:8;12870:9;12866:24;12828:72;:::i;:::-;12919:8;;-1:-1:-1;12802:98:45;-1:-1:-1;;13007:2:45;12992:18;;12979:32;13036:18;13023:32;;13020:52;;;13068:1;13065;13058:12;13020:52;13107:72;13171:7;13160:8;13149:9;13145:24;13107:72;:::i;:::-;13198:8;;-1:-1:-1;13081:98:45;-1:-1:-1;;13283:2:45;13268:18;;13255:32;13296:39;13255:32;13296:39;:::i;:::-;13354:5;-1:-1:-1;13412:3:45;13397:19;;13384:33;13442:18;13429:32;;13426:52;;;13474:1;13471;13464:12;13426:52;13513:60;13565:7;13554:8;13543:9;13539:24;13513:60;:::i;:::-;13487:86;;13592:8;13582:18;;;13619:8;13609:18;;;12086:1547;;;;;;;;;;;:::o;13638:323::-;13703:6;13711;13764:2;13752:9;13743:7;13739:23;13735:32;13732:52;;;13780:1;13777;13770:12;13732:52;13819:9;13806:23;13838:39;13871:5;13838:39;:::i;:::-;13896:5;-1:-1:-1;13920:35:45;13951:2;13936:18;;13920:35;:::i;:::-;13910:45;;13638:323;;;;;:::o;13966:184::-;14036:6;14089:2;14077:9;14068:7;14064:23;14060:32;14057:52;;;14105:1;14102;14095:12;14057:52;-1:-1:-1;14128:16:45;;13966:184;-1:-1:-1;13966:184:45:o;14155:289::-;14255:6;14308:2;14296:9;14287:7;14283:23;14279:32;14276:52;;;14324:1;14321;14314:12;14276:52;14356:9;14350:16;14375:39;14408:5;14375:39;:::i;15367:279::-;15432:9;;;15453:10;;;15450:190;;;15496:77;15493:1;15486:88;15597:4;15594:1;15587:15;15625:4;15622:1;15615:15;15953:184;16005:77;16002:1;15995:88;16102:4;16099:1;16092:15;16126:4;16123:1;16116:15;16142:184;16194:77;16191:1;16184:88;16291:4;16288:1;16281:15;16315:4;16312:1;16305:15;16331:325;16419:6;16414:3;16407:19;16471:6;16464:5;16457:4;16452:3;16448:14;16435:43;;16523:1;16516:4;16507:6;16502:3;16498:16;16494:27;16487:38;16389:3;16645:4;16575:66;16570:2;16562:6;16558:15;16554:88;16549:3;16545:98;16541:109;16534:116;;16331:325;;;;:::o;16756:1512::-;17192:4;17240:3;17229:9;17225:19;17283:42;17275:6;17271:55;17260:9;17253:74;17363:3;17358:2;17347:9;17343:18;17336:31;17387:6;17422;17416:13;17453:6;17445;17438:22;17491:3;17480:9;17476:19;17469:26;;17530:2;17522:6;17518:15;17504:29;;17551:1;17561:218;17575:6;17572:1;17569:13;17561:218;;;17640:13;;17655:42;17636:62;17624:75;;17728:2;17754:15;;;;17719:12;;;;17597:1;17590:9;17561:218;;;17565:3;;17824:9;17819:3;17815:19;17810:2;17799:9;17795:18;17788:47;17858:41;17895:3;17887:6;17858:41;:::i;:::-;17844:55;;;17947:9;17939:6;17935:22;17930:2;17919:9;17915:18;17908:50;17981:44;18018:6;18010;17981:44;:::i;:::-;7159:42;7148:54;;18076:3;18061:19;;7136:67;17967:58;-1:-1:-1;18130:9:45;18122:6;18118:22;18112:3;18101:9;18097:19;18090:51;18158:49;18200:6;18192;18184;18158:49;:::i;:::-;18150:57;;;18216:46;18257:3;18246:9;18242:19;18234:6;16737;16726:18;16714:31;;16661:90;18273:218;18420:2;18409:9;18402:21;18383:4;18440:45;18481:2;18470:9;18466:18;18458:6;18440:45;:::i;18496:1137::-;18726:13;;7159:42;7148:54;7136:67;;18694:3;18679:19;;18798:4;18790:6;18786:17;18780:24;18813:54;18861:4;18850:9;18846:20;18832:12;7159:42;7148:54;7136:67;;7082:127;18813:54;;18916:4;18908:6;18904:17;18898:24;18931:56;18981:4;18970:9;18966:20;18950:14;7159:42;7148:54;7136:67;;7082:127;18931:56;;19036:4;19028:6;19024:17;19018:24;19051:56;19101:4;19090:9;19086:20;19070:14;7159:42;7148:54;7136:67;;7082:127;19051:56;;19163:4;19155:6;19151:17;19145:24;19138:4;19127:9;19123:20;19116:54;19226:4;19218:6;19214:17;19208:24;19201:4;19190:9;19186:20;19179:54;19289:4;19281:6;19277:17;19271:24;19264:4;19253:9;19249:20;19242:54;19352:4;19344:6;19340:17;19334:24;19327:4;19316:9;19312:20;19305:54;19417:6;19409;19405:19;19399:26;19390:6;19379:9;19375:22;19368:58;19484:6;19476;19472:19;19466:26;19457:6;19446:9;19442:22;19435:58;19551:6;19543;19539:19;19533:26;19524:6;19513:9;19509:22;19502:58;19618:6;19610;19606:19;19600:26;19591:6;19580:9;19576:22;19569:58;18496:1137;;;;:::o;19638:289::-;19813:6;19802:9;19795:25;19856:2;19851;19840:9;19836:18;19829:30;19776:4;19876:45;19917:2;19906:9;19902:18;19894:6;19876:45;:::i;:::-;19868:53;19638:289;-1:-1:-1;;;;19638:289:45:o;19932:301::-;20061:3;20099:6;20093:13;20145:6;20138:4;20130:6;20126:17;20121:3;20115:37;20207:1;20171:16;;20196:13;;;-1:-1:-1;20171:16:45;19932:301;-1:-1:-1;19932:301:45:o;22848:437::-;22927:1;22923:12;;;;22970;;;22991:61;;23045:4;23037:6;23033:17;23023:27;;22991:61;23098:2;23090:6;23087:14;23067:18;23064:38;23061:218;;23135:77;23132:1;23125:88;23236:4;23233:1;23226:15;23264:4;23261:1;23254:15;23061:218;;22848:437;;;:::o","linkReferences":{},"cborAuxdata":{"1":{"value":"0xa164736f6c634300081c000a","offset":10899}},"immutableReferences":{"5913":[{"start":4225,"length":32}],"5915":[{"start":4183,"length":32}],"5917":[{"start":4141,"length":32}],"5919":[{"start":4306,"length":32}],"5921":[{"start":4346,"length":32}],"5924":[{"start":5532,"length":32}],"5927":[{"start":5577,"length":32}],"10082":[{"start":709,"length":32},{"start":1319,"length":32},{"start":2282,"length":32},{"start":4079,"length":32},{"start":4679,"length":32},{"start":4838,"length":32},{"start":5175,"length":32}],"10366":[{"start":521,"length":32}],"10370":[{"start":560,"length":32},{"start":2023,"length":32},{"start":5678,"length":32}]},"transformations":[{"id":"10366","type":"replace","offset":521,"reason":"immutable"},{"id":"10370","type":"replace","offset":560,"reason":"immutable"},{"id":"10082","type":"replace","offset":709,"reason":"immutable"},{"id":"10082","type":"replace","offset":1319,"reason":"immutable"},{"id":"10370","type":"replace","offset":2023,"reason":"immutable"},{"id":"10082","type":"replace","offset":2282,"reason":"immutable"},{"id":"10082","type":"replace","offset":4079,"reason":"immutable"},{"id":"5917","type":"replace","offset":4141,"reason":"immutable"},{"id":"5915","type":"replace","offset":4183,"reason":"immutable"},{"id":"5913","type":"replace","offset":4225,"reason":"immutable"},{"id":"5919","type":"replace","offset":4306,"reason":"immutable"},{"id":"5921","type":"replace","offset":4346,"reason":"immutable"},{"id":"10082","type":"replace","offset":4679,"reason":"immutable"},{"id":"10082","type":"replace","offset":4838,"reason":"immutable"},{"id":"10082","type":"replace","offset":5175,"reason":"immutable"},{"id":"5924","type":"replace","offset":5532,"reason":"immutable"},{"id":"5927","type":"replace","offset":5577,"reason":"immutable"},{"id":"10370","type":"replace","offset":5678,"reason":"immutable"}],"transformationValues":{"immutables":{"5913":"0xc80442d9ad9af65b1ef289d0d63e27803e42585c930314fd4a38e9fde2b14abd","5915":"0x0000000000000000000000000000000000000000000000000000000000000001","5917":"0x000000000000000000000000decc46a4b09162f5369c5c80383aaa9159bcf192","5919":"0xecf8efb847a395668c83db182da25f83b4e23191261ce0d86ee34d77602eb951","5921":"0xc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6","5924":"0x41617665563341646170746572466163746f7279000000000000000000000014","5927":"0x3100000000000000000000000000000000000000000000000000000000000001","10082":"0x00000000000000000000000087870bca3f3fd6335c3f4ce8392d69350b4fa4e2","10366":"0x0000000000000000000000009008d19f58aabd9ed0d60971565aa8510560ab41","10370":"0x0000000000000000000000009da8b48441583a2b93e2ef8213aad0ec0b392c69"}}},"deployment":{"transactionHash":"0x12842b16e307d9b98269cdde2397860ed4684e5f69e9eaafc789ab9f894ac497","blockNumber":"23812751","transactionIndex":"183","deployer":"0xDF0A18F9bE8CEcC1d4fdE078d99EE2ed4885aC5E"},"sources":{"src/interfaces/IBaseAdapterFactory.sol":{"content":"// SPDX-License-Identifier: UNLICENSED\n// Copyright (c) 2025 Aave Labs\npragma solidity ^0.8.0;\n\nimport {IFlashLoanRouter} from 'cowprotocol/flash-loan-router/interface/IFlashLoanRouter.sol';\nimport {ICowSettlement} from 'cowprotocol/flash-loan-router/interface/ICowSettlement.sol';\nimport {GPv2Order} from 'cowprotocol/contracts/libraries/GPv2Order.sol';\n\nimport {DataTypes} from 'src/libraries/DataTypes.sol';\n\n/// @notice Adapter Factory Base interface.\n/// @author Aave Labs.\ninterface IBaseAdapterFactory {\n  /// @notice Thrown when the caller is not an Instance deployed by the Factory.\n  error CallerNotInstance();\n\n  /// @notice Thrown when the caller is not the Router.\n  error CallerNotRouter();\n\n  /// @notice Thrown when the specified amount is null.\n  error InvalidZeroAmount();\n\n  /// @notice Thrown when the specified address is the zero address.\n  error InvalidZeroAddress();\n\n  /// @notice Thrown when the specified implementation is already listed.\n  error ImplementationAlreadyListed();\n\n  /// @notice Thrown when the specified implementation is not active.\n  error ImplementationNotActive();\n\n  /// @notice Thrown when the Instance is not initialized.\n  error InstanceNotInitialized();\n\n  /// @notice Thrown when the Instance is already deployed.\n  error InstanceAlreadyDeployed();\n\n  /// @notice Thrown when the order receiver is invalid.\n  error InvalidOrderReceiver();\n\n  /// @notice Thrown when the specified lender is not the valid one for the Factory.\n  error InvalidLender();\n\n  /// @notice Thrown when the calling Instance has nothing to repay.\n  error NothingToRepay();\n\n  /// @notice Thrown when the order has been cancelled by the user.\n  error InstanceCancelled();\n\n  /// @notice Emitted when an AdapterHook Implementations status is updated.\n  event SetAdapterImplementation(address indexed adapterImplementation, bool active);\n\n  /// @notice Emitted when an Instance owner cancels it.\n  event CancelInstance(address indexed user, address indexed instanceAddress);\n\n  /// @notice Settlement contract.\n  function SETTLEMENT_CONTRACT() external view returns (ICowSettlement);\n\n  /// @notice FlashLoanRouter contract.\n  function ROUTER() external view returns (IFlashLoanRouter);\n\n  /// @notice Returns the domain separator used in the EIP712 encoding of the AdapterOrderSig struct.\n  /// @return The domain separator.\n  function DOMAIN_SEPARATOR() external view returns (bytes32);\n\n  /// @notice Notifies the AdapterFactory that a FlashLoan is ready to be repaid.\n  function notifyRepayFlashLoan() external;\n\n  /// @notice Deploys an Adapter Instance and transfers the FlashLoaned assets to it (must have been initiated before).\n  /// @param adapterImplementation The address of the Adapter Instance implementation to clone.\n  /// @param hookData The HookOrderData struct containing the order details & postHook parameters.\n  function deployAndTransferFlashLoan(\n    address adapterImplementation,\n    DataTypes.HookOrderData memory hookData\n  ) external;\n\n  /// @notice Cancels an Adapter Instance to be deployed by the Factory.\n  /// @dev This is used to cancel a pending EIP-1271 Order before it is executed, by blocking the deployment of the Instance.\n  /// @param instance The address of the Adapter Instance to cancel.\n  function cancelInstance(address instance) external;\n\n  /// @notice Returns the determined address of an Adapter Instance to clone based on a specific Order.\n  /// @param adapterImplementation The address of the Adapter Implementation to clone.\n  /// @param hookData The HookOrderData struct containing the order details & postHook parameters.\n  /// @return The determined address of the Adapter Instance.\n  function getInstanceDeterministicAddress(\n    address adapterImplementation,\n    DataTypes.HookOrderData memory hookData\n  ) external view returns (address);\n\n  /// @notice Verifies that the signature provided for an Order using an Adapter is valid.\n  /// @param orderOwner The address of the owner of the Order.\n  /// @param order The Order data to verify.\n  /// @param signature The signature to verify.\n  /// @return True if the signature is valid, false otherwise.\n  function verifyOrderSignature(\n    address orderOwner,\n    GPv2Order.Data memory order,\n    bytes memory signature\n  ) external view returns (bool);\n\n  /// @notice Sets the status of an AdapterHook Implementation.\n  /// @param adapterImplementation The address of the Adapter Implementation.\n  /// @param active True to activate, false to deactivate.\n  function setAdapterImplementation(address adapterImplementation, bool active) external;\n}\n"},"src/contracts/AaveV3AdapterFactory.sol":{"content":"// SPDX-License-Identifier: UNLICENSED\n// Copyright (c) 2025 Aave Labs\npragma solidity 0.8.28;\n\nimport {IERC20} from 'openzeppelin/token/ERC20/IERC20.sol';\nimport {SafeERC20} from 'openzeppelin/token/ERC20/utils/SafeERC20.sol';\n\nimport {IPool} from 'aave-v3-origin/contracts/interfaces/IPool.sol';\nimport {IFlashLoanReceiver} from 'aave-v3-origin/contracts/misc/flashloan/interfaces/IFlashLoanReceiver.sol';\nimport {IPoolAddressesProvider} from 'aave-v3-origin/contracts/interfaces/IPoolAddressesProvider.sol';\n\nimport {BaseAdapterFactory} from 'src/contracts/BaseAdapterFactory.sol';\n\n/// @notice Factory contract to deploy listed AdapterHooks linked to Cow Orders & draw Flashloans from the Aave V3 Pool.\n/// @author Aave Labs.\ncontract AaveV3AdapterFactory is BaseAdapterFactory, IFlashLoanReceiver {\n  using SafeERC20 for IERC20;\n\n  /// @dev Referral code to pass to the Aave Pool\n  uint16 private constant REFERRAL_CODE = 4300;\n\n  /// @inheritdoc IFlashLoanReceiver\n  IPool public immutable POOL;\n\n  /// @notice Thrown when the caller is not the Aave Pool.\n  error CallerNotAavePool();\n\n  /// @dev Constructor.\n  /// @param aavePool_ The address of the Aave V3 Pool contract.\n  /// @param settlement_ The address of the Cow Settlement contract.\n  /// @param router_ The address of the Cow FlashLoan Router contract.\n  /// @param owner_ The address of the owner of the Factory.\n  constructor(\n    address aavePool_,\n    address settlement_,\n    address router_,\n    address owner_\n  ) BaseAdapterFactory(settlement_, router_, owner_, 'AaveV3AdapterFactory', '1') {\n    require(aavePool_ != address(0), InvalidZeroAddress());\n    POOL = IPool(aavePool_);\n  }\n\n  /// @inheritdoc IFlashLoanReceiver\n  function executeOperation(\n    address[] calldata /*assets*/,\n    uint256[] calldata /*amounts*/,\n    uint256[] calldata /*premiums*/,\n    address /*initiator*/,\n    bytes calldata callbackData\n  ) external virtual returns (bool) {\n    require(msg.sender == address(POOL), CallerNotAavePool());\n    return _executeFlashLoan(callbackData);\n  }\n\n  /// @inheritdoc IFlashLoanReceiver\n  function ADDRESSES_PROVIDER() external view returns (IPoolAddressesProvider) {\n    return POOL.ADDRESSES_PROVIDER();\n  }\n\n  /// @inheritdoc BaseAdapterFactory\n  /// @dev Sets the allowance to the Aave Pool to 0 so the FlashLoan cannot be repaid until notified to.\n  /// @dev And then triggers the FlashLoan from the Aave Pool.\n  function _triggerFlashLoan(\n    address lender,\n    IERC20 token,\n    uint256 amount,\n    bytes calldata callbackData\n  ) internal override {\n    require(lender == address(POOL), InvalidLender());\n\n    token.forceApprove(address(POOL), 0);\n\n    address[] memory assets = new address[](1);\n    uint256[] memory amounts = new uint256[](1);\n    uint256[] memory interestRateModes = new uint256[](1);\n\n    assets[0] = address(token);\n    amounts[0] = amount;\n    interestRateModes[0] = 0;\n\n    POOL.flashLoan(\n      address(this),\n      assets,\n      amounts,\n      interestRateModes,\n      address(this),\n      callbackData,\n      REFERRAL_CODE\n    );\n  }\n\n  /// @inheritdoc BaseAdapterFactory\n  /// @dev Repays the flashLoan by retrieving the assets (and any fees) and giving allowance to the Aave Pool.\n  function _repayFlashLoan(IERC20 asset, address from, uint256 amount) internal override {\n    asset.safeTransferFrom(from, address(this), amount);\n    asset.forceApprove(address(POOL), amount);\n  }\n}\n"},"lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.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.3.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        _callOptionalReturn(token, abi.encodeCall(token.transfer, (to, value)));\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        _callOptionalReturn(token, abi.encodeCall(token.transferFrom, (from, to, value)));\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 _callOptionalReturnBool(token, abi.encodeCall(token.transfer, (to, value)));\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 _callOptionalReturnBool(token, abi.encodeCall(token.transferFrom, (from, to, value)));\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        bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value));\n\n        if (!_callOptionalReturnBool(token, approvalCall)) {\n            _callOptionalReturn(token, abi.encodeCall(token.approve, (spender, 0)));\n            _callOptionalReturn(token, approvalCall);\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 rely 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 rely 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     * Opposedly, 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 high-level call (i.e. a regular function call to a contract), relaxing the requirement\n     * on the return value: the return value is optional (but if data is returned, it must not be false).\n     * @param token The token targeted by the call.\n     * @param data The call data (encoded using abi.encode or one of its variants).\n     *\n     * This is a variant of {_callOptionalReturnBool} that reverts if call fails to meet the requirements.\n     */\n    function _callOptionalReturn(IERC20 token, bytes memory data) private {\n        uint256 returnSize;\n        uint256 returnValue;\n        assembly (\"memory-safe\") {\n            let success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\n            // bubble errors\n            if iszero(success) {\n                let ptr := mload(0x40)\n                returndatacopy(ptr, 0, returndatasize())\n                revert(ptr, returndatasize())\n            }\n            returnSize := returndatasize()\n            returnValue := mload(0)\n        }\n\n        if (returnSize == 0 ? address(token).code.length == 0 : returnValue != 1) {\n            revert SafeERC20FailedOperation(address(token));\n        }\n    }\n\n    /**\n     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n     * on the return value: the return value is optional (but if data is returned, it must not be false).\n     * @param token The token targeted by the call.\n     * @param data The call data (encoded using abi.encode or one of its variants).\n     *\n     * This is a variant of {_callOptionalReturn} that silently catches all reverts and returns a bool instead.\n     */\n    function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\n        bool success;\n        uint256 returnSize;\n        uint256 returnValue;\n        assembly (\"memory-safe\") {\n            success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\n            returnSize := returndatasize()\n            returnValue := mload(0)\n        }\n        return success && (returnSize == 0 ? address(token).code.length > 0 : returnValue == 1);\n    }\n}\n"},"lib/aave-v3-origin/src/contracts/interfaces/IPool.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {IPoolAddressesProvider} from './IPoolAddressesProvider.sol';\nimport {DataTypes} from '../protocol/libraries/types/DataTypes.sol';\n\n/**\n * @title IPool\n * @author Aave\n * @notice Defines the basic interface for an Aave Pool.\n */\ninterface IPool {\n  /**\n   * @dev Emitted on supply()\n   * @param reserve The address of the underlying asset of the reserve\n   * @param user The address initiating the supply\n   * @param onBehalfOf The beneficiary of the supply, receiving the aTokens\n   * @param amount The amount supplied\n   * @param referralCode The referral code used\n   */\n  event Supply(\n    address indexed reserve,\n    address user,\n    address indexed onBehalfOf,\n    uint256 amount,\n    uint16 indexed referralCode\n  );\n\n  /**\n   * @dev Emitted on withdraw()\n   * @param reserve The address of the underlying asset being withdrawn\n   * @param user The address initiating the withdrawal, owner of aTokens\n   * @param to The address that will receive the underlying\n   * @param amount The amount to be withdrawn\n   */\n  event Withdraw(address indexed reserve, address indexed user, address indexed to, uint256 amount);\n\n  /**\n   * @dev Emitted on borrow() and flashLoan() when debt needs to be opened\n   * @param reserve The address of the underlying asset being borrowed\n   * @param user The address of the user initiating the borrow(), receiving the funds on borrow() or just\n   * initiator of the transaction on flashLoan()\n   * @param onBehalfOf The address that will be getting the debt\n   * @param amount The amount borrowed out\n   * @param interestRateMode The rate mode: 2 for Variable, 1 is deprecated (changed on v3.2.0)\n   * @param borrowRate The numeric rate at which the user has borrowed, expressed in ray\n   * @param referralCode The referral code used\n   */\n  event Borrow(\n    address indexed reserve,\n    address user,\n    address indexed onBehalfOf,\n    uint256 amount,\n    DataTypes.InterestRateMode interestRateMode,\n    uint256 borrowRate,\n    uint16 indexed referralCode\n  );\n\n  /**\n   * @dev Emitted on repay()\n   * @param reserve The address of the underlying asset of the reserve\n   * @param user The beneficiary of the repayment, getting his debt reduced\n   * @param repayer The address of the user initiating the repay(), providing the funds\n   * @param amount The amount repaid\n   * @param useATokens True if the repayment is done using aTokens, `false` if done with underlying asset directly\n   */\n  event Repay(\n    address indexed reserve,\n    address indexed user,\n    address indexed repayer,\n    uint256 amount,\n    bool useATokens\n  );\n\n  /**\n   * @dev Emitted on borrow(), repay() and liquidationCall() when using isolated assets\n   * @param asset The address of the underlying asset of the reserve\n   * @param totalDebt The total isolation mode debt for the reserve\n   */\n  event IsolationModeTotalDebtUpdated(address indexed asset, uint256 totalDebt);\n\n  /**\n   * @dev Emitted when the user selects a certain asset category for eMode\n   * @param user The address of the user\n   * @param categoryId The category id\n   */\n  event UserEModeSet(address indexed user, uint8 categoryId);\n\n  /**\n   * @dev Emitted on setUserUseReserveAsCollateral()\n   * @param reserve The address of the underlying asset of the reserve\n   * @param user The address of the user enabling the usage as collateral\n   */\n  event ReserveUsedAsCollateralEnabled(address indexed reserve, address indexed user);\n\n  /**\n   * @dev Emitted on setUserUseReserveAsCollateral()\n   * @param reserve The address of the underlying asset of the reserve\n   * @param user The address of the user enabling the usage as collateral\n   */\n  event ReserveUsedAsCollateralDisabled(address indexed reserve, address indexed user);\n\n  /**\n   * @dev Emitted on flashLoan()\n   * @param target The address of the flash loan receiver contract\n   * @param initiator The address initiating the flash loan\n   * @param asset The address of the asset being flash borrowed\n   * @param amount The amount flash borrowed\n   * @param interestRateMode The flashloan mode: 0 for regular flashloan,\n   *        1 for Stable (Deprecated on v3.2.0), 2 for Variable\n   * @param premium The fee flash borrowed\n   * @param referralCode The referral code used\n   */\n  event FlashLoan(\n    address indexed target,\n    address initiator,\n    address indexed asset,\n    uint256 amount,\n    DataTypes.InterestRateMode interestRateMode,\n    uint256 premium,\n    uint16 indexed referralCode\n  );\n\n  /**\n   * @dev Emitted when a borrower is liquidated.\n   * @param collateralAsset The address of the underlying asset used as collateral, to receive as result of the liquidation\n   * @param debtAsset The address of the underlying borrowed asset to be repaid with the liquidation\n   * @param user The address of the borrower getting liquidated\n   * @param debtToCover The debt amount of borrowed `asset` the liquidator wants to cover\n   * @param liquidatedCollateralAmount The amount of collateral received by the liquidator\n   * @param liquidator The address of the liquidator\n   * @param receiveAToken True if the liquidators wants to receive the collateral aTokens, `false` if he wants\n   * to receive the underlying collateral asset directly\n   */\n  event LiquidationCall(\n    address indexed collateralAsset,\n    address indexed debtAsset,\n    address indexed user,\n    uint256 debtToCover,\n    uint256 liquidatedCollateralAmount,\n    address liquidator,\n    bool receiveAToken\n  );\n\n  /**\n   * @dev Emitted when the state of a reserve is updated.\n   * @param reserve The address of the underlying asset of the reserve\n   * @param liquidityRate The next liquidity rate\n   * @param stableBorrowRate The next stable borrow rate @note deprecated on v3.2.0\n   * @param variableBorrowRate The next variable borrow rate\n   * @param liquidityIndex The next liquidity index\n   * @param variableBorrowIndex The next variable borrow index\n   */\n  event ReserveDataUpdated(\n    address indexed reserve,\n    uint256 liquidityRate,\n    uint256 stableBorrowRate,\n    uint256 variableBorrowRate,\n    uint256 liquidityIndex,\n    uint256 variableBorrowIndex\n  );\n\n  /**\n   * @dev Emitted when the deficit of a reserve is covered.\n   * @param reserve The address of the underlying asset of the reserve\n   * @param caller The caller that triggered the DeficitCovered event\n   * @param amountCovered The amount of deficit covered\n   */\n  event DeficitCovered(address indexed reserve, address caller, uint256 amountCovered);\n\n  /**\n   * @dev Emitted when the protocol treasury receives minted aTokens from the accrued interest.\n   * @param reserve The address of the reserve\n   * @param amountMinted The amount minted to the treasury\n   */\n  event MintedToTreasury(address indexed reserve, uint256 amountMinted);\n\n  /**\n   * @dev Emitted when deficit is realized on a liquidation.\n   * @param user The user address where the bad debt will be burned\n   * @param debtAsset The address of the underlying borrowed asset to be burned\n   * @param amountCreated The amount of deficit created\n   */\n  event DeficitCreated(address indexed user, address indexed debtAsset, uint256 amountCreated);\n\n  /**\n   * @dev Emitted when a position manager is approved by the user.\n   * @param user The user address\n   * @param positionManager The address of the position manager\n   */\n  event PositionManagerApproved(address indexed user, address indexed positionManager);\n\n  /**\n   * @dev Emitted when a position manager is revoked by the user.\n   * @param user The user address\n   * @param positionManager The address of the position manager\n   */\n  event PositionManagerRevoked(address indexed user, address indexed positionManager);\n\n  /**\n   * @notice Supplies an `amount` of underlying asset into the reserve, receiving in return overlying aTokens.\n   * - E.g. User supplies 100 USDC and gets in return 100 aUSDC\n   * @param asset The address of the underlying asset to supply\n   * @param amount The amount to be supplied\n   * @param onBehalfOf The address that will receive the aTokens, same as msg.sender if the user\n   *   wants to receive them on his own wallet, or a different address if the beneficiary of aTokens\n   *   is a different wallet\n   * @param referralCode Code used to register the integrator originating the operation, for potential rewards.\n   *   0 if the action is executed directly by the user, without any middle-man\n   */\n  function supply(address asset, uint256 amount, address onBehalfOf, uint16 referralCode) external;\n\n  /**\n   * @notice Supply with transfer approval of asset to be supplied done via permit function\n   * see: https://eips.ethereum.org/EIPS/eip-2612 and https://eips.ethereum.org/EIPS/eip-713\n   * @param asset The address of the underlying asset to supply\n   * @param amount The amount to be supplied\n   * @param onBehalfOf The address that will receive the aTokens, same as msg.sender if the user\n   *   wants to receive them on his own wallet, or a different address if the beneficiary of aTokens\n   *   is a different wallet\n   * @param deadline The deadline timestamp that the permit is valid\n   * @param referralCode Code used to register the integrator originating the operation, for potential rewards.\n   *   0 if the action is executed directly by the user, without any middle-man\n   * @param permitV The V parameter of ERC712 permit sig\n   * @param permitR The R parameter of ERC712 permit sig\n   * @param permitS The S parameter of ERC712 permit sig\n   */\n  function supplyWithPermit(\n    address asset,\n    uint256 amount,\n    address onBehalfOf,\n    uint16 referralCode,\n    uint256 deadline,\n    uint8 permitV,\n    bytes32 permitR,\n    bytes32 permitS\n  ) external;\n\n  /**\n   * @notice Withdraws an `amount` of underlying asset from the reserve, burning the equivalent aTokens owned\n   * E.g. User has 100 aUSDC, calls withdraw() and receives 100 USDC, burning the 100 aUSDC\n   * @param asset The address of the underlying asset to withdraw\n   * @param amount The underlying amount to be withdrawn\n   *   - Send the value type(uint256).max in order to withdraw the whole aToken balance\n   * @param to The address that will receive the underlying, same as msg.sender if the user\n   *   wants to receive it on his own wallet, or a different address if the beneficiary is a\n   *   different wallet\n   * @return The final amount withdrawn\n   */\n  function withdraw(address asset, uint256 amount, address to) external returns (uint256);\n\n  /**\n   * @notice Allows users to borrow a specific `amount` of the reserve underlying asset, provided that the borrower\n   * already supplied enough collateral, or he was given enough allowance by a credit delegator on the VariableDebtToken\n   * - E.g. User borrows 100 USDC passing as `onBehalfOf` his own address, receiving the 100 USDC in his wallet\n   *   and 100 variable debt tokens\n   * @param asset The address of the underlying asset to borrow\n   * @param amount The amount to be borrowed\n   * @param interestRateMode 2 for Variable, 1 is deprecated on v3.2.0\n   * @param referralCode The code used to register the integrator originating the operation, for potential rewards.\n   *   0 if the action is executed directly by the user, without any middle-man\n   * @param onBehalfOf The address of the user who will receive the debt. Should be the address of the borrower itself\n   * calling the function if he wants to borrow against his own collateral, or the address of the credit delegator\n   * if he has been given credit delegation allowance\n   */\n  function borrow(\n    address asset,\n    uint256 amount,\n    uint256 interestRateMode,\n    uint16 referralCode,\n    address onBehalfOf\n  ) external;\n\n  /**\n   * @notice Repays a borrowed `amount` on a specific reserve, burning the equivalent debt tokens owned\n   * - E.g. User repays 100 USDC, burning 100 variable debt tokens of the `onBehalfOf` address\n   * @param asset The address of the borrowed underlying asset previously borrowed\n   * @param amount The amount to repay\n   * - Send the value type(uint256).max in order to repay the whole debt for `asset` on the specific `debtMode`\n   * @param interestRateMode 2 for Variable, 1 is deprecated on v3.2.0\n   * @param onBehalfOf The address of the user who will get his debt reduced/removed. Should be the address of the\n   * user calling the function if he wants to reduce/remove his own debt, or the address of any other\n   * other borrower whose debt should be removed\n   * @return The final amount repaid\n   */\n  function repay(\n    address asset,\n    uint256 amount,\n    uint256 interestRateMode,\n    address onBehalfOf\n  ) external returns (uint256);\n\n  /**\n   * @notice Repay with transfer approval of asset to be repaid done via permit function\n   * see: https://eips.ethereum.org/EIPS/eip-2612 and https://eips.ethereum.org/EIPS/eip-713\n   * @param asset The address of the borrowed underlying asset previously borrowed\n   * @param amount The amount to repay\n   * - Send the value type(uint256).max in order to repay the whole debt for `asset` on the specific `debtMode`\n   * @param interestRateMode 2 for Variable, 1 is deprecated on v3.2.0\n   * @param onBehalfOf Address of the user who will get his debt reduced/removed. Should be the address of the\n   * user calling the function if he wants to reduce/remove his own debt, or the address of any other\n   * other borrower whose debt should be removed\n   * @param deadline The deadline timestamp that the permit is valid\n   * @param permitV The V parameter of ERC712 permit sig\n   * @param permitR The R parameter of ERC712 permit sig\n   * @param permitS The S parameter of ERC712 permit sig\n   * @return The final amount repaid\n   */\n  function repayWithPermit(\n    address asset,\n    uint256 amount,\n    uint256 interestRateMode,\n    address onBehalfOf,\n    uint256 deadline,\n    uint8 permitV,\n    bytes32 permitR,\n    bytes32 permitS\n  ) external returns (uint256);\n\n  /**\n   * @notice Repays a borrowed `amount` on a specific reserve using the reserve aTokens, burning the\n   * equivalent debt tokens\n   * - E.g. User repays 100 USDC using 100 aUSDC, burning 100 variable debt tokens\n   * @dev  Passing uint256.max as amount will clean up any residual aToken dust balance, if the user aToken\n   * balance is not enough to cover the whole debt\n   * @param asset The address of the borrowed underlying asset previously borrowed\n   * @param amount The amount to repay\n   * - Send the value type(uint256).max in order to repay the whole debt for `asset` on the specific `debtMode`\n   * @param interestRateMode DEPRECATED in v3.2.0\n   * @return The final amount repaid\n   */\n  function repayWithATokens(\n    address asset,\n    uint256 amount,\n    uint256 interestRateMode\n  ) external returns (uint256);\n\n  /**\n   * @notice Allows suppliers to enable/disable a specific supplied asset as collateral\n   * @param asset The address of the underlying asset supplied\n   * @param useAsCollateral True if the user wants to use the supply as collateral, false otherwise\n   */\n  function setUserUseReserveAsCollateral(address asset, bool useAsCollateral) external;\n\n  /**\n   * @notice Function to liquidate a non-healthy position collateral-wise, with Health Factor below 1\n   * - The caller (liquidator) covers `debtToCover` amount of debt of the user getting liquidated, and receives\n   *   a proportionally amount of the `collateralAsset` plus a bonus to cover market risk\n   * @param collateralAsset The address of the underlying asset used as collateral, to receive as result of the liquidation\n   * @param debtAsset The address of the underlying borrowed asset to be repaid with the liquidation\n   * @param borrower The address of the borrower getting liquidated\n   * @param debtToCover The debt amount of borrowed `asset` the liquidator wants to cover\n   * @param receiveAToken True if the liquidators wants to receive the collateral aTokens, `false` if he wants\n   * to receive the underlying collateral asset directly\n   */\n  function liquidationCall(\n    address collateralAsset,\n    address debtAsset,\n    address borrower,\n    uint256 debtToCover,\n    bool receiveAToken\n  ) external;\n\n  /**\n   * @notice Allows smartcontracts to access the liquidity of the pool within one transaction,\n   * as long as the amount taken plus a fee is returned.\n   * @dev IMPORTANT There are security concerns for developers of flashloan receiver contracts that must be kept\n   * into consideration. For further details please visit https://docs.aave.com/developers/\n   * @param receiverAddress The address of the contract receiving the funds, implementing IFlashLoanReceiver interface\n   * @param assets The addresses of the assets being flash-borrowed\n   * @param amounts The amounts of the assets being flash-borrowed\n   * @param interestRateModes Types of the debt to open if the flash loan is not returned:\n   *   0 -> Don't open any debt, just revert if funds can't be transferred from the receiver\n   *   1 -> Deprecated on v3.2.0\n   *   2 -> Open debt at variable rate for the value of the amount flash-borrowed to the `onBehalfOf` address\n   * @param onBehalfOf The address  that will receive the debt in the case of using 2 on `modes`\n   * @param params Variadic packed params to pass to the receiver as extra information\n   * @param referralCode The code used to register the integrator originating the operation, for potential rewards.\n   *   0 if the action is executed directly by the user, without any middle-man\n   */\n  function flashLoan(\n    address receiverAddress,\n    address[] calldata assets,\n    uint256[] calldata amounts,\n    uint256[] calldata interestRateModes,\n    address onBehalfOf,\n    bytes calldata params,\n    uint16 referralCode\n  ) external;\n\n  /**\n   * @notice Allows smartcontracts to access the liquidity of the pool within one transaction,\n   * as long as the amount taken plus a fee is returned.\n   * @dev IMPORTANT There are security concerns for developers of flashloan receiver contracts that must be kept\n   * into consideration. For further details please visit https://docs.aave.com/developers/\n   * @param receiverAddress The address of the contract receiving the funds, implementing IFlashLoanSimpleReceiver interface\n   * @param asset The address of the asset being flash-borrowed\n   * @param amount The amount of the asset being flash-borrowed\n   * @param params Variadic packed params to pass to the receiver as extra information\n   * @param referralCode The code used to register the integrator originating the operation, for potential rewards.\n   *   0 if the action is executed directly by the user, without any middle-man\n   */\n  function flashLoanSimple(\n    address receiverAddress,\n    address asset,\n    uint256 amount,\n    bytes calldata params,\n    uint16 referralCode\n  ) external;\n\n  /**\n   * @notice Returns the user account data across all the reserves\n   * @param user The address of the user\n   * @return totalCollateralBase The total collateral of the user in the base currency used by the price feed\n   * @return totalDebtBase The total debt of the user in the base currency used by the price feed\n   * @return availableBorrowsBase The borrowing power left of the user in the base currency used by the price feed\n   * @return currentLiquidationThreshold The liquidation threshold of the user\n   * @return ltv The loan to value of The user\n   * @return healthFactor The current health factor of the user\n   */\n  function getUserAccountData(\n    address user\n  )\n    external\n    view\n    returns (\n      uint256 totalCollateralBase,\n      uint256 totalDebtBase,\n      uint256 availableBorrowsBase,\n      uint256 currentLiquidationThreshold,\n      uint256 ltv,\n      uint256 healthFactor\n    );\n\n  /**\n   * @notice Initializes a reserve, activating it, assigning an aToken and debt tokens\n   * @dev Only callable by the PoolConfigurator contract\n   * @param asset The address of the underlying asset of the reserve\n   * @param aTokenAddress The address of the aToken that will be assigned to the reserve\n   * @param variableDebtAddress The address of the VariableDebtToken that will be assigned to the reserve\n   */\n  function initReserve(address asset, address aTokenAddress, address variableDebtAddress) external;\n\n  /**\n   * @notice Drop a reserve\n   * @dev Only callable by the PoolConfigurator contract\n   * @dev Does not reset eMode flags, which must be considered when reusing the same reserve id for a different reserve.\n   * @param asset The address of the underlying asset of the reserve\n   */\n  function dropReserve(address asset) external;\n\n  /**\n   * @notice Accumulates interest to all indexes of the reserve\n   * @dev Only callable by the PoolConfigurator contract\n   * @dev To be used when required by the configurator, for example when updating interest rates strategy data\n   * @param asset The address of the underlying asset of the reserve\n   */\n  function syncIndexesState(address asset) external;\n\n  /**\n   * @notice Updates interest rates on the reserve data\n   * @dev Only callable by the PoolConfigurator contract\n   * @dev To be used when required by the configurator, for example when updating interest rates strategy data\n   * @param asset The address of the underlying asset of the reserve\n   */\n  function syncRatesState(address asset) external;\n\n  /**\n   * @notice Sets the configuration bitmap of the reserve as a whole\n   * @dev Only callable by the PoolConfigurator contract\n   * @param asset The address of the underlying asset of the reserve\n   * @param configuration The new configuration bitmap\n   */\n  function setConfiguration(\n    address asset,\n    DataTypes.ReserveConfigurationMap calldata configuration\n  ) external;\n\n  /**\n   * @notice Returns the configuration of the reserve\n   * @param asset The address of the underlying asset of the reserve\n   * @return The configuration of the reserve\n   */\n  function getConfiguration(\n    address asset\n  ) external view returns (DataTypes.ReserveConfigurationMap memory);\n\n  /**\n   * @notice Returns the configuration of the user across all the reserves\n   * @param user The user address\n   * @return The configuration of the user\n   */\n  function getUserConfiguration(\n    address user\n  ) external view returns (DataTypes.UserConfigurationMap memory);\n\n  /**\n   * @notice Returns the normalized income of the reserve\n   * @param asset The address of the underlying asset of the reserve\n   * @return The reserve's normalized income\n   */\n  function getReserveNormalizedIncome(address asset) external view returns (uint256);\n\n  /**\n   * @notice Returns the normalized variable debt per unit of asset\n   * @dev WARNING: This function is intended to be used primarily by the protocol itself to get a\n   * \"dynamic\" variable index based on time, current stored index and virtual rate at the current\n   * moment (approx. a borrower would get if opening a position). This means that is always used in\n   * combination with variable debt supply/balances.\n   * If using this function externally, consider that is possible to have an increasing normalized\n   * variable debt that is not equivalent to how the variable debt index would be updated in storage\n   * (e.g. only updates with non-zero variable debt supply)\n   * @param asset The address of the underlying asset of the reserve\n   * @return The reserve normalized variable debt\n   */\n  function getReserveNormalizedVariableDebt(address asset) external view returns (uint256);\n\n  /**\n   * @notice Returns the state and configuration of the reserve\n   * @param asset The address of the underlying asset of the reserve\n   * @return The state and configuration data of the reserve\n   */\n  function getReserveData(address asset) external view returns (DataTypes.ReserveDataLegacy memory);\n\n  /**\n   * @notice Returns the virtual underlying balance of the reserve\n   * @param asset The address of the underlying asset of the reserve\n   * @return The reserve virtual underlying balance\n   */\n  function getVirtualUnderlyingBalance(address asset) external view returns (uint128);\n\n  /**\n   * @notice Validates and finalizes an aToken transfer\n   * @dev Only callable by the overlying aToken of the `asset`\n   * @param asset The address of the underlying asset of the aToken\n   * @param from The user from which the aTokens are transferred\n   * @param to The user receiving the aTokens\n   * @param scaledAmount The scaled amount being transferred/withdrawn\n   * @param scaledBalanceFromBefore The aToken scaled balance of the `from` user before the transfer\n   * @param scaledBalanceToBefore The aToken scaled balance of the `to` user before the transfer\n   */\n  function finalizeTransfer(\n    address asset,\n    address from,\n    address to,\n    uint256 scaledAmount,\n    uint256 scaledBalanceFromBefore,\n    uint256 scaledBalanceToBefore\n  ) external;\n\n  /**\n   * @notice Returns the list of the underlying assets of all the initialized reserves\n   * @dev It does not include dropped reserves\n   * @return The addresses of the underlying assets of the initialized reserves\n   */\n  function getReservesList() external view returns (address[] memory);\n\n  /**\n   * @notice Returns the number of initialized reserves\n   * @dev It includes dropped reserves\n   * @return The count\n   */\n  function getReservesCount() external view returns (uint256);\n\n  /**\n   * @notice Returns the address of the underlying asset of a reserve by the reserve id as stored in the DataTypes.ReserveData struct\n   * @param id The id of the reserve as stored in the DataTypes.ReserveData struct\n   * @return The address of the reserve associated with id\n   */\n  function getReserveAddressById(uint16 id) external view returns (address);\n\n  /**\n   * @notice Returns the PoolAddressesProvider connected to this contract\n   * @return The address of the PoolAddressesProvider\n   */\n  function ADDRESSES_PROVIDER() external view returns (IPoolAddressesProvider);\n\n  /**\n   * @notice Returns the ReserveInterestRateStrategy connected to all the reserves\n   * @return The address of the ReserveInterestRateStrategy contract\n   */\n  function RESERVE_INTEREST_RATE_STRATEGY() external view returns (address);\n\n  /**\n   * @notice Updates flash loan premium. All this premium is collected by the protocol treasury.\n   * @dev The premium is calculated on the total borrowed amount\n   * @dev Only callable by the PoolConfigurator contract\n   * @param flashLoanPremium The flash loan premium, expressed in bps\n   */\n  function updateFlashloanPremium(uint128 flashLoanPremium) external;\n\n  /**\n   * @notice Configures a new or alters an existing collateral configuration of an eMode.\n   * @dev In eMode, the protocol allows very high borrowing power to borrow assets of the same category.\n   * The category 0 is reserved as it's the default for volatile assets\n   * @param id The id of the category\n   * @param config The configuration of the category\n   */\n  function configureEModeCategory(\n    uint8 id,\n    DataTypes.EModeCategoryBaseConfiguration memory config\n  ) external;\n\n  /**\n   * @notice Replaces the current eMode collateralBitmap.\n   * @param id The id of the category\n   * @param collateralBitmap The collateralBitmap of the category\n   */\n  function configureEModeCategoryCollateralBitmap(uint8 id, uint128 collateralBitmap) external;\n\n  /**\n   * @notice Replaces the current eMode borrowableBitmap.\n   * @param id The id of the category\n   * @param borrowableBitmap The borrowableBitmap of the category\n   */\n  function configureEModeCategoryBorrowableBitmap(uint8 id, uint128 borrowableBitmap) external;\n\n  /**\n   * @notice Returns the data of an eMode category\n   * @dev DEPRECATED use independent getters instead\n   * @param id The id of the category\n   * @return The configuration data of the category\n   */\n  function getEModeCategoryData(\n    uint8 id\n  ) external view returns (DataTypes.EModeCategoryLegacy memory);\n\n  /**\n   * @notice Returns the label of an eMode category\n   * @param id The id of the category\n   * @return The label of the category\n   */\n  function getEModeCategoryLabel(uint8 id) external view returns (string memory);\n\n  /**\n   * @notice Returns the collateral config of an eMode category\n   * @param id The id of the category\n   * @return The ltv,lt,lb of the category\n   */\n  function getEModeCategoryCollateralConfig(\n    uint8 id\n  ) external view returns (DataTypes.CollateralConfig memory);\n\n  /**\n   * @notice Returns the collateralBitmap of an eMode category\n   * @param id The id of the category\n   * @return The collateralBitmap of the category\n   */\n  function getEModeCategoryCollateralBitmap(uint8 id) external view returns (uint128);\n\n  /**\n   * @notice Returns the borrowableBitmap of an eMode category\n   * @param id The id of the category\n   * @return The borrowableBitmap of the category\n   */\n  function getEModeCategoryBorrowableBitmap(uint8 id) external view returns (uint128);\n\n  /**\n   * @notice Allows a user to use the protocol in eMode\n   * @param categoryId The id of the category\n   */\n  function setUserEMode(uint8 categoryId) external;\n\n  /**\n   * @notice Returns the eMode the user is using\n   * @param user The address of the user\n   * @return The eMode id\n   */\n  function getUserEMode(address user) external view returns (uint256);\n\n  /**\n   * @notice Resets the isolation mode total debt of the given asset to zero\n   * @dev It requires the given asset has zero debt ceiling\n   * @param asset The address of the underlying asset to reset the isolationModeTotalDebt\n   */\n  function resetIsolationModeTotalDebt(address asset) external;\n\n  /**\n   * @notice Sets the liquidation grace period of the given asset\n   * @dev To enable a liquidation grace period, a timestamp in the future should be set,\n   *      To disable a liquidation grace period, any timestamp in the past works, like 0\n   * @param asset The address of the underlying asset to set the liquidationGracePeriod\n   * @param until Timestamp when the liquidation grace period will end\n   **/\n  function setLiquidationGracePeriod(address asset, uint40 until) external;\n\n  /**\n   * @notice Returns the liquidation grace period of the given asset\n   * @param asset The address of the underlying asset\n   * @return Timestamp when the liquidation grace period will end\n   **/\n  function getLiquidationGracePeriod(address asset) external view returns (uint40);\n\n  /**\n   * @notice Returns the total fee on flash loans.\n   * @dev From v3.4 all flashloan fees will be send to the treasury.\n   * @return The total fee on flashloans\n   */\n  function FLASHLOAN_PREMIUM_TOTAL() external view returns (uint128);\n\n  /**\n   * @notice Returns the part of the flashloan fees sent to protocol\n   * @dev From v3.4 all flashloan fees will be send to the treasury and this value\n   *      is always 100_00.\n   * @return The flashloan fee sent to the protocol treasury\n   */\n  function FLASHLOAN_PREMIUM_TO_PROTOCOL() external view returns (uint128);\n\n  /**\n   * @notice Returns the maximum number of reserves supported to be listed in this Pool\n   * @return The maximum number of reserves supported\n   */\n  function MAX_NUMBER_RESERVES() external view returns (uint16);\n\n  /**\n   * @notice Mints the assets accrued through the reserve factor to the treasury in the form of aTokens\n   * @param assets The list of reserves for which the minting needs to be executed\n   */\n  function mintToTreasury(address[] calldata assets) external;\n\n  /**\n   * @notice Rescue and transfer tokens locked in this contract\n   * @param token The address of the token\n   * @param to The address of the recipient\n   * @param amount The amount of token to transfer\n   */\n  function rescueTokens(address token, address to, uint256 amount) external;\n\n  /**\n   * @notice Supplies an `amount` of underlying asset into the reserve, receiving in return overlying aTokens.\n   * - E.g. User supplies 100 USDC and gets in return 100 aUSDC\n   * @dev Deprecated: Use the `supply` function instead\n   * @param asset The address of the underlying asset to supply\n   * @param amount The amount to be supplied\n   * @param onBehalfOf The address that will receive the aTokens, same as msg.sender if the user\n   *   wants to receive them on his own wallet, or a different address if the beneficiary of aTokens\n   *   is a different wallet\n   * @param referralCode Code used to register the integrator originating the operation, for potential rewards.\n   *   0 if the action is executed directly by the user, without any middle-man\n   */\n  function deposit(address asset, uint256 amount, address onBehalfOf, uint16 referralCode) external;\n\n  /**\n   * @notice It covers the deficit of a specified reserve by burning the equivalent aToken `amount` for assets\n   * @dev The deficit of a reserve can occur due to situations where borrowed assets are not repaid, leading to bad debt.\n   * @param asset The address of the underlying asset to cover the deficit.\n   * @param amount The amount to be covered, in aToken\n   * @return The amount of tokens burned\n   */\n  function eliminateReserveDeficit(address asset, uint256 amount) external returns (uint256);\n\n  /**\n   * @notice Approves or disapproves a position manager. This position manager will be able\n   * to call the `setUserUseReserveAsCollateralOnBehalfOf` and the\n   * `setUserEModeOnBehalfOf` function on behalf of the user.\n   * @param positionManager The address of the position manager\n   * @param approve True if the position manager should be approved, false otherwise\n   */\n  function approvePositionManager(address positionManager, bool approve) external;\n\n  /**\n   * @notice Renounces a position manager role for a given user.\n   * @param user The address of the user\n   */\n  function renouncePositionManagerRole(address user) external;\n\n  /**\n   * @notice Sets the use as collateral flag for the user on the specific reserve on behalf of the user.\n   * @param asset The address of the underlying asset of the reserve\n   * @param useAsCollateral True if the user wants to use the reserve as collateral, false otherwise\n   * @param onBehalfOf The address of the user\n   */\n  function setUserUseReserveAsCollateralOnBehalfOf(\n    address asset,\n    bool useAsCollateral,\n    address onBehalfOf\n  ) external;\n\n  /**\n   * @notice Sets the eMode category for the user on the specific reserve on behalf of the user.\n   * @param categoryId The id of the category\n   * @param onBehalfOf The address of the user\n   */\n  function setUserEModeOnBehalfOf(uint8 categoryId, address onBehalfOf) external;\n\n  /*\n   * @notice Returns true if the `positionManager` address is approved to use the position manager role on behalf of the user.\n   * @param user The address of the user\n   * @param positionManager The address of the position manager\n   * @return True if the user is approved to use the position manager, false otherwise\n   */\n  function isApprovedPositionManager(\n    address user,\n    address positionManager\n  ) external view returns (bool);\n\n  /**\n   * @notice Returns the current deficit of a reserve.\n   * @param asset The address of the underlying asset of the reserve\n   * @return The current deficit of the reserve\n   */\n  function getReserveDeficit(address asset) external view returns (uint256);\n\n  /**\n   * @notice Returns the aToken address of a reserve.\n   * @param asset The address of the underlying asset of the reserve\n   * @return The address of the aToken\n   */\n  function getReserveAToken(address asset) external view returns (address);\n\n  /**\n   * @notice Returns the variableDebtToken address of a reserve.\n   * @param asset The address of the underlying asset of the reserve\n   * @return The address of the variableDebtToken\n   */\n  function getReserveVariableDebtToken(address asset) external view returns (address);\n\n  /**\n   * @notice Gets the address of the external FlashLoanLogic\n   */\n  function getFlashLoanLogic() external view returns (address);\n\n  /**\n   * @notice Gets the address of the external BorrowLogic\n   */\n  function getBorrowLogic() external view returns (address);\n\n  /**\n   * @notice Gets the address of the external EModeLogic\n   */\n  function getEModeLogic() external view returns (address);\n\n  /**\n   * @notice Gets the address of the external LiquidationLogic\n   */\n  function getLiquidationLogic() external view returns (address);\n\n  /**\n   * @notice Gets the address of the external PoolLogic\n   */\n  function getPoolLogic() external view returns (address);\n\n  /**\n   * @notice Gets the address of the external SupplyLogic\n   */\n  function getSupplyLogic() external view returns (address);\n}\n"},"lib/aave-v3-origin/src/contracts/misc/flashloan/interfaces/IFlashLoanReceiver.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {IPoolAddressesProvider} from '../../../interfaces/IPoolAddressesProvider.sol';\nimport {IPool} from '../../../interfaces/IPool.sol';\n\n/**\n * @title IFlashLoanReceiver\n * @author Aave\n * @notice Defines the basic interface of a flashloan-receiver contract.\n * @dev Implement this interface to develop a flashloan-compatible flashLoanReceiver contract\n */\ninterface IFlashLoanReceiver {\n  /**\n   * @notice Executes an operation after receiving the flash-borrowed assets\n   * @dev Ensure that the contract can return the debt + premium, e.g., has\n   *      enough funds to repay and has approved the Pool to pull the total amount\n   * @param assets The addresses of the flash-borrowed assets\n   * @param amounts The amounts of the flash-borrowed assets\n   * @param premiums The fee of each flash-borrowed asset\n   * @param initiator The address of the flashloan initiator\n   * @param params The byte-encoded params passed when initiating the flashloan\n   * @return True if the execution of the operation succeeds, false otherwise\n   */\n  function executeOperation(\n    address[] calldata assets,\n    uint256[] calldata amounts,\n    uint256[] calldata premiums,\n    address initiator,\n    bytes calldata params\n  ) external returns (bool);\n\n  function ADDRESSES_PROVIDER() external view returns (IPoolAddressesProvider);\n\n  function POOL() external view returns (IPool);\n}\n"},"lib/aave-v3-origin/src/contracts/interfaces/IPoolAddressesProvider.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n/**\n * @title IPoolAddressesProvider\n * @author Aave\n * @notice Defines the basic interface for a Pool Addresses Provider.\n */\ninterface IPoolAddressesProvider {\n  /**\n   * @dev Emitted when the market identifier is updated.\n   * @param oldMarketId The old id of the market\n   * @param newMarketId The new id of the market\n   */\n  event MarketIdSet(string indexed oldMarketId, string indexed newMarketId);\n\n  /**\n   * @dev Emitted when the pool is updated.\n   * @param oldAddress The old address of the Pool\n   * @param newAddress The new address of the Pool\n   */\n  event PoolUpdated(address indexed oldAddress, address indexed newAddress);\n\n  /**\n   * @dev Emitted when the pool configurator is updated.\n   * @param oldAddress The old address of the PoolConfigurator\n   * @param newAddress The new address of the PoolConfigurator\n   */\n  event PoolConfiguratorUpdated(address indexed oldAddress, address indexed newAddress);\n\n  /**\n   * @dev Emitted when the price oracle is updated.\n   * @param oldAddress The old address of the PriceOracle\n   * @param newAddress The new address of the PriceOracle\n   */\n  event PriceOracleUpdated(address indexed oldAddress, address indexed newAddress);\n\n  /**\n   * @dev Emitted when the ACL manager is updated.\n   * @param oldAddress The old address of the ACLManager\n   * @param newAddress The new address of the ACLManager\n   */\n  event ACLManagerUpdated(address indexed oldAddress, address indexed newAddress);\n\n  /**\n   * @dev Emitted when the ACL admin is updated.\n   * @param oldAddress The old address of the ACLAdmin\n   * @param newAddress The new address of the ACLAdmin\n   */\n  event ACLAdminUpdated(address indexed oldAddress, address indexed newAddress);\n\n  /**\n   * @dev Emitted when the price oracle sentinel is updated.\n   * @param oldAddress The old address of the PriceOracleSentinel\n   * @param newAddress The new address of the PriceOracleSentinel\n   */\n  event PriceOracleSentinelUpdated(address indexed oldAddress, address indexed newAddress);\n\n  /**\n   * @dev Emitted when the pool data provider is updated.\n   * @param oldAddress The old address of the PoolDataProvider\n   * @param newAddress The new address of the PoolDataProvider\n   */\n  event PoolDataProviderUpdated(address indexed oldAddress, address indexed newAddress);\n\n  /**\n   * @dev Emitted when a new proxy is created.\n   * @param id The identifier of the proxy\n   * @param proxyAddress The address of the created proxy contract\n   * @param implementationAddress The address of the implementation contract\n   */\n  event ProxyCreated(\n    bytes32 indexed id,\n    address indexed proxyAddress,\n    address indexed implementationAddress\n  );\n\n  /**\n   * @dev Emitted when a new non-proxied contract address is registered.\n   * @param id The identifier of the contract\n   * @param oldAddress The address of the old contract\n   * @param newAddress The address of the new contract\n   */\n  event AddressSet(bytes32 indexed id, address indexed oldAddress, address indexed newAddress);\n\n  /**\n   * @dev Emitted when the implementation of the proxy registered with id is updated\n   * @param id The identifier of the contract\n   * @param proxyAddress The address of the proxy contract\n   * @param oldImplementationAddress The address of the old implementation contract\n   * @param newImplementationAddress The address of the new implementation contract\n   */\n  event AddressSetAsProxy(\n    bytes32 indexed id,\n    address indexed proxyAddress,\n    address oldImplementationAddress,\n    address indexed newImplementationAddress\n  );\n\n  /**\n   * @notice Returns the id of the Aave market to which this contract points to.\n   * @return The market id\n   */\n  function getMarketId() external view returns (string memory);\n\n  /**\n   * @notice Associates an id with a specific PoolAddressesProvider.\n   * @dev This can be used to create an onchain registry of PoolAddressesProviders to\n   * identify and validate multiple Aave markets.\n   * @param newMarketId The market id\n   */\n  function setMarketId(string calldata newMarketId) external;\n\n  /**\n   * @notice Returns an address by its identifier.\n   * @dev The returned address might be an EOA or a contract, potentially proxied\n   * @dev It returns ZERO if there is no registered address with the given id\n   * @param id The id\n   * @return The address of the registered for the specified id\n   */\n  function getAddress(bytes32 id) external view returns (address);\n\n  /**\n   * @notice General function to update the implementation of a proxy registered with\n   * certain `id`. If there is no proxy registered, it will instantiate one and\n   * set as implementation the `newImplementationAddress`.\n   * @dev IMPORTANT Use this function carefully, only for ids that don't have an explicit\n   * setter function, in order to avoid unexpected consequences\n   * @param id The id\n   * @param newImplementationAddress The address of the new implementation\n   */\n  function setAddressAsProxy(bytes32 id, address newImplementationAddress) external;\n\n  /**\n   * @notice Sets an address for an id replacing the address saved in the addresses map.\n   * @dev IMPORTANT Use this function carefully, as it will do a hard replacement\n   * @param id The id\n   * @param newAddress The address to set\n   */\n  function setAddress(bytes32 id, address newAddress) external;\n\n  /**\n   * @notice Returns the address of the Pool proxy.\n   * @return The Pool proxy address\n   */\n  function getPool() external view returns (address);\n\n  /**\n   * @notice Updates the implementation of the Pool, or creates a proxy\n   * setting the new `pool` implementation when the function is called for the first time.\n   * @param newPoolImpl The new Pool implementation\n   */\n  function setPoolImpl(address newPoolImpl) external;\n\n  /**\n   * @notice Returns the address of the PoolConfigurator proxy.\n   * @return The PoolConfigurator proxy address\n   */\n  function getPoolConfigurator() external view returns (address);\n\n  /**\n   * @notice Updates the implementation of the PoolConfigurator, or creates a proxy\n   * setting the new `PoolConfigurator` implementation when the function is called for the first time.\n   * @param newPoolConfiguratorImpl The new PoolConfigurator implementation\n   */\n  function setPoolConfiguratorImpl(address newPoolConfiguratorImpl) external;\n\n  /**\n   * @notice Returns the address of the price oracle.\n   * @return The address of the PriceOracle\n   */\n  function getPriceOracle() external view returns (address);\n\n  /**\n   * @notice Updates the address of the price oracle.\n   * @param newPriceOracle The address of the new PriceOracle\n   */\n  function setPriceOracle(address newPriceOracle) external;\n\n  /**\n   * @notice Returns the address of the ACL manager.\n   * @return The address of the ACLManager\n   */\n  function getACLManager() external view returns (address);\n\n  /**\n   * @notice Updates the address of the ACL manager.\n   * @param newAclManager The address of the new ACLManager\n   */\n  function setACLManager(address newAclManager) external;\n\n  /**\n   * @notice Returns the address of the ACL admin.\n   * @return The address of the ACL admin\n   */\n  function getACLAdmin() external view returns (address);\n\n  /**\n   * @notice Updates the address of the ACL admin.\n   * @param newAclAdmin The address of the new ACL admin\n   */\n  function setACLAdmin(address newAclAdmin) external;\n\n  /**\n   * @notice Returns the address of the price oracle sentinel.\n   * @return The address of the PriceOracleSentinel\n   */\n  function getPriceOracleSentinel() external view returns (address);\n\n  /**\n   * @notice Updates the address of the price oracle sentinel.\n   * @param newPriceOracleSentinel The address of the new PriceOracleSentinel\n   */\n  function setPriceOracleSentinel(address newPriceOracleSentinel) external;\n\n  /**\n   * @notice Returns the address of the data provider.\n   * @return The address of the DataProvider\n   */\n  function getPoolDataProvider() external view returns (address);\n\n  /**\n   * @notice Updates the address of the data provider.\n   * @param newDataProvider The address of the new DataProvider\n   */\n  function setPoolDataProvider(address newDataProvider) external;\n}\n"},"src/contracts/BaseAdapterFactory.sol":{"content":"// SPDX-License-Identifier: UNLICENSED\n// Copyright (c) 2025 Aave Labs\npragma solidity 0.8.28;\n\nimport {IERC20} from 'openzeppelin/token/ERC20/IERC20.sol';\nimport {SafeERC20} from 'openzeppelin/token/ERC20/utils/SafeERC20.sol';\nimport {EIP712} from 'openzeppelin/utils/cryptography/EIP712.sol';\nimport {SignatureChecker} from 'openzeppelin/utils/cryptography/SignatureChecker.sol';\nimport {Clones} from 'openzeppelin/proxy/Clones.sol';\nimport {Ownable} from 'openzeppelin/access/Ownable.sol';\nimport {Pausable} from 'openzeppelin/utils/Pausable.sol';\n\nimport {IFlashLoanRouter} from 'cowprotocol/flash-loan-router/interface/IFlashLoanRouter.sol';\nimport {GPv2Order} from 'cowprotocol/contracts/libraries/GPv2Order.sol';\nimport {ICowSettlement} from 'cowprotocol/flash-loan-router/interface/ICowSettlement.sol';\n\nimport {DataTypes} from 'src/libraries/DataTypes.sol';\nimport {IBaseAdapterFactory} from 'src/interfaces/IBaseAdapterFactory.sol';\nimport {IAaveBaseAdapter} from 'src/interfaces/IAaveBaseAdapter.sol';\nimport {IBasicBorrower} from 'src/dependencies/cow/IBasicBorrower.sol';\n\n/// @notice Base for AdapterFactory to deploy listed AdapterHooks linked to Cow Orders & draw Flashloans.\n/// @author Aave Labs.\nabstract contract BaseAdapterFactory is\n  Ownable,\n  Pausable,\n  EIP712,\n  IBasicBorrower,\n  IBaseAdapterFactory\n{\n  using SafeERC20 for IERC20;\n  using GPv2Order for GPv2Order.Data;\n\n  /// @inheritdoc IBaseAdapterFactory\n  ICowSettlement public immutable SETTLEMENT_CONTRACT;\n  /// @inheritdoc IBaseAdapterFactory\n  IFlashLoanRouter public immutable ROUTER;\n\n  /// @notice Mapping of Adapter implementations.\n  mapping(address => bool) public isAdapterImplementation;\n\n  /// @notice Open FlashLoans data for Adapter Instances.\n  mapping(address => DataTypes.OpenFlashLoan) public openFlashLoans;\n\n  /// @notice Mapping to track cancelled Instances.\n  mapping(address => mapping(address => bool)) public isInstanceCancelled;\n\n  /// @dev Constructor.\n  /// @param settlement_ The address of the Cow Settlement contract.\n  /// @param router_ The address of the Cow FlashLoan Router contract.\n  /// @param owner_ The address of the owner of the Factory.\n  /// @param name_ The EIP712 name.\n  /// @param version_ The EIP712 version.\n  constructor(\n    address settlement_,\n    address router_,\n    address owner_,\n    string memory name_,\n    string memory version_\n  ) Ownable(owner_) EIP712(name_, version_) {\n    require(\n      settlement_ != address(0) && router_ != address(0) && owner_ != address(0),\n      InvalidZeroAddress()\n    );\n    SETTLEMENT_CONTRACT = ICowSettlement(settlement_);\n    ROUTER = IFlashLoanRouter(router_);\n  }\n\n  /// @inheritdoc IBaseAdapterFactory\n  function setAdapterImplementation(address adapterImplementation, bool active) external onlyOwner {\n    require(adapterImplementation != address(0), InvalidZeroAddress());\n\n    isAdapterImplementation[adapterImplementation] = active;\n\n    emit SetAdapterImplementation(adapterImplementation, active);\n  }\n\n  /// @notice Rescue any ERC20 tokens left on the contract.\n  /// @dev Emergency rescue for token stucked on this contract, as failsafe mechanism.\n  /// @dev - Funds should never remain in this contract more time than during transactions.\n  /// @dev - Only callable by the owner.\n  function rescueTokens(IERC20 token) external onlyOwner {\n    token.safeTransfer(owner(), token.balanceOf(address(this)));\n  }\n\n  /// @notice Pauses this contract\n  function pause() external onlyOwner {\n    _pause();\n  }\n\n  /// @notice Unpauses this contract\n  function unpause() external onlyOwner {\n    _unpause();\n  }\n\n  /// @inheritdoc IBasicBorrower\n  function flashLoanAndCallBack(\n    address lender,\n    IERC20 token,\n    uint256 amount,\n    bytes calldata callbackData\n  ) external virtual whenNotPaused {\n    require(msg.sender == address(ROUTER), CallerNotRouter());\n    _triggerFlashLoan(lender, token, amount, callbackData);\n  }\n\n  /// @inheritdoc IBaseAdapterFactory\n  function deployAndTransferFlashLoan(\n    address adapterImplementation,\n    DataTypes.HookOrderData memory hookData\n  ) external whenNotPaused {\n    // Deploy the Adapter Instance\n    address adapterInstance = _deployNewInstance(adapterImplementation, hookData);\n\n    require(!isInstanceCancelled[hookData.owner][adapterInstance], InstanceCancelled());\n    require(hookData.receiver == adapterInstance, InvalidOrderReceiver());\n\n    // Transfer the FlashLoaned assets to the Adapter Instance\n    IERC20(hookData.sellToken).safeTransfer(adapterInstance, hookData.flashLoanAmount);\n\n    // Register the open FlashLoan\n    openFlashLoans[adapterInstance] = DataTypes.OpenFlashLoan({\n      instanceActive: true,\n      asset: hookData.sellToken,\n      totalAmount: hookData.flashLoanAmount + hookData.flashLoanFeeAmount\n    });\n  }\n\n  /// @inheritdoc IBaseAdapterFactory\n  function notifyRepayFlashLoan() external virtual whenNotPaused {\n    // Check the current open FlashLoan for the caller\n    DataTypes.OpenFlashLoan storage flashLoanData = openFlashLoans[msg.sender];\n    require(flashLoanData.instanceActive, CallerNotInstance());\n    require(flashLoanData.totalAmount > 0, NothingToRepay());\n\n    _repayFlashLoan(IERC20(flashLoanData.asset), msg.sender, flashLoanData.totalAmount);\n\n    flashLoanData.instanceActive = false;\n  }\n\n  /// @inheritdoc IBaseAdapterFactory\n  function cancelInstance(address instance) external {\n    require(instance != address(0), InvalidZeroAddress());\n\n    isInstanceCancelled[msg.sender][instance] = true;\n\n    emit CancelInstance(msg.sender, instance);\n  }\n\n  /// @inheritdoc IBaseAdapterFactory\n  function verifyOrderSignature(\n    address orderOwner,\n    GPv2Order.Data memory order,\n    bytes memory signature\n  ) external view whenNotPaused returns (bool) {\n    address instance = msg.sender;\n    bytes32 digest = _hashTypedDataV4(\n      keccak256(\n        abi.encode(\n          DataTypes.ADAPTER_ORDER_TYPEHASH,\n          instance,\n          address(order.sellToken),\n          address(order.buyToken),\n          order.sellAmount,\n          order.buyAmount,\n          order.kind,\n          order.validTo,\n          order.appData\n        )\n      )\n    );\n    return SignatureChecker.isValidSignatureNow(orderOwner, digest, signature);\n  }\n\n  /// @inheritdoc IBaseAdapterFactory\n  function DOMAIN_SEPARATOR() external view returns (bytes32) {\n    return _domainSeparatorV4();\n  }\n\n  /// @inheritdoc IBaseAdapterFactory\n  function getInstanceDeterministicAddress(\n    address adapterImplementation,\n    DataTypes.HookOrderData memory hookData\n  ) external view returns (address) {\n    return _getInstanceDeterministicAddress(adapterImplementation, hookData);\n  }\n\n  /// @dev Triggers the flashloan flow on the protocol implemented by the AdapterFactory.\n  function _triggerFlashLoan(\n    address lender,\n    IERC20 token,\n    uint256 amount,\n    bytes calldata callbackData\n  ) internal virtual;\n\n  /// @dev Repays the flashloan flow on the protocol implemented by the AdapterFactory.\n  function _repayFlashLoan(IERC20 token, address from, uint256 amount) internal virtual;\n\n  /// @dev To be executed after the flashloan is initiated, returning the callbackData to the FlashLoanRouter.\n  function _executeFlashLoan(bytes memory callbackData) internal returns (bool) {\n    // Callback to the FlashLoanRouter with the data to continue the execution of the Settlement.\n    ROUTER.borrowerCallBack(callbackData);\n    return true;\n  }\n\n  /// @dev Deploys an AdapterHook Instance for a specific user and Implementation.\n  /// @param adapterImplementation The address of the Adapter Implementation to clone.\n  /// @param hookData The HookOrderData struct containing the Order & postHook data.\n  /// @return The address of the AdapterHook instance.\n  function _deployNewInstance(\n    address adapterImplementation,\n    DataTypes.HookOrderData memory hookData\n  ) internal returns (address) {\n    require(isAdapterImplementation[adapterImplementation], ImplementationNotActive());\n\n    // Get the salt based on the Order data and the postHook parameters\n    bytes32 salt = _getSaltDeterministic(adapterImplementation, hookData);\n\n    address instanceAddress = Clones.predictDeterministicAddress(\n      adapterImplementation,\n      salt,\n      address(this)\n    );\n    require(instanceAddress.code.length == 0, InstanceAlreadyDeployed());\n\n    // Deploy the Adapter Instance\n    instanceAddress = Clones.cloneDeterministic(adapterImplementation, salt);\n\n    // Initialize the Adapter Instance with the HookOrderData struct\n    IAaveBaseAdapter(instanceAddress).setParameters(hookData);\n\n    return instanceAddress;\n  }\n\n  function _getInstanceDeterministicAddress(\n    address adapterImplementation,\n    DataTypes.HookOrderData memory hookData\n  ) internal view returns (address) {\n    // Determine the address based on the salt determined by the Implementation & Order owner\n    return\n      Clones.predictDeterministicAddress(\n        adapterImplementation,\n        _getSaltDeterministic(adapterImplementation, hookData),\n        address(this)\n      );\n  }\n\n  function _getSaltDeterministic(\n    address adapterImplementation,\n    DataTypes.HookOrderData memory hookData\n  ) internal pure returns (bytes32) {\n    return\n      keccak256(\n        abi.encode(\n          adapterImplementation,\n          hookData.owner,\n          hookData.sellToken,\n          hookData.buyToken,\n          hookData.sellAmount,\n          hookData.buyAmount,\n          hookData.kind,\n          hookData.validTo,\n          hookData.flashLoanAmount,\n          hookData.flashLoanFeeAmount,\n          hookData.hookSellTokenAmount,\n          hookData.hookBuyTokenAmount\n        )\n      );\n  }\n}\n"},"lib/openzeppelin-contracts/contracts/interfaces/IERC1363.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.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/aave-v3-origin/src/contracts/protocol/libraries/types/DataTypes.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nlibrary DataTypes {\n  /**\n   * This exists specifically to maintain the `getReserveData()` interface, since the new, internal\n   * `ReserveData` struct includes the reserve's `virtualUnderlyingBalance`.\n   */\n  struct ReserveDataLegacy {\n    //stores the reserve configuration\n    ReserveConfigurationMap configuration;\n    //the liquidity index. Expressed in ray\n    uint128 liquidityIndex;\n    //the current supply rate. Expressed in ray\n    uint128 currentLiquidityRate;\n    //variable borrow index. Expressed in ray\n    uint128 variableBorrowIndex;\n    //the current variable borrow rate. Expressed in ray\n    uint128 currentVariableBorrowRate;\n    // DEPRECATED on v3.2.0\n    uint128 currentStableBorrowRate;\n    //timestamp of last update\n    uint40 lastUpdateTimestamp;\n    //the id of the reserve. Represents the position in the list of the active reserves\n    uint16 id;\n    //aToken address\n    address aTokenAddress;\n    // DEPRECATED on v3.2.0\n    address stableDebtTokenAddress;\n    //variableDebtToken address\n    address variableDebtTokenAddress;\n    // DEPRECATED on v3.4.0, should use the `RESERVE_INTEREST_RATE_STRATEGY` variable from the Pool contract\n    address interestRateStrategyAddress;\n    //the current treasury balance, scaled\n    uint128 accruedToTreasury;\n    // DEPRECATED on v3.4.0\n    uint128 unbacked;\n    //the outstanding debt borrowed against this asset in isolation mode\n    uint128 isolationModeTotalDebt;\n  }\n\n  struct ReserveData {\n    //stores the reserve configuration\n    ReserveConfigurationMap configuration;\n    //the liquidity index. Expressed in ray\n    uint128 liquidityIndex;\n    //the current supply rate. Expressed in ray\n    uint128 currentLiquidityRate;\n    //variable borrow index. Expressed in ray\n    uint128 variableBorrowIndex;\n    //the current variable borrow rate. Expressed in ray\n    uint128 currentVariableBorrowRate;\n    /// @notice reused `__deprecatedStableBorrowRate` storage from pre 3.2\n    // the current accumulate deficit in underlying tokens\n    uint128 deficit;\n    //timestamp of last update\n    uint40 lastUpdateTimestamp;\n    //the id of the reserve. Represents the position in the list of the active reserves\n    uint16 id;\n    //timestamp until when liquidations are not allowed on the reserve, if set to past liquidations will be allowed\n    uint40 liquidationGracePeriodUntil;\n    //aToken address\n    address aTokenAddress;\n    // DEPRECATED on v3.2.0\n    address __deprecatedStableDebtTokenAddress;\n    //variableDebtToken address\n    address variableDebtTokenAddress;\n    // DEPRECATED on v3.4.0, should use the `RESERVE_INTEREST_RATE_STRATEGY` variable from the Pool contract\n    address __deprecatedInterestRateStrategyAddress;\n    //the current treasury balance, scaled\n    uint128 accruedToTreasury;\n    // In aave 3.3.0 this storage slot contained the `unbacked`\n    uint128 virtualUnderlyingBalance;\n    //the outstanding debt borrowed against this asset in isolation mode\n    uint128 isolationModeTotalDebt;\n    //the amount of underlying accounted for by the protocol\n    // DEPRECATED on v3.4.0. Moved into the same slot as accruedToTreasury for optimized storage access.\n    uint128 __deprecatedVirtualUnderlyingBalance;\n  }\n\n  struct ReserveConfigurationMap {\n    //bit 0-15: LTV\n    //bit 16-31: Liq. threshold\n    //bit 32-47: Liq. bonus\n    //bit 48-55: Decimals\n    //bit 56: reserve is active\n    //bit 57: reserve is frozen\n    //bit 58: borrowing is enabled\n    //bit 59: DEPRECATED: stable rate borrowing enabled\n    //bit 60: asset is paused\n    //bit 61: borrowing in isolation mode is enabled\n    //bit 62: siloed borrowing enabled\n    //bit 63: flashloaning enabled\n    //bit 64-79: reserve factor\n    //bit 80-115: borrow cap in whole tokens, borrowCap == 0 => no cap\n    //bit 116-151: supply cap in whole tokens, supplyCap == 0 => no cap\n    //bit 152-167: liquidation protocol fee\n    //bit 168-175: DEPRECATED: eMode category\n    //bit 176-211: DEPRECATED: unbacked mint cap\n    //bit 212-251: debt ceiling for isolation mode with (ReserveConfiguration::DEBT_CEILING_DECIMALS) decimals\n    //bit 252: DEPRECATED: virtual accounting is enabled for the reserve\n    //bit 253-255 unused\n\n    uint256 data;\n  }\n\n  struct UserConfigurationMap {\n    /**\n     * @dev Bitmap of the users collaterals and borrows. It is divided in pairs of bits, one pair per asset.\n     * The first bit indicates if an asset is used as collateral by the user, the second whether an\n     * asset is borrowed by the user.\n     */\n    uint256 data;\n  }\n\n  // DEPRECATED: kept for backwards compatibility, might be removed in a future version\n  struct EModeCategoryLegacy {\n    // each eMode category has a custom ltv and liquidation threshold\n    uint16 ltv;\n    uint16 liquidationThreshold;\n    uint16 liquidationBonus;\n    // DEPRECATED\n    address priceSource;\n    string label;\n  }\n\n  struct CollateralConfig {\n    uint16 ltv;\n    uint16 liquidationThreshold;\n    uint16 liquidationBonus;\n  }\n\n  struct EModeCategoryBaseConfiguration {\n    uint16 ltv;\n    uint16 liquidationThreshold;\n    uint16 liquidationBonus;\n    string label;\n  }\n\n  struct EModeCategory {\n    // each eMode category has a custom ltv and liquidation threshold\n    uint16 ltv;\n    uint16 liquidationThreshold;\n    uint16 liquidationBonus;\n    uint128 collateralBitmap;\n    string label;\n    uint128 borrowableBitmap;\n  }\n\n  enum InterestRateMode {\n    NONE,\n    __DEPRECATED,\n    VARIABLE\n  }\n\n  struct ReserveCache {\n    uint256 currScaledVariableDebt;\n    uint256 nextScaledVariableDebt;\n    uint256 currLiquidityIndex;\n    uint256 nextLiquidityIndex;\n    uint256 currVariableBorrowIndex;\n    uint256 nextVariableBorrowIndex;\n    uint256 currLiquidityRate;\n    uint256 currVariableBorrowRate;\n    uint256 reserveFactor;\n    ReserveConfigurationMap reserveConfiguration;\n    address aTokenAddress;\n    address variableDebtTokenAddress;\n    uint40 reserveLastUpdateTimestamp;\n  }\n\n  struct ExecuteLiquidationCallParams {\n    address liquidator;\n    uint256 debtToCover;\n    address collateralAsset;\n    address debtAsset;\n    address borrower;\n    bool receiveAToken;\n    address priceOracle;\n    uint8 borrowerEModeCategory;\n    address priceOracleSentinel;\n    address interestRateStrategyAddress;\n  }\n\n  struct ExecuteSupplyParams {\n    address user;\n    address asset;\n    address interestRateStrategyAddress;\n    uint256 amount;\n    address onBehalfOf;\n    uint16 referralCode;\n  }\n\n  struct ExecuteBorrowParams {\n    address asset;\n    address user;\n    address onBehalfOf;\n    address interestRateStrategyAddress;\n    uint256 amount;\n    InterestRateMode interestRateMode;\n    uint16 referralCode;\n    bool releaseUnderlying;\n    address oracle;\n    uint8 userEModeCategory;\n    address priceOracleSentinel;\n  }\n\n  struct ExecuteRepayParams {\n    address asset;\n    address user;\n    address interestRateStrategyAddress;\n    uint256 amount;\n    InterestRateMode interestRateMode;\n    address onBehalfOf;\n    bool useATokens;\n    address oracle;\n    uint8 userEModeCategory;\n  }\n\n  struct ExecuteWithdrawParams {\n    address user;\n    address asset;\n    address interestRateStrategyAddress;\n    uint256 amount;\n    address to;\n    address oracle;\n    uint8 userEModeCategory;\n  }\n\n  struct ExecuteEliminateDeficitParams {\n    address user;\n    address asset;\n    address interestRateStrategyAddress;\n    uint256 amount;\n  }\n\n  struct FinalizeTransferParams {\n    address asset;\n    address from;\n    address to;\n    uint256 scaledAmount;\n    uint256 scaledBalanceFromBefore;\n    uint256 scaledBalanceToBefore;\n    address oracle;\n    uint8 fromEModeCategory;\n  }\n\n  struct FlashloanParams {\n    address user;\n    address receiverAddress;\n    address[] assets;\n    uint256[] amounts;\n    uint256[] interestRateModes;\n    address interestRateStrategyAddress;\n    address onBehalfOf;\n    bytes params;\n    uint16 referralCode;\n    uint256 flashLoanPremium;\n    address addressesProvider;\n    address pool;\n    uint8 userEModeCategory;\n    bool isAuthorizedFlashBorrower;\n  }\n\n  struct FlashloanSimpleParams {\n    address user;\n    address receiverAddress;\n    address asset;\n    address interestRateStrategyAddress;\n    uint256 amount;\n    bytes params;\n    uint16 referralCode;\n    uint256 flashLoanPremium;\n  }\n\n  struct FlashLoanRepaymentParams {\n    address user;\n    uint256 amount;\n    uint256 totalPremium;\n    address asset;\n    address interestRateStrategyAddress;\n    address receiverAddress;\n    uint16 referralCode;\n  }\n\n  struct CalculateUserAccountDataParams {\n    UserConfigurationMap userConfig;\n    address user;\n    address oracle;\n    uint8 userEModeCategory;\n  }\n\n  struct ValidateBorrowParams {\n    ReserveCache reserveCache;\n    UserConfigurationMap userConfig;\n    address asset;\n    address userAddress;\n    uint256 amountScaled;\n    InterestRateMode interestRateMode;\n    address oracle;\n    uint8 userEModeCategory;\n    address priceOracleSentinel;\n  }\n\n  struct ValidateLiquidationCallParams {\n    ReserveCache debtReserveCache;\n    uint256 totalDebt;\n    uint256 healthFactor;\n    address priceOracleSentinel;\n    address borrower;\n    address liquidator;\n  }\n\n  struct CalculateInterestRatesParams {\n    uint256 unbacked;\n    uint256 liquidityAdded;\n    uint256 liquidityTaken;\n    uint256 totalDebt;\n    uint256 reserveFactor;\n    address reserve;\n    // @notice DEPRECATED in 3.4, but kept for backwards compatibility\n    bool usingVirtualBalance;\n    uint256 virtualUnderlyingBalance;\n  }\n\n  struct InitReserveParams {\n    address asset;\n    address aTokenAddress;\n    address variableDebtAddress;\n    uint16 reservesCount;\n    uint16 maxNumberReserves;\n  }\n}\n"},"lib/openzeppelin-contracts/contracts/utils/cryptography/EIP712.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (utils/cryptography/EIP712.sol)\n\npragma solidity ^0.8.20;\n\nimport {MessageHashUtils} from \"./MessageHashUtils.sol\";\nimport {ShortStrings, ShortString} from \"../ShortStrings.sol\";\nimport {IERC5267} from \"../../interfaces/IERC5267.sol\";\n\n/**\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP-712] is a standard for hashing and signing of typed structured data.\n *\n * The encoding scheme specified in the EIP requires a domain separator and a hash of the typed structured data, whose\n * encoding is very generic and therefore its implementation in Solidity is not feasible, thus this contract\n * does not implement the encoding itself. Protocols need to implement the type-specific encoding they need in order to\n * produce the hash of their typed data using a combination of `abi.encode` and `keccak256`.\n *\n * This contract implements the EIP-712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\n * ({_hashTypedDataV4}).\n *\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\n * the chain id to protect against replay attacks on an eventual fork of the chain.\n *\n * NOTE: This contract implements the version of the encoding known as \"v4\", as implemented by the JSON RPC method\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\n *\n * NOTE: In the upgradeable version of this contract, the cached values will correspond to the address, and the domain\n * separator of the implementation contract. This will cause the {_domainSeparatorV4} function to always rebuild the\n * separator from the immutable values, which is cheaper than accessing a cached version in cold storage.\n *\n * @custom:oz-upgrades-unsafe-allow state-variable-immutable\n */\nabstract contract EIP712 is IERC5267 {\n    using ShortStrings for *;\n\n    bytes32 private constant TYPE_HASH =\n        keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\");\n\n    // Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to\n    // invalidate the cached domain separator if the chain id changes.\n    bytes32 private immutable _cachedDomainSeparator;\n    uint256 private immutable _cachedChainId;\n    address private immutable _cachedThis;\n\n    bytes32 private immutable _hashedName;\n    bytes32 private immutable _hashedVersion;\n\n    ShortString private immutable _name;\n    ShortString private immutable _version;\n    // slither-disable-next-line constable-states\n    string private _nameFallback;\n    // slither-disable-next-line constable-states\n    string private _versionFallback;\n\n    /**\n     * @dev Initializes the domain separator and parameter caches.\n     *\n     * The meaning of `name` and `version` is specified in\n     * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP-712]:\n     *\n     * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\n     * - `version`: the current major version of the signing domain.\n     *\n     * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\n     * contract upgrade].\n     */\n    constructor(string memory name, string memory version) {\n        _name = name.toShortStringWithFallback(_nameFallback);\n        _version = version.toShortStringWithFallback(_versionFallback);\n        _hashedName = keccak256(bytes(name));\n        _hashedVersion = keccak256(bytes(version));\n\n        _cachedChainId = block.chainid;\n        _cachedDomainSeparator = _buildDomainSeparator();\n        _cachedThis = address(this);\n    }\n\n    /**\n     * @dev Returns the domain separator for the current chain.\n     */\n    function _domainSeparatorV4() internal view returns (bytes32) {\n        if (address(this) == _cachedThis && block.chainid == _cachedChainId) {\n            return _cachedDomainSeparator;\n        } else {\n            return _buildDomainSeparator();\n        }\n    }\n\n    function _buildDomainSeparator() private view returns (bytes32) {\n        return keccak256(abi.encode(TYPE_HASH, _hashedName, _hashedVersion, block.chainid, address(this)));\n    }\n\n    /**\n     * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\n     * function returns the hash of the fully encoded EIP712 message for this domain.\n     *\n     * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\n     *\n     * ```solidity\n     * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\n     *     keccak256(\"Mail(address to,string contents)\"),\n     *     mailTo,\n     *     keccak256(bytes(mailContents))\n     * )));\n     * address signer = ECDSA.recover(digest, signature);\n     * ```\n     */\n    function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\n        return MessageHashUtils.toTypedDataHash(_domainSeparatorV4(), structHash);\n    }\n\n    /// @inheritdoc IERC5267\n    function eip712Domain()\n        public\n        view\n        virtual\n        returns (\n            bytes1 fields,\n            string memory name,\n            string memory version,\n            uint256 chainId,\n            address verifyingContract,\n            bytes32 salt,\n            uint256[] memory extensions\n        )\n    {\n        return (\n            hex\"0f\", // 01111\n            _EIP712Name(),\n            _EIP712Version(),\n            block.chainid,\n            address(this),\n            bytes32(0),\n            new uint256[](0)\n        );\n    }\n\n    /**\n     * @dev The name parameter for the EIP712 domain.\n     *\n     * NOTE: By default this function reads _name which is an immutable value.\n     * It only reads from storage if necessary (in case the value is too large to fit in a ShortString).\n     */\n    // solhint-disable-next-line func-name-mixedcase\n    function _EIP712Name() internal view returns (string memory) {\n        return _name.toStringWithFallback(_nameFallback);\n    }\n\n    /**\n     * @dev The version parameter for the EIP712 domain.\n     *\n     * NOTE: By default this function reads _version which is an immutable value.\n     * It only reads from storage if necessary (in case the value is too large to fit in a ShortString).\n     */\n    // solhint-disable-next-line func-name-mixedcase\n    function _EIP712Version() internal view returns (string memory) {\n        return _version.toStringWithFallback(_versionFallback);\n    }\n}\n"},"lib/openzeppelin-contracts/contracts/utils/cryptography/SignatureChecker.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/cryptography/SignatureChecker.sol)\n\npragma solidity ^0.8.24;\n\nimport {ECDSA} from \"./ECDSA.sol\";\nimport {IERC1271} from \"../../interfaces/IERC1271.sol\";\nimport {IERC7913SignatureVerifier} from \"../../interfaces/IERC7913.sol\";\nimport {Bytes} from \"../../utils/Bytes.sol\";\n\n/**\n * @dev Signature verification helper that can be used instead of `ECDSA.recover` to seamlessly support:\n *\n * * ECDSA signatures from externally owned accounts (EOAs)\n * * ERC-1271 signatures from smart contract wallets like Argent and Safe Wallet (previously Gnosis Safe)\n * * ERC-7913 signatures from keys that do not have an Ethereum address of their own\n *\n * See https://eips.ethereum.org/EIPS/eip-1271[ERC-1271] and https://eips.ethereum.org/EIPS/eip-7913[ERC-7913].\n */\nlibrary SignatureChecker {\n    using Bytes for bytes;\n\n    /**\n     * @dev Checks if a signature is valid for a given signer and data hash. If the signer has code, the\n     * signature is validated against it using ERC-1271, otherwise it's validated using `ECDSA.recover`.\n     *\n     * NOTE: Unlike ECDSA signatures, contract signatures are revocable, and the outcome of this function can thus\n     * change through time. It could return true at block N and false at block N+1 (or the opposite).\n     *\n     * NOTE: For an extended version of this function that supports ERC-7913 signatures, see {isValidSignatureNow-bytes-bytes32-bytes-}.\n     */\n    function isValidSignatureNow(address signer, bytes32 hash, bytes memory signature) internal view returns (bool) {\n        if (signer.code.length == 0) {\n            (address recovered, ECDSA.RecoverError err, ) = ECDSA.tryRecover(hash, signature);\n            return err == ECDSA.RecoverError.NoError && recovered == signer;\n        } else {\n            return isValidERC1271SignatureNow(signer, hash, signature);\n        }\n    }\n\n    /**\n     * @dev Checks if a signature is valid for a given signer and data hash. The signature is validated\n     * against the signer smart contract using ERC-1271.\n     *\n     * NOTE: Unlike ECDSA signatures, contract signatures are revocable, and the outcome of this function can thus\n     * change through time. It could return true at block N and false at block N+1 (or the opposite).\n     */\n    function isValidERC1271SignatureNow(\n        address signer,\n        bytes32 hash,\n        bytes memory signature\n    ) internal view returns (bool) {\n        (bool success, bytes memory result) = signer.staticcall(\n            abi.encodeCall(IERC1271.isValidSignature, (hash, signature))\n        );\n        return (success &&\n            result.length >= 32 &&\n            abi.decode(result, (bytes32)) == bytes32(IERC1271.isValidSignature.selector));\n    }\n\n    /**\n     * @dev Verifies a signature for a given ERC-7913 signer and hash.\n     *\n     * The signer is a `bytes` object that is the concatenation of an address and optionally a key:\n     * `verifier || key`. A signer must be at least 20 bytes long.\n     *\n     * Verification is done as follows:\n     *\n     * * If `signer.length < 20`: verification fails\n     * * If `signer.length == 20`: verification is done using {isValidSignatureNow}\n     * * Otherwise: verification is done using {IERC7913SignatureVerifier}\n     *\n     * NOTE: Unlike ECDSA signatures, contract signatures are revocable, and the outcome of this function can thus\n     * change through time. It could return true at block N and false at block N+1 (or the opposite).\n     */\n    function isValidSignatureNow(\n        bytes memory signer,\n        bytes32 hash,\n        bytes memory signature\n    ) internal view returns (bool) {\n        if (signer.length < 20) {\n            return false;\n        } else if (signer.length == 20) {\n            return isValidSignatureNow(address(bytes20(signer)), hash, signature);\n        } else {\n            (bool success, bytes memory result) = address(bytes20(signer)).staticcall(\n                abi.encodeCall(IERC7913SignatureVerifier.verify, (signer.slice(20), hash, signature))\n            );\n            return (success &&\n                result.length >= 32 &&\n                abi.decode(result, (bytes32)) == bytes32(IERC7913SignatureVerifier.verify.selector));\n        }\n    }\n\n    /**\n     * @dev Verifies multiple ERC-7913 `signatures` for a given `hash` using a set of `signers`.\n     * Returns `false` if the number of signers and signatures is not the same.\n     *\n     * The signers should be ordered by their `keccak256` hash to ensure efficient duplication check. Unordered\n     * signers are supported, but the uniqueness check will be more expensive.\n     *\n     * NOTE: Unlike ECDSA signatures, contract signatures are revocable, and the outcome of this function can thus\n     * change through time. It could return true at block N and false at block N+1 (or the opposite).\n     */\n    function areValidSignaturesNow(\n        bytes32 hash,\n        bytes[] memory signers,\n        bytes[] memory signatures\n    ) internal view returns (bool) {\n        if (signers.length != signatures.length) return false;\n\n        bytes32 lastId = bytes32(0);\n\n        for (uint256 i = 0; i < signers.length; ++i) {\n            bytes memory signer = signers[i];\n\n            // If one of the signatures is invalid, reject the batch\n            if (!isValidSignatureNow(signer, hash, signatures[i])) return false;\n\n            bytes32 id = keccak256(signer);\n            // If the current signer ID is greater than all previous IDs, then this is a new signer.\n            if (lastId < id) {\n                lastId = id;\n            } else {\n                // If this signer id is not greater than all the previous ones, verify that it is not a duplicate of a previous one\n                // This loop is never executed if the signers are ordered by id.\n                for (uint256 j = 0; j < i; ++j) {\n                    if (id == keccak256(signers[j])) return false;\n                }\n            }\n        }\n\n        return true;\n    }\n}\n"},"lib/openzeppelin-contracts/contracts/proxy/Clones.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (proxy/Clones.sol)\n\npragma solidity ^0.8.20;\n\nimport {Create2} from \"../utils/Create2.sol\";\nimport {Errors} from \"../utils/Errors.sol\";\n\n/**\n * @dev https://eips.ethereum.org/EIPS/eip-1167[ERC-1167] is a standard for\n * deploying minimal proxy contracts, also known as \"clones\".\n *\n * > To simply and cheaply clone contract functionality in an immutable way, this standard specifies\n * > a minimal bytecode implementation that delegates all calls to a known, fixed address.\n *\n * The library includes functions to deploy a proxy using either `create` (traditional deployment) or `create2`\n * (salted deterministic deployment). It also includes functions to predict the addresses of clones deployed using the\n * deterministic method.\n */\nlibrary Clones {\n    error CloneArgumentsTooLong();\n\n    /**\n     * @dev Deploys and returns the address of a clone that mimics the behavior of `implementation`.\n     *\n     * This function uses the create opcode, which should never revert.\n     */\n    function clone(address implementation) internal returns (address instance) {\n        return clone(implementation, 0);\n    }\n\n    /**\n     * @dev Same as {xref-Clones-clone-address-}[clone], but with a `value` parameter to send native currency\n     * to the new contract.\n     *\n     * NOTE: Using a non-zero value at creation will require the contract using this function (e.g. a factory)\n     * to always have enough balance for new deployments. Consider exposing this function under a payable method.\n     */\n    function clone(address implementation, uint256 value) internal returns (address instance) {\n        if (address(this).balance < value) {\n            revert Errors.InsufficientBalance(address(this).balance, value);\n        }\n        assembly (\"memory-safe\") {\n            // Cleans the upper 96 bits of the `implementation` word, then packs the first 3 bytes\n            // of the `implementation` address with the bytecode before the address.\n            mstore(0x00, or(shr(0xe8, shl(0x60, implementation)), 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000))\n            // Packs the remaining 17 bytes of `implementation` with the bytecode after the address.\n            mstore(0x20, or(shl(0x78, implementation), 0x5af43d82803e903d91602b57fd5bf3))\n            instance := create(value, 0x09, 0x37)\n        }\n        if (instance == address(0)) {\n            revert Errors.FailedDeployment();\n        }\n    }\n\n    /**\n     * @dev Deploys and returns the address of a clone that mimics the behavior of `implementation`.\n     *\n     * This function uses the create2 opcode and a `salt` to deterministically deploy\n     * the clone. Using the same `implementation` and `salt` multiple times will revert, since\n     * the clones cannot be deployed twice at the same address.\n     */\n    function cloneDeterministic(address implementation, bytes32 salt) internal returns (address instance) {\n        return cloneDeterministic(implementation, salt, 0);\n    }\n\n    /**\n     * @dev Same as {xref-Clones-cloneDeterministic-address-bytes32-}[cloneDeterministic], but with\n     * a `value` parameter to send native currency to the new contract.\n     *\n     * NOTE: Using a non-zero value at creation will require the contract using this function (e.g. a factory)\n     * to always have enough balance for new deployments. Consider exposing this function under a payable method.\n     */\n    function cloneDeterministic(\n        address implementation,\n        bytes32 salt,\n        uint256 value\n    ) internal returns (address instance) {\n        if (address(this).balance < value) {\n            revert Errors.InsufficientBalance(address(this).balance, value);\n        }\n        assembly (\"memory-safe\") {\n            // Cleans the upper 96 bits of the `implementation` word, then packs the first 3 bytes\n            // of the `implementation` address with the bytecode before the address.\n            mstore(0x00, or(shr(0xe8, shl(0x60, implementation)), 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000))\n            // Packs the remaining 17 bytes of `implementation` with the bytecode after the address.\n            mstore(0x20, or(shl(0x78, implementation), 0x5af43d82803e903d91602b57fd5bf3))\n            instance := create2(value, 0x09, 0x37, salt)\n        }\n        if (instance == address(0)) {\n            revert Errors.FailedDeployment();\n        }\n    }\n\n    /**\n     * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}.\n     */\n    function predictDeterministicAddress(\n        address implementation,\n        bytes32 salt,\n        address deployer\n    ) internal pure returns (address predicted) {\n        assembly (\"memory-safe\") {\n            let ptr := mload(0x40)\n            mstore(add(ptr, 0x38), deployer)\n            mstore(add(ptr, 0x24), 0x5af43d82803e903d91602b57fd5bf3ff)\n            mstore(add(ptr, 0x14), implementation)\n            mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73)\n            mstore(add(ptr, 0x58), salt)\n            mstore(add(ptr, 0x78), keccak256(add(ptr, 0x0c), 0x37))\n            predicted := and(keccak256(add(ptr, 0x43), 0x55), 0xffffffffffffffffffffffffffffffffffffffff)\n        }\n    }\n\n    /**\n     * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}.\n     */\n    function predictDeterministicAddress(\n        address implementation,\n        bytes32 salt\n    ) internal view returns (address predicted) {\n        return predictDeterministicAddress(implementation, salt, address(this));\n    }\n\n    /**\n     * @dev Deploys and returns the address of a clone that mimics the behavior of `implementation` with custom\n     * immutable arguments. These are provided through `args` and cannot be changed after deployment. To\n     * access the arguments within the implementation, use {fetchCloneArgs}.\n     *\n     * This function uses the create opcode, which should never revert.\n     */\n    function cloneWithImmutableArgs(address implementation, bytes memory args) internal returns (address instance) {\n        return cloneWithImmutableArgs(implementation, args, 0);\n    }\n\n    /**\n     * @dev Same as {xref-Clones-cloneWithImmutableArgs-address-bytes-}[cloneWithImmutableArgs], but with a `value`\n     * parameter to send native currency to the new contract.\n     *\n     * NOTE: Using a non-zero value at creation will require the contract using this function (e.g. a factory)\n     * to always have enough balance for new deployments. Consider exposing this function under a payable method.\n     */\n    function cloneWithImmutableArgs(\n        address implementation,\n        bytes memory args,\n        uint256 value\n    ) internal returns (address instance) {\n        if (address(this).balance < value) {\n            revert Errors.InsufficientBalance(address(this).balance, value);\n        }\n        bytes memory bytecode = _cloneCodeWithImmutableArgs(implementation, args);\n        assembly (\"memory-safe\") {\n            instance := create(value, add(bytecode, 0x20), mload(bytecode))\n        }\n        if (instance == address(0)) {\n            revert Errors.FailedDeployment();\n        }\n    }\n\n    /**\n     * @dev Deploys and returns the address of a clone that mimics the behavior of `implementation` with custom\n     * immutable arguments. These are provided through `args` and cannot be changed after deployment. To\n     * access the arguments within the implementation, use {fetchCloneArgs}.\n     *\n     * This function uses the create2 opcode and a `salt` to deterministically deploy the clone. Using the same\n     * `implementation`, `args` and `salt` multiple times will revert, since the clones cannot be deployed twice\n     * at the same address.\n     */\n    function cloneDeterministicWithImmutableArgs(\n        address implementation,\n        bytes memory args,\n        bytes32 salt\n    ) internal returns (address instance) {\n        return cloneDeterministicWithImmutableArgs(implementation, args, salt, 0);\n    }\n\n    /**\n     * @dev Same as {xref-Clones-cloneDeterministicWithImmutableArgs-address-bytes-bytes32-}[cloneDeterministicWithImmutableArgs],\n     * but with a `value` parameter to send native currency to the new contract.\n     *\n     * NOTE: Using a non-zero value at creation will require the contract using this function (e.g. a factory)\n     * to always have enough balance for new deployments. Consider exposing this function under a payable method.\n     */\n    function cloneDeterministicWithImmutableArgs(\n        address implementation,\n        bytes memory args,\n        bytes32 salt,\n        uint256 value\n    ) internal returns (address instance) {\n        bytes memory bytecode = _cloneCodeWithImmutableArgs(implementation, args);\n        return Create2.deploy(value, salt, bytecode);\n    }\n\n    /**\n     * @dev Computes the address of a clone deployed using {Clones-cloneDeterministicWithImmutableArgs}.\n     */\n    function predictDeterministicAddressWithImmutableArgs(\n        address implementation,\n        bytes memory args,\n        bytes32 salt,\n        address deployer\n    ) internal pure returns (address predicted) {\n        bytes memory bytecode = _cloneCodeWithImmutableArgs(implementation, args);\n        return Create2.computeAddress(salt, keccak256(bytecode), deployer);\n    }\n\n    /**\n     * @dev Computes the address of a clone deployed using {Clones-cloneDeterministicWithImmutableArgs}.\n     */\n    function predictDeterministicAddressWithImmutableArgs(\n        address implementation,\n        bytes memory args,\n        bytes32 salt\n    ) internal view returns (address predicted) {\n        return predictDeterministicAddressWithImmutableArgs(implementation, args, salt, address(this));\n    }\n\n    /**\n     * @dev Get the immutable args attached to a clone.\n     *\n     * - If `instance` is a clone that was deployed using `clone` or `cloneDeterministic`, this\n     *   function will return an empty array.\n     * - If `instance` is a clone that was deployed using `cloneWithImmutableArgs` or\n     *   `cloneDeterministicWithImmutableArgs`, this function will return the args array used at\n     *   creation.\n     * - If `instance` is NOT a clone deployed using this library, the behavior is undefined. This\n     *   function should only be used to check addresses that are known to be clones.\n     */\n    function fetchCloneArgs(address instance) internal view returns (bytes memory) {\n        bytes memory result = new bytes(instance.code.length - 45); // revert if length is too short\n        assembly (\"memory-safe\") {\n            extcodecopy(instance, add(result, 32), 45, mload(result))\n        }\n        return result;\n    }\n\n    /**\n     * @dev Helper that prepares the initcode of the proxy with immutable args.\n     *\n     * An assembly variant of this function requires copying the `args` array, which can be efficiently done using\n     * `mcopy`. Unfortunately, that opcode is not available before cancun. A pure solidity implementation using\n     * abi.encodePacked is more expensive but also more portable and easier to review.\n     *\n     * NOTE: https://eips.ethereum.org/EIPS/eip-170[EIP-170] limits the length of the contract code to 24576 bytes.\n     * With the proxy code taking 45 bytes, that limits the length of the immutable args to 24531 bytes.\n     */\n    function _cloneCodeWithImmutableArgs(\n        address implementation,\n        bytes memory args\n    ) private pure returns (bytes memory) {\n        if (args.length > 24531) revert CloneArgumentsTooLong();\n        return\n            abi.encodePacked(\n                hex\"61\",\n                uint16(args.length + 45),\n                hex\"3d81600a3d39f3363d3d373d3d3d363d73\",\n                implementation,\n                hex\"5af43d82803e903d91602b57fd5bf3\",\n                args\n            );\n    }\n}\n"},"lib/openzeppelin-contracts/contracts/access/Ownable.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)\n\npragma solidity ^0.8.20;\n\nimport {Context} from \"../utils/Context.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * The initial owner is set to the address provided by the deployer. This can\n * later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract Ownable is Context {\n    address private _owner;\n\n    /**\n     * @dev The caller account is not authorized to perform an operation.\n     */\n    error OwnableUnauthorizedAccount(address account);\n\n    /**\n     * @dev The owner is not a valid owner account. (eg. `address(0)`)\n     */\n    error OwnableInvalidOwner(address owner);\n\n    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n    /**\n     * @dev Initializes the contract setting the address provided by the deployer as the initial owner.\n     */\n    constructor(address initialOwner) {\n        if (initialOwner == address(0)) {\n            revert OwnableInvalidOwner(address(0));\n        }\n        _transferOwnership(initialOwner);\n    }\n\n    /**\n     * @dev Throws if called by any account other than the owner.\n     */\n    modifier onlyOwner() {\n        _checkOwner();\n        _;\n    }\n\n    /**\n     * @dev Returns the address of the current owner.\n     */\n    function owner() public view virtual returns (address) {\n        return _owner;\n    }\n\n    /**\n     * @dev Throws if the sender is not the owner.\n     */\n    function _checkOwner() internal view virtual {\n        if (owner() != _msgSender()) {\n            revert OwnableUnauthorizedAccount(_msgSender());\n        }\n    }\n\n    /**\n     * @dev Leaves the contract without owner. It will not be possible to call\n     * `onlyOwner` functions. Can only be called by the current owner.\n     *\n     * NOTE: Renouncing ownership will leave the contract without an owner,\n     * thereby disabling any functionality that is only available to the owner.\n     */\n    function renounceOwnership() public virtual onlyOwner {\n        _transferOwnership(address(0));\n    }\n\n    /**\n     * @dev Transfers ownership of the contract to a new account (`newOwner`).\n     * Can only be called by the current owner.\n     */\n    function transferOwnership(address newOwner) public virtual onlyOwner {\n        if (newOwner == address(0)) {\n            revert OwnableInvalidOwner(address(0));\n        }\n        _transferOwnership(newOwner);\n    }\n\n    /**\n     * @dev Transfers ownership of the contract to a new account (`newOwner`).\n     * Internal function without access restriction.\n     */\n    function _transferOwnership(address newOwner) internal virtual {\n        address oldOwner = _owner;\n        _owner = newOwner;\n        emit OwnershipTransferred(oldOwner, newOwner);\n    }\n}\n"},"lib/openzeppelin-contracts/contracts/utils/Pausable.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (utils/Pausable.sol)\n\npragma solidity ^0.8.20;\n\nimport {Context} from \"../utils/Context.sol\";\n\n/**\n * @dev Contract module which allows children to implement an emergency stop\n * mechanism that can be triggered by an authorized account.\n *\n * This module is used through inheritance. It will make available the\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\n * the functions of your contract. Note that they will not be pausable by\n * simply including this module, only once the modifiers are put in place.\n */\nabstract contract Pausable is Context {\n    bool private _paused;\n\n    /**\n     * @dev Emitted when the pause is triggered by `account`.\n     */\n    event Paused(address account);\n\n    /**\n     * @dev Emitted when the pause is lifted by `account`.\n     */\n    event Unpaused(address account);\n\n    /**\n     * @dev The operation failed because the contract is paused.\n     */\n    error EnforcedPause();\n\n    /**\n     * @dev The operation failed because the contract is not paused.\n     */\n    error ExpectedPause();\n\n    /**\n     * @dev Modifier to make a function callable only when the contract is not paused.\n     *\n     * Requirements:\n     *\n     * - The contract must not be paused.\n     */\n    modifier whenNotPaused() {\n        _requireNotPaused();\n        _;\n    }\n\n    /**\n     * @dev Modifier to make a function callable only when the contract is paused.\n     *\n     * Requirements:\n     *\n     * - The contract must be paused.\n     */\n    modifier whenPaused() {\n        _requirePaused();\n        _;\n    }\n\n    /**\n     * @dev Returns true if the contract is paused, and false otherwise.\n     */\n    function paused() public view virtual returns (bool) {\n        return _paused;\n    }\n\n    /**\n     * @dev Throws if the contract is paused.\n     */\n    function _requireNotPaused() internal view virtual {\n        if (paused()) {\n            revert EnforcedPause();\n        }\n    }\n\n    /**\n     * @dev Throws if the contract is not paused.\n     */\n    function _requirePaused() internal view virtual {\n        if (!paused()) {\n            revert ExpectedPause();\n        }\n    }\n\n    /**\n     * @dev Triggers stopped state.\n     *\n     * Requirements:\n     *\n     * - The contract must not be paused.\n     */\n    function _pause() internal virtual whenNotPaused {\n        _paused = true;\n        emit Paused(_msgSender());\n    }\n\n    /**\n     * @dev Returns to normal state.\n     *\n     * Requirements:\n     *\n     * - The contract must be paused.\n     */\n    function _unpause() internal virtual whenPaused {\n        _paused = false;\n        emit Unpaused(_msgSender());\n    }\n}\n"},"lib/flash-loan-router/src/interface/IFlashLoanRouter.sol":{"content":"// SPDX-License-Identifier: GPL-3.0-or-later\npragma solidity ^0.8;\n\nimport {Loan} from \"../library/Loan.sol\";\nimport {ICowAuthentication} from \"../vendored/ICowAuthentication.sol\";\nimport {ICowSettlement} from \"./ICowSettlement.sol\";\n\n/// @title Flash-loan Router Interface\n/// @author CoW DAO developers\n/// @notice Interface describing the functions available for interacting with\n/// the flash-loan router.\n/// @dev The flash loan router is intended to be a solver for CoW Protocol.\ninterface IFlashLoanRouter {\n    /// @notice Request all flash loan specified in the input and, after that,\n    /// executes the specified settlement.\n    /// @dev It's the solver's responsibility to make sure the loan is specified\n    /// correctly. The router contract offers no validation of the fact that\n    /// the flash loan proceeds are available for spending.\n    ///\n    /// The repayment of a flash loan is different based on the protocol. For\n    /// example, some expect to retrieve the funds from this borrower contract\n    /// through `transferFrom`, while other check the lender balance is as\n    /// expected after the flash loan has been processed. The executed\n    /// settlement must be built to cater to the needs of the specified lender.\n    ///\n    /// A settlement can be executed at most once in a call. The settlement\n    /// data cannot change during execution. Only the settle function can be\n    /// called. All of this is also the case if the lender is untrusted.\n    /// @param loans The list of flash loans to be requested before the\n    /// settlement is executed. The loans will be requested in the specified\n    /// order.\n    /// @param settlement The ABI-encoded bytes for a call to `settle()` (as\n    /// in `abi.encodeCall`).\n    function flashLoanAndSettle(Loan.Data[] calldata loans, bytes calldata settlement) external;\n\n    /// @notice Once a borrower has received the proceeds of a flash loan, it\n    /// calls back the router through this function.\n    /// @param encodedLoansWithSettlement The data the borrower received when\n    /// it was called, without any modification.\n    function borrowerCallBack(bytes calldata encodedLoansWithSettlement) external;\n\n    /// @notice The settlement contract supported by this router. This is the\n    /// contract that will be called when the settlement is executed.\n    function settlementContract() external view returns (ICowSettlement);\n\n    /// @notice The settlement authenticator contract for CoW Protocol. This\n    /// contract determines who the solvers for CoW Protocol are.\n    function settlementAuthentication() external view returns (ICowAuthentication);\n}\n"},"lib/contracts/src/contracts/libraries/GPv2Order.sol":{"content":"// SPDX-License-Identifier: LGPL-3.0-or-later\npragma solidity >=0.7.6 <0.9.0;\n\nimport \"../interfaces/IERC20.sol\";\n\n/// @title Gnosis Protocol v2 Order Library\n/// @author Gnosis Developers\nlibrary GPv2Order {\n    /// @dev The complete data for a Gnosis Protocol order. This struct contains\n    /// all order parameters that are signed for submitting to GP.\n    struct Data {\n        IERC20 sellToken;\n        IERC20 buyToken;\n        address receiver;\n        uint256 sellAmount;\n        uint256 buyAmount;\n        uint32 validTo;\n        bytes32 appData;\n        uint256 feeAmount;\n        bytes32 kind;\n        bool partiallyFillable;\n        bytes32 sellTokenBalance;\n        bytes32 buyTokenBalance;\n    }\n\n    /// @dev The order EIP-712 type hash for the [`GPv2Order.Data`] struct.\n    ///\n    /// This value is pre-computed from the following expression:\n    /// ```\n    /// keccak256(\n    ///     \"Order(\" +\n    ///         \"address sellToken,\" +\n    ///         \"address buyToken,\" +\n    ///         \"address receiver,\" +\n    ///         \"uint256 sellAmount,\" +\n    ///         \"uint256 buyAmount,\" +\n    ///         \"uint32 validTo,\" +\n    ///         \"bytes32 appData,\" +\n    ///         \"uint256 feeAmount,\" +\n    ///         \"string kind,\" +\n    ///         \"bool partiallyFillable,\" +\n    ///         \"string sellTokenBalance,\" +\n    ///         \"string buyTokenBalance\" +\n    ///     \")\"\n    /// )\n    /// ```\n    bytes32 internal constant TYPE_HASH =\n        hex\"d5a25ba2e97094ad7d83dc28a6572da797d6b3e7fc6663bd93efb789fc17e489\";\n\n    /// @dev The marker value for a sell order for computing the order struct\n    /// hash. This allows the EIP-712 compatible wallets to display a\n    /// descriptive string for the order kind (instead of 0 or 1).\n    ///\n    /// This value is pre-computed from the following expression:\n    /// ```\n    /// keccak256(\"sell\")\n    /// ```\n    bytes32 internal constant KIND_SELL =\n        hex\"f3b277728b3fee749481eb3e0b3b48980dbbab78658fc419025cb16eee346775\";\n\n    /// @dev The OrderKind marker value for a buy order for computing the order\n    /// struct hash.\n    ///\n    /// This value is pre-computed from the following expression:\n    /// ```\n    /// keccak256(\"buy\")\n    /// ```\n    bytes32 internal constant KIND_BUY =\n        hex\"6ed88e868af0a1983e3886d5f3e95a2fafbd6c3450bc229e27342283dc429ccc\";\n\n    /// @dev The TokenBalance marker value for using direct ERC20 balances for\n    /// computing the order struct hash.\n    ///\n    /// This value is pre-computed from the following expression:\n    /// ```\n    /// keccak256(\"erc20\")\n    /// ```\n    bytes32 internal constant BALANCE_ERC20 =\n        hex\"5a28e9363bb942b639270062aa6bb295f434bcdfc42c97267bf003f272060dc9\";\n\n    /// @dev The TokenBalance marker value for using Balancer Vault external\n    /// balances (in order to re-use Vault ERC20 approvals) for computing the\n    /// order struct hash.\n    ///\n    /// This value is pre-computed from the following expression:\n    /// ```\n    /// keccak256(\"external\")\n    /// ```\n    bytes32 internal constant BALANCE_EXTERNAL =\n        hex\"abee3b73373acd583a130924aad6dc38cfdc44ba0555ba94ce2ff63980ea0632\";\n\n    /// @dev The TokenBalance marker value for using Balancer Vault internal\n    /// balances for computing the order struct hash.\n    ///\n    /// This value is pre-computed from the following expression:\n    /// ```\n    /// keccak256(\"internal\")\n    /// ```\n    bytes32 internal constant BALANCE_INTERNAL =\n        hex\"4ac99ace14ee0a5ef932dc609df0943ab7ac16b7583634612f8dc35a4289a6ce\";\n\n    /// @dev Marker address used to indicate that the receiver of the trade\n    /// proceeds should the owner of the order.\n    ///\n    /// This is chosen to be `address(0)` for gas efficiency as it is expected\n    /// to be the most common case.\n    address internal constant RECEIVER_SAME_AS_OWNER = address(0);\n\n    /// @dev The byte length of an order unique identifier.\n    uint256 internal constant UID_LENGTH = 56;\n\n    /// @dev Returns the actual receiver for an order. This function checks\n    /// whether or not the [`receiver`] field uses the marker value to indicate\n    /// it is the same as the order owner.\n    ///\n    /// @return receiver The actual receiver of trade proceeds.\n    function actualReceiver(\n        Data memory order,\n        address owner\n    ) internal pure returns (address receiver) {\n        if (order.receiver == RECEIVER_SAME_AS_OWNER) {\n            receiver = owner;\n        } else {\n            receiver = order.receiver;\n        }\n    }\n\n    /// @dev Return the EIP-712 signing hash for the specified order.\n    ///\n    /// @param order The order to compute the EIP-712 signing hash for.\n    /// @param domainSeparator The EIP-712 domain separator to use.\n    /// @return orderDigest The 32 byte EIP-712 struct hash.\n    function hash(\n        Data memory order,\n        bytes32 domainSeparator\n    ) internal pure returns (bytes32 orderDigest) {\n        bytes32 structHash;\n\n        // NOTE: Compute the EIP-712 order struct hash in place. As suggested\n        // in the EIP proposal, noting that the order struct has 12 fields, and\n        // prefixing the type hash `(1 + 12) * 32 = 416` bytes to hash.\n        // <https://github.com/ethereum/EIPs/blob/master/EIPS/eip-712.md#rationale-for-encodedata>\n        // solhint-disable-next-line no-inline-assembly\n        assembly {\n            let dataStart := sub(order, 32)\n            let temp := mload(dataStart)\n            mstore(dataStart, TYPE_HASH)\n            structHash := keccak256(dataStart, 416)\n            mstore(dataStart, temp)\n        }\n\n        // NOTE: Now that we have the struct hash, compute the EIP-712 signing\n        // hash using scratch memory past the free memory pointer. The signing\n        // hash is computed from `\"\\x19\\x01\" || domainSeparator || structHash`.\n        // <https://docs.soliditylang.org/en/v0.7.6/internals/layout_in_memory.html#layout-in-memory>\n        // <https://github.com/ethereum/EIPs/blob/master/EIPS/eip-712.md#specification>\n        // solhint-disable-next-line no-inline-assembly\n        assembly {\n            let freeMemoryPointer := mload(0x40)\n            mstore(freeMemoryPointer, \"\\x19\\x01\")\n            mstore(add(freeMemoryPointer, 2), domainSeparator)\n            mstore(add(freeMemoryPointer, 34), structHash)\n            orderDigest := keccak256(freeMemoryPointer, 66)\n        }\n    }\n\n    /// @dev Packs order UID parameters into the specified memory location. The\n    /// result is equivalent to `abi.encodePacked(...)` with the difference that\n    /// it allows re-using the memory for packing the order UID.\n    ///\n    /// This function reverts if the order UID buffer is not the correct size.\n    ///\n    /// @param orderUid The buffer pack the order UID parameters into.\n    /// @param orderDigest The EIP-712 struct digest derived from the order\n    /// parameters.\n    /// @param owner The address of the user who owns this order.\n    /// @param validTo The epoch time at which the order will stop being valid.\n    function packOrderUidParams(\n        bytes memory orderUid,\n        bytes32 orderDigest,\n        address owner,\n        uint32 validTo\n    ) internal pure {\n        require(orderUid.length == UID_LENGTH, \"GPv2: uid buffer overflow\");\n\n        // NOTE: Write the order UID to the allocated memory buffer. The order\n        // parameters are written to memory in **reverse order** as memory\n        // operations write 32-bytes at a time and we want to use a packed\n        // encoding. This means, for example, that after writing the value of\n        // `owner` to bytes `20:52`, writing the `orderDigest` to bytes `0:32`\n        // will **overwrite** bytes `20:32`. This is desirable as addresses are\n        // only 20 bytes and `20:32` should be `0`s:\n        //\n        //        |           1111111111222222222233333333334444444444555555\n        //   byte | 01234567890123456789012345678901234567890123456789012345\n        // -------+---------------------------------------------------------\n        //  field | [.........orderDigest..........][......owner.......][vT]\n        // -------+---------------------------------------------------------\n        // mstore |                         [000000000000000000000000000.vT]\n        //        |                     [00000000000.......owner.......]\n        //        | [.........orderDigest..........]\n        //\n        // Additionally, since Solidity `bytes memory` are length prefixed,\n        // 32 needs to be added to all the offsets.\n        //\n        // solhint-disable-next-line no-inline-assembly\n        assembly {\n            mstore(add(orderUid, 56), validTo)\n            mstore(add(orderUid, 52), owner)\n            mstore(add(orderUid, 32), orderDigest)\n        }\n    }\n\n    /// @dev Extracts specific order information from the standardized unique\n    /// order id of the protocol.\n    ///\n    /// @param orderUid The unique identifier used to represent an order in\n    /// the protocol. This uid is the packed concatenation of the order digest,\n    /// the validTo order parameter and the address of the user who created the\n    /// order. It is used by the user to interface with the contract directly,\n    /// and not by calls that are triggered by the solvers.\n    /// @return orderDigest The EIP-712 signing digest derived from the order\n    /// parameters.\n    /// @return owner The address of the user who owns this order.\n    /// @return validTo The epoch time at which the order will stop being valid.\n    function extractOrderUidParams(\n        bytes calldata orderUid\n    )\n        internal\n        pure\n        returns (bytes32 orderDigest, address owner, uint32 validTo)\n    {\n        require(orderUid.length == UID_LENGTH, \"GPv2: invalid uid\");\n\n        // Use assembly to efficiently decode packed calldata.\n        // solhint-disable-next-line no-inline-assembly\n        assembly {\n            orderDigest := calldataload(orderUid.offset)\n            owner := shr(96, calldataload(add(orderUid.offset, 32)))\n            validTo := shr(224, calldataload(add(orderUid.offset, 52)))\n        }\n    }\n}\n"},"lib/flash-loan-router/src/interface/ICowSettlement.sol":{"content":"// SPDX-License-Identifier: GPL-3.0-or-later\npragma solidity ^0.8;\n\n/// @notice An interface for CoW Protocol's settlement contract that only\n/// enumerates the functions and types needed for this project.\n/// For more information, see the project's repository:\n/// <https://github.com/cowprotocol/contracts/blob/9c1984b864d0a6703a877a088be6dac56450808c/src/contracts/GPv2Settlement.sol>\n/// The code and comments have been mostly copied from the linked resources.\ninterface ICowSettlement {\n    /// @notice A struct representing a trade to be executed as part a batch\n    /// settlement.\n    /// @dev See <https://github.com/cowprotocol/contracts/blob/9c1984b864d0a6703a877a088be6dac56450808c/src/contracts/libraries/GPv2Trade.sol#L14-L28>.\n    struct Trade {\n        uint256 sellTokenIndex;\n        uint256 buyTokenIndex;\n        address receiver;\n        uint256 sellAmount;\n        uint256 buyAmount;\n        uint32 validTo;\n        bytes32 appData;\n        uint256 feeAmount;\n        uint256 flags;\n        uint256 executedAmount;\n        bytes signature;\n    }\n\n    /// @notice Interaction data for performing arbitrary contract interactions.\n    /// Submitted to [`GPv2Settlement.settle`] for code execution.\n    /// @dev See <https://github.com/cowprotocol/contracts/blob/9c1984b864d0a6703a877a088be6dac56450808c/src/contracts/libraries/GPv2Interaction.sol#L7-L13>.\n    struct Interaction {\n        address target;\n        uint256 value;\n        bytes callData;\n    }\n\n    /// @notice The authenticator is used to determine who can call the settle\n    /// function. That is, only authorized solvers have the ability to invoke\n    /// settlements. Any valid authenticator implements an isSolver method\n    /// called by the onlySolver modifier below.\n    /// @dev See <https://github.com/cowprotocol/contracts/blob/9c1984b864d0a6703a877a088be6dac56450808c/src/contracts/GPv2Settlement.sol#L28-L32>.\n    function authenticator() external view returns (address);\n\n    /// @notice Settle the specified orders at a clearing price. Note that it is\n    /// the responsibility of the caller to ensure that all GPv2 invariants are\n    /// upheld for the input settlement, otherwise this call will revert.\n    /// Namely:\n    /// - All orders are valid and signed\n    /// - Accounts have sufficient balance and approval.\n    /// - Settlement contract has sufficient balance to execute trades. Note\n    ///   this implies that the accumulated fees held in the contract can also\n    ///   be used for settlement. This is OK since:\n    ///   - Solvers need to be authorized\n    ///   - Misbehaving solvers will be slashed for abusing accumulated fees for\n    ///     settlement\n    ///   - Critically, user orders are entirely protected\n    ///\n    /// @param tokens An array of ERC20 tokens to be traded in the settlement.\n    /// Trades encode tokens as indices into this array.\n    /// @param clearingPrices An array of clearing prices where the `i`-th price\n    /// is for the `i`-th token in the [`tokens`] array.\n    /// @param trades Trades for signed orders.\n    /// @param interactions Smart contract interactions split into three\n    /// separate lists to be run before the settlement, during the settlement\n    /// and after the settlement respectively.\n    /// @dev See <https://github.com/cowprotocol/contracts/blob/9c1984b864d0a6703a877a088be6dac56450808c/src/contracts/GPv2Settlement.sol#L99-L126>.\n    function settle(\n        address[] calldata tokens,\n        uint256[] calldata clearingPrices,\n        Trade[] calldata trades,\n        Interaction[][3] calldata interactions\n    ) external;\n}\n"},"src/libraries/DataTypes.sol":{"content":"// SPDX-License-Identifier: UNLICENSED\n// Copyright (c) 2025 Aave Labs\npragma solidity ^0.8.10;\n\n/// @notice Data types used in the Adapter Hooks & Factory.\n/// @author Aave Labs.\nlibrary DataTypes {\n  struct Permit {\n    uint256 amount;\n    uint256 deadline;\n    uint8 v;\n    bytes32 r;\n    bytes32 s;\n  }\n\n  struct CreditDelegationSig {\n    uint256 amount;\n    uint256 deadline;\n    uint8 v;\n    bytes32 r;\n    bytes32 s;\n  }\n\n  // keccak256('AdapterOrderSig(address instance,address sellToken,address buyToken,uint256 sellAmount,uint256 buyAmount,bytes32 kind,uint32 validTo,bytes32 appData)')\n  bytes32 public constant ADAPTER_ORDER_TYPEHASH =\n    0x1ca15395c04ac473d5b42656e3782ae1fce1a113fdb5432b57f8fb0870fa3178;\n\n  struct AdapterOrderSig {\n    address instance;\n    address sellToken;\n    address buyToken;\n    uint256 sellAmount;\n    uint256 buyAmount;\n    bytes32 kind;\n    uint32 validTo;\n    bytes32 appData;\n  }\n\n  /// @dev Data needed by the AdapterHook for the postHook execution.\n  struct HookOrderData {\n    // Owner of the AdapterHook Instance (the user signing the Order)\n    address owner;\n    // Address of the Instance to be receiver of the Order (as specified in the GPv2Order.Data)\n    address receiver;\n    // The asset being sold (as specified in the GPv2Order.Data)\n    address sellToken;\n    // The asset being bought (as specified in the GPv2Order.Data)\n    address buyToken;\n    // The amount to sell (as specified in the GPv2Order.Data)\n    uint256 sellAmount;\n    // The amount to buy (as specified in the GPv2Order.Data)\n    uint256 buyAmount;\n    // The kind of swap (as specified in the GPv2Order.Data)\n    bytes32 kind;\n    // The expiry date of the Order (as specified in the GPv2Order.Data)\n    uint256 validTo;\n    // The amount taken as Flashloan\n    uint256 flashLoanAmount;\n    // The fee amount to be repaid on top of the flashLoanAmount\n    uint256 flashLoanFeeAmount;\n    // The amount of sell token given as parameter for the postHook\n    uint256 hookSellTokenAmount;\n    // The amount of buy token given as parameter for the postHook\n    uint256 hookBuyTokenAmount;\n  }\n\n  struct HookAmounts {\n    // The amount taken as Flashloan\n    uint256 flashLoanAmount;\n    // The fee amount to be repaid on top of the flashLoanAmount\n    uint256 flashLoanFeeAmount;\n    // The amount of sell token given as parameter for the postHook\n    uint256 sellTokenAmount;\n    // The amount of buy token given as parameter for the postHook\n    uint256 buyTokenAmount;\n  }\n\n  struct OpenFlashLoan {\n    // Whether the AdapterHook Instance that took the Flashloan is active\n    bool instanceActive;\n    // The asset being lent\n    address asset;\n    // The total amount of the flashloan (principal + fees)\n    uint256 totalAmount;\n  }\n}\n"},"src/interfaces/IAaveBaseAdapter.sol":{"content":"// SPDX-License-Identifier: UNLICENSED\n// Copyright (c) 2025 Aave Labs\npragma solidity ^0.8.0;\n\nimport {DataTypes} from 'src/libraries/DataTypes.sol';\n\n/// @notice Base interface for all Adapter Hooks.\n/// @author Aave Labs.\ninterface IAaveBaseAdapter {\n  /// @notice Thrown when the Instance is already initialized.\n  error AlreadyInitialized();\n\n  /// @notice Thrown when the caller is not the Instance owner.\n  error CallerNotInstanceOwner();\n\n  /// @notice Thrown when the withdrawn amount is not the expected one.\n  error InvalidWithdraw();\n\n  /// @notice Thrown when the borrowed amount is not the expected one.\n  error InvalidBorrow();\n\n  /// @notice Thrown when the specified amount is invalid.\n  error InvalidAmount();\n\n  /// @notice Thrown when the specified `HookSellAmount` is invalid.\n  error InvalidHookSellAmount();\n\n  /// @notice Thrown when the current Instance balance is not the amount expected.\n  error InvalidBalance();\n\n  /// @notice Thrown when the specified amount is zero.\n  error InvalidZeroAmount();\n\n  /// @notice Thrown when the specified address is the zero address.\n  error InvalidZeroAddress();\n\n  /// @notice Thrown when the given Order signature is invalid.\n  error InvalidOrderSignature();\n\n  /// @notice Thrown when the given Order hash does not match the computed one.\n  error OrderHashMismatch();\n\n  /// @notice Thrown when the given Order buyToken is not the expected one.\n  error InvalidBuyToken();\n\n  /// @notice Thrown when the given Order sellToken is not the expected one.\n  error InvalidSellToken();\n\n  /// @notice Thrown when the given Order expiry is invalid.\n  error InvalidOrderExpiry();\n\n  /// @notice Thrown when the Order is expired.\n  error OrderExpired();\n\n  /// @notice Thrown when the given Order is a \"partially fillable\" one.\n  error OrderPartiallyFillable();\n\n  /// @notice Thrown when the given Order sellAmount is invalid.\n  error InvalidSellAmount();\n\n  /// @notice Thrown when the given Order buyAmount is invalid.\n  error InvalidBuyAmount();\n\n  /// @notice Thrown when the given Order kind is invalid.\n  error InvalidOrderKind();\n\n  /// @notice Thrown when the given Order receiver is invalid.\n  error InvalidOrderReceiver();\n\n  /// @notice Thrown when the given Order fee is not null.\n  error OrderFeeNotNull();\n\n  /// @notice Thrown when the given Order sellTokenBalance or buyTokenBalance is not null.\n  error InvalidOrderTokenBalancer();\n\n  /// @notice Sets the parameters of an Instance.\n  /// @param hookData_ The HookOrderData struct containing the order details & postHook parameters.\n  function setParameters(DataTypes.HookOrderData calldata hookData_) external;\n\n  /// @notice Returns the stored HookOrderData struct.\n  /// @return The stored HookOrderData struct.\n  function getHookData() external view returns (DataTypes.HookOrderData memory);\n\n  /// @notice AaveV3AdapterFactory contract.\n  function FACTORY() external view returns (address);\n\n  /// @notice Settlement contract.\n  function SETTLEMENT_CONTRACT() external view returns (address);\n\n  /// @notice Aave Pool contract.\n  function AAVE_POOL() external view returns (address);\n}\n"},"src/dependencies/cow/IBasicBorrower.sol":{"content":"// SPDX-License-Identifier: GPL-3.0-or-later\npragma solidity ^0.8.0;\n\nimport {IERC20} from 'openzeppelin/token/ERC20/IERC20.sol';\n\n// Taken from https://github.com/cowprotocol/flash-loan-router/blob/f9c18679df0f5cda19611b05fca1c982786071eb/src/interface/IBorrower.sol\n// and modified to only keep necessary functions for the AaveV3AdapterFactory.\ninterface IBasicBorrower {\n  /// @notice Start the flow to draw a FlashLoan then calls back the FlashLoanRouter contract with the given data\n  /// @param lender The address of the lender to draw the FlashLoan from\n  /// @param token The address of the ERC20 token for the FlashLoan\n  /// @param amount The amount of the FlashLoan\n  /// @param callbackData Data to send back to the FlashLoanRouter during the callback\n  function flashLoanAndCallBack(\n    address lender,\n    IERC20 token,\n    uint256 amount,\n    bytes calldata callbackData\n  ) external;\n}\n"},"lib/openzeppelin-contracts/contracts/interfaces/IERC20.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.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.0.0) (interfaces/IERC165.sol)\n\npragma solidity >=0.4.16;\n\nimport {IERC165} from \"../utils/introspection/IERC165.sol\";\n"},"lib/openzeppelin-contracts/contracts/utils/cryptography/MessageHashUtils.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (utils/cryptography/MessageHashUtils.sol)\n\npragma solidity ^0.8.20;\n\nimport {Strings} from \"../Strings.sol\";\n\n/**\n * @dev Signature message hash utilities for producing digests to be consumed by {ECDSA} recovery or signing.\n *\n * The library provides methods for generating a hash of a message that conforms to the\n * https://eips.ethereum.org/EIPS/eip-191[ERC-191] and https://eips.ethereum.org/EIPS/eip-712[EIP 712]\n * specifications.\n */\nlibrary MessageHashUtils {\n    /**\n     * @dev Returns the keccak256 digest of an ERC-191 signed data with version\n     * `0x45` (`personal_sign` messages).\n     *\n     * The digest is calculated by prefixing a bytes32 `messageHash` with\n     * `\"\\x19Ethereum Signed Message:\\n32\"` and hashing the result. It corresponds with the\n     * hash signed when using the https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sign[`eth_sign`] JSON-RPC method.\n     *\n     * NOTE: The `messageHash` parameter is intended to be the result of hashing a raw message with\n     * keccak256, although any bytes32 value can be safely used because the final digest will\n     * be re-hashed.\n     *\n     * See {ECDSA-recover}.\n     */\n    function toEthSignedMessageHash(bytes32 messageHash) internal pure returns (bytes32 digest) {\n        assembly (\"memory-safe\") {\n            mstore(0x00, \"\\x19Ethereum Signed Message:\\n32\") // 32 is the bytes-length of messageHash\n            mstore(0x1c, messageHash) // 0x1c (28) is the length of the prefix\n            digest := keccak256(0x00, 0x3c) // 0x3c is the length of the prefix (0x1c) + messageHash (0x20)\n        }\n    }\n\n    /**\n     * @dev Returns the keccak256 digest of an ERC-191 signed data with version\n     * `0x45` (`personal_sign` messages).\n     *\n     * The digest is calculated by prefixing an arbitrary `message` with\n     * `\"\\x19Ethereum Signed Message:\\n\" + len(message)` and hashing the result. It corresponds with the\n     * hash signed when using the https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sign[`eth_sign`] JSON-RPC method.\n     *\n     * See {ECDSA-recover}.\n     */\n    function toEthSignedMessageHash(bytes memory message) internal pure returns (bytes32) {\n        return\n            keccak256(bytes.concat(\"\\x19Ethereum Signed Message:\\n\", bytes(Strings.toString(message.length)), message));\n    }\n\n    /**\n     * @dev Returns the keccak256 digest of an ERC-191 signed data with version\n     * `0x00` (data with intended validator).\n     *\n     * The digest is calculated by prefixing an arbitrary `data` with `\"\\x19\\x00\"` and the intended\n     * `validator` address. Then hashing the result.\n     *\n     * See {ECDSA-recover}.\n     */\n    function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {\n        return keccak256(abi.encodePacked(hex\"19_00\", validator, data));\n    }\n\n    /**\n     * @dev Variant of {toDataWithIntendedValidatorHash-address-bytes} optimized for cases where `data` is a bytes32.\n     */\n    function toDataWithIntendedValidatorHash(\n        address validator,\n        bytes32 messageHash\n    ) internal pure returns (bytes32 digest) {\n        assembly (\"memory-safe\") {\n            mstore(0x00, hex\"19_00\")\n            mstore(0x02, shl(96, validator))\n            mstore(0x16, messageHash)\n            digest := keccak256(0x00, 0x36)\n        }\n    }\n\n    /**\n     * @dev Returns the keccak256 digest of an EIP-712 typed data (ERC-191 version `0x01`).\n     *\n     * The digest is calculated from a `domainSeparator` and a `structHash`, by prefixing them with\n     * `\\x19\\x01` and hashing the result. It corresponds to the hash signed by the\n     * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] JSON-RPC method as part of EIP-712.\n     *\n     * See {ECDSA-recover}.\n     */\n    function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 digest) {\n        assembly (\"memory-safe\") {\n            let ptr := mload(0x40)\n            mstore(ptr, hex\"19_01\")\n            mstore(add(ptr, 0x02), domainSeparator)\n            mstore(add(ptr, 0x22), structHash)\n            digest := keccak256(ptr, 0x42)\n        }\n    }\n}\n"},"lib/openzeppelin-contracts/contracts/utils/ShortStrings.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (utils/ShortStrings.sol)\n\npragma solidity ^0.8.20;\n\nimport {StorageSlot} from \"./StorageSlot.sol\";\n\n// | string  | 0xAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA   |\n// | length  | 0x                                                              BB |\ntype ShortString is bytes32;\n\n/**\n * @dev This library provides functions to convert short memory strings\n * into a `ShortString` type that can be used as an immutable variable.\n *\n * Strings of arbitrary length can be optimized using this library if\n * they are short enough (up to 31 bytes) by packing them with their\n * length (1 byte) in a single EVM word (32 bytes). Additionally, a\n * fallback mechanism can be used for every other case.\n *\n * Usage example:\n *\n * ```solidity\n * contract Named {\n *     using ShortStrings for *;\n *\n *     ShortString private immutable _name;\n *     string private _nameFallback;\n *\n *     constructor(string memory contractName) {\n *         _name = contractName.toShortStringWithFallback(_nameFallback);\n *     }\n *\n *     function name() external view returns (string memory) {\n *         return _name.toStringWithFallback(_nameFallback);\n *     }\n * }\n * ```\n */\nlibrary ShortStrings {\n    // Used as an identifier for strings longer than 31 bytes.\n    bytes32 private constant FALLBACK_SENTINEL = 0x00000000000000000000000000000000000000000000000000000000000000FF;\n\n    error StringTooLong(string str);\n    error InvalidShortString();\n\n    /**\n     * @dev Encode a string of at most 31 chars into a `ShortString`.\n     *\n     * This will trigger a `StringTooLong` error is the input string is too long.\n     */\n    function toShortString(string memory str) internal pure returns (ShortString) {\n        bytes memory bstr = bytes(str);\n        if (bstr.length > 31) {\n            revert StringTooLong(str);\n        }\n        return ShortString.wrap(bytes32(uint256(bytes32(bstr)) | bstr.length));\n    }\n\n    /**\n     * @dev Decode a `ShortString` back to a \"normal\" string.\n     */\n    function toString(ShortString sstr) internal pure returns (string memory) {\n        uint256 len = byteLength(sstr);\n        // using `new string(len)` would work locally but is not memory safe.\n        string memory str = new string(32);\n        assembly (\"memory-safe\") {\n            mstore(str, len)\n            mstore(add(str, 0x20), sstr)\n        }\n        return str;\n    }\n\n    /**\n     * @dev Return the length of a `ShortString`.\n     */\n    function byteLength(ShortString sstr) internal pure returns (uint256) {\n        uint256 result = uint256(ShortString.unwrap(sstr)) & 0xFF;\n        if (result > 31) {\n            revert InvalidShortString();\n        }\n        return result;\n    }\n\n    /**\n     * @dev Encode a string into a `ShortString`, or write it to storage if it is too long.\n     */\n    function toShortStringWithFallback(string memory value, string storage store) internal returns (ShortString) {\n        if (bytes(value).length < 32) {\n            return toShortString(value);\n        } else {\n            StorageSlot.getStringSlot(store).value = value;\n            return ShortString.wrap(FALLBACK_SENTINEL);\n        }\n    }\n\n    /**\n     * @dev Decode a string that was encoded to `ShortString` or written to storage using {toShortStringWithFallback}.\n     */\n    function toStringWithFallback(ShortString value, string storage store) internal pure returns (string memory) {\n        if (ShortString.unwrap(value) != FALLBACK_SENTINEL) {\n            return toString(value);\n        } else {\n            return store;\n        }\n    }\n\n    /**\n     * @dev Return the length of a string that was encoded to `ShortString` or written to storage using\n     * {toShortStringWithFallback}.\n     *\n     * WARNING: This will return the \"byte length\" of the string. This may not reflect the actual length in terms of\n     * actual characters as the UTF-8 encoding of a single character can span over multiple bytes.\n     */\n    function byteLengthWithFallback(ShortString value, string storage store) internal view returns (uint256) {\n        if (ShortString.unwrap(value) != FALLBACK_SENTINEL) {\n            return byteLength(value);\n        } else {\n            return bytes(store).length;\n        }\n    }\n}\n"},"lib/openzeppelin-contracts/contracts/interfaces/IERC5267.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC5267.sol)\n\npragma solidity >=0.4.16;\n\ninterface IERC5267 {\n    /**\n     * @dev MAY be emitted to signal that the domain could have changed.\n     */\n    event EIP712DomainChanged();\n\n    /**\n     * @dev returns the fields and values that describe the domain separator used by this contract for EIP-712\n     * signature.\n     */\n    function eip712Domain()\n        external\n        view\n        returns (\n            bytes1 fields,\n            string memory name,\n            string memory version,\n            uint256 chainId,\n            address verifyingContract,\n            bytes32 salt,\n            uint256[] memory extensions\n        );\n}\n"},"lib/openzeppelin-contracts/contracts/utils/cryptography/ECDSA.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/cryptography/ECDSA.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\n *\n * These functions can be used to verify that a message was signed by the holder\n * of the private keys of a given address.\n */\nlibrary ECDSA {\n    enum RecoverError {\n        NoError,\n        InvalidSignature,\n        InvalidSignatureLength,\n        InvalidSignatureS\n    }\n\n    /**\n     * @dev The signature derives the `address(0)`.\n     */\n    error ECDSAInvalidSignature();\n\n    /**\n     * @dev The signature has an invalid length.\n     */\n    error ECDSAInvalidSignatureLength(uint256 length);\n\n    /**\n     * @dev The signature has an S value that is in the upper half order.\n     */\n    error ECDSAInvalidSignatureS(bytes32 s);\n\n    /**\n     * @dev Returns the address that signed a hashed message (`hash`) with `signature` or an error. This will not\n     * return address(0) without also returning an error description. Errors are documented using an enum (error type)\n     * and a bytes32 providing additional information about the error.\n     *\n     * If no error is returned, then the address can be used for verification purposes.\n     *\n     * The `ecrecover` EVM precompile allows for malleable (non-unique) signatures:\n     * this function rejects them by requiring the `s` value to be in the lower\n     * half order, and the `v` value to be either 27 or 28.\n     *\n     * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n     * verification to be secure: it is possible to craft signatures that\n     * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n     * this is by receiving a hash of the original message (which may otherwise\n     * be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it.\n     *\n     * Documentation for signature generation:\n     * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\n     * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\n     */\n    function tryRecover(\n        bytes32 hash,\n        bytes memory signature\n    ) internal pure returns (address recovered, RecoverError err, bytes32 errArg) {\n        if (signature.length == 65) {\n            bytes32 r;\n            bytes32 s;\n            uint8 v;\n            // ecrecover takes the signature parameters, and the only way to get them\n            // currently is to use assembly.\n            assembly (\"memory-safe\") {\n                r := mload(add(signature, 0x20))\n                s := mload(add(signature, 0x40))\n                v := byte(0, mload(add(signature, 0x60)))\n            }\n            return tryRecover(hash, v, r, s);\n        } else {\n            return (address(0), RecoverError.InvalidSignatureLength, bytes32(signature.length));\n        }\n    }\n\n    /**\n     * @dev Returns the address that signed a hashed message (`hash`) with\n     * `signature`. This address can then be used for verification purposes.\n     *\n     * The `ecrecover` EVM precompile allows for malleable (non-unique) signatures:\n     * this function rejects them by requiring the `s` value to be in the lower\n     * half order, and the `v` value to be either 27 or 28.\n     *\n     * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n     * verification to be secure: it is possible to craft signatures that\n     * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n     * this is by receiving a hash of the original message (which may otherwise\n     * be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it.\n     */\n    function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\n        (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, signature);\n        _throwError(error, errorArg);\n        return recovered;\n    }\n\n    /**\n     * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\n     *\n     * See https://eips.ethereum.org/EIPS/eip-2098[ERC-2098 short signatures]\n     */\n    function tryRecover(\n        bytes32 hash,\n        bytes32 r,\n        bytes32 vs\n    ) internal pure returns (address recovered, RecoverError err, bytes32 errArg) {\n        unchecked {\n            bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\n            // We do not check for an overflow here since the shift operation results in 0 or 1.\n            uint8 v = uint8((uint256(vs) >> 255) + 27);\n            return tryRecover(hash, v, r, s);\n        }\n    }\n\n    /**\n     * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\n     */\n    function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {\n        (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, r, vs);\n        _throwError(error, errorArg);\n        return recovered;\n    }\n\n    /**\n     * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\n     * `r` and `s` signature fields separately.\n     */\n    function tryRecover(\n        bytes32 hash,\n        uint8 v,\n        bytes32 r,\n        bytes32 s\n    ) internal pure returns (address recovered, RecoverError err, bytes32 errArg) {\n        // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\n        // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\n        // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most\n        // signatures from current libraries generate a unique signature with an s-value in the lower half order.\n        //\n        // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\n        // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\n        // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\n        // these malleable signatures as well.\n        if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n            return (address(0), RecoverError.InvalidSignatureS, s);\n        }\n\n        // If the signature is valid (and not malleable), return the signer address\n        address signer = ecrecover(hash, v, r, s);\n        if (signer == address(0)) {\n            return (address(0), RecoverError.InvalidSignature, bytes32(0));\n        }\n\n        return (signer, RecoverError.NoError, bytes32(0));\n    }\n\n    /**\n     * @dev Overload of {ECDSA-recover} that receives the `v`,\n     * `r` and `s` signature fields separately.\n     */\n    function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {\n        (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, v, r, s);\n        _throwError(error, errorArg);\n        return recovered;\n    }\n\n    /**\n     * @dev Optionally reverts with the corresponding custom error according to the `error` argument provided.\n     */\n    function _throwError(RecoverError error, bytes32 errorArg) private pure {\n        if (error == RecoverError.NoError) {\n            return; // no error: do nothing\n        } else if (error == RecoverError.InvalidSignature) {\n            revert ECDSAInvalidSignature();\n        } else if (error == RecoverError.InvalidSignatureLength) {\n            revert ECDSAInvalidSignatureLength(uint256(errorArg));\n        } else if (error == RecoverError.InvalidSignatureS) {\n            revert ECDSAInvalidSignatureS(errorArg);\n        }\n    }\n}\n"},"lib/openzeppelin-contracts/contracts/interfaces/IERC1271.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (interfaces/IERC1271.sol)\n\npragma solidity >=0.5.0;\n\n/**\n * @dev Interface of the ERC-1271 standard signature validation method for\n * contracts as defined in https://eips.ethereum.org/EIPS/eip-1271[ERC-1271].\n */\ninterface IERC1271 {\n    /**\n     * @dev Should return whether the signature provided is valid for the provided data\n     * @param hash      Hash of the data to be signed\n     * @param signature Signature byte array associated with `hash`\n     */\n    function isValidSignature(bytes32 hash, bytes calldata signature) external view returns (bytes4 magicValue);\n}\n"},"lib/openzeppelin-contracts/contracts/interfaces/IERC7913.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity >=0.5.0;\n\n/**\n * @dev Signature verifier interface.\n */\ninterface IERC7913SignatureVerifier {\n    /**\n     * @dev Verifies `signature` as a valid signature of `hash` by `key`.\n     *\n     * MUST return the bytes4 magic value IERC7913SignatureVerifier.verify.selector if the signature is valid.\n     * SHOULD return 0xffffffff or revert if the signature is not valid.\n     * SHOULD return 0xffffffff or revert if the key is empty\n     */\n    function verify(bytes calldata key, bytes32 hash, bytes calldata signature) external view returns (bytes4);\n}\n"},"lib/openzeppelin-contracts/contracts/utils/Bytes.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.2.0) (utils/Bytes.sol)\n\npragma solidity ^0.8.24;\n\nimport {Math} from \"./math/Math.sol\";\n\n/**\n * @dev Bytes operations.\n */\nlibrary Bytes {\n    /**\n     * @dev Forward search for `s` in `buffer`\n     * * If `s` is present in the buffer, returns the index of the first instance\n     * * If `s` is not present in the buffer, returns type(uint256).max\n     *\n     * NOTE: replicates the behavior of https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf[Javascript's `Array.indexOf`]\n     */\n    function indexOf(bytes memory buffer, bytes1 s) internal pure returns (uint256) {\n        return indexOf(buffer, s, 0);\n    }\n\n    /**\n     * @dev Forward search for `s` in `buffer` starting at position `pos`\n     * * If `s` is present in the buffer (at or after `pos`), returns the index of the next instance\n     * * If `s` is not present in the buffer (at or after `pos`), returns type(uint256).max\n     *\n     * NOTE: replicates the behavior of https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf[Javascript's `Array.indexOf`]\n     */\n    function indexOf(bytes memory buffer, bytes1 s, uint256 pos) internal pure returns (uint256) {\n        uint256 length = buffer.length;\n        for (uint256 i = pos; i < length; ++i) {\n            if (bytes1(_unsafeReadBytesOffset(buffer, i)) == s) {\n                return i;\n            }\n        }\n        return type(uint256).max;\n    }\n\n    /**\n     * @dev Backward search for `s` in `buffer`\n     * * If `s` is present in the buffer, returns the index of the last instance\n     * * If `s` is not present in the buffer, returns type(uint256).max\n     *\n     * NOTE: replicates the behavior of https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/lastIndexOf[Javascript's `Array.lastIndexOf`]\n     */\n    function lastIndexOf(bytes memory buffer, bytes1 s) internal pure returns (uint256) {\n        return lastIndexOf(buffer, s, type(uint256).max);\n    }\n\n    /**\n     * @dev Backward search for `s` in `buffer` starting at position `pos`\n     * * If `s` is present in the buffer (at or before `pos`), returns the index of the previous instance\n     * * If `s` is not present in the buffer (at or before `pos`), returns type(uint256).max\n     *\n     * NOTE: replicates the behavior of https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/lastIndexOf[Javascript's `Array.lastIndexOf`]\n     */\n    function lastIndexOf(bytes memory buffer, bytes1 s, uint256 pos) internal pure returns (uint256) {\n        unchecked {\n            uint256 length = buffer.length;\n            // NOTE here we cannot do `i = Math.min(pos + 1, length)` because `pos + 1` could overflow\n            for (uint256 i = Math.min(pos, length - 1) + 1; i > 0; --i) {\n                if (bytes1(_unsafeReadBytesOffset(buffer, i - 1)) == s) {\n                    return i - 1;\n                }\n            }\n            return type(uint256).max;\n        }\n    }\n\n    /**\n     * @dev Copies the content of `buffer`, from `start` (included) to the end of `buffer` into a new bytes object in\n     * memory.\n     *\n     * NOTE: replicates the behavior of https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice[Javascript's `Array.slice`]\n     */\n    function slice(bytes memory buffer, uint256 start) internal pure returns (bytes memory) {\n        return slice(buffer, start, buffer.length);\n    }\n\n    /**\n     * @dev Copies the content of `buffer`, from `start` (included) to `end` (excluded) into a new bytes object in\n     * memory.\n     *\n     * NOTE: replicates the behavior of https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice[Javascript's `Array.slice`]\n     */\n    function slice(bytes memory buffer, uint256 start, uint256 end) internal pure returns (bytes memory) {\n        // sanitize\n        uint256 length = buffer.length;\n        end = Math.min(end, length);\n        start = Math.min(start, end);\n\n        // allocate and copy\n        bytes memory result = new bytes(end - start);\n        assembly (\"memory-safe\") {\n            mcopy(add(result, 0x20), add(add(buffer, 0x20), start), sub(end, start))\n        }\n\n        return result;\n    }\n\n    /**\n     * @dev Reads a bytes32 from a bytes array without bounds checking.\n     *\n     * NOTE: making this function internal would mean it could be used with memory unsafe offset, and marking the\n     * assembly block as such would prevent some optimizations.\n     */\n    function _unsafeReadBytesOffset(bytes memory buffer, uint256 offset) private pure returns (bytes32 value) {\n        // This is not memory safe in the general case, but all calls to this private function are within bounds.\n        assembly (\"memory-safe\") {\n            value := mload(add(add(buffer, 0x20), offset))\n        }\n    }\n}\n"},"lib/openzeppelin-contracts/contracts/utils/Create2.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/Create2.sol)\n\npragma solidity ^0.8.20;\n\nimport {Errors} from \"./Errors.sol\";\n\n/**\n * @dev Helper to make usage of the `CREATE2` EVM opcode easier and safer.\n * `CREATE2` can be used to compute in advance the address where a smart\n * contract will be deployed, which allows for interesting new mechanisms known\n * as 'counterfactual interactions'.\n *\n * See the https://eips.ethereum.org/EIPS/eip-1014#motivation[EIP] for more\n * information.\n */\nlibrary Create2 {\n    /**\n     * @dev There's no code to deploy.\n     */\n    error Create2EmptyBytecode();\n\n    /**\n     * @dev Deploys a contract using `CREATE2`. The address where the contract\n     * will be deployed can be known in advance via {computeAddress}.\n     *\n     * The bytecode for a contract can be obtained from Solidity with\n     * `type(contractName).creationCode`.\n     *\n     * Requirements:\n     *\n     * - `bytecode` must not be empty.\n     * - `salt` must have not been used for `bytecode` already.\n     * - the factory must have a balance of at least `amount`.\n     * - if `amount` is non-zero, `bytecode` must have a `payable` constructor.\n     */\n    function deploy(uint256 amount, bytes32 salt, bytes memory bytecode) internal returns (address addr) {\n        if (address(this).balance < amount) {\n            revert Errors.InsufficientBalance(address(this).balance, amount);\n        }\n        if (bytecode.length == 0) {\n            revert Create2EmptyBytecode();\n        }\n        assembly (\"memory-safe\") {\n            addr := create2(amount, add(bytecode, 0x20), mload(bytecode), salt)\n            // if no address was created, and returndata is not empty, bubble revert\n            if and(iszero(addr), not(iszero(returndatasize()))) {\n                let p := mload(0x40)\n                returndatacopy(p, 0, returndatasize())\n                revert(p, returndatasize())\n            }\n        }\n        if (addr == address(0)) {\n            revert Errors.FailedDeployment();\n        }\n    }\n\n    /**\n     * @dev Returns the address where a contract will be stored if deployed via {deploy}. Any change in the\n     * `bytecodeHash` or `salt` will result in a new destination address.\n     */\n    function computeAddress(bytes32 salt, bytes32 bytecodeHash) internal view returns (address) {\n        return computeAddress(salt, bytecodeHash, address(this));\n    }\n\n    /**\n     * @dev Returns the address where a contract will be stored if deployed via {deploy} from a contract located at\n     * `deployer`. If `deployer` is this contract's address, returns the same value as {computeAddress}.\n     */\n    function computeAddress(bytes32 salt, bytes32 bytecodeHash, address deployer) internal pure returns (address addr) {\n        assembly (\"memory-safe\") {\n            let ptr := mload(0x40) // Get free memory pointer\n\n            // |                   | ↓ ptr ...  ↓ ptr + 0x0B (start) ...  ↓ ptr + 0x20 ...  ↓ ptr + 0x40 ...   |\n            // |-------------------|---------------------------------------------------------------------------|\n            // | bytecodeHash      |                                                        CCCCCCCCCCCCC...CC |\n            // | salt              |                                      BBBBBBBBBBBBB...BB                   |\n            // | deployer          | 000000...0000AAAAAAAAAAAAAAAAAAA...AA                                     |\n            // | 0xFF              |            FF                                                             |\n            // |-------------------|---------------------------------------------------------------------------|\n            // | memory            | 000000...00FFAAAAAAAAAAAAAAAAAAA...AABBBBBBBBBBBBB...BBCCCCCCCCCCCCC...CC |\n            // | keccak(start, 85) |            ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑ |\n\n            mstore(add(ptr, 0x40), bytecodeHash)\n            mstore(add(ptr, 0x20), salt)\n            mstore(ptr, deployer) // Right-aligned with 12 preceding garbage bytes\n            let start := add(ptr, 0x0b) // The hashed data starts at the final garbage byte which we will set to 0xff\n            mstore8(start, 0xff)\n            addr := and(keccak256(start, 85), 0xffffffffffffffffffffffffffffffffffffffff)\n        }\n    }\n}\n"},"lib/openzeppelin-contracts/contracts/utils/Errors.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/Errors.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Collection of common custom errors used in multiple contracts\n *\n * IMPORTANT: Backwards compatibility is not guaranteed in future versions of the library.\n * It is recommended to avoid relying on the error API for critical functionality.\n *\n * _Available since v5.1._\n */\nlibrary Errors {\n    /**\n     * @dev The ETH balance of the account is not enough to perform the operation.\n     */\n    error InsufficientBalance(uint256 balance, uint256 needed);\n\n    /**\n     * @dev A call to an address target failed. The target may have reverted.\n     */\n    error FailedCall();\n\n    /**\n     * @dev The deployment failed.\n     */\n    error FailedDeployment();\n\n    /**\n     * @dev A necessary precompile is missing.\n     */\n    error MissingPrecompile(address);\n}\n"},"lib/openzeppelin-contracts/contracts/utils/Context.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context {\n    function _msgSender() internal view virtual returns (address) {\n        return msg.sender;\n    }\n\n    function _msgData() internal view virtual returns (bytes calldata) {\n        return msg.data;\n    }\n\n    function _contextSuffixLength() internal view virtual returns (uint256) {\n        return 0;\n    }\n}\n"},"lib/flash-loan-router/src/library/Loan.sol":{"content":"// SPDX-License-Identifier: GPL-3.0-or-later\npragma solidity ^0.8;\n\nimport {IBorrower} from \"../interface/IBorrower.sol\";\nimport {IERC20} from \"../vendored/IERC20.sol\";\n\n/// @title Loan Library\n/// @author CoW DAO developers\n/// @notice A library describing a flash-loan request by the flash-loan router\n/// and providing related utility functions.\nlibrary Loan {\n    /// @notice The representation of a flash-loan request by the flash-loan\n    /// router.\n    struct Data {\n        /// @notice The amount of funds requested from the lender.\n        uint256 amount;\n        /// @notice The contract that directly requests the flash loan from the\n        /// lender and eventually calls back the router.\n        IBorrower borrower;\n        /// @notice The contract that loans out the funds to the borrower.\n        address lender;\n        /// @notice The token that is requested in the flash loan.\n        IERC20 token;\n    }\n\n    /// @notice A type that wraps a pointer to raw data in memory.\n    /// @dev A loan is expected to be encoded in memory as follows:\n    ///\n    /// Content: |--  amount  --||-- borrower --||--  lender  --||--  token   --|\n    /// Length:  |<--32 bytes-->||<--20 bytes-->||<--20 bytes-->||<--20 bytes-->|\n    type EncodedData is uint256;\n\n    // This is a list of offsets to add to the memory pointer to get the memory\n    // location of the respective loan parameter. Note: -12 because addresses\n    // are zero-padded to the left and mload/mstore work on groups of 32 bytes.\n    uint256 private constant OFFSET_BORROWER = 32 - 12;\n    uint256 private constant OFFSET_LENDER = 32 + 1 * 20 - 12;\n    uint256 private constant OFFSET_TOKEN = 32 + 2 * 20 - 12;\n\n    /// @notice The number of sequential bytes required to encode a loan in\n    /// memory.\n    uint256 internal constant ENCODED_LOAN_BYTE_SIZE = 32 + 3 * 20;\n\n    /// @notice Write the input loan to the memory location pointed to by the\n    /// input encodedLoan.\n    /// @param encodedLoan The memory location from which to start writing the\n    /// byte representation of the loan. It is assumed to have at least\n    /// `ENCODED_LOAN_BYTE_SIZE` available from that point it in memory.\n    /// @param loan The loan to store.\n    function store(EncodedData encodedLoan, Data calldata loan) internal pure {\n        uint256 amount = loan.amount;\n        IBorrower borrower = loan.borrower;\n        address lender = loan.lender;\n        IERC20 token = loan.token;\n\n        // Note: addresses are right-aligned, memory is written to starting\n        // from the end and overwriting the address left-side padding.\n        assembly (\"memory-safe\") {\n            // Unchecked: we assume that the input value isn't at the end of the\n            // memory array. This does not happen with Solidity standard memory\n            // allocation.\n            mstore(add(encodedLoan, OFFSET_TOKEN), token)\n            mstore(add(encodedLoan, OFFSET_LENDER), lender)\n            mstore(add(encodedLoan, OFFSET_BORROWER), borrower)\n            // offset is zero\n            mstore(encodedLoan, amount)\n        }\n    }\n\n    /// @notice Reads the loan parameter from the input location in memory.\n    /// @param loan The memory location from which to read the loan.\n    /// @return amount The amount to be borrowed (see `Loan.Data`).\n    /// @return borrower The address of the borrower contract (see `Loan.Data`).\n    /// @return lender The lender address (see `Loan.Data`).\n    /// @return token The token to borrow (see `Loan.Data`).\n    function decode(EncodedData loan)\n        internal\n        pure\n        returns (uint256 amount, IBorrower borrower, address lender, IERC20 token)\n    {\n        assembly (\"memory-safe\") {\n            // Note: the values don't need to be masked since masking occurs\n            // when the value is accessed and not when stored.\n            // <https://docs.soliditylang.org/en/v0.8.28/assembly.html#access-to-external-variables-functions-and-libraries>\n            amount := mload(loan)\n            borrower := mload(add(loan, OFFSET_BORROWER))\n            lender := mload(add(loan, OFFSET_LENDER))\n            token := mload(add(loan, OFFSET_TOKEN))\n        }\n    }\n}\n"},"lib/flash-loan-router/src/vendored/ICowAuthentication.sol":{"content":"// SPDX-License-Identifier: LGPL-3.0-or-later\n\n// Vendored from CoW DAO contracts with minor modifications:\n// - Formatted code\n// - Changed contract name\n// <https://github.com/cowprotocol/contracts/blob/9c1984b864d0a6703a877a088be6dac56450808c/src/contracts/interfaces/GPv2Authentication.sol>\n\npragma solidity >=0.7.6 <0.9.0;\n\n/// @title Gnosis Protocol v2 Authentication Interface\n/// @author Gnosis Developers\ninterface ICowAuthentication {\n    /// @dev determines whether the provided address is an authenticated solver.\n    /// @param prospectiveSolver the address of prospective solver.\n    /// @return true when prospectiveSolver is an authenticated solver, otherwise false.\n    function isSolver(address prospectiveSolver) external view returns (bool);\n}\n"},"lib/contracts/src/contracts/interfaces/IERC20.sol":{"content":"// SPDX-License-Identifier: MIT\n\n// Vendored from OpenZeppelin contracts with minor modifications:\n// - Modified Solidity version\n// - Formatted code\n// - Added `name`, `symbol` and `decimals` function declarations\n// <https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v3.4.0/contracts/token/ERC20/IERC20.sol>\n\npragma solidity >=0.7.6 <0.9.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n    /**\n     * @dev Returns the name of the token.\n     */\n    function name() external view returns (string memory);\n\n    /**\n     * @dev Returns the symbol of the token.\n     */\n    function symbol() external view returns (string memory);\n\n    /**\n     * @dev Returns the number of decimals the token uses.\n     */\n    function decimals() external view returns (uint8);\n\n    /**\n     * @dev Returns the amount of tokens in existence.\n     */\n    function totalSupply() external view returns (uint256);\n\n    /**\n     * @dev Returns the amount of tokens owned by `account`.\n     */\n    function balanceOf(address account) external view returns (uint256);\n\n    /**\n     * @dev Moves `amount` tokens from the caller's account to `recipient`.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transfer(\n        address recipient,\n        uint256 amount\n    ) 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(\n        address owner,\n        address spender\n    ) external view returns (uint256);\n\n    /**\n     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\n     * that someone may use both the old and the new allowance by unfortunate\n     * transaction ordering. One possible solution to mitigate this race\n     * condition is to first reduce the spender's allowance to 0 and set the\n     * desired value afterwards:\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n     *\n     * Emits an {Approval} event.\n     */\n    function approve(address spender, uint256 amount) external returns (bool);\n\n    /**\n     * @dev Moves `amount` tokens from `sender` to `recipient` using the\n     * allowance mechanism. `amount` is then deducted from the caller's\n     * allowance.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transferFrom(\n        address sender,\n        address recipient,\n        uint256 amount\n    ) external returns (bool);\n\n    /**\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\n     * another (`to`).\n     *\n     * Note that `value` may be zero.\n     */\n    event Transfer(address indexed from, address indexed to, uint256 value);\n\n    /**\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n     * a call to {approve}. `value` is the new allowance.\n     */\n    event Approval(\n        address indexed owner,\n        address indexed spender,\n        uint256 value\n    );\n}\n"},"lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.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"},"lib/openzeppelin-contracts/contracts/utils/Strings.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (utils/Strings.sol)\n\npragma solidity ^0.8.20;\n\nimport {Math} from \"./math/Math.sol\";\nimport {SafeCast} from \"./math/SafeCast.sol\";\nimport {SignedMath} from \"./math/SignedMath.sol\";\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n    using SafeCast for *;\n\n    bytes16 private constant HEX_DIGITS = \"0123456789abcdef\";\n    uint8 private constant ADDRESS_LENGTH = 20;\n    uint256 private constant SPECIAL_CHARS_LOOKUP =\n        (1 << 0x08) | // backspace\n            (1 << 0x09) | // tab\n            (1 << 0x0a) | // newline\n            (1 << 0x0c) | // form feed\n            (1 << 0x0d) | // carriage return\n            (1 << 0x22) | // double quote\n            (1 << 0x5c); // backslash\n\n    /**\n     * @dev The `value` string doesn't fit in the specified `length`.\n     */\n    error StringsInsufficientHexLength(uint256 value, uint256 length);\n\n    /**\n     * @dev The string being parsed contains characters that are not in scope of the given base.\n     */\n    error StringsInvalidChar();\n\n    /**\n     * @dev The string being parsed is not a properly formatted address.\n     */\n    error StringsInvalidAddressFormat();\n\n    /**\n     * @dev Converts a `uint256` to its ASCII `string` decimal representation.\n     */\n    function toString(uint256 value) internal pure returns (string memory) {\n        unchecked {\n            uint256 length = Math.log10(value) + 1;\n            string memory buffer = new string(length);\n            uint256 ptr;\n            assembly (\"memory-safe\") {\n                ptr := add(add(buffer, 0x20), length)\n            }\n            while (true) {\n                ptr--;\n                assembly (\"memory-safe\") {\n                    mstore8(ptr, byte(mod(value, 10), HEX_DIGITS))\n                }\n                value /= 10;\n                if (value == 0) break;\n            }\n            return buffer;\n        }\n    }\n\n    /**\n     * @dev Converts a `int256` to its ASCII `string` decimal representation.\n     */\n    function toStringSigned(int256 value) internal pure returns (string memory) {\n        return string.concat(value < 0 ? \"-\" : \"\", toString(SignedMath.abs(value)));\n    }\n\n    /**\n     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\n     */\n    function toHexString(uint256 value) internal pure returns (string memory) {\n        unchecked {\n            return toHexString(value, Math.log256(value) + 1);\n        }\n    }\n\n    /**\n     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\n     */\n    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\n        uint256 localValue = value;\n        bytes memory buffer = new bytes(2 * length + 2);\n        buffer[0] = \"0\";\n        buffer[1] = \"x\";\n        for (uint256 i = 2 * length + 1; i > 1; --i) {\n            buffer[i] = HEX_DIGITS[localValue & 0xf];\n            localValue >>= 4;\n        }\n        if (localValue != 0) {\n            revert StringsInsufficientHexLength(value, length);\n        }\n        return string(buffer);\n    }\n\n    /**\n     * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal\n     * representation.\n     */\n    function toHexString(address addr) internal pure returns (string memory) {\n        return toHexString(uint256(uint160(addr)), ADDRESS_LENGTH);\n    }\n\n    /**\n     * @dev Converts an `address` with fixed length of 20 bytes to its checksummed ASCII `string` hexadecimal\n     * representation, according to EIP-55.\n     */\n    function toChecksumHexString(address addr) internal pure returns (string memory) {\n        bytes memory buffer = bytes(toHexString(addr));\n\n        // hash the hex part of buffer (skip length + 2 bytes, length 40)\n        uint256 hashValue;\n        assembly (\"memory-safe\") {\n            hashValue := shr(96, keccak256(add(buffer, 0x22), 40))\n        }\n\n        for (uint256 i = 41; i > 1; --i) {\n            // possible values for buffer[i] are 48 (0) to 57 (9) and 97 (a) to 102 (f)\n            if (hashValue & 0xf > 7 && uint8(buffer[i]) > 96) {\n                // case shift by xoring with 0x20\n                buffer[i] ^= 0x20;\n            }\n            hashValue >>= 4;\n        }\n        return string(buffer);\n    }\n\n    /**\n     * @dev Returns true if the two strings are equal.\n     */\n    function equal(string memory a, string memory b) internal pure returns (bool) {\n        return bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b));\n    }\n\n    /**\n     * @dev Parse a decimal string and returns the value as a `uint256`.\n     *\n     * Requirements:\n     * - The string must be formatted as `[0-9]*`\n     * - The result must fit into an `uint256` type\n     */\n    function parseUint(string memory input) internal pure returns (uint256) {\n        return parseUint(input, 0, bytes(input).length);\n    }\n\n    /**\n     * @dev Variant of {parseUint-string} that parses a substring of `input` located between position `begin` (included) and\n     * `end` (excluded).\n     *\n     * Requirements:\n     * - The substring must be formatted as `[0-9]*`\n     * - The result must fit into an `uint256` type\n     */\n    function parseUint(string memory input, uint256 begin, uint256 end) internal pure returns (uint256) {\n        (bool success, uint256 value) = tryParseUint(input, begin, end);\n        if (!success) revert StringsInvalidChar();\n        return value;\n    }\n\n    /**\n     * @dev Variant of {parseUint-string} that returns false if the parsing fails because of an invalid character.\n     *\n     * NOTE: This function will revert if the result does not fit in a `uint256`.\n     */\n    function tryParseUint(string memory input) internal pure returns (bool success, uint256 value) {\n        return _tryParseUintUncheckedBounds(input, 0, bytes(input).length);\n    }\n\n    /**\n     * @dev Variant of {parseUint-string-uint256-uint256} that returns false if the parsing fails because of an invalid\n     * character.\n     *\n     * NOTE: This function will revert if the result does not fit in a `uint256`.\n     */\n    function tryParseUint(\n        string memory input,\n        uint256 begin,\n        uint256 end\n    ) internal pure returns (bool success, uint256 value) {\n        if (end > bytes(input).length || begin > end) return (false, 0);\n        return _tryParseUintUncheckedBounds(input, begin, end);\n    }\n\n    /**\n     * @dev Implementation of {tryParseUint-string-uint256-uint256} that does not check bounds. Caller should make sure that\n     * `begin <= end <= input.length`. Other inputs would result in undefined behavior.\n     */\n    function _tryParseUintUncheckedBounds(\n        string memory input,\n        uint256 begin,\n        uint256 end\n    ) private pure returns (bool success, uint256 value) {\n        bytes memory buffer = bytes(input);\n\n        uint256 result = 0;\n        for (uint256 i = begin; i < end; ++i) {\n            uint8 chr = _tryParseChr(bytes1(_unsafeReadBytesOffset(buffer, i)));\n            if (chr > 9) return (false, 0);\n            result *= 10;\n            result += chr;\n        }\n        return (true, result);\n    }\n\n    /**\n     * @dev Parse a decimal string and returns the value as a `int256`.\n     *\n     * Requirements:\n     * - The string must be formatted as `[-+]?[0-9]*`\n     * - The result must fit in an `int256` type.\n     */\n    function parseInt(string memory input) internal pure returns (int256) {\n        return parseInt(input, 0, bytes(input).length);\n    }\n\n    /**\n     * @dev Variant of {parseInt-string} that parses a substring of `input` located between position `begin` (included) and\n     * `end` (excluded).\n     *\n     * Requirements:\n     * - The substring must be formatted as `[-+]?[0-9]*`\n     * - The result must fit in an `int256` type.\n     */\n    function parseInt(string memory input, uint256 begin, uint256 end) internal pure returns (int256) {\n        (bool success, int256 value) = tryParseInt(input, begin, end);\n        if (!success) revert StringsInvalidChar();\n        return value;\n    }\n\n    /**\n     * @dev Variant of {parseInt-string} that returns false if the parsing fails because of an invalid character or if\n     * the result does not fit in a `int256`.\n     *\n     * NOTE: This function will revert if the absolute value of the result does not fit in a `uint256`.\n     */\n    function tryParseInt(string memory input) internal pure returns (bool success, int256 value) {\n        return _tryParseIntUncheckedBounds(input, 0, bytes(input).length);\n    }\n\n    uint256 private constant ABS_MIN_INT256 = 2 ** 255;\n\n    /**\n     * @dev Variant of {parseInt-string-uint256-uint256} that returns false if the parsing fails because of an invalid\n     * character or if the result does not fit in a `int256`.\n     *\n     * NOTE: This function will revert if the absolute value of the result does not fit in a `uint256`.\n     */\n    function tryParseInt(\n        string memory input,\n        uint256 begin,\n        uint256 end\n    ) internal pure returns (bool success, int256 value) {\n        if (end > bytes(input).length || begin > end) return (false, 0);\n        return _tryParseIntUncheckedBounds(input, begin, end);\n    }\n\n    /**\n     * @dev Implementation of {tryParseInt-string-uint256-uint256} that does not check bounds. Caller should make sure that\n     * `begin <= end <= input.length`. Other inputs would result in undefined behavior.\n     */\n    function _tryParseIntUncheckedBounds(\n        string memory input,\n        uint256 begin,\n        uint256 end\n    ) private pure returns (bool success, int256 value) {\n        bytes memory buffer = bytes(input);\n\n        // Check presence of a negative sign.\n        bytes1 sign = begin == end ? bytes1(0) : bytes1(_unsafeReadBytesOffset(buffer, begin)); // don't do out-of-bound (possibly unsafe) read if sub-string is empty\n        bool positiveSign = sign == bytes1(\"+\");\n        bool negativeSign = sign == bytes1(\"-\");\n        uint256 offset = (positiveSign || negativeSign).toUint();\n\n        (bool absSuccess, uint256 absValue) = tryParseUint(input, begin + offset, end);\n\n        if (absSuccess && absValue < ABS_MIN_INT256) {\n            return (true, negativeSign ? -int256(absValue) : int256(absValue));\n        } else if (absSuccess && negativeSign && absValue == ABS_MIN_INT256) {\n            return (true, type(int256).min);\n        } else return (false, 0);\n    }\n\n    /**\n     * @dev Parse a hexadecimal string (with or without \"0x\" prefix), and returns the value as a `uint256`.\n     *\n     * Requirements:\n     * - The string must be formatted as `(0x)?[0-9a-fA-F]*`\n     * - The result must fit in an `uint256` type.\n     */\n    function parseHexUint(string memory input) internal pure returns (uint256) {\n        return parseHexUint(input, 0, bytes(input).length);\n    }\n\n    /**\n     * @dev Variant of {parseHexUint-string} that parses a substring of `input` located between position `begin` (included) and\n     * `end` (excluded).\n     *\n     * Requirements:\n     * - The substring must be formatted as `(0x)?[0-9a-fA-F]*`\n     * - The result must fit in an `uint256` type.\n     */\n    function parseHexUint(string memory input, uint256 begin, uint256 end) internal pure returns (uint256) {\n        (bool success, uint256 value) = tryParseHexUint(input, begin, end);\n        if (!success) revert StringsInvalidChar();\n        return value;\n    }\n\n    /**\n     * @dev Variant of {parseHexUint-string} that returns false if the parsing fails because of an invalid character.\n     *\n     * NOTE: This function will revert if the result does not fit in a `uint256`.\n     */\n    function tryParseHexUint(string memory input) internal pure returns (bool success, uint256 value) {\n        return _tryParseHexUintUncheckedBounds(input, 0, bytes(input).length);\n    }\n\n    /**\n     * @dev Variant of {parseHexUint-string-uint256-uint256} that returns false if the parsing fails because of an\n     * invalid character.\n     *\n     * NOTE: This function will revert if the result does not fit in a `uint256`.\n     */\n    function tryParseHexUint(\n        string memory input,\n        uint256 begin,\n        uint256 end\n    ) internal pure returns (bool success, uint256 value) {\n        if (end > bytes(input).length || begin > end) return (false, 0);\n        return _tryParseHexUintUncheckedBounds(input, begin, end);\n    }\n\n    /**\n     * @dev Implementation of {tryParseHexUint-string-uint256-uint256} that does not check bounds. Caller should make sure that\n     * `begin <= end <= input.length`. Other inputs would result in undefined behavior.\n     */\n    function _tryParseHexUintUncheckedBounds(\n        string memory input,\n        uint256 begin,\n        uint256 end\n    ) private pure returns (bool success, uint256 value) {\n        bytes memory buffer = bytes(input);\n\n        // skip 0x prefix if present\n        bool hasPrefix = (end > begin + 1) && bytes2(_unsafeReadBytesOffset(buffer, begin)) == bytes2(\"0x\"); // don't do out-of-bound (possibly unsafe) read if sub-string is empty\n        uint256 offset = hasPrefix.toUint() * 2;\n\n        uint256 result = 0;\n        for (uint256 i = begin + offset; i < end; ++i) {\n            uint8 chr = _tryParseChr(bytes1(_unsafeReadBytesOffset(buffer, i)));\n            if (chr > 15) return (false, 0);\n            result *= 16;\n            unchecked {\n                // Multiplying by 16 is equivalent to a shift of 4 bits (with additional overflow check).\n                // This guarantees that adding a value < 16 will not cause an overflow, hence the unchecked.\n                result += chr;\n            }\n        }\n        return (true, result);\n    }\n\n    /**\n     * @dev Parse a hexadecimal string (with or without \"0x\" prefix), and returns the value as an `address`.\n     *\n     * Requirements:\n     * - The string must be formatted as `(0x)?[0-9a-fA-F]{40}`\n     */\n    function parseAddress(string memory input) internal pure returns (address) {\n        return parseAddress(input, 0, bytes(input).length);\n    }\n\n    /**\n     * @dev Variant of {parseAddress-string} that parses a substring of `input` located between position `begin` (included) and\n     * `end` (excluded).\n     *\n     * Requirements:\n     * - The substring must be formatted as `(0x)?[0-9a-fA-F]{40}`\n     */\n    function parseAddress(string memory input, uint256 begin, uint256 end) internal pure returns (address) {\n        (bool success, address value) = tryParseAddress(input, begin, end);\n        if (!success) revert StringsInvalidAddressFormat();\n        return value;\n    }\n\n    /**\n     * @dev Variant of {parseAddress-string} that returns false if the parsing fails because the input is not a properly\n     * formatted address. See {parseAddress-string} requirements.\n     */\n    function tryParseAddress(string memory input) internal pure returns (bool success, address value) {\n        return tryParseAddress(input, 0, bytes(input).length);\n    }\n\n    /**\n     * @dev Variant of {parseAddress-string-uint256-uint256} that returns false if the parsing fails because input is not a properly\n     * formatted address. See {parseAddress-string-uint256-uint256} requirements.\n     */\n    function tryParseAddress(\n        string memory input,\n        uint256 begin,\n        uint256 end\n    ) internal pure returns (bool success, address value) {\n        if (end > bytes(input).length || begin > end) return (false, address(0));\n\n        bool hasPrefix = (end > begin + 1) && bytes2(_unsafeReadBytesOffset(bytes(input), begin)) == bytes2(\"0x\"); // don't do out-of-bound (possibly unsafe) read if sub-string is empty\n        uint256 expectedLength = 40 + hasPrefix.toUint() * 2;\n\n        // check that input is the correct length\n        if (end - begin == expectedLength) {\n            // length guarantees that this does not overflow, and value is at most type(uint160).max\n            (bool s, uint256 v) = _tryParseHexUintUncheckedBounds(input, begin, end);\n            return (s, address(uint160(v)));\n        } else {\n            return (false, address(0));\n        }\n    }\n\n    function _tryParseChr(bytes1 chr) private pure returns (uint8) {\n        uint8 value = uint8(chr);\n\n        // Try to parse `chr`:\n        // - Case 1: [0-9]\n        // - Case 2: [a-f]\n        // - Case 3: [A-F]\n        // - otherwise not supported\n        unchecked {\n            if (value > 47 && value < 58) value -= 48;\n            else if (value > 96 && value < 103) value -= 87;\n            else if (value > 64 && value < 71) value -= 55;\n            else return type(uint8).max;\n        }\n\n        return value;\n    }\n\n    /**\n     * @dev Escape special characters in JSON strings. This can be useful to prevent JSON injection in NFT metadata.\n     *\n     * WARNING: This function should only be used in double quoted JSON strings. Single quotes are not escaped.\n     *\n     * NOTE: This function escapes all unicode characters, and not just the ones in ranges defined in section 2.5 of\n     * RFC-4627 (U+0000 to U+001F, U+0022 and U+005C). ECMAScript's `JSON.parse` does recover escaped unicode\n     * characters that are not in this range, but other tooling may provide different results.\n     */\n    function escapeJSON(string memory input) internal pure returns (string memory) {\n        bytes memory buffer = bytes(input);\n        bytes memory output = new bytes(2 * buffer.length); // worst case scenario\n        uint256 outputLength = 0;\n\n        for (uint256 i; i < buffer.length; ++i) {\n            bytes1 char = bytes1(_unsafeReadBytesOffset(buffer, i));\n            if (((SPECIAL_CHARS_LOOKUP & (1 << uint8(char))) != 0)) {\n                output[outputLength++] = \"\\\\\";\n                if (char == 0x08) output[outputLength++] = \"b\";\n                else if (char == 0x09) output[outputLength++] = \"t\";\n                else if (char == 0x0a) output[outputLength++] = \"n\";\n                else if (char == 0x0c) output[outputLength++] = \"f\";\n                else if (char == 0x0d) output[outputLength++] = \"r\";\n                else if (char == 0x5c) output[outputLength++] = \"\\\\\";\n                else if (char == 0x22) {\n                    // solhint-disable-next-line quotes\n                    output[outputLength++] = '\"';\n                }\n            } else {\n                output[outputLength++] = char;\n            }\n        }\n        // write the actual length and deallocate unused memory\n        assembly (\"memory-safe\") {\n            mstore(output, outputLength)\n            mstore(0x40, add(output, shl(5, shr(5, add(outputLength, 63)))))\n        }\n\n        return string(output);\n    }\n\n    /**\n     * @dev Reads a bytes32 from a bytes array without bounds checking.\n     *\n     * NOTE: making this function internal would mean it could be used with memory unsafe offset, and marking the\n     * assembly block as such would prevent some optimizations.\n     */\n    function _unsafeReadBytesOffset(bytes memory buffer, uint256 offset) private pure returns (bytes32 value) {\n        // This is not memory safe in the general case, but all calls to this private function are within bounds.\n        assembly (\"memory-safe\") {\n            value := mload(add(add(buffer, 0x20), offset))\n        }\n    }\n}\n"},"lib/openzeppelin-contracts/contracts/utils/StorageSlot.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/StorageSlot.sol)\n// This file was procedurally generated from scripts/generate/templates/StorageSlot.js.\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Library for reading and writing primitive types to specific storage slots.\n *\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\n * This library helps with reading and writing to such slots without the need for inline assembly.\n *\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\n *\n * Example usage to set ERC-1967 implementation slot:\n * ```solidity\n * contract ERC1967 {\n *     // Define the slot. Alternatively, use the SlotDerivation library to derive the slot.\n *     bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n *\n *     function _getImplementation() internal view returns (address) {\n *         return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\n *     }\n *\n *     function _setImplementation(address newImplementation) internal {\n *         require(newImplementation.code.length > 0);\n *         StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\n *     }\n * }\n * ```\n *\n * TIP: Consider using this library along with {SlotDerivation}.\n */\nlibrary StorageSlot {\n    struct AddressSlot {\n        address value;\n    }\n\n    struct BooleanSlot {\n        bool value;\n    }\n\n    struct Bytes32Slot {\n        bytes32 value;\n    }\n\n    struct Uint256Slot {\n        uint256 value;\n    }\n\n    struct Int256Slot {\n        int256 value;\n    }\n\n    struct StringSlot {\n        string value;\n    }\n\n    struct BytesSlot {\n        bytes value;\n    }\n\n    /**\n     * @dev Returns an `AddressSlot` with member `value` located at `slot`.\n     */\n    function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\n        assembly (\"memory-safe\") {\n            r.slot := slot\n        }\n    }\n\n    /**\n     * @dev Returns a `BooleanSlot` with member `value` located at `slot`.\n     */\n    function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\n        assembly (\"memory-safe\") {\n            r.slot := slot\n        }\n    }\n\n    /**\n     * @dev Returns a `Bytes32Slot` with member `value` located at `slot`.\n     */\n    function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\n        assembly (\"memory-safe\") {\n            r.slot := slot\n        }\n    }\n\n    /**\n     * @dev Returns a `Uint256Slot` with member `value` located at `slot`.\n     */\n    function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\n        assembly (\"memory-safe\") {\n            r.slot := slot\n        }\n    }\n\n    /**\n     * @dev Returns a `Int256Slot` with member `value` located at `slot`.\n     */\n    function getInt256Slot(bytes32 slot) internal pure returns (Int256Slot storage r) {\n        assembly (\"memory-safe\") {\n            r.slot := slot\n        }\n    }\n\n    /**\n     * @dev Returns a `StringSlot` with member `value` located at `slot`.\n     */\n    function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) {\n        assembly (\"memory-safe\") {\n            r.slot := slot\n        }\n    }\n\n    /**\n     * @dev Returns an `StringSlot` representation of the string storage pointer `store`.\n     */\n    function getStringSlot(string storage store) internal pure returns (StringSlot storage r) {\n        assembly (\"memory-safe\") {\n            r.slot := store.slot\n        }\n    }\n\n    /**\n     * @dev Returns a `BytesSlot` with member `value` located at `slot`.\n     */\n    function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) {\n        assembly (\"memory-safe\") {\n            r.slot := slot\n        }\n    }\n\n    /**\n     * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`.\n     */\n    function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) {\n        assembly (\"memory-safe\") {\n            r.slot := store.slot\n        }\n    }\n}\n"},"lib/openzeppelin-contracts/contracts/utils/math/Math.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (utils/math/Math.sol)\n\npragma solidity ^0.8.20;\n\nimport {Panic} from \"../Panic.sol\";\nimport {SafeCast} from \"./SafeCast.sol\";\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary Math {\n    enum Rounding {\n        Floor, // Toward negative infinity\n        Ceil, // Toward positive infinity\n        Trunc, // Toward zero\n        Expand // Away from zero\n    }\n\n    /**\n     * @dev Return the 512-bit addition of two uint256.\n     *\n     * The result is stored in two 256 variables such that sum = high * 2²⁵⁶ + low.\n     */\n    function add512(uint256 a, uint256 b) internal pure returns (uint256 high, uint256 low) {\n        assembly (\"memory-safe\") {\n            low := add(a, b)\n            high := lt(low, a)\n        }\n    }\n\n    /**\n     * @dev Return the 512-bit multiplication of two uint256.\n     *\n     * The result is stored in two 256 variables such that product = high * 2²⁵⁶ + low.\n     */\n    function mul512(uint256 a, uint256 b) internal pure returns (uint256 high, uint256 low) {\n        // 512-bit multiply [high low] = x * y. Compute the product mod 2²⁵⁶ and mod 2²⁵⁶ - 1, then use\n        // the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\n        // variables such that product = high * 2²⁵⁶ + low.\n        assembly (\"memory-safe\") {\n            let mm := mulmod(a, b, not(0))\n            low := mul(a, b)\n            high := sub(sub(mm, low), lt(mm, low))\n        }\n    }\n\n    /**\n     * @dev Returns the addition of two unsigned integers, with a success flag (no overflow).\n     */\n    function tryAdd(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n        unchecked {\n            uint256 c = a + b;\n            success = c >= a;\n            result = c * SafeCast.toUint(success);\n        }\n    }\n\n    /**\n     * @dev Returns the subtraction of two unsigned integers, with a success flag (no overflow).\n     */\n    function trySub(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n        unchecked {\n            uint256 c = a - b;\n            success = c <= a;\n            result = c * SafeCast.toUint(success);\n        }\n    }\n\n    /**\n     * @dev Returns the multiplication of two unsigned integers, with a success flag (no overflow).\n     */\n    function tryMul(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n        unchecked {\n            uint256 c = a * b;\n            assembly (\"memory-safe\") {\n                // Only true when the multiplication doesn't overflow\n                // (c / a == b) || (a == 0)\n                success := or(eq(div(c, a), b), iszero(a))\n            }\n            // equivalent to: success ? c : 0\n            result = c * SafeCast.toUint(success);\n        }\n    }\n\n    /**\n     * @dev Returns the division of two unsigned integers, with a success flag (no division by zero).\n     */\n    function tryDiv(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n        unchecked {\n            success = b > 0;\n            assembly (\"memory-safe\") {\n                // The `DIV` opcode returns zero when the denominator is 0.\n                result := div(a, b)\n            }\n        }\n    }\n\n    /**\n     * @dev Returns the remainder of dividing two unsigned integers, with a success flag (no division by zero).\n     */\n    function tryMod(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n        unchecked {\n            success = b > 0;\n            assembly (\"memory-safe\") {\n                // The `MOD` opcode returns zero when the denominator is 0.\n                result := mod(a, b)\n            }\n        }\n    }\n\n    /**\n     * @dev Unsigned saturating addition, bounds to `2²⁵⁶ - 1` instead of overflowing.\n     */\n    function saturatingAdd(uint256 a, uint256 b) internal pure returns (uint256) {\n        (bool success, uint256 result) = tryAdd(a, b);\n        return ternary(success, result, type(uint256).max);\n    }\n\n    /**\n     * @dev Unsigned saturating subtraction, bounds to zero instead of overflowing.\n     */\n    function saturatingSub(uint256 a, uint256 b) internal pure returns (uint256) {\n        (, uint256 result) = trySub(a, b);\n        return result;\n    }\n\n    /**\n     * @dev Unsigned saturating multiplication, bounds to `2²⁵⁶ - 1` instead of overflowing.\n     */\n    function saturatingMul(uint256 a, uint256 b) internal pure returns (uint256) {\n        (bool success, uint256 result) = tryMul(a, b);\n        return ternary(success, result, type(uint256).max);\n    }\n\n    /**\n     * @dev Branchless ternary evaluation for `a ? b : c`. Gas costs are constant.\n     *\n     * IMPORTANT: This function may reduce bytecode size and consume less gas when used standalone.\n     * However, the compiler may optimize Solidity ternary operations (i.e. `a ? b : c`) to only compute\n     * one branch when needed, making this function more expensive.\n     */\n    function ternary(bool condition, uint256 a, uint256 b) internal pure returns (uint256) {\n        unchecked {\n            // branchless ternary works because:\n            // b ^ (a ^ b) == a\n            // b ^ 0 == b\n            return b ^ ((a ^ b) * SafeCast.toUint(condition));\n        }\n    }\n\n    /**\n     * @dev Returns the largest of two numbers.\n     */\n    function max(uint256 a, uint256 b) internal pure returns (uint256) {\n        return ternary(a > b, a, b);\n    }\n\n    /**\n     * @dev Returns the smallest of two numbers.\n     */\n    function min(uint256 a, uint256 b) internal pure returns (uint256) {\n        return ternary(a < b, a, b);\n    }\n\n    /**\n     * @dev Returns the average of two numbers. The result is rounded towards\n     * zero.\n     */\n    function average(uint256 a, uint256 b) internal pure returns (uint256) {\n        // (a + b) / 2 can overflow.\n        return (a & b) + (a ^ b) / 2;\n    }\n\n    /**\n     * @dev Returns the ceiling of the division of two numbers.\n     *\n     * This differs from standard division with `/` in that it rounds towards infinity instead\n     * of rounding towards zero.\n     */\n    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n        if (b == 0) {\n            // Guarantee the same behavior as in a regular Solidity division.\n            Panic.panic(Panic.DIVISION_BY_ZERO);\n        }\n\n        // The following calculation ensures accurate ceiling division without overflow.\n        // Since a is non-zero, (a - 1) / b will not overflow.\n        // The largest possible result occurs when (a - 1) / b is type(uint256).max,\n        // but the largest value we can obtain is type(uint256).max - 1, which happens\n        // when a = type(uint256).max and b = 1.\n        unchecked {\n            return SafeCast.toUint(a > 0) * ((a - 1) / b + 1);\n        }\n    }\n\n    /**\n     * @dev Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or\n     * denominator == 0.\n     *\n     * Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by\n     * Uniswap Labs also under MIT license.\n     */\n    function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\n        unchecked {\n            (uint256 high, uint256 low) = mul512(x, y);\n\n            // Handle non-overflow cases, 256 by 256 division.\n            if (high == 0) {\n                // Solidity will revert if denominator == 0, unlike the div opcode on its own.\n                // The surrounding unchecked block does not change this fact.\n                // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\n                return low / denominator;\n            }\n\n            // Make sure the result is less than 2²⁵⁶. Also prevents denominator == 0.\n            if (denominator <= high) {\n                Panic.panic(ternary(denominator == 0, Panic.DIVISION_BY_ZERO, Panic.UNDER_OVERFLOW));\n            }\n\n            ///////////////////////////////////////////////\n            // 512 by 256 division.\n            ///////////////////////////////////////////////\n\n            // Make division exact by subtracting the remainder from [high low].\n            uint256 remainder;\n            assembly (\"memory-safe\") {\n                // Compute remainder using mulmod.\n                remainder := mulmod(x, y, denominator)\n\n                // Subtract 256 bit number from 512 bit number.\n                high := sub(high, gt(remainder, low))\n                low := sub(low, remainder)\n            }\n\n            // Factor powers of two out of denominator and compute largest power of two divisor of denominator.\n            // Always >= 1. See https://cs.stackexchange.com/q/138556/92363.\n\n            uint256 twos = denominator & (0 - denominator);\n            assembly (\"memory-safe\") {\n                // Divide denominator by twos.\n                denominator := div(denominator, twos)\n\n                // Divide [high low] by twos.\n                low := div(low, twos)\n\n                // Flip twos such that it is 2²⁵⁶ / twos. If twos is zero, then it becomes one.\n                twos := add(div(sub(0, twos), twos), 1)\n            }\n\n            // Shift in bits from high into low.\n            low |= high * twos;\n\n            // Invert denominator mod 2²⁵⁶. Now that denominator is an odd number, it has an inverse modulo 2²⁵⁶ such\n            // that denominator * inv ≡ 1 mod 2²⁵⁶. Compute the inverse by starting with a seed that is correct for\n            // four bits. That is, denominator * inv ≡ 1 mod 2⁴.\n            uint256 inverse = (3 * denominator) ^ 2;\n\n            // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also\n            // works in modular arithmetic, doubling the correct bits in each step.\n            inverse *= 2 - denominator * inverse; // inverse mod 2⁸\n            inverse *= 2 - denominator * inverse; // inverse mod 2¹⁶\n            inverse *= 2 - denominator * inverse; // inverse mod 2³²\n            inverse *= 2 - denominator * inverse; // inverse mod 2⁶⁴\n            inverse *= 2 - denominator * inverse; // inverse mod 2¹²⁸\n            inverse *= 2 - denominator * inverse; // inverse mod 2²⁵⁶\n\n            // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\n            // This will give us the correct result modulo 2²⁵⁶. Since the preconditions guarantee that the outcome is\n            // less than 2²⁵⁶, this is the final result. We don't need to compute the high bits of the result and high\n            // is no longer required.\n            result = low * inverse;\n            return result;\n        }\n    }\n\n    /**\n     * @dev Calculates x * y / denominator with full precision, following the selected rounding direction.\n     */\n    function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\n        return mulDiv(x, y, denominator) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0);\n    }\n\n    /**\n     * @dev Calculates floor(x * y >> n) with full precision. Throws if result overflows a uint256.\n     */\n    function mulShr(uint256 x, uint256 y, uint8 n) internal pure returns (uint256 result) {\n        unchecked {\n            (uint256 high, uint256 low) = mul512(x, y);\n            if (high >= 1 << n) {\n                Panic.panic(Panic.UNDER_OVERFLOW);\n            }\n            return (high << (256 - n)) | (low >> n);\n        }\n    }\n\n    /**\n     * @dev Calculates x * y >> n with full precision, following the selected rounding direction.\n     */\n    function mulShr(uint256 x, uint256 y, uint8 n, Rounding rounding) internal pure returns (uint256) {\n        return mulShr(x, y, n) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, 1 << n) > 0);\n    }\n\n    /**\n     * @dev Calculate the modular multiplicative inverse of a number in Z/nZ.\n     *\n     * If n is a prime, then Z/nZ is a field. In that case all elements are inversible, except 0.\n     * If n is not a prime, then Z/nZ is not a field, and some elements might not be inversible.\n     *\n     * If the input value is not inversible, 0 is returned.\n     *\n     * NOTE: If you know for sure that n is (big) a prime, it may be cheaper to use Fermat's little theorem and get the\n     * inverse using `Math.modExp(a, n - 2, n)`. See {invModPrime}.\n     */\n    function invMod(uint256 a, uint256 n) internal pure returns (uint256) {\n        unchecked {\n            if (n == 0) return 0;\n\n            // The inverse modulo is calculated using the Extended Euclidean Algorithm (iterative version)\n            // Used to compute integers x and y such that: ax + ny = gcd(a, n).\n            // When the gcd is 1, then the inverse of a modulo n exists and it's x.\n            // ax + ny = 1\n            // ax = 1 + (-y)n\n            // ax ≡ 1 (mod n) # x is the inverse of a modulo n\n\n            // If the remainder is 0 the gcd is n right away.\n            uint256 remainder = a % n;\n            uint256 gcd = n;\n\n            // Therefore the initial coefficients are:\n            // ax + ny = gcd(a, n) = n\n            // 0a + 1n = n\n            int256 x = 0;\n            int256 y = 1;\n\n            while (remainder != 0) {\n                uint256 quotient = gcd / remainder;\n\n                (gcd, remainder) = (\n                    // The old remainder is the next gcd to try.\n                    remainder,\n                    // Compute the next remainder.\n                    // Can't overflow given that (a % gcd) * (gcd // (a % gcd)) <= gcd\n                    // where gcd is at most n (capped to type(uint256).max)\n                    gcd - remainder * quotient\n                );\n\n                (x, y) = (\n                    // Increment the coefficient of a.\n                    y,\n                    // Decrement the coefficient of n.\n                    // Can overflow, but the result is casted to uint256 so that the\n                    // next value of y is \"wrapped around\" to a value between 0 and n - 1.\n                    x - y * int256(quotient)\n                );\n            }\n\n            if (gcd != 1) return 0; // No inverse exists.\n            return ternary(x < 0, n - uint256(-x), uint256(x)); // Wrap the result if it's negative.\n        }\n    }\n\n    /**\n     * @dev Variant of {invMod}. More efficient, but only works if `p` is known to be a prime greater than `2`.\n     *\n     * From https://en.wikipedia.org/wiki/Fermat%27s_little_theorem[Fermat's little theorem], we know that if p is\n     * prime, then `a**(p-1) ≡ 1 mod p`. As a consequence, we have `a * a**(p-2) ≡ 1 mod p`, which means that\n     * `a**(p-2)` is the modular multiplicative inverse of a in Fp.\n     *\n     * NOTE: this function does NOT check that `p` is a prime greater than `2`.\n     */\n    function invModPrime(uint256 a, uint256 p) internal view returns (uint256) {\n        unchecked {\n            return Math.modExp(a, p - 2, p);\n        }\n    }\n\n    /**\n     * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m)\n     *\n     * Requirements:\n     * - modulus can't be zero\n     * - underlying staticcall to precompile must succeed\n     *\n     * IMPORTANT: The result is only valid if the underlying call succeeds. When using this function, make\n     * sure the chain you're using it on supports the precompiled contract for modular exponentiation\n     * at address 0x05 as specified in https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise,\n     * the underlying function will succeed given the lack of a revert, but the result may be incorrectly\n     * interpreted as 0.\n     */\n    function modExp(uint256 b, uint256 e, uint256 m) internal view returns (uint256) {\n        (bool success, uint256 result) = tryModExp(b, e, m);\n        if (!success) {\n            Panic.panic(Panic.DIVISION_BY_ZERO);\n        }\n        return result;\n    }\n\n    /**\n     * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m).\n     * It includes a success flag indicating if the operation succeeded. Operation will be marked as failed if trying\n     * to operate modulo 0 or if the underlying precompile reverted.\n     *\n     * IMPORTANT: The result is only valid if the success flag is true. When using this function, make sure the chain\n     * you're using it on supports the precompiled contract for modular exponentiation at address 0x05 as specified in\n     * https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise, the underlying function will succeed given the lack\n     * of a revert, but the result may be incorrectly interpreted as 0.\n     */\n    function tryModExp(uint256 b, uint256 e, uint256 m) internal view returns (bool success, uint256 result) {\n        if (m == 0) return (false, 0);\n        assembly (\"memory-safe\") {\n            let ptr := mload(0x40)\n            // | Offset    | Content    | Content (Hex)                                                      |\n            // |-----------|------------|--------------------------------------------------------------------|\n            // | 0x00:0x1f | size of b  | 0x0000000000000000000000000000000000000000000000000000000000000020 |\n            // | 0x20:0x3f | size of e  | 0x0000000000000000000000000000000000000000000000000000000000000020 |\n            // | 0x40:0x5f | size of m  | 0x0000000000000000000000000000000000000000000000000000000000000020 |\n            // | 0x60:0x7f | value of b | 0x<.............................................................b> |\n            // | 0x80:0x9f | value of e | 0x<.............................................................e> |\n            // | 0xa0:0xbf | value of m | 0x<.............................................................m> |\n            mstore(ptr, 0x20)\n            mstore(add(ptr, 0x20), 0x20)\n            mstore(add(ptr, 0x40), 0x20)\n            mstore(add(ptr, 0x60), b)\n            mstore(add(ptr, 0x80), e)\n            mstore(add(ptr, 0xa0), m)\n\n            // Given the result < m, it's guaranteed to fit in 32 bytes,\n            // so we can use the memory scratch space located at offset 0.\n            success := staticcall(gas(), 0x05, ptr, 0xc0, 0x00, 0x20)\n            result := mload(0x00)\n        }\n    }\n\n    /**\n     * @dev Variant of {modExp} that supports inputs of arbitrary length.\n     */\n    function modExp(bytes memory b, bytes memory e, bytes memory m) internal view returns (bytes memory) {\n        (bool success, bytes memory result) = tryModExp(b, e, m);\n        if (!success) {\n            Panic.panic(Panic.DIVISION_BY_ZERO);\n        }\n        return result;\n    }\n\n    /**\n     * @dev Variant of {tryModExp} that supports inputs of arbitrary length.\n     */\n    function tryModExp(\n        bytes memory b,\n        bytes memory e,\n        bytes memory m\n    ) internal view returns (bool success, bytes memory result) {\n        if (_zeroBytes(m)) return (false, new bytes(0));\n\n        uint256 mLen = m.length;\n\n        // Encode call args in result and move the free memory pointer\n        result = abi.encodePacked(b.length, e.length, mLen, b, e, m);\n\n        assembly (\"memory-safe\") {\n            let dataPtr := add(result, 0x20)\n            // Write result on top of args to avoid allocating extra memory.\n            success := staticcall(gas(), 0x05, dataPtr, mload(result), dataPtr, mLen)\n            // Overwrite the length.\n            // result.length > returndatasize() is guaranteed because returndatasize() == m.length\n            mstore(result, mLen)\n            // Set the memory pointer after the returned data.\n            mstore(0x40, add(dataPtr, mLen))\n        }\n    }\n\n    /**\n     * @dev Returns whether the provided byte array is zero.\n     */\n    function _zeroBytes(bytes memory byteArray) private pure returns (bool) {\n        for (uint256 i = 0; i < byteArray.length; ++i) {\n            if (byteArray[i] != 0) {\n                return false;\n            }\n        }\n        return true;\n    }\n\n    /**\n     * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded\n     * towards zero.\n     *\n     * This method is based on Newton's method for computing square roots; the algorithm is restricted to only\n     * using integer operations.\n     */\n    function sqrt(uint256 a) internal pure returns (uint256) {\n        unchecked {\n            // Take care of easy edge cases when a == 0 or a == 1\n            if (a <= 1) {\n                return a;\n            }\n\n            // In this function, we use Newton's method to get a root of `f(x) := x² - a`. It involves building a\n            // sequence x_n that converges toward sqrt(a). For each iteration x_n, we also define the error between\n            // the current value as `ε_n = | x_n - sqrt(a) |`.\n            //\n            // For our first estimation, we consider `e` the smallest power of 2 which is bigger than the square root\n            // of the target. (i.e. `2**(e-1) ≤ sqrt(a) < 2**e`). We know that `e ≤ 128` because `(2¹²⁸)² = 2²⁵⁶` is\n            // bigger than any uint256.\n            //\n            // By noticing that\n            // `2**(e-1) ≤ sqrt(a) < 2**e → (2**(e-1))² ≤ a < (2**e)² → 2**(2*e-2) ≤ a < 2**(2*e)`\n            // we can deduce that `e - 1` is `log2(a) / 2`. We can thus compute `x_n = 2**(e-1)` using a method similar\n            // to the msb function.\n            uint256 aa = a;\n            uint256 xn = 1;\n\n            if (aa >= (1 << 128)) {\n                aa >>= 128;\n                xn <<= 64;\n            }\n            if (aa >= (1 << 64)) {\n                aa >>= 64;\n                xn <<= 32;\n            }\n            if (aa >= (1 << 32)) {\n                aa >>= 32;\n                xn <<= 16;\n            }\n            if (aa >= (1 << 16)) {\n                aa >>= 16;\n                xn <<= 8;\n            }\n            if (aa >= (1 << 8)) {\n                aa >>= 8;\n                xn <<= 4;\n            }\n            if (aa >= (1 << 4)) {\n                aa >>= 4;\n                xn <<= 2;\n            }\n            if (aa >= (1 << 2)) {\n                xn <<= 1;\n            }\n\n            // We now have x_n such that `x_n = 2**(e-1) ≤ sqrt(a) < 2**e = 2 * x_n`. This implies ε_n ≤ 2**(e-1).\n            //\n            // We can refine our estimation by noticing that the middle of that interval minimizes the error.\n            // If we move x_n to equal 2**(e-1) + 2**(e-2), then we reduce the error to ε_n ≤ 2**(e-2).\n            // This is going to be our x_0 (and ε_0)\n            xn = (3 * xn) >> 1; // ε_0 := | x_0 - sqrt(a) | ≤ 2**(e-2)\n\n            // From here, Newton's method give us:\n            // x_{n+1} = (x_n + a / x_n) / 2\n            //\n            // One should note that:\n            // x_{n+1}² - a = ((x_n + a / x_n) / 2)² - a\n            //              = ((x_n² + a) / (2 * x_n))² - a\n            //              = (x_n⁴ + 2 * a * x_n² + a²) / (4 * x_n²) - a\n            //              = (x_n⁴ + 2 * a * x_n² + a² - 4 * a * x_n²) / (4 * x_n²)\n            //              = (x_n⁴ - 2 * a * x_n² + a²) / (4 * x_n²)\n            //              = (x_n² - a)² / (2 * x_n)²\n            //              = ((x_n² - a) / (2 * x_n))²\n            //              ≥ 0\n            // Which proves that for all n ≥ 1, sqrt(a) ≤ x_n\n            //\n            // This gives us the proof of quadratic convergence of the sequence:\n            // ε_{n+1} = | x_{n+1} - sqrt(a) |\n            //         = | (x_n + a / x_n) / 2 - sqrt(a) |\n            //         = | (x_n² + a - 2*x_n*sqrt(a)) / (2 * x_n) |\n            //         = | (x_n - sqrt(a))² / (2 * x_n) |\n            //         = | ε_n² / (2 * x_n) |\n            //         = ε_n² / | (2 * x_n) |\n            //\n            // For the first iteration, we have a special case where x_0 is known:\n            // ε_1 = ε_0² / | (2 * x_0) |\n            //     ≤ (2**(e-2))² / (2 * (2**(e-1) + 2**(e-2)))\n            //     ≤ 2**(2*e-4) / (3 * 2**(e-1))\n            //     ≤ 2**(e-3) / 3\n            //     ≤ 2**(e-3-log2(3))\n            //     ≤ 2**(e-4.5)\n            //\n            // For the following iterations, we use the fact that, 2**(e-1) ≤ sqrt(a) ≤ x_n:\n            // ε_{n+1} = ε_n² / | (2 * x_n) |\n            //         ≤ (2**(e-k))² / (2 * 2**(e-1))\n            //         ≤ 2**(2*e-2*k) / 2**e\n            //         ≤ 2**(e-2*k)\n            xn = (xn + a / xn) >> 1; // ε_1 := | x_1 - sqrt(a) | ≤ 2**(e-4.5)  -- special case, see above\n            xn = (xn + a / xn) >> 1; // ε_2 := | x_2 - sqrt(a) | ≤ 2**(e-9)    -- general case with k = 4.5\n            xn = (xn + a / xn) >> 1; // ε_3 := | x_3 - sqrt(a) | ≤ 2**(e-18)   -- general case with k = 9\n            xn = (xn + a / xn) >> 1; // ε_4 := | x_4 - sqrt(a) | ≤ 2**(e-36)   -- general case with k = 18\n            xn = (xn + a / xn) >> 1; // ε_5 := | x_5 - sqrt(a) | ≤ 2**(e-72)   -- general case with k = 36\n            xn = (xn + a / xn) >> 1; // ε_6 := | x_6 - sqrt(a) | ≤ 2**(e-144)  -- general case with k = 72\n\n            // Because e ≤ 128 (as discussed during the first estimation phase), we know have reached a precision\n            // ε_6 ≤ 2**(e-144) < 1. Given we're operating on integers, then we can ensure that xn is now either\n            // sqrt(a) or sqrt(a) + 1.\n            return xn - SafeCast.toUint(xn > a / xn);\n        }\n    }\n\n    /**\n     * @dev Calculates sqrt(a), following the selected rounding direction.\n     */\n    function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\n        unchecked {\n            uint256 result = sqrt(a);\n            return result + SafeCast.toUint(unsignedRoundsUp(rounding) && result * result < a);\n        }\n    }\n\n    /**\n     * @dev Return the log in base 2 of a positive value rounded towards zero.\n     * Returns 0 if given 0.\n     */\n    function log2(uint256 x) internal pure returns (uint256 r) {\n        // If value has upper 128 bits set, log2 result is at least 128\n        r = SafeCast.toUint(x > 0xffffffffffffffffffffffffffffffff) << 7;\n        // If upper 64 bits of 128-bit half set, add 64 to result\n        r |= SafeCast.toUint((x >> r) > 0xffffffffffffffff) << 6;\n        // If upper 32 bits of 64-bit half set, add 32 to result\n        r |= SafeCast.toUint((x >> r) > 0xffffffff) << 5;\n        // If upper 16 bits of 32-bit half set, add 16 to result\n        r |= SafeCast.toUint((x >> r) > 0xffff) << 4;\n        // If upper 8 bits of 16-bit half set, add 8 to result\n        r |= SafeCast.toUint((x >> r) > 0xff) << 3;\n        // If upper 4 bits of 8-bit half set, add 4 to result\n        r |= SafeCast.toUint((x >> r) > 0xf) << 2;\n\n        // Shifts value right by the current result and use it as an index into this lookup table:\n        //\n        // | x (4 bits) |  index  | table[index] = MSB position |\n        // |------------|---------|-----------------------------|\n        // |    0000    |    0    |        table[0] = 0         |\n        // |    0001    |    1    |        table[1] = 0         |\n        // |    0010    |    2    |        table[2] = 1         |\n        // |    0011    |    3    |        table[3] = 1         |\n        // |    0100    |    4    |        table[4] = 2         |\n        // |    0101    |    5    |        table[5] = 2         |\n        // |    0110    |    6    |        table[6] = 2         |\n        // |    0111    |    7    |        table[7] = 2         |\n        // |    1000    |    8    |        table[8] = 3         |\n        // |    1001    |    9    |        table[9] = 3         |\n        // |    1010    |   10    |        table[10] = 3        |\n        // |    1011    |   11    |        table[11] = 3        |\n        // |    1100    |   12    |        table[12] = 3        |\n        // |    1101    |   13    |        table[13] = 3        |\n        // |    1110    |   14    |        table[14] = 3        |\n        // |    1111    |   15    |        table[15] = 3        |\n        //\n        // The lookup table is represented as a 32-byte value with the MSB positions for 0-15 in the last 16 bytes.\n        assembly (\"memory-safe\") {\n            r := or(r, byte(shr(r, x), 0x0000010102020202030303030303030300000000000000000000000000000000))\n        }\n    }\n\n    /**\n     * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\n     * Returns 0 if given 0.\n     */\n    function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\n        unchecked {\n            uint256 result = log2(value);\n            return result + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << result < value);\n        }\n    }\n\n    /**\n     * @dev Return the log in base 10 of a positive value rounded towards zero.\n     * Returns 0 if given 0.\n     */\n    function log10(uint256 value) internal pure returns (uint256) {\n        uint256 result = 0;\n        unchecked {\n            if (value >= 10 ** 64) {\n                value /= 10 ** 64;\n                result += 64;\n            }\n            if (value >= 10 ** 32) {\n                value /= 10 ** 32;\n                result += 32;\n            }\n            if (value >= 10 ** 16) {\n                value /= 10 ** 16;\n                result += 16;\n            }\n            if (value >= 10 ** 8) {\n                value /= 10 ** 8;\n                result += 8;\n            }\n            if (value >= 10 ** 4) {\n                value /= 10 ** 4;\n                result += 4;\n            }\n            if (value >= 10 ** 2) {\n                value /= 10 ** 2;\n                result += 2;\n            }\n            if (value >= 10 ** 1) {\n                result += 1;\n            }\n        }\n        return result;\n    }\n\n    /**\n     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n     * Returns 0 if given 0.\n     */\n    function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\n        unchecked {\n            uint256 result = log10(value);\n            return result + SafeCast.toUint(unsignedRoundsUp(rounding) && 10 ** result < value);\n        }\n    }\n\n    /**\n     * @dev Return the log in base 256 of a positive value rounded towards zero.\n     * Returns 0 if given 0.\n     *\n     * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\n     */\n    function log256(uint256 x) internal pure returns (uint256 r) {\n        // If value has upper 128 bits set, log2 result is at least 128\n        r = SafeCast.toUint(x > 0xffffffffffffffffffffffffffffffff) << 7;\n        // If upper 64 bits of 128-bit half set, add 64 to result\n        r |= SafeCast.toUint((x >> r) > 0xffffffffffffffff) << 6;\n        // If upper 32 bits of 64-bit half set, add 32 to result\n        r |= SafeCast.toUint((x >> r) > 0xffffffff) << 5;\n        // If upper 16 bits of 32-bit half set, add 16 to result\n        r |= SafeCast.toUint((x >> r) > 0xffff) << 4;\n        // Add 1 if upper 8 bits of 16-bit half set, and divide accumulated result by 8\n        return (r >> 3) | SafeCast.toUint((x >> r) > 0xff);\n    }\n\n    /**\n     * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\n     * Returns 0 if given 0.\n     */\n    function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\n        unchecked {\n            uint256 result = log256(value);\n            return result + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << (result << 3) < value);\n        }\n    }\n\n    /**\n     * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.\n     */\n    function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {\n        return uint8(rounding) % 2 == 1;\n    }\n}\n"},"lib/flash-loan-router/src/interface/IBorrower.sol":{"content":"// SPDX-License-Identifier: GPL-3.0-or-later\npragma solidity ^0.8;\n\nimport {IERC20} from \"../vendored/IERC20.sol\";\nimport {ICowSettlement} from \"./ICowSettlement.sol\";\nimport {IFlashLoanRouter} from \"./IFlashLoanRouter.sol\";\n\n/// @title Flash-loan Borrower\n/// @author CoW DAO developers\n/// @notice The CoW Protocol flash-loan router uses the flash-loan borrower\n/// contract as the intermediary that requests funds through a flash loan.\n/// Different flash-loan protocols have different logic for flash loans:\n/// usually, the call-back function name and parameters are different. Each\n/// flash-loan protocol must have a dedicated Borrower contract to be supported\n/// by the flash-loan router.\n/// A concrete borrower implementation generally calls a dedicated flash-loan\n/// function on the lender and then awaits for a callback from it. The borrower\n/// then calls back the router for further processing.\ninterface IBorrower {\n    /// @notice Requests a flash loan with the specified parameters from the\n    /// lender and, once the funds have been received, call back the router\n    /// while passing through the specified custom data. The flash-loan\n    /// repayment is expected to take place during the final settlement in the\n    /// router.\n    /// @param lender The address of the flash-loan lender from which to borrow.\n    /// @param token The token that is requested in the flash loan.\n    /// @param amount The amount of funds requested from the lender.\n    /// @param callBackData The data to send back when calling the router once\n    /// the loan is received.\n    function flashLoanAndCallBack(address lender, IERC20 token, uint256 amount, bytes calldata callBackData) external;\n\n    /// @notice Approves the target address to spend the specified token on\n    /// behalf of the Borrower up to the specified amount.\n    /// @dev In general, the only way to transfer funds out of this contract is\n    /// through a call to this function and a subsequent call to `transferFrom`.\n    /// This approval is expected to work similarly to an ERC-20 approval (in\n    /// particular, the allowance doesn't reset once the call is terminated).\n    /// @param token The token to approve for transferring.\n    /// @param target The address that will be allowed to spend the token.\n    /// @param amount The amount of tokens to set as the allowance.\n    function approve(IERC20 token, address target, uint256 amount) external;\n\n    /// @notice The settlement contract supported by this contract.\n    function settlementContract() external view returns (ICowSettlement);\n\n    /// @notice The router contract that manages this borrower contract. It will\n    /// be called back once the flash-loan proceeds are received and is the only\n    /// address that can trigger a flash loan request.\n    function router() external view returns (IFlashLoanRouter);\n}\n"},"lib/flash-loan-router/src/vendored/IERC20.sol":{"content":"// SPDX-License-Identifier: MIT\n\n// Vendored from OpenZeppelin contracts with minor modifications:\n// - Formatted code\n// <https://github.com/OpenZeppelin/openzeppelin-contracts/blob/release-v5.2/contracts/token/ERC20/IERC20.sol>\n// Note: v5.2 points to commit acd4ff74de833399287ed6b31b4debf6b2b35527.\n\n// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.20;\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/utils/math/SafeCast.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/math/SafeCast.sol)\n// This file was procedurally generated from scripts/generate/templates/SafeCast.js.\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Wrappers over Solidity's uintXX/intXX/bool casting operators with added overflow\n * checks.\n *\n * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can\n * easily result in undesired exploitation or bugs, since developers usually\n * assume that overflows raise errors. `SafeCast` restores this intuition by\n * reverting the transaction when such an operation overflows.\n *\n * Using this library instead of the unchecked operations eliminates an entire\n * class of bugs, so it's recommended to use it always.\n */\nlibrary SafeCast {\n    /**\n     * @dev Value doesn't fit in an uint of `bits` size.\n     */\n    error SafeCastOverflowedUintDowncast(uint8 bits, uint256 value);\n\n    /**\n     * @dev An int value doesn't fit in an uint of `bits` size.\n     */\n    error SafeCastOverflowedIntToUint(int256 value);\n\n    /**\n     * @dev Value doesn't fit in an int of `bits` size.\n     */\n    error SafeCastOverflowedIntDowncast(uint8 bits, int256 value);\n\n    /**\n     * @dev An uint value doesn't fit in an int of `bits` size.\n     */\n    error SafeCastOverflowedUintToInt(uint256 value);\n\n    /**\n     * @dev Returns the downcasted uint248 from uint256, reverting on\n     * overflow (when the input is greater than largest uint248).\n     *\n     * Counterpart to Solidity's `uint248` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 248 bits\n     */\n    function toUint248(uint256 value) internal pure returns (uint248) {\n        if (value > type(uint248).max) {\n            revert SafeCastOverflowedUintDowncast(248, value);\n        }\n        return uint248(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint240 from uint256, reverting on\n     * overflow (when the input is greater than largest uint240).\n     *\n     * Counterpart to Solidity's `uint240` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 240 bits\n     */\n    function toUint240(uint256 value) internal pure returns (uint240) {\n        if (value > type(uint240).max) {\n            revert SafeCastOverflowedUintDowncast(240, value);\n        }\n        return uint240(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint232 from uint256, reverting on\n     * overflow (when the input is greater than largest uint232).\n     *\n     * Counterpart to Solidity's `uint232` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 232 bits\n     */\n    function toUint232(uint256 value) internal pure returns (uint232) {\n        if (value > type(uint232).max) {\n            revert SafeCastOverflowedUintDowncast(232, value);\n        }\n        return uint232(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint224 from uint256, reverting on\n     * overflow (when the input is greater than largest uint224).\n     *\n     * Counterpart to Solidity's `uint224` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 224 bits\n     */\n    function toUint224(uint256 value) internal pure returns (uint224) {\n        if (value > type(uint224).max) {\n            revert SafeCastOverflowedUintDowncast(224, value);\n        }\n        return uint224(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint216 from uint256, reverting on\n     * overflow (when the input is greater than largest uint216).\n     *\n     * Counterpart to Solidity's `uint216` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 216 bits\n     */\n    function toUint216(uint256 value) internal pure returns (uint216) {\n        if (value > type(uint216).max) {\n            revert SafeCastOverflowedUintDowncast(216, value);\n        }\n        return uint216(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint208 from uint256, reverting on\n     * overflow (when the input is greater than largest uint208).\n     *\n     * Counterpart to Solidity's `uint208` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 208 bits\n     */\n    function toUint208(uint256 value) internal pure returns (uint208) {\n        if (value > type(uint208).max) {\n            revert SafeCastOverflowedUintDowncast(208, value);\n        }\n        return uint208(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint200 from uint256, reverting on\n     * overflow (when the input is greater than largest uint200).\n     *\n     * Counterpart to Solidity's `uint200` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 200 bits\n     */\n    function toUint200(uint256 value) internal pure returns (uint200) {\n        if (value > type(uint200).max) {\n            revert SafeCastOverflowedUintDowncast(200, value);\n        }\n        return uint200(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint192 from uint256, reverting on\n     * overflow (when the input is greater than largest uint192).\n     *\n     * Counterpart to Solidity's `uint192` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 192 bits\n     */\n    function toUint192(uint256 value) internal pure returns (uint192) {\n        if (value > type(uint192).max) {\n            revert SafeCastOverflowedUintDowncast(192, value);\n        }\n        return uint192(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint184 from uint256, reverting on\n     * overflow (when the input is greater than largest uint184).\n     *\n     * Counterpart to Solidity's `uint184` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 184 bits\n     */\n    function toUint184(uint256 value) internal pure returns (uint184) {\n        if (value > type(uint184).max) {\n            revert SafeCastOverflowedUintDowncast(184, value);\n        }\n        return uint184(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint176 from uint256, reverting on\n     * overflow (when the input is greater than largest uint176).\n     *\n     * Counterpart to Solidity's `uint176` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 176 bits\n     */\n    function toUint176(uint256 value) internal pure returns (uint176) {\n        if (value > type(uint176).max) {\n            revert SafeCastOverflowedUintDowncast(176, value);\n        }\n        return uint176(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint168 from uint256, reverting on\n     * overflow (when the input is greater than largest uint168).\n     *\n     * Counterpart to Solidity's `uint168` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 168 bits\n     */\n    function toUint168(uint256 value) internal pure returns (uint168) {\n        if (value > type(uint168).max) {\n            revert SafeCastOverflowedUintDowncast(168, value);\n        }\n        return uint168(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint160 from uint256, reverting on\n     * overflow (when the input is greater than largest uint160).\n     *\n     * Counterpart to Solidity's `uint160` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 160 bits\n     */\n    function toUint160(uint256 value) internal pure returns (uint160) {\n        if (value > type(uint160).max) {\n            revert SafeCastOverflowedUintDowncast(160, value);\n        }\n        return uint160(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint152 from uint256, reverting on\n     * overflow (when the input is greater than largest uint152).\n     *\n     * Counterpart to Solidity's `uint152` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 152 bits\n     */\n    function toUint152(uint256 value) internal pure returns (uint152) {\n        if (value > type(uint152).max) {\n            revert SafeCastOverflowedUintDowncast(152, value);\n        }\n        return uint152(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint144 from uint256, reverting on\n     * overflow (when the input is greater than largest uint144).\n     *\n     * Counterpart to Solidity's `uint144` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 144 bits\n     */\n    function toUint144(uint256 value) internal pure returns (uint144) {\n        if (value > type(uint144).max) {\n            revert SafeCastOverflowedUintDowncast(144, value);\n        }\n        return uint144(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint136 from uint256, reverting on\n     * overflow (when the input is greater than largest uint136).\n     *\n     * Counterpart to Solidity's `uint136` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 136 bits\n     */\n    function toUint136(uint256 value) internal pure returns (uint136) {\n        if (value > type(uint136).max) {\n            revert SafeCastOverflowedUintDowncast(136, value);\n        }\n        return uint136(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint128 from uint256, reverting on\n     * overflow (when the input is greater than largest uint128).\n     *\n     * Counterpart to Solidity's `uint128` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 128 bits\n     */\n    function toUint128(uint256 value) internal pure returns (uint128) {\n        if (value > type(uint128).max) {\n            revert SafeCastOverflowedUintDowncast(128, value);\n        }\n        return uint128(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint120 from uint256, reverting on\n     * overflow (when the input is greater than largest uint120).\n     *\n     * Counterpart to Solidity's `uint120` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 120 bits\n     */\n    function toUint120(uint256 value) internal pure returns (uint120) {\n        if (value > type(uint120).max) {\n            revert SafeCastOverflowedUintDowncast(120, value);\n        }\n        return uint120(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint112 from uint256, reverting on\n     * overflow (when the input is greater than largest uint112).\n     *\n     * Counterpart to Solidity's `uint112` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 112 bits\n     */\n    function toUint112(uint256 value) internal pure returns (uint112) {\n        if (value > type(uint112).max) {\n            revert SafeCastOverflowedUintDowncast(112, value);\n        }\n        return uint112(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint104 from uint256, reverting on\n     * overflow (when the input is greater than largest uint104).\n     *\n     * Counterpart to Solidity's `uint104` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 104 bits\n     */\n    function toUint104(uint256 value) internal pure returns (uint104) {\n        if (value > type(uint104).max) {\n            revert SafeCastOverflowedUintDowncast(104, value);\n        }\n        return uint104(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint96 from uint256, reverting on\n     * overflow (when the input is greater than largest uint96).\n     *\n     * Counterpart to Solidity's `uint96` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 96 bits\n     */\n    function toUint96(uint256 value) internal pure returns (uint96) {\n        if (value > type(uint96).max) {\n            revert SafeCastOverflowedUintDowncast(96, value);\n        }\n        return uint96(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint88 from uint256, reverting on\n     * overflow (when the input is greater than largest uint88).\n     *\n     * Counterpart to Solidity's `uint88` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 88 bits\n     */\n    function toUint88(uint256 value) internal pure returns (uint88) {\n        if (value > type(uint88).max) {\n            revert SafeCastOverflowedUintDowncast(88, value);\n        }\n        return uint88(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint80 from uint256, reverting on\n     * overflow (when the input is greater than largest uint80).\n     *\n     * Counterpart to Solidity's `uint80` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 80 bits\n     */\n    function toUint80(uint256 value) internal pure returns (uint80) {\n        if (value > type(uint80).max) {\n            revert SafeCastOverflowedUintDowncast(80, value);\n        }\n        return uint80(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint72 from uint256, reverting on\n     * overflow (when the input is greater than largest uint72).\n     *\n     * Counterpart to Solidity's `uint72` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 72 bits\n     */\n    function toUint72(uint256 value) internal pure returns (uint72) {\n        if (value > type(uint72).max) {\n            revert SafeCastOverflowedUintDowncast(72, value);\n        }\n        return uint72(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint64 from uint256, reverting on\n     * overflow (when the input is greater than largest uint64).\n     *\n     * Counterpart to Solidity's `uint64` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 64 bits\n     */\n    function toUint64(uint256 value) internal pure returns (uint64) {\n        if (value > type(uint64).max) {\n            revert SafeCastOverflowedUintDowncast(64, value);\n        }\n        return uint64(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint56 from uint256, reverting on\n     * overflow (when the input is greater than largest uint56).\n     *\n     * Counterpart to Solidity's `uint56` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 56 bits\n     */\n    function toUint56(uint256 value) internal pure returns (uint56) {\n        if (value > type(uint56).max) {\n            revert SafeCastOverflowedUintDowncast(56, value);\n        }\n        return uint56(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint48 from uint256, reverting on\n     * overflow (when the input is greater than largest uint48).\n     *\n     * Counterpart to Solidity's `uint48` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 48 bits\n     */\n    function toUint48(uint256 value) internal pure returns (uint48) {\n        if (value > type(uint48).max) {\n            revert SafeCastOverflowedUintDowncast(48, value);\n        }\n        return uint48(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint40 from uint256, reverting on\n     * overflow (when the input is greater than largest uint40).\n     *\n     * Counterpart to Solidity's `uint40` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 40 bits\n     */\n    function toUint40(uint256 value) internal pure returns (uint40) {\n        if (value > type(uint40).max) {\n            revert SafeCastOverflowedUintDowncast(40, value);\n        }\n        return uint40(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint32 from uint256, reverting on\n     * overflow (when the input is greater than largest uint32).\n     *\n     * Counterpart to Solidity's `uint32` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 32 bits\n     */\n    function toUint32(uint256 value) internal pure returns (uint32) {\n        if (value > type(uint32).max) {\n            revert SafeCastOverflowedUintDowncast(32, value);\n        }\n        return uint32(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint24 from uint256, reverting on\n     * overflow (when the input is greater than largest uint24).\n     *\n     * Counterpart to Solidity's `uint24` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 24 bits\n     */\n    function toUint24(uint256 value) internal pure returns (uint24) {\n        if (value > type(uint24).max) {\n            revert SafeCastOverflowedUintDowncast(24, value);\n        }\n        return uint24(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint16 from uint256, reverting on\n     * overflow (when the input is greater than largest uint16).\n     *\n     * Counterpart to Solidity's `uint16` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 16 bits\n     */\n    function toUint16(uint256 value) internal pure returns (uint16) {\n        if (value > type(uint16).max) {\n            revert SafeCastOverflowedUintDowncast(16, value);\n        }\n        return uint16(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint8 from uint256, reverting on\n     * overflow (when the input is greater than largest uint8).\n     *\n     * Counterpart to Solidity's `uint8` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 8 bits\n     */\n    function toUint8(uint256 value) internal pure returns (uint8) {\n        if (value > type(uint8).max) {\n            revert SafeCastOverflowedUintDowncast(8, value);\n        }\n        return uint8(value);\n    }\n\n    /**\n     * @dev Converts a signed int256 into an unsigned uint256.\n     *\n     * Requirements:\n     *\n     * - input must be greater than or equal to 0.\n     */\n    function toUint256(int256 value) internal pure returns (uint256) {\n        if (value < 0) {\n            revert SafeCastOverflowedIntToUint(value);\n        }\n        return uint256(value);\n    }\n\n    /**\n     * @dev Returns the downcasted int248 from int256, reverting on\n     * overflow (when the input is less than smallest int248 or\n     * greater than largest int248).\n     *\n     * Counterpart to Solidity's `int248` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 248 bits\n     */\n    function toInt248(int256 value) internal pure returns (int248 downcasted) {\n        downcasted = int248(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(248, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int240 from int256, reverting on\n     * overflow (when the input is less than smallest int240 or\n     * greater than largest int240).\n     *\n     * Counterpart to Solidity's `int240` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 240 bits\n     */\n    function toInt240(int256 value) internal pure returns (int240 downcasted) {\n        downcasted = int240(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(240, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int232 from int256, reverting on\n     * overflow (when the input is less than smallest int232 or\n     * greater than largest int232).\n     *\n     * Counterpart to Solidity's `int232` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 232 bits\n     */\n    function toInt232(int256 value) internal pure returns (int232 downcasted) {\n        downcasted = int232(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(232, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int224 from int256, reverting on\n     * overflow (when the input is less than smallest int224 or\n     * greater than largest int224).\n     *\n     * Counterpart to Solidity's `int224` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 224 bits\n     */\n    function toInt224(int256 value) internal pure returns (int224 downcasted) {\n        downcasted = int224(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(224, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int216 from int256, reverting on\n     * overflow (when the input is less than smallest int216 or\n     * greater than largest int216).\n     *\n     * Counterpart to Solidity's `int216` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 216 bits\n     */\n    function toInt216(int256 value) internal pure returns (int216 downcasted) {\n        downcasted = int216(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(216, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int208 from int256, reverting on\n     * overflow (when the input is less than smallest int208 or\n     * greater than largest int208).\n     *\n     * Counterpart to Solidity's `int208` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 208 bits\n     */\n    function toInt208(int256 value) internal pure returns (int208 downcasted) {\n        downcasted = int208(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(208, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int200 from int256, reverting on\n     * overflow (when the input is less than smallest int200 or\n     * greater than largest int200).\n     *\n     * Counterpart to Solidity's `int200` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 200 bits\n     */\n    function toInt200(int256 value) internal pure returns (int200 downcasted) {\n        downcasted = int200(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(200, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int192 from int256, reverting on\n     * overflow (when the input is less than smallest int192 or\n     * greater than largest int192).\n     *\n     * Counterpart to Solidity's `int192` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 192 bits\n     */\n    function toInt192(int256 value) internal pure returns (int192 downcasted) {\n        downcasted = int192(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(192, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int184 from int256, reverting on\n     * overflow (when the input is less than smallest int184 or\n     * greater than largest int184).\n     *\n     * Counterpart to Solidity's `int184` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 184 bits\n     */\n    function toInt184(int256 value) internal pure returns (int184 downcasted) {\n        downcasted = int184(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(184, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int176 from int256, reverting on\n     * overflow (when the input is less than smallest int176 or\n     * greater than largest int176).\n     *\n     * Counterpart to Solidity's `int176` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 176 bits\n     */\n    function toInt176(int256 value) internal pure returns (int176 downcasted) {\n        downcasted = int176(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(176, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int168 from int256, reverting on\n     * overflow (when the input is less than smallest int168 or\n     * greater than largest int168).\n     *\n     * Counterpart to Solidity's `int168` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 168 bits\n     */\n    function toInt168(int256 value) internal pure returns (int168 downcasted) {\n        downcasted = int168(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(168, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int160 from int256, reverting on\n     * overflow (when the input is less than smallest int160 or\n     * greater than largest int160).\n     *\n     * Counterpart to Solidity's `int160` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 160 bits\n     */\n    function toInt160(int256 value) internal pure returns (int160 downcasted) {\n        downcasted = int160(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(160, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int152 from int256, reverting on\n     * overflow (when the input is less than smallest int152 or\n     * greater than largest int152).\n     *\n     * Counterpart to Solidity's `int152` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 152 bits\n     */\n    function toInt152(int256 value) internal pure returns (int152 downcasted) {\n        downcasted = int152(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(152, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int144 from int256, reverting on\n     * overflow (when the input is less than smallest int144 or\n     * greater than largest int144).\n     *\n     * Counterpart to Solidity's `int144` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 144 bits\n     */\n    function toInt144(int256 value) internal pure returns (int144 downcasted) {\n        downcasted = int144(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(144, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int136 from int256, reverting on\n     * overflow (when the input is less than smallest int136 or\n     * greater than largest int136).\n     *\n     * Counterpart to Solidity's `int136` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 136 bits\n     */\n    function toInt136(int256 value) internal pure returns (int136 downcasted) {\n        downcasted = int136(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(136, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int128 from int256, reverting on\n     * overflow (when the input is less than smallest int128 or\n     * greater than largest int128).\n     *\n     * Counterpart to Solidity's `int128` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 128 bits\n     */\n    function toInt128(int256 value) internal pure returns (int128 downcasted) {\n        downcasted = int128(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(128, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int120 from int256, reverting on\n     * overflow (when the input is less than smallest int120 or\n     * greater than largest int120).\n     *\n     * Counterpart to Solidity's `int120` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 120 bits\n     */\n    function toInt120(int256 value) internal pure returns (int120 downcasted) {\n        downcasted = int120(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(120, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int112 from int256, reverting on\n     * overflow (when the input is less than smallest int112 or\n     * greater than largest int112).\n     *\n     * Counterpart to Solidity's `int112` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 112 bits\n     */\n    function toInt112(int256 value) internal pure returns (int112 downcasted) {\n        downcasted = int112(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(112, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int104 from int256, reverting on\n     * overflow (when the input is less than smallest int104 or\n     * greater than largest int104).\n     *\n     * Counterpart to Solidity's `int104` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 104 bits\n     */\n    function toInt104(int256 value) internal pure returns (int104 downcasted) {\n        downcasted = int104(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(104, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int96 from int256, reverting on\n     * overflow (when the input is less than smallest int96 or\n     * greater than largest int96).\n     *\n     * Counterpart to Solidity's `int96` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 96 bits\n     */\n    function toInt96(int256 value) internal pure returns (int96 downcasted) {\n        downcasted = int96(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(96, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int88 from int256, reverting on\n     * overflow (when the input is less than smallest int88 or\n     * greater than largest int88).\n     *\n     * Counterpart to Solidity's `int88` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 88 bits\n     */\n    function toInt88(int256 value) internal pure returns (int88 downcasted) {\n        downcasted = int88(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(88, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int80 from int256, reverting on\n     * overflow (when the input is less than smallest int80 or\n     * greater than largest int80).\n     *\n     * Counterpart to Solidity's `int80` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 80 bits\n     */\n    function toInt80(int256 value) internal pure returns (int80 downcasted) {\n        downcasted = int80(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(80, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int72 from int256, reverting on\n     * overflow (when the input is less than smallest int72 or\n     * greater than largest int72).\n     *\n     * Counterpart to Solidity's `int72` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 72 bits\n     */\n    function toInt72(int256 value) internal pure returns (int72 downcasted) {\n        downcasted = int72(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(72, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int64 from int256, reverting on\n     * overflow (when the input is less than smallest int64 or\n     * greater than largest int64).\n     *\n     * Counterpart to Solidity's `int64` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 64 bits\n     */\n    function toInt64(int256 value) internal pure returns (int64 downcasted) {\n        downcasted = int64(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(64, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int56 from int256, reverting on\n     * overflow (when the input is less than smallest int56 or\n     * greater than largest int56).\n     *\n     * Counterpart to Solidity's `int56` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 56 bits\n     */\n    function toInt56(int256 value) internal pure returns (int56 downcasted) {\n        downcasted = int56(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(56, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int48 from int256, reverting on\n     * overflow (when the input is less than smallest int48 or\n     * greater than largest int48).\n     *\n     * Counterpart to Solidity's `int48` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 48 bits\n     */\n    function toInt48(int256 value) internal pure returns (int48 downcasted) {\n        downcasted = int48(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(48, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int40 from int256, reverting on\n     * overflow (when the input is less than smallest int40 or\n     * greater than largest int40).\n     *\n     * Counterpart to Solidity's `int40` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 40 bits\n     */\n    function toInt40(int256 value) internal pure returns (int40 downcasted) {\n        downcasted = int40(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(40, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int32 from int256, reverting on\n     * overflow (when the input is less than smallest int32 or\n     * greater than largest int32).\n     *\n     * Counterpart to Solidity's `int32` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 32 bits\n     */\n    function toInt32(int256 value) internal pure returns (int32 downcasted) {\n        downcasted = int32(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(32, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int24 from int256, reverting on\n     * overflow (when the input is less than smallest int24 or\n     * greater than largest int24).\n     *\n     * Counterpart to Solidity's `int24` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 24 bits\n     */\n    function toInt24(int256 value) internal pure returns (int24 downcasted) {\n        downcasted = int24(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(24, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int16 from int256, reverting on\n     * overflow (when the input is less than smallest int16 or\n     * greater than largest int16).\n     *\n     * Counterpart to Solidity's `int16` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 16 bits\n     */\n    function toInt16(int256 value) internal pure returns (int16 downcasted) {\n        downcasted = int16(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(16, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int8 from int256, reverting on\n     * overflow (when the input is less than smallest int8 or\n     * greater than largest int8).\n     *\n     * Counterpart to Solidity's `int8` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 8 bits\n     */\n    function toInt8(int256 value) internal pure returns (int8 downcasted) {\n        downcasted = int8(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(8, value);\n        }\n    }\n\n    /**\n     * @dev Converts an unsigned uint256 into a signed int256.\n     *\n     * Requirements:\n     *\n     * - input must be less than or equal to maxInt256.\n     */\n    function toInt256(uint256 value) internal pure returns (int256) {\n        // Note: Unsafe cast below is okay because `type(int256).max` is guaranteed to be positive\n        if (value > uint256(type(int256).max)) {\n            revert SafeCastOverflowedUintToInt(value);\n        }\n        return int256(value);\n    }\n\n    /**\n     * @dev Cast a boolean (false or true) to a uint256 (0 or 1) with no jump.\n     */\n    function toUint(bool b) internal pure returns (uint256 u) {\n        assembly (\"memory-safe\") {\n            u := iszero(iszero(b))\n        }\n    }\n}\n"},"lib/openzeppelin-contracts/contracts/utils/math/SignedMath.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/math/SignedMath.sol)\n\npragma solidity ^0.8.20;\n\nimport {SafeCast} from \"./SafeCast.sol\";\n\n/**\n * @dev Standard signed math utilities missing in the Solidity language.\n */\nlibrary SignedMath {\n    /**\n     * @dev Branchless ternary evaluation for `a ? b : c`. Gas costs are constant.\n     *\n     * IMPORTANT: This function may reduce bytecode size and consume less gas when used standalone.\n     * However, the compiler may optimize Solidity ternary operations (i.e. `a ? b : c`) to only compute\n     * one branch when needed, making this function more expensive.\n     */\n    function ternary(bool condition, int256 a, int256 b) internal pure returns (int256) {\n        unchecked {\n            // branchless ternary works because:\n            // b ^ (a ^ b) == a\n            // b ^ 0 == b\n            return b ^ ((a ^ b) * int256(SafeCast.toUint(condition)));\n        }\n    }\n\n    /**\n     * @dev Returns the largest of two signed numbers.\n     */\n    function max(int256 a, int256 b) internal pure returns (int256) {\n        return ternary(a > b, a, b);\n    }\n\n    /**\n     * @dev Returns the smallest of two signed numbers.\n     */\n    function min(int256 a, int256 b) internal pure returns (int256) {\n        return ternary(a < b, a, b);\n    }\n\n    /**\n     * @dev Returns the average of two signed numbers without overflow.\n     * The result is rounded towards zero.\n     */\n    function average(int256 a, int256 b) internal pure returns (int256) {\n        // Formula from the book \"Hacker's Delight\"\n        int256 x = (a & b) + ((a ^ b) >> 1);\n        return x + (int256(uint256(x) >> 255) & (a ^ b));\n    }\n\n    /**\n     * @dev Returns the absolute unsigned value of a signed value.\n     */\n    function abs(int256 n) internal pure returns (uint256) {\n        unchecked {\n            // Formula from the \"Bit Twiddling Hacks\" by Sean Eron Anderson.\n            // Since `n` is a signed integer, the generated bytecode will use the SAR opcode to perform the right shift,\n            // taking advantage of the most significant (or \"sign\" bit) in two's complement representation.\n            // This opcode adds new most significant bits set to the value of the previous most significant bit. As a result,\n            // the mask will either be `bytes32(0)` (if n is positive) or `~bytes32(0)` (if n is negative).\n            int256 mask = n >> 255;\n\n            // A `bytes32(0)` mask leaves the input unchanged, while a `~bytes32(0)` mask complements it.\n            return uint256((n + mask) ^ mask);\n        }\n    }\n}\n"},"lib/openzeppelin-contracts/contracts/utils/Panic.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/Panic.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Helper library for emitting standardized panic codes.\n *\n * ```solidity\n * contract Example {\n *      using Panic for uint256;\n *\n *      // Use any of the declared internal constants\n *      function foo() { Panic.GENERIC.panic(); }\n *\n *      // Alternatively\n *      function foo() { Panic.panic(Panic.GENERIC); }\n * }\n * ```\n *\n * Follows the list from https://github.com/ethereum/solidity/blob/v0.8.24/libsolutil/ErrorCodes.h[libsolutil].\n *\n * _Available since v5.1._\n */\n// slither-disable-next-line unused-state\nlibrary Panic {\n    /// @dev generic / unspecified error\n    uint256 internal constant GENERIC = 0x00;\n    /// @dev used by the assert() builtin\n    uint256 internal constant ASSERT = 0x01;\n    /// @dev arithmetic underflow or overflow\n    uint256 internal constant UNDER_OVERFLOW = 0x11;\n    /// @dev division or modulo by zero\n    uint256 internal constant DIVISION_BY_ZERO = 0x12;\n    /// @dev enum conversion error\n    uint256 internal constant ENUM_CONVERSION_ERROR = 0x21;\n    /// @dev invalid encoding in storage\n    uint256 internal constant STORAGE_ENCODING_ERROR = 0x22;\n    /// @dev empty array pop\n    uint256 internal constant EMPTY_ARRAY_POP = 0x31;\n    /// @dev array out of bounds access\n    uint256 internal constant ARRAY_OUT_OF_BOUNDS = 0x32;\n    /// @dev resource error (too large allocation or too large array)\n    uint256 internal constant RESOURCE_ERROR = 0x41;\n    /// @dev calling invalid internal function\n    uint256 internal constant INVALID_INTERNAL_FUNCTION = 0x51;\n\n    /// @dev Reverts with a panic code. Recommended to use with\n    /// the internal constants with predefined codes.\n    function panic(uint256 code) internal pure {\n        assembly (\"memory-safe\") {\n            mstore(0x00, 0x4e487b71)\n            mstore(0x20, code)\n            revert(0x1c, 0x24)\n        }\n    }\n}\n"}},"compilation":{"language":"Solidity","compiler":"solc","compilerVersion":"0.8.28+commit.7893614a","compilerSettings":{"viaIR":false,"metadata":{"appendCBOR":true,"bytecodeHash":"none","useLiteralContent":false},"optimizer":{"runs":999999,"enabled":true},"evmVersion":"cancun","remappings":["forge-std/=lib/forge-std/src/","solidity-utils/=lib/aave-v3-origin/lib/solidity-utils/src/contracts/","aave-v3-origin/=lib/aave-v3-origin/src/","aave-address-book/=lib/aave-address-book/src/","openzeppelin/=lib/openzeppelin-contracts/contracts/","cowprotocol/flash-loan-router/=lib/flash-loan-router/src/","cowprotocol/contracts/=lib/contracts/src/contracts/","cowprotocol/test/=lib/contracts/test/","@openzeppelin/contracts-upgradeable/=lib/aave-v3-origin/lib/solidity-utils/lib/openzeppelin-contracts-upgradeable/contracts/","@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/","contracts/=lib/contracts/src/","ds-test/=lib/aave-v3-origin/lib/forge-std/lib/ds-test/src/","erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/","flash-loan-router/=lib/flash-loan-router/","halmos-cheatcodes/=lib/openzeppelin-contracts/lib/halmos-cheatcodes/src/","openzeppelin-contracts-upgradeable/=lib/aave-v3-origin/lib/solidity-utils/lib/openzeppelin-contracts-upgradeable/","openzeppelin-contracts/=lib/openzeppelin-contracts/"]},"name":"AaveV3AdapterFactory","fullyQualifiedName":"src/contracts/AaveV3AdapterFactory.sol:AaveV3AdapterFactory"},"abi":[{"type":"constructor","inputs":[{"name":"aavePool_","type":"address","internalType":"address"},{"name":"settlement_","type":"address","internalType":"address"},{"name":"router_","type":"address","internalType":"address"},{"name":"owner_","type":"address","internalType":"address"}],"stateMutability":"nonpayable"},{"name":"CallerNotAavePool","type":"error","inputs":[]},{"name":"CallerNotInstance","type":"error","inputs":[]},{"name":"CallerNotRouter","type":"error","inputs":[]},{"name":"EnforcedPause","type":"error","inputs":[]},{"name":"ExpectedPause","type":"error","inputs":[]},{"name":"FailedDeployment","type":"error","inputs":[]},{"name":"ImplementationAlreadyListed","type":"error","inputs":[]},{"name":"ImplementationNotActive","type":"error","inputs":[]},{"name":"InstanceAlreadyDeployed","type":"error","inputs":[]},{"name":"InstanceCancelled","type":"error","inputs":[]},{"name":"InstanceNotInitialized","type":"error","inputs":[]},{"name":"InsufficientBalance","type":"error","inputs":[{"name":"balance","type":"uint256","internalType":"uint256"},{"name":"needed","type":"uint256","internalType":"uint256"}]},{"name":"InvalidLender","type":"error","inputs":[]},{"name":"InvalidOrderReceiver","type":"error","inputs":[]},{"name":"InvalidShortString","type":"error","inputs":[]},{"name":"InvalidZeroAddress","type":"error","inputs":[]},{"name":"InvalidZeroAmount","type":"error","inputs":[]},{"name":"NothingToRepay","type":"error","inputs":[]},{"name":"OwnableInvalidOwner","type":"error","inputs":[{"name":"owner","type":"address","internalType":"address"}]},{"name":"OwnableUnauthorizedAccount","type":"error","inputs":[{"name":"account","type":"address","internalType":"address"}]},{"name":"SafeERC20FailedOperation","type":"error","inputs":[{"name":"token","type":"address","internalType":"address"}]},{"name":"StringTooLong","type":"error","inputs":[{"name":"str","type":"string","internalType":"string"}]},{"name":"CancelInstance","type":"event","inputs":[{"name":"user","type":"address","indexed":true,"internalType":"address"},{"name":"instanceAddress","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"name":"EIP712DomainChanged","type":"event","inputs":[],"anonymous":false},{"name":"OwnershipTransferred","type":"event","inputs":[{"name":"previousOwner","type":"address","indexed":true,"internalType":"address"},{"name":"newOwner","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"name":"Paused","type":"event","inputs":[{"name":"account","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"name":"SetAdapterImplementation","type":"event","inputs":[{"name":"adapterImplementation","type":"address","indexed":true,"internalType":"address"},{"name":"active","type":"bool","indexed":false,"internalType":"bool"}],"anonymous":false},{"name":"Unpaused","type":"event","inputs":[{"name":"account","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"name":"ADDRESSES_PROVIDER","type":"function","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract IPoolAddressesProvider"}],"stateMutability":"view"},{"name":"DOMAIN_SEPARATOR","type":"function","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"name":"POOL","type":"function","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract IPool"}],"stateMutability":"view"},{"name":"ROUTER","type":"function","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract IFlashLoanRouter"}],"stateMutability":"view"},{"name":"SETTLEMENT_CONTRACT","type":"function","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract ICowSettlement"}],"stateMutability":"view"},{"name":"cancelInstance","type":"function","inputs":[{"name":"instance","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"deployAndTransferFlashLoan","type":"function","inputs":[{"name":"adapterImplementation","type":"address","internalType":"address"},{"name":"hookData","type":"tuple","components":[{"name":"owner","type":"address","internalType":"address"},{"name":"receiver","type":"address","internalType":"address"},{"name":"sellToken","type":"address","internalType":"address"},{"name":"buyToken","type":"address","internalType":"address"},{"name":"sellAmount","type":"uint256","internalType":"uint256"},{"name":"buyAmount","type":"uint256","internalType":"uint256"},{"name":"kind","type":"bytes32","internalType":"bytes32"},{"name":"validTo","type":"uint256","internalType":"uint256"},{"name":"flashLoanAmount","type":"uint256","internalType":"uint256"},{"name":"flashLoanFeeAmount","type":"uint256","internalType":"uint256"},{"name":"hookSellTokenAmount","type":"uint256","internalType":"uint256"},{"name":"hookBuyTokenAmount","type":"uint256","internalType":"uint256"}],"internalType":"struct DataTypes.HookOrderData"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"eip712Domain","type":"function","inputs":[],"outputs":[{"name":"fields","type":"bytes1","internalType":"bytes1"},{"name":"name","type":"string","internalType":"string"},{"name":"version","type":"string","internalType":"string"},{"name":"chainId","type":"uint256","internalType":"uint256"},{"name":"verifyingContract","type":"address","internalType":"address"},{"name":"salt","type":"bytes32","internalType":"bytes32"},{"name":"extensions","type":"uint256[]","internalType":"uint256[]"}],"stateMutability":"view"},{"name":"executeOperation","type":"function","inputs":[{"name":"","type":"address[]","internalType":"address[]"},{"name":"","type":"uint256[]","internalType":"uint256[]"},{"name":"","type":"uint256[]","internalType":"uint256[]"},{"name":"","type":"address","internalType":"address"},{"name":"callbackData","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"name":"flashLoanAndCallBack","type":"function","inputs":[{"name":"lender","type":"address","internalType":"address"},{"name":"token","type":"address","internalType":"contract IERC20"},{"name":"amount","type":"uint256","internalType":"uint256"},{"name":"callbackData","type":"bytes","internalType":"bytes"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"getInstanceDeterministicAddress","type":"function","inputs":[{"name":"adapterImplementation","type":"address","internalType":"address"},{"name":"hookData","type":"tuple","components":[{"name":"owner","type":"address","internalType":"address"},{"name":"receiver","type":"address","internalType":"address"},{"name":"sellToken","type":"address","internalType":"address"},{"name":"buyToken","type":"address","internalType":"address"},{"name":"sellAmount","type":"uint256","internalType":"uint256"},{"name":"buyAmount","type":"uint256","internalType":"uint256"},{"name":"kind","type":"bytes32","internalType":"bytes32"},{"name":"validTo","type":"uint256","internalType":"uint256"},{"name":"flashLoanAmount","type":"uint256","internalType":"uint256"},{"name":"flashLoanFeeAmount","type":"uint256","internalType":"uint256"},{"name":"hookSellTokenAmount","type":"uint256","internalType":"uint256"},{"name":"hookBuyTokenAmount","type":"uint256","internalType":"uint256"}],"internalType":"struct DataTypes.HookOrderData"}],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"name":"isAdapterImplementation","type":"function","inputs":[{"name":"","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"name":"isInstanceCancelled","type":"function","inputs":[{"name":"","type":"address","internalType":"address"},{"name":"","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"name":"notifyRepayFlashLoan","type":"function","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"name":"openFlashLoans","type":"function","inputs":[{"name":"","type":"address","internalType":"address"}],"outputs":[{"name":"instanceActive","type":"bool","internalType":"bool"},{"name":"asset","type":"address","internalType":"address"},{"name":"totalAmount","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"owner","type":"function","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"name":"pause","type":"function","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"name":"paused","type":"function","inputs":[],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"name":"renounceOwnership","type":"function","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"name":"rescueTokens","type":"function","inputs":[{"name":"token","type":"address","internalType":"contract IERC20"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"setAdapterImplementation","type":"function","inputs":[{"name":"adapterImplementation","type":"address","internalType":"address"},{"name":"active","type":"bool","internalType":"bool"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"transferOwnership","type":"function","inputs":[{"name":"newOwner","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"unpause","type":"function","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"name":"verifyOrderSignature","type":"function","inputs":[{"name":"orderOwner","type":"address","internalType":"address"},{"name":"order","type":"tuple","components":[{"name":"sellToken","type":"address","internalType":"contract IERC20"},{"name":"buyToken","type":"address","internalType":"contract IERC20"},{"name":"receiver","type":"address","internalType":"address"},{"name":"sellAmount","type":"uint256","internalType":"uint256"},{"name":"buyAmount","type":"uint256","internalType":"uint256"},{"name":"validTo","type":"uint32","internalType":"uint32"},{"name":"appData","type":"bytes32","internalType":"bytes32"},{"name":"feeAmount","type":"uint256","internalType":"uint256"},{"name":"kind","type":"bytes32","internalType":"bytes32"},{"name":"partiallyFillable","type":"bool","internalType":"bool"},{"name":"sellTokenBalance","type":"bytes32","internalType":"bytes32"},{"name":"buyTokenBalance","type":"bytes32","internalType":"bytes32"}],"internalType":"struct GPv2Order.Data"},{"name":"signature","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"}],"metadata":{"compiler":{"version":"0.8.28+commit.7893614a"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"address","name":"aavePool_","type":"address"},{"internalType":"address","name":"settlement_","type":"address"},{"internalType":"address","name":"router_","type":"address"},{"internalType":"address","name":"owner_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"CallerNotAavePool","type":"error"},{"inputs":[],"name":"CallerNotInstance","type":"error"},{"inputs":[],"name":"CallerNotRouter","type":"error"},{"inputs":[],"name":"EnforcedPause","type":"error"},{"inputs":[],"name":"ExpectedPause","type":"error"},{"inputs":[],"name":"FailedDeployment","type":"error"},{"inputs":[],"name":"ImplementationAlreadyListed","type":"error"},{"inputs":[],"name":"ImplementationNotActive","type":"error"},{"inputs":[],"name":"InstanceAlreadyDeployed","type":"error"},{"inputs":[],"name":"InstanceCancelled","type":"error"},{"inputs":[],"name":"InstanceNotInitialized","type":"error"},{"inputs":[{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"name":"InsufficientBalance","type":"error"},{"inputs":[],"name":"InvalidLender","type":"error"},{"inputs":[],"name":"InvalidOrderReceiver","type":"error"},{"inputs":[],"name":"InvalidShortString","type":"error"},{"inputs":[],"name":"InvalidZeroAddress","type":"error"},{"inputs":[],"name":"InvalidZeroAmount","type":"error"},{"inputs":[],"name":"NothingToRepay","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"SafeERC20FailedOperation","type":"error"},{"inputs":[{"internalType":"string","name":"str","type":"string"}],"name":"StringTooLong","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"address","name":"instanceAddress","type":"address"}],"name":"CancelInstance","type":"event"},{"anonymous":false,"inputs":[],"name":"EIP712DomainChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"adapterImplementation","type":"address"},{"indexed":false,"internalType":"bool","name":"active","type":"bool"}],"name":"SetAdapterImplementation","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"ADDRESSES_PROVIDER","outputs":[{"internalType":"contract IPoolAddressesProvider","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"POOL","outputs":[{"internalType":"contract IPool","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ROUTER","outputs":[{"internalType":"contract IFlashLoanRouter","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SETTLEMENT_CONTRACT","outputs":[{"internalType":"contract ICowSettlement","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"instance","type":"address"}],"name":"cancelInstance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"adapterImplementation","type":"address"},{"components":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"address","name":"sellToken","type":"address"},{"internalType":"address","name":"buyToken","type":"address"},{"internalType":"uint256","name":"sellAmount","type":"uint256"},{"internalType":"uint256","name":"buyAmount","type":"uint256"},{"internalType":"bytes32","name":"kind","type":"bytes32"},{"internalType":"uint256","name":"validTo","type":"uint256"},{"internalType":"uint256","name":"flashLoanAmount","type":"uint256"},{"internalType":"uint256","name":"flashLoanFeeAmount","type":"uint256"},{"internalType":"uint256","name":"hookSellTokenAmount","type":"uint256"},{"internalType":"uint256","name":"hookBuyTokenAmount","type":"uint256"}],"internalType":"struct DataTypes.HookOrderData","name":"hookData","type":"tuple"}],"name":"deployAndTransferFlashLoan","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"eip712Domain","outputs":[{"internalType":"bytes1","name":"fields","type":"bytes1"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"version","type":"string"},{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"address","name":"verifyingContract","type":"address"},{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"uint256[]","name":"extensions","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"","type":"address[]"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"address","name":"","type":"address"},{"internalType":"bytes","name":"callbackData","type":"bytes"}],"name":"executeOperation","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"lender","type":"address"},{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"callbackData","type":"bytes"}],"name":"flashLoanAndCallBack","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"adapterImplementation","type":"address"},{"components":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"address","name":"sellToken","type":"address"},{"internalType":"address","name":"buyToken","type":"address"},{"internalType":"uint256","name":"sellAmount","type":"uint256"},{"internalType":"uint256","name":"buyAmount","type":"uint256"},{"internalType":"bytes32","name":"kind","type":"bytes32"},{"internalType":"uint256","name":"validTo","type":"uint256"},{"internalType":"uint256","name":"flashLoanAmount","type":"uint256"},{"internalType":"uint256","name":"flashLoanFeeAmount","type":"uint256"},{"internalType":"uint256","name":"hookSellTokenAmount","type":"uint256"},{"internalType":"uint256","name":"hookBuyTokenAmount","type":"uint256"}],"internalType":"struct DataTypes.HookOrderData","name":"hookData","type":"tuple"}],"name":"getInstanceDeterministicAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isAdapterImplementation","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"isInstanceCancelled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"notifyRepayFlashLoan","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"openFlashLoans","outputs":[{"internalType":"bool","name":"instanceActive","type":"bool"},{"internalType":"address","name":"asset","type":"address"},{"internalType":"uint256","name":"totalAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"}],"name":"rescueTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"adapterImplementation","type":"address"},{"internalType":"bool","name":"active","type":"bool"}],"name":"setAdapterImplementation","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"orderOwner","type":"address"},{"components":[{"internalType":"contract IERC20","name":"sellToken","type":"address"},{"internalType":"contract IERC20","name":"buyToken","type":"address"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"sellAmount","type":"uint256"},{"internalType":"uint256","name":"buyAmount","type":"uint256"},{"internalType":"uint32","name":"validTo","type":"uint32"},{"internalType":"bytes32","name":"appData","type":"bytes32"},{"internalType":"uint256","name":"feeAmount","type":"uint256"},{"internalType":"bytes32","name":"kind","type":"bytes32"},{"internalType":"bool","name":"partiallyFillable","type":"bool"},{"internalType":"bytes32","name":"sellTokenBalance","type":"bytes32"},{"internalType":"bytes32","name":"buyTokenBalance","type":"bytes32"}],"internalType":"struct GPv2Order.Data","name":"order","type":"tuple"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"verifyOrderSignature","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}],"devdoc":{"author":"Aave Labs.","errors":{"EnforcedPause()":[{"details":"The operation failed because the contract is paused."}],"ExpectedPause()":[{"details":"The operation failed because the contract is not paused."}],"FailedDeployment()":[{"details":"The deployment failed."}],"InsufficientBalance(uint256,uint256)":[{"details":"The ETH balance of the account is not enough to perform the operation."}],"OwnableInvalidOwner(address)":[{"details":"The owner is not a valid owner account. (eg. `address(0)`)"}],"OwnableUnauthorizedAccount(address)":[{"details":"The caller account is not authorized to perform an operation."}],"SafeERC20FailedOperation(address)":[{"details":"An operation with an ERC-20 token failed."}]},"events":{"EIP712DomainChanged()":{"details":"MAY be emitted to signal that the domain could have changed."},"Paused(address)":{"details":"Emitted when the pause is triggered by `account`."},"Unpaused(address)":{"details":"Emitted when the pause is lifted by `account`."}},"kind":"dev","methods":{"DOMAIN_SEPARATOR()":{"returns":{"_0":"The domain separator."}},"cancelInstance(address)":{"details":"This is used to cancel a pending EIP-1271 Order before it is executed, by blocking the deployment of the Instance.","params":{"instance":"The address of the Adapter Instance to cancel."}},"constructor":{"details":"Constructor.","params":{"aavePool_":"The address of the Aave V3 Pool contract.","owner_":"The address of the owner of the Factory.","router_":"The address of the Cow FlashLoan Router contract.","settlement_":"The address of the Cow Settlement contract."}},"deployAndTransferFlashLoan(address,(address,address,address,address,uint256,uint256,bytes32,uint256,uint256,uint256,uint256,uint256))":{"params":{"adapterImplementation":"The address of the Adapter Instance implementation to clone.","hookData":"The HookOrderData struct containing the order details & postHook parameters."}},"eip712Domain()":{"details":"returns the fields and values that describe the domain separator used by this contract for EIP-712 signature."},"executeOperation(address[],uint256[],uint256[],address,bytes)":{"details":"Ensure that the contract can return the debt + premium, e.g., has      enough funds to repay and has approved the Pool to pull the total amount","params":{"amounts":"The amounts of the flash-borrowed assets","assets":"The addresses of the flash-borrowed assets","initiator":"The address of the flashloan initiator","params":"The byte-encoded params passed when initiating the flashloan","premiums":"The fee of each flash-borrowed asset"},"returns":{"_0":"True if the execution of the operation succeeds, false otherwise"}},"flashLoanAndCallBack(address,address,uint256,bytes)":{"params":{"amount":"The amount of the FlashLoan","callbackData":"Data to send back to the FlashLoanRouter during the callback","lender":"The address of the lender to draw the FlashLoan from","token":"The address of the ERC20 token for the FlashLoan"}},"getInstanceDeterministicAddress(address,(address,address,address,address,uint256,uint256,bytes32,uint256,uint256,uint256,uint256,uint256))":{"params":{"adapterImplementation":"The address of the Adapter Implementation to clone.","hookData":"The HookOrderData struct containing the order details & postHook parameters."},"returns":{"_0":"The determined address of the Adapter Instance."}},"owner()":{"details":"Returns the address of the current owner."},"paused()":{"details":"Returns true if the contract is paused, and false otherwise."},"renounceOwnership()":{"details":"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner."},"rescueTokens(address)":{"details":"Emergency rescue for token stucked on this contract, as failsafe mechanism.- Funds should never remain in this contract more time than during transactions.- Only callable by the owner."},"setAdapterImplementation(address,bool)":{"params":{"active":"True to activate, false to deactivate.","adapterImplementation":"The address of the Adapter Implementation."}},"transferOwnership(address)":{"details":"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner."},"verifyOrderSignature(address,(address,address,address,uint256,uint256,uint32,bytes32,uint256,bytes32,bool,bytes32,bytes32),bytes)":{"params":{"order":"The Order data to verify.","orderOwner":"The address of the owner of the Order.","signature":"The signature to verify."},"returns":{"_0":"True if the signature is valid, false otherwise."}}},"stateVariables":{"REFERRAL_CODE":{"details":"Referral code to pass to the Aave Pool"}},"version":1},"userdoc":{"errors":{"CallerNotAavePool()":[{"notice":"Thrown when the caller is not the Aave Pool."}],"CallerNotInstance()":[{"notice":"Thrown when the caller is not an Instance deployed by the Factory."}],"CallerNotRouter()":[{"notice":"Thrown when the caller is not the Router."}],"ImplementationAlreadyListed()":[{"notice":"Thrown when the specified implementation is already listed."}],"ImplementationNotActive()":[{"notice":"Thrown when the specified implementation is not active."}],"InstanceAlreadyDeployed()":[{"notice":"Thrown when the Instance is already deployed."}],"InstanceCancelled()":[{"notice":"Thrown when the order has been cancelled by the user."}],"InstanceNotInitialized()":[{"notice":"Thrown when the Instance is not initialized."}],"InvalidLender()":[{"notice":"Thrown when the specified lender is not the valid one for the Factory."}],"InvalidOrderReceiver()":[{"notice":"Thrown when the order receiver is invalid."}],"InvalidZeroAddress()":[{"notice":"Thrown when the specified address is the zero address."}],"InvalidZeroAmount()":[{"notice":"Thrown when the specified amount is null."}],"NothingToRepay()":[{"notice":"Thrown when the calling Instance has nothing to repay."}]},"events":{"CancelInstance(address,address)":{"notice":"Emitted when an Instance owner cancels it."},"SetAdapterImplementation(address,bool)":{"notice":"Emitted when an AdapterHook Implementations status is updated."}},"kind":"user","methods":{"DOMAIN_SEPARATOR()":{"notice":"Returns the domain separator used in the EIP712 encoding of the AdapterOrderSig struct."},"ROUTER()":{"notice":"FlashLoanRouter contract."},"SETTLEMENT_CONTRACT()":{"notice":"Settlement contract."},"cancelInstance(address)":{"notice":"Cancels an Adapter Instance to be deployed by the Factory."},"deployAndTransferFlashLoan(address,(address,address,address,address,uint256,uint256,bytes32,uint256,uint256,uint256,uint256,uint256))":{"notice":"Deploys an Adapter Instance and transfers the FlashLoaned assets to it (must have been initiated before)."},"executeOperation(address[],uint256[],uint256[],address,bytes)":{"notice":"Executes an operation after receiving the flash-borrowed assets"},"flashLoanAndCallBack(address,address,uint256,bytes)":{"notice":"Start the flow to draw a FlashLoan then calls back the FlashLoanRouter contract with the given data"},"getInstanceDeterministicAddress(address,(address,address,address,address,uint256,uint256,bytes32,uint256,uint256,uint256,uint256,uint256))":{"notice":"Returns the determined address of an Adapter Instance to clone based on a specific Order."},"isAdapterImplementation(address)":{"notice":"Mapping of Adapter implementations."},"isInstanceCancelled(address,address)":{"notice":"Mapping to track cancelled Instances."},"notifyRepayFlashLoan()":{"notice":"Notifies the AdapterFactory that a FlashLoan is ready to be repaid."},"openFlashLoans(address)":{"notice":"Open FlashLoans data for Adapter Instances."},"pause()":{"notice":"Pauses this contract"},"rescueTokens(address)":{"notice":"Rescue any ERC20 tokens left on the contract."},"setAdapterImplementation(address,bool)":{"notice":"Sets the status of an AdapterHook Implementation."},"unpause()":{"notice":"Unpauses this contract"},"verifyOrderSignature(address,(address,address,address,uint256,uint256,uint32,bytes32,uint256,bytes32,bool,bytes32,bytes32),bytes)":{"notice":"Verifies that the signature provided for an Order using an Adapter is valid."}},"notice":"Factory contract to deploy listed AdapterHooks linked to Cow Orders & draw Flashloans from the Aave V3 Pool.","version":1}},"settings":{"compilationTarget":{"src/contracts/AaveV3AdapterFactory.sol":"AaveV3AdapterFactory"},"evmVersion":"cancun","libraries":{},"metadata":{"bytecodeHash":"none"},"optimizer":{"enabled":true,"runs":999999},"remappings":[":@openzeppelin/contracts-upgradeable/=lib/aave-v3-origin/lib/solidity-utils/lib/openzeppelin-contracts-upgradeable/contracts/",":@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",":aave-address-book/=lib/aave-address-book/src/",":aave-v3-origin/=lib/aave-v3-origin/src/",":contracts/=lib/contracts/src/",":cowprotocol/contracts/=lib/contracts/src/contracts/",":cowprotocol/flash-loan-router/=lib/flash-loan-router/src/",":cowprotocol/test/=lib/contracts/test/",":ds-test/=lib/aave-v3-origin/lib/forge-std/lib/ds-test/src/",":erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/",":flash-loan-router/=lib/flash-loan-router/",":forge-std/=lib/forge-std/src/",":halmos-cheatcodes/=lib/openzeppelin-contracts/lib/halmos-cheatcodes/src/",":openzeppelin-contracts-upgradeable/=lib/aave-v3-origin/lib/solidity-utils/lib/openzeppelin-contracts-upgradeable/",":openzeppelin-contracts/=lib/openzeppelin-contracts/",":openzeppelin/=lib/openzeppelin-contracts/contracts/",":solidity-utils/=lib/aave-v3-origin/lib/solidity-utils/src/contracts/"]},"sources":{"lib/aave-v3-origin/src/contracts/interfaces/IPool.sol":{"keccak256":"0x9b29acbc960b19ec5db42e1835eb6d9a37d6e88de09eab2234518f8a4f194682","license":"MIT","urls":["bzz-raw://f995836c3df4a8e434ae9607ee69dd993c4db52db7498e9a74439de0e8bb3e49","dweb:/ipfs/QmQPcJP7HsYe7qf5iorymE3GHWHm1rLhNjACHhShK3w5ZT"]},"lib/aave-v3-origin/src/contracts/interfaces/IPoolAddressesProvider.sol":{"keccak256":"0xa60921cf54e91ca8db038effeffc876089b2e72dbf01d68a10ff461770d345e5","license":"MIT","urls":["bzz-raw://0de2fd03bf5cd6ae8718a486e5d615c67b260d0608b9fb7076888a4bfaa0e4b4","dweb:/ipfs/QmXpdmxMugyJcBFAGJEruB78bkkuTwrH9esYRaS6wiQoMs"]},"lib/aave-v3-origin/src/contracts/misc/flashloan/interfaces/IFlashLoanReceiver.sol":{"keccak256":"0x1906b9f13bf1f6e49a67985cef3d4dc5b43aae608d9aed72baf4e99892bca066","license":"MIT","urls":["bzz-raw://dca31981d592762dcc3a54bec3a808eae1c967a440fa7452a56702387f6e2e4e","dweb:/ipfs/QmdyDUJ1dRLqY1q46nK8u43cceCt3EFARv6VrfQKqBdRMS"]},"lib/aave-v3-origin/src/contracts/protocol/libraries/types/DataTypes.sol":{"keccak256":"0xcaacba608c81a6bdb94cc99b1daf451bcbd60c6a663146e6c630258b22a7f336","license":"MIT","urls":["bzz-raw://399a0988113445b5beeff7513eb5355c09c4f291ff65e09e399f16550e4a65fb","dweb:/ipfs/QmQbN4FxqpVkWVT9YFEtLwu8MPSd8yAfCTqvnhArnd6Sc2"]},"lib/contracts/src/contracts/interfaces/IERC20.sol":{"keccak256":"0x2db02cc0e23db99d10cd21590425b714060a556bcfb934cb5ab3b80aef1610ba","license":"MIT","urls":["bzz-raw://c05f8a21a244e6566a3e555028cebeebd1c38902f0cea2e9b014cc7becaf3140","dweb:/ipfs/QmTBY1GphjwAnY2nC9qKMwj5HeAUJMgFdo5YZcVxsVyqFb"]},"lib/contracts/src/contracts/libraries/GPv2Order.sol":{"keccak256":"0xb96efb76433446cf0ccb9f5bc926301a9c8bcbfd17dcd6a36a1e6207f5b436b2","license":"LGPL-3.0-or-later","urls":["bzz-raw://5ec097e17d3e47e16808a5246a99af7ef618bb58ccb61d7331bfca1929cbbd82","dweb:/ipfs/QmbH7rg5s5gdpa5KENMUXHyGBWJyQn6XEwv9JakRSCcv8n"]},"lib/flash-loan-router/src/interface/IBorrower.sol":{"keccak256":"0x4c16d3b9a8e0f7f8041bfe14f4f1c174d77980167bd13826048627724dd03b1a","license":"GPL-3.0-or-later","urls":["bzz-raw://de7e6dd5d8bff8b3597f1511c12c8eadde94ad25917da3b9f82b3c2a8c8746d9","dweb:/ipfs/QmYqdaEWoHy5pooNt44hHLVfkzrVwucUzRTFyKVTiFczki"]},"lib/flash-loan-router/src/interface/ICowSettlement.sol":{"keccak256":"0xcdea37c4223e5d5cf1db24fff7c4dd86bdd1bdc11deab010f9d19e032a023559","license":"GPL-3.0-or-later","urls":["bzz-raw://ccdcefd77bb4708d3d0a044603184b08a3a2d8c1505976c8703ed71e4812bcd6","dweb:/ipfs/QmX1RrHkWWVzPjE79zYjHxayYXJHrBgt2XPfytZMFzgt8Z"]},"lib/flash-loan-router/src/interface/IFlashLoanRouter.sol":{"keccak256":"0x3569cca06fe71c03c33304a440c9344a8f930713b83d1dcf5dfa094e7f093619","license":"GPL-3.0-or-later","urls":["bzz-raw://a013cc62e41fa9406c117420e3060a726190b7b388ac6691a8b09227cf43c000","dweb:/ipfs/QmeF2vdGNbpDJYZXrQq8yKNWCTvLrZnbQMjGnKtUJRagBp"]},"lib/flash-loan-router/src/library/Loan.sol":{"keccak256":"0xa758db66d7089a91612c530478cd16a23d5969a74cddee9f65e6b7a9b17d6168","license":"GPL-3.0-or-later","urls":["bzz-raw://7d7d717c74aefaf33c9bd53032bbeb83850a36f017ce278712c2f5ad1c4add6a","dweb:/ipfs/QmfVxSWicxGNd2LfC9Bvrx7wNEGPM8NSuVJR22m5TkaL6E"]},"lib/flash-loan-router/src/vendored/ICowAuthentication.sol":{"keccak256":"0xc0b8ec08ce1e4ed2af4188ab08281b1a894d74b2dc69e045398e789f5a72d140","license":"LGPL-3.0-or-later","urls":["bzz-raw://41917d1ba4f6846ddd52d7fe16189a14a836d62b255e3ad07ebbd46f33cdbfa4","dweb:/ipfs/QmXTzjA9qoNX3aHehLJqMyx7qpZKitPE1Un3buB5QtKqfq"]},"lib/flash-loan-router/src/vendored/IERC20.sol":{"keccak256":"0xf7ed8bb586b03d2d8d9ff0751bbc3901961ec924a1c56be49df29415105e822f","license":"MIT","urls":["bzz-raw://4e05ff7c66f9fcf32424582e8f41f7a5fd78490c7e99ab246f053e78fb73c7fe","dweb:/ipfs/QmUkhSqrwweNQUjZWTmwCe1sNQzYPpHA7aZAX4oYwUu4u6"]},"lib/openzeppelin-contracts/contracts/access/Ownable.sol":{"keccak256":"0xff6d0bb2e285473e5311d9d3caacb525ae3538a80758c10649a4d61029b017bb","license":"MIT","urls":["bzz-raw://8ed324d3920bb545059d66ab97d43e43ee85fd3bd52e03e401f020afb0b120f6","dweb:/ipfs/QmfEckWLmZkDDcoWrkEvMWhms66xwTLff9DDhegYpvHo1a"]},"lib/openzeppelin-contracts/contracts/interfaces/IERC1271.sol":{"keccak256":"0x085808648034e3c721a46fe3bc4d1421668152361012a16344651071ba30ab9e","license":"MIT","urls":["bzz-raw://cc760ce249af71aa3559bc7a096a0af0e376b48b9e04017f90132437aac9bdbd","dweb:/ipfs/QmWT4jEqMoK6nbR7QmXvexoE3BMJEnsdikKywmnW9kofwT"]},"lib/openzeppelin-contracts/contracts/interfaces/IERC1363.sol":{"keccak256":"0xc15298eb2b9ba5e18a8c9d12f93ad17a3e162a5c1d9b85f54c8adb5827b0d4da","license":"MIT","urls":["bzz-raw://1f3c3d8f81d2daf1231890a6a2f897be365d6a479b53dcd52ec2527b5d3faf41","dweb:/ipfs/QmeNdkd6u4at9pd2GAyyqxzrVGGvxfLpGmAKnFoYM5ya2e"]},"lib/openzeppelin-contracts/contracts/interfaces/IERC165.sol":{"keccak256":"0x81b022028c39007cce9920c394b9cddd1cb9f3a1c0398f254b4a6492df92ad2b","license":"MIT","urls":["bzz-raw://e0b61b8a5c69b4df993c3d6f94c174ab293aa8698d149bce7be2d88f82929beb","dweb:/ipfs/QmbtacmB1k8ginfrHvAJpjVeqnjYGfXYrkXmMPYEb83z4t"]},"lib/openzeppelin-contracts/contracts/interfaces/IERC20.sol":{"keccak256":"0xb5d81383d40f4006d1ce4bbad0064e7a930e17302cbe2a745e09cb403f042733","license":"MIT","urls":["bzz-raw://3fc4a5681c2f00f41f49260a36ae6bbe1121dd93d470ea24d51d556eff2980be","dweb:/ipfs/QmUBW6TwVWtGP96ka9TfuGivd27kH8CtkXD8RQAAecSFiR"]},"lib/openzeppelin-contracts/contracts/interfaces/IERC5267.sol":{"keccak256":"0xf29e9088951d8a2074d872a733674618fe5c164df21b8b5cf4a6295f523ba7ad","license":"MIT","urls":["bzz-raw://562a1abc7ea505582827ce0c9a2f778360a1a8242742683af179930640020215","dweb:/ipfs/QmPjx5f6KKaPfsDi1uV3ovQN9gHTAcNkMAFJZxE1Adw6VT"]},"lib/openzeppelin-contracts/contracts/interfaces/IERC7913.sol":{"keccak256":"0xb670f33e28d3e5c33e414665f6bc15b76aa117ec6bc2439e42fa0c15b4662bcd","license":"MIT","urls":["bzz-raw://b914ca5d3cd8790c986a81fed0d9c783c524d31f0c7d18693fc514008ab7125b","dweb:/ipfs/QmeqVMihm3A9UChqSDW9pNdSG7cg7cG2f4xLs6uMtkjLxY"]},"lib/openzeppelin-contracts/contracts/proxy/Clones.sol":{"keccak256":"0x7162fa3c6971aa6f0a70160fed018edbb8b1db3af9b034ef3f7c224c3bdb7431","license":"MIT","urls":["bzz-raw://f212d25e8f357209838ad7ce8ebc89de79906d9fe580566962e889ecb090e6b4","dweb:/ipfs/QmdbLuLwX24VB1Gdrabke584WyaUkuJSWuDzzuRgqAMFge"]},"lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol":{"keccak256":"0xfe37358f223eddd65d61bb62b0b7bdb69d7101b5ec8d484292b8c1583a153b8a","license":"MIT","urls":["bzz-raw://28dd43f30af3c12ae0fc08dd031b1250e906ef3c95f63f30fac6fd15aee2a662","dweb:/ipfs/QmUkSyWsSRx36w1ti7U6qnGnQgJq16wpMhjeJrnyn9AXwG"]},"lib/openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol":{"keccak256":"0x982c5cb790ab941d1e04f807120a71709d4c313ba0bfc16006447ffbd27fbbd5","license":"MIT","urls":["bzz-raw://8150ceb4ac947e8a442b2a9c017e01e880b2be2dd958f1fa9bc405f4c5a86508","dweb:/ipfs/QmbcBmFX66AY6Kbhnd5gx7zpkgqnUafo43XnmayAM7zVdB"]},"lib/openzeppelin-contracts/contracts/utils/Bytes.sol":{"keccak256":"0x5abbffa930eabfe8465f25c67c16362d24ebcc40b1a8bba28bf2136e553c6a3f","license":"MIT","urls":["bzz-raw://a00ad7fe6215925a5b9affcd725a2ee4f47cc7b842ce04c4aa317865f607856f","dweb:/ipfs/QmcMe8sANBYpkMeVgSHMFobPp5gEaXHVKx366tDQGtMj9X"]},"lib/openzeppelin-contracts/contracts/utils/Context.sol":{"keccak256":"0x493033a8d1b176a037b2cc6a04dad01a5c157722049bbecf632ca876224dd4b2","license":"MIT","urls":["bzz-raw://6a708e8a5bdb1011c2c381c9a5cfd8a9a956d7d0a9dc1bd8bcdaf52f76ef2f12","dweb:/ipfs/Qmax9WHBnVsZP46ZxEMNRQpLQnrdE4dK8LehML1Py8FowF"]},"lib/openzeppelin-contracts/contracts/utils/Create2.sol":{"keccak256":"0xbb7e8401583d26268ea9103013bcdcd90866a7718bd91105ebd21c9bf11f4f06","license":"MIT","urls":["bzz-raw://866a11ad89c93ee918078f7a46ae31e17d89216ce64603f0d34be7ed0a5c520e","dweb:/ipfs/QmW3ckLEJg2v2NzuVLNJFmRuerGSipw6Dzg6ntbmqbAGoC"]},"lib/openzeppelin-contracts/contracts/utils/Errors.sol":{"keccak256":"0x6afa713bfd42cf0f7656efa91201007ac465e42049d7de1d50753a373648c123","license":"MIT","urls":["bzz-raw://ba1d02f4847670a1b83dec9f7d37f0b0418d6043447b69f3a29a5f9efc547fcf","dweb:/ipfs/QmQ7iH2keLNUKgq2xSWcRmuBE5eZ3F5whYAkAGzCNNoEWB"]},"lib/openzeppelin-contracts/contracts/utils/Panic.sol":{"keccak256":"0xf7fe324703a64fc51702311dc51562d5cb1497734f074e4f483bfb6717572d7a","license":"MIT","urls":["bzz-raw://c6a5ff4f9fd8649b7ee20800b7fa387d3465bd77cf20c2d1068cd5c98e1ed57a","dweb:/ipfs/QmVSaVJf9FXFhdYEYeCEfjMVHrxDh5qL4CGkxdMWpQCrqG"]},"lib/openzeppelin-contracts/contracts/utils/Pausable.sol":{"keccak256":"0xdb484371dfbb848cb6f5d70464e9ac9b2900e4164ead76bbce4fef0b44bcc68f","license":"MIT","urls":["bzz-raw://f9d6f6f6600a2bec622f699081b58350873b5e63ce05464d17d674a290bb8a7c","dweb:/ipfs/QmQKVzSQY1PM3Bid4QhgVVZyx6B4Jx7XgaQzLKHj38vJz8"]},"lib/openzeppelin-contracts/contracts/utils/ShortStrings.sol":{"keccak256":"0x1fcf8cceb1a67e6c8512267e780933c4a3f63ef44756e6c818fda79be51c8402","license":"MIT","urls":["bzz-raw://617d7d57f6f9cd449068b4d23daf485676d083aae648e038d05eb3a13291de35","dweb:/ipfs/QmPADWPiGaSzZDFNpFEUx4ZPqhzPkYncBpHyTfAGcfsqzy"]},"lib/openzeppelin-contracts/contracts/utils/StorageSlot.sol":{"keccak256":"0xcf74f855663ce2ae00ed8352666b7935f6cddea2932fdf2c3ecd30a9b1cd0e97","license":"MIT","urls":["bzz-raw://9f660b1f351b757dfe01438e59888f31f33ded3afcf5cb5b0d9bf9aa6f320a8b","dweb:/ipfs/QmarDJ5hZEgBtCmmrVzEZWjub9769eD686jmzb2XpSU1cM"]},"lib/openzeppelin-contracts/contracts/utils/Strings.sol":{"keccak256":"0x104c579d98591d36dfe190bdad391c79c358d399ee18d76e877c30b94d3c07a0","license":"MIT","urls":["bzz-raw://332ab9adbc9a985195d56832159d09417ed5674adbbd6189db74586110aabc59","dweb:/ipfs/QmZNVeVa4b7iKyFbHjvKir45RGBM93T7Yjgg9ye6Hu2umd"]},"lib/openzeppelin-contracts/contracts/utils/cryptography/ECDSA.sol":{"keccak256":"0x69f54c02b7d81d505910ec198c11ed4c6a728418a868b906b4a0cf29946fda84","license":"MIT","urls":["bzz-raw://8e25e4bdb7ae1f21d23bfee996e22736fc0ab44cfabedac82a757b1edc5623b9","dweb:/ipfs/QmQdWQvB6JCP9ZMbzi8EvQ1PTETqkcTWrbcVurS7DKpa5n"]},"lib/openzeppelin-contracts/contracts/utils/cryptography/EIP712.sol":{"keccak256":"0xda8013da608bda3c9eaa9e59053d38d7888e64bb40aa557e5929cd702f8de87e","license":"MIT","urls":["bzz-raw://3ea13234c6b00ae79dc1a98e7e7f2faf38d37e76a687ccd0c95ad84b03ea570f","dweb:/ipfs/QmWtdefDm5jiEzAjmfPMZ5B1NKVxFoMiD5ZoD68hcNTHun"]},"lib/openzeppelin-contracts/contracts/utils/cryptography/MessageHashUtils.sol":{"keccak256":"0x26670fef37d4adf55570ba78815eec5f31cb017e708f61886add4fc4da665631","license":"MIT","urls":["bzz-raw://b16d45febff462bafd8a5669f904796a835baf607df58a8461916d3bf4f08c59","dweb:/ipfs/QmU2eJFpjmT4vxeJWJyLeQb8Xht1kdB8Y6MKLDPFA9WPux"]},"lib/openzeppelin-contracts/contracts/utils/cryptography/SignatureChecker.sol":{"keccak256":"0x002af13a3d1a142c05c2c600b6ae9b27fcc2d4d94be8603e51fc677f4f83bc13","license":"MIT","urls":["bzz-raw://56c0e78fef00206235fb265ea0832e9493db3c19eb79ffa49aebc275aa83bc44","dweb:/ipfs/QmNm45tsA7DHU21KgVhJqgRWz42fErq5e1D6aNwHe9Z5pd"]},"lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol":{"keccak256":"0x4ee0e04cc52827588793a141d5efb9830f179a17e80867cc332b3a30ceb30fd9","license":"MIT","urls":["bzz-raw://17d8f47fce493b34099ed9005c5aee3012488f063cfe1c34ed8f9e6fc3d576e5","dweb:/ipfs/QmZco2GbZZhEMvG3BovyoGMAFKvfi2LhfNGQLn283LPrXf"]},"lib/openzeppelin-contracts/contracts/utils/math/Math.sol":{"keccak256":"0x1225214420c83ebcca88f2ae2b50f053aaa7df7bd684c3e878d334627f2edfc6","license":"MIT","urls":["bzz-raw://6c5fab4970634f9ab9a620983dc1c8a30153981a0b1a521666e269d0a11399d3","dweb:/ipfs/QmVRnBC575MESGkEHndjujtR7qub2FzU9RWy9eKLp4hPZB"]},"lib/openzeppelin-contracts/contracts/utils/math/SafeCast.sol":{"keccak256":"0x195533c86d0ef72bcc06456a4f66a9b941f38eb403739b00f21fd7c1abd1ae54","license":"MIT","urls":["bzz-raw://b1d578337048cad08c1c03041cca5978eff5428aa130c781b271ad9e5566e1f8","dweb:/ipfs/QmPFKL2r9CBsMwmUqqdcFPfHZB2qcs9g1HDrPxzWSxomvy"]},"lib/openzeppelin-contracts/contracts/utils/math/SignedMath.sol":{"keccak256":"0xb1970fac7b64e6c09611e6691791e848d5e3fe410fa5899e7df2e0afd77a99e3","license":"MIT","urls":["bzz-raw://db5fbb3dddd8b7047465b62575d96231ba8a2774d37fb4737fbf23340fabbb03","dweb:/ipfs/QmVUSvooZKEdEdap619tcJjTLcAuH6QBdZqAzWwnAXZAWJ"]},"src/contracts/AaveV3AdapterFactory.sol":{"keccak256":"0x76b247ee43b3160d457ad487aa052469d8ae21e47d2e18d9b4cfc45b3bcbef4f","license":"UNLICENSED","urls":["bzz-raw://16372b29fe68012b1187a359b3de3ea54aa4d2b66d9088530099bde7d434891e","dweb:/ipfs/QmX9nfJjpfjSYzfZPsNHD8b7FPV6Yf6rViB3Q54FSF6zUq"]},"src/contracts/BaseAdapterFactory.sol":{"keccak256":"0x5c7fefa1164fad93678e17c8dacacf94a886a7b32cc414e8f841fe3704aac84d","license":"UNLICENSED","urls":["bzz-raw://ff2f2c2548f64b85027ab6d11dfb99931c18c08f624717957635ebc1a3adcde5","dweb:/ipfs/Qme6zCLTqX9hx8g9ErSf6cA6QZZwoXuivytDMQVkr1syxT"]},"src/dependencies/cow/IBasicBorrower.sol":{"keccak256":"0x160f60bfd4390bda950185fa6cc658a2a4ffb709a208c5326f7ffc25c56cb466","license":"GPL-3.0-or-later","urls":["bzz-raw://1b80106b06b93610c4f51938107cc6d8a2e71e7e19b5c9124594f18066136635","dweb:/ipfs/QmbUQqreiYXPc64x5LwRu34yV5u5W48byfXhSmY4eimV69"]},"src/interfaces/IAaveBaseAdapter.sol":{"keccak256":"0x8281d07db92105aab4c96bcd206ef11de7eb3e8cebc5913ac8fccfe4328ed7ef","license":"UNLICENSED","urls":["bzz-raw://01d94af76094eda5393d934fbeae46c8dd4267e5db26d8a24a6ba331f3f6fdce","dweb:/ipfs/QmQr6Q84qGkSJWpLbmtw28kSGf4v33BvPGiGKvaPwBmpGR"]},"src/interfaces/IBaseAdapterFactory.sol":{"keccak256":"0xfaf956a1b31a3104a4a2c0e9f3a0ef89a5a16b7b5e21aa1b571572210625e58f","license":"UNLICENSED","urls":["bzz-raw://e73063bd1de1f83a6865ddb40a5befd50dbe182d68863c4ea997a0592c8c279f","dweb:/ipfs/QmNSZ1WDyq6kKCkUD7Ac4z2QFzDz4hiBs7uHmRoxewcKGF"]},"src/libraries/DataTypes.sol":{"keccak256":"0x121b82422506d3b598b659d110965ce411c22fb36cfeb2605000612ba2efd99b","license":"UNLICENSED","urls":["bzz-raw://92bbc5d30bef7ff1ba322f4afac995f561ea213daf46d36201cd87ddaf99e3fa","dweb:/ipfs/QmR7GNTP36q5XQJQfFManfhVFaTWH726HCb33o3P7dZAcT"]}},"version":1},"storageLayout":{"types":{"t_bool":{"label":"bool","encoding":"inplace","numberOfBytes":"1"},"t_address":{"label":"address","encoding":"inplace","numberOfBytes":"20"},"t_uint256":{"label":"uint256","encoding":"inplace","numberOfBytes":"32"},"t_string_storage":{"label":"string","encoding":"bytes","numberOfBytes":"32"},"t_mapping(t_address,t_bool)":{"key":"t_address","label":"mapping(address => bool)","value":"t_bool","encoding":"mapping","numberOfBytes":"32"},"t_struct(OpenFlashLoan)11310_storage":{"label":"struct DataTypes.OpenFlashLoan","members":[{"slot":"0","type":"t_bool","astId":11305,"label":"instanceActive","offset":0,"contract":"src/contracts/AaveV3AdapterFactory.sol:AaveV3AdapterFactory"},{"slot":"0","type":"t_address","astId":11307,"label":"asset","offset":1,"contract":"src/contracts/AaveV3AdapterFactory.sol:AaveV3AdapterFactory"},{"slot":"1","type":"t_uint256","astId":11309,"label":"totalAmount","offset":0,"contract":"src/contracts/AaveV3AdapterFactory.sol:AaveV3AdapterFactory"}],"encoding":"inplace","numberOfBytes":"64"},"t_mapping(t_address,t_mapping(t_address,t_bool))":{"key":"t_address","label":"mapping(address => mapping(address => bool))","value":"t_mapping(t_address,t_bool)","encoding":"mapping","numberOfBytes":"32"},"t_mapping(t_address,t_struct(OpenFlashLoan)11310_storage)":{"key":"t_address","label":"mapping(address => struct DataTypes.OpenFlashLoan)","value":"t_struct(OpenFlashLoan)11310_storage","encoding":"mapping","numberOfBytes":"32"}},"storage":[{"slot":"0","type":"t_address","astId":2034,"label":"_owner","offset":0,"contract":"src/contracts/AaveV3AdapterFactory.sol:AaveV3AdapterFactory"},{"slot":"0","type":"t_bool","astId":3702,"label":"_paused","offset":20,"contract":"src/contracts/AaveV3AdapterFactory.sol:AaveV3AdapterFactory"},{"slot":"1","type":"t_string_storage","astId":5929,"label":"_nameFallback","offset":0,"contract":"src/contracts/AaveV3AdapterFactory.sol:AaveV3AdapterFactory"},{"slot":"2","type":"t_string_storage","astId":5931,"label":"_versionFallback","offset":0,"contract":"src/contracts/AaveV3AdapterFactory.sol:AaveV3AdapterFactory"},{"slot":"3","type":"t_mapping(t_address,t_bool)","astId":10375,"label":"isAdapterImplementation","offset":0,"contract":"src/contracts/AaveV3AdapterFactory.sol:AaveV3AdapterFactory"},{"slot":"4","type":"t_mapping(t_address,t_struct(OpenFlashLoan)11310_storage)","astId":10381,"label":"openFlashLoans","offset":0,"contract":"src/contracts/AaveV3AdapterFactory.sol:AaveV3AdapterFactory"},{"slot":"5","type":"t_mapping(t_address,t_mapping(t_address,t_bool))","astId":10388,"label":"isInstanceCancelled","offset":0,"contract":"src/contracts/AaveV3AdapterFactory.sol:AaveV3AdapterFactory"}]},"transientStorageLayout":null,"userdoc":{"kind":"user","errors":{"InvalidLender()":[{"notice":"Thrown when the specified lender is not the valid one for the Factory."}],"NothingToRepay()":[{"notice":"Thrown when the calling Instance has nothing to repay."}],"CallerNotRouter()":[{"notice":"Thrown when the caller is not the Router."}],"CallerNotAavePool()":[{"notice":"Thrown when the caller is not the Aave Pool."}],"CallerNotInstance()":[{"notice":"Thrown when the caller is not an Instance deployed by the Factory."}],"InstanceCancelled()":[{"notice":"Thrown when the order has been cancelled by the user."}],"InvalidZeroAmount()":[{"notice":"Thrown when the specified amount is null."}],"InvalidZeroAddress()":[{"notice":"Thrown when the specified address is the zero address."}],"InvalidOrderReceiver()":[{"notice":"Thrown when the order receiver is invalid."}],"InstanceNotInitialized()":[{"notice":"Thrown when the Instance is not initialized."}],"ImplementationNotActive()":[{"notice":"Thrown when the specified implementation is not active."}],"InstanceAlreadyDeployed()":[{"notice":"Thrown when the Instance is already deployed."}],"ImplementationAlreadyListed()":[{"notice":"Thrown when the specified implementation is already listed."}]},"events":{"CancelInstance(address,address)":{"notice":"Emitted when an Instance owner cancels it."},"SetAdapterImplementation(address,bool)":{"notice":"Emitted when an AdapterHook Implementations status is updated."}},"notice":"Factory contract to deploy listed AdapterHooks linked to Cow Orders & draw Flashloans from the Aave V3 Pool.","methods":{"pause()":{"notice":"Pauses this contract"},"ROUTER()":{"notice":"FlashLoanRouter contract."},"unpause()":{"notice":"Unpauses this contract"},"DOMAIN_SEPARATOR()":{"notice":"Returns the domain separator used in the EIP712 encoding of the AdapterOrderSig struct."},"SETTLEMENT_CONTRACT()":{"notice":"Settlement contract."},"rescueTokens(address)":{"notice":"Rescue any ERC20 tokens left on the contract."},"notifyRepayFlashLoan()":{"notice":"Notifies the AdapterFactory that a FlashLoan is ready to be repaid."},"cancelInstance(address)":{"notice":"Cancels an Adapter Instance to be deployed by the Factory."},"openFlashLoans(address)":{"notice":"Open FlashLoans data for Adapter Instances."},"isAdapterImplementation(address)":{"notice":"Mapping of Adapter implementations."},"isInstanceCancelled(address,address)":{"notice":"Mapping to track cancelled Instances."},"setAdapterImplementation(address,bool)":{"notice":"Sets the status of an AdapterHook Implementation."},"flashLoanAndCallBack(address,address,uint256,bytes)":{"notice":"Start the flow to draw a FlashLoan then calls back the FlashLoanRouter contract with the given data"},"executeOperation(address[],uint256[],uint256[],address,bytes)":{"notice":"Executes an operation after receiving the flash-borrowed assets"},"verifyOrderSignature(address,(address,address,address,uint256,uint256,uint32,bytes32,uint256,bytes32,bool,bytes32,bytes32),bytes)":{"notice":"Verifies that the signature provided for an Order using an Adapter is valid."},"deployAndTransferFlashLoan(address,(address,address,address,address,uint256,uint256,bytes32,uint256,uint256,uint256,uint256,uint256))":{"notice":"Deploys an Adapter Instance and transfers the FlashLoaned assets to it (must have been initiated before)."},"getInstanceDeterministicAddress(address,(address,address,address,address,uint256,uint256,bytes32,uint256,uint256,uint256,uint256,uint256))":{"notice":"Returns the determined address of an Adapter Instance to clone based on a specific Order."}},"version":1},"devdoc":{"kind":"dev","author":"Aave Labs.","errors":{"EnforcedPause()":[{"details":"The operation failed because the contract is paused."}],"ExpectedPause()":[{"details":"The operation failed because the contract is not paused."}],"FailedDeployment()":[{"details":"The deployment failed."}],"OwnableInvalidOwner(address)":[{"details":"The owner is not a valid owner account. (eg. `address(0)`)"}],"SafeERC20FailedOperation(address)":[{"details":"An operation with an ERC-20 token failed."}],"OwnableUnauthorizedAccount(address)":[{"details":"The caller account is not authorized to perform an operation."}],"InsufficientBalance(uint256,uint256)":[{"details":"The ETH balance of the account is not enough to perform the operation."}]},"events":{"Paused(address)":{"details":"Emitted when the pause is triggered by `account`."},"Unpaused(address)":{"details":"Emitted when the pause is lifted by `account`."},"EIP712DomainChanged()":{"details":"MAY be emitted to signal that the domain could have changed."}},"methods":{"owner()":{"details":"Returns the address of the current owner."},"paused()":{"details":"Returns true if the contract is paused, and false otherwise."},"constructor":{"params":{"owner_":"The address of the owner of the Factory.","router_":"The address of the Cow FlashLoan Router contract.","aavePool_":"The address of the Aave V3 Pool contract.","settlement_":"The address of the Cow Settlement contract."},"details":"Constructor."},"eip712Domain()":{"details":"returns the fields and values that describe the domain separator used by this contract for EIP-712 signature."},"DOMAIN_SEPARATOR()":{"returns":{"_0":"The domain separator."}},"renounceOwnership()":{"details":"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner."},"rescueTokens(address)":{"details":"Emergency rescue for token stucked on this contract, as failsafe mechanism.- Funds should never remain in this contract more time than during transactions.- Only callable by the owner."},"cancelInstance(address)":{"params":{"instance":"The address of the Adapter Instance to cancel."},"details":"This is used to cancel a pending EIP-1271 Order before it is executed, by blocking the deployment of the Instance."},"transferOwnership(address)":{"details":"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner."},"setAdapterImplementation(address,bool)":{"params":{"active":"True to activate, false to deactivate.","adapterImplementation":"The address of the Adapter Implementation."}},"flashLoanAndCallBack(address,address,uint256,bytes)":{"params":{"token":"The address of the ERC20 token for the FlashLoan","amount":"The amount of the FlashLoan","lender":"The address of the lender to draw the FlashLoan from","callbackData":"Data to send back to the FlashLoanRouter during the callback"}},"executeOperation(address[],uint256[],uint256[],address,bytes)":{"params":{"assets":"The addresses of the flash-borrowed assets","params":"The byte-encoded params passed when initiating the flashloan","amounts":"The amounts of the flash-borrowed assets","premiums":"The fee of each flash-borrowed asset","initiator":"The address of the flashloan initiator"},"details":"Ensure that the contract can return the debt + premium, e.g., has      enough funds to repay and has approved the Pool to pull the total amount","returns":{"_0":"True if the execution of the operation succeeds, false otherwise"}},"verifyOrderSignature(address,(address,address,address,uint256,uint256,uint32,bytes32,uint256,bytes32,bool,bytes32,bytes32),bytes)":{"params":{"order":"The Order data to verify.","signature":"The signature to verify.","orderOwner":"The address of the owner of the Order."},"returns":{"_0":"True if the signature is valid, false otherwise."}},"deployAndTransferFlashLoan(address,(address,address,address,address,uint256,uint256,bytes32,uint256,uint256,uint256,uint256,uint256))":{"params":{"hookData":"The HookOrderData struct containing the order details & postHook parameters.","adapterImplementation":"The address of the Adapter Instance implementation to clone."}},"getInstanceDeterministicAddress(address,(address,address,address,address,uint256,uint256,bytes32,uint256,uint256,uint256,uint256,uint256))":{"params":{"hookData":"The HookOrderData struct containing the order details & postHook parameters.","adapterImplementation":"The address of the Adapter Implementation to clone."},"returns":{"_0":"The determined address of the Adapter Instance."}}},"version":1,"stateVariables":{"REFERRAL_CODE":{"details":"Referral code to pass to the Aave Pool"}}},"sourceIds":{"src/libraries/DataTypes.sol":{"id":44},"src/interfaces/IAaveBaseAdapter.sol":{"id":42},"src/contracts/BaseAdapterFactory.sol":{"id":40},"src/contracts/AaveV3AdapterFactory.sol":{"id":39},"src/interfaces/IBaseAdapterFactory.sol":{"id":43},"src/dependencies/cow/IBasicBorrower.sol":{"id":41},"lib/flash-loan-router/src/library/Loan.sol":{"id":9},"lib/flash-loan-router/src/vendored/IERC20.sol":{"id":11},"lib/contracts/src/contracts/interfaces/IERC20.sol":{"id":4},"lib/flash-loan-router/src/interface/IBorrower.sol":{"id":6},"lib/contracts/src/contracts/libraries/GPv2Order.sol":{"id":5},"lib/openzeppelin-contracts/contracts/utils/Bytes.sol":{"id":22},"lib/openzeppelin-contracts/contracts/utils/Panic.sol":{"id":26},"lib/aave-v3-origin/src/contracts/interfaces/IPool.sol":{"id":0},"lib/openzeppelin-contracts/contracts/proxy/Clones.sol":{"id":19},"lib/openzeppelin-contracts/contracts/utils/Errors.sol":{"id":25},"lib/flash-loan-router/src/interface/ICowSettlement.sol":{"id":7},"lib/openzeppelin-contracts/contracts/utils/Context.sol":{"id":23},"lib/openzeppelin-contracts/contracts/utils/Create2.sol":{"id":24},"lib/openzeppelin-contracts/contracts/utils/Strings.sol":{"id":30},"lib/openzeppelin-contracts/contracts/access/Ownable.sol":{"id":12},"lib/openzeppelin-contracts/contracts/utils/Pausable.sol":{"id":27},"lib/flash-loan-router/src/interface/IFlashLoanRouter.sol":{"id":8},"lib/openzeppelin-contracts/contracts/utils/math/Math.sol":{"id":36},"lib/flash-loan-router/src/vendored/ICowAuthentication.sol":{"id":10},"lib/openzeppelin-contracts/contracts/interfaces/IERC20.sol":{"id":16},"lib/openzeppelin-contracts/contracts/utils/StorageSlot.sol":{"id":29},"lib/openzeppelin-contracts/contracts/interfaces/IERC165.sol":{"id":15},"lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol":{"id":20},"lib/openzeppelin-contracts/contracts/utils/ShortStrings.sol":{"id":28},"lib/openzeppelin-contracts/contracts/interfaces/IERC1271.sol":{"id":13},"lib/openzeppelin-contracts/contracts/interfaces/IERC1363.sol":{"id":14},"lib/openzeppelin-contracts/contracts/interfaces/IERC5267.sol":{"id":17},"lib/openzeppelin-contracts/contracts/interfaces/IERC7913.sol":{"id":18},"lib/openzeppelin-contracts/contracts/utils/math/SafeCast.sol":{"id":37},"lib/openzeppelin-contracts/contracts/utils/math/SignedMath.sol":{"id":38},"lib/openzeppelin-contracts/contracts/utils/cryptography/ECDSA.sol":{"id":31},"lib/openzeppelin-contracts/contracts/utils/cryptography/EIP712.sol":{"id":32},"lib/openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol":{"id":21},"lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol":{"id":35},"lib/aave-v3-origin/src/contracts/interfaces/IPoolAddressesProvider.sol":{"id":1},"lib/aave-v3-origin/src/contracts/protocol/libraries/types/DataTypes.sol":{"id":3},"lib/openzeppelin-contracts/contracts/utils/cryptography/MessageHashUtils.sol":{"id":33},"lib/openzeppelin-contracts/contracts/utils/cryptography/SignatureChecker.sol":{"id":34},"lib/aave-v3-origin/src/contracts/misc/flashloan/interfaces/IFlashLoanReceiver.sol":{"id":2}},"additionalInput":null,"stdJsonInput":{"sources":{"src/libraries/DataTypes.sol":{"content":"// SPDX-License-Identifier: UNLICENSED\n// Copyright (c) 2025 Aave Labs\npragma solidity ^0.8.10;\n\n/// @notice Data types used in the Adapter Hooks & Factory.\n/// @author Aave Labs.\nlibrary DataTypes {\n  struct Permit {\n    uint256 amount;\n    uint256 deadline;\n    uint8 v;\n    bytes32 r;\n    bytes32 s;\n  }\n\n  struct CreditDelegationSig {\n    uint256 amount;\n    uint256 deadline;\n    uint8 v;\n    bytes32 r;\n    bytes32 s;\n  }\n\n  // keccak256('AdapterOrderSig(address instance,address sellToken,address buyToken,uint256 sellAmount,uint256 buyAmount,bytes32 kind,uint32 validTo,bytes32 appData)')\n  bytes32 public constant ADAPTER_ORDER_TYPEHASH =\n    0x1ca15395c04ac473d5b42656e3782ae1fce1a113fdb5432b57f8fb0870fa3178;\n\n  struct AdapterOrderSig {\n    address instance;\n    address sellToken;\n    address buyToken;\n    uint256 sellAmount;\n    uint256 buyAmount;\n    bytes32 kind;\n    uint32 validTo;\n    bytes32 appData;\n  }\n\n  /// @dev Data needed by the AdapterHook for the postHook execution.\n  struct HookOrderData {\n    // Owner of the AdapterHook Instance (the user signing the Order)\n    address owner;\n    // Address of the Instance to be receiver of the Order (as specified in the GPv2Order.Data)\n    address receiver;\n    // The asset being sold (as specified in the GPv2Order.Data)\n    address sellToken;\n    // The asset being bought (as specified in the GPv2Order.Data)\n    address buyToken;\n    // The amount to sell (as specified in the GPv2Order.Data)\n    uint256 sellAmount;\n    // The amount to buy (as specified in the GPv2Order.Data)\n    uint256 buyAmount;\n    // The kind of swap (as specified in the GPv2Order.Data)\n    bytes32 kind;\n    // The expiry date of the Order (as specified in the GPv2Order.Data)\n    uint256 validTo;\n    // The amount taken as Flashloan\n    uint256 flashLoanAmount;\n    // The fee amount to be repaid on top of the flashLoanAmount\n    uint256 flashLoanFeeAmount;\n    // The amount of sell token given as parameter for the postHook\n    uint256 hookSellTokenAmount;\n    // The amount of buy token given as parameter for the postHook\n    uint256 hookBuyTokenAmount;\n  }\n\n  struct HookAmounts {\n    // The amount taken as Flashloan\n    uint256 flashLoanAmount;\n    // The fee amount to be repaid on top of the flashLoanAmount\n    uint256 flashLoanFeeAmount;\n    // The amount of sell token given as parameter for the postHook\n    uint256 sellTokenAmount;\n    // The amount of buy token given as parameter for the postHook\n    uint256 buyTokenAmount;\n  }\n\n  struct OpenFlashLoan {\n    // Whether the AdapterHook Instance that took the Flashloan is active\n    bool instanceActive;\n    // The asset being lent\n    address asset;\n    // The total amount of the flashloan (principal + fees)\n    uint256 totalAmount;\n  }\n}\n"},"src/interfaces/IAaveBaseAdapter.sol":{"content":"// SPDX-License-Identifier: UNLICENSED\n// Copyright (c) 2025 Aave Labs\npragma solidity ^0.8.0;\n\nimport {DataTypes} from 'src/libraries/DataTypes.sol';\n\n/// @notice Base interface for all Adapter Hooks.\n/// @author Aave Labs.\ninterface IAaveBaseAdapter {\n  /// @notice Thrown when the Instance is already initialized.\n  error AlreadyInitialized();\n\n  /// @notice Thrown when the caller is not the Instance owner.\n  error CallerNotInstanceOwner();\n\n  /// @notice Thrown when the withdrawn amount is not the expected one.\n  error InvalidWithdraw();\n\n  /// @notice Thrown when the borrowed amount is not the expected one.\n  error InvalidBorrow();\n\n  /// @notice Thrown when the specified amount is invalid.\n  error InvalidAmount();\n\n  /// @notice Thrown when the specified `HookSellAmount` is invalid.\n  error InvalidHookSellAmount();\n\n  /// @notice Thrown when the current Instance balance is not the amount expected.\n  error InvalidBalance();\n\n  /// @notice Thrown when the specified amount is zero.\n  error InvalidZeroAmount();\n\n  /// @notice Thrown when the specified address is the zero address.\n  error InvalidZeroAddress();\n\n  /// @notice Thrown when the given Order signature is invalid.\n  error InvalidOrderSignature();\n\n  /// @notice Thrown when the given Order hash does not match the computed one.\n  error OrderHashMismatch();\n\n  /// @notice Thrown when the given Order buyToken is not the expected one.\n  error InvalidBuyToken();\n\n  /// @notice Thrown when the given Order sellToken is not the expected one.\n  error InvalidSellToken();\n\n  /// @notice Thrown when the given Order expiry is invalid.\n  error InvalidOrderExpiry();\n\n  /// @notice Thrown when the Order is expired.\n  error OrderExpired();\n\n  /// @notice Thrown when the given Order is a \"partially fillable\" one.\n  error OrderPartiallyFillable();\n\n  /// @notice Thrown when the given Order sellAmount is invalid.\n  error InvalidSellAmount();\n\n  /// @notice Thrown when the given Order buyAmount is invalid.\n  error InvalidBuyAmount();\n\n  /// @notice Thrown when the given Order kind is invalid.\n  error InvalidOrderKind();\n\n  /// @notice Thrown when the given Order receiver is invalid.\n  error InvalidOrderReceiver();\n\n  /// @notice Thrown when the given Order fee is not null.\n  error OrderFeeNotNull();\n\n  /// @notice Thrown when the given Order sellTokenBalance or buyTokenBalance is not null.\n  error InvalidOrderTokenBalancer();\n\n  /// @notice Sets the parameters of an Instance.\n  /// @param hookData_ The HookOrderData struct containing the order details & postHook parameters.\n  function setParameters(DataTypes.HookOrderData calldata hookData_) external;\n\n  /// @notice Returns the stored HookOrderData struct.\n  /// @return The stored HookOrderData struct.\n  function getHookData() external view returns (DataTypes.HookOrderData memory);\n\n  /// @notice AaveV3AdapterFactory contract.\n  function FACTORY() external view returns (address);\n\n  /// @notice Settlement contract.\n  function SETTLEMENT_CONTRACT() external view returns (address);\n\n  /// @notice Aave Pool contract.\n  function AAVE_POOL() external view returns (address);\n}\n"},"src/contracts/BaseAdapterFactory.sol":{"content":"// SPDX-License-Identifier: UNLICENSED\n// Copyright (c) 2025 Aave Labs\npragma solidity 0.8.28;\n\nimport {IERC20} from 'openzeppelin/token/ERC20/IERC20.sol';\nimport {SafeERC20} from 'openzeppelin/token/ERC20/utils/SafeERC20.sol';\nimport {EIP712} from 'openzeppelin/utils/cryptography/EIP712.sol';\nimport {SignatureChecker} from 'openzeppelin/utils/cryptography/SignatureChecker.sol';\nimport {Clones} from 'openzeppelin/proxy/Clones.sol';\nimport {Ownable} from 'openzeppelin/access/Ownable.sol';\nimport {Pausable} from 'openzeppelin/utils/Pausable.sol';\n\nimport {IFlashLoanRouter} from 'cowprotocol/flash-loan-router/interface/IFlashLoanRouter.sol';\nimport {GPv2Order} from 'cowprotocol/contracts/libraries/GPv2Order.sol';\nimport {ICowSettlement} from 'cowprotocol/flash-loan-router/interface/ICowSettlement.sol';\n\nimport {DataTypes} from 'src/libraries/DataTypes.sol';\nimport {IBaseAdapterFactory} from 'src/interfaces/IBaseAdapterFactory.sol';\nimport {IAaveBaseAdapter} from 'src/interfaces/IAaveBaseAdapter.sol';\nimport {IBasicBorrower} from 'src/dependencies/cow/IBasicBorrower.sol';\n\n/// @notice Base for AdapterFactory to deploy listed AdapterHooks linked to Cow Orders & draw Flashloans.\n/// @author Aave Labs.\nabstract contract BaseAdapterFactory is\n  Ownable,\n  Pausable,\n  EIP712,\n  IBasicBorrower,\n  IBaseAdapterFactory\n{\n  using SafeERC20 for IERC20;\n  using GPv2Order for GPv2Order.Data;\n\n  /// @inheritdoc IBaseAdapterFactory\n  ICowSettlement public immutable SETTLEMENT_CONTRACT;\n  /// @inheritdoc IBaseAdapterFactory\n  IFlashLoanRouter public immutable ROUTER;\n\n  /// @notice Mapping of Adapter implementations.\n  mapping(address => bool) public isAdapterImplementation;\n\n  /// @notice Open FlashLoans data for Adapter Instances.\n  mapping(address => DataTypes.OpenFlashLoan) public openFlashLoans;\n\n  /// @notice Mapping to track cancelled Instances.\n  mapping(address => mapping(address => bool)) public isInstanceCancelled;\n\n  /// @dev Constructor.\n  /// @param settlement_ The address of the Cow Settlement contract.\n  /// @param router_ The address of the Cow FlashLoan Router contract.\n  /// @param owner_ The address of the owner of the Factory.\n  /// @param name_ The EIP712 name.\n  /// @param version_ The EIP712 version.\n  constructor(\n    address settlement_,\n    address router_,\n    address owner_,\n    string memory name_,\n    string memory version_\n  ) Ownable(owner_) EIP712(name_, version_) {\n    require(\n      settlement_ != address(0) && router_ != address(0) && owner_ != address(0),\n      InvalidZeroAddress()\n    );\n    SETTLEMENT_CONTRACT = ICowSettlement(settlement_);\n    ROUTER = IFlashLoanRouter(router_);\n  }\n\n  /// @inheritdoc IBaseAdapterFactory\n  function setAdapterImplementation(address adapterImplementation, bool active) external onlyOwner {\n    require(adapterImplementation != address(0), InvalidZeroAddress());\n\n    isAdapterImplementation[adapterImplementation] = active;\n\n    emit SetAdapterImplementation(adapterImplementation, active);\n  }\n\n  /// @notice Rescue any ERC20 tokens left on the contract.\n  /// @dev Emergency rescue for token stucked on this contract, as failsafe mechanism.\n  /// @dev - Funds should never remain in this contract more time than during transactions.\n  /// @dev - Only callable by the owner.\n  function rescueTokens(IERC20 token) external onlyOwner {\n    token.safeTransfer(owner(), token.balanceOf(address(this)));\n  }\n\n  /// @notice Pauses this contract\n  function pause() external onlyOwner {\n    _pause();\n  }\n\n  /// @notice Unpauses this contract\n  function unpause() external onlyOwner {\n    _unpause();\n  }\n\n  /// @inheritdoc IBasicBorrower\n  function flashLoanAndCallBack(\n    address lender,\n    IERC20 token,\n    uint256 amount,\n    bytes calldata callbackData\n  ) external virtual whenNotPaused {\n    require(msg.sender == address(ROUTER), CallerNotRouter());\n    _triggerFlashLoan(lender, token, amount, callbackData);\n  }\n\n  /// @inheritdoc IBaseAdapterFactory\n  function deployAndTransferFlashLoan(\n    address adapterImplementation,\n    DataTypes.HookOrderData memory hookData\n  ) external whenNotPaused {\n    // Deploy the Adapter Instance\n    address adapterInstance = _deployNewInstance(adapterImplementation, hookData);\n\n    require(!isInstanceCancelled[hookData.owner][adapterInstance], InstanceCancelled());\n    require(hookData.receiver == adapterInstance, InvalidOrderReceiver());\n\n    // Transfer the FlashLoaned assets to the Adapter Instance\n    IERC20(hookData.sellToken).safeTransfer(adapterInstance, hookData.flashLoanAmount);\n\n    // Register the open FlashLoan\n    openFlashLoans[adapterInstance] = DataTypes.OpenFlashLoan({\n      instanceActive: true,\n      asset: hookData.sellToken,\n      totalAmount: hookData.flashLoanAmount + hookData.flashLoanFeeAmount\n    });\n  }\n\n  /// @inheritdoc IBaseAdapterFactory\n  function notifyRepayFlashLoan() external virtual whenNotPaused {\n    // Check the current open FlashLoan for the caller\n    DataTypes.OpenFlashLoan storage flashLoanData = openFlashLoans[msg.sender];\n    require(flashLoanData.instanceActive, CallerNotInstance());\n    require(flashLoanData.totalAmount > 0, NothingToRepay());\n\n    _repayFlashLoan(IERC20(flashLoanData.asset), msg.sender, flashLoanData.totalAmount);\n\n    flashLoanData.instanceActive = false;\n  }\n\n  /// @inheritdoc IBaseAdapterFactory\n  function cancelInstance(address instance) external {\n    require(instance != address(0), InvalidZeroAddress());\n\n    isInstanceCancelled[msg.sender][instance] = true;\n\n    emit CancelInstance(msg.sender, instance);\n  }\n\n  /// @inheritdoc IBaseAdapterFactory\n  function verifyOrderSignature(\n    address orderOwner,\n    GPv2Order.Data memory order,\n    bytes memory signature\n  ) external view whenNotPaused returns (bool) {\n    address instance = msg.sender;\n    bytes32 digest = _hashTypedDataV4(\n      keccak256(\n        abi.encode(\n          DataTypes.ADAPTER_ORDER_TYPEHASH,\n          instance,\n          address(order.sellToken),\n          address(order.buyToken),\n          order.sellAmount,\n          order.buyAmount,\n          order.kind,\n          order.validTo,\n          order.appData\n        )\n      )\n    );\n    return SignatureChecker.isValidSignatureNow(orderOwner, digest, signature);\n  }\n\n  /// @inheritdoc IBaseAdapterFactory\n  function DOMAIN_SEPARATOR() external view returns (bytes32) {\n    return _domainSeparatorV4();\n  }\n\n  /// @inheritdoc IBaseAdapterFactory\n  function getInstanceDeterministicAddress(\n    address adapterImplementation,\n    DataTypes.HookOrderData memory hookData\n  ) external view returns (address) {\n    return _getInstanceDeterministicAddress(adapterImplementation, hookData);\n  }\n\n  /// @dev Triggers the flashloan flow on the protocol implemented by the AdapterFactory.\n  function _triggerFlashLoan(\n    address lender,\n    IERC20 token,\n    uint256 amount,\n    bytes calldata callbackData\n  ) internal virtual;\n\n  /// @dev Repays the flashloan flow on the protocol implemented by the AdapterFactory.\n  function _repayFlashLoan(IERC20 token, address from, uint256 amount) internal virtual;\n\n  /// @dev To be executed after the flashloan is initiated, returning the callbackData to the FlashLoanRouter.\n  function _executeFlashLoan(bytes memory callbackData) internal returns (bool) {\n    // Callback to the FlashLoanRouter with the data to continue the execution of the Settlement.\n    ROUTER.borrowerCallBack(callbackData);\n    return true;\n  }\n\n  /// @dev Deploys an AdapterHook Instance for a specific user and Implementation.\n  /// @param adapterImplementation The address of the Adapter Implementation to clone.\n  /// @param hookData The HookOrderData struct containing the Order & postHook data.\n  /// @return The address of the AdapterHook instance.\n  function _deployNewInstance(\n    address adapterImplementation,\n    DataTypes.HookOrderData memory hookData\n  ) internal returns (address) {\n    require(isAdapterImplementation[adapterImplementation], ImplementationNotActive());\n\n    // Get the salt based on the Order data and the postHook parameters\n    bytes32 salt = _getSaltDeterministic(adapterImplementation, hookData);\n\n    address instanceAddress = Clones.predictDeterministicAddress(\n      adapterImplementation,\n      salt,\n      address(this)\n    );\n    require(instanceAddress.code.length == 0, InstanceAlreadyDeployed());\n\n    // Deploy the Adapter Instance\n    instanceAddress = Clones.cloneDeterministic(adapterImplementation, salt);\n\n    // Initialize the Adapter Instance with the HookOrderData struct\n    IAaveBaseAdapter(instanceAddress).setParameters(hookData);\n\n    return instanceAddress;\n  }\n\n  function _getInstanceDeterministicAddress(\n    address adapterImplementation,\n    DataTypes.HookOrderData memory hookData\n  ) internal view returns (address) {\n    // Determine the address based on the salt determined by the Implementation & Order owner\n    return\n      Clones.predictDeterministicAddress(\n        adapterImplementation,\n        _getSaltDeterministic(adapterImplementation, hookData),\n        address(this)\n      );\n  }\n\n  function _getSaltDeterministic(\n    address adapterImplementation,\n    DataTypes.HookOrderData memory hookData\n  ) internal pure returns (bytes32) {\n    return\n      keccak256(\n        abi.encode(\n          adapterImplementation,\n          hookData.owner,\n          hookData.sellToken,\n          hookData.buyToken,\n          hookData.sellAmount,\n          hookData.buyAmount,\n          hookData.kind,\n          hookData.validTo,\n          hookData.flashLoanAmount,\n          hookData.flashLoanFeeAmount,\n          hookData.hookSellTokenAmount,\n          hookData.hookBuyTokenAmount\n        )\n      );\n  }\n}\n"},"src/contracts/AaveV3AdapterFactory.sol":{"content":"// SPDX-License-Identifier: UNLICENSED\n// Copyright (c) 2025 Aave Labs\npragma solidity 0.8.28;\n\nimport {IERC20} from 'openzeppelin/token/ERC20/IERC20.sol';\nimport {SafeERC20} from 'openzeppelin/token/ERC20/utils/SafeERC20.sol';\n\nimport {IPool} from 'aave-v3-origin/contracts/interfaces/IPool.sol';\nimport {IFlashLoanReceiver} from 'aave-v3-origin/contracts/misc/flashloan/interfaces/IFlashLoanReceiver.sol';\nimport {IPoolAddressesProvider} from 'aave-v3-origin/contracts/interfaces/IPoolAddressesProvider.sol';\n\nimport {BaseAdapterFactory} from 'src/contracts/BaseAdapterFactory.sol';\n\n/// @notice Factory contract to deploy listed AdapterHooks linked to Cow Orders & draw Flashloans from the Aave V3 Pool.\n/// @author Aave Labs.\ncontract AaveV3AdapterFactory is BaseAdapterFactory, IFlashLoanReceiver {\n  using SafeERC20 for IERC20;\n\n  /// @dev Referral code to pass to the Aave Pool\n  uint16 private constant REFERRAL_CODE = 4300;\n\n  /// @inheritdoc IFlashLoanReceiver\n  IPool public immutable POOL;\n\n  /// @notice Thrown when the caller is not the Aave Pool.\n  error CallerNotAavePool();\n\n  /// @dev Constructor.\n  /// @param aavePool_ The address of the Aave V3 Pool contract.\n  /// @param settlement_ The address of the Cow Settlement contract.\n  /// @param router_ The address of the Cow FlashLoan Router contract.\n  /// @param owner_ The address of the owner of the Factory.\n  constructor(\n    address aavePool_,\n    address settlement_,\n    address router_,\n    address owner_\n  ) BaseAdapterFactory(settlement_, router_, owner_, 'AaveV3AdapterFactory', '1') {\n    require(aavePool_ != address(0), InvalidZeroAddress());\n    POOL = IPool(aavePool_);\n  }\n\n  /// @inheritdoc IFlashLoanReceiver\n  function executeOperation(\n    address[] calldata /*assets*/,\n    uint256[] calldata /*amounts*/,\n    uint256[] calldata /*premiums*/,\n    address /*initiator*/,\n    bytes calldata callbackData\n  ) external virtual returns (bool) {\n    require(msg.sender == address(POOL), CallerNotAavePool());\n    return _executeFlashLoan(callbackData);\n  }\n\n  /// @inheritdoc IFlashLoanReceiver\n  function ADDRESSES_PROVIDER() external view returns (IPoolAddressesProvider) {\n    return POOL.ADDRESSES_PROVIDER();\n  }\n\n  /// @inheritdoc BaseAdapterFactory\n  /// @dev Sets the allowance to the Aave Pool to 0 so the FlashLoan cannot be repaid until notified to.\n  /// @dev And then triggers the FlashLoan from the Aave Pool.\n  function _triggerFlashLoan(\n    address lender,\n    IERC20 token,\n    uint256 amount,\n    bytes calldata callbackData\n  ) internal override {\n    require(lender == address(POOL), InvalidLender());\n\n    token.forceApprove(address(POOL), 0);\n\n    address[] memory assets = new address[](1);\n    uint256[] memory amounts = new uint256[](1);\n    uint256[] memory interestRateModes = new uint256[](1);\n\n    assets[0] = address(token);\n    amounts[0] = amount;\n    interestRateModes[0] = 0;\n\n    POOL.flashLoan(\n      address(this),\n      assets,\n      amounts,\n      interestRateModes,\n      address(this),\n      callbackData,\n      REFERRAL_CODE\n    );\n  }\n\n  /// @inheritdoc BaseAdapterFactory\n  /// @dev Repays the flashLoan by retrieving the assets (and any fees) and giving allowance to the Aave Pool.\n  function _repayFlashLoan(IERC20 asset, address from, uint256 amount) internal override {\n    asset.safeTransferFrom(from, address(this), amount);\n    asset.forceApprove(address(POOL), amount);\n  }\n}\n"},"src/interfaces/IBaseAdapterFactory.sol":{"content":"// SPDX-License-Identifier: UNLICENSED\n// Copyright (c) 2025 Aave Labs\npragma solidity ^0.8.0;\n\nimport {IFlashLoanRouter} from 'cowprotocol/flash-loan-router/interface/IFlashLoanRouter.sol';\nimport {ICowSettlement} from 'cowprotocol/flash-loan-router/interface/ICowSettlement.sol';\nimport {GPv2Order} from 'cowprotocol/contracts/libraries/GPv2Order.sol';\n\nimport {DataTypes} from 'src/libraries/DataTypes.sol';\n\n/// @notice Adapter Factory Base interface.\n/// @author Aave Labs.\ninterface IBaseAdapterFactory {\n  /// @notice Thrown when the caller is not an Instance deployed by the Factory.\n  error CallerNotInstance();\n\n  /// @notice Thrown when the caller is not the Router.\n  error CallerNotRouter();\n\n  /// @notice Thrown when the specified amount is null.\n  error InvalidZeroAmount();\n\n  /// @notice Thrown when the specified address is the zero address.\n  error InvalidZeroAddress();\n\n  /// @notice Thrown when the specified implementation is already listed.\n  error ImplementationAlreadyListed();\n\n  /// @notice Thrown when the specified implementation is not active.\n  error ImplementationNotActive();\n\n  /// @notice Thrown when the Instance is not initialized.\n  error InstanceNotInitialized();\n\n  /// @notice Thrown when the Instance is already deployed.\n  error InstanceAlreadyDeployed();\n\n  /// @notice Thrown when the order receiver is invalid.\n  error InvalidOrderReceiver();\n\n  /// @notice Thrown when the specified lender is not the valid one for the Factory.\n  error InvalidLender();\n\n  /// @notice Thrown when the calling Instance has nothing to repay.\n  error NothingToRepay();\n\n  /// @notice Thrown when the order has been cancelled by the user.\n  error InstanceCancelled();\n\n  /// @notice Emitted when an AdapterHook Implementations status is updated.\n  event SetAdapterImplementation(address indexed adapterImplementation, bool active);\n\n  /// @notice Emitted when an Instance owner cancels it.\n  event CancelInstance(address indexed user, address indexed instanceAddress);\n\n  /// @notice Settlement contract.\n  function SETTLEMENT_CONTRACT() external view returns (ICowSettlement);\n\n  /// @notice FlashLoanRouter contract.\n  function ROUTER() external view returns (IFlashLoanRouter);\n\n  /// @notice Returns the domain separator used in the EIP712 encoding of the AdapterOrderSig struct.\n  /// @return The domain separator.\n  function DOMAIN_SEPARATOR() external view returns (bytes32);\n\n  /// @notice Notifies the AdapterFactory that a FlashLoan is ready to be repaid.\n  function notifyRepayFlashLoan() external;\n\n  /// @notice Deploys an Adapter Instance and transfers the FlashLoaned assets to it (must have been initiated before).\n  /// @param adapterImplementation The address of the Adapter Instance implementation to clone.\n  /// @param hookData The HookOrderData struct containing the order details & postHook parameters.\n  function deployAndTransferFlashLoan(\n    address adapterImplementation,\n    DataTypes.HookOrderData memory hookData\n  ) external;\n\n  /// @notice Cancels an Adapter Instance to be deployed by the Factory.\n  /// @dev This is used to cancel a pending EIP-1271 Order before it is executed, by blocking the deployment of the Instance.\n  /// @param instance The address of the Adapter Instance to cancel.\n  function cancelInstance(address instance) external;\n\n  /// @notice Returns the determined address of an Adapter Instance to clone based on a specific Order.\n  /// @param adapterImplementation The address of the Adapter Implementation to clone.\n  /// @param hookData The HookOrderData struct containing the order details & postHook parameters.\n  /// @return The determined address of the Adapter Instance.\n  function getInstanceDeterministicAddress(\n    address adapterImplementation,\n    DataTypes.HookOrderData memory hookData\n  ) external view returns (address);\n\n  /// @notice Verifies that the signature provided for an Order using an Adapter is valid.\n  /// @param orderOwner The address of the owner of the Order.\n  /// @param order The Order data to verify.\n  /// @param signature The signature to verify.\n  /// @return True if the signature is valid, false otherwise.\n  function verifyOrderSignature(\n    address orderOwner,\n    GPv2Order.Data memory order,\n    bytes memory signature\n  ) external view returns (bool);\n\n  /// @notice Sets the status of an AdapterHook Implementation.\n  /// @param adapterImplementation The address of the Adapter Implementation.\n  /// @param active True to activate, false to deactivate.\n  function setAdapterImplementation(address adapterImplementation, bool active) external;\n}\n"},"src/dependencies/cow/IBasicBorrower.sol":{"content":"// SPDX-License-Identifier: GPL-3.0-or-later\npragma solidity ^0.8.0;\n\nimport {IERC20} from 'openzeppelin/token/ERC20/IERC20.sol';\n\n// Taken from https://github.com/cowprotocol/flash-loan-router/blob/f9c18679df0f5cda19611b05fca1c982786071eb/src/interface/IBorrower.sol\n// and modified to only keep necessary functions for the AaveV3AdapterFactory.\ninterface IBasicBorrower {\n  /// @notice Start the flow to draw a FlashLoan then calls back the FlashLoanRouter contract with the given data\n  /// @param lender The address of the lender to draw the FlashLoan from\n  /// @param token The address of the ERC20 token for the FlashLoan\n  /// @param amount The amount of the FlashLoan\n  /// @param callbackData Data to send back to the FlashLoanRouter during the callback\n  function flashLoanAndCallBack(\n    address lender,\n    IERC20 token,\n    uint256 amount,\n    bytes calldata callbackData\n  ) external;\n}\n"},"lib/flash-loan-router/src/library/Loan.sol":{"content":"// SPDX-License-Identifier: GPL-3.0-or-later\npragma solidity ^0.8;\n\nimport {IBorrower} from \"../interface/IBorrower.sol\";\nimport {IERC20} from \"../vendored/IERC20.sol\";\n\n/// @title Loan Library\n/// @author CoW DAO developers\n/// @notice A library describing a flash-loan request by the flash-loan router\n/// and providing related utility functions.\nlibrary Loan {\n    /// @notice The representation of a flash-loan request by the flash-loan\n    /// router.\n    struct Data {\n        /// @notice The amount of funds requested from the lender.\n        uint256 amount;\n        /// @notice The contract that directly requests the flash loan from the\n        /// lender and eventually calls back the router.\n        IBorrower borrower;\n        /// @notice The contract that loans out the funds to the borrower.\n        address lender;\n        /// @notice The token that is requested in the flash loan.\n        IERC20 token;\n    }\n\n    /// @notice A type that wraps a pointer to raw data in memory.\n    /// @dev A loan is expected to be encoded in memory as follows:\n    ///\n    /// Content: |--  amount  --||-- borrower --||--  lender  --||--  token   --|\n    /// Length:  |<--32 bytes-->||<--20 bytes-->||<--20 bytes-->||<--20 bytes-->|\n    type EncodedData is uint256;\n\n    // This is a list of offsets to add to the memory pointer to get the memory\n    // location of the respective loan parameter. Note: -12 because addresses\n    // are zero-padded to the left and mload/mstore work on groups of 32 bytes.\n    uint256 private constant OFFSET_BORROWER = 32 - 12;\n    uint256 private constant OFFSET_LENDER = 32 + 1 * 20 - 12;\n    uint256 private constant OFFSET_TOKEN = 32 + 2 * 20 - 12;\n\n    /// @notice The number of sequential bytes required to encode a loan in\n    /// memory.\n    uint256 internal constant ENCODED_LOAN_BYTE_SIZE = 32 + 3 * 20;\n\n    /// @notice Write the input loan to the memory location pointed to by the\n    /// input encodedLoan.\n    /// @param encodedLoan The memory location from which to start writing the\n    /// byte representation of the loan. It is assumed to have at least\n    /// `ENCODED_LOAN_BYTE_SIZE` available from that point it in memory.\n    /// @param loan The loan to store.\n    function store(EncodedData encodedLoan, Data calldata loan) internal pure {\n        uint256 amount = loan.amount;\n        IBorrower borrower = loan.borrower;\n        address lender = loan.lender;\n        IERC20 token = loan.token;\n\n        // Note: addresses are right-aligned, memory is written to starting\n        // from the end and overwriting the address left-side padding.\n        assembly (\"memory-safe\") {\n            // Unchecked: we assume that the input value isn't at the end of the\n            // memory array. This does not happen with Solidity standard memory\n            // allocation.\n            mstore(add(encodedLoan, OFFSET_TOKEN), token)\n            mstore(add(encodedLoan, OFFSET_LENDER), lender)\n            mstore(add(encodedLoan, OFFSET_BORROWER), borrower)\n            // offset is zero\n            mstore(encodedLoan, amount)\n        }\n    }\n\n    /// @notice Reads the loan parameter from the input location in memory.\n    /// @param loan The memory location from which to read the loan.\n    /// @return amount The amount to be borrowed (see `Loan.Data`).\n    /// @return borrower The address of the borrower contract (see `Loan.Data`).\n    /// @return lender The lender address (see `Loan.Data`).\n    /// @return token The token to borrow (see `Loan.Data`).\n    function decode(EncodedData loan)\n        internal\n        pure\n        returns (uint256 amount, IBorrower borrower, address lender, IERC20 token)\n    {\n        assembly (\"memory-safe\") {\n            // Note: the values don't need to be masked since masking occurs\n            // when the value is accessed and not when stored.\n            // <https://docs.soliditylang.org/en/v0.8.28/assembly.html#access-to-external-variables-functions-and-libraries>\n            amount := mload(loan)\n            borrower := mload(add(loan, OFFSET_BORROWER))\n            lender := mload(add(loan, OFFSET_LENDER))\n            token := mload(add(loan, OFFSET_TOKEN))\n        }\n    }\n}\n"},"lib/flash-loan-router/src/vendored/IERC20.sol":{"content":"// SPDX-License-Identifier: MIT\n\n// Vendored from OpenZeppelin contracts with minor modifications:\n// - Formatted code\n// <https://github.com/OpenZeppelin/openzeppelin-contracts/blob/release-v5.2/contracts/token/ERC20/IERC20.sol>\n// Note: v5.2 points to commit acd4ff74de833399287ed6b31b4debf6b2b35527.\n\n// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.20;\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/contracts/src/contracts/interfaces/IERC20.sol":{"content":"// SPDX-License-Identifier: MIT\n\n// Vendored from OpenZeppelin contracts with minor modifications:\n// - Modified Solidity version\n// - Formatted code\n// - Added `name`, `symbol` and `decimals` function declarations\n// <https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v3.4.0/contracts/token/ERC20/IERC20.sol>\n\npragma solidity >=0.7.6 <0.9.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n    /**\n     * @dev Returns the name of the token.\n     */\n    function name() external view returns (string memory);\n\n    /**\n     * @dev Returns the symbol of the token.\n     */\n    function symbol() external view returns (string memory);\n\n    /**\n     * @dev Returns the number of decimals the token uses.\n     */\n    function decimals() external view returns (uint8);\n\n    /**\n     * @dev Returns the amount of tokens in existence.\n     */\n    function totalSupply() external view returns (uint256);\n\n    /**\n     * @dev Returns the amount of tokens owned by `account`.\n     */\n    function balanceOf(address account) external view returns (uint256);\n\n    /**\n     * @dev Moves `amount` tokens from the caller's account to `recipient`.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transfer(\n        address recipient,\n        uint256 amount\n    ) 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(\n        address owner,\n        address spender\n    ) external view returns (uint256);\n\n    /**\n     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\n     * that someone may use both the old and the new allowance by unfortunate\n     * transaction ordering. One possible solution to mitigate this race\n     * condition is to first reduce the spender's allowance to 0 and set the\n     * desired value afterwards:\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n     *\n     * Emits an {Approval} event.\n     */\n    function approve(address spender, uint256 amount) external returns (bool);\n\n    /**\n     * @dev Moves `amount` tokens from `sender` to `recipient` using the\n     * allowance mechanism. `amount` is then deducted from the caller's\n     * allowance.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transferFrom(\n        address sender,\n        address recipient,\n        uint256 amount\n    ) external returns (bool);\n\n    /**\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\n     * another (`to`).\n     *\n     * Note that `value` may be zero.\n     */\n    event Transfer(address indexed from, address indexed to, uint256 value);\n\n    /**\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n     * a call to {approve}. `value` is the new allowance.\n     */\n    event Approval(\n        address indexed owner,\n        address indexed spender,\n        uint256 value\n    );\n}\n"},"lib/flash-loan-router/src/interface/IBorrower.sol":{"content":"// SPDX-License-Identifier: GPL-3.0-or-later\npragma solidity ^0.8;\n\nimport {IERC20} from \"../vendored/IERC20.sol\";\nimport {ICowSettlement} from \"./ICowSettlement.sol\";\nimport {IFlashLoanRouter} from \"./IFlashLoanRouter.sol\";\n\n/// @title Flash-loan Borrower\n/// @author CoW DAO developers\n/// @notice The CoW Protocol flash-loan router uses the flash-loan borrower\n/// contract as the intermediary that requests funds through a flash loan.\n/// Different flash-loan protocols have different logic for flash loans:\n/// usually, the call-back function name and parameters are different. Each\n/// flash-loan protocol must have a dedicated Borrower contract to be supported\n/// by the flash-loan router.\n/// A concrete borrower implementation generally calls a dedicated flash-loan\n/// function on the lender and then awaits for a callback from it. The borrower\n/// then calls back the router for further processing.\ninterface IBorrower {\n    /// @notice Requests a flash loan with the specified parameters from the\n    /// lender and, once the funds have been received, call back the router\n    /// while passing through the specified custom data. The flash-loan\n    /// repayment is expected to take place during the final settlement in the\n    /// router.\n    /// @param lender The address of the flash-loan lender from which to borrow.\n    /// @param token The token that is requested in the flash loan.\n    /// @param amount The amount of funds requested from the lender.\n    /// @param callBackData The data to send back when calling the router once\n    /// the loan is received.\n    function flashLoanAndCallBack(address lender, IERC20 token, uint256 amount, bytes calldata callBackData) external;\n\n    /// @notice Approves the target address to spend the specified token on\n    /// behalf of the Borrower up to the specified amount.\n    /// @dev In general, the only way to transfer funds out of this contract is\n    /// through a call to this function and a subsequent call to `transferFrom`.\n    /// This approval is expected to work similarly to an ERC-20 approval (in\n    /// particular, the allowance doesn't reset once the call is terminated).\n    /// @param token The token to approve for transferring.\n    /// @param target The address that will be allowed to spend the token.\n    /// @param amount The amount of tokens to set as the allowance.\n    function approve(IERC20 token, address target, uint256 amount) external;\n\n    /// @notice The settlement contract supported by this contract.\n    function settlementContract() external view returns (ICowSettlement);\n\n    /// @notice The router contract that manages this borrower contract. It will\n    /// be called back once the flash-loan proceeds are received and is the only\n    /// address that can trigger a flash loan request.\n    function router() external view returns (IFlashLoanRouter);\n}\n"},"lib/contracts/src/contracts/libraries/GPv2Order.sol":{"content":"// SPDX-License-Identifier: LGPL-3.0-or-later\npragma solidity >=0.7.6 <0.9.0;\n\nimport \"../interfaces/IERC20.sol\";\n\n/// @title Gnosis Protocol v2 Order Library\n/// @author Gnosis Developers\nlibrary GPv2Order {\n    /// @dev The complete data for a Gnosis Protocol order. This struct contains\n    /// all order parameters that are signed for submitting to GP.\n    struct Data {\n        IERC20 sellToken;\n        IERC20 buyToken;\n        address receiver;\n        uint256 sellAmount;\n        uint256 buyAmount;\n        uint32 validTo;\n        bytes32 appData;\n        uint256 feeAmount;\n        bytes32 kind;\n        bool partiallyFillable;\n        bytes32 sellTokenBalance;\n        bytes32 buyTokenBalance;\n    }\n\n    /// @dev The order EIP-712 type hash for the [`GPv2Order.Data`] struct.\n    ///\n    /// This value is pre-computed from the following expression:\n    /// ```\n    /// keccak256(\n    ///     \"Order(\" +\n    ///         \"address sellToken,\" +\n    ///         \"address buyToken,\" +\n    ///         \"address receiver,\" +\n    ///         \"uint256 sellAmount,\" +\n    ///         \"uint256 buyAmount,\" +\n    ///         \"uint32 validTo,\" +\n    ///         \"bytes32 appData,\" +\n    ///         \"uint256 feeAmount,\" +\n    ///         \"string kind,\" +\n    ///         \"bool partiallyFillable,\" +\n    ///         \"string sellTokenBalance,\" +\n    ///         \"string buyTokenBalance\" +\n    ///     \")\"\n    /// )\n    /// ```\n    bytes32 internal constant TYPE_HASH =\n        hex\"d5a25ba2e97094ad7d83dc28a6572da797d6b3e7fc6663bd93efb789fc17e489\";\n\n    /// @dev The marker value for a sell order for computing the order struct\n    /// hash. This allows the EIP-712 compatible wallets to display a\n    /// descriptive string for the order kind (instead of 0 or 1).\n    ///\n    /// This value is pre-computed from the following expression:\n    /// ```\n    /// keccak256(\"sell\")\n    /// ```\n    bytes32 internal constant KIND_SELL =\n        hex\"f3b277728b3fee749481eb3e0b3b48980dbbab78658fc419025cb16eee346775\";\n\n    /// @dev The OrderKind marker value for a buy order for computing the order\n    /// struct hash.\n    ///\n    /// This value is pre-computed from the following expression:\n    /// ```\n    /// keccak256(\"buy\")\n    /// ```\n    bytes32 internal constant KIND_BUY =\n        hex\"6ed88e868af0a1983e3886d5f3e95a2fafbd6c3450bc229e27342283dc429ccc\";\n\n    /// @dev The TokenBalance marker value for using direct ERC20 balances for\n    /// computing the order struct hash.\n    ///\n    /// This value is pre-computed from the following expression:\n    /// ```\n    /// keccak256(\"erc20\")\n    /// ```\n    bytes32 internal constant BALANCE_ERC20 =\n        hex\"5a28e9363bb942b639270062aa6bb295f434bcdfc42c97267bf003f272060dc9\";\n\n    /// @dev The TokenBalance marker value for using Balancer Vault external\n    /// balances (in order to re-use Vault ERC20 approvals) for computing the\n    /// order struct hash.\n    ///\n    /// This value is pre-computed from the following expression:\n    /// ```\n    /// keccak256(\"external\")\n    /// ```\n    bytes32 internal constant BALANCE_EXTERNAL =\n        hex\"abee3b73373acd583a130924aad6dc38cfdc44ba0555ba94ce2ff63980ea0632\";\n\n    /// @dev The TokenBalance marker value for using Balancer Vault internal\n    /// balances for computing the order struct hash.\n    ///\n    /// This value is pre-computed from the following expression:\n    /// ```\n    /// keccak256(\"internal\")\n    /// ```\n    bytes32 internal constant BALANCE_INTERNAL =\n        hex\"4ac99ace14ee0a5ef932dc609df0943ab7ac16b7583634612f8dc35a4289a6ce\";\n\n    /// @dev Marker address used to indicate that the receiver of the trade\n    /// proceeds should the owner of the order.\n    ///\n    /// This is chosen to be `address(0)` for gas efficiency as it is expected\n    /// to be the most common case.\n    address internal constant RECEIVER_SAME_AS_OWNER = address(0);\n\n    /// @dev The byte length of an order unique identifier.\n    uint256 internal constant UID_LENGTH = 56;\n\n    /// @dev Returns the actual receiver for an order. This function checks\n    /// whether or not the [`receiver`] field uses the marker value to indicate\n    /// it is the same as the order owner.\n    ///\n    /// @return receiver The actual receiver of trade proceeds.\n    function actualReceiver(\n        Data memory order,\n        address owner\n    ) internal pure returns (address receiver) {\n        if (order.receiver == RECEIVER_SAME_AS_OWNER) {\n            receiver = owner;\n        } else {\n            receiver = order.receiver;\n        }\n    }\n\n    /// @dev Return the EIP-712 signing hash for the specified order.\n    ///\n    /// @param order The order to compute the EIP-712 signing hash for.\n    /// @param domainSeparator The EIP-712 domain separator to use.\n    /// @return orderDigest The 32 byte EIP-712 struct hash.\n    function hash(\n        Data memory order,\n        bytes32 domainSeparator\n    ) internal pure returns (bytes32 orderDigest) {\n        bytes32 structHash;\n\n        // NOTE: Compute the EIP-712 order struct hash in place. As suggested\n        // in the EIP proposal, noting that the order struct has 12 fields, and\n        // prefixing the type hash `(1 + 12) * 32 = 416` bytes to hash.\n        // <https://github.com/ethereum/EIPs/blob/master/EIPS/eip-712.md#rationale-for-encodedata>\n        // solhint-disable-next-line no-inline-assembly\n        assembly {\n            let dataStart := sub(order, 32)\n            let temp := mload(dataStart)\n            mstore(dataStart, TYPE_HASH)\n            structHash := keccak256(dataStart, 416)\n            mstore(dataStart, temp)\n        }\n\n        // NOTE: Now that we have the struct hash, compute the EIP-712 signing\n        // hash using scratch memory past the free memory pointer. The signing\n        // hash is computed from `\"\\x19\\x01\" || domainSeparator || structHash`.\n        // <https://docs.soliditylang.org/en/v0.7.6/internals/layout_in_memory.html#layout-in-memory>\n        // <https://github.com/ethereum/EIPs/blob/master/EIPS/eip-712.md#specification>\n        // solhint-disable-next-line no-inline-assembly\n        assembly {\n            let freeMemoryPointer := mload(0x40)\n            mstore(freeMemoryPointer, \"\\x19\\x01\")\n            mstore(add(freeMemoryPointer, 2), domainSeparator)\n            mstore(add(freeMemoryPointer, 34), structHash)\n            orderDigest := keccak256(freeMemoryPointer, 66)\n        }\n    }\n\n    /// @dev Packs order UID parameters into the specified memory location. The\n    /// result is equivalent to `abi.encodePacked(...)` with the difference that\n    /// it allows re-using the memory for packing the order UID.\n    ///\n    /// This function reverts if the order UID buffer is not the correct size.\n    ///\n    /// @param orderUid The buffer pack the order UID parameters into.\n    /// @param orderDigest The EIP-712 struct digest derived from the order\n    /// parameters.\n    /// @param owner The address of the user who owns this order.\n    /// @param validTo The epoch time at which the order will stop being valid.\n    function packOrderUidParams(\n        bytes memory orderUid,\n        bytes32 orderDigest,\n        address owner,\n        uint32 validTo\n    ) internal pure {\n        require(orderUid.length == UID_LENGTH, \"GPv2: uid buffer overflow\");\n\n        // NOTE: Write the order UID to the allocated memory buffer. The order\n        // parameters are written to memory in **reverse order** as memory\n        // operations write 32-bytes at a time and we want to use a packed\n        // encoding. This means, for example, that after writing the value of\n        // `owner` to bytes `20:52`, writing the `orderDigest` to bytes `0:32`\n        // will **overwrite** bytes `20:32`. This is desirable as addresses are\n        // only 20 bytes and `20:32` should be `0`s:\n        //\n        //        |           1111111111222222222233333333334444444444555555\n        //   byte | 01234567890123456789012345678901234567890123456789012345\n        // -------+---------------------------------------------------------\n        //  field | [.........orderDigest..........][......owner.......][vT]\n        // -------+---------------------------------------------------------\n        // mstore |                         [000000000000000000000000000.vT]\n        //        |                     [00000000000.......owner.......]\n        //        | [.........orderDigest..........]\n        //\n        // Additionally, since Solidity `bytes memory` are length prefixed,\n        // 32 needs to be added to all the offsets.\n        //\n        // solhint-disable-next-line no-inline-assembly\n        assembly {\n            mstore(add(orderUid, 56), validTo)\n            mstore(add(orderUid, 52), owner)\n            mstore(add(orderUid, 32), orderDigest)\n        }\n    }\n\n    /// @dev Extracts specific order information from the standardized unique\n    /// order id of the protocol.\n    ///\n    /// @param orderUid The unique identifier used to represent an order in\n    /// the protocol. This uid is the packed concatenation of the order digest,\n    /// the validTo order parameter and the address of the user who created the\n    /// order. It is used by the user to interface with the contract directly,\n    /// and not by calls that are triggered by the solvers.\n    /// @return orderDigest The EIP-712 signing digest derived from the order\n    /// parameters.\n    /// @return owner The address of the user who owns this order.\n    /// @return validTo The epoch time at which the order will stop being valid.\n    function extractOrderUidParams(\n        bytes calldata orderUid\n    )\n        internal\n        pure\n        returns (bytes32 orderDigest, address owner, uint32 validTo)\n    {\n        require(orderUid.length == UID_LENGTH, \"GPv2: invalid uid\");\n\n        // Use assembly to efficiently decode packed calldata.\n        // solhint-disable-next-line no-inline-assembly\n        assembly {\n            orderDigest := calldataload(orderUid.offset)\n            owner := shr(96, calldataload(add(orderUid.offset, 32)))\n            validTo := shr(224, calldataload(add(orderUid.offset, 52)))\n        }\n    }\n}\n"},"lib/openzeppelin-contracts/contracts/utils/Bytes.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.2.0) (utils/Bytes.sol)\n\npragma solidity ^0.8.24;\n\nimport {Math} from \"./math/Math.sol\";\n\n/**\n * @dev Bytes operations.\n */\nlibrary Bytes {\n    /**\n     * @dev Forward search for `s` in `buffer`\n     * * If `s` is present in the buffer, returns the index of the first instance\n     * * If `s` is not present in the buffer, returns type(uint256).max\n     *\n     * NOTE: replicates the behavior of https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf[Javascript's `Array.indexOf`]\n     */\n    function indexOf(bytes memory buffer, bytes1 s) internal pure returns (uint256) {\n        return indexOf(buffer, s, 0);\n    }\n\n    /**\n     * @dev Forward search for `s` in `buffer` starting at position `pos`\n     * * If `s` is present in the buffer (at or after `pos`), returns the index of the next instance\n     * * If `s` is not present in the buffer (at or after `pos`), returns type(uint256).max\n     *\n     * NOTE: replicates the behavior of https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf[Javascript's `Array.indexOf`]\n     */\n    function indexOf(bytes memory buffer, bytes1 s, uint256 pos) internal pure returns (uint256) {\n        uint256 length = buffer.length;\n        for (uint256 i = pos; i < length; ++i) {\n            if (bytes1(_unsafeReadBytesOffset(buffer, i)) == s) {\n                return i;\n            }\n        }\n        return type(uint256).max;\n    }\n\n    /**\n     * @dev Backward search for `s` in `buffer`\n     * * If `s` is present in the buffer, returns the index of the last instance\n     * * If `s` is not present in the buffer, returns type(uint256).max\n     *\n     * NOTE: replicates the behavior of https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/lastIndexOf[Javascript's `Array.lastIndexOf`]\n     */\n    function lastIndexOf(bytes memory buffer, bytes1 s) internal pure returns (uint256) {\n        return lastIndexOf(buffer, s, type(uint256).max);\n    }\n\n    /**\n     * @dev Backward search for `s` in `buffer` starting at position `pos`\n     * * If `s` is present in the buffer (at or before `pos`), returns the index of the previous instance\n     * * If `s` is not present in the buffer (at or before `pos`), returns type(uint256).max\n     *\n     * NOTE: replicates the behavior of https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/lastIndexOf[Javascript's `Array.lastIndexOf`]\n     */\n    function lastIndexOf(bytes memory buffer, bytes1 s, uint256 pos) internal pure returns (uint256) {\n        unchecked {\n            uint256 length = buffer.length;\n            // NOTE here we cannot do `i = Math.min(pos + 1, length)` because `pos + 1` could overflow\n            for (uint256 i = Math.min(pos, length - 1) + 1; i > 0; --i) {\n                if (bytes1(_unsafeReadBytesOffset(buffer, i - 1)) == s) {\n                    return i - 1;\n                }\n            }\n            return type(uint256).max;\n        }\n    }\n\n    /**\n     * @dev Copies the content of `buffer`, from `start` (included) to the end of `buffer` into a new bytes object in\n     * memory.\n     *\n     * NOTE: replicates the behavior of https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice[Javascript's `Array.slice`]\n     */\n    function slice(bytes memory buffer, uint256 start) internal pure returns (bytes memory) {\n        return slice(buffer, start, buffer.length);\n    }\n\n    /**\n     * @dev Copies the content of `buffer`, from `start` (included) to `end` (excluded) into a new bytes object in\n     * memory.\n     *\n     * NOTE: replicates the behavior of https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice[Javascript's `Array.slice`]\n     */\n    function slice(bytes memory buffer, uint256 start, uint256 end) internal pure returns (bytes memory) {\n        // sanitize\n        uint256 length = buffer.length;\n        end = Math.min(end, length);\n        start = Math.min(start, end);\n\n        // allocate and copy\n        bytes memory result = new bytes(end - start);\n        assembly (\"memory-safe\") {\n            mcopy(add(result, 0x20), add(add(buffer, 0x20), start), sub(end, start))\n        }\n\n        return result;\n    }\n\n    /**\n     * @dev Reads a bytes32 from a bytes array without bounds checking.\n     *\n     * NOTE: making this function internal would mean it could be used with memory unsafe offset, and marking the\n     * assembly block as such would prevent some optimizations.\n     */\n    function _unsafeReadBytesOffset(bytes memory buffer, uint256 offset) private pure returns (bytes32 value) {\n        // This is not memory safe in the general case, but all calls to this private function are within bounds.\n        assembly (\"memory-safe\") {\n            value := mload(add(add(buffer, 0x20), offset))\n        }\n    }\n}\n"},"lib/openzeppelin-contracts/contracts/utils/Panic.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/Panic.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Helper library for emitting standardized panic codes.\n *\n * ```solidity\n * contract Example {\n *      using Panic for uint256;\n *\n *      // Use any of the declared internal constants\n *      function foo() { Panic.GENERIC.panic(); }\n *\n *      // Alternatively\n *      function foo() { Panic.panic(Panic.GENERIC); }\n * }\n * ```\n *\n * Follows the list from https://github.com/ethereum/solidity/blob/v0.8.24/libsolutil/ErrorCodes.h[libsolutil].\n *\n * _Available since v5.1._\n */\n// slither-disable-next-line unused-state\nlibrary Panic {\n    /// @dev generic / unspecified error\n    uint256 internal constant GENERIC = 0x00;\n    /// @dev used by the assert() builtin\n    uint256 internal constant ASSERT = 0x01;\n    /// @dev arithmetic underflow or overflow\n    uint256 internal constant UNDER_OVERFLOW = 0x11;\n    /// @dev division or modulo by zero\n    uint256 internal constant DIVISION_BY_ZERO = 0x12;\n    /// @dev enum conversion error\n    uint256 internal constant ENUM_CONVERSION_ERROR = 0x21;\n    /// @dev invalid encoding in storage\n    uint256 internal constant STORAGE_ENCODING_ERROR = 0x22;\n    /// @dev empty array pop\n    uint256 internal constant EMPTY_ARRAY_POP = 0x31;\n    /// @dev array out of bounds access\n    uint256 internal constant ARRAY_OUT_OF_BOUNDS = 0x32;\n    /// @dev resource error (too large allocation or too large array)\n    uint256 internal constant RESOURCE_ERROR = 0x41;\n    /// @dev calling invalid internal function\n    uint256 internal constant INVALID_INTERNAL_FUNCTION = 0x51;\n\n    /// @dev Reverts with a panic code. Recommended to use with\n    /// the internal constants with predefined codes.\n    function panic(uint256 code) internal pure {\n        assembly (\"memory-safe\") {\n            mstore(0x00, 0x4e487b71)\n            mstore(0x20, code)\n            revert(0x1c, 0x24)\n        }\n    }\n}\n"},"lib/aave-v3-origin/src/contracts/interfaces/IPool.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {IPoolAddressesProvider} from './IPoolAddressesProvider.sol';\nimport {DataTypes} from '../protocol/libraries/types/DataTypes.sol';\n\n/**\n * @title IPool\n * @author Aave\n * @notice Defines the basic interface for an Aave Pool.\n */\ninterface IPool {\n  /**\n   * @dev Emitted on supply()\n   * @param reserve The address of the underlying asset of the reserve\n   * @param user The address initiating the supply\n   * @param onBehalfOf The beneficiary of the supply, receiving the aTokens\n   * @param amount The amount supplied\n   * @param referralCode The referral code used\n   */\n  event Supply(\n    address indexed reserve,\n    address user,\n    address indexed onBehalfOf,\n    uint256 amount,\n    uint16 indexed referralCode\n  );\n\n  /**\n   * @dev Emitted on withdraw()\n   * @param reserve The address of the underlying asset being withdrawn\n   * @param user The address initiating the withdrawal, owner of aTokens\n   * @param to The address that will receive the underlying\n   * @param amount The amount to be withdrawn\n   */\n  event Withdraw(address indexed reserve, address indexed user, address indexed to, uint256 amount);\n\n  /**\n   * @dev Emitted on borrow() and flashLoan() when debt needs to be opened\n   * @param reserve The address of the underlying asset being borrowed\n   * @param user The address of the user initiating the borrow(), receiving the funds on borrow() or just\n   * initiator of the transaction on flashLoan()\n   * @param onBehalfOf The address that will be getting the debt\n   * @param amount The amount borrowed out\n   * @param interestRateMode The rate mode: 2 for Variable, 1 is deprecated (changed on v3.2.0)\n   * @param borrowRate The numeric rate at which the user has borrowed, expressed in ray\n   * @param referralCode The referral code used\n   */\n  event Borrow(\n    address indexed reserve,\n    address user,\n    address indexed onBehalfOf,\n    uint256 amount,\n    DataTypes.InterestRateMode interestRateMode,\n    uint256 borrowRate,\n    uint16 indexed referralCode\n  );\n\n  /**\n   * @dev Emitted on repay()\n   * @param reserve The address of the underlying asset of the reserve\n   * @param user The beneficiary of the repayment, getting his debt reduced\n   * @param repayer The address of the user initiating the repay(), providing the funds\n   * @param amount The amount repaid\n   * @param useATokens True if the repayment is done using aTokens, `false` if done with underlying asset directly\n   */\n  event Repay(\n    address indexed reserve,\n    address indexed user,\n    address indexed repayer,\n    uint256 amount,\n    bool useATokens\n  );\n\n  /**\n   * @dev Emitted on borrow(), repay() and liquidationCall() when using isolated assets\n   * @param asset The address of the underlying asset of the reserve\n   * @param totalDebt The total isolation mode debt for the reserve\n   */\n  event IsolationModeTotalDebtUpdated(address indexed asset, uint256 totalDebt);\n\n  /**\n   * @dev Emitted when the user selects a certain asset category for eMode\n   * @param user The address of the user\n   * @param categoryId The category id\n   */\n  event UserEModeSet(address indexed user, uint8 categoryId);\n\n  /**\n   * @dev Emitted on setUserUseReserveAsCollateral()\n   * @param reserve The address of the underlying asset of the reserve\n   * @param user The address of the user enabling the usage as collateral\n   */\n  event ReserveUsedAsCollateralEnabled(address indexed reserve, address indexed user);\n\n  /**\n   * @dev Emitted on setUserUseReserveAsCollateral()\n   * @param reserve The address of the underlying asset of the reserve\n   * @param user The address of the user enabling the usage as collateral\n   */\n  event ReserveUsedAsCollateralDisabled(address indexed reserve, address indexed user);\n\n  /**\n   * @dev Emitted on flashLoan()\n   * @param target The address of the flash loan receiver contract\n   * @param initiator The address initiating the flash loan\n   * @param asset The address of the asset being flash borrowed\n   * @param amount The amount flash borrowed\n   * @param interestRateMode The flashloan mode: 0 for regular flashloan,\n   *        1 for Stable (Deprecated on v3.2.0), 2 for Variable\n   * @param premium The fee flash borrowed\n   * @param referralCode The referral code used\n   */\n  event FlashLoan(\n    address indexed target,\n    address initiator,\n    address indexed asset,\n    uint256 amount,\n    DataTypes.InterestRateMode interestRateMode,\n    uint256 premium,\n    uint16 indexed referralCode\n  );\n\n  /**\n   * @dev Emitted when a borrower is liquidated.\n   * @param collateralAsset The address of the underlying asset used as collateral, to receive as result of the liquidation\n   * @param debtAsset The address of the underlying borrowed asset to be repaid with the liquidation\n   * @param user The address of the borrower getting liquidated\n   * @param debtToCover The debt amount of borrowed `asset` the liquidator wants to cover\n   * @param liquidatedCollateralAmount The amount of collateral received by the liquidator\n   * @param liquidator The address of the liquidator\n   * @param receiveAToken True if the liquidators wants to receive the collateral aTokens, `false` if he wants\n   * to receive the underlying collateral asset directly\n   */\n  event LiquidationCall(\n    address indexed collateralAsset,\n    address indexed debtAsset,\n    address indexed user,\n    uint256 debtToCover,\n    uint256 liquidatedCollateralAmount,\n    address liquidator,\n    bool receiveAToken\n  );\n\n  /**\n   * @dev Emitted when the state of a reserve is updated.\n   * @param reserve The address of the underlying asset of the reserve\n   * @param liquidityRate The next liquidity rate\n   * @param stableBorrowRate The next stable borrow rate @note deprecated on v3.2.0\n   * @param variableBorrowRate The next variable borrow rate\n   * @param liquidityIndex The next liquidity index\n   * @param variableBorrowIndex The next variable borrow index\n   */\n  event ReserveDataUpdated(\n    address indexed reserve,\n    uint256 liquidityRate,\n    uint256 stableBorrowRate,\n    uint256 variableBorrowRate,\n    uint256 liquidityIndex,\n    uint256 variableBorrowIndex\n  );\n\n  /**\n   * @dev Emitted when the deficit of a reserve is covered.\n   * @param reserve The address of the underlying asset of the reserve\n   * @param caller The caller that triggered the DeficitCovered event\n   * @param amountCovered The amount of deficit covered\n   */\n  event DeficitCovered(address indexed reserve, address caller, uint256 amountCovered);\n\n  /**\n   * @dev Emitted when the protocol treasury receives minted aTokens from the accrued interest.\n   * @param reserve The address of the reserve\n   * @param amountMinted The amount minted to the treasury\n   */\n  event MintedToTreasury(address indexed reserve, uint256 amountMinted);\n\n  /**\n   * @dev Emitted when deficit is realized on a liquidation.\n   * @param user The user address where the bad debt will be burned\n   * @param debtAsset The address of the underlying borrowed asset to be burned\n   * @param amountCreated The amount of deficit created\n   */\n  event DeficitCreated(address indexed user, address indexed debtAsset, uint256 amountCreated);\n\n  /**\n   * @dev Emitted when a position manager is approved by the user.\n   * @param user The user address\n   * @param positionManager The address of the position manager\n   */\n  event PositionManagerApproved(address indexed user, address indexed positionManager);\n\n  /**\n   * @dev Emitted when a position manager is revoked by the user.\n   * @param user The user address\n   * @param positionManager The address of the position manager\n   */\n  event PositionManagerRevoked(address indexed user, address indexed positionManager);\n\n  /**\n   * @notice Supplies an `amount` of underlying asset into the reserve, receiving in return overlying aTokens.\n   * - E.g. User supplies 100 USDC and gets in return 100 aUSDC\n   * @param asset The address of the underlying asset to supply\n   * @param amount The amount to be supplied\n   * @param onBehalfOf The address that will receive the aTokens, same as msg.sender if the user\n   *   wants to receive them on his own wallet, or a different address if the beneficiary of aTokens\n   *   is a different wallet\n   * @param referralCode Code used to register the integrator originating the operation, for potential rewards.\n   *   0 if the action is executed directly by the user, without any middle-man\n   */\n  function supply(address asset, uint256 amount, address onBehalfOf, uint16 referralCode) external;\n\n  /**\n   * @notice Supply with transfer approval of asset to be supplied done via permit function\n   * see: https://eips.ethereum.org/EIPS/eip-2612 and https://eips.ethereum.org/EIPS/eip-713\n   * @param asset The address of the underlying asset to supply\n   * @param amount The amount to be supplied\n   * @param onBehalfOf The address that will receive the aTokens, same as msg.sender if the user\n   *   wants to receive them on his own wallet, or a different address if the beneficiary of aTokens\n   *   is a different wallet\n   * @param deadline The deadline timestamp that the permit is valid\n   * @param referralCode Code used to register the integrator originating the operation, for potential rewards.\n   *   0 if the action is executed directly by the user, without any middle-man\n   * @param permitV The V parameter of ERC712 permit sig\n   * @param permitR The R parameter of ERC712 permit sig\n   * @param permitS The S parameter of ERC712 permit sig\n   */\n  function supplyWithPermit(\n    address asset,\n    uint256 amount,\n    address onBehalfOf,\n    uint16 referralCode,\n    uint256 deadline,\n    uint8 permitV,\n    bytes32 permitR,\n    bytes32 permitS\n  ) external;\n\n  /**\n   * @notice Withdraws an `amount` of underlying asset from the reserve, burning the equivalent aTokens owned\n   * E.g. User has 100 aUSDC, calls withdraw() and receives 100 USDC, burning the 100 aUSDC\n   * @param asset The address of the underlying asset to withdraw\n   * @param amount The underlying amount to be withdrawn\n   *   - Send the value type(uint256).max in order to withdraw the whole aToken balance\n   * @param to The address that will receive the underlying, same as msg.sender if the user\n   *   wants to receive it on his own wallet, or a different address if the beneficiary is a\n   *   different wallet\n   * @return The final amount withdrawn\n   */\n  function withdraw(address asset, uint256 amount, address to) external returns (uint256);\n\n  /**\n   * @notice Allows users to borrow a specific `amount` of the reserve underlying asset, provided that the borrower\n   * already supplied enough collateral, or he was given enough allowance by a credit delegator on the VariableDebtToken\n   * - E.g. User borrows 100 USDC passing as `onBehalfOf` his own address, receiving the 100 USDC in his wallet\n   *   and 100 variable debt tokens\n   * @param asset The address of the underlying asset to borrow\n   * @param amount The amount to be borrowed\n   * @param interestRateMode 2 for Variable, 1 is deprecated on v3.2.0\n   * @param referralCode The code used to register the integrator originating the operation, for potential rewards.\n   *   0 if the action is executed directly by the user, without any middle-man\n   * @param onBehalfOf The address of the user who will receive the debt. Should be the address of the borrower itself\n   * calling the function if he wants to borrow against his own collateral, or the address of the credit delegator\n   * if he has been given credit delegation allowance\n   */\n  function borrow(\n    address asset,\n    uint256 amount,\n    uint256 interestRateMode,\n    uint16 referralCode,\n    address onBehalfOf\n  ) external;\n\n  /**\n   * @notice Repays a borrowed `amount` on a specific reserve, burning the equivalent debt tokens owned\n   * - E.g. User repays 100 USDC, burning 100 variable debt tokens of the `onBehalfOf` address\n   * @param asset The address of the borrowed underlying asset previously borrowed\n   * @param amount The amount to repay\n   * - Send the value type(uint256).max in order to repay the whole debt for `asset` on the specific `debtMode`\n   * @param interestRateMode 2 for Variable, 1 is deprecated on v3.2.0\n   * @param onBehalfOf The address of the user who will get his debt reduced/removed. Should be the address of the\n   * user calling the function if he wants to reduce/remove his own debt, or the address of any other\n   * other borrower whose debt should be removed\n   * @return The final amount repaid\n   */\n  function repay(\n    address asset,\n    uint256 amount,\n    uint256 interestRateMode,\n    address onBehalfOf\n  ) external returns (uint256);\n\n  /**\n   * @notice Repay with transfer approval of asset to be repaid done via permit function\n   * see: https://eips.ethereum.org/EIPS/eip-2612 and https://eips.ethereum.org/EIPS/eip-713\n   * @param asset The address of the borrowed underlying asset previously borrowed\n   * @param amount The amount to repay\n   * - Send the value type(uint256).max in order to repay the whole debt for `asset` on the specific `debtMode`\n   * @param interestRateMode 2 for Variable, 1 is deprecated on v3.2.0\n   * @param onBehalfOf Address of the user who will get his debt reduced/removed. Should be the address of the\n   * user calling the function if he wants to reduce/remove his own debt, or the address of any other\n   * other borrower whose debt should be removed\n   * @param deadline The deadline timestamp that the permit is valid\n   * @param permitV The V parameter of ERC712 permit sig\n   * @param permitR The R parameter of ERC712 permit sig\n   * @param permitS The S parameter of ERC712 permit sig\n   * @return The final amount repaid\n   */\n  function repayWithPermit(\n    address asset,\n    uint256 amount,\n    uint256 interestRateMode,\n    address onBehalfOf,\n    uint256 deadline,\n    uint8 permitV,\n    bytes32 permitR,\n    bytes32 permitS\n  ) external returns (uint256);\n\n  /**\n   * @notice Repays a borrowed `amount` on a specific reserve using the reserve aTokens, burning the\n   * equivalent debt tokens\n   * - E.g. User repays 100 USDC using 100 aUSDC, burning 100 variable debt tokens\n   * @dev  Passing uint256.max as amount will clean up any residual aToken dust balance, if the user aToken\n   * balance is not enough to cover the whole debt\n   * @param asset The address of the borrowed underlying asset previously borrowed\n   * @param amount The amount to repay\n   * - Send the value type(uint256).max in order to repay the whole debt for `asset` on the specific `debtMode`\n   * @param interestRateMode DEPRECATED in v3.2.0\n   * @return The final amount repaid\n   */\n  function repayWithATokens(\n    address asset,\n    uint256 amount,\n    uint256 interestRateMode\n  ) external returns (uint256);\n\n  /**\n   * @notice Allows suppliers to enable/disable a specific supplied asset as collateral\n   * @param asset The address of the underlying asset supplied\n   * @param useAsCollateral True if the user wants to use the supply as collateral, false otherwise\n   */\n  function setUserUseReserveAsCollateral(address asset, bool useAsCollateral) external;\n\n  /**\n   * @notice Function to liquidate a non-healthy position collateral-wise, with Health Factor below 1\n   * - The caller (liquidator) covers `debtToCover` amount of debt of the user getting liquidated, and receives\n   *   a proportionally amount of the `collateralAsset` plus a bonus to cover market risk\n   * @param collateralAsset The address of the underlying asset used as collateral, to receive as result of the liquidation\n   * @param debtAsset The address of the underlying borrowed asset to be repaid with the liquidation\n   * @param borrower The address of the borrower getting liquidated\n   * @param debtToCover The debt amount of borrowed `asset` the liquidator wants to cover\n   * @param receiveAToken True if the liquidators wants to receive the collateral aTokens, `false` if he wants\n   * to receive the underlying collateral asset directly\n   */\n  function liquidationCall(\n    address collateralAsset,\n    address debtAsset,\n    address borrower,\n    uint256 debtToCover,\n    bool receiveAToken\n  ) external;\n\n  /**\n   * @notice Allows smartcontracts to access the liquidity of the pool within one transaction,\n   * as long as the amount taken plus a fee is returned.\n   * @dev IMPORTANT There are security concerns for developers of flashloan receiver contracts that must be kept\n   * into consideration. For further details please visit https://docs.aave.com/developers/\n   * @param receiverAddress The address of the contract receiving the funds, implementing IFlashLoanReceiver interface\n   * @param assets The addresses of the assets being flash-borrowed\n   * @param amounts The amounts of the assets being flash-borrowed\n   * @param interestRateModes Types of the debt to open if the flash loan is not returned:\n   *   0 -> Don't open any debt, just revert if funds can't be transferred from the receiver\n   *   1 -> Deprecated on v3.2.0\n   *   2 -> Open debt at variable rate for the value of the amount flash-borrowed to the `onBehalfOf` address\n   * @param onBehalfOf The address  that will receive the debt in the case of using 2 on `modes`\n   * @param params Variadic packed params to pass to the receiver as extra information\n   * @param referralCode The code used to register the integrator originating the operation, for potential rewards.\n   *   0 if the action is executed directly by the user, without any middle-man\n   */\n  function flashLoan(\n    address receiverAddress,\n    address[] calldata assets,\n    uint256[] calldata amounts,\n    uint256[] calldata interestRateModes,\n    address onBehalfOf,\n    bytes calldata params,\n    uint16 referralCode\n  ) external;\n\n  /**\n   * @notice Allows smartcontracts to access the liquidity of the pool within one transaction,\n   * as long as the amount taken plus a fee is returned.\n   * @dev IMPORTANT There are security concerns for developers of flashloan receiver contracts that must be kept\n   * into consideration. For further details please visit https://docs.aave.com/developers/\n   * @param receiverAddress The address of the contract receiving the funds, implementing IFlashLoanSimpleReceiver interface\n   * @param asset The address of the asset being flash-borrowed\n   * @param amount The amount of the asset being flash-borrowed\n   * @param params Variadic packed params to pass to the receiver as extra information\n   * @param referralCode The code used to register the integrator originating the operation, for potential rewards.\n   *   0 if the action is executed directly by the user, without any middle-man\n   */\n  function flashLoanSimple(\n    address receiverAddress,\n    address asset,\n    uint256 amount,\n    bytes calldata params,\n    uint16 referralCode\n  ) external;\n\n  /**\n   * @notice Returns the user account data across all the reserves\n   * @param user The address of the user\n   * @return totalCollateralBase The total collateral of the user in the base currency used by the price feed\n   * @return totalDebtBase The total debt of the user in the base currency used by the price feed\n   * @return availableBorrowsBase The borrowing power left of the user in the base currency used by the price feed\n   * @return currentLiquidationThreshold The liquidation threshold of the user\n   * @return ltv The loan to value of The user\n   * @return healthFactor The current health factor of the user\n   */\n  function getUserAccountData(\n    address user\n  )\n    external\n    view\n    returns (\n      uint256 totalCollateralBase,\n      uint256 totalDebtBase,\n      uint256 availableBorrowsBase,\n      uint256 currentLiquidationThreshold,\n      uint256 ltv,\n      uint256 healthFactor\n    );\n\n  /**\n   * @notice Initializes a reserve, activating it, assigning an aToken and debt tokens\n   * @dev Only callable by the PoolConfigurator contract\n   * @param asset The address of the underlying asset of the reserve\n   * @param aTokenAddress The address of the aToken that will be assigned to the reserve\n   * @param variableDebtAddress The address of the VariableDebtToken that will be assigned to the reserve\n   */\n  function initReserve(address asset, address aTokenAddress, address variableDebtAddress) external;\n\n  /**\n   * @notice Drop a reserve\n   * @dev Only callable by the PoolConfigurator contract\n   * @dev Does not reset eMode flags, which must be considered when reusing the same reserve id for a different reserve.\n   * @param asset The address of the underlying asset of the reserve\n   */\n  function dropReserve(address asset) external;\n\n  /**\n   * @notice Accumulates interest to all indexes of the reserve\n   * @dev Only callable by the PoolConfigurator contract\n   * @dev To be used when required by the configurator, for example when updating interest rates strategy data\n   * @param asset The address of the underlying asset of the reserve\n   */\n  function syncIndexesState(address asset) external;\n\n  /**\n   * @notice Updates interest rates on the reserve data\n   * @dev Only callable by the PoolConfigurator contract\n   * @dev To be used when required by the configurator, for example when updating interest rates strategy data\n   * @param asset The address of the underlying asset of the reserve\n   */\n  function syncRatesState(address asset) external;\n\n  /**\n   * @notice Sets the configuration bitmap of the reserve as a whole\n   * @dev Only callable by the PoolConfigurator contract\n   * @param asset The address of the underlying asset of the reserve\n   * @param configuration The new configuration bitmap\n   */\n  function setConfiguration(\n    address asset,\n    DataTypes.ReserveConfigurationMap calldata configuration\n  ) external;\n\n  /**\n   * @notice Returns the configuration of the reserve\n   * @param asset The address of the underlying asset of the reserve\n   * @return The configuration of the reserve\n   */\n  function getConfiguration(\n    address asset\n  ) external view returns (DataTypes.ReserveConfigurationMap memory);\n\n  /**\n   * @notice Returns the configuration of the user across all the reserves\n   * @param user The user address\n   * @return The configuration of the user\n   */\n  function getUserConfiguration(\n    address user\n  ) external view returns (DataTypes.UserConfigurationMap memory);\n\n  /**\n   * @notice Returns the normalized income of the reserve\n   * @param asset The address of the underlying asset of the reserve\n   * @return The reserve's normalized income\n   */\n  function getReserveNormalizedIncome(address asset) external view returns (uint256);\n\n  /**\n   * @notice Returns the normalized variable debt per unit of asset\n   * @dev WARNING: This function is intended to be used primarily by the protocol itself to get a\n   * \"dynamic\" variable index based on time, current stored index and virtual rate at the current\n   * moment (approx. a borrower would get if opening a position). This means that is always used in\n   * combination with variable debt supply/balances.\n   * If using this function externally, consider that is possible to have an increasing normalized\n   * variable debt that is not equivalent to how the variable debt index would be updated in storage\n   * (e.g. only updates with non-zero variable debt supply)\n   * @param asset The address of the underlying asset of the reserve\n   * @return The reserve normalized variable debt\n   */\n  function getReserveNormalizedVariableDebt(address asset) external view returns (uint256);\n\n  /**\n   * @notice Returns the state and configuration of the reserve\n   * @param asset The address of the underlying asset of the reserve\n   * @return The state and configuration data of the reserve\n   */\n  function getReserveData(address asset) external view returns (DataTypes.ReserveDataLegacy memory);\n\n  /**\n   * @notice Returns the virtual underlying balance of the reserve\n   * @param asset The address of the underlying asset of the reserve\n   * @return The reserve virtual underlying balance\n   */\n  function getVirtualUnderlyingBalance(address asset) external view returns (uint128);\n\n  /**\n   * @notice Validates and finalizes an aToken transfer\n   * @dev Only callable by the overlying aToken of the `asset`\n   * @param asset The address of the underlying asset of the aToken\n   * @param from The user from which the aTokens are transferred\n   * @param to The user receiving the aTokens\n   * @param scaledAmount The scaled amount being transferred/withdrawn\n   * @param scaledBalanceFromBefore The aToken scaled balance of the `from` user before the transfer\n   * @param scaledBalanceToBefore The aToken scaled balance of the `to` user before the transfer\n   */\n  function finalizeTransfer(\n    address asset,\n    address from,\n    address to,\n    uint256 scaledAmount,\n    uint256 scaledBalanceFromBefore,\n    uint256 scaledBalanceToBefore\n  ) external;\n\n  /**\n   * @notice Returns the list of the underlying assets of all the initialized reserves\n   * @dev It does not include dropped reserves\n   * @return The addresses of the underlying assets of the initialized reserves\n   */\n  function getReservesList() external view returns (address[] memory);\n\n  /**\n   * @notice Returns the number of initialized reserves\n   * @dev It includes dropped reserves\n   * @return The count\n   */\n  function getReservesCount() external view returns (uint256);\n\n  /**\n   * @notice Returns the address of the underlying asset of a reserve by the reserve id as stored in the DataTypes.ReserveData struct\n   * @param id The id of the reserve as stored in the DataTypes.ReserveData struct\n   * @return The address of the reserve associated with id\n   */\n  function getReserveAddressById(uint16 id) external view returns (address);\n\n  /**\n   * @notice Returns the PoolAddressesProvider connected to this contract\n   * @return The address of the PoolAddressesProvider\n   */\n  function ADDRESSES_PROVIDER() external view returns (IPoolAddressesProvider);\n\n  /**\n   * @notice Returns the ReserveInterestRateStrategy connected to all the reserves\n   * @return The address of the ReserveInterestRateStrategy contract\n   */\n  function RESERVE_INTEREST_RATE_STRATEGY() external view returns (address);\n\n  /**\n   * @notice Updates flash loan premium. All this premium is collected by the protocol treasury.\n   * @dev The premium is calculated on the total borrowed amount\n   * @dev Only callable by the PoolConfigurator contract\n   * @param flashLoanPremium The flash loan premium, expressed in bps\n   */\n  function updateFlashloanPremium(uint128 flashLoanPremium) external;\n\n  /**\n   * @notice Configures a new or alters an existing collateral configuration of an eMode.\n   * @dev In eMode, the protocol allows very high borrowing power to borrow assets of the same category.\n   * The category 0 is reserved as it's the default for volatile assets\n   * @param id The id of the category\n   * @param config The configuration of the category\n   */\n  function configureEModeCategory(\n    uint8 id,\n    DataTypes.EModeCategoryBaseConfiguration memory config\n  ) external;\n\n  /**\n   * @notice Replaces the current eMode collateralBitmap.\n   * @param id The id of the category\n   * @param collateralBitmap The collateralBitmap of the category\n   */\n  function configureEModeCategoryCollateralBitmap(uint8 id, uint128 collateralBitmap) external;\n\n  /**\n   * @notice Replaces the current eMode borrowableBitmap.\n   * @param id The id of the category\n   * @param borrowableBitmap The borrowableBitmap of the category\n   */\n  function configureEModeCategoryBorrowableBitmap(uint8 id, uint128 borrowableBitmap) external;\n\n  /**\n   * @notice Returns the data of an eMode category\n   * @dev DEPRECATED use independent getters instead\n   * @param id The id of the category\n   * @return The configuration data of the category\n   */\n  function getEModeCategoryData(\n    uint8 id\n  ) external view returns (DataTypes.EModeCategoryLegacy memory);\n\n  /**\n   * @notice Returns the label of an eMode category\n   * @param id The id of the category\n   * @return The label of the category\n   */\n  function getEModeCategoryLabel(uint8 id) external view returns (string memory);\n\n  /**\n   * @notice Returns the collateral config of an eMode category\n   * @param id The id of the category\n   * @return The ltv,lt,lb of the category\n   */\n  function getEModeCategoryCollateralConfig(\n    uint8 id\n  ) external view returns (DataTypes.CollateralConfig memory);\n\n  /**\n   * @notice Returns the collateralBitmap of an eMode category\n   * @param id The id of the category\n   * @return The collateralBitmap of the category\n   */\n  function getEModeCategoryCollateralBitmap(uint8 id) external view returns (uint128);\n\n  /**\n   * @notice Returns the borrowableBitmap of an eMode category\n   * @param id The id of the category\n   * @return The borrowableBitmap of the category\n   */\n  function getEModeCategoryBorrowableBitmap(uint8 id) external view returns (uint128);\n\n  /**\n   * @notice Allows a user to use the protocol in eMode\n   * @param categoryId The id of the category\n   */\n  function setUserEMode(uint8 categoryId) external;\n\n  /**\n   * @notice Returns the eMode the user is using\n   * @param user The address of the user\n   * @return The eMode id\n   */\n  function getUserEMode(address user) external view returns (uint256);\n\n  /**\n   * @notice Resets the isolation mode total debt of the given asset to zero\n   * @dev It requires the given asset has zero debt ceiling\n   * @param asset The address of the underlying asset to reset the isolationModeTotalDebt\n   */\n  function resetIsolationModeTotalDebt(address asset) external;\n\n  /**\n   * @notice Sets the liquidation grace period of the given asset\n   * @dev To enable a liquidation grace period, a timestamp in the future should be set,\n   *      To disable a liquidation grace period, any timestamp in the past works, like 0\n   * @param asset The address of the underlying asset to set the liquidationGracePeriod\n   * @param until Timestamp when the liquidation grace period will end\n   **/\n  function setLiquidationGracePeriod(address asset, uint40 until) external;\n\n  /**\n   * @notice Returns the liquidation grace period of the given asset\n   * @param asset The address of the underlying asset\n   * @return Timestamp when the liquidation grace period will end\n   **/\n  function getLiquidationGracePeriod(address asset) external view returns (uint40);\n\n  /**\n   * @notice Returns the total fee on flash loans.\n   * @dev From v3.4 all flashloan fees will be send to the treasury.\n   * @return The total fee on flashloans\n   */\n  function FLASHLOAN_PREMIUM_TOTAL() external view returns (uint128);\n\n  /**\n   * @notice Returns the part of the flashloan fees sent to protocol\n   * @dev From v3.4 all flashloan fees will be send to the treasury and this value\n   *      is always 100_00.\n   * @return The flashloan fee sent to the protocol treasury\n   */\n  function FLASHLOAN_PREMIUM_TO_PROTOCOL() external view returns (uint128);\n\n  /**\n   * @notice Returns the maximum number of reserves supported to be listed in this Pool\n   * @return The maximum number of reserves supported\n   */\n  function MAX_NUMBER_RESERVES() external view returns (uint16);\n\n  /**\n   * @notice Mints the assets accrued through the reserve factor to the treasury in the form of aTokens\n   * @param assets The list of reserves for which the minting needs to be executed\n   */\n  function mintToTreasury(address[] calldata assets) external;\n\n  /**\n   * @notice Rescue and transfer tokens locked in this contract\n   * @param token The address of the token\n   * @param to The address of the recipient\n   * @param amount The amount of token to transfer\n   */\n  function rescueTokens(address token, address to, uint256 amount) external;\n\n  /**\n   * @notice Supplies an `amount` of underlying asset into the reserve, receiving in return overlying aTokens.\n   * - E.g. User supplies 100 USDC and gets in return 100 aUSDC\n   * @dev Deprecated: Use the `supply` function instead\n   * @param asset The address of the underlying asset to supply\n   * @param amount The amount to be supplied\n   * @param onBehalfOf The address that will receive the aTokens, same as msg.sender if the user\n   *   wants to receive them on his own wallet, or a different address if the beneficiary of aTokens\n   *   is a different wallet\n   * @param referralCode Code used to register the integrator originating the operation, for potential rewards.\n   *   0 if the action is executed directly by the user, without any middle-man\n   */\n  function deposit(address asset, uint256 amount, address onBehalfOf, uint16 referralCode) external;\n\n  /**\n   * @notice It covers the deficit of a specified reserve by burning the equivalent aToken `amount` for assets\n   * @dev The deficit of a reserve can occur due to situations where borrowed assets are not repaid, leading to bad debt.\n   * @param asset The address of the underlying asset to cover the deficit.\n   * @param amount The amount to be covered, in aToken\n   * @return The amount of tokens burned\n   */\n  function eliminateReserveDeficit(address asset, uint256 amount) external returns (uint256);\n\n  /**\n   * @notice Approves or disapproves a position manager. This position manager will be able\n   * to call the `setUserUseReserveAsCollateralOnBehalfOf` and the\n   * `setUserEModeOnBehalfOf` function on behalf of the user.\n   * @param positionManager The address of the position manager\n   * @param approve True if the position manager should be approved, false otherwise\n   */\n  function approvePositionManager(address positionManager, bool approve) external;\n\n  /**\n   * @notice Renounces a position manager role for a given user.\n   * @param user The address of the user\n   */\n  function renouncePositionManagerRole(address user) external;\n\n  /**\n   * @notice Sets the use as collateral flag for the user on the specific reserve on behalf of the user.\n   * @param asset The address of the underlying asset of the reserve\n   * @param useAsCollateral True if the user wants to use the reserve as collateral, false otherwise\n   * @param onBehalfOf The address of the user\n   */\n  function setUserUseReserveAsCollateralOnBehalfOf(\n    address asset,\n    bool useAsCollateral,\n    address onBehalfOf\n  ) external;\n\n  /**\n   * @notice Sets the eMode category for the user on the specific reserve on behalf of the user.\n   * @param categoryId The id of the category\n   * @param onBehalfOf The address of the user\n   */\n  function setUserEModeOnBehalfOf(uint8 categoryId, address onBehalfOf) external;\n\n  /*\n   * @notice Returns true if the `positionManager` address is approved to use the position manager role on behalf of the user.\n   * @param user The address of the user\n   * @param positionManager The address of the position manager\n   * @return True if the user is approved to use the position manager, false otherwise\n   */\n  function isApprovedPositionManager(\n    address user,\n    address positionManager\n  ) external view returns (bool);\n\n  /**\n   * @notice Returns the current deficit of a reserve.\n   * @param asset The address of the underlying asset of the reserve\n   * @return The current deficit of the reserve\n   */\n  function getReserveDeficit(address asset) external view returns (uint256);\n\n  /**\n   * @notice Returns the aToken address of a reserve.\n   * @param asset The address of the underlying asset of the reserve\n   * @return The address of the aToken\n   */\n  function getReserveAToken(address asset) external view returns (address);\n\n  /**\n   * @notice Returns the variableDebtToken address of a reserve.\n   * @param asset The address of the underlying asset of the reserve\n   * @return The address of the variableDebtToken\n   */\n  function getReserveVariableDebtToken(address asset) external view returns (address);\n\n  /**\n   * @notice Gets the address of the external FlashLoanLogic\n   */\n  function getFlashLoanLogic() external view returns (address);\n\n  /**\n   * @notice Gets the address of the external BorrowLogic\n   */\n  function getBorrowLogic() external view returns (address);\n\n  /**\n   * @notice Gets the address of the external EModeLogic\n   */\n  function getEModeLogic() external view returns (address);\n\n  /**\n   * @notice Gets the address of the external LiquidationLogic\n   */\n  function getLiquidationLogic() external view returns (address);\n\n  /**\n   * @notice Gets the address of the external PoolLogic\n   */\n  function getPoolLogic() external view returns (address);\n\n  /**\n   * @notice Gets the address of the external SupplyLogic\n   */\n  function getSupplyLogic() external view returns (address);\n}\n"},"lib/openzeppelin-contracts/contracts/proxy/Clones.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (proxy/Clones.sol)\n\npragma solidity ^0.8.20;\n\nimport {Create2} from \"../utils/Create2.sol\";\nimport {Errors} from \"../utils/Errors.sol\";\n\n/**\n * @dev https://eips.ethereum.org/EIPS/eip-1167[ERC-1167] is a standard for\n * deploying minimal proxy contracts, also known as \"clones\".\n *\n * > To simply and cheaply clone contract functionality in an immutable way, this standard specifies\n * > a minimal bytecode implementation that delegates all calls to a known, fixed address.\n *\n * The library includes functions to deploy a proxy using either `create` (traditional deployment) or `create2`\n * (salted deterministic deployment). It also includes functions to predict the addresses of clones deployed using the\n * deterministic method.\n */\nlibrary Clones {\n    error CloneArgumentsTooLong();\n\n    /**\n     * @dev Deploys and returns the address of a clone that mimics the behavior of `implementation`.\n     *\n     * This function uses the create opcode, which should never revert.\n     */\n    function clone(address implementation) internal returns (address instance) {\n        return clone(implementation, 0);\n    }\n\n    /**\n     * @dev Same as {xref-Clones-clone-address-}[clone], but with a `value` parameter to send native currency\n     * to the new contract.\n     *\n     * NOTE: Using a non-zero value at creation will require the contract using this function (e.g. a factory)\n     * to always have enough balance for new deployments. Consider exposing this function under a payable method.\n     */\n    function clone(address implementation, uint256 value) internal returns (address instance) {\n        if (address(this).balance < value) {\n            revert Errors.InsufficientBalance(address(this).balance, value);\n        }\n        assembly (\"memory-safe\") {\n            // Cleans the upper 96 bits of the `implementation` word, then packs the first 3 bytes\n            // of the `implementation` address with the bytecode before the address.\n            mstore(0x00, or(shr(0xe8, shl(0x60, implementation)), 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000))\n            // Packs the remaining 17 bytes of `implementation` with the bytecode after the address.\n            mstore(0x20, or(shl(0x78, implementation), 0x5af43d82803e903d91602b57fd5bf3))\n            instance := create(value, 0x09, 0x37)\n        }\n        if (instance == address(0)) {\n            revert Errors.FailedDeployment();\n        }\n    }\n\n    /**\n     * @dev Deploys and returns the address of a clone that mimics the behavior of `implementation`.\n     *\n     * This function uses the create2 opcode and a `salt` to deterministically deploy\n     * the clone. Using the same `implementation` and `salt` multiple times will revert, since\n     * the clones cannot be deployed twice at the same address.\n     */\n    function cloneDeterministic(address implementation, bytes32 salt) internal returns (address instance) {\n        return cloneDeterministic(implementation, salt, 0);\n    }\n\n    /**\n     * @dev Same as {xref-Clones-cloneDeterministic-address-bytes32-}[cloneDeterministic], but with\n     * a `value` parameter to send native currency to the new contract.\n     *\n     * NOTE: Using a non-zero value at creation will require the contract using this function (e.g. a factory)\n     * to always have enough balance for new deployments. Consider exposing this function under a payable method.\n     */\n    function cloneDeterministic(\n        address implementation,\n        bytes32 salt,\n        uint256 value\n    ) internal returns (address instance) {\n        if (address(this).balance < value) {\n            revert Errors.InsufficientBalance(address(this).balance, value);\n        }\n        assembly (\"memory-safe\") {\n            // Cleans the upper 96 bits of the `implementation` word, then packs the first 3 bytes\n            // of the `implementation` address with the bytecode before the address.\n            mstore(0x00, or(shr(0xe8, shl(0x60, implementation)), 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000))\n            // Packs the remaining 17 bytes of `implementation` with the bytecode after the address.\n            mstore(0x20, or(shl(0x78, implementation), 0x5af43d82803e903d91602b57fd5bf3))\n            instance := create2(value, 0x09, 0x37, salt)\n        }\n        if (instance == address(0)) {\n            revert Errors.FailedDeployment();\n        }\n    }\n\n    /**\n     * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}.\n     */\n    function predictDeterministicAddress(\n        address implementation,\n        bytes32 salt,\n        address deployer\n    ) internal pure returns (address predicted) {\n        assembly (\"memory-safe\") {\n            let ptr := mload(0x40)\n            mstore(add(ptr, 0x38), deployer)\n            mstore(add(ptr, 0x24), 0x5af43d82803e903d91602b57fd5bf3ff)\n            mstore(add(ptr, 0x14), implementation)\n            mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73)\n            mstore(add(ptr, 0x58), salt)\n            mstore(add(ptr, 0x78), keccak256(add(ptr, 0x0c), 0x37))\n            predicted := and(keccak256(add(ptr, 0x43), 0x55), 0xffffffffffffffffffffffffffffffffffffffff)\n        }\n    }\n\n    /**\n     * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}.\n     */\n    function predictDeterministicAddress(\n        address implementation,\n        bytes32 salt\n    ) internal view returns (address predicted) {\n        return predictDeterministicAddress(implementation, salt, address(this));\n    }\n\n    /**\n     * @dev Deploys and returns the address of a clone that mimics the behavior of `implementation` with custom\n     * immutable arguments. These are provided through `args` and cannot be changed after deployment. To\n     * access the arguments within the implementation, use {fetchCloneArgs}.\n     *\n     * This function uses the create opcode, which should never revert.\n     */\n    function cloneWithImmutableArgs(address implementation, bytes memory args) internal returns (address instance) {\n        return cloneWithImmutableArgs(implementation, args, 0);\n    }\n\n    /**\n     * @dev Same as {xref-Clones-cloneWithImmutableArgs-address-bytes-}[cloneWithImmutableArgs], but with a `value`\n     * parameter to send native currency to the new contract.\n     *\n     * NOTE: Using a non-zero value at creation will require the contract using this function (e.g. a factory)\n     * to always have enough balance for new deployments. Consider exposing this function under a payable method.\n     */\n    function cloneWithImmutableArgs(\n        address implementation,\n        bytes memory args,\n        uint256 value\n    ) internal returns (address instance) {\n        if (address(this).balance < value) {\n            revert Errors.InsufficientBalance(address(this).balance, value);\n        }\n        bytes memory bytecode = _cloneCodeWithImmutableArgs(implementation, args);\n        assembly (\"memory-safe\") {\n            instance := create(value, add(bytecode, 0x20), mload(bytecode))\n        }\n        if (instance == address(0)) {\n            revert Errors.FailedDeployment();\n        }\n    }\n\n    /**\n     * @dev Deploys and returns the address of a clone that mimics the behavior of `implementation` with custom\n     * immutable arguments. These are provided through `args` and cannot be changed after deployment. To\n     * access the arguments within the implementation, use {fetchCloneArgs}.\n     *\n     * This function uses the create2 opcode and a `salt` to deterministically deploy the clone. Using the same\n     * `implementation`, `args` and `salt` multiple times will revert, since the clones cannot be deployed twice\n     * at the same address.\n     */\n    function cloneDeterministicWithImmutableArgs(\n        address implementation,\n        bytes memory args,\n        bytes32 salt\n    ) internal returns (address instance) {\n        return cloneDeterministicWithImmutableArgs(implementation, args, salt, 0);\n    }\n\n    /**\n     * @dev Same as {xref-Clones-cloneDeterministicWithImmutableArgs-address-bytes-bytes32-}[cloneDeterministicWithImmutableArgs],\n     * but with a `value` parameter to send native currency to the new contract.\n     *\n     * NOTE: Using a non-zero value at creation will require the contract using this function (e.g. a factory)\n     * to always have enough balance for new deployments. Consider exposing this function under a payable method.\n     */\n    function cloneDeterministicWithImmutableArgs(\n        address implementation,\n        bytes memory args,\n        bytes32 salt,\n        uint256 value\n    ) internal returns (address instance) {\n        bytes memory bytecode = _cloneCodeWithImmutableArgs(implementation, args);\n        return Create2.deploy(value, salt, bytecode);\n    }\n\n    /**\n     * @dev Computes the address of a clone deployed using {Clones-cloneDeterministicWithImmutableArgs}.\n     */\n    function predictDeterministicAddressWithImmutableArgs(\n        address implementation,\n        bytes memory args,\n        bytes32 salt,\n        address deployer\n    ) internal pure returns (address predicted) {\n        bytes memory bytecode = _cloneCodeWithImmutableArgs(implementation, args);\n        return Create2.computeAddress(salt, keccak256(bytecode), deployer);\n    }\n\n    /**\n     * @dev Computes the address of a clone deployed using {Clones-cloneDeterministicWithImmutableArgs}.\n     */\n    function predictDeterministicAddressWithImmutableArgs(\n        address implementation,\n        bytes memory args,\n        bytes32 salt\n    ) internal view returns (address predicted) {\n        return predictDeterministicAddressWithImmutableArgs(implementation, args, salt, address(this));\n    }\n\n    /**\n     * @dev Get the immutable args attached to a clone.\n     *\n     * - If `instance` is a clone that was deployed using `clone` or `cloneDeterministic`, this\n     *   function will return an empty array.\n     * - If `instance` is a clone that was deployed using `cloneWithImmutableArgs` or\n     *   `cloneDeterministicWithImmutableArgs`, this function will return the args array used at\n     *   creation.\n     * - If `instance` is NOT a clone deployed using this library, the behavior is undefined. This\n     *   function should only be used to check addresses that are known to be clones.\n     */\n    function fetchCloneArgs(address instance) internal view returns (bytes memory) {\n        bytes memory result = new bytes(instance.code.length - 45); // revert if length is too short\n        assembly (\"memory-safe\") {\n            extcodecopy(instance, add(result, 32), 45, mload(result))\n        }\n        return result;\n    }\n\n    /**\n     * @dev Helper that prepares the initcode of the proxy with immutable args.\n     *\n     * An assembly variant of this function requires copying the `args` array, which can be efficiently done using\n     * `mcopy`. Unfortunately, that opcode is not available before cancun. A pure solidity implementation using\n     * abi.encodePacked is more expensive but also more portable and easier to review.\n     *\n     * NOTE: https://eips.ethereum.org/EIPS/eip-170[EIP-170] limits the length of the contract code to 24576 bytes.\n     * With the proxy code taking 45 bytes, that limits the length of the immutable args to 24531 bytes.\n     */\n    function _cloneCodeWithImmutableArgs(\n        address implementation,\n        bytes memory args\n    ) private pure returns (bytes memory) {\n        if (args.length > 24531) revert CloneArgumentsTooLong();\n        return\n            abi.encodePacked(\n                hex\"61\",\n                uint16(args.length + 45),\n                hex\"3d81600a3d39f3363d3d373d3d3d363d73\",\n                implementation,\n                hex\"5af43d82803e903d91602b57fd5bf3\",\n                args\n            );\n    }\n}\n"},"lib/openzeppelin-contracts/contracts/utils/Errors.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/Errors.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Collection of common custom errors used in multiple contracts\n *\n * IMPORTANT: Backwards compatibility is not guaranteed in future versions of the library.\n * It is recommended to avoid relying on the error API for critical functionality.\n *\n * _Available since v5.1._\n */\nlibrary Errors {\n    /**\n     * @dev The ETH balance of the account is not enough to perform the operation.\n     */\n    error InsufficientBalance(uint256 balance, uint256 needed);\n\n    /**\n     * @dev A call to an address target failed. The target may have reverted.\n     */\n    error FailedCall();\n\n    /**\n     * @dev The deployment failed.\n     */\n    error FailedDeployment();\n\n    /**\n     * @dev A necessary precompile is missing.\n     */\n    error MissingPrecompile(address);\n}\n"},"lib/flash-loan-router/src/interface/ICowSettlement.sol":{"content":"// SPDX-License-Identifier: GPL-3.0-or-later\npragma solidity ^0.8;\n\n/// @notice An interface for CoW Protocol's settlement contract that only\n/// enumerates the functions and types needed for this project.\n/// For more information, see the project's repository:\n/// <https://github.com/cowprotocol/contracts/blob/9c1984b864d0a6703a877a088be6dac56450808c/src/contracts/GPv2Settlement.sol>\n/// The code and comments have been mostly copied from the linked resources.\ninterface ICowSettlement {\n    /// @notice A struct representing a trade to be executed as part a batch\n    /// settlement.\n    /// @dev See <https://github.com/cowprotocol/contracts/blob/9c1984b864d0a6703a877a088be6dac56450808c/src/contracts/libraries/GPv2Trade.sol#L14-L28>.\n    struct Trade {\n        uint256 sellTokenIndex;\n        uint256 buyTokenIndex;\n        address receiver;\n        uint256 sellAmount;\n        uint256 buyAmount;\n        uint32 validTo;\n        bytes32 appData;\n        uint256 feeAmount;\n        uint256 flags;\n        uint256 executedAmount;\n        bytes signature;\n    }\n\n    /// @notice Interaction data for performing arbitrary contract interactions.\n    /// Submitted to [`GPv2Settlement.settle`] for code execution.\n    /// @dev See <https://github.com/cowprotocol/contracts/blob/9c1984b864d0a6703a877a088be6dac56450808c/src/contracts/libraries/GPv2Interaction.sol#L7-L13>.\n    struct Interaction {\n        address target;\n        uint256 value;\n        bytes callData;\n    }\n\n    /// @notice The authenticator is used to determine who can call the settle\n    /// function. That is, only authorized solvers have the ability to invoke\n    /// settlements. Any valid authenticator implements an isSolver method\n    /// called by the onlySolver modifier below.\n    /// @dev See <https://github.com/cowprotocol/contracts/blob/9c1984b864d0a6703a877a088be6dac56450808c/src/contracts/GPv2Settlement.sol#L28-L32>.\n    function authenticator() external view returns (address);\n\n    /// @notice Settle the specified orders at a clearing price. Note that it is\n    /// the responsibility of the caller to ensure that all GPv2 invariants are\n    /// upheld for the input settlement, otherwise this call will revert.\n    /// Namely:\n    /// - All orders are valid and signed\n    /// - Accounts have sufficient balance and approval.\n    /// - Settlement contract has sufficient balance to execute trades. Note\n    ///   this implies that the accumulated fees held in the contract can also\n    ///   be used for settlement. This is OK since:\n    ///   - Solvers need to be authorized\n    ///   - Misbehaving solvers will be slashed for abusing accumulated fees for\n    ///     settlement\n    ///   - Critically, user orders are entirely protected\n    ///\n    /// @param tokens An array of ERC20 tokens to be traded in the settlement.\n    /// Trades encode tokens as indices into this array.\n    /// @param clearingPrices An array of clearing prices where the `i`-th price\n    /// is for the `i`-th token in the [`tokens`] array.\n    /// @param trades Trades for signed orders.\n    /// @param interactions Smart contract interactions split into three\n    /// separate lists to be run before the settlement, during the settlement\n    /// and after the settlement respectively.\n    /// @dev See <https://github.com/cowprotocol/contracts/blob/9c1984b864d0a6703a877a088be6dac56450808c/src/contracts/GPv2Settlement.sol#L99-L126>.\n    function settle(\n        address[] calldata tokens,\n        uint256[] calldata clearingPrices,\n        Trade[] calldata trades,\n        Interaction[][3] calldata interactions\n    ) external;\n}\n"},"lib/openzeppelin-contracts/contracts/utils/Context.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context {\n    function _msgSender() internal view virtual returns (address) {\n        return msg.sender;\n    }\n\n    function _msgData() internal view virtual returns (bytes calldata) {\n        return msg.data;\n    }\n\n    function _contextSuffixLength() internal view virtual returns (uint256) {\n        return 0;\n    }\n}\n"},"lib/openzeppelin-contracts/contracts/utils/Create2.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/Create2.sol)\n\npragma solidity ^0.8.20;\n\nimport {Errors} from \"./Errors.sol\";\n\n/**\n * @dev Helper to make usage of the `CREATE2` EVM opcode easier and safer.\n * `CREATE2` can be used to compute in advance the address where a smart\n * contract will be deployed, which allows for interesting new mechanisms known\n * as 'counterfactual interactions'.\n *\n * See the https://eips.ethereum.org/EIPS/eip-1014#motivation[EIP] for more\n * information.\n */\nlibrary Create2 {\n    /**\n     * @dev There's no code to deploy.\n     */\n    error Create2EmptyBytecode();\n\n    /**\n     * @dev Deploys a contract using `CREATE2`. The address where the contract\n     * will be deployed can be known in advance via {computeAddress}.\n     *\n     * The bytecode for a contract can be obtained from Solidity with\n     * `type(contractName).creationCode`.\n     *\n     * Requirements:\n     *\n     * - `bytecode` must not be empty.\n     * - `salt` must have not been used for `bytecode` already.\n     * - the factory must have a balance of at least `amount`.\n     * - if `amount` is non-zero, `bytecode` must have a `payable` constructor.\n     */\n    function deploy(uint256 amount, bytes32 salt, bytes memory bytecode) internal returns (address addr) {\n        if (address(this).balance < amount) {\n            revert Errors.InsufficientBalance(address(this).balance, amount);\n        }\n        if (bytecode.length == 0) {\n            revert Create2EmptyBytecode();\n        }\n        assembly (\"memory-safe\") {\n            addr := create2(amount, add(bytecode, 0x20), mload(bytecode), salt)\n            // if no address was created, and returndata is not empty, bubble revert\n            if and(iszero(addr), not(iszero(returndatasize()))) {\n                let p := mload(0x40)\n                returndatacopy(p, 0, returndatasize())\n                revert(p, returndatasize())\n            }\n        }\n        if (addr == address(0)) {\n            revert Errors.FailedDeployment();\n        }\n    }\n\n    /**\n     * @dev Returns the address where a contract will be stored if deployed via {deploy}. Any change in the\n     * `bytecodeHash` or `salt` will result in a new destination address.\n     */\n    function computeAddress(bytes32 salt, bytes32 bytecodeHash) internal view returns (address) {\n        return computeAddress(salt, bytecodeHash, address(this));\n    }\n\n    /**\n     * @dev Returns the address where a contract will be stored if deployed via {deploy} from a contract located at\n     * `deployer`. If `deployer` is this contract's address, returns the same value as {computeAddress}.\n     */\n    function computeAddress(bytes32 salt, bytes32 bytecodeHash, address deployer) internal pure returns (address addr) {\n        assembly (\"memory-safe\") {\n            let ptr := mload(0x40) // Get free memory pointer\n\n            // |                   | ↓ ptr ...  ↓ ptr + 0x0B (start) ...  ↓ ptr + 0x20 ...  ↓ ptr + 0x40 ...   |\n            // |-------------------|---------------------------------------------------------------------------|\n            // | bytecodeHash      |                                                        CCCCCCCCCCCCC...CC |\n            // | salt              |                                      BBBBBBBBBBBBB...BB                   |\n            // | deployer          | 000000...0000AAAAAAAAAAAAAAAAAAA...AA                                     |\n            // | 0xFF              |            FF                                                             |\n            // |-------------------|---------------------------------------------------------------------------|\n            // | memory            | 000000...00FFAAAAAAAAAAAAAAAAAAA...AABBBBBBBBBBBBB...BBCCCCCCCCCCCCC...CC |\n            // | keccak(start, 85) |            ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑ |\n\n            mstore(add(ptr, 0x40), bytecodeHash)\n            mstore(add(ptr, 0x20), salt)\n            mstore(ptr, deployer) // Right-aligned with 12 preceding garbage bytes\n            let start := add(ptr, 0x0b) // The hashed data starts at the final garbage byte which we will set to 0xff\n            mstore8(start, 0xff)\n            addr := and(keccak256(start, 85), 0xffffffffffffffffffffffffffffffffffffffff)\n        }\n    }\n}\n"},"lib/openzeppelin-contracts/contracts/utils/Strings.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (utils/Strings.sol)\n\npragma solidity ^0.8.20;\n\nimport {Math} from \"./math/Math.sol\";\nimport {SafeCast} from \"./math/SafeCast.sol\";\nimport {SignedMath} from \"./math/SignedMath.sol\";\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n    using SafeCast for *;\n\n    bytes16 private constant HEX_DIGITS = \"0123456789abcdef\";\n    uint8 private constant ADDRESS_LENGTH = 20;\n    uint256 private constant SPECIAL_CHARS_LOOKUP =\n        (1 << 0x08) | // backspace\n            (1 << 0x09) | // tab\n            (1 << 0x0a) | // newline\n            (1 << 0x0c) | // form feed\n            (1 << 0x0d) | // carriage return\n            (1 << 0x22) | // double quote\n            (1 << 0x5c); // backslash\n\n    /**\n     * @dev The `value` string doesn't fit in the specified `length`.\n     */\n    error StringsInsufficientHexLength(uint256 value, uint256 length);\n\n    /**\n     * @dev The string being parsed contains characters that are not in scope of the given base.\n     */\n    error StringsInvalidChar();\n\n    /**\n     * @dev The string being parsed is not a properly formatted address.\n     */\n    error StringsInvalidAddressFormat();\n\n    /**\n     * @dev Converts a `uint256` to its ASCII `string` decimal representation.\n     */\n    function toString(uint256 value) internal pure returns (string memory) {\n        unchecked {\n            uint256 length = Math.log10(value) + 1;\n            string memory buffer = new string(length);\n            uint256 ptr;\n            assembly (\"memory-safe\") {\n                ptr := add(add(buffer, 0x20), length)\n            }\n            while (true) {\n                ptr--;\n                assembly (\"memory-safe\") {\n                    mstore8(ptr, byte(mod(value, 10), HEX_DIGITS))\n                }\n                value /= 10;\n                if (value == 0) break;\n            }\n            return buffer;\n        }\n    }\n\n    /**\n     * @dev Converts a `int256` to its ASCII `string` decimal representation.\n     */\n    function toStringSigned(int256 value) internal pure returns (string memory) {\n        return string.concat(value < 0 ? \"-\" : \"\", toString(SignedMath.abs(value)));\n    }\n\n    /**\n     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\n     */\n    function toHexString(uint256 value) internal pure returns (string memory) {\n        unchecked {\n            return toHexString(value, Math.log256(value) + 1);\n        }\n    }\n\n    /**\n     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\n     */\n    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\n        uint256 localValue = value;\n        bytes memory buffer = new bytes(2 * length + 2);\n        buffer[0] = \"0\";\n        buffer[1] = \"x\";\n        for (uint256 i = 2 * length + 1; i > 1; --i) {\n            buffer[i] = HEX_DIGITS[localValue & 0xf];\n            localValue >>= 4;\n        }\n        if (localValue != 0) {\n            revert StringsInsufficientHexLength(value, length);\n        }\n        return string(buffer);\n    }\n\n    /**\n     * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal\n     * representation.\n     */\n    function toHexString(address addr) internal pure returns (string memory) {\n        return toHexString(uint256(uint160(addr)), ADDRESS_LENGTH);\n    }\n\n    /**\n     * @dev Converts an `address` with fixed length of 20 bytes to its checksummed ASCII `string` hexadecimal\n     * representation, according to EIP-55.\n     */\n    function toChecksumHexString(address addr) internal pure returns (string memory) {\n        bytes memory buffer = bytes(toHexString(addr));\n\n        // hash the hex part of buffer (skip length + 2 bytes, length 40)\n        uint256 hashValue;\n        assembly (\"memory-safe\") {\n            hashValue := shr(96, keccak256(add(buffer, 0x22), 40))\n        }\n\n        for (uint256 i = 41; i > 1; --i) {\n            // possible values for buffer[i] are 48 (0) to 57 (9) and 97 (a) to 102 (f)\n            if (hashValue & 0xf > 7 && uint8(buffer[i]) > 96) {\n                // case shift by xoring with 0x20\n                buffer[i] ^= 0x20;\n            }\n            hashValue >>= 4;\n        }\n        return string(buffer);\n    }\n\n    /**\n     * @dev Returns true if the two strings are equal.\n     */\n    function equal(string memory a, string memory b) internal pure returns (bool) {\n        return bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b));\n    }\n\n    /**\n     * @dev Parse a decimal string and returns the value as a `uint256`.\n     *\n     * Requirements:\n     * - The string must be formatted as `[0-9]*`\n     * - The result must fit into an `uint256` type\n     */\n    function parseUint(string memory input) internal pure returns (uint256) {\n        return parseUint(input, 0, bytes(input).length);\n    }\n\n    /**\n     * @dev Variant of {parseUint-string} that parses a substring of `input` located between position `begin` (included) and\n     * `end` (excluded).\n     *\n     * Requirements:\n     * - The substring must be formatted as `[0-9]*`\n     * - The result must fit into an `uint256` type\n     */\n    function parseUint(string memory input, uint256 begin, uint256 end) internal pure returns (uint256) {\n        (bool success, uint256 value) = tryParseUint(input, begin, end);\n        if (!success) revert StringsInvalidChar();\n        return value;\n    }\n\n    /**\n     * @dev Variant of {parseUint-string} that returns false if the parsing fails because of an invalid character.\n     *\n     * NOTE: This function will revert if the result does not fit in a `uint256`.\n     */\n    function tryParseUint(string memory input) internal pure returns (bool success, uint256 value) {\n        return _tryParseUintUncheckedBounds(input, 0, bytes(input).length);\n    }\n\n    /**\n     * @dev Variant of {parseUint-string-uint256-uint256} that returns false if the parsing fails because of an invalid\n     * character.\n     *\n     * NOTE: This function will revert if the result does not fit in a `uint256`.\n     */\n    function tryParseUint(\n        string memory input,\n        uint256 begin,\n        uint256 end\n    ) internal pure returns (bool success, uint256 value) {\n        if (end > bytes(input).length || begin > end) return (false, 0);\n        return _tryParseUintUncheckedBounds(input, begin, end);\n    }\n\n    /**\n     * @dev Implementation of {tryParseUint-string-uint256-uint256} that does not check bounds. Caller should make sure that\n     * `begin <= end <= input.length`. Other inputs would result in undefined behavior.\n     */\n    function _tryParseUintUncheckedBounds(\n        string memory input,\n        uint256 begin,\n        uint256 end\n    ) private pure returns (bool success, uint256 value) {\n        bytes memory buffer = bytes(input);\n\n        uint256 result = 0;\n        for (uint256 i = begin; i < end; ++i) {\n            uint8 chr = _tryParseChr(bytes1(_unsafeReadBytesOffset(buffer, i)));\n            if (chr > 9) return (false, 0);\n            result *= 10;\n            result += chr;\n        }\n        return (true, result);\n    }\n\n    /**\n     * @dev Parse a decimal string and returns the value as a `int256`.\n     *\n     * Requirements:\n     * - The string must be formatted as `[-+]?[0-9]*`\n     * - The result must fit in an `int256` type.\n     */\n    function parseInt(string memory input) internal pure returns (int256) {\n        return parseInt(input, 0, bytes(input).length);\n    }\n\n    /**\n     * @dev Variant of {parseInt-string} that parses a substring of `input` located between position `begin` (included) and\n     * `end` (excluded).\n     *\n     * Requirements:\n     * - The substring must be formatted as `[-+]?[0-9]*`\n     * - The result must fit in an `int256` type.\n     */\n    function parseInt(string memory input, uint256 begin, uint256 end) internal pure returns (int256) {\n        (bool success, int256 value) = tryParseInt(input, begin, end);\n        if (!success) revert StringsInvalidChar();\n        return value;\n    }\n\n    /**\n     * @dev Variant of {parseInt-string} that returns false if the parsing fails because of an invalid character or if\n     * the result does not fit in a `int256`.\n     *\n     * NOTE: This function will revert if the absolute value of the result does not fit in a `uint256`.\n     */\n    function tryParseInt(string memory input) internal pure returns (bool success, int256 value) {\n        return _tryParseIntUncheckedBounds(input, 0, bytes(input).length);\n    }\n\n    uint256 private constant ABS_MIN_INT256 = 2 ** 255;\n\n    /**\n     * @dev Variant of {parseInt-string-uint256-uint256} that returns false if the parsing fails because of an invalid\n     * character or if the result does not fit in a `int256`.\n     *\n     * NOTE: This function will revert if the absolute value of the result does not fit in a `uint256`.\n     */\n    function tryParseInt(\n        string memory input,\n        uint256 begin,\n        uint256 end\n    ) internal pure returns (bool success, int256 value) {\n        if (end > bytes(input).length || begin > end) return (false, 0);\n        return _tryParseIntUncheckedBounds(input, begin, end);\n    }\n\n    /**\n     * @dev Implementation of {tryParseInt-string-uint256-uint256} that does not check bounds. Caller should make sure that\n     * `begin <= end <= input.length`. Other inputs would result in undefined behavior.\n     */\n    function _tryParseIntUncheckedBounds(\n        string memory input,\n        uint256 begin,\n        uint256 end\n    ) private pure returns (bool success, int256 value) {\n        bytes memory buffer = bytes(input);\n\n        // Check presence of a negative sign.\n        bytes1 sign = begin == end ? bytes1(0) : bytes1(_unsafeReadBytesOffset(buffer, begin)); // don't do out-of-bound (possibly unsafe) read if sub-string is empty\n        bool positiveSign = sign == bytes1(\"+\");\n        bool negativeSign = sign == bytes1(\"-\");\n        uint256 offset = (positiveSign || negativeSign).toUint();\n\n        (bool absSuccess, uint256 absValue) = tryParseUint(input, begin + offset, end);\n\n        if (absSuccess && absValue < ABS_MIN_INT256) {\n            return (true, negativeSign ? -int256(absValue) : int256(absValue));\n        } else if (absSuccess && negativeSign && absValue == ABS_MIN_INT256) {\n            return (true, type(int256).min);\n        } else return (false, 0);\n    }\n\n    /**\n     * @dev Parse a hexadecimal string (with or without \"0x\" prefix), and returns the value as a `uint256`.\n     *\n     * Requirements:\n     * - The string must be formatted as `(0x)?[0-9a-fA-F]*`\n     * - The result must fit in an `uint256` type.\n     */\n    function parseHexUint(string memory input) internal pure returns (uint256) {\n        return parseHexUint(input, 0, bytes(input).length);\n    }\n\n    /**\n     * @dev Variant of {parseHexUint-string} that parses a substring of `input` located between position `begin` (included) and\n     * `end` (excluded).\n     *\n     * Requirements:\n     * - The substring must be formatted as `(0x)?[0-9a-fA-F]*`\n     * - The result must fit in an `uint256` type.\n     */\n    function parseHexUint(string memory input, uint256 begin, uint256 end) internal pure returns (uint256) {\n        (bool success, uint256 value) = tryParseHexUint(input, begin, end);\n        if (!success) revert StringsInvalidChar();\n        return value;\n    }\n\n    /**\n     * @dev Variant of {parseHexUint-string} that returns false if the parsing fails because of an invalid character.\n     *\n     * NOTE: This function will revert if the result does not fit in a `uint256`.\n     */\n    function tryParseHexUint(string memory input) internal pure returns (bool success, uint256 value) {\n        return _tryParseHexUintUncheckedBounds(input, 0, bytes(input).length);\n    }\n\n    /**\n     * @dev Variant of {parseHexUint-string-uint256-uint256} that returns false if the parsing fails because of an\n     * invalid character.\n     *\n     * NOTE: This function will revert if the result does not fit in a `uint256`.\n     */\n    function tryParseHexUint(\n        string memory input,\n        uint256 begin,\n        uint256 end\n    ) internal pure returns (bool success, uint256 value) {\n        if (end > bytes(input).length || begin > end) return (false, 0);\n        return _tryParseHexUintUncheckedBounds(input, begin, end);\n    }\n\n    /**\n     * @dev Implementation of {tryParseHexUint-string-uint256-uint256} that does not check bounds. Caller should make sure that\n     * `begin <= end <= input.length`. Other inputs would result in undefined behavior.\n     */\n    function _tryParseHexUintUncheckedBounds(\n        string memory input,\n        uint256 begin,\n        uint256 end\n    ) private pure returns (bool success, uint256 value) {\n        bytes memory buffer = bytes(input);\n\n        // skip 0x prefix if present\n        bool hasPrefix = (end > begin + 1) && bytes2(_unsafeReadBytesOffset(buffer, begin)) == bytes2(\"0x\"); // don't do out-of-bound (possibly unsafe) read if sub-string is empty\n        uint256 offset = hasPrefix.toUint() * 2;\n\n        uint256 result = 0;\n        for (uint256 i = begin + offset; i < end; ++i) {\n            uint8 chr = _tryParseChr(bytes1(_unsafeReadBytesOffset(buffer, i)));\n            if (chr > 15) return (false, 0);\n            result *= 16;\n            unchecked {\n                // Multiplying by 16 is equivalent to a shift of 4 bits (with additional overflow check).\n                // This guarantees that adding a value < 16 will not cause an overflow, hence the unchecked.\n                result += chr;\n            }\n        }\n        return (true, result);\n    }\n\n    /**\n     * @dev Parse a hexadecimal string (with or without \"0x\" prefix), and returns the value as an `address`.\n     *\n     * Requirements:\n     * - The string must be formatted as `(0x)?[0-9a-fA-F]{40}`\n     */\n    function parseAddress(string memory input) internal pure returns (address) {\n        return parseAddress(input, 0, bytes(input).length);\n    }\n\n    /**\n     * @dev Variant of {parseAddress-string} that parses a substring of `input` located between position `begin` (included) and\n     * `end` (excluded).\n     *\n     * Requirements:\n     * - The substring must be formatted as `(0x)?[0-9a-fA-F]{40}`\n     */\n    function parseAddress(string memory input, uint256 begin, uint256 end) internal pure returns (address) {\n        (bool success, address value) = tryParseAddress(input, begin, end);\n        if (!success) revert StringsInvalidAddressFormat();\n        return value;\n    }\n\n    /**\n     * @dev Variant of {parseAddress-string} that returns false if the parsing fails because the input is not a properly\n     * formatted address. See {parseAddress-string} requirements.\n     */\n    function tryParseAddress(string memory input) internal pure returns (bool success, address value) {\n        return tryParseAddress(input, 0, bytes(input).length);\n    }\n\n    /**\n     * @dev Variant of {parseAddress-string-uint256-uint256} that returns false if the parsing fails because input is not a properly\n     * formatted address. See {parseAddress-string-uint256-uint256} requirements.\n     */\n    function tryParseAddress(\n        string memory input,\n        uint256 begin,\n        uint256 end\n    ) internal pure returns (bool success, address value) {\n        if (end > bytes(input).length || begin > end) return (false, address(0));\n\n        bool hasPrefix = (end > begin + 1) && bytes2(_unsafeReadBytesOffset(bytes(input), begin)) == bytes2(\"0x\"); // don't do out-of-bound (possibly unsafe) read if sub-string is empty\n        uint256 expectedLength = 40 + hasPrefix.toUint() * 2;\n\n        // check that input is the correct length\n        if (end - begin == expectedLength) {\n            // length guarantees that this does not overflow, and value is at most type(uint160).max\n            (bool s, uint256 v) = _tryParseHexUintUncheckedBounds(input, begin, end);\n            return (s, address(uint160(v)));\n        } else {\n            return (false, address(0));\n        }\n    }\n\n    function _tryParseChr(bytes1 chr) private pure returns (uint8) {\n        uint8 value = uint8(chr);\n\n        // Try to parse `chr`:\n        // - Case 1: [0-9]\n        // - Case 2: [a-f]\n        // - Case 3: [A-F]\n        // - otherwise not supported\n        unchecked {\n            if (value > 47 && value < 58) value -= 48;\n            else if (value > 96 && value < 103) value -= 87;\n            else if (value > 64 && value < 71) value -= 55;\n            else return type(uint8).max;\n        }\n\n        return value;\n    }\n\n    /**\n     * @dev Escape special characters in JSON strings. This can be useful to prevent JSON injection in NFT metadata.\n     *\n     * WARNING: This function should only be used in double quoted JSON strings. Single quotes are not escaped.\n     *\n     * NOTE: This function escapes all unicode characters, and not just the ones in ranges defined in section 2.5 of\n     * RFC-4627 (U+0000 to U+001F, U+0022 and U+005C). ECMAScript's `JSON.parse` does recover escaped unicode\n     * characters that are not in this range, but other tooling may provide different results.\n     */\n    function escapeJSON(string memory input) internal pure returns (string memory) {\n        bytes memory buffer = bytes(input);\n        bytes memory output = new bytes(2 * buffer.length); // worst case scenario\n        uint256 outputLength = 0;\n\n        for (uint256 i; i < buffer.length; ++i) {\n            bytes1 char = bytes1(_unsafeReadBytesOffset(buffer, i));\n            if (((SPECIAL_CHARS_LOOKUP & (1 << uint8(char))) != 0)) {\n                output[outputLength++] = \"\\\\\";\n                if (char == 0x08) output[outputLength++] = \"b\";\n                else if (char == 0x09) output[outputLength++] = \"t\";\n                else if (char == 0x0a) output[outputLength++] = \"n\";\n                else if (char == 0x0c) output[outputLength++] = \"f\";\n                else if (char == 0x0d) output[outputLength++] = \"r\";\n                else if (char == 0x5c) output[outputLength++] = \"\\\\\";\n                else if (char == 0x22) {\n                    // solhint-disable-next-line quotes\n                    output[outputLength++] = '\"';\n                }\n            } else {\n                output[outputLength++] = char;\n            }\n        }\n        // write the actual length and deallocate unused memory\n        assembly (\"memory-safe\") {\n            mstore(output, outputLength)\n            mstore(0x40, add(output, shl(5, shr(5, add(outputLength, 63)))))\n        }\n\n        return string(output);\n    }\n\n    /**\n     * @dev Reads a bytes32 from a bytes array without bounds checking.\n     *\n     * NOTE: making this function internal would mean it could be used with memory unsafe offset, and marking the\n     * assembly block as such would prevent some optimizations.\n     */\n    function _unsafeReadBytesOffset(bytes memory buffer, uint256 offset) private pure returns (bytes32 value) {\n        // This is not memory safe in the general case, but all calls to this private function are within bounds.\n        assembly (\"memory-safe\") {\n            value := mload(add(add(buffer, 0x20), offset))\n        }\n    }\n}\n"},"lib/openzeppelin-contracts/contracts/access/Ownable.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)\n\npragma solidity ^0.8.20;\n\nimport {Context} from \"../utils/Context.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * The initial owner is set to the address provided by the deployer. This can\n * later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract Ownable is Context {\n    address private _owner;\n\n    /**\n     * @dev The caller account is not authorized to perform an operation.\n     */\n    error OwnableUnauthorizedAccount(address account);\n\n    /**\n     * @dev The owner is not a valid owner account. (eg. `address(0)`)\n     */\n    error OwnableInvalidOwner(address owner);\n\n    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n    /**\n     * @dev Initializes the contract setting the address provided by the deployer as the initial owner.\n     */\n    constructor(address initialOwner) {\n        if (initialOwner == address(0)) {\n            revert OwnableInvalidOwner(address(0));\n        }\n        _transferOwnership(initialOwner);\n    }\n\n    /**\n     * @dev Throws if called by any account other than the owner.\n     */\n    modifier onlyOwner() {\n        _checkOwner();\n        _;\n    }\n\n    /**\n     * @dev Returns the address of the current owner.\n     */\n    function owner() public view virtual returns (address) {\n        return _owner;\n    }\n\n    /**\n     * @dev Throws if the sender is not the owner.\n     */\n    function _checkOwner() internal view virtual {\n        if (owner() != _msgSender()) {\n            revert OwnableUnauthorizedAccount(_msgSender());\n        }\n    }\n\n    /**\n     * @dev Leaves the contract without owner. It will not be possible to call\n     * `onlyOwner` functions. Can only be called by the current owner.\n     *\n     * NOTE: Renouncing ownership will leave the contract without an owner,\n     * thereby disabling any functionality that is only available to the owner.\n     */\n    function renounceOwnership() public virtual onlyOwner {\n        _transferOwnership(address(0));\n    }\n\n    /**\n     * @dev Transfers ownership of the contract to a new account (`newOwner`).\n     * Can only be called by the current owner.\n     */\n    function transferOwnership(address newOwner) public virtual onlyOwner {\n        if (newOwner == address(0)) {\n            revert OwnableInvalidOwner(address(0));\n        }\n        _transferOwnership(newOwner);\n    }\n\n    /**\n     * @dev Transfers ownership of the contract to a new account (`newOwner`).\n     * Internal function without access restriction.\n     */\n    function _transferOwnership(address newOwner) internal virtual {\n        address oldOwner = _owner;\n        _owner = newOwner;\n        emit OwnershipTransferred(oldOwner, newOwner);\n    }\n}\n"},"lib/openzeppelin-contracts/contracts/utils/Pausable.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (utils/Pausable.sol)\n\npragma solidity ^0.8.20;\n\nimport {Context} from \"../utils/Context.sol\";\n\n/**\n * @dev Contract module which allows children to implement an emergency stop\n * mechanism that can be triggered by an authorized account.\n *\n * This module is used through inheritance. It will make available the\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\n * the functions of your contract. Note that they will not be pausable by\n * simply including this module, only once the modifiers are put in place.\n */\nabstract contract Pausable is Context {\n    bool private _paused;\n\n    /**\n     * @dev Emitted when the pause is triggered by `account`.\n     */\n    event Paused(address account);\n\n    /**\n     * @dev Emitted when the pause is lifted by `account`.\n     */\n    event Unpaused(address account);\n\n    /**\n     * @dev The operation failed because the contract is paused.\n     */\n    error EnforcedPause();\n\n    /**\n     * @dev The operation failed because the contract is not paused.\n     */\n    error ExpectedPause();\n\n    /**\n     * @dev Modifier to make a function callable only when the contract is not paused.\n     *\n     * Requirements:\n     *\n     * - The contract must not be paused.\n     */\n    modifier whenNotPaused() {\n        _requireNotPaused();\n        _;\n    }\n\n    /**\n     * @dev Modifier to make a function callable only when the contract is paused.\n     *\n     * Requirements:\n     *\n     * - The contract must be paused.\n     */\n    modifier whenPaused() {\n        _requirePaused();\n        _;\n    }\n\n    /**\n     * @dev Returns true if the contract is paused, and false otherwise.\n     */\n    function paused() public view virtual returns (bool) {\n        return _paused;\n    }\n\n    /**\n     * @dev Throws if the contract is paused.\n     */\n    function _requireNotPaused() internal view virtual {\n        if (paused()) {\n            revert EnforcedPause();\n        }\n    }\n\n    /**\n     * @dev Throws if the contract is not paused.\n     */\n    function _requirePaused() internal view virtual {\n        if (!paused()) {\n            revert ExpectedPause();\n        }\n    }\n\n    /**\n     * @dev Triggers stopped state.\n     *\n     * Requirements:\n     *\n     * - The contract must not be paused.\n     */\n    function _pause() internal virtual whenNotPaused {\n        _paused = true;\n        emit Paused(_msgSender());\n    }\n\n    /**\n     * @dev Returns to normal state.\n     *\n     * Requirements:\n     *\n     * - The contract must be paused.\n     */\n    function _unpause() internal virtual whenPaused {\n        _paused = false;\n        emit Unpaused(_msgSender());\n    }\n}\n"},"lib/flash-loan-router/src/interface/IFlashLoanRouter.sol":{"content":"// SPDX-License-Identifier: GPL-3.0-or-later\npragma solidity ^0.8;\n\nimport {Loan} from \"../library/Loan.sol\";\nimport {ICowAuthentication} from \"../vendored/ICowAuthentication.sol\";\nimport {ICowSettlement} from \"./ICowSettlement.sol\";\n\n/// @title Flash-loan Router Interface\n/// @author CoW DAO developers\n/// @notice Interface describing the functions available for interacting with\n/// the flash-loan router.\n/// @dev The flash loan router is intended to be a solver for CoW Protocol.\ninterface IFlashLoanRouter {\n    /// @notice Request all flash loan specified in the input and, after that,\n    /// executes the specified settlement.\n    /// @dev It's the solver's responsibility to make sure the loan is specified\n    /// correctly. The router contract offers no validation of the fact that\n    /// the flash loan proceeds are available for spending.\n    ///\n    /// The repayment of a flash loan is different based on the protocol. For\n    /// example, some expect to retrieve the funds from this borrower contract\n    /// through `transferFrom`, while other check the lender balance is as\n    /// expected after the flash loan has been processed. The executed\n    /// settlement must be built to cater to the needs of the specified lender.\n    ///\n    /// A settlement can be executed at most once in a call. The settlement\n    /// data cannot change during execution. Only the settle function can be\n    /// called. All of this is also the case if the lender is untrusted.\n    /// @param loans The list of flash loans to be requested before the\n    /// settlement is executed. The loans will be requested in the specified\n    /// order.\n    /// @param settlement The ABI-encoded bytes for a call to `settle()` (as\n    /// in `abi.encodeCall`).\n    function flashLoanAndSettle(Loan.Data[] calldata loans, bytes calldata settlement) external;\n\n    /// @notice Once a borrower has received the proceeds of a flash loan, it\n    /// calls back the router through this function.\n    /// @param encodedLoansWithSettlement The data the borrower received when\n    /// it was called, without any modification.\n    function borrowerCallBack(bytes calldata encodedLoansWithSettlement) external;\n\n    /// @notice The settlement contract supported by this router. This is the\n    /// contract that will be called when the settlement is executed.\n    function settlementContract() external view returns (ICowSettlement);\n\n    /// @notice The settlement authenticator contract for CoW Protocol. This\n    /// contract determines who the solvers for CoW Protocol are.\n    function settlementAuthentication() external view returns (ICowAuthentication);\n}\n"},"lib/openzeppelin-contracts/contracts/utils/math/Math.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (utils/math/Math.sol)\n\npragma solidity ^0.8.20;\n\nimport {Panic} from \"../Panic.sol\";\nimport {SafeCast} from \"./SafeCast.sol\";\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary Math {\n    enum Rounding {\n        Floor, // Toward negative infinity\n        Ceil, // Toward positive infinity\n        Trunc, // Toward zero\n        Expand // Away from zero\n    }\n\n    /**\n     * @dev Return the 512-bit addition of two uint256.\n     *\n     * The result is stored in two 256 variables such that sum = high * 2²⁵⁶ + low.\n     */\n    function add512(uint256 a, uint256 b) internal pure returns (uint256 high, uint256 low) {\n        assembly (\"memory-safe\") {\n            low := add(a, b)\n            high := lt(low, a)\n        }\n    }\n\n    /**\n     * @dev Return the 512-bit multiplication of two uint256.\n     *\n     * The result is stored in two 256 variables such that product = high * 2²⁵⁶ + low.\n     */\n    function mul512(uint256 a, uint256 b) internal pure returns (uint256 high, uint256 low) {\n        // 512-bit multiply [high low] = x * y. Compute the product mod 2²⁵⁶ and mod 2²⁵⁶ - 1, then use\n        // the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\n        // variables such that product = high * 2²⁵⁶ + low.\n        assembly (\"memory-safe\") {\n            let mm := mulmod(a, b, not(0))\n            low := mul(a, b)\n            high := sub(sub(mm, low), lt(mm, low))\n        }\n    }\n\n    /**\n     * @dev Returns the addition of two unsigned integers, with a success flag (no overflow).\n     */\n    function tryAdd(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n        unchecked {\n            uint256 c = a + b;\n            success = c >= a;\n            result = c * SafeCast.toUint(success);\n        }\n    }\n\n    /**\n     * @dev Returns the subtraction of two unsigned integers, with a success flag (no overflow).\n     */\n    function trySub(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n        unchecked {\n            uint256 c = a - b;\n            success = c <= a;\n            result = c * SafeCast.toUint(success);\n        }\n    }\n\n    /**\n     * @dev Returns the multiplication of two unsigned integers, with a success flag (no overflow).\n     */\n    function tryMul(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n        unchecked {\n            uint256 c = a * b;\n            assembly (\"memory-safe\") {\n                // Only true when the multiplication doesn't overflow\n                // (c / a == b) || (a == 0)\n                success := or(eq(div(c, a), b), iszero(a))\n            }\n            // equivalent to: success ? c : 0\n            result = c * SafeCast.toUint(success);\n        }\n    }\n\n    /**\n     * @dev Returns the division of two unsigned integers, with a success flag (no division by zero).\n     */\n    function tryDiv(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n        unchecked {\n            success = b > 0;\n            assembly (\"memory-safe\") {\n                // The `DIV` opcode returns zero when the denominator is 0.\n                result := div(a, b)\n            }\n        }\n    }\n\n    /**\n     * @dev Returns the remainder of dividing two unsigned integers, with a success flag (no division by zero).\n     */\n    function tryMod(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n        unchecked {\n            success = b > 0;\n            assembly (\"memory-safe\") {\n                // The `MOD` opcode returns zero when the denominator is 0.\n                result := mod(a, b)\n            }\n        }\n    }\n\n    /**\n     * @dev Unsigned saturating addition, bounds to `2²⁵⁶ - 1` instead of overflowing.\n     */\n    function saturatingAdd(uint256 a, uint256 b) internal pure returns (uint256) {\n        (bool success, uint256 result) = tryAdd(a, b);\n        return ternary(success, result, type(uint256).max);\n    }\n\n    /**\n     * @dev Unsigned saturating subtraction, bounds to zero instead of overflowing.\n     */\n    function saturatingSub(uint256 a, uint256 b) internal pure returns (uint256) {\n        (, uint256 result) = trySub(a, b);\n        return result;\n    }\n\n    /**\n     * @dev Unsigned saturating multiplication, bounds to `2²⁵⁶ - 1` instead of overflowing.\n     */\n    function saturatingMul(uint256 a, uint256 b) internal pure returns (uint256) {\n        (bool success, uint256 result) = tryMul(a, b);\n        return ternary(success, result, type(uint256).max);\n    }\n\n    /**\n     * @dev Branchless ternary evaluation for `a ? b : c`. Gas costs are constant.\n     *\n     * IMPORTANT: This function may reduce bytecode size and consume less gas when used standalone.\n     * However, the compiler may optimize Solidity ternary operations (i.e. `a ? b : c`) to only compute\n     * one branch when needed, making this function more expensive.\n     */\n    function ternary(bool condition, uint256 a, uint256 b) internal pure returns (uint256) {\n        unchecked {\n            // branchless ternary works because:\n            // b ^ (a ^ b) == a\n            // b ^ 0 == b\n            return b ^ ((a ^ b) * SafeCast.toUint(condition));\n        }\n    }\n\n    /**\n     * @dev Returns the largest of two numbers.\n     */\n    function max(uint256 a, uint256 b) internal pure returns (uint256) {\n        return ternary(a > b, a, b);\n    }\n\n    /**\n     * @dev Returns the smallest of two numbers.\n     */\n    function min(uint256 a, uint256 b) internal pure returns (uint256) {\n        return ternary(a < b, a, b);\n    }\n\n    /**\n     * @dev Returns the average of two numbers. The result is rounded towards\n     * zero.\n     */\n    function average(uint256 a, uint256 b) internal pure returns (uint256) {\n        // (a + b) / 2 can overflow.\n        return (a & b) + (a ^ b) / 2;\n    }\n\n    /**\n     * @dev Returns the ceiling of the division of two numbers.\n     *\n     * This differs from standard division with `/` in that it rounds towards infinity instead\n     * of rounding towards zero.\n     */\n    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n        if (b == 0) {\n            // Guarantee the same behavior as in a regular Solidity division.\n            Panic.panic(Panic.DIVISION_BY_ZERO);\n        }\n\n        // The following calculation ensures accurate ceiling division without overflow.\n        // Since a is non-zero, (a - 1) / b will not overflow.\n        // The largest possible result occurs when (a - 1) / b is type(uint256).max,\n        // but the largest value we can obtain is type(uint256).max - 1, which happens\n        // when a = type(uint256).max and b = 1.\n        unchecked {\n            return SafeCast.toUint(a > 0) * ((a - 1) / b + 1);\n        }\n    }\n\n    /**\n     * @dev Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or\n     * denominator == 0.\n     *\n     * Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by\n     * Uniswap Labs also under MIT license.\n     */\n    function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\n        unchecked {\n            (uint256 high, uint256 low) = mul512(x, y);\n\n            // Handle non-overflow cases, 256 by 256 division.\n            if (high == 0) {\n                // Solidity will revert if denominator == 0, unlike the div opcode on its own.\n                // The surrounding unchecked block does not change this fact.\n                // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\n                return low / denominator;\n            }\n\n            // Make sure the result is less than 2²⁵⁶. Also prevents denominator == 0.\n            if (denominator <= high) {\n                Panic.panic(ternary(denominator == 0, Panic.DIVISION_BY_ZERO, Panic.UNDER_OVERFLOW));\n            }\n\n            ///////////////////////////////////////////////\n            // 512 by 256 division.\n            ///////////////////////////////////////////////\n\n            // Make division exact by subtracting the remainder from [high low].\n            uint256 remainder;\n            assembly (\"memory-safe\") {\n                // Compute remainder using mulmod.\n                remainder := mulmod(x, y, denominator)\n\n                // Subtract 256 bit number from 512 bit number.\n                high := sub(high, gt(remainder, low))\n                low := sub(low, remainder)\n            }\n\n            // Factor powers of two out of denominator and compute largest power of two divisor of denominator.\n            // Always >= 1. See https://cs.stackexchange.com/q/138556/92363.\n\n            uint256 twos = denominator & (0 - denominator);\n            assembly (\"memory-safe\") {\n                // Divide denominator by twos.\n                denominator := div(denominator, twos)\n\n                // Divide [high low] by twos.\n                low := div(low, twos)\n\n                // Flip twos such that it is 2²⁵⁶ / twos. If twos is zero, then it becomes one.\n                twos := add(div(sub(0, twos), twos), 1)\n            }\n\n            // Shift in bits from high into low.\n            low |= high * twos;\n\n            // Invert denominator mod 2²⁵⁶. Now that denominator is an odd number, it has an inverse modulo 2²⁵⁶ such\n            // that denominator * inv ≡ 1 mod 2²⁵⁶. Compute the inverse by starting with a seed that is correct for\n            // four bits. That is, denominator * inv ≡ 1 mod 2⁴.\n            uint256 inverse = (3 * denominator) ^ 2;\n\n            // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also\n            // works in modular arithmetic, doubling the correct bits in each step.\n            inverse *= 2 - denominator * inverse; // inverse mod 2⁸\n            inverse *= 2 - denominator * inverse; // inverse mod 2¹⁶\n            inverse *= 2 - denominator * inverse; // inverse mod 2³²\n            inverse *= 2 - denominator * inverse; // inverse mod 2⁶⁴\n            inverse *= 2 - denominator * inverse; // inverse mod 2¹²⁸\n            inverse *= 2 - denominator * inverse; // inverse mod 2²⁵⁶\n\n            // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\n            // This will give us the correct result modulo 2²⁵⁶. Since the preconditions guarantee that the outcome is\n            // less than 2²⁵⁶, this is the final result. We don't need to compute the high bits of the result and high\n            // is no longer required.\n            result = low * inverse;\n            return result;\n        }\n    }\n\n    /**\n     * @dev Calculates x * y / denominator with full precision, following the selected rounding direction.\n     */\n    function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\n        return mulDiv(x, y, denominator) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0);\n    }\n\n    /**\n     * @dev Calculates floor(x * y >> n) with full precision. Throws if result overflows a uint256.\n     */\n    function mulShr(uint256 x, uint256 y, uint8 n) internal pure returns (uint256 result) {\n        unchecked {\n            (uint256 high, uint256 low) = mul512(x, y);\n            if (high >= 1 << n) {\n                Panic.panic(Panic.UNDER_OVERFLOW);\n            }\n            return (high << (256 - n)) | (low >> n);\n        }\n    }\n\n    /**\n     * @dev Calculates x * y >> n with full precision, following the selected rounding direction.\n     */\n    function mulShr(uint256 x, uint256 y, uint8 n, Rounding rounding) internal pure returns (uint256) {\n        return mulShr(x, y, n) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, 1 << n) > 0);\n    }\n\n    /**\n     * @dev Calculate the modular multiplicative inverse of a number in Z/nZ.\n     *\n     * If n is a prime, then Z/nZ is a field. In that case all elements are inversible, except 0.\n     * If n is not a prime, then Z/nZ is not a field, and some elements might not be inversible.\n     *\n     * If the input value is not inversible, 0 is returned.\n     *\n     * NOTE: If you know for sure that n is (big) a prime, it may be cheaper to use Fermat's little theorem and get the\n     * inverse using `Math.modExp(a, n - 2, n)`. See {invModPrime}.\n     */\n    function invMod(uint256 a, uint256 n) internal pure returns (uint256) {\n        unchecked {\n            if (n == 0) return 0;\n\n            // The inverse modulo is calculated using the Extended Euclidean Algorithm (iterative version)\n            // Used to compute integers x and y such that: ax + ny = gcd(a, n).\n            // When the gcd is 1, then the inverse of a modulo n exists and it's x.\n            // ax + ny = 1\n            // ax = 1 + (-y)n\n            // ax ≡ 1 (mod n) # x is the inverse of a modulo n\n\n            // If the remainder is 0 the gcd is n right away.\n            uint256 remainder = a % n;\n            uint256 gcd = n;\n\n            // Therefore the initial coefficients are:\n            // ax + ny = gcd(a, n) = n\n            // 0a + 1n = n\n            int256 x = 0;\n            int256 y = 1;\n\n            while (remainder != 0) {\n                uint256 quotient = gcd / remainder;\n\n                (gcd, remainder) = (\n                    // The old remainder is the next gcd to try.\n                    remainder,\n                    // Compute the next remainder.\n                    // Can't overflow given that (a % gcd) * (gcd // (a % gcd)) <= gcd\n                    // where gcd is at most n (capped to type(uint256).max)\n                    gcd - remainder * quotient\n                );\n\n                (x, y) = (\n                    // Increment the coefficient of a.\n                    y,\n                    // Decrement the coefficient of n.\n                    // Can overflow, but the result is casted to uint256 so that the\n                    // next value of y is \"wrapped around\" to a value between 0 and n - 1.\n                    x - y * int256(quotient)\n                );\n            }\n\n            if (gcd != 1) return 0; // No inverse exists.\n            return ternary(x < 0, n - uint256(-x), uint256(x)); // Wrap the result if it's negative.\n        }\n    }\n\n    /**\n     * @dev Variant of {invMod}. More efficient, but only works if `p` is known to be a prime greater than `2`.\n     *\n     * From https://en.wikipedia.org/wiki/Fermat%27s_little_theorem[Fermat's little theorem], we know that if p is\n     * prime, then `a**(p-1) ≡ 1 mod p`. As a consequence, we have `a * a**(p-2) ≡ 1 mod p`, which means that\n     * `a**(p-2)` is the modular multiplicative inverse of a in Fp.\n     *\n     * NOTE: this function does NOT check that `p` is a prime greater than `2`.\n     */\n    function invModPrime(uint256 a, uint256 p) internal view returns (uint256) {\n        unchecked {\n            return Math.modExp(a, p - 2, p);\n        }\n    }\n\n    /**\n     * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m)\n     *\n     * Requirements:\n     * - modulus can't be zero\n     * - underlying staticcall to precompile must succeed\n     *\n     * IMPORTANT: The result is only valid if the underlying call succeeds. When using this function, make\n     * sure the chain you're using it on supports the precompiled contract for modular exponentiation\n     * at address 0x05 as specified in https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise,\n     * the underlying function will succeed given the lack of a revert, but the result may be incorrectly\n     * interpreted as 0.\n     */\n    function modExp(uint256 b, uint256 e, uint256 m) internal view returns (uint256) {\n        (bool success, uint256 result) = tryModExp(b, e, m);\n        if (!success) {\n            Panic.panic(Panic.DIVISION_BY_ZERO);\n        }\n        return result;\n    }\n\n    /**\n     * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m).\n     * It includes a success flag indicating if the operation succeeded. Operation will be marked as failed if trying\n     * to operate modulo 0 or if the underlying precompile reverted.\n     *\n     * IMPORTANT: The result is only valid if the success flag is true. When using this function, make sure the chain\n     * you're using it on supports the precompiled contract for modular exponentiation at address 0x05 as specified in\n     * https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise, the underlying function will succeed given the lack\n     * of a revert, but the result may be incorrectly interpreted as 0.\n     */\n    function tryModExp(uint256 b, uint256 e, uint256 m) internal view returns (bool success, uint256 result) {\n        if (m == 0) return (false, 0);\n        assembly (\"memory-safe\") {\n            let ptr := mload(0x40)\n            // | Offset    | Content    | Content (Hex)                                                      |\n            // |-----------|------------|--------------------------------------------------------------------|\n            // | 0x00:0x1f | size of b  | 0x0000000000000000000000000000000000000000000000000000000000000020 |\n            // | 0x20:0x3f | size of e  | 0x0000000000000000000000000000000000000000000000000000000000000020 |\n            // | 0x40:0x5f | size of m  | 0x0000000000000000000000000000000000000000000000000000000000000020 |\n            // | 0x60:0x7f | value of b | 0x<.............................................................b> |\n            // | 0x80:0x9f | value of e | 0x<.............................................................e> |\n            // | 0xa0:0xbf | value of m | 0x<.............................................................m> |\n            mstore(ptr, 0x20)\n            mstore(add(ptr, 0x20), 0x20)\n            mstore(add(ptr, 0x40), 0x20)\n            mstore(add(ptr, 0x60), b)\n            mstore(add(ptr, 0x80), e)\n            mstore(add(ptr, 0xa0), m)\n\n            // Given the result < m, it's guaranteed to fit in 32 bytes,\n            // so we can use the memory scratch space located at offset 0.\n            success := staticcall(gas(), 0x05, ptr, 0xc0, 0x00, 0x20)\n            result := mload(0x00)\n        }\n    }\n\n    /**\n     * @dev Variant of {modExp} that supports inputs of arbitrary length.\n     */\n    function modExp(bytes memory b, bytes memory e, bytes memory m) internal view returns (bytes memory) {\n        (bool success, bytes memory result) = tryModExp(b, e, m);\n        if (!success) {\n            Panic.panic(Panic.DIVISION_BY_ZERO);\n        }\n        return result;\n    }\n\n    /**\n     * @dev Variant of {tryModExp} that supports inputs of arbitrary length.\n     */\n    function tryModExp(\n        bytes memory b,\n        bytes memory e,\n        bytes memory m\n    ) internal view returns (bool success, bytes memory result) {\n        if (_zeroBytes(m)) return (false, new bytes(0));\n\n        uint256 mLen = m.length;\n\n        // Encode call args in result and move the free memory pointer\n        result = abi.encodePacked(b.length, e.length, mLen, b, e, m);\n\n        assembly (\"memory-safe\") {\n            let dataPtr := add(result, 0x20)\n            // Write result on top of args to avoid allocating extra memory.\n            success := staticcall(gas(), 0x05, dataPtr, mload(result), dataPtr, mLen)\n            // Overwrite the length.\n            // result.length > returndatasize() is guaranteed because returndatasize() == m.length\n            mstore(result, mLen)\n            // Set the memory pointer after the returned data.\n            mstore(0x40, add(dataPtr, mLen))\n        }\n    }\n\n    /**\n     * @dev Returns whether the provided byte array is zero.\n     */\n    function _zeroBytes(bytes memory byteArray) private pure returns (bool) {\n        for (uint256 i = 0; i < byteArray.length; ++i) {\n            if (byteArray[i] != 0) {\n                return false;\n            }\n        }\n        return true;\n    }\n\n    /**\n     * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded\n     * towards zero.\n     *\n     * This method is based on Newton's method for computing square roots; the algorithm is restricted to only\n     * using integer operations.\n     */\n    function sqrt(uint256 a) internal pure returns (uint256) {\n        unchecked {\n            // Take care of easy edge cases when a == 0 or a == 1\n            if (a <= 1) {\n                return a;\n            }\n\n            // In this function, we use Newton's method to get a root of `f(x) := x² - a`. It involves building a\n            // sequence x_n that converges toward sqrt(a). For each iteration x_n, we also define the error between\n            // the current value as `ε_n = | x_n - sqrt(a) |`.\n            //\n            // For our first estimation, we consider `e` the smallest power of 2 which is bigger than the square root\n            // of the target. (i.e. `2**(e-1) ≤ sqrt(a) < 2**e`). We know that `e ≤ 128` because `(2¹²⁸)² = 2²⁵⁶` is\n            // bigger than any uint256.\n            //\n            // By noticing that\n            // `2**(e-1) ≤ sqrt(a) < 2**e → (2**(e-1))² ≤ a < (2**e)² → 2**(2*e-2) ≤ a < 2**(2*e)`\n            // we can deduce that `e - 1` is `log2(a) / 2`. We can thus compute `x_n = 2**(e-1)` using a method similar\n            // to the msb function.\n            uint256 aa = a;\n            uint256 xn = 1;\n\n            if (aa >= (1 << 128)) {\n                aa >>= 128;\n                xn <<= 64;\n            }\n            if (aa >= (1 << 64)) {\n                aa >>= 64;\n                xn <<= 32;\n            }\n            if (aa >= (1 << 32)) {\n                aa >>= 32;\n                xn <<= 16;\n            }\n            if (aa >= (1 << 16)) {\n                aa >>= 16;\n                xn <<= 8;\n            }\n            if (aa >= (1 << 8)) {\n                aa >>= 8;\n                xn <<= 4;\n            }\n            if (aa >= (1 << 4)) {\n                aa >>= 4;\n                xn <<= 2;\n            }\n            if (aa >= (1 << 2)) {\n                xn <<= 1;\n            }\n\n            // We now have x_n such that `x_n = 2**(e-1) ≤ sqrt(a) < 2**e = 2 * x_n`. This implies ε_n ≤ 2**(e-1).\n            //\n            // We can refine our estimation by noticing that the middle of that interval minimizes the error.\n            // If we move x_n to equal 2**(e-1) + 2**(e-2), then we reduce the error to ε_n ≤ 2**(e-2).\n            // This is going to be our x_0 (and ε_0)\n            xn = (3 * xn) >> 1; // ε_0 := | x_0 - sqrt(a) | ≤ 2**(e-2)\n\n            // From here, Newton's method give us:\n            // x_{n+1} = (x_n + a / x_n) / 2\n            //\n            // One should note that:\n            // x_{n+1}² - a = ((x_n + a / x_n) / 2)² - a\n            //              = ((x_n² + a) / (2 * x_n))² - a\n            //              = (x_n⁴ + 2 * a * x_n² + a²) / (4 * x_n²) - a\n            //              = (x_n⁴ + 2 * a * x_n² + a² - 4 * a * x_n²) / (4 * x_n²)\n            //              = (x_n⁴ - 2 * a * x_n² + a²) / (4 * x_n²)\n            //              = (x_n² - a)² / (2 * x_n)²\n            //              = ((x_n² - a) / (2 * x_n))²\n            //              ≥ 0\n            // Which proves that for all n ≥ 1, sqrt(a) ≤ x_n\n            //\n            // This gives us the proof of quadratic convergence of the sequence:\n            // ε_{n+1} = | x_{n+1} - sqrt(a) |\n            //         = | (x_n + a / x_n) / 2 - sqrt(a) |\n            //         = | (x_n² + a - 2*x_n*sqrt(a)) / (2 * x_n) |\n            //         = | (x_n - sqrt(a))² / (2 * x_n) |\n            //         = | ε_n² / (2 * x_n) |\n            //         = ε_n² / | (2 * x_n) |\n            //\n            // For the first iteration, we have a special case where x_0 is known:\n            // ε_1 = ε_0² / | (2 * x_0) |\n            //     ≤ (2**(e-2))² / (2 * (2**(e-1) + 2**(e-2)))\n            //     ≤ 2**(2*e-4) / (3 * 2**(e-1))\n            //     ≤ 2**(e-3) / 3\n            //     ≤ 2**(e-3-log2(3))\n            //     ≤ 2**(e-4.5)\n            //\n            // For the following iterations, we use the fact that, 2**(e-1) ≤ sqrt(a) ≤ x_n:\n            // ε_{n+1} = ε_n² / | (2 * x_n) |\n            //         ≤ (2**(e-k))² / (2 * 2**(e-1))\n            //         ≤ 2**(2*e-2*k) / 2**e\n            //         ≤ 2**(e-2*k)\n            xn = (xn + a / xn) >> 1; // ε_1 := | x_1 - sqrt(a) | ≤ 2**(e-4.5)  -- special case, see above\n            xn = (xn + a / xn) >> 1; // ε_2 := | x_2 - sqrt(a) | ≤ 2**(e-9)    -- general case with k = 4.5\n            xn = (xn + a / xn) >> 1; // ε_3 := | x_3 - sqrt(a) | ≤ 2**(e-18)   -- general case with k = 9\n            xn = (xn + a / xn) >> 1; // ε_4 := | x_4 - sqrt(a) | ≤ 2**(e-36)   -- general case with k = 18\n            xn = (xn + a / xn) >> 1; // ε_5 := | x_5 - sqrt(a) | ≤ 2**(e-72)   -- general case with k = 36\n            xn = (xn + a / xn) >> 1; // ε_6 := | x_6 - sqrt(a) | ≤ 2**(e-144)  -- general case with k = 72\n\n            // Because e ≤ 128 (as discussed during the first estimation phase), we know have reached a precision\n            // ε_6 ≤ 2**(e-144) < 1. Given we're operating on integers, then we can ensure that xn is now either\n            // sqrt(a) or sqrt(a) + 1.\n            return xn - SafeCast.toUint(xn > a / xn);\n        }\n    }\n\n    /**\n     * @dev Calculates sqrt(a), following the selected rounding direction.\n     */\n    function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\n        unchecked {\n            uint256 result = sqrt(a);\n            return result + SafeCast.toUint(unsignedRoundsUp(rounding) && result * result < a);\n        }\n    }\n\n    /**\n     * @dev Return the log in base 2 of a positive value rounded towards zero.\n     * Returns 0 if given 0.\n     */\n    function log2(uint256 x) internal pure returns (uint256 r) {\n        // If value has upper 128 bits set, log2 result is at least 128\n        r = SafeCast.toUint(x > 0xffffffffffffffffffffffffffffffff) << 7;\n        // If upper 64 bits of 128-bit half set, add 64 to result\n        r |= SafeCast.toUint((x >> r) > 0xffffffffffffffff) << 6;\n        // If upper 32 bits of 64-bit half set, add 32 to result\n        r |= SafeCast.toUint((x >> r) > 0xffffffff) << 5;\n        // If upper 16 bits of 32-bit half set, add 16 to result\n        r |= SafeCast.toUint((x >> r) > 0xffff) << 4;\n        // If upper 8 bits of 16-bit half set, add 8 to result\n        r |= SafeCast.toUint((x >> r) > 0xff) << 3;\n        // If upper 4 bits of 8-bit half set, add 4 to result\n        r |= SafeCast.toUint((x >> r) > 0xf) << 2;\n\n        // Shifts value right by the current result and use it as an index into this lookup table:\n        //\n        // | x (4 bits) |  index  | table[index] = MSB position |\n        // |------------|---------|-----------------------------|\n        // |    0000    |    0    |        table[0] = 0         |\n        // |    0001    |    1    |        table[1] = 0         |\n        // |    0010    |    2    |        table[2] = 1         |\n        // |    0011    |    3    |        table[3] = 1         |\n        // |    0100    |    4    |        table[4] = 2         |\n        // |    0101    |    5    |        table[5] = 2         |\n        // |    0110    |    6    |        table[6] = 2         |\n        // |    0111    |    7    |        table[7] = 2         |\n        // |    1000    |    8    |        table[8] = 3         |\n        // |    1001    |    9    |        table[9] = 3         |\n        // |    1010    |   10    |        table[10] = 3        |\n        // |    1011    |   11    |        table[11] = 3        |\n        // |    1100    |   12    |        table[12] = 3        |\n        // |    1101    |   13    |        table[13] = 3        |\n        // |    1110    |   14    |        table[14] = 3        |\n        // |    1111    |   15    |        table[15] = 3        |\n        //\n        // The lookup table is represented as a 32-byte value with the MSB positions for 0-15 in the last 16 bytes.\n        assembly (\"memory-safe\") {\n            r := or(r, byte(shr(r, x), 0x0000010102020202030303030303030300000000000000000000000000000000))\n        }\n    }\n\n    /**\n     * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\n     * Returns 0 if given 0.\n     */\n    function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\n        unchecked {\n            uint256 result = log2(value);\n            return result + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << result < value);\n        }\n    }\n\n    /**\n     * @dev Return the log in base 10 of a positive value rounded towards zero.\n     * Returns 0 if given 0.\n     */\n    function log10(uint256 value) internal pure returns (uint256) {\n        uint256 result = 0;\n        unchecked {\n            if (value >= 10 ** 64) {\n                value /= 10 ** 64;\n                result += 64;\n            }\n            if (value >= 10 ** 32) {\n                value /= 10 ** 32;\n                result += 32;\n            }\n            if (value >= 10 ** 16) {\n                value /= 10 ** 16;\n                result += 16;\n            }\n            if (value >= 10 ** 8) {\n                value /= 10 ** 8;\n                result += 8;\n            }\n            if (value >= 10 ** 4) {\n                value /= 10 ** 4;\n                result += 4;\n            }\n            if (value >= 10 ** 2) {\n                value /= 10 ** 2;\n                result += 2;\n            }\n            if (value >= 10 ** 1) {\n                result += 1;\n            }\n        }\n        return result;\n    }\n\n    /**\n     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n     * Returns 0 if given 0.\n     */\n    function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\n        unchecked {\n            uint256 result = log10(value);\n            return result + SafeCast.toUint(unsignedRoundsUp(rounding) && 10 ** result < value);\n        }\n    }\n\n    /**\n     * @dev Return the log in base 256 of a positive value rounded towards zero.\n     * Returns 0 if given 0.\n     *\n     * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\n     */\n    function log256(uint256 x) internal pure returns (uint256 r) {\n        // If value has upper 128 bits set, log2 result is at least 128\n        r = SafeCast.toUint(x > 0xffffffffffffffffffffffffffffffff) << 7;\n        // If upper 64 bits of 128-bit half set, add 64 to result\n        r |= SafeCast.toUint((x >> r) > 0xffffffffffffffff) << 6;\n        // If upper 32 bits of 64-bit half set, add 32 to result\n        r |= SafeCast.toUint((x >> r) > 0xffffffff) << 5;\n        // If upper 16 bits of 32-bit half set, add 16 to result\n        r |= SafeCast.toUint((x >> r) > 0xffff) << 4;\n        // Add 1 if upper 8 bits of 16-bit half set, and divide accumulated result by 8\n        return (r >> 3) | SafeCast.toUint((x >> r) > 0xff);\n    }\n\n    /**\n     * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\n     * Returns 0 if given 0.\n     */\n    function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\n        unchecked {\n            uint256 result = log256(value);\n            return result + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << (result << 3) < value);\n        }\n    }\n\n    /**\n     * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.\n     */\n    function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {\n        return uint8(rounding) % 2 == 1;\n    }\n}\n"},"lib/flash-loan-router/src/vendored/ICowAuthentication.sol":{"content":"// SPDX-License-Identifier: LGPL-3.0-or-later\n\n// Vendored from CoW DAO contracts with minor modifications:\n// - Formatted code\n// - Changed contract name\n// <https://github.com/cowprotocol/contracts/blob/9c1984b864d0a6703a877a088be6dac56450808c/src/contracts/interfaces/GPv2Authentication.sol>\n\npragma solidity >=0.7.6 <0.9.0;\n\n/// @title Gnosis Protocol v2 Authentication Interface\n/// @author Gnosis Developers\ninterface ICowAuthentication {\n    /// @dev determines whether the provided address is an authenticated solver.\n    /// @param prospectiveSolver the address of prospective solver.\n    /// @return true when prospectiveSolver is an authenticated solver, otherwise false.\n    function isSolver(address prospectiveSolver) external view returns (bool);\n}\n"},"lib/openzeppelin-contracts/contracts/interfaces/IERC20.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC20.sol)\n\npragma solidity >=0.4.16;\n\nimport {IERC20} from \"../token/ERC20/IERC20.sol\";\n"},"lib/openzeppelin-contracts/contracts/utils/StorageSlot.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/StorageSlot.sol)\n// This file was procedurally generated from scripts/generate/templates/StorageSlot.js.\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Library for reading and writing primitive types to specific storage slots.\n *\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\n * This library helps with reading and writing to such slots without the need for inline assembly.\n *\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\n *\n * Example usage to set ERC-1967 implementation slot:\n * ```solidity\n * contract ERC1967 {\n *     // Define the slot. Alternatively, use the SlotDerivation library to derive the slot.\n *     bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n *\n *     function _getImplementation() internal view returns (address) {\n *         return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\n *     }\n *\n *     function _setImplementation(address newImplementation) internal {\n *         require(newImplementation.code.length > 0);\n *         StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\n *     }\n * }\n * ```\n *\n * TIP: Consider using this library along with {SlotDerivation}.\n */\nlibrary StorageSlot {\n    struct AddressSlot {\n        address value;\n    }\n\n    struct BooleanSlot {\n        bool value;\n    }\n\n    struct Bytes32Slot {\n        bytes32 value;\n    }\n\n    struct Uint256Slot {\n        uint256 value;\n    }\n\n    struct Int256Slot {\n        int256 value;\n    }\n\n    struct StringSlot {\n        string value;\n    }\n\n    struct BytesSlot {\n        bytes value;\n    }\n\n    /**\n     * @dev Returns an `AddressSlot` with member `value` located at `slot`.\n     */\n    function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\n        assembly (\"memory-safe\") {\n            r.slot := slot\n        }\n    }\n\n    /**\n     * @dev Returns a `BooleanSlot` with member `value` located at `slot`.\n     */\n    function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\n        assembly (\"memory-safe\") {\n            r.slot := slot\n        }\n    }\n\n    /**\n     * @dev Returns a `Bytes32Slot` with member `value` located at `slot`.\n     */\n    function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\n        assembly (\"memory-safe\") {\n            r.slot := slot\n        }\n    }\n\n    /**\n     * @dev Returns a `Uint256Slot` with member `value` located at `slot`.\n     */\n    function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\n        assembly (\"memory-safe\") {\n            r.slot := slot\n        }\n    }\n\n    /**\n     * @dev Returns a `Int256Slot` with member `value` located at `slot`.\n     */\n    function getInt256Slot(bytes32 slot) internal pure returns (Int256Slot storage r) {\n        assembly (\"memory-safe\") {\n            r.slot := slot\n        }\n    }\n\n    /**\n     * @dev Returns a `StringSlot` with member `value` located at `slot`.\n     */\n    function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) {\n        assembly (\"memory-safe\") {\n            r.slot := slot\n        }\n    }\n\n    /**\n     * @dev Returns an `StringSlot` representation of the string storage pointer `store`.\n     */\n    function getStringSlot(string storage store) internal pure returns (StringSlot storage r) {\n        assembly (\"memory-safe\") {\n            r.slot := store.slot\n        }\n    }\n\n    /**\n     * @dev Returns a `BytesSlot` with member `value` located at `slot`.\n     */\n    function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) {\n        assembly (\"memory-safe\") {\n            r.slot := slot\n        }\n    }\n\n    /**\n     * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`.\n     */\n    function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) {\n        assembly (\"memory-safe\") {\n            r.slot := store.slot\n        }\n    }\n}\n"},"lib/openzeppelin-contracts/contracts/interfaces/IERC165.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.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.1.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/utils/ShortStrings.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (utils/ShortStrings.sol)\n\npragma solidity ^0.8.20;\n\nimport {StorageSlot} from \"./StorageSlot.sol\";\n\n// | string  | 0xAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA   |\n// | length  | 0x                                                              BB |\ntype ShortString is bytes32;\n\n/**\n * @dev This library provides functions to convert short memory strings\n * into a `ShortString` type that can be used as an immutable variable.\n *\n * Strings of arbitrary length can be optimized using this library if\n * they are short enough (up to 31 bytes) by packing them with their\n * length (1 byte) in a single EVM word (32 bytes). Additionally, a\n * fallback mechanism can be used for every other case.\n *\n * Usage example:\n *\n * ```solidity\n * contract Named {\n *     using ShortStrings for *;\n *\n *     ShortString private immutable _name;\n *     string private _nameFallback;\n *\n *     constructor(string memory contractName) {\n *         _name = contractName.toShortStringWithFallback(_nameFallback);\n *     }\n *\n *     function name() external view returns (string memory) {\n *         return _name.toStringWithFallback(_nameFallback);\n *     }\n * }\n * ```\n */\nlibrary ShortStrings {\n    // Used as an identifier for strings longer than 31 bytes.\n    bytes32 private constant FALLBACK_SENTINEL = 0x00000000000000000000000000000000000000000000000000000000000000FF;\n\n    error StringTooLong(string str);\n    error InvalidShortString();\n\n    /**\n     * @dev Encode a string of at most 31 chars into a `ShortString`.\n     *\n     * This will trigger a `StringTooLong` error is the input string is too long.\n     */\n    function toShortString(string memory str) internal pure returns (ShortString) {\n        bytes memory bstr = bytes(str);\n        if (bstr.length > 31) {\n            revert StringTooLong(str);\n        }\n        return ShortString.wrap(bytes32(uint256(bytes32(bstr)) | bstr.length));\n    }\n\n    /**\n     * @dev Decode a `ShortString` back to a \"normal\" string.\n     */\n    function toString(ShortString sstr) internal pure returns (string memory) {\n        uint256 len = byteLength(sstr);\n        // using `new string(len)` would work locally but is not memory safe.\n        string memory str = new string(32);\n        assembly (\"memory-safe\") {\n            mstore(str, len)\n            mstore(add(str, 0x20), sstr)\n        }\n        return str;\n    }\n\n    /**\n     * @dev Return the length of a `ShortString`.\n     */\n    function byteLength(ShortString sstr) internal pure returns (uint256) {\n        uint256 result = uint256(ShortString.unwrap(sstr)) & 0xFF;\n        if (result > 31) {\n            revert InvalidShortString();\n        }\n        return result;\n    }\n\n    /**\n     * @dev Encode a string into a `ShortString`, or write it to storage if it is too long.\n     */\n    function toShortStringWithFallback(string memory value, string storage store) internal returns (ShortString) {\n        if (bytes(value).length < 32) {\n            return toShortString(value);\n        } else {\n            StorageSlot.getStringSlot(store).value = value;\n            return ShortString.wrap(FALLBACK_SENTINEL);\n        }\n    }\n\n    /**\n     * @dev Decode a string that was encoded to `ShortString` or written to storage using {toShortStringWithFallback}.\n     */\n    function toStringWithFallback(ShortString value, string storage store) internal pure returns (string memory) {\n        if (ShortString.unwrap(value) != FALLBACK_SENTINEL) {\n            return toString(value);\n        } else {\n            return store;\n        }\n    }\n\n    /**\n     * @dev Return the length of a string that was encoded to `ShortString` or written to storage using\n     * {toShortStringWithFallback}.\n     *\n     * WARNING: This will return the \"byte length\" of the string. This may not reflect the actual length in terms of\n     * actual characters as the UTF-8 encoding of a single character can span over multiple bytes.\n     */\n    function byteLengthWithFallback(ShortString value, string storage store) internal view returns (uint256) {\n        if (ShortString.unwrap(value) != FALLBACK_SENTINEL) {\n            return byteLength(value);\n        } else {\n            return bytes(store).length;\n        }\n    }\n}\n"},"lib/openzeppelin-contracts/contracts/interfaces/IERC1271.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (interfaces/IERC1271.sol)\n\npragma solidity >=0.5.0;\n\n/**\n * @dev Interface of the ERC-1271 standard signature validation method for\n * contracts as defined in https://eips.ethereum.org/EIPS/eip-1271[ERC-1271].\n */\ninterface IERC1271 {\n    /**\n     * @dev Should return whether the signature provided is valid for the provided data\n     * @param hash      Hash of the data to be signed\n     * @param signature Signature byte array associated with `hash`\n     */\n    function isValidSignature(bytes32 hash, bytes calldata signature) external view returns (bytes4 magicValue);\n}\n"},"lib/openzeppelin-contracts/contracts/interfaces/IERC1363.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.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/interfaces/IERC5267.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC5267.sol)\n\npragma solidity >=0.4.16;\n\ninterface IERC5267 {\n    /**\n     * @dev MAY be emitted to signal that the domain could have changed.\n     */\n    event EIP712DomainChanged();\n\n    /**\n     * @dev returns the fields and values that describe the domain separator used by this contract for EIP-712\n     * signature.\n     */\n    function eip712Domain()\n        external\n        view\n        returns (\n            bytes1 fields,\n            string memory name,\n            string memory version,\n            uint256 chainId,\n            address verifyingContract,\n            bytes32 salt,\n            uint256[] memory extensions\n        );\n}\n"},"lib/openzeppelin-contracts/contracts/interfaces/IERC7913.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity >=0.5.0;\n\n/**\n * @dev Signature verifier interface.\n */\ninterface IERC7913SignatureVerifier {\n    /**\n     * @dev Verifies `signature` as a valid signature of `hash` by `key`.\n     *\n     * MUST return the bytes4 magic value IERC7913SignatureVerifier.verify.selector if the signature is valid.\n     * SHOULD return 0xffffffff or revert if the signature is not valid.\n     * SHOULD return 0xffffffff or revert if the key is empty\n     */\n    function verify(bytes calldata key, bytes32 hash, bytes calldata signature) external view returns (bytes4);\n}\n"},"lib/openzeppelin-contracts/contracts/utils/math/SafeCast.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/math/SafeCast.sol)\n// This file was procedurally generated from scripts/generate/templates/SafeCast.js.\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Wrappers over Solidity's uintXX/intXX/bool casting operators with added overflow\n * checks.\n *\n * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can\n * easily result in undesired exploitation or bugs, since developers usually\n * assume that overflows raise errors. `SafeCast` restores this intuition by\n * reverting the transaction when such an operation overflows.\n *\n * Using this library instead of the unchecked operations eliminates an entire\n * class of bugs, so it's recommended to use it always.\n */\nlibrary SafeCast {\n    /**\n     * @dev Value doesn't fit in an uint of `bits` size.\n     */\n    error SafeCastOverflowedUintDowncast(uint8 bits, uint256 value);\n\n    /**\n     * @dev An int value doesn't fit in an uint of `bits` size.\n     */\n    error SafeCastOverflowedIntToUint(int256 value);\n\n    /**\n     * @dev Value doesn't fit in an int of `bits` size.\n     */\n    error SafeCastOverflowedIntDowncast(uint8 bits, int256 value);\n\n    /**\n     * @dev An uint value doesn't fit in an int of `bits` size.\n     */\n    error SafeCastOverflowedUintToInt(uint256 value);\n\n    /**\n     * @dev Returns the downcasted uint248 from uint256, reverting on\n     * overflow (when the input is greater than largest uint248).\n     *\n     * Counterpart to Solidity's `uint248` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 248 bits\n     */\n    function toUint248(uint256 value) internal pure returns (uint248) {\n        if (value > type(uint248).max) {\n            revert SafeCastOverflowedUintDowncast(248, value);\n        }\n        return uint248(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint240 from uint256, reverting on\n     * overflow (when the input is greater than largest uint240).\n     *\n     * Counterpart to Solidity's `uint240` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 240 bits\n     */\n    function toUint240(uint256 value) internal pure returns (uint240) {\n        if (value > type(uint240).max) {\n            revert SafeCastOverflowedUintDowncast(240, value);\n        }\n        return uint240(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint232 from uint256, reverting on\n     * overflow (when the input is greater than largest uint232).\n     *\n     * Counterpart to Solidity's `uint232` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 232 bits\n     */\n    function toUint232(uint256 value) internal pure returns (uint232) {\n        if (value > type(uint232).max) {\n            revert SafeCastOverflowedUintDowncast(232, value);\n        }\n        return uint232(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint224 from uint256, reverting on\n     * overflow (when the input is greater than largest uint224).\n     *\n     * Counterpart to Solidity's `uint224` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 224 bits\n     */\n    function toUint224(uint256 value) internal pure returns (uint224) {\n        if (value > type(uint224).max) {\n            revert SafeCastOverflowedUintDowncast(224, value);\n        }\n        return uint224(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint216 from uint256, reverting on\n     * overflow (when the input is greater than largest uint216).\n     *\n     * Counterpart to Solidity's `uint216` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 216 bits\n     */\n    function toUint216(uint256 value) internal pure returns (uint216) {\n        if (value > type(uint216).max) {\n            revert SafeCastOverflowedUintDowncast(216, value);\n        }\n        return uint216(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint208 from uint256, reverting on\n     * overflow (when the input is greater than largest uint208).\n     *\n     * Counterpart to Solidity's `uint208` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 208 bits\n     */\n    function toUint208(uint256 value) internal pure returns (uint208) {\n        if (value > type(uint208).max) {\n            revert SafeCastOverflowedUintDowncast(208, value);\n        }\n        return uint208(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint200 from uint256, reverting on\n     * overflow (when the input is greater than largest uint200).\n     *\n     * Counterpart to Solidity's `uint200` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 200 bits\n     */\n    function toUint200(uint256 value) internal pure returns (uint200) {\n        if (value > type(uint200).max) {\n            revert SafeCastOverflowedUintDowncast(200, value);\n        }\n        return uint200(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint192 from uint256, reverting on\n     * overflow (when the input is greater than largest uint192).\n     *\n     * Counterpart to Solidity's `uint192` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 192 bits\n     */\n    function toUint192(uint256 value) internal pure returns (uint192) {\n        if (value > type(uint192).max) {\n            revert SafeCastOverflowedUintDowncast(192, value);\n        }\n        return uint192(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint184 from uint256, reverting on\n     * overflow (when the input is greater than largest uint184).\n     *\n     * Counterpart to Solidity's `uint184` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 184 bits\n     */\n    function toUint184(uint256 value) internal pure returns (uint184) {\n        if (value > type(uint184).max) {\n            revert SafeCastOverflowedUintDowncast(184, value);\n        }\n        return uint184(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint176 from uint256, reverting on\n     * overflow (when the input is greater than largest uint176).\n     *\n     * Counterpart to Solidity's `uint176` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 176 bits\n     */\n    function toUint176(uint256 value) internal pure returns (uint176) {\n        if (value > type(uint176).max) {\n            revert SafeCastOverflowedUintDowncast(176, value);\n        }\n        return uint176(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint168 from uint256, reverting on\n     * overflow (when the input is greater than largest uint168).\n     *\n     * Counterpart to Solidity's `uint168` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 168 bits\n     */\n    function toUint168(uint256 value) internal pure returns (uint168) {\n        if (value > type(uint168).max) {\n            revert SafeCastOverflowedUintDowncast(168, value);\n        }\n        return uint168(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint160 from uint256, reverting on\n     * overflow (when the input is greater than largest uint160).\n     *\n     * Counterpart to Solidity's `uint160` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 160 bits\n     */\n    function toUint160(uint256 value) internal pure returns (uint160) {\n        if (value > type(uint160).max) {\n            revert SafeCastOverflowedUintDowncast(160, value);\n        }\n        return uint160(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint152 from uint256, reverting on\n     * overflow (when the input is greater than largest uint152).\n     *\n     * Counterpart to Solidity's `uint152` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 152 bits\n     */\n    function toUint152(uint256 value) internal pure returns (uint152) {\n        if (value > type(uint152).max) {\n            revert SafeCastOverflowedUintDowncast(152, value);\n        }\n        return uint152(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint144 from uint256, reverting on\n     * overflow (when the input is greater than largest uint144).\n     *\n     * Counterpart to Solidity's `uint144` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 144 bits\n     */\n    function toUint144(uint256 value) internal pure returns (uint144) {\n        if (value > type(uint144).max) {\n            revert SafeCastOverflowedUintDowncast(144, value);\n        }\n        return uint144(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint136 from uint256, reverting on\n     * overflow (when the input is greater than largest uint136).\n     *\n     * Counterpart to Solidity's `uint136` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 136 bits\n     */\n    function toUint136(uint256 value) internal pure returns (uint136) {\n        if (value > type(uint136).max) {\n            revert SafeCastOverflowedUintDowncast(136, value);\n        }\n        return uint136(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint128 from uint256, reverting on\n     * overflow (when the input is greater than largest uint128).\n     *\n     * Counterpart to Solidity's `uint128` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 128 bits\n     */\n    function toUint128(uint256 value) internal pure returns (uint128) {\n        if (value > type(uint128).max) {\n            revert SafeCastOverflowedUintDowncast(128, value);\n        }\n        return uint128(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint120 from uint256, reverting on\n     * overflow (when the input is greater than largest uint120).\n     *\n     * Counterpart to Solidity's `uint120` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 120 bits\n     */\n    function toUint120(uint256 value) internal pure returns (uint120) {\n        if (value > type(uint120).max) {\n            revert SafeCastOverflowedUintDowncast(120, value);\n        }\n        return uint120(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint112 from uint256, reverting on\n     * overflow (when the input is greater than largest uint112).\n     *\n     * Counterpart to Solidity's `uint112` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 112 bits\n     */\n    function toUint112(uint256 value) internal pure returns (uint112) {\n        if (value > type(uint112).max) {\n            revert SafeCastOverflowedUintDowncast(112, value);\n        }\n        return uint112(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint104 from uint256, reverting on\n     * overflow (when the input is greater than largest uint104).\n     *\n     * Counterpart to Solidity's `uint104` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 104 bits\n     */\n    function toUint104(uint256 value) internal pure returns (uint104) {\n        if (value > type(uint104).max) {\n            revert SafeCastOverflowedUintDowncast(104, value);\n        }\n        return uint104(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint96 from uint256, reverting on\n     * overflow (when the input is greater than largest uint96).\n     *\n     * Counterpart to Solidity's `uint96` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 96 bits\n     */\n    function toUint96(uint256 value) internal pure returns (uint96) {\n        if (value > type(uint96).max) {\n            revert SafeCastOverflowedUintDowncast(96, value);\n        }\n        return uint96(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint88 from uint256, reverting on\n     * overflow (when the input is greater than largest uint88).\n     *\n     * Counterpart to Solidity's `uint88` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 88 bits\n     */\n    function toUint88(uint256 value) internal pure returns (uint88) {\n        if (value > type(uint88).max) {\n            revert SafeCastOverflowedUintDowncast(88, value);\n        }\n        return uint88(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint80 from uint256, reverting on\n     * overflow (when the input is greater than largest uint80).\n     *\n     * Counterpart to Solidity's `uint80` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 80 bits\n     */\n    function toUint80(uint256 value) internal pure returns (uint80) {\n        if (value > type(uint80).max) {\n            revert SafeCastOverflowedUintDowncast(80, value);\n        }\n        return uint80(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint72 from uint256, reverting on\n     * overflow (when the input is greater than largest uint72).\n     *\n     * Counterpart to Solidity's `uint72` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 72 bits\n     */\n    function toUint72(uint256 value) internal pure returns (uint72) {\n        if (value > type(uint72).max) {\n            revert SafeCastOverflowedUintDowncast(72, value);\n        }\n        return uint72(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint64 from uint256, reverting on\n     * overflow (when the input is greater than largest uint64).\n     *\n     * Counterpart to Solidity's `uint64` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 64 bits\n     */\n    function toUint64(uint256 value) internal pure returns (uint64) {\n        if (value > type(uint64).max) {\n            revert SafeCastOverflowedUintDowncast(64, value);\n        }\n        return uint64(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint56 from uint256, reverting on\n     * overflow (when the input is greater than largest uint56).\n     *\n     * Counterpart to Solidity's `uint56` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 56 bits\n     */\n    function toUint56(uint256 value) internal pure returns (uint56) {\n        if (value > type(uint56).max) {\n            revert SafeCastOverflowedUintDowncast(56, value);\n        }\n        return uint56(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint48 from uint256, reverting on\n     * overflow (when the input is greater than largest uint48).\n     *\n     * Counterpart to Solidity's `uint48` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 48 bits\n     */\n    function toUint48(uint256 value) internal pure returns (uint48) {\n        if (value > type(uint48).max) {\n            revert SafeCastOverflowedUintDowncast(48, value);\n        }\n        return uint48(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint40 from uint256, reverting on\n     * overflow (when the input is greater than largest uint40).\n     *\n     * Counterpart to Solidity's `uint40` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 40 bits\n     */\n    function toUint40(uint256 value) internal pure returns (uint40) {\n        if (value > type(uint40).max) {\n            revert SafeCastOverflowedUintDowncast(40, value);\n        }\n        return uint40(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint32 from uint256, reverting on\n     * overflow (when the input is greater than largest uint32).\n     *\n     * Counterpart to Solidity's `uint32` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 32 bits\n     */\n    function toUint32(uint256 value) internal pure returns (uint32) {\n        if (value > type(uint32).max) {\n            revert SafeCastOverflowedUintDowncast(32, value);\n        }\n        return uint32(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint24 from uint256, reverting on\n     * overflow (when the input is greater than largest uint24).\n     *\n     * Counterpart to Solidity's `uint24` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 24 bits\n     */\n    function toUint24(uint256 value) internal pure returns (uint24) {\n        if (value > type(uint24).max) {\n            revert SafeCastOverflowedUintDowncast(24, value);\n        }\n        return uint24(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint16 from uint256, reverting on\n     * overflow (when the input is greater than largest uint16).\n     *\n     * Counterpart to Solidity's `uint16` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 16 bits\n     */\n    function toUint16(uint256 value) internal pure returns (uint16) {\n        if (value > type(uint16).max) {\n            revert SafeCastOverflowedUintDowncast(16, value);\n        }\n        return uint16(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint8 from uint256, reverting on\n     * overflow (when the input is greater than largest uint8).\n     *\n     * Counterpart to Solidity's `uint8` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 8 bits\n     */\n    function toUint8(uint256 value) internal pure returns (uint8) {\n        if (value > type(uint8).max) {\n            revert SafeCastOverflowedUintDowncast(8, value);\n        }\n        return uint8(value);\n    }\n\n    /**\n     * @dev Converts a signed int256 into an unsigned uint256.\n     *\n     * Requirements:\n     *\n     * - input must be greater than or equal to 0.\n     */\n    function toUint256(int256 value) internal pure returns (uint256) {\n        if (value < 0) {\n            revert SafeCastOverflowedIntToUint(value);\n        }\n        return uint256(value);\n    }\n\n    /**\n     * @dev Returns the downcasted int248 from int256, reverting on\n     * overflow (when the input is less than smallest int248 or\n     * greater than largest int248).\n     *\n     * Counterpart to Solidity's `int248` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 248 bits\n     */\n    function toInt248(int256 value) internal pure returns (int248 downcasted) {\n        downcasted = int248(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(248, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int240 from int256, reverting on\n     * overflow (when the input is less than smallest int240 or\n     * greater than largest int240).\n     *\n     * Counterpart to Solidity's `int240` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 240 bits\n     */\n    function toInt240(int256 value) internal pure returns (int240 downcasted) {\n        downcasted = int240(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(240, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int232 from int256, reverting on\n     * overflow (when the input is less than smallest int232 or\n     * greater than largest int232).\n     *\n     * Counterpart to Solidity's `int232` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 232 bits\n     */\n    function toInt232(int256 value) internal pure returns (int232 downcasted) {\n        downcasted = int232(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(232, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int224 from int256, reverting on\n     * overflow (when the input is less than smallest int224 or\n     * greater than largest int224).\n     *\n     * Counterpart to Solidity's `int224` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 224 bits\n     */\n    function toInt224(int256 value) internal pure returns (int224 downcasted) {\n        downcasted = int224(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(224, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int216 from int256, reverting on\n     * overflow (when the input is less than smallest int216 or\n     * greater than largest int216).\n     *\n     * Counterpart to Solidity's `int216` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 216 bits\n     */\n    function toInt216(int256 value) internal pure returns (int216 downcasted) {\n        downcasted = int216(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(216, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int208 from int256, reverting on\n     * overflow (when the input is less than smallest int208 or\n     * greater than largest int208).\n     *\n     * Counterpart to Solidity's `int208` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 208 bits\n     */\n    function toInt208(int256 value) internal pure returns (int208 downcasted) {\n        downcasted = int208(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(208, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int200 from int256, reverting on\n     * overflow (when the input is less than smallest int200 or\n     * greater than largest int200).\n     *\n     * Counterpart to Solidity's `int200` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 200 bits\n     */\n    function toInt200(int256 value) internal pure returns (int200 downcasted) {\n        downcasted = int200(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(200, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int192 from int256, reverting on\n     * overflow (when the input is less than smallest int192 or\n     * greater than largest int192).\n     *\n     * Counterpart to Solidity's `int192` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 192 bits\n     */\n    function toInt192(int256 value) internal pure returns (int192 downcasted) {\n        downcasted = int192(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(192, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int184 from int256, reverting on\n     * overflow (when the input is less than smallest int184 or\n     * greater than largest int184).\n     *\n     * Counterpart to Solidity's `int184` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 184 bits\n     */\n    function toInt184(int256 value) internal pure returns (int184 downcasted) {\n        downcasted = int184(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(184, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int176 from int256, reverting on\n     * overflow (when the input is less than smallest int176 or\n     * greater than largest int176).\n     *\n     * Counterpart to Solidity's `int176` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 176 bits\n     */\n    function toInt176(int256 value) internal pure returns (int176 downcasted) {\n        downcasted = int176(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(176, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int168 from int256, reverting on\n     * overflow (when the input is less than smallest int168 or\n     * greater than largest int168).\n     *\n     * Counterpart to Solidity's `int168` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 168 bits\n     */\n    function toInt168(int256 value) internal pure returns (int168 downcasted) {\n        downcasted = int168(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(168, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int160 from int256, reverting on\n     * overflow (when the input is less than smallest int160 or\n     * greater than largest int160).\n     *\n     * Counterpart to Solidity's `int160` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 160 bits\n     */\n    function toInt160(int256 value) internal pure returns (int160 downcasted) {\n        downcasted = int160(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(160, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int152 from int256, reverting on\n     * overflow (when the input is less than smallest int152 or\n     * greater than largest int152).\n     *\n     * Counterpart to Solidity's `int152` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 152 bits\n     */\n    function toInt152(int256 value) internal pure returns (int152 downcasted) {\n        downcasted = int152(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(152, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int144 from int256, reverting on\n     * overflow (when the input is less than smallest int144 or\n     * greater than largest int144).\n     *\n     * Counterpart to Solidity's `int144` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 144 bits\n     */\n    function toInt144(int256 value) internal pure returns (int144 downcasted) {\n        downcasted = int144(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(144, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int136 from int256, reverting on\n     * overflow (when the input is less than smallest int136 or\n     * greater than largest int136).\n     *\n     * Counterpart to Solidity's `int136` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 136 bits\n     */\n    function toInt136(int256 value) internal pure returns (int136 downcasted) {\n        downcasted = int136(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(136, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int128 from int256, reverting on\n     * overflow (when the input is less than smallest int128 or\n     * greater than largest int128).\n     *\n     * Counterpart to Solidity's `int128` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 128 bits\n     */\n    function toInt128(int256 value) internal pure returns (int128 downcasted) {\n        downcasted = int128(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(128, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int120 from int256, reverting on\n     * overflow (when the input is less than smallest int120 or\n     * greater than largest int120).\n     *\n     * Counterpart to Solidity's `int120` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 120 bits\n     */\n    function toInt120(int256 value) internal pure returns (int120 downcasted) {\n        downcasted = int120(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(120, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int112 from int256, reverting on\n     * overflow (when the input is less than smallest int112 or\n     * greater than largest int112).\n     *\n     * Counterpart to Solidity's `int112` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 112 bits\n     */\n    function toInt112(int256 value) internal pure returns (int112 downcasted) {\n        downcasted = int112(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(112, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int104 from int256, reverting on\n     * overflow (when the input is less than smallest int104 or\n     * greater than largest int104).\n     *\n     * Counterpart to Solidity's `int104` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 104 bits\n     */\n    function toInt104(int256 value) internal pure returns (int104 downcasted) {\n        downcasted = int104(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(104, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int96 from int256, reverting on\n     * overflow (when the input is less than smallest int96 or\n     * greater than largest int96).\n     *\n     * Counterpart to Solidity's `int96` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 96 bits\n     */\n    function toInt96(int256 value) internal pure returns (int96 downcasted) {\n        downcasted = int96(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(96, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int88 from int256, reverting on\n     * overflow (when the input is less than smallest int88 or\n     * greater than largest int88).\n     *\n     * Counterpart to Solidity's `int88` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 88 bits\n     */\n    function toInt88(int256 value) internal pure returns (int88 downcasted) {\n        downcasted = int88(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(88, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int80 from int256, reverting on\n     * overflow (when the input is less than smallest int80 or\n     * greater than largest int80).\n     *\n     * Counterpart to Solidity's `int80` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 80 bits\n     */\n    function toInt80(int256 value) internal pure returns (int80 downcasted) {\n        downcasted = int80(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(80, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int72 from int256, reverting on\n     * overflow (when the input is less than smallest int72 or\n     * greater than largest int72).\n     *\n     * Counterpart to Solidity's `int72` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 72 bits\n     */\n    function toInt72(int256 value) internal pure returns (int72 downcasted) {\n        downcasted = int72(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(72, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int64 from int256, reverting on\n     * overflow (when the input is less than smallest int64 or\n     * greater than largest int64).\n     *\n     * Counterpart to Solidity's `int64` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 64 bits\n     */\n    function toInt64(int256 value) internal pure returns (int64 downcasted) {\n        downcasted = int64(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(64, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int56 from int256, reverting on\n     * overflow (when the input is less than smallest int56 or\n     * greater than largest int56).\n     *\n     * Counterpart to Solidity's `int56` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 56 bits\n     */\n    function toInt56(int256 value) internal pure returns (int56 downcasted) {\n        downcasted = int56(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(56, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int48 from int256, reverting on\n     * overflow (when the input is less than smallest int48 or\n     * greater than largest int48).\n     *\n     * Counterpart to Solidity's `int48` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 48 bits\n     */\n    function toInt48(int256 value) internal pure returns (int48 downcasted) {\n        downcasted = int48(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(48, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int40 from int256, reverting on\n     * overflow (when the input is less than smallest int40 or\n     * greater than largest int40).\n     *\n     * Counterpart to Solidity's `int40` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 40 bits\n     */\n    function toInt40(int256 value) internal pure returns (int40 downcasted) {\n        downcasted = int40(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(40, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int32 from int256, reverting on\n     * overflow (when the input is less than smallest int32 or\n     * greater than largest int32).\n     *\n     * Counterpart to Solidity's `int32` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 32 bits\n     */\n    function toInt32(int256 value) internal pure returns (int32 downcasted) {\n        downcasted = int32(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(32, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int24 from int256, reverting on\n     * overflow (when the input is less than smallest int24 or\n     * greater than largest int24).\n     *\n     * Counterpart to Solidity's `int24` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 24 bits\n     */\n    function toInt24(int256 value) internal pure returns (int24 downcasted) {\n        downcasted = int24(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(24, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int16 from int256, reverting on\n     * overflow (when the input is less than smallest int16 or\n     * greater than largest int16).\n     *\n     * Counterpart to Solidity's `int16` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 16 bits\n     */\n    function toInt16(int256 value) internal pure returns (int16 downcasted) {\n        downcasted = int16(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(16, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int8 from int256, reverting on\n     * overflow (when the input is less than smallest int8 or\n     * greater than largest int8).\n     *\n     * Counterpart to Solidity's `int8` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 8 bits\n     */\n    function toInt8(int256 value) internal pure returns (int8 downcasted) {\n        downcasted = int8(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(8, value);\n        }\n    }\n\n    /**\n     * @dev Converts an unsigned uint256 into a signed int256.\n     *\n     * Requirements:\n     *\n     * - input must be less than or equal to maxInt256.\n     */\n    function toInt256(uint256 value) internal pure returns (int256) {\n        // Note: Unsafe cast below is okay because `type(int256).max` is guaranteed to be positive\n        if (value > uint256(type(int256).max)) {\n            revert SafeCastOverflowedUintToInt(value);\n        }\n        return int256(value);\n    }\n\n    /**\n     * @dev Cast a boolean (false or true) to a uint256 (0 or 1) with no jump.\n     */\n    function toUint(bool b) internal pure returns (uint256 u) {\n        assembly (\"memory-safe\") {\n            u := iszero(iszero(b))\n        }\n    }\n}\n"},"lib/openzeppelin-contracts/contracts/utils/math/SignedMath.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/math/SignedMath.sol)\n\npragma solidity ^0.8.20;\n\nimport {SafeCast} from \"./SafeCast.sol\";\n\n/**\n * @dev Standard signed math utilities missing in the Solidity language.\n */\nlibrary SignedMath {\n    /**\n     * @dev Branchless ternary evaluation for `a ? b : c`. Gas costs are constant.\n     *\n     * IMPORTANT: This function may reduce bytecode size and consume less gas when used standalone.\n     * However, the compiler may optimize Solidity ternary operations (i.e. `a ? b : c`) to only compute\n     * one branch when needed, making this function more expensive.\n     */\n    function ternary(bool condition, int256 a, int256 b) internal pure returns (int256) {\n        unchecked {\n            // branchless ternary works because:\n            // b ^ (a ^ b) == a\n            // b ^ 0 == b\n            return b ^ ((a ^ b) * int256(SafeCast.toUint(condition)));\n        }\n    }\n\n    /**\n     * @dev Returns the largest of two signed numbers.\n     */\n    function max(int256 a, int256 b) internal pure returns (int256) {\n        return ternary(a > b, a, b);\n    }\n\n    /**\n     * @dev Returns the smallest of two signed numbers.\n     */\n    function min(int256 a, int256 b) internal pure returns (int256) {\n        return ternary(a < b, a, b);\n    }\n\n    /**\n     * @dev Returns the average of two signed numbers without overflow.\n     * The result is rounded towards zero.\n     */\n    function average(int256 a, int256 b) internal pure returns (int256) {\n        // Formula from the book \"Hacker's Delight\"\n        int256 x = (a & b) + ((a ^ b) >> 1);\n        return x + (int256(uint256(x) >> 255) & (a ^ b));\n    }\n\n    /**\n     * @dev Returns the absolute unsigned value of a signed value.\n     */\n    function abs(int256 n) internal pure returns (uint256) {\n        unchecked {\n            // Formula from the \"Bit Twiddling Hacks\" by Sean Eron Anderson.\n            // Since `n` is a signed integer, the generated bytecode will use the SAR opcode to perform the right shift,\n            // taking advantage of the most significant (or \"sign\" bit) in two's complement representation.\n            // This opcode adds new most significant bits set to the value of the previous most significant bit. As a result,\n            // the mask will either be `bytes32(0)` (if n is positive) or `~bytes32(0)` (if n is negative).\n            int256 mask = n >> 255;\n\n            // A `bytes32(0)` mask leaves the input unchanged, while a `~bytes32(0)` mask complements it.\n            return uint256((n + mask) ^ mask);\n        }\n    }\n}\n"},"lib/openzeppelin-contracts/contracts/utils/cryptography/ECDSA.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/cryptography/ECDSA.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\n *\n * These functions can be used to verify that a message was signed by the holder\n * of the private keys of a given address.\n */\nlibrary ECDSA {\n    enum RecoverError {\n        NoError,\n        InvalidSignature,\n        InvalidSignatureLength,\n        InvalidSignatureS\n    }\n\n    /**\n     * @dev The signature derives the `address(0)`.\n     */\n    error ECDSAInvalidSignature();\n\n    /**\n     * @dev The signature has an invalid length.\n     */\n    error ECDSAInvalidSignatureLength(uint256 length);\n\n    /**\n     * @dev The signature has an S value that is in the upper half order.\n     */\n    error ECDSAInvalidSignatureS(bytes32 s);\n\n    /**\n     * @dev Returns the address that signed a hashed message (`hash`) with `signature` or an error. This will not\n     * return address(0) without also returning an error description. Errors are documented using an enum (error type)\n     * and a bytes32 providing additional information about the error.\n     *\n     * If no error is returned, then the address can be used for verification purposes.\n     *\n     * The `ecrecover` EVM precompile allows for malleable (non-unique) signatures:\n     * this function rejects them by requiring the `s` value to be in the lower\n     * half order, and the `v` value to be either 27 or 28.\n     *\n     * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n     * verification to be secure: it is possible to craft signatures that\n     * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n     * this is by receiving a hash of the original message (which may otherwise\n     * be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it.\n     *\n     * Documentation for signature generation:\n     * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\n     * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\n     */\n    function tryRecover(\n        bytes32 hash,\n        bytes memory signature\n    ) internal pure returns (address recovered, RecoverError err, bytes32 errArg) {\n        if (signature.length == 65) {\n            bytes32 r;\n            bytes32 s;\n            uint8 v;\n            // ecrecover takes the signature parameters, and the only way to get them\n            // currently is to use assembly.\n            assembly (\"memory-safe\") {\n                r := mload(add(signature, 0x20))\n                s := mload(add(signature, 0x40))\n                v := byte(0, mload(add(signature, 0x60)))\n            }\n            return tryRecover(hash, v, r, s);\n        } else {\n            return (address(0), RecoverError.InvalidSignatureLength, bytes32(signature.length));\n        }\n    }\n\n    /**\n     * @dev Returns the address that signed a hashed message (`hash`) with\n     * `signature`. This address can then be used for verification purposes.\n     *\n     * The `ecrecover` EVM precompile allows for malleable (non-unique) signatures:\n     * this function rejects them by requiring the `s` value to be in the lower\n     * half order, and the `v` value to be either 27 or 28.\n     *\n     * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n     * verification to be secure: it is possible to craft signatures that\n     * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n     * this is by receiving a hash of the original message (which may otherwise\n     * be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it.\n     */\n    function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\n        (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, signature);\n        _throwError(error, errorArg);\n        return recovered;\n    }\n\n    /**\n     * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\n     *\n     * See https://eips.ethereum.org/EIPS/eip-2098[ERC-2098 short signatures]\n     */\n    function tryRecover(\n        bytes32 hash,\n        bytes32 r,\n        bytes32 vs\n    ) internal pure returns (address recovered, RecoverError err, bytes32 errArg) {\n        unchecked {\n            bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\n            // We do not check for an overflow here since the shift operation results in 0 or 1.\n            uint8 v = uint8((uint256(vs) >> 255) + 27);\n            return tryRecover(hash, v, r, s);\n        }\n    }\n\n    /**\n     * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\n     */\n    function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {\n        (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, r, vs);\n        _throwError(error, errorArg);\n        return recovered;\n    }\n\n    /**\n     * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\n     * `r` and `s` signature fields separately.\n     */\n    function tryRecover(\n        bytes32 hash,\n        uint8 v,\n        bytes32 r,\n        bytes32 s\n    ) internal pure returns (address recovered, RecoverError err, bytes32 errArg) {\n        // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\n        // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\n        // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most\n        // signatures from current libraries generate a unique signature with an s-value in the lower half order.\n        //\n        // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\n        // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\n        // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\n        // these malleable signatures as well.\n        if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n            return (address(0), RecoverError.InvalidSignatureS, s);\n        }\n\n        // If the signature is valid (and not malleable), return the signer address\n        address signer = ecrecover(hash, v, r, s);\n        if (signer == address(0)) {\n            return (address(0), RecoverError.InvalidSignature, bytes32(0));\n        }\n\n        return (signer, RecoverError.NoError, bytes32(0));\n    }\n\n    /**\n     * @dev Overload of {ECDSA-recover} that receives the `v`,\n     * `r` and `s` signature fields separately.\n     */\n    function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {\n        (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, v, r, s);\n        _throwError(error, errorArg);\n        return recovered;\n    }\n\n    /**\n     * @dev Optionally reverts with the corresponding custom error according to the `error` argument provided.\n     */\n    function _throwError(RecoverError error, bytes32 errorArg) private pure {\n        if (error == RecoverError.NoError) {\n            return; // no error: do nothing\n        } else if (error == RecoverError.InvalidSignature) {\n            revert ECDSAInvalidSignature();\n        } else if (error == RecoverError.InvalidSignatureLength) {\n            revert ECDSAInvalidSignatureLength(uint256(errorArg));\n        } else if (error == RecoverError.InvalidSignatureS) {\n            revert ECDSAInvalidSignatureS(errorArg);\n        }\n    }\n}\n"},"lib/openzeppelin-contracts/contracts/utils/cryptography/EIP712.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (utils/cryptography/EIP712.sol)\n\npragma solidity ^0.8.20;\n\nimport {MessageHashUtils} from \"./MessageHashUtils.sol\";\nimport {ShortStrings, ShortString} from \"../ShortStrings.sol\";\nimport {IERC5267} from \"../../interfaces/IERC5267.sol\";\n\n/**\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP-712] is a standard for hashing and signing of typed structured data.\n *\n * The encoding scheme specified in the EIP requires a domain separator and a hash of the typed structured data, whose\n * encoding is very generic and therefore its implementation in Solidity is not feasible, thus this contract\n * does not implement the encoding itself. Protocols need to implement the type-specific encoding they need in order to\n * produce the hash of their typed data using a combination of `abi.encode` and `keccak256`.\n *\n * This contract implements the EIP-712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\n * ({_hashTypedDataV4}).\n *\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\n * the chain id to protect against replay attacks on an eventual fork of the chain.\n *\n * NOTE: This contract implements the version of the encoding known as \"v4\", as implemented by the JSON RPC method\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\n *\n * NOTE: In the upgradeable version of this contract, the cached values will correspond to the address, and the domain\n * separator of the implementation contract. This will cause the {_domainSeparatorV4} function to always rebuild the\n * separator from the immutable values, which is cheaper than accessing a cached version in cold storage.\n *\n * @custom:oz-upgrades-unsafe-allow state-variable-immutable\n */\nabstract contract EIP712 is IERC5267 {\n    using ShortStrings for *;\n\n    bytes32 private constant TYPE_HASH =\n        keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\");\n\n    // Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to\n    // invalidate the cached domain separator if the chain id changes.\n    bytes32 private immutable _cachedDomainSeparator;\n    uint256 private immutable _cachedChainId;\n    address private immutable _cachedThis;\n\n    bytes32 private immutable _hashedName;\n    bytes32 private immutable _hashedVersion;\n\n    ShortString private immutable _name;\n    ShortString private immutable _version;\n    // slither-disable-next-line constable-states\n    string private _nameFallback;\n    // slither-disable-next-line constable-states\n    string private _versionFallback;\n\n    /**\n     * @dev Initializes the domain separator and parameter caches.\n     *\n     * The meaning of `name` and `version` is specified in\n     * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP-712]:\n     *\n     * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\n     * - `version`: the current major version of the signing domain.\n     *\n     * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\n     * contract upgrade].\n     */\n    constructor(string memory name, string memory version) {\n        _name = name.toShortStringWithFallback(_nameFallback);\n        _version = version.toShortStringWithFallback(_versionFallback);\n        _hashedName = keccak256(bytes(name));\n        _hashedVersion = keccak256(bytes(version));\n\n        _cachedChainId = block.chainid;\n        _cachedDomainSeparator = _buildDomainSeparator();\n        _cachedThis = address(this);\n    }\n\n    /**\n     * @dev Returns the domain separator for the current chain.\n     */\n    function _domainSeparatorV4() internal view returns (bytes32) {\n        if (address(this) == _cachedThis && block.chainid == _cachedChainId) {\n            return _cachedDomainSeparator;\n        } else {\n            return _buildDomainSeparator();\n        }\n    }\n\n    function _buildDomainSeparator() private view returns (bytes32) {\n        return keccak256(abi.encode(TYPE_HASH, _hashedName, _hashedVersion, block.chainid, address(this)));\n    }\n\n    /**\n     * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\n     * function returns the hash of the fully encoded EIP712 message for this domain.\n     *\n     * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\n     *\n     * ```solidity\n     * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\n     *     keccak256(\"Mail(address to,string contents)\"),\n     *     mailTo,\n     *     keccak256(bytes(mailContents))\n     * )));\n     * address signer = ECDSA.recover(digest, signature);\n     * ```\n     */\n    function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\n        return MessageHashUtils.toTypedDataHash(_domainSeparatorV4(), structHash);\n    }\n\n    /// @inheritdoc IERC5267\n    function eip712Domain()\n        public\n        view\n        virtual\n        returns (\n            bytes1 fields,\n            string memory name,\n            string memory version,\n            uint256 chainId,\n            address verifyingContract,\n            bytes32 salt,\n            uint256[] memory extensions\n        )\n    {\n        return (\n            hex\"0f\", // 01111\n            _EIP712Name(),\n            _EIP712Version(),\n            block.chainid,\n            address(this),\n            bytes32(0),\n            new uint256[](0)\n        );\n    }\n\n    /**\n     * @dev The name parameter for the EIP712 domain.\n     *\n     * NOTE: By default this function reads _name which is an immutable value.\n     * It only reads from storage if necessary (in case the value is too large to fit in a ShortString).\n     */\n    // solhint-disable-next-line func-name-mixedcase\n    function _EIP712Name() internal view returns (string memory) {\n        return _name.toStringWithFallback(_nameFallback);\n    }\n\n    /**\n     * @dev The version parameter for the EIP712 domain.\n     *\n     * NOTE: By default this function reads _version which is an immutable value.\n     * It only reads from storage if necessary (in case the value is too large to fit in a ShortString).\n     */\n    // solhint-disable-next-line func-name-mixedcase\n    function _EIP712Version() internal view returns (string memory) {\n        return _version.toStringWithFallback(_versionFallback);\n    }\n}\n"},"lib/openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.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        _callOptionalReturn(token, abi.encodeCall(token.transfer, (to, value)));\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        _callOptionalReturn(token, abi.encodeCall(token.transferFrom, (from, to, value)));\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 _callOptionalReturnBool(token, abi.encodeCall(token.transfer, (to, value)));\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 _callOptionalReturnBool(token, abi.encodeCall(token.transferFrom, (from, to, value)));\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        bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value));\n\n        if (!_callOptionalReturnBool(token, approvalCall)) {\n            _callOptionalReturn(token, abi.encodeCall(token.approve, (spender, 0)));\n            _callOptionalReturn(token, approvalCall);\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 rely 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 rely 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     * Opposedly, 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 high-level call (i.e. a regular function call to a contract), relaxing the requirement\n     * on the return value: the return value is optional (but if data is returned, it must not be false).\n     * @param token The token targeted by the call.\n     * @param data The call data (encoded using abi.encode or one of its variants).\n     *\n     * This is a variant of {_callOptionalReturnBool} that reverts if call fails to meet the requirements.\n     */\n    function _callOptionalReturn(IERC20 token, bytes memory data) private {\n        uint256 returnSize;\n        uint256 returnValue;\n        assembly (\"memory-safe\") {\n            let success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\n            // bubble errors\n            if iszero(success) {\n                let ptr := mload(0x40)\n                returndatacopy(ptr, 0, returndatasize())\n                revert(ptr, returndatasize())\n            }\n            returnSize := returndatasize()\n            returnValue := mload(0)\n        }\n\n        if (returnSize == 0 ? address(token).code.length == 0 : returnValue != 1) {\n            revert SafeERC20FailedOperation(address(token));\n        }\n    }\n\n    /**\n     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n     * on the return value: the return value is optional (but if data is returned, it must not be false).\n     * @param token The token targeted by the call.\n     * @param data The call data (encoded using abi.encode or one of its variants).\n     *\n     * This is a variant of {_callOptionalReturn} that silently catches all reverts and returns a bool instead.\n     */\n    function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\n        bool success;\n        uint256 returnSize;\n        uint256 returnValue;\n        assembly (\"memory-safe\") {\n            success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\n            returnSize := returndatasize()\n            returnValue := mload(0)\n        }\n        return success && (returnSize == 0 ? address(token).code.length > 0 : returnValue == 1);\n    }\n}\n"},"lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.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"},"lib/aave-v3-origin/src/contracts/interfaces/IPoolAddressesProvider.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n/**\n * @title IPoolAddressesProvider\n * @author Aave\n * @notice Defines the basic interface for a Pool Addresses Provider.\n */\ninterface IPoolAddressesProvider {\n  /**\n   * @dev Emitted when the market identifier is updated.\n   * @param oldMarketId The old id of the market\n   * @param newMarketId The new id of the market\n   */\n  event MarketIdSet(string indexed oldMarketId, string indexed newMarketId);\n\n  /**\n   * @dev Emitted when the pool is updated.\n   * @param oldAddress The old address of the Pool\n   * @param newAddress The new address of the Pool\n   */\n  event PoolUpdated(address indexed oldAddress, address indexed newAddress);\n\n  /**\n   * @dev Emitted when the pool configurator is updated.\n   * @param oldAddress The old address of the PoolConfigurator\n   * @param newAddress The new address of the PoolConfigurator\n   */\n  event PoolConfiguratorUpdated(address indexed oldAddress, address indexed newAddress);\n\n  /**\n   * @dev Emitted when the price oracle is updated.\n   * @param oldAddress The old address of the PriceOracle\n   * @param newAddress The new address of the PriceOracle\n   */\n  event PriceOracleUpdated(address indexed oldAddress, address indexed newAddress);\n\n  /**\n   * @dev Emitted when the ACL manager is updated.\n   * @param oldAddress The old address of the ACLManager\n   * @param newAddress The new address of the ACLManager\n   */\n  event ACLManagerUpdated(address indexed oldAddress, address indexed newAddress);\n\n  /**\n   * @dev Emitted when the ACL admin is updated.\n   * @param oldAddress The old address of the ACLAdmin\n   * @param newAddress The new address of the ACLAdmin\n   */\n  event ACLAdminUpdated(address indexed oldAddress, address indexed newAddress);\n\n  /**\n   * @dev Emitted when the price oracle sentinel is updated.\n   * @param oldAddress The old address of the PriceOracleSentinel\n   * @param newAddress The new address of the PriceOracleSentinel\n   */\n  event PriceOracleSentinelUpdated(address indexed oldAddress, address indexed newAddress);\n\n  /**\n   * @dev Emitted when the pool data provider is updated.\n   * @param oldAddress The old address of the PoolDataProvider\n   * @param newAddress The new address of the PoolDataProvider\n   */\n  event PoolDataProviderUpdated(address indexed oldAddress, address indexed newAddress);\n\n  /**\n   * @dev Emitted when a new proxy is created.\n   * @param id The identifier of the proxy\n   * @param proxyAddress The address of the created proxy contract\n   * @param implementationAddress The address of the implementation contract\n   */\n  event ProxyCreated(\n    bytes32 indexed id,\n    address indexed proxyAddress,\n    address indexed implementationAddress\n  );\n\n  /**\n   * @dev Emitted when a new non-proxied contract address is registered.\n   * @param id The identifier of the contract\n   * @param oldAddress The address of the old contract\n   * @param newAddress The address of the new contract\n   */\n  event AddressSet(bytes32 indexed id, address indexed oldAddress, address indexed newAddress);\n\n  /**\n   * @dev Emitted when the implementation of the proxy registered with id is updated\n   * @param id The identifier of the contract\n   * @param proxyAddress The address of the proxy contract\n   * @param oldImplementationAddress The address of the old implementation contract\n   * @param newImplementationAddress The address of the new implementation contract\n   */\n  event AddressSetAsProxy(\n    bytes32 indexed id,\n    address indexed proxyAddress,\n    address oldImplementationAddress,\n    address indexed newImplementationAddress\n  );\n\n  /**\n   * @notice Returns the id of the Aave market to which this contract points to.\n   * @return The market id\n   */\n  function getMarketId() external view returns (string memory);\n\n  /**\n   * @notice Associates an id with a specific PoolAddressesProvider.\n   * @dev This can be used to create an onchain registry of PoolAddressesProviders to\n   * identify and validate multiple Aave markets.\n   * @param newMarketId The market id\n   */\n  function setMarketId(string calldata newMarketId) external;\n\n  /**\n   * @notice Returns an address by its identifier.\n   * @dev The returned address might be an EOA or a contract, potentially proxied\n   * @dev It returns ZERO if there is no registered address with the given id\n   * @param id The id\n   * @return The address of the registered for the specified id\n   */\n  function getAddress(bytes32 id) external view returns (address);\n\n  /**\n   * @notice General function to update the implementation of a proxy registered with\n   * certain `id`. If there is no proxy registered, it will instantiate one and\n   * set as implementation the `newImplementationAddress`.\n   * @dev IMPORTANT Use this function carefully, only for ids that don't have an explicit\n   * setter function, in order to avoid unexpected consequences\n   * @param id The id\n   * @param newImplementationAddress The address of the new implementation\n   */\n  function setAddressAsProxy(bytes32 id, address newImplementationAddress) external;\n\n  /**\n   * @notice Sets an address for an id replacing the address saved in the addresses map.\n   * @dev IMPORTANT Use this function carefully, as it will do a hard replacement\n   * @param id The id\n   * @param newAddress The address to set\n   */\n  function setAddress(bytes32 id, address newAddress) external;\n\n  /**\n   * @notice Returns the address of the Pool proxy.\n   * @return The Pool proxy address\n   */\n  function getPool() external view returns (address);\n\n  /**\n   * @notice Updates the implementation of the Pool, or creates a proxy\n   * setting the new `pool` implementation when the function is called for the first time.\n   * @param newPoolImpl The new Pool implementation\n   */\n  function setPoolImpl(address newPoolImpl) external;\n\n  /**\n   * @notice Returns the address of the PoolConfigurator proxy.\n   * @return The PoolConfigurator proxy address\n   */\n  function getPoolConfigurator() external view returns (address);\n\n  /**\n   * @notice Updates the implementation of the PoolConfigurator, or creates a proxy\n   * setting the new `PoolConfigurator` implementation when the function is called for the first time.\n   * @param newPoolConfiguratorImpl The new PoolConfigurator implementation\n   */\n  function setPoolConfiguratorImpl(address newPoolConfiguratorImpl) external;\n\n  /**\n   * @notice Returns the address of the price oracle.\n   * @return The address of the PriceOracle\n   */\n  function getPriceOracle() external view returns (address);\n\n  /**\n   * @notice Updates the address of the price oracle.\n   * @param newPriceOracle The address of the new PriceOracle\n   */\n  function setPriceOracle(address newPriceOracle) external;\n\n  /**\n   * @notice Returns the address of the ACL manager.\n   * @return The address of the ACLManager\n   */\n  function getACLManager() external view returns (address);\n\n  /**\n   * @notice Updates the address of the ACL manager.\n   * @param newAclManager The address of the new ACLManager\n   */\n  function setACLManager(address newAclManager) external;\n\n  /**\n   * @notice Returns the address of the ACL admin.\n   * @return The address of the ACL admin\n   */\n  function getACLAdmin() external view returns (address);\n\n  /**\n   * @notice Updates the address of the ACL admin.\n   * @param newAclAdmin The address of the new ACL admin\n   */\n  function setACLAdmin(address newAclAdmin) external;\n\n  /**\n   * @notice Returns the address of the price oracle sentinel.\n   * @return The address of the PriceOracleSentinel\n   */\n  function getPriceOracleSentinel() external view returns (address);\n\n  /**\n   * @notice Updates the address of the price oracle sentinel.\n   * @param newPriceOracleSentinel The address of the new PriceOracleSentinel\n   */\n  function setPriceOracleSentinel(address newPriceOracleSentinel) external;\n\n  /**\n   * @notice Returns the address of the data provider.\n   * @return The address of the DataProvider\n   */\n  function getPoolDataProvider() external view returns (address);\n\n  /**\n   * @notice Updates the address of the data provider.\n   * @param newDataProvider The address of the new DataProvider\n   */\n  function setPoolDataProvider(address newDataProvider) external;\n}\n"},"lib/aave-v3-origin/src/contracts/protocol/libraries/types/DataTypes.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nlibrary DataTypes {\n  /**\n   * This exists specifically to maintain the `getReserveData()` interface, since the new, internal\n   * `ReserveData` struct includes the reserve's `virtualUnderlyingBalance`.\n   */\n  struct ReserveDataLegacy {\n    //stores the reserve configuration\n    ReserveConfigurationMap configuration;\n    //the liquidity index. Expressed in ray\n    uint128 liquidityIndex;\n    //the current supply rate. Expressed in ray\n    uint128 currentLiquidityRate;\n    //variable borrow index. Expressed in ray\n    uint128 variableBorrowIndex;\n    //the current variable borrow rate. Expressed in ray\n    uint128 currentVariableBorrowRate;\n    // DEPRECATED on v3.2.0\n    uint128 currentStableBorrowRate;\n    //timestamp of last update\n    uint40 lastUpdateTimestamp;\n    //the id of the reserve. Represents the position in the list of the active reserves\n    uint16 id;\n    //aToken address\n    address aTokenAddress;\n    // DEPRECATED on v3.2.0\n    address stableDebtTokenAddress;\n    //variableDebtToken address\n    address variableDebtTokenAddress;\n    // DEPRECATED on v3.4.0, should use the `RESERVE_INTEREST_RATE_STRATEGY` variable from the Pool contract\n    address interestRateStrategyAddress;\n    //the current treasury balance, scaled\n    uint128 accruedToTreasury;\n    // DEPRECATED on v3.4.0\n    uint128 unbacked;\n    //the outstanding debt borrowed against this asset in isolation mode\n    uint128 isolationModeTotalDebt;\n  }\n\n  struct ReserveData {\n    //stores the reserve configuration\n    ReserveConfigurationMap configuration;\n    //the liquidity index. Expressed in ray\n    uint128 liquidityIndex;\n    //the current supply rate. Expressed in ray\n    uint128 currentLiquidityRate;\n    //variable borrow index. Expressed in ray\n    uint128 variableBorrowIndex;\n    //the current variable borrow rate. Expressed in ray\n    uint128 currentVariableBorrowRate;\n    /// @notice reused `__deprecatedStableBorrowRate` storage from pre 3.2\n    // the current accumulate deficit in underlying tokens\n    uint128 deficit;\n    //timestamp of last update\n    uint40 lastUpdateTimestamp;\n    //the id of the reserve. Represents the position in the list of the active reserves\n    uint16 id;\n    //timestamp until when liquidations are not allowed on the reserve, if set to past liquidations will be allowed\n    uint40 liquidationGracePeriodUntil;\n    //aToken address\n    address aTokenAddress;\n    // DEPRECATED on v3.2.0\n    address __deprecatedStableDebtTokenAddress;\n    //variableDebtToken address\n    address variableDebtTokenAddress;\n    // DEPRECATED on v3.4.0, should use the `RESERVE_INTEREST_RATE_STRATEGY` variable from the Pool contract\n    address __deprecatedInterestRateStrategyAddress;\n    //the current treasury balance, scaled\n    uint128 accruedToTreasury;\n    // In aave 3.3.0 this storage slot contained the `unbacked`\n    uint128 virtualUnderlyingBalance;\n    //the outstanding debt borrowed against this asset in isolation mode\n    uint128 isolationModeTotalDebt;\n    //the amount of underlying accounted for by the protocol\n    // DEPRECATED on v3.4.0. Moved into the same slot as accruedToTreasury for optimized storage access.\n    uint128 __deprecatedVirtualUnderlyingBalance;\n  }\n\n  struct ReserveConfigurationMap {\n    //bit 0-15: LTV\n    //bit 16-31: Liq. threshold\n    //bit 32-47: Liq. bonus\n    //bit 48-55: Decimals\n    //bit 56: reserve is active\n    //bit 57: reserve is frozen\n    //bit 58: borrowing is enabled\n    //bit 59: DEPRECATED: stable rate borrowing enabled\n    //bit 60: asset is paused\n    //bit 61: borrowing in isolation mode is enabled\n    //bit 62: siloed borrowing enabled\n    //bit 63: flashloaning enabled\n    //bit 64-79: reserve factor\n    //bit 80-115: borrow cap in whole tokens, borrowCap == 0 => no cap\n    //bit 116-151: supply cap in whole tokens, supplyCap == 0 => no cap\n    //bit 152-167: liquidation protocol fee\n    //bit 168-175: DEPRECATED: eMode category\n    //bit 176-211: DEPRECATED: unbacked mint cap\n    //bit 212-251: debt ceiling for isolation mode with (ReserveConfiguration::DEBT_CEILING_DECIMALS) decimals\n    //bit 252: DEPRECATED: virtual accounting is enabled for the reserve\n    //bit 253-255 unused\n\n    uint256 data;\n  }\n\n  struct UserConfigurationMap {\n    /**\n     * @dev Bitmap of the users collaterals and borrows. It is divided in pairs of bits, one pair per asset.\n     * The first bit indicates if an asset is used as collateral by the user, the second whether an\n     * asset is borrowed by the user.\n     */\n    uint256 data;\n  }\n\n  // DEPRECATED: kept for backwards compatibility, might be removed in a future version\n  struct EModeCategoryLegacy {\n    // each eMode category has a custom ltv and liquidation threshold\n    uint16 ltv;\n    uint16 liquidationThreshold;\n    uint16 liquidationBonus;\n    // DEPRECATED\n    address priceSource;\n    string label;\n  }\n\n  struct CollateralConfig {\n    uint16 ltv;\n    uint16 liquidationThreshold;\n    uint16 liquidationBonus;\n  }\n\n  struct EModeCategoryBaseConfiguration {\n    uint16 ltv;\n    uint16 liquidationThreshold;\n    uint16 liquidationBonus;\n    string label;\n  }\n\n  struct EModeCategory {\n    // each eMode category has a custom ltv and liquidation threshold\n    uint16 ltv;\n    uint16 liquidationThreshold;\n    uint16 liquidationBonus;\n    uint128 collateralBitmap;\n    string label;\n    uint128 borrowableBitmap;\n  }\n\n  enum InterestRateMode {\n    NONE,\n    __DEPRECATED,\n    VARIABLE\n  }\n\n  struct ReserveCache {\n    uint256 currScaledVariableDebt;\n    uint256 nextScaledVariableDebt;\n    uint256 currLiquidityIndex;\n    uint256 nextLiquidityIndex;\n    uint256 currVariableBorrowIndex;\n    uint256 nextVariableBorrowIndex;\n    uint256 currLiquidityRate;\n    uint256 currVariableBorrowRate;\n    uint256 reserveFactor;\n    ReserveConfigurationMap reserveConfiguration;\n    address aTokenAddress;\n    address variableDebtTokenAddress;\n    uint40 reserveLastUpdateTimestamp;\n  }\n\n  struct ExecuteLiquidationCallParams {\n    address liquidator;\n    uint256 debtToCover;\n    address collateralAsset;\n    address debtAsset;\n    address borrower;\n    bool receiveAToken;\n    address priceOracle;\n    uint8 borrowerEModeCategory;\n    address priceOracleSentinel;\n    address interestRateStrategyAddress;\n  }\n\n  struct ExecuteSupplyParams {\n    address user;\n    address asset;\n    address interestRateStrategyAddress;\n    uint256 amount;\n    address onBehalfOf;\n    uint16 referralCode;\n  }\n\n  struct ExecuteBorrowParams {\n    address asset;\n    address user;\n    address onBehalfOf;\n    address interestRateStrategyAddress;\n    uint256 amount;\n    InterestRateMode interestRateMode;\n    uint16 referralCode;\n    bool releaseUnderlying;\n    address oracle;\n    uint8 userEModeCategory;\n    address priceOracleSentinel;\n  }\n\n  struct ExecuteRepayParams {\n    address asset;\n    address user;\n    address interestRateStrategyAddress;\n    uint256 amount;\n    InterestRateMode interestRateMode;\n    address onBehalfOf;\n    bool useATokens;\n    address oracle;\n    uint8 userEModeCategory;\n  }\n\n  struct ExecuteWithdrawParams {\n    address user;\n    address asset;\n    address interestRateStrategyAddress;\n    uint256 amount;\n    address to;\n    address oracle;\n    uint8 userEModeCategory;\n  }\n\n  struct ExecuteEliminateDeficitParams {\n    address user;\n    address asset;\n    address interestRateStrategyAddress;\n    uint256 amount;\n  }\n\n  struct FinalizeTransferParams {\n    address asset;\n    address from;\n    address to;\n    uint256 scaledAmount;\n    uint256 scaledBalanceFromBefore;\n    uint256 scaledBalanceToBefore;\n    address oracle;\n    uint8 fromEModeCategory;\n  }\n\n  struct FlashloanParams {\n    address user;\n    address receiverAddress;\n    address[] assets;\n    uint256[] amounts;\n    uint256[] interestRateModes;\n    address interestRateStrategyAddress;\n    address onBehalfOf;\n    bytes params;\n    uint16 referralCode;\n    uint256 flashLoanPremium;\n    address addressesProvider;\n    address pool;\n    uint8 userEModeCategory;\n    bool isAuthorizedFlashBorrower;\n  }\n\n  struct FlashloanSimpleParams {\n    address user;\n    address receiverAddress;\n    address asset;\n    address interestRateStrategyAddress;\n    uint256 amount;\n    bytes params;\n    uint16 referralCode;\n    uint256 flashLoanPremium;\n  }\n\n  struct FlashLoanRepaymentParams {\n    address user;\n    uint256 amount;\n    uint256 totalPremium;\n    address asset;\n    address interestRateStrategyAddress;\n    address receiverAddress;\n    uint16 referralCode;\n  }\n\n  struct CalculateUserAccountDataParams {\n    UserConfigurationMap userConfig;\n    address user;\n    address oracle;\n    uint8 userEModeCategory;\n  }\n\n  struct ValidateBorrowParams {\n    ReserveCache reserveCache;\n    UserConfigurationMap userConfig;\n    address asset;\n    address userAddress;\n    uint256 amountScaled;\n    InterestRateMode interestRateMode;\n    address oracle;\n    uint8 userEModeCategory;\n    address priceOracleSentinel;\n  }\n\n  struct ValidateLiquidationCallParams {\n    ReserveCache debtReserveCache;\n    uint256 totalDebt;\n    uint256 healthFactor;\n    address priceOracleSentinel;\n    address borrower;\n    address liquidator;\n  }\n\n  struct CalculateInterestRatesParams {\n    uint256 unbacked;\n    uint256 liquidityAdded;\n    uint256 liquidityTaken;\n    uint256 totalDebt;\n    uint256 reserveFactor;\n    address reserve;\n    // @notice DEPRECATED in 3.4, but kept for backwards compatibility\n    bool usingVirtualBalance;\n    uint256 virtualUnderlyingBalance;\n  }\n\n  struct InitReserveParams {\n    address asset;\n    address aTokenAddress;\n    address variableDebtAddress;\n    uint16 reservesCount;\n    uint16 maxNumberReserves;\n  }\n}\n"},"lib/openzeppelin-contracts/contracts/utils/cryptography/MessageHashUtils.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (utils/cryptography/MessageHashUtils.sol)\n\npragma solidity ^0.8.20;\n\nimport {Strings} from \"../Strings.sol\";\n\n/**\n * @dev Signature message hash utilities for producing digests to be consumed by {ECDSA} recovery or signing.\n *\n * The library provides methods for generating a hash of a message that conforms to the\n * https://eips.ethereum.org/EIPS/eip-191[ERC-191] and https://eips.ethereum.org/EIPS/eip-712[EIP 712]\n * specifications.\n */\nlibrary MessageHashUtils {\n    /**\n     * @dev Returns the keccak256 digest of an ERC-191 signed data with version\n     * `0x45` (`personal_sign` messages).\n     *\n     * The digest is calculated by prefixing a bytes32 `messageHash` with\n     * `\"\\x19Ethereum Signed Message:\\n32\"` and hashing the result. It corresponds with the\n     * hash signed when using the https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sign[`eth_sign`] JSON-RPC method.\n     *\n     * NOTE: The `messageHash` parameter is intended to be the result of hashing a raw message with\n     * keccak256, although any bytes32 value can be safely used because the final digest will\n     * be re-hashed.\n     *\n     * See {ECDSA-recover}.\n     */\n    function toEthSignedMessageHash(bytes32 messageHash) internal pure returns (bytes32 digest) {\n        assembly (\"memory-safe\") {\n            mstore(0x00, \"\\x19Ethereum Signed Message:\\n32\") // 32 is the bytes-length of messageHash\n            mstore(0x1c, messageHash) // 0x1c (28) is the length of the prefix\n            digest := keccak256(0x00, 0x3c) // 0x3c is the length of the prefix (0x1c) + messageHash (0x20)\n        }\n    }\n\n    /**\n     * @dev Returns the keccak256 digest of an ERC-191 signed data with version\n     * `0x45` (`personal_sign` messages).\n     *\n     * The digest is calculated by prefixing an arbitrary `message` with\n     * `\"\\x19Ethereum Signed Message:\\n\" + len(message)` and hashing the result. It corresponds with the\n     * hash signed when using the https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sign[`eth_sign`] JSON-RPC method.\n     *\n     * See {ECDSA-recover}.\n     */\n    function toEthSignedMessageHash(bytes memory message) internal pure returns (bytes32) {\n        return\n            keccak256(bytes.concat(\"\\x19Ethereum Signed Message:\\n\", bytes(Strings.toString(message.length)), message));\n    }\n\n    /**\n     * @dev Returns the keccak256 digest of an ERC-191 signed data with version\n     * `0x00` (data with intended validator).\n     *\n     * The digest is calculated by prefixing an arbitrary `data` with `\"\\x19\\x00\"` and the intended\n     * `validator` address. Then hashing the result.\n     *\n     * See {ECDSA-recover}.\n     */\n    function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {\n        return keccak256(abi.encodePacked(hex\"19_00\", validator, data));\n    }\n\n    /**\n     * @dev Variant of {toDataWithIntendedValidatorHash-address-bytes} optimized for cases where `data` is a bytes32.\n     */\n    function toDataWithIntendedValidatorHash(\n        address validator,\n        bytes32 messageHash\n    ) internal pure returns (bytes32 digest) {\n        assembly (\"memory-safe\") {\n            mstore(0x00, hex\"19_00\")\n            mstore(0x02, shl(96, validator))\n            mstore(0x16, messageHash)\n            digest := keccak256(0x00, 0x36)\n        }\n    }\n\n    /**\n     * @dev Returns the keccak256 digest of an EIP-712 typed data (ERC-191 version `0x01`).\n     *\n     * The digest is calculated from a `domainSeparator` and a `structHash`, by prefixing them with\n     * `\\x19\\x01` and hashing the result. It corresponds to the hash signed by the\n     * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] JSON-RPC method as part of EIP-712.\n     *\n     * See {ECDSA-recover}.\n     */\n    function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 digest) {\n        assembly (\"memory-safe\") {\n            let ptr := mload(0x40)\n            mstore(ptr, hex\"19_01\")\n            mstore(add(ptr, 0x02), domainSeparator)\n            mstore(add(ptr, 0x22), structHash)\n            digest := keccak256(ptr, 0x42)\n        }\n    }\n}\n"},"lib/openzeppelin-contracts/contracts/utils/cryptography/SignatureChecker.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/cryptography/SignatureChecker.sol)\n\npragma solidity ^0.8.24;\n\nimport {ECDSA} from \"./ECDSA.sol\";\nimport {IERC1271} from \"../../interfaces/IERC1271.sol\";\nimport {IERC7913SignatureVerifier} from \"../../interfaces/IERC7913.sol\";\nimport {Bytes} from \"../../utils/Bytes.sol\";\n\n/**\n * @dev Signature verification helper that can be used instead of `ECDSA.recover` to seamlessly support:\n *\n * * ECDSA signatures from externally owned accounts (EOAs)\n * * ERC-1271 signatures from smart contract wallets like Argent and Safe Wallet (previously Gnosis Safe)\n * * ERC-7913 signatures from keys that do not have an Ethereum address of their own\n *\n * See https://eips.ethereum.org/EIPS/eip-1271[ERC-1271] and https://eips.ethereum.org/EIPS/eip-7913[ERC-7913].\n */\nlibrary SignatureChecker {\n    using Bytes for bytes;\n\n    /**\n     * @dev Checks if a signature is valid for a given signer and data hash. If the signer has code, the\n     * signature is validated against it using ERC-1271, otherwise it's validated using `ECDSA.recover`.\n     *\n     * NOTE: Unlike ECDSA signatures, contract signatures are revocable, and the outcome of this function can thus\n     * change through time. It could return true at block N and false at block N+1 (or the opposite).\n     *\n     * NOTE: For an extended version of this function that supports ERC-7913 signatures, see {isValidSignatureNow-bytes-bytes32-bytes-}.\n     */\n    function isValidSignatureNow(address signer, bytes32 hash, bytes memory signature) internal view returns (bool) {\n        if (signer.code.length == 0) {\n            (address recovered, ECDSA.RecoverError err, ) = ECDSA.tryRecover(hash, signature);\n            return err == ECDSA.RecoverError.NoError && recovered == signer;\n        } else {\n            return isValidERC1271SignatureNow(signer, hash, signature);\n        }\n    }\n\n    /**\n     * @dev Checks if a signature is valid for a given signer and data hash. The signature is validated\n     * against the signer smart contract using ERC-1271.\n     *\n     * NOTE: Unlike ECDSA signatures, contract signatures are revocable, and the outcome of this function can thus\n     * change through time. It could return true at block N and false at block N+1 (or the opposite).\n     */\n    function isValidERC1271SignatureNow(\n        address signer,\n        bytes32 hash,\n        bytes memory signature\n    ) internal view returns (bool) {\n        (bool success, bytes memory result) = signer.staticcall(\n            abi.encodeCall(IERC1271.isValidSignature, (hash, signature))\n        );\n        return (success &&\n            result.length >= 32 &&\n            abi.decode(result, (bytes32)) == bytes32(IERC1271.isValidSignature.selector));\n    }\n\n    /**\n     * @dev Verifies a signature for a given ERC-7913 signer and hash.\n     *\n     * The signer is a `bytes` object that is the concatenation of an address and optionally a key:\n     * `verifier || key`. A signer must be at least 20 bytes long.\n     *\n     * Verification is done as follows:\n     *\n     * * If `signer.length < 20`: verification fails\n     * * If `signer.length == 20`: verification is done using {isValidSignatureNow}\n     * * Otherwise: verification is done using {IERC7913SignatureVerifier}\n     *\n     * NOTE: Unlike ECDSA signatures, contract signatures are revocable, and the outcome of this function can thus\n     * change through time. It could return true at block N and false at block N+1 (or the opposite).\n     */\n    function isValidSignatureNow(\n        bytes memory signer,\n        bytes32 hash,\n        bytes memory signature\n    ) internal view returns (bool) {\n        if (signer.length < 20) {\n            return false;\n        } else if (signer.length == 20) {\n            return isValidSignatureNow(address(bytes20(signer)), hash, signature);\n        } else {\n            (bool success, bytes memory result) = address(bytes20(signer)).staticcall(\n                abi.encodeCall(IERC7913SignatureVerifier.verify, (signer.slice(20), hash, signature))\n            );\n            return (success &&\n                result.length >= 32 &&\n                abi.decode(result, (bytes32)) == bytes32(IERC7913SignatureVerifier.verify.selector));\n        }\n    }\n\n    /**\n     * @dev Verifies multiple ERC-7913 `signatures` for a given `hash` using a set of `signers`.\n     * Returns `false` if the number of signers and signatures is not the same.\n     *\n     * The signers should be ordered by their `keccak256` hash to ensure efficient duplication check. Unordered\n     * signers are supported, but the uniqueness check will be more expensive.\n     *\n     * NOTE: Unlike ECDSA signatures, contract signatures are revocable, and the outcome of this function can thus\n     * change through time. It could return true at block N and false at block N+1 (or the opposite).\n     */\n    function areValidSignaturesNow(\n        bytes32 hash,\n        bytes[] memory signers,\n        bytes[] memory signatures\n    ) internal view returns (bool) {\n        if (signers.length != signatures.length) return false;\n\n        bytes32 lastId = bytes32(0);\n\n        for (uint256 i = 0; i < signers.length; ++i) {\n            bytes memory signer = signers[i];\n\n            // If one of the signatures is invalid, reject the batch\n            if (!isValidSignatureNow(signer, hash, signatures[i])) return false;\n\n            bytes32 id = keccak256(signer);\n            // If the current signer ID is greater than all previous IDs, then this is a new signer.\n            if (lastId < id) {\n                lastId = id;\n            } else {\n                // If this signer id is not greater than all the previous ones, verify that it is not a duplicate of a previous one\n                // This loop is never executed if the signers are ordered by id.\n                for (uint256 j = 0; j < i; ++j) {\n                    if (id == keccak256(signers[j])) return false;\n                }\n            }\n        }\n\n        return true;\n    }\n}\n"},"lib/aave-v3-origin/src/contracts/misc/flashloan/interfaces/IFlashLoanReceiver.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {IPoolAddressesProvider} from '../../../interfaces/IPoolAddressesProvider.sol';\nimport {IPool} from '../../../interfaces/IPool.sol';\n\n/**\n * @title IFlashLoanReceiver\n * @author Aave\n * @notice Defines the basic interface of a flashloan-receiver contract.\n * @dev Implement this interface to develop a flashloan-compatible flashLoanReceiver contract\n */\ninterface IFlashLoanReceiver {\n  /**\n   * @notice Executes an operation after receiving the flash-borrowed assets\n   * @dev Ensure that the contract can return the debt + premium, e.g., has\n   *      enough funds to repay and has approved the Pool to pull the total amount\n   * @param assets The addresses of the flash-borrowed assets\n   * @param amounts The amounts of the flash-borrowed assets\n   * @param premiums The fee of each flash-borrowed asset\n   * @param initiator The address of the flashloan initiator\n   * @param params The byte-encoded params passed when initiating the flashloan\n   * @return True if the execution of the operation succeeds, false otherwise\n   */\n  function executeOperation(\n    address[] calldata assets,\n    uint256[] calldata amounts,\n    uint256[] calldata premiums,\n    address initiator,\n    bytes calldata params\n  ) external returns (bool);\n\n  function ADDRESSES_PROVIDER() external view returns (IPoolAddressesProvider);\n\n  function POOL() external view returns (IPool);\n}\n"}},"language":"Solidity","settings":{"viaIR":false,"metadata":{"appendCBOR":true,"bytecodeHash":"none","useLiteralContent":false},"optimizer":{"runs":999999,"enabled":true},"evmVersion":"cancun","remappings":["forge-std/=lib/forge-std/src/","solidity-utils/=lib/aave-v3-origin/lib/solidity-utils/src/contracts/","aave-v3-origin/=lib/aave-v3-origin/src/","aave-address-book/=lib/aave-address-book/src/","openzeppelin/=lib/openzeppelin-contracts/contracts/","cowprotocol/flash-loan-router/=lib/flash-loan-router/src/","cowprotocol/contracts/=lib/contracts/src/contracts/","cowprotocol/test/=lib/contracts/test/","@openzeppelin/contracts-upgradeable/=lib/aave-v3-origin/lib/solidity-utils/lib/openzeppelin-contracts-upgradeable/contracts/","@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/","contracts/=lib/contracts/src/","ds-test/=lib/aave-v3-origin/lib/forge-std/lib/ds-test/src/","erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/","flash-loan-router/=lib/flash-loan-router/","halmos-cheatcodes/=lib/openzeppelin-contracts/lib/halmos-cheatcodes/src/","openzeppelin-contracts-upgradeable/=lib/aave-v3-origin/lib/solidity-utils/lib/openzeppelin-contracts-upgradeable/","openzeppelin-contracts/=lib/openzeppelin-contracts/"]}},"stdJsonOutput":{"sources":{"src/libraries/DataTypes.sol":{"id":44},"src/interfaces/IAaveBaseAdapter.sol":{"id":42},"src/contracts/BaseAdapterFactory.sol":{"id":40},"src/contracts/AaveV3AdapterFactory.sol":{"id":39},"src/interfaces/IBaseAdapterFactory.sol":{"id":43},"src/dependencies/cow/IBasicBorrower.sol":{"id":41},"lib/flash-loan-router/src/library/Loan.sol":{"id":9},"lib/flash-loan-router/src/vendored/IERC20.sol":{"id":11},"lib/contracts/src/contracts/interfaces/IERC20.sol":{"id":4},"lib/flash-loan-router/src/interface/IBorrower.sol":{"id":6},"lib/contracts/src/contracts/libraries/GPv2Order.sol":{"id":5},"lib/openzeppelin-contracts/contracts/utils/Bytes.sol":{"id":22},"lib/openzeppelin-contracts/contracts/utils/Panic.sol":{"id":26},"lib/aave-v3-origin/src/contracts/interfaces/IPool.sol":{"id":0},"lib/openzeppelin-contracts/contracts/proxy/Clones.sol":{"id":19},"lib/openzeppelin-contracts/contracts/utils/Errors.sol":{"id":25},"lib/flash-loan-router/src/interface/ICowSettlement.sol":{"id":7},"lib/openzeppelin-contracts/contracts/utils/Context.sol":{"id":23},"lib/openzeppelin-contracts/contracts/utils/Create2.sol":{"id":24},"lib/openzeppelin-contracts/contracts/utils/Strings.sol":{"id":30},"lib/openzeppelin-contracts/contracts/access/Ownable.sol":{"id":12},"lib/openzeppelin-contracts/contracts/utils/Pausable.sol":{"id":27},"lib/flash-loan-router/src/interface/IFlashLoanRouter.sol":{"id":8},"lib/openzeppelin-contracts/contracts/utils/math/Math.sol":{"id":36},"lib/flash-loan-router/src/vendored/ICowAuthentication.sol":{"id":10},"lib/openzeppelin-contracts/contracts/interfaces/IERC20.sol":{"id":16},"lib/openzeppelin-contracts/contracts/utils/StorageSlot.sol":{"id":29},"lib/openzeppelin-contracts/contracts/interfaces/IERC165.sol":{"id":15},"lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol":{"id":20},"lib/openzeppelin-contracts/contracts/utils/ShortStrings.sol":{"id":28},"lib/openzeppelin-contracts/contracts/interfaces/IERC1271.sol":{"id":13},"lib/openzeppelin-contracts/contracts/interfaces/IERC1363.sol":{"id":14},"lib/openzeppelin-contracts/contracts/interfaces/IERC5267.sol":{"id":17},"lib/openzeppelin-contracts/contracts/interfaces/IERC7913.sol":{"id":18},"lib/openzeppelin-contracts/contracts/utils/math/SafeCast.sol":{"id":37},"lib/openzeppelin-contracts/contracts/utils/math/SignedMath.sol":{"id":38},"lib/openzeppelin-contracts/contracts/utils/cryptography/ECDSA.sol":{"id":31},"lib/openzeppelin-contracts/contracts/utils/cryptography/EIP712.sol":{"id":32},"lib/openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol":{"id":21},"lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol":{"id":35},"lib/aave-v3-origin/src/contracts/interfaces/IPoolAddressesProvider.sol":{"id":1},"lib/aave-v3-origin/src/contracts/protocol/libraries/types/DataTypes.sol":{"id":3},"lib/openzeppelin-contracts/contracts/utils/cryptography/MessageHashUtils.sol":{"id":33},"lib/openzeppelin-contracts/contracts/utils/cryptography/SignatureChecker.sol":{"id":34},"lib/aave-v3-origin/src/contracts/misc/flashloan/interfaces/IFlashLoanReceiver.sol":{"id":2}},"contracts":{"src/contracts/AaveV3AdapterFactory.sol":{"AaveV3AdapterFactory":{"abi":[{"type":"constructor","inputs":[{"name":"aavePool_","type":"address","internalType":"address"},{"name":"settlement_","type":"address","internalType":"address"},{"name":"router_","type":"address","internalType":"address"},{"name":"owner_","type":"address","internalType":"address"}],"stateMutability":"nonpayable"},{"name":"CallerNotAavePool","type":"error","inputs":[]},{"name":"CallerNotInstance","type":"error","inputs":[]},{"name":"CallerNotRouter","type":"error","inputs":[]},{"name":"EnforcedPause","type":"error","inputs":[]},{"name":"ExpectedPause","type":"error","inputs":[]},{"name":"FailedDeployment","type":"error","inputs":[]},{"name":"ImplementationAlreadyListed","type":"error","inputs":[]},{"name":"ImplementationNotActive","type":"error","inputs":[]},{"name":"InstanceAlreadyDeployed","type":"error","inputs":[]},{"name":"InstanceCancelled","type":"error","inputs":[]},{"name":"InstanceNotInitialized","type":"error","inputs":[]},{"name":"InsufficientBalance","type":"error","inputs":[{"name":"balance","type":"uint256","internalType":"uint256"},{"name":"needed","type":"uint256","internalType":"uint256"}]},{"name":"InvalidLender","type":"error","inputs":[]},{"name":"InvalidOrderReceiver","type":"error","inputs":[]},{"name":"InvalidShortString","type":"error","inputs":[]},{"name":"InvalidZeroAddress","type":"error","inputs":[]},{"name":"InvalidZeroAmount","type":"error","inputs":[]},{"name":"NothingToRepay","type":"error","inputs":[]},{"name":"OwnableInvalidOwner","type":"error","inputs":[{"name":"owner","type":"address","internalType":"address"}]},{"name":"OwnableUnauthorizedAccount","type":"error","inputs":[{"name":"account","type":"address","internalType":"address"}]},{"name":"SafeERC20FailedOperation","type":"error","inputs":[{"name":"token","type":"address","internalType":"address"}]},{"name":"StringTooLong","type":"error","inputs":[{"name":"str","type":"string","internalType":"string"}]},{"name":"CancelInstance","type":"event","inputs":[{"name":"user","type":"address","indexed":true,"internalType":"address"},{"name":"instanceAddress","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"name":"EIP712DomainChanged","type":"event","inputs":[],"anonymous":false},{"name":"OwnershipTransferred","type":"event","inputs":[{"name":"previousOwner","type":"address","indexed":true,"internalType":"address"},{"name":"newOwner","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"name":"Paused","type":"event","inputs":[{"name":"account","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"name":"SetAdapterImplementation","type":"event","inputs":[{"name":"adapterImplementation","type":"address","indexed":true,"internalType":"address"},{"name":"active","type":"bool","indexed":false,"internalType":"bool"}],"anonymous":false},{"name":"Unpaused","type":"event","inputs":[{"name":"account","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"name":"ADDRESSES_PROVIDER","type":"function","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract IPoolAddressesProvider"}],"stateMutability":"view"},{"name":"DOMAIN_SEPARATOR","type":"function","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"name":"POOL","type":"function","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract IPool"}],"stateMutability":"view"},{"name":"ROUTER","type":"function","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract IFlashLoanRouter"}],"stateMutability":"view"},{"name":"SETTLEMENT_CONTRACT","type":"function","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract ICowSettlement"}],"stateMutability":"view"},{"name":"cancelInstance","type":"function","inputs":[{"name":"instance","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"deployAndTransferFlashLoan","type":"function","inputs":[{"name":"adapterImplementation","type":"address","internalType":"address"},{"name":"hookData","type":"tuple","components":[{"name":"owner","type":"address","internalType":"address"},{"name":"receiver","type":"address","internalType":"address"},{"name":"sellToken","type":"address","internalType":"address"},{"name":"buyToken","type":"address","internalType":"address"},{"name":"sellAmount","type":"uint256","internalType":"uint256"},{"name":"buyAmount","type":"uint256","internalType":"uint256"},{"name":"kind","type":"bytes32","internalType":"bytes32"},{"name":"validTo","type":"uint256","internalType":"uint256"},{"name":"flashLoanAmount","type":"uint256","internalType":"uint256"},{"name":"flashLoanFeeAmount","type":"uint256","internalType":"uint256"},{"name":"hookSellTokenAmount","type":"uint256","internalType":"uint256"},{"name":"hookBuyTokenAmount","type":"uint256","internalType":"uint256"}],"internalType":"struct DataTypes.HookOrderData"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"eip712Domain","type":"function","inputs":[],"outputs":[{"name":"fields","type":"bytes1","internalType":"bytes1"},{"name":"name","type":"string","internalType":"string"},{"name":"version","type":"string","internalType":"string"},{"name":"chainId","type":"uint256","internalType":"uint256"},{"name":"verifyingContract","type":"address","internalType":"address"},{"name":"salt","type":"bytes32","internalType":"bytes32"},{"name":"extensions","type":"uint256[]","internalType":"uint256[]"}],"stateMutability":"view"},{"name":"executeOperation","type":"function","inputs":[{"name":"","type":"address[]","internalType":"address[]"},{"name":"","type":"uint256[]","internalType":"uint256[]"},{"name":"","type":"uint256[]","internalType":"uint256[]"},{"name":"","type":"address","internalType":"address"},{"name":"callbackData","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"name":"flashLoanAndCallBack","type":"function","inputs":[{"name":"lender","type":"address","internalType":"address"},{"name":"token","type":"address","internalType":"contract IERC20"},{"name":"amount","type":"uint256","internalType":"uint256"},{"name":"callbackData","type":"bytes","internalType":"bytes"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"getInstanceDeterministicAddress","type":"function","inputs":[{"name":"adapterImplementation","type":"address","internalType":"address"},{"name":"hookData","type":"tuple","components":[{"name":"owner","type":"address","internalType":"address"},{"name":"receiver","type":"address","internalType":"address"},{"name":"sellToken","type":"address","internalType":"address"},{"name":"buyToken","type":"address","internalType":"address"},{"name":"sellAmount","type":"uint256","internalType":"uint256"},{"name":"buyAmount","type":"uint256","internalType":"uint256"},{"name":"kind","type":"bytes32","internalType":"bytes32"},{"name":"validTo","type":"uint256","internalType":"uint256"},{"name":"flashLoanAmount","type":"uint256","internalType":"uint256"},{"name":"flashLoanFeeAmount","type":"uint256","internalType":"uint256"},{"name":"hookSellTokenAmount","type":"uint256","internalType":"uint256"},{"name":"hookBuyTokenAmount","type":"uint256","internalType":"uint256"}],"internalType":"struct DataTypes.HookOrderData"}],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"name":"isAdapterImplementation","type":"function","inputs":[{"name":"","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"name":"isInstanceCancelled","type":"function","inputs":[{"name":"","type":"address","internalType":"address"},{"name":"","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"name":"notifyRepayFlashLoan","type":"function","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"name":"openFlashLoans","type":"function","inputs":[{"name":"","type":"address","internalType":"address"}],"outputs":[{"name":"instanceActive","type":"bool","internalType":"bool"},{"name":"asset","type":"address","internalType":"address"},{"name":"totalAmount","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"owner","type":"function","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"name":"pause","type":"function","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"name":"paused","type":"function","inputs":[],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"name":"renounceOwnership","type":"function","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"name":"rescueTokens","type":"function","inputs":[{"name":"token","type":"address","internalType":"contract IERC20"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"setAdapterImplementation","type":"function","inputs":[{"name":"adapterImplementation","type":"address","internalType":"address"},{"name":"active","type":"bool","internalType":"bool"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"transferOwnership","type":"function","inputs":[{"name":"newOwner","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"unpause","type":"function","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"name":"verifyOrderSignature","type":"function","inputs":[{"name":"orderOwner","type":"address","internalType":"address"},{"name":"order","type":"tuple","components":[{"name":"sellToken","type":"address","internalType":"contract IERC20"},{"name":"buyToken","type":"address","internalType":"contract IERC20"},{"name":"receiver","type":"address","internalType":"address"},{"name":"sellAmount","type":"uint256","internalType":"uint256"},{"name":"buyAmount","type":"uint256","internalType":"uint256"},{"name":"validTo","type":"uint32","internalType":"uint32"},{"name":"appData","type":"bytes32","internalType":"bytes32"},{"name":"feeAmount","type":"uint256","internalType":"uint256"},{"name":"kind","type":"bytes32","internalType":"bytes32"},{"name":"partiallyFillable","type":"bool","internalType":"bool"},{"name":"sellTokenBalance","type":"bytes32","internalType":"bytes32"},{"name":"buyTokenBalance","type":"bytes32","internalType":"bytes32"}],"internalType":"struct GPv2Order.Data"},{"name":"signature","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"}],"metadata":"{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"aavePool_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"settlement_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"router_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"CallerNotAavePool\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CallerNotInstance\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CallerNotRouter\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"EnforcedPause\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ExpectedPause\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FailedDeployment\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ImplementationAlreadyListed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ImplementationNotActive\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InstanceAlreadyDeployed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InstanceCancelled\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InstanceNotInitialized\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"balance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"needed\",\"type\":\"uint256\"}],\"name\":\"InsufficientBalance\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidLender\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidOrderReceiver\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidShortString\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidZeroAddress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidZeroAmount\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NothingToRepay\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"OwnableInvalidOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"OwnableUnauthorizedAccount\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"SafeERC20FailedOperation\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"str\",\"type\":\"string\"}],\"name\":\"StringTooLong\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"instanceAddress\",\"type\":\"address\"}],\"name\":\"CancelInstance\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"EIP712DomainChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"adapterImplementation\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"active\",\"type\":\"bool\"}],\"name\":\"SetAdapterImplementation\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"ADDRESSES_PROVIDER\",\"outputs\":[{\"internalType\":\"contract IPoolAddressesProvider\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DOMAIN_SEPARATOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"POOL\",\"outputs\":[{\"internalType\":\"contract IPool\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"ROUTER\",\"outputs\":[{\"internalType\":\"contract IFlashLoanRouter\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"SETTLEMENT_CONTRACT\",\"outputs\":[{\"internalType\":\"contract ICowSettlement\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"instance\",\"type\":\"address\"}],\"name\":\"cancelInstance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"adapterImplementation\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"sellToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"buyToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"sellAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"buyAmount\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"kind\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"validTo\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"flashLoanAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"flashLoanFeeAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"hookSellTokenAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"hookBuyTokenAmount\",\"type\":\"uint256\"}],\"internalType\":\"struct DataTypes.HookOrderData\",\"name\":\"hookData\",\"type\":\"tuple\"}],\"name\":\"deployAndTransferFlashLoan\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"eip712Domain\",\"outputs\":[{\"internalType\":\"bytes1\",\"name\":\"fields\",\"type\":\"bytes1\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"version\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"verifyingContract\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"salt\",\"type\":\"bytes32\"},{\"internalType\":\"uint256[]\",\"name\":\"extensions\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"callbackData\",\"type\":\"bytes\"}],\"name\":\"executeOperation\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"lender\",\"type\":\"address\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"callbackData\",\"type\":\"bytes\"}],\"name\":\"flashLoanAndCallBack\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"adapterImplementation\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"sellToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"buyToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"sellAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"buyAmount\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"kind\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"validTo\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"flashLoanAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"flashLoanFeeAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"hookSellTokenAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"hookBuyTokenAmount\",\"type\":\"uint256\"}],\"internalType\":\"struct DataTypes.HookOrderData\",\"name\":\"hookData\",\"type\":\"tuple\"}],\"name\":\"getInstanceDeterministicAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"isAdapterImplementation\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"isInstanceCancelled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"notifyRepayFlashLoan\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"openFlashLoans\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"instanceActive\",\"type\":\"bool\"},{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"totalAmount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"rescueTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"adapterImplementation\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"active\",\"type\":\"bool\"}],\"name\":\"setAdapterImplementation\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"orderOwner\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"contract IERC20\",\"name\":\"sellToken\",\"type\":\"address\"},{\"internalType\":\"contract IERC20\",\"name\":\"buyToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"sellAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"buyAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"validTo\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"appData\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"feeAmount\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"kind\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"partiallyFillable\",\"type\":\"bool\"},{\"internalType\":\"bytes32\",\"name\":\"sellTokenBalance\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"buyTokenBalance\",\"type\":\"bytes32\"}],\"internalType\":\"struct GPv2Order.Data\",\"name\":\"order\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"name\":\"verifyOrderSignature\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Aave Labs.\",\"errors\":{\"EnforcedPause()\":[{\"details\":\"The operation failed because the contract is paused.\"}],\"ExpectedPause()\":[{\"details\":\"The operation failed because the contract is not paused.\"}],\"FailedDeployment()\":[{\"details\":\"The deployment failed.\"}],\"InsufficientBalance(uint256,uint256)\":[{\"details\":\"The ETH balance of the account is not enough to perform the operation.\"}],\"OwnableInvalidOwner(address)\":[{\"details\":\"The owner is not a valid owner account. (eg. `address(0)`)\"}],\"OwnableUnauthorizedAccount(address)\":[{\"details\":\"The caller account is not authorized to perform an operation.\"}],\"SafeERC20FailedOperation(address)\":[{\"details\":\"An operation with an ERC-20 token failed.\"}]},\"events\":{\"EIP712DomainChanged()\":{\"details\":\"MAY be emitted to signal that the domain could have changed.\"},\"Paused(address)\":{\"details\":\"Emitted when the pause is triggered by `account`.\"},\"Unpaused(address)\":{\"details\":\"Emitted when the pause is lifted by `account`.\"}},\"kind\":\"dev\",\"methods\":{\"DOMAIN_SEPARATOR()\":{\"returns\":{\"_0\":\"The domain separator.\"}},\"cancelInstance(address)\":{\"details\":\"This is used to cancel a pending EIP-1271 Order before it is executed, by blocking the deployment of the Instance.\",\"params\":{\"instance\":\"The address of the Adapter Instance to cancel.\"}},\"constructor\":{\"details\":\"Constructor.\",\"params\":{\"aavePool_\":\"The address of the Aave V3 Pool contract.\",\"owner_\":\"The address of the owner of the Factory.\",\"router_\":\"The address of the Cow FlashLoan Router contract.\",\"settlement_\":\"The address of the Cow Settlement contract.\"}},\"deployAndTransferFlashLoan(address,(address,address,address,address,uint256,uint256,bytes32,uint256,uint256,uint256,uint256,uint256))\":{\"params\":{\"adapterImplementation\":\"The address of the Adapter Instance implementation to clone.\",\"hookData\":\"The HookOrderData struct containing the order details & postHook parameters.\"}},\"eip712Domain()\":{\"details\":\"returns the fields and values that describe the domain separator used by this contract for EIP-712 signature.\"},\"executeOperation(address[],uint256[],uint256[],address,bytes)\":{\"details\":\"Ensure that the contract can return the debt + premium, e.g., has      enough funds to repay and has approved the Pool to pull the total amount\",\"params\":{\"amounts\":\"The amounts of the flash-borrowed assets\",\"assets\":\"The addresses of the flash-borrowed assets\",\"initiator\":\"The address of the flashloan initiator\",\"params\":\"The byte-encoded params passed when initiating the flashloan\",\"premiums\":\"The fee of each flash-borrowed asset\"},\"returns\":{\"_0\":\"True if the execution of the operation succeeds, false otherwise\"}},\"flashLoanAndCallBack(address,address,uint256,bytes)\":{\"params\":{\"amount\":\"The amount of the FlashLoan\",\"callbackData\":\"Data to send back to the FlashLoanRouter during the callback\",\"lender\":\"The address of the lender to draw the FlashLoan from\",\"token\":\"The address of the ERC20 token for the FlashLoan\"}},\"getInstanceDeterministicAddress(address,(address,address,address,address,uint256,uint256,bytes32,uint256,uint256,uint256,uint256,uint256))\":{\"params\":{\"adapterImplementation\":\"The address of the Adapter Implementation to clone.\",\"hookData\":\"The HookOrderData struct containing the order details & postHook parameters.\"},\"returns\":{\"_0\":\"The determined address of the Adapter Instance.\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.\"},\"rescueTokens(address)\":{\"details\":\"Emergency rescue for token stucked on this contract, as failsafe mechanism.- Funds should never remain in this contract more time than during transactions.- Only callable by the owner.\"},\"setAdapterImplementation(address,bool)\":{\"params\":{\"active\":\"True to activate, false to deactivate.\",\"adapterImplementation\":\"The address of the Adapter Implementation.\"}},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"verifyOrderSignature(address,(address,address,address,uint256,uint256,uint32,bytes32,uint256,bytes32,bool,bytes32,bytes32),bytes)\":{\"params\":{\"order\":\"The Order data to verify.\",\"orderOwner\":\"The address of the owner of the Order.\",\"signature\":\"The signature to verify.\"},\"returns\":{\"_0\":\"True if the signature is valid, false otherwise.\"}}},\"stateVariables\":{\"REFERRAL_CODE\":{\"details\":\"Referral code to pass to the Aave Pool\"}},\"version\":1},\"userdoc\":{\"errors\":{\"CallerNotAavePool()\":[{\"notice\":\"Thrown when the caller is not the Aave Pool.\"}],\"CallerNotInstance()\":[{\"notice\":\"Thrown when the caller is not an Instance deployed by the Factory.\"}],\"CallerNotRouter()\":[{\"notice\":\"Thrown when the caller is not the Router.\"}],\"ImplementationAlreadyListed()\":[{\"notice\":\"Thrown when the specified implementation is already listed.\"}],\"ImplementationNotActive()\":[{\"notice\":\"Thrown when the specified implementation is not active.\"}],\"InstanceAlreadyDeployed()\":[{\"notice\":\"Thrown when the Instance is already deployed.\"}],\"InstanceCancelled()\":[{\"notice\":\"Thrown when the order has been cancelled by the user.\"}],\"InstanceNotInitialized()\":[{\"notice\":\"Thrown when the Instance is not initialized.\"}],\"InvalidLender()\":[{\"notice\":\"Thrown when the specified lender is not the valid one for the Factory.\"}],\"InvalidOrderReceiver()\":[{\"notice\":\"Thrown when the order receiver is invalid.\"}],\"InvalidZeroAddress()\":[{\"notice\":\"Thrown when the specified address is the zero address.\"}],\"InvalidZeroAmount()\":[{\"notice\":\"Thrown when the specified amount is null.\"}],\"NothingToRepay()\":[{\"notice\":\"Thrown when the calling Instance has nothing to repay.\"}]},\"events\":{\"CancelInstance(address,address)\":{\"notice\":\"Emitted when an Instance owner cancels it.\"},\"SetAdapterImplementation(address,bool)\":{\"notice\":\"Emitted when an AdapterHook Implementations status is updated.\"}},\"kind\":\"user\",\"methods\":{\"DOMAIN_SEPARATOR()\":{\"notice\":\"Returns the domain separator used in the EIP712 encoding of the AdapterOrderSig struct.\"},\"ROUTER()\":{\"notice\":\"FlashLoanRouter contract.\"},\"SETTLEMENT_CONTRACT()\":{\"notice\":\"Settlement contract.\"},\"cancelInstance(address)\":{\"notice\":\"Cancels an Adapter Instance to be deployed by the Factory.\"},\"deployAndTransferFlashLoan(address,(address,address,address,address,uint256,uint256,bytes32,uint256,uint256,uint256,uint256,uint256))\":{\"notice\":\"Deploys an Adapter Instance and transfers the FlashLoaned assets to it (must have been initiated before).\"},\"executeOperation(address[],uint256[],uint256[],address,bytes)\":{\"notice\":\"Executes an operation after receiving the flash-borrowed assets\"},\"flashLoanAndCallBack(address,address,uint256,bytes)\":{\"notice\":\"Start the flow to draw a FlashLoan then calls back the FlashLoanRouter contract with the given data\"},\"getInstanceDeterministicAddress(address,(address,address,address,address,uint256,uint256,bytes32,uint256,uint256,uint256,uint256,uint256))\":{\"notice\":\"Returns the determined address of an Adapter Instance to clone based on a specific Order.\"},\"isAdapterImplementation(address)\":{\"notice\":\"Mapping of Adapter implementations.\"},\"isInstanceCancelled(address,address)\":{\"notice\":\"Mapping to track cancelled Instances.\"},\"notifyRepayFlashLoan()\":{\"notice\":\"Notifies the AdapterFactory that a FlashLoan is ready to be repaid.\"},\"openFlashLoans(address)\":{\"notice\":\"Open FlashLoans data for Adapter Instances.\"},\"pause()\":{\"notice\":\"Pauses this contract\"},\"rescueTokens(address)\":{\"notice\":\"Rescue any ERC20 tokens left on the contract.\"},\"setAdapterImplementation(address,bool)\":{\"notice\":\"Sets the status of an AdapterHook Implementation.\"},\"unpause()\":{\"notice\":\"Unpauses this contract\"},\"verifyOrderSignature(address,(address,address,address,uint256,uint256,uint32,bytes32,uint256,bytes32,bool,bytes32,bytes32),bytes)\":{\"notice\":\"Verifies that the signature provided for an Order using an Adapter is valid.\"}},\"notice\":\"Factory contract to deploy listed AdapterHooks linked to Cow Orders & draw Flashloans from the Aave V3 Pool.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/contracts/AaveV3AdapterFactory.sol\":\"AaveV3AdapterFactory\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\"},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[\":@openzeppelin/contracts-upgradeable/=lib/aave-v3-origin/lib/solidity-utils/lib/openzeppelin-contracts-upgradeable/contracts/\",\":@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/\",\":aave-address-book/=lib/aave-address-book/src/\",\":aave-v3-origin/=lib/aave-v3-origin/src/\",\":contracts/=lib/contracts/src/\",\":cowprotocol/contracts/=lib/contracts/src/contracts/\",\":cowprotocol/flash-loan-router/=lib/flash-loan-router/src/\",\":cowprotocol/test/=lib/contracts/test/\",\":ds-test/=lib/aave-v3-origin/lib/forge-std/lib/ds-test/src/\",\":erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/\",\":flash-loan-router/=lib/flash-loan-router/\",\":forge-std/=lib/forge-std/src/\",\":halmos-cheatcodes/=lib/openzeppelin-contracts/lib/halmos-cheatcodes/src/\",\":openzeppelin-contracts-upgradeable/=lib/aave-v3-origin/lib/solidity-utils/lib/openzeppelin-contracts-upgradeable/\",\":openzeppelin-contracts/=lib/openzeppelin-contracts/\",\":openzeppelin/=lib/openzeppelin-contracts/contracts/\",\":solidity-utils/=lib/aave-v3-origin/lib/solidity-utils/src/contracts/\"]},\"sources\":{\"lib/aave-v3-origin/src/contracts/interfaces/IPool.sol\":{\"keccak256\":\"0x9b29acbc960b19ec5db42e1835eb6d9a37d6e88de09eab2234518f8a4f194682\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://f995836c3df4a8e434ae9607ee69dd993c4db52db7498e9a74439de0e8bb3e49\",\"dweb:/ipfs/QmQPcJP7HsYe7qf5iorymE3GHWHm1rLhNjACHhShK3w5ZT\"]},\"lib/aave-v3-origin/src/contracts/interfaces/IPoolAddressesProvider.sol\":{\"keccak256\":\"0xa60921cf54e91ca8db038effeffc876089b2e72dbf01d68a10ff461770d345e5\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://0de2fd03bf5cd6ae8718a486e5d615c67b260d0608b9fb7076888a4bfaa0e4b4\",\"dweb:/ipfs/QmXpdmxMugyJcBFAGJEruB78bkkuTwrH9esYRaS6wiQoMs\"]},\"lib/aave-v3-origin/src/contracts/misc/flashloan/interfaces/IFlashLoanReceiver.sol\":{\"keccak256\":\"0x1906b9f13bf1f6e49a67985cef3d4dc5b43aae608d9aed72baf4e99892bca066\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://dca31981d592762dcc3a54bec3a808eae1c967a440fa7452a56702387f6e2e4e\",\"dweb:/ipfs/QmdyDUJ1dRLqY1q46nK8u43cceCt3EFARv6VrfQKqBdRMS\"]},\"lib/aave-v3-origin/src/contracts/protocol/libraries/types/DataTypes.sol\":{\"keccak256\":\"0xcaacba608c81a6bdb94cc99b1daf451bcbd60c6a663146e6c630258b22a7f336\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://399a0988113445b5beeff7513eb5355c09c4f291ff65e09e399f16550e4a65fb\",\"dweb:/ipfs/QmQbN4FxqpVkWVT9YFEtLwu8MPSd8yAfCTqvnhArnd6Sc2\"]},\"lib/contracts/src/contracts/interfaces/IERC20.sol\":{\"keccak256\":\"0x2db02cc0e23db99d10cd21590425b714060a556bcfb934cb5ab3b80aef1610ba\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c05f8a21a244e6566a3e555028cebeebd1c38902f0cea2e9b014cc7becaf3140\",\"dweb:/ipfs/QmTBY1GphjwAnY2nC9qKMwj5HeAUJMgFdo5YZcVxsVyqFb\"]},\"lib/contracts/src/contracts/libraries/GPv2Order.sol\":{\"keccak256\":\"0xb96efb76433446cf0ccb9f5bc926301a9c8bcbfd17dcd6a36a1e6207f5b436b2\",\"license\":\"LGPL-3.0-or-later\",\"urls\":[\"bzz-raw://5ec097e17d3e47e16808a5246a99af7ef618bb58ccb61d7331bfca1929cbbd82\",\"dweb:/ipfs/QmbH7rg5s5gdpa5KENMUXHyGBWJyQn6XEwv9JakRSCcv8n\"]},\"lib/flash-loan-router/src/interface/IBorrower.sol\":{\"keccak256\":\"0x4c16d3b9a8e0f7f8041bfe14f4f1c174d77980167bd13826048627724dd03b1a\",\"license\":\"GPL-3.0-or-later\",\"urls\":[\"bzz-raw://de7e6dd5d8bff8b3597f1511c12c8eadde94ad25917da3b9f82b3c2a8c8746d9\",\"dweb:/ipfs/QmYqdaEWoHy5pooNt44hHLVfkzrVwucUzRTFyKVTiFczki\"]},\"lib/flash-loan-router/src/interface/ICowSettlement.sol\":{\"keccak256\":\"0xcdea37c4223e5d5cf1db24fff7c4dd86bdd1bdc11deab010f9d19e032a023559\",\"license\":\"GPL-3.0-or-later\",\"urls\":[\"bzz-raw://ccdcefd77bb4708d3d0a044603184b08a3a2d8c1505976c8703ed71e4812bcd6\",\"dweb:/ipfs/QmX1RrHkWWVzPjE79zYjHxayYXJHrBgt2XPfytZMFzgt8Z\"]},\"lib/flash-loan-router/src/interface/IFlashLoanRouter.sol\":{\"keccak256\":\"0x3569cca06fe71c03c33304a440c9344a8f930713b83d1dcf5dfa094e7f093619\",\"license\":\"GPL-3.0-or-later\",\"urls\":[\"bzz-raw://a013cc62e41fa9406c117420e3060a726190b7b388ac6691a8b09227cf43c000\",\"dweb:/ipfs/QmeF2vdGNbpDJYZXrQq8yKNWCTvLrZnbQMjGnKtUJRagBp\"]},\"lib/flash-loan-router/src/library/Loan.sol\":{\"keccak256\":\"0xa758db66d7089a91612c530478cd16a23d5969a74cddee9f65e6b7a9b17d6168\",\"license\":\"GPL-3.0-or-later\",\"urls\":[\"bzz-raw://7d7d717c74aefaf33c9bd53032bbeb83850a36f017ce278712c2f5ad1c4add6a\",\"dweb:/ipfs/QmfVxSWicxGNd2LfC9Bvrx7wNEGPM8NSuVJR22m5TkaL6E\"]},\"lib/flash-loan-router/src/vendored/ICowAuthentication.sol\":{\"keccak256\":\"0xc0b8ec08ce1e4ed2af4188ab08281b1a894d74b2dc69e045398e789f5a72d140\",\"license\":\"LGPL-3.0-or-later\",\"urls\":[\"bzz-raw://41917d1ba4f6846ddd52d7fe16189a14a836d62b255e3ad07ebbd46f33cdbfa4\",\"dweb:/ipfs/QmXTzjA9qoNX3aHehLJqMyx7qpZKitPE1Un3buB5QtKqfq\"]},\"lib/flash-loan-router/src/vendored/IERC20.sol\":{\"keccak256\":\"0xf7ed8bb586b03d2d8d9ff0751bbc3901961ec924a1c56be49df29415105e822f\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://4e05ff7c66f9fcf32424582e8f41f7a5fd78490c7e99ab246f053e78fb73c7fe\",\"dweb:/ipfs/QmUkhSqrwweNQUjZWTmwCe1sNQzYPpHA7aZAX4oYwUu4u6\"]},\"lib/openzeppelin-contracts/contracts/access/Ownable.sol\":{\"keccak256\":\"0xff6d0bb2e285473e5311d9d3caacb525ae3538a80758c10649a4d61029b017bb\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8ed324d3920bb545059d66ab97d43e43ee85fd3bd52e03e401f020afb0b120f6\",\"dweb:/ipfs/QmfEckWLmZkDDcoWrkEvMWhms66xwTLff9DDhegYpvHo1a\"]},\"lib/openzeppelin-contracts/contracts/interfaces/IERC1271.sol\":{\"keccak256\":\"0x085808648034e3c721a46fe3bc4d1421668152361012a16344651071ba30ab9e\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://cc760ce249af71aa3559bc7a096a0af0e376b48b9e04017f90132437aac9bdbd\",\"dweb:/ipfs/QmWT4jEqMoK6nbR7QmXvexoE3BMJEnsdikKywmnW9kofwT\"]},\"lib/openzeppelin-contracts/contracts/interfaces/IERC1363.sol\":{\"keccak256\":\"0xc15298eb2b9ba5e18a8c9d12f93ad17a3e162a5c1d9b85f54c8adb5827b0d4da\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1f3c3d8f81d2daf1231890a6a2f897be365d6a479b53dcd52ec2527b5d3faf41\",\"dweb:/ipfs/QmeNdkd6u4at9pd2GAyyqxzrVGGvxfLpGmAKnFoYM5ya2e\"]},\"lib/openzeppelin-contracts/contracts/interfaces/IERC165.sol\":{\"keccak256\":\"0x81b022028c39007cce9920c394b9cddd1cb9f3a1c0398f254b4a6492df92ad2b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://e0b61b8a5c69b4df993c3d6f94c174ab293aa8698d149bce7be2d88f82929beb\",\"dweb:/ipfs/QmbtacmB1k8ginfrHvAJpjVeqnjYGfXYrkXmMPYEb83z4t\"]},\"lib/openzeppelin-contracts/contracts/interfaces/IERC20.sol\":{\"keccak256\":\"0xb5d81383d40f4006d1ce4bbad0064e7a930e17302cbe2a745e09cb403f042733\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://3fc4a5681c2f00f41f49260a36ae6bbe1121dd93d470ea24d51d556eff2980be\",\"dweb:/ipfs/QmUBW6TwVWtGP96ka9TfuGivd27kH8CtkXD8RQAAecSFiR\"]},\"lib/openzeppelin-contracts/contracts/interfaces/IERC5267.sol\":{\"keccak256\":\"0xf29e9088951d8a2074d872a733674618fe5c164df21b8b5cf4a6295f523ba7ad\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://562a1abc7ea505582827ce0c9a2f778360a1a8242742683af179930640020215\",\"dweb:/ipfs/QmPjx5f6KKaPfsDi1uV3ovQN9gHTAcNkMAFJZxE1Adw6VT\"]},\"lib/openzeppelin-contracts/contracts/interfaces/IERC7913.sol\":{\"keccak256\":\"0xb670f33e28d3e5c33e414665f6bc15b76aa117ec6bc2439e42fa0c15b4662bcd\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://b914ca5d3cd8790c986a81fed0d9c783c524d31f0c7d18693fc514008ab7125b\",\"dweb:/ipfs/QmeqVMihm3A9UChqSDW9pNdSG7cg7cG2f4xLs6uMtkjLxY\"]},\"lib/openzeppelin-contracts/contracts/proxy/Clones.sol\":{\"keccak256\":\"0x7162fa3c6971aa6f0a70160fed018edbb8b1db3af9b034ef3f7c224c3bdb7431\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://f212d25e8f357209838ad7ce8ebc89de79906d9fe580566962e889ecb090e6b4\",\"dweb:/ipfs/QmdbLuLwX24VB1Gdrabke584WyaUkuJSWuDzzuRgqAMFge\"]},\"lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0xfe37358f223eddd65d61bb62b0b7bdb69d7101b5ec8d484292b8c1583a153b8a\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://28dd43f30af3c12ae0fc08dd031b1250e906ef3c95f63f30fac6fd15aee2a662\",\"dweb:/ipfs/QmUkSyWsSRx36w1ti7U6qnGnQgJq16wpMhjeJrnyn9AXwG\"]},\"lib/openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol\":{\"keccak256\":\"0x982c5cb790ab941d1e04f807120a71709d4c313ba0bfc16006447ffbd27fbbd5\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8150ceb4ac947e8a442b2a9c017e01e880b2be2dd958f1fa9bc405f4c5a86508\",\"dweb:/ipfs/QmbcBmFX66AY6Kbhnd5gx7zpkgqnUafo43XnmayAM7zVdB\"]},\"lib/openzeppelin-contracts/contracts/utils/Bytes.sol\":{\"keccak256\":\"0x5abbffa930eabfe8465f25c67c16362d24ebcc40b1a8bba28bf2136e553c6a3f\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://a00ad7fe6215925a5b9affcd725a2ee4f47cc7b842ce04c4aa317865f607856f\",\"dweb:/ipfs/QmcMe8sANBYpkMeVgSHMFobPp5gEaXHVKx366tDQGtMj9X\"]},\"lib/openzeppelin-contracts/contracts/utils/Context.sol\":{\"keccak256\":\"0x493033a8d1b176a037b2cc6a04dad01a5c157722049bbecf632ca876224dd4b2\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6a708e8a5bdb1011c2c381c9a5cfd8a9a956d7d0a9dc1bd8bcdaf52f76ef2f12\",\"dweb:/ipfs/Qmax9WHBnVsZP46ZxEMNRQpLQnrdE4dK8LehML1Py8FowF\"]},\"lib/openzeppelin-contracts/contracts/utils/Create2.sol\":{\"keccak256\":\"0xbb7e8401583d26268ea9103013bcdcd90866a7718bd91105ebd21c9bf11f4f06\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://866a11ad89c93ee918078f7a46ae31e17d89216ce64603f0d34be7ed0a5c520e\",\"dweb:/ipfs/QmW3ckLEJg2v2NzuVLNJFmRuerGSipw6Dzg6ntbmqbAGoC\"]},\"lib/openzeppelin-contracts/contracts/utils/Errors.sol\":{\"keccak256\":\"0x6afa713bfd42cf0f7656efa91201007ac465e42049d7de1d50753a373648c123\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ba1d02f4847670a1b83dec9f7d37f0b0418d6043447b69f3a29a5f9efc547fcf\",\"dweb:/ipfs/QmQ7iH2keLNUKgq2xSWcRmuBE5eZ3F5whYAkAGzCNNoEWB\"]},\"lib/openzeppelin-contracts/contracts/utils/Panic.sol\":{\"keccak256\":\"0xf7fe324703a64fc51702311dc51562d5cb1497734f074e4f483bfb6717572d7a\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c6a5ff4f9fd8649b7ee20800b7fa387d3465bd77cf20c2d1068cd5c98e1ed57a\",\"dweb:/ipfs/QmVSaVJf9FXFhdYEYeCEfjMVHrxDh5qL4CGkxdMWpQCrqG\"]},\"lib/openzeppelin-contracts/contracts/utils/Pausable.sol\":{\"keccak256\":\"0xdb484371dfbb848cb6f5d70464e9ac9b2900e4164ead76bbce4fef0b44bcc68f\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://f9d6f6f6600a2bec622f699081b58350873b5e63ce05464d17d674a290bb8a7c\",\"dweb:/ipfs/QmQKVzSQY1PM3Bid4QhgVVZyx6B4Jx7XgaQzLKHj38vJz8\"]},\"lib/openzeppelin-contracts/contracts/utils/ShortStrings.sol\":{\"keccak256\":\"0x1fcf8cceb1a67e6c8512267e780933c4a3f63ef44756e6c818fda79be51c8402\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://617d7d57f6f9cd449068b4d23daf485676d083aae648e038d05eb3a13291de35\",\"dweb:/ipfs/QmPADWPiGaSzZDFNpFEUx4ZPqhzPkYncBpHyTfAGcfsqzy\"]},\"lib/openzeppelin-contracts/contracts/utils/StorageSlot.sol\":{\"keccak256\":\"0xcf74f855663ce2ae00ed8352666b7935f6cddea2932fdf2c3ecd30a9b1cd0e97\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://9f660b1f351b757dfe01438e59888f31f33ded3afcf5cb5b0d9bf9aa6f320a8b\",\"dweb:/ipfs/QmarDJ5hZEgBtCmmrVzEZWjub9769eD686jmzb2XpSU1cM\"]},\"lib/openzeppelin-contracts/contracts/utils/Strings.sol\":{\"keccak256\":\"0x104c579d98591d36dfe190bdad391c79c358d399ee18d76e877c30b94d3c07a0\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://332ab9adbc9a985195d56832159d09417ed5674adbbd6189db74586110aabc59\",\"dweb:/ipfs/QmZNVeVa4b7iKyFbHjvKir45RGBM93T7Yjgg9ye6Hu2umd\"]},\"lib/openzeppelin-contracts/contracts/utils/cryptography/ECDSA.sol\":{\"keccak256\":\"0x69f54c02b7d81d505910ec198c11ed4c6a728418a868b906b4a0cf29946fda84\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8e25e4bdb7ae1f21d23bfee996e22736fc0ab44cfabedac82a757b1edc5623b9\",\"dweb:/ipfs/QmQdWQvB6JCP9ZMbzi8EvQ1PTETqkcTWrbcVurS7DKpa5n\"]},\"lib/openzeppelin-contracts/contracts/utils/cryptography/EIP712.sol\":{\"keccak256\":\"0xda8013da608bda3c9eaa9e59053d38d7888e64bb40aa557e5929cd702f8de87e\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://3ea13234c6b00ae79dc1a98e7e7f2faf38d37e76a687ccd0c95ad84b03ea570f\",\"dweb:/ipfs/QmWtdefDm5jiEzAjmfPMZ5B1NKVxFoMiD5ZoD68hcNTHun\"]},\"lib/openzeppelin-contracts/contracts/utils/cryptography/MessageHashUtils.sol\":{\"keccak256\":\"0x26670fef37d4adf55570ba78815eec5f31cb017e708f61886add4fc4da665631\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://b16d45febff462bafd8a5669f904796a835baf607df58a8461916d3bf4f08c59\",\"dweb:/ipfs/QmU2eJFpjmT4vxeJWJyLeQb8Xht1kdB8Y6MKLDPFA9WPux\"]},\"lib/openzeppelin-contracts/contracts/utils/cryptography/SignatureChecker.sol\":{\"keccak256\":\"0x002af13a3d1a142c05c2c600b6ae9b27fcc2d4d94be8603e51fc677f4f83bc13\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://56c0e78fef00206235fb265ea0832e9493db3c19eb79ffa49aebc275aa83bc44\",\"dweb:/ipfs/QmNm45tsA7DHU21KgVhJqgRWz42fErq5e1D6aNwHe9Z5pd\"]},\"lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol\":{\"keccak256\":\"0x4ee0e04cc52827588793a141d5efb9830f179a17e80867cc332b3a30ceb30fd9\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://17d8f47fce493b34099ed9005c5aee3012488f063cfe1c34ed8f9e6fc3d576e5\",\"dweb:/ipfs/QmZco2GbZZhEMvG3BovyoGMAFKvfi2LhfNGQLn283LPrXf\"]},\"lib/openzeppelin-contracts/contracts/utils/math/Math.sol\":{\"keccak256\":\"0x1225214420c83ebcca88f2ae2b50f053aaa7df7bd684c3e878d334627f2edfc6\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6c5fab4970634f9ab9a620983dc1c8a30153981a0b1a521666e269d0a11399d3\",\"dweb:/ipfs/QmVRnBC575MESGkEHndjujtR7qub2FzU9RWy9eKLp4hPZB\"]},\"lib/openzeppelin-contracts/contracts/utils/math/SafeCast.sol\":{\"keccak256\":\"0x195533c86d0ef72bcc06456a4f66a9b941f38eb403739b00f21fd7c1abd1ae54\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://b1d578337048cad08c1c03041cca5978eff5428aa130c781b271ad9e5566e1f8\",\"dweb:/ipfs/QmPFKL2r9CBsMwmUqqdcFPfHZB2qcs9g1HDrPxzWSxomvy\"]},\"lib/openzeppelin-contracts/contracts/utils/math/SignedMath.sol\":{\"keccak256\":\"0xb1970fac7b64e6c09611e6691791e848d5e3fe410fa5899e7df2e0afd77a99e3\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://db5fbb3dddd8b7047465b62575d96231ba8a2774d37fb4737fbf23340fabbb03\",\"dweb:/ipfs/QmVUSvooZKEdEdap619tcJjTLcAuH6QBdZqAzWwnAXZAWJ\"]},\"src/contracts/AaveV3AdapterFactory.sol\":{\"keccak256\":\"0x76b247ee43b3160d457ad487aa052469d8ae21e47d2e18d9b4cfc45b3bcbef4f\",\"license\":\"UNLICENSED\",\"urls\":[\"bzz-raw://16372b29fe68012b1187a359b3de3ea54aa4d2b66d9088530099bde7d434891e\",\"dweb:/ipfs/QmX9nfJjpfjSYzfZPsNHD8b7FPV6Yf6rViB3Q54FSF6zUq\"]},\"src/contracts/BaseAdapterFactory.sol\":{\"keccak256\":\"0x5c7fefa1164fad93678e17c8dacacf94a886a7b32cc414e8f841fe3704aac84d\",\"license\":\"UNLICENSED\",\"urls\":[\"bzz-raw://ff2f2c2548f64b85027ab6d11dfb99931c18c08f624717957635ebc1a3adcde5\",\"dweb:/ipfs/Qme6zCLTqX9hx8g9ErSf6cA6QZZwoXuivytDMQVkr1syxT\"]},\"src/dependencies/cow/IBasicBorrower.sol\":{\"keccak256\":\"0x160f60bfd4390bda950185fa6cc658a2a4ffb709a208c5326f7ffc25c56cb466\",\"license\":\"GPL-3.0-or-later\",\"urls\":[\"bzz-raw://1b80106b06b93610c4f51938107cc6d8a2e71e7e19b5c9124594f18066136635\",\"dweb:/ipfs/QmbUQqreiYXPc64x5LwRu34yV5u5W48byfXhSmY4eimV69\"]},\"src/interfaces/IAaveBaseAdapter.sol\":{\"keccak256\":\"0x8281d07db92105aab4c96bcd206ef11de7eb3e8cebc5913ac8fccfe4328ed7ef\",\"license\":\"UNLICENSED\",\"urls\":[\"bzz-raw://01d94af76094eda5393d934fbeae46c8dd4267e5db26d8a24a6ba331f3f6fdce\",\"dweb:/ipfs/QmQr6Q84qGkSJWpLbmtw28kSGf4v33BvPGiGKvaPwBmpGR\"]},\"src/interfaces/IBaseAdapterFactory.sol\":{\"keccak256\":\"0xfaf956a1b31a3104a4a2c0e9f3a0ef89a5a16b7b5e21aa1b571572210625e58f\",\"license\":\"UNLICENSED\",\"urls\":[\"bzz-raw://e73063bd1de1f83a6865ddb40a5befd50dbe182d68863c4ea997a0592c8c279f\",\"dweb:/ipfs/QmNSZ1WDyq6kKCkUD7Ac4z2QFzDz4hiBs7uHmRoxewcKGF\"]},\"src/libraries/DataTypes.sol\":{\"keccak256\":\"0x121b82422506d3b598b659d110965ce411c22fb36cfeb2605000612ba2efd99b\",\"license\":\"UNLICENSED\",\"urls\":[\"bzz-raw://92bbc5d30bef7ff1ba322f4afac995f561ea213daf46d36201cd87ddaf99e3fa\",\"dweb:/ipfs/QmR7GNTP36q5XQJQfFManfhVFaTWH726HCb33o3P7dZAcT\"]}},\"version\":1}","userdoc":{"kind":"user","errors":{"InvalidLender()":[{"notice":"Thrown when the specified lender is not the valid one for the Factory."}],"NothingToRepay()":[{"notice":"Thrown when the calling Instance has nothing to repay."}],"CallerNotRouter()":[{"notice":"Thrown when the caller is not the Router."}],"CallerNotAavePool()":[{"notice":"Thrown when the caller is not the Aave Pool."}],"CallerNotInstance()":[{"notice":"Thrown when the caller is not an Instance deployed by the Factory."}],"InstanceCancelled()":[{"notice":"Thrown when the order has been cancelled by the user."}],"InvalidZeroAmount()":[{"notice":"Thrown when the specified amount is null."}],"InvalidZeroAddress()":[{"notice":"Thrown when the specified address is the zero address."}],"InvalidOrderReceiver()":[{"notice":"Thrown when the order receiver is invalid."}],"InstanceNotInitialized()":[{"notice":"Thrown when the Instance is not initialized."}],"ImplementationNotActive()":[{"notice":"Thrown when the specified implementation is not active."}],"InstanceAlreadyDeployed()":[{"notice":"Thrown when the Instance is already deployed."}],"ImplementationAlreadyListed()":[{"notice":"Thrown when the specified implementation is already listed."}]},"events":{"CancelInstance(address,address)":{"notice":"Emitted when an Instance owner cancels it."},"SetAdapterImplementation(address,bool)":{"notice":"Emitted when an AdapterHook Implementations status is updated."}},"notice":"Factory contract to deploy listed AdapterHooks linked to Cow Orders & draw Flashloans from the Aave V3 Pool.","methods":{"pause()":{"notice":"Pauses this contract"},"ROUTER()":{"notice":"FlashLoanRouter contract."},"unpause()":{"notice":"Unpauses this contract"},"DOMAIN_SEPARATOR()":{"notice":"Returns the domain separator used in the EIP712 encoding of the AdapterOrderSig struct."},"SETTLEMENT_CONTRACT()":{"notice":"Settlement contract."},"rescueTokens(address)":{"notice":"Rescue any ERC20 tokens left on the contract."},"notifyRepayFlashLoan()":{"notice":"Notifies the AdapterFactory that a FlashLoan is ready to be repaid."},"cancelInstance(address)":{"notice":"Cancels an Adapter Instance to be deployed by the Factory."},"openFlashLoans(address)":{"notice":"Open FlashLoans data for Adapter Instances."},"isAdapterImplementation(address)":{"notice":"Mapping of Adapter implementations."},"isInstanceCancelled(address,address)":{"notice":"Mapping to track cancelled Instances."},"setAdapterImplementation(address,bool)":{"notice":"Sets the status of an AdapterHook Implementation."},"flashLoanAndCallBack(address,address,uint256,bytes)":{"notice":"Start the flow to draw a FlashLoan then calls back the FlashLoanRouter contract with the given data"},"executeOperation(address[],uint256[],uint256[],address,bytes)":{"notice":"Executes an operation after receiving the flash-borrowed assets"},"verifyOrderSignature(address,(address,address,address,uint256,uint256,uint32,bytes32,uint256,bytes32,bool,bytes32,bytes32),bytes)":{"notice":"Verifies that the signature provided for an Order using an Adapter is valid."},"deployAndTransferFlashLoan(address,(address,address,address,address,uint256,uint256,bytes32,uint256,uint256,uint256,uint256,uint256))":{"notice":"Deploys an Adapter Instance and transfers the FlashLoaned assets to it (must have been initiated before)."},"getInstanceDeterministicAddress(address,(address,address,address,address,uint256,uint256,bytes32,uint256,uint256,uint256,uint256,uint256))":{"notice":"Returns the determined address of an Adapter Instance to clone based on a specific Order."}},"version":1},"devdoc":{"kind":"dev","author":"Aave Labs.","errors":{"EnforcedPause()":[{"details":"The operation failed because the contract is paused."}],"ExpectedPause()":[{"details":"The operation failed because the contract is not paused."}],"FailedDeployment()":[{"details":"The deployment failed."}],"OwnableInvalidOwner(address)":[{"details":"The owner is not a valid owner account. (eg. `address(0)`)"}],"SafeERC20FailedOperation(address)":[{"details":"An operation with an ERC-20 token failed."}],"OwnableUnauthorizedAccount(address)":[{"details":"The caller account is not authorized to perform an operation."}],"InsufficientBalance(uint256,uint256)":[{"details":"The ETH balance of the account is not enough to perform the operation."}]},"events":{"Paused(address)":{"details":"Emitted when the pause is triggered by `account`."},"Unpaused(address)":{"details":"Emitted when the pause is lifted by `account`."},"EIP712DomainChanged()":{"details":"MAY be emitted to signal that the domain could have changed."}},"methods":{"owner()":{"details":"Returns the address of the current owner."},"paused()":{"details":"Returns true if the contract is paused, and false otherwise."},"constructor":{"params":{"owner_":"The address of the owner of the Factory.","router_":"The address of the Cow FlashLoan Router contract.","aavePool_":"The address of the Aave V3 Pool contract.","settlement_":"The address of the Cow Settlement contract."},"details":"Constructor."},"eip712Domain()":{"details":"returns the fields and values that describe the domain separator used by this contract for EIP-712 signature."},"DOMAIN_SEPARATOR()":{"returns":{"_0":"The domain separator."}},"renounceOwnership()":{"details":"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner."},"rescueTokens(address)":{"details":"Emergency rescue for token stucked on this contract, as failsafe mechanism.- Funds should never remain in this contract more time than during transactions.- Only callable by the owner."},"cancelInstance(address)":{"params":{"instance":"The address of the Adapter Instance to cancel."},"details":"This is used to cancel a pending EIP-1271 Order before it is executed, by blocking the deployment of the Instance."},"transferOwnership(address)":{"details":"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner."},"setAdapterImplementation(address,bool)":{"params":{"active":"True to activate, false to deactivate.","adapterImplementation":"The address of the Adapter Implementation."}},"flashLoanAndCallBack(address,address,uint256,bytes)":{"params":{"token":"The address of the ERC20 token for the FlashLoan","amount":"The amount of the FlashLoan","lender":"The address of the lender to draw the FlashLoan from","callbackData":"Data to send back to the FlashLoanRouter during the callback"}},"executeOperation(address[],uint256[],uint256[],address,bytes)":{"params":{"assets":"The addresses of the flash-borrowed assets","params":"The byte-encoded params passed when initiating the flashloan","amounts":"The amounts of the flash-borrowed assets","premiums":"The fee of each flash-borrowed asset","initiator":"The address of the flashloan initiator"},"details":"Ensure that the contract can return the debt + premium, e.g., has      enough funds to repay and has approved the Pool to pull the total amount","returns":{"_0":"True if the execution of the operation succeeds, false otherwise"}},"verifyOrderSignature(address,(address,address,address,uint256,uint256,uint32,bytes32,uint256,bytes32,bool,bytes32,bytes32),bytes)":{"params":{"order":"The Order data to verify.","signature":"The signature to verify.","orderOwner":"The address of the owner of the Order."},"returns":{"_0":"True if the signature is valid, false otherwise."}},"deployAndTransferFlashLoan(address,(address,address,address,address,uint256,uint256,bytes32,uint256,uint256,uint256,uint256,uint256))":{"params":{"hookData":"The HookOrderData struct containing the order details & postHook parameters.","adapterImplementation":"The address of the Adapter Instance implementation to clone."}},"getInstanceDeterministicAddress(address,(address,address,address,address,uint256,uint256,bytes32,uint256,uint256,uint256,uint256,uint256))":{"params":{"hookData":"The HookOrderData struct containing the order details & postHook parameters.","adapterImplementation":"The address of the Adapter Implementation to clone."},"returns":{"_0":"The determined address of the Adapter Instance."}}},"version":1,"stateVariables":{"REFERRAL_CODE":{"details":"Referral code to pass to the Aave Pool"}}},"storageLayout":{"types":{"t_bool":{"label":"bool","encoding":"inplace","numberOfBytes":"1"},"t_address":{"label":"address","encoding":"inplace","numberOfBytes":"20"},"t_uint256":{"label":"uint256","encoding":"inplace","numberOfBytes":"32"},"t_string_storage":{"label":"string","encoding":"bytes","numberOfBytes":"32"},"t_mapping(t_address,t_bool)":{"key":"t_address","label":"mapping(address => bool)","value":"t_bool","encoding":"mapping","numberOfBytes":"32"},"t_struct(OpenFlashLoan)11310_storage":{"label":"struct DataTypes.OpenFlashLoan","members":[{"slot":"0","type":"t_bool","astId":11305,"label":"instanceActive","offset":0,"contract":"src/contracts/AaveV3AdapterFactory.sol:AaveV3AdapterFactory"},{"slot":"0","type":"t_address","astId":11307,"label":"asset","offset":1,"contract":"src/contracts/AaveV3AdapterFactory.sol:AaveV3AdapterFactory"},{"slot":"1","type":"t_uint256","astId":11309,"label":"totalAmount","offset":0,"contract":"src/contracts/AaveV3AdapterFactory.sol:AaveV3AdapterFactory"}],"encoding":"inplace","numberOfBytes":"64"},"t_mapping(t_address,t_mapping(t_address,t_bool))":{"key":"t_address","label":"mapping(address => mapping(address => bool))","value":"t_mapping(t_address,t_bool)","encoding":"mapping","numberOfBytes":"32"},"t_mapping(t_address,t_struct(OpenFlashLoan)11310_storage)":{"key":"t_address","label":"mapping(address => struct DataTypes.OpenFlashLoan)","value":"t_struct(OpenFlashLoan)11310_storage","encoding":"mapping","numberOfBytes":"32"}},"storage":[{"slot":"0","type":"t_address","astId":2034,"label":"_owner","offset":0,"contract":"src/contracts/AaveV3AdapterFactory.sol:AaveV3AdapterFactory"},{"slot":"0","type":"t_bool","astId":3702,"label":"_paused","offset":20,"contract":"src/contracts/AaveV3AdapterFactory.sol:AaveV3AdapterFactory"},{"slot":"1","type":"t_string_storage","astId":5929,"label":"_nameFallback","offset":0,"contract":"src/contracts/AaveV3AdapterFactory.sol:AaveV3AdapterFactory"},{"slot":"2","type":"t_string_storage","astId":5931,"label":"_versionFallback","offset":0,"contract":"src/contracts/AaveV3AdapterFactory.sol:AaveV3AdapterFactory"},{"slot":"3","type":"t_mapping(t_address,t_bool)","astId":10375,"label":"isAdapterImplementation","offset":0,"contract":"src/contracts/AaveV3AdapterFactory.sol:AaveV3AdapterFactory"},{"slot":"4","type":"t_mapping(t_address,t_struct(OpenFlashLoan)11310_storage)","astId":10381,"label":"openFlashLoans","offset":0,"contract":"src/contracts/AaveV3AdapterFactory.sol:AaveV3AdapterFactory"},{"slot":"5","type":"t_mapping(t_address,t_mapping(t_address,t_bool))","astId":10388,"label":"isInstanceCancelled","offset":0,"contract":"src/contracts/AaveV3AdapterFactory.sol:AaveV3AdapterFactory"}]},"transientStorageLayout":null,"evm":{"bytecode":{"object":"6101c0604052348015610010575f5ffd5b5060405161302e38038061302e83398101604081905261002f916102ed565b8282826040518060400160405280601481526020017f41617665563341646170746572466163746f7279000000000000000000000000815250604051806040016040528060018152602001603160f81b8152508181845f6001600160a01b0316816001600160a01b0316036100be57604051631e4fbdf760e01b81525f60048201526024015b60405180910390fd5b6100c781610214565b506100d3826001610263565b610120526100e2816002610263565b61014052815160208084019190912060e052815190820120610100524660a05261016e60e05161010051604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201529081019290925260608201524660808201523060a08201525f9060c00160405160208183030381529060405280519060200120905090565b60805250503060c0526001600160a01b0385161580159061019757506001600160a01b03841615155b80156101ab57506001600160a01b03831615155b6101c85760405163f6b2911f60e01b815260040160405180910390fd5b5050506001600160a01b039182166101605281166101805284166101ff5760405163f6b2911f60e01b815260040160405180910390fd5b5050506001600160a01b03166101a0526104e8565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b5f60208351101561027e5761027783610295565b905061028f565b8161028984826103d6565b5060ff90505b92915050565b5f5f829050601f815111156102bf578260405163305a27a960e01b81526004016100b59190610490565b80516102ca826104c5565b179392505050565b80516001600160a01b03811681146102e8575f5ffd5b919050565b5f5f5f5f60808587031215610300575f5ffd5b610309856102d2565b9350610317602086016102d2565b9250610325604086016102d2565b9150610333606086016102d2565b905092959194509250565b634e487b7160e01b5f52604160045260245ffd5b600181811c9082168061036657607f821691505b60208210810361038457634e487b7160e01b5f52602260045260245ffd5b50919050565b601f8211156103d157805f5260205f20601f840160051c810160208510156103af5750805b601f840160051c820191505b818110156103ce575f81556001016103bb565b50505b505050565b81516001600160401b038111156103ef576103ef61033e565b610403816103fd8454610352565b8461038a565b6020601f821160018114610435575f831561041e5750848201515b5f19600385901b1c1916600184901b1784556103ce565b5f84815260208120601f198516915b828110156104645787850151825560209485019460019092019101610444565b508482101561048157868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b80516020808301519190811015610384575f1960209190910360031b1b16919050565b60805160a05160c05160e05161010051610120516101405161016051610180516101a051612a9f61058f5f395f81816102c501528181610527015281816108ea01528181610fef01528181611247015281816112e6015261143701525f8181610230015281816107e7015261162e01525f61020901525f6115c901525f61159c01525f6110fa01525f6110d201525f61102d01525f61105701525f6110810152612a9f5ff3fe608060405234801561000f575f5ffd5b506004361061018e575f3560e01c80637535d246116100dd5780638da5cb5b11610088578063e5209f2c11610063578063e5209f2c14610415578063e56c8cb414610428578063f2fde38b1461043b575f5ffd5b80638da5cb5b146103d2578063920f5c84146103ef578063b1b6308b14610402575f5ffd5b80638456cb59116100b85780638456cb591461038257806384b0196e1461038a5780638c01220c146103a5575f5ffd5b80637535d246146102c05780637bf703b4146102e75780638115192f14610309575f5ffd5b80633644e5151161013d5780635678d216116101185780635678d216146102835780635c975abb14610296578063715018a6146102b8575f5ffd5b80633644e515146102525780633f4ba83a146102685780634743582f14610270575f5ffd5b80630be6c2aa1161016d5780630be6c2aa146101fc5780631f273c8e1461020457806332fe7b261461022b575f5ffd5b8062ae3bf8146101925780630542975c146101a757806309802f6d146101d9575b5f5ffd5b6101a56101a036600461203b565b61044e565b005b6101af610524565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b6101ec6101e7366004612188565b6105b7565b60405190151581526020016101d0565b6101a56106b4565b6101af7f000000000000000000000000000000000000000000000000000000000000000081565b6101af7f000000000000000000000000000000000000000000000000000000000000000081565b61025a610798565b6040519081526020016101d0565b6101a56107a1565b6101af61027e3660046122b6565b6107b3565b6101a5610291366004612407565b6107c7565b5f5474010000000000000000000000000000000000000000900460ff166101ec565b6101a5610852565b6101af7f000000000000000000000000000000000000000000000000000000000000000081565b6101ec6102f536600461203b565b60036020525f908152604090205460ff1681565b61035061031736600461203b565b60046020525f90815260409020805460019091015460ff821691610100900473ffffffffffffffffffffffffffffffffffffffff169083565b60408051931515845273ffffffffffffffffffffffffffffffffffffffff9092166020840152908201526060016101d0565b6101a5610863565b610392610873565b6040516101d097969594939291906124fb565b6101ec6103b3366004612591565b600560209081525f928352604080842090915290825290205460ff1681565b5f5473ffffffffffffffffffffffffffffffffffffffff166101af565b6101ec6103fd366004612609565b6108d1565b6101a56104103660046122b6565b61098f565b6101a561042336600461203b565b610b94565b6101a56104363660046126eb565b610c64565b6101a561044936600461203b565b610d42565b610456610da7565b6105216104775f5473ffffffffffffffffffffffffffffffffffffffff1690565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff8416906370a0823190602401602060405180830381865afa1580156104df573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610503919061271e565b73ffffffffffffffffffffffffffffffffffffffff84169190610df9565b50565b5f7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16630542975c6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561058e573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105b29190612735565b905090565b5f6105c0610e7f565b82516020808501516060860151608087015161010088015160a089015160c08a015160405133985f9861069b98610680987f1ca15395c04ac473d5b42656e3782ae1fce1a113fdb5432b57f8fb0870fa3178988d989497929691959094930198895273ffffffffffffffffffffffffffffffffffffffff97881660208a01529587166040890152939095166060870152608086019190915260a085015260c084019290925263ffffffff9190911660e08301526101008201526101200190565b60405160208183030381529060405280519060200120610ed3565b90506106a8868286610f1a565b925050505b9392505050565b6106bc610e7f565b335f908152600460205260409020805460ff16610705576040517f60f6234100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f816001015411610742576040517fd32e7fc600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8054600182015461077091610100900473ffffffffffffffffffffffffffffffffffffffff16903390610fb1565b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055565b5f6105b2611014565b6107a9610da7565b6107b161114a565b565b5f6107be83836111c6565b90505b92915050565b6107cf610e7f565b3373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161461083e576040517febe91ae200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61084b8585858585611245565b5050505050565b61085a610da7565b6107b15f6114b3565b61086b610da7565b6107b1611527565b5f6060805f5f5f6060610884611595565b61088c6115c2565b604080515f808252602082019092527f0f000000000000000000000000000000000000000000000000000000000000009b939a50919850469750309650945092509050565b5f3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610941576040517f7ffc0b6500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61097f83838080601f0160208091040260200160405190810160405280939291908181526020018383808284375f920191909152506115ef92505050565b90505b9998505050505050505050565b610997610e7f565b5f6109a28383611698565b825173ffffffffffffffffffffffffffffffffffffffff9081165f9081526005602090815260408083209385168352929052205490915060ff1615610a13576040517f785fa2f400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16826020015173ffffffffffffffffffffffffffffffffffffffff1614610a7c576040517f05886ddd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ab081836101000151846040015173ffffffffffffffffffffffffffffffffffffffff16610df99092919063ffffffff16565b6040518060600160405280600115158152602001836040015173ffffffffffffffffffffffffffffffffffffffff168152602001836101200151846101000151610afa9190612750565b905273ffffffffffffffffffffffffffffffffffffffff9182165f9081526004602090815260409182902083518154928501517fffffffffffffffffffffff0000000000000000000000000000000000000000009093169015157fffffffffffffffffffffff0000000000000000000000000000000000000000ff1617610100929095169190910293909317835501516001909101555050565b73ffffffffffffffffffffffffffffffffffffffff8116610be1576040517ff6b2911f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b335f81815260056020908152604080832073ffffffffffffffffffffffffffffffffffffffff8616808552925280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055519092917f856f0b5ddd2d41f4778c648c0ab55f0285fb87f0f35b6749889ae0d8ebef3c6c91a350565b610c6c610da7565b73ffffffffffffffffffffffffffffffffffffffff8216610cb9576040517ff6b2911f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff82165f8181526003602090815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001685151590811790915591519182527fad58a21bee8db31c6b4cfcdeaf806d8b7dfa187c5da0dc88e4bffc740ce5b91a910160405180910390a25050565b610d4a610da7565b73ffffffffffffffffffffffffffffffffffffffff8116610d9e576040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081525f60048201526024015b60405180910390fd5b610521816114b3565b5f5473ffffffffffffffffffffffffffffffffffffffff1633146107b1576040517f118cdaa7000000000000000000000000000000000000000000000000000000008152336004820152602401610d95565b60405173ffffffffffffffffffffffffffffffffffffffff838116602483015260448201839052610e7a91859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611840565b505050565b5f5474010000000000000000000000000000000000000000900460ff16156107b1576040517fd93c066500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f6107c1610edf611014565b836040517f19010000000000000000000000000000000000000000000000000000000000008152600281019290925260228201526042902090565b5f8373ffffffffffffffffffffffffffffffffffffffff163b5f03610f9f575f5f610f4585856118e5565b5090925090505f816003811115610f5e57610f5e612788565b148015610f9657508573ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b925050506106ad565b610faa84848461192e565b90506106ad565b610fd373ffffffffffffffffffffffffffffffffffffffff8416833084611a76565b610e7a73ffffffffffffffffffffffffffffffffffffffff84167f000000000000000000000000000000000000000000000000000000000000000083611abc565b5f3073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614801561107957507f000000000000000000000000000000000000000000000000000000000000000046145b156110a357507f000000000000000000000000000000000000000000000000000000000000000090565b6105b2604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527f0000000000000000000000000000000000000000000000000000000000000000918101919091527f000000000000000000000000000000000000000000000000000000000000000060608201524660808201523060a08201525f9060c00160405160208183030381529060405280519060200120905090565b611152611b93565b5f80547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390a1565b5f6107be836111d58585611be6565b6040513060388201526f5af43d82803e903d91602b57fd5bf3ff60248201526014810192909252733d602d80600a3d3981f3363d3d373d3d3d363d73825260588201526037600c8201206078820152605560439091012073ffffffffffffffffffffffffffffffffffffffff1690565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16146112ca576040517f21eeab0000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61130b73ffffffffffffffffffffffffffffffffffffffff85167f00000000000000000000000000000000000000000000000000000000000000005f611abc565b6040805160018082528183019092525f916020808301908036833750506040805160018082528183019092529293505f9291506020808301908036833750506040805160018082528183019092529293505f9291506020808301908036833701905050905086835f81518110611383576113836127b5565b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505085825f815181106113d0576113d06127b5565b6020026020010181815250505f815f815181106113ef576113ef6127b5565b60209081029190910101526040517fab9c4b5d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063ab9c4b5d9061147c90309087908790879084908d908d906110cc90600401612829565b5f604051808303815f87803b158015611493575f5ffd5b505af11580156114a5573d5f5f3e3d5ffd5b505050505050505050505050565b5f805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b61152f610e7f565b5f80547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16740100000000000000000000000000000000000000001790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861119c3390565b60606105b27f00000000000000000000000000000000000000000000000000000000000000006001611ccb565b60606105b27f00000000000000000000000000000000000000000000000000000000000000006002611ccb565b6040517f0dae46860000000000000000000000000000000000000000000000000000000081525f9073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001690630dae468690611663908590600401612904565b5f604051808303815f87803b15801561167a575f5ffd5b505af115801561168c573d5f5f3e3d5ffd5b50600195945050505050565b73ffffffffffffffffffffffffffffffffffffffff82165f9081526003602052604081205460ff166116f6576040517f18dd5cd200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f6117018484611be6565b6040513060388201526f5af43d82803e903d91602b57fd5bf3ff602482015260148101869052733d602d80600a3d3981f3363d3d373d3d3d363d738152605881018290526037600c8201206078820152605560439091012090915073ffffffffffffffffffffffffffffffffffffffff16803b156117ab576040517f9b4d6ca600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6117b58583611d74565b6040517ff361d2d700000000000000000000000000000000000000000000000000000000815290915073ffffffffffffffffffffffffffffffffffffffff82169063f361d2d79061180a908790600401612916565b5f604051808303815f87803b158015611821575f5ffd5b505af1158015611833573d5f5f3e3d5ffd5b5092979650505050505050565b5f5f60205f8451602086015f885af18061185f576040513d5f823e3d81fd5b50505f513d91508115611876578060011415611890565b73ffffffffffffffffffffffffffffffffffffffff84163b155b156118df576040517f5274afe700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85166004820152602401610d95565b50505050565b5f5f5f835160410361191c576020840151604085015160608601515f1a61190e88828585611d80565b955095509550505050611927565b505081515f91506002905b9250925092565b5f5f5f8573ffffffffffffffffffffffffffffffffffffffff16858560405160240161195b929190612a0b565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f1626ba7e00000000000000000000000000000000000000000000000000000000179052516119dc9190612a2b565b5f60405180830381855afa9150503d805f8114611a14576040519150601f19603f3d011682016040523d82523d5f602084013e611a19565b606091505b5091509150818015611a2d57506020815110155b80156106a8575080517f1626ba7e0000000000000000000000000000000000000000000000000000000090611a6b908301602090810190840161271e565b149695505050505050565b60405173ffffffffffffffffffffffffffffffffffffffff84811660248301528381166044830152606482018390526118df9186918216906323b872dd90608401610e33565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f095ea7b300000000000000000000000000000000000000000000000000000000179052611b488482611e73565b6118df5760405173ffffffffffffffffffffffffffffffffffffffff84811660248301525f6044830152611b8991869182169063095ea7b390606401610e33565b6118df8482611840565b5f5474010000000000000000000000000000000000000000900460ff166107b1576040517f8dfc202b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f82825f01518360400151846060015185608001518660a001518760c001518860e001518961010001518a61012001518b61014001518c6101600151604051602001611cad9c9b9a9998979695949392919073ffffffffffffffffffffffffffffffffffffffff9c8d1681529a8c1660208c0152988b1660408b0152969099166060890152608088019490945260a087019290925260c086015260e08501526101008401526101208301939093526101408201929092526101608101919091526101800190565b60405160208183030381529060405280519060200120905092915050565b606060ff8314611ce557611cde83611ec9565b90506107c1565b818054611cf190612a41565b80601f0160208091040260200160405190810160405280929190818152602001828054611d1d90612a41565b8015611d685780601f10611d3f57610100808354040283529160200191611d68565b820191905f5260205f20905b815481529060010190602001808311611d4b57829003601f168201915b505050505090506107c1565b5f6107be83835f611f06565b5f80807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115611db957505f91506003905082611e69565b604080515f808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015611e0a573d5f5f3e3d5ffd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff8116611e6057505f925060019150829050611e69565b92505f91508190505b9450945094915050565b5f5f5f5f60205f8651602088015f8a5af192503d91505f519050828015611ebf57508115611ea45780600114611ebf565b5f8673ffffffffffffffffffffffffffffffffffffffff163b115b9695505050505050565b60605f611ed583611fda565b6040805160208082528183019092529192505f91906020820181803683375050509182525060208101929092525090565b5f81471015611f4a576040517fcf47918100000000000000000000000000000000000000000000000000000000815247600482015260248101839052604401610d95565b763d602d80600a3d3981f3363d3d373d3d3d363d730000008460601b60e81c175f526e5af43d82803e903d91602b57fd5bf38460781b17602052826037600984f5905073ffffffffffffffffffffffffffffffffffffffff81166106ad576040517fb06ebf3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f60ff8216601f8111156107c1576040517fb3512b0c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff81168114610521575f5ffd5b5f6020828403121561204b575f5ffd5b81356106ad8161201a565b80356120618161201a565b919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b604051610180810167ffffffffffffffff811182821017156120b7576120b7612066565b60405290565b803563ffffffff81168114612061575f5ffd5b80358015158114612061575f5ffd5b5f82601f8301126120ee575f5ffd5b813567ffffffffffffffff81111561210857612108612066565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810167ffffffffffffffff8111828210171561215557612155612066565b60405281815283820160200185101561216c575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f5f5f8385036101c081121561219c575f5ffd5b84356121a78161201a565b93506101807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0820112156121d9575f5ffd5b506121e2612093565b6121ee60208601612056565b81526121fc60408601612056565b602082015261220d60608601612056565b6040820152608085810135606083015260a08601359082015261223260c086016120bd565b60a082015260e08581013560c083015261010080870135918301919091526101208601359082015261226761014086016120d0565b610120820152610160858101356101408301526101808601359082015291506101a084013567ffffffffffffffff8111156122a0575f5ffd5b6122ac868287016120df565b9150509250925092565b5f5f8284036101a08112156122c9575f5ffd5b83356122d48161201a565b92506101807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe082011215612306575f5ffd5b5061230f612093565b61231b60208501612056565b815261232960408501612056565b602082015261233a60608501612056565b604082015261234b60808501612056565b606082015260a084810135608083015260c0808601359183019190915260e08086013591830191909152610100808601359183019190915261012080860135918301919091526101408086013591830191909152610160808601359183019190915261018090940135938101939093525092909150565b5f5f83601f8401126123d2575f5ffd5b50813567ffffffffffffffff8111156123e9575f5ffd5b602083019150836020828501011115612400575f5ffd5b9250929050565b5f5f5f5f5f6080868803121561241b575f5ffd5b85356124268161201a565b945060208601356124368161201a565b935060408601359250606086013567ffffffffffffffff811115612458575f5ffd5b612464888289016123c2565b969995985093965092949392505050565b5f81518084528060208401602086015e5f6020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b5f8151808452602084019350602083015f5b828110156124f15781518652602095860195909101906001016124d3565b5093949350505050565b7fff000000000000000000000000000000000000000000000000000000000000008816815260e060208201525f61253560e0830189612475565b82810360408401526125478189612475565b905086606084015273ffffffffffffffffffffffffffffffffffffffff861660808401528460a084015282810360c084015261258381856124c1565b9a9950505050505050505050565b5f5f604083850312156125a2575f5ffd5b82356125ad8161201a565b915060208301356125bd8161201a565b809150509250929050565b5f5f83601f8401126125d8575f5ffd5b50813567ffffffffffffffff8111156125ef575f5ffd5b6020830191508360208260051b8501011115612400575f5ffd5b5f5f5f5f5f5f5f5f5f60a08a8c031215612621575f5ffd5b893567ffffffffffffffff811115612637575f5ffd5b6126438c828d016125c8565b909a5098505060208a013567ffffffffffffffff811115612662575f5ffd5b61266e8c828d016125c8565b90985096505060408a013567ffffffffffffffff81111561268d575f5ffd5b6126998c828d016125c8565b90965094505060608a01356126ad8161201a565b925060808a013567ffffffffffffffff8111156126c8575f5ffd5b6126d48c828d016123c2565b915080935050809150509295985092959850929598565b5f5f604083850312156126fc575f5ffd5b82356127078161201a565b9150612715602084016120d0565b90509250929050565b5f6020828403121561272e575f5ffd5b5051919050565b5f60208284031215612745575f5ffd5b81516106ad8161201a565b808201808211156107c1577f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b81835281816020850137505f602082840101525f60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b5f60e0820173ffffffffffffffffffffffffffffffffffffffff8b16835260e06020840152808a518083526101008501915060208c0192505f5b8181101561289757835173ffffffffffffffffffffffffffffffffffffffff16835260209384019390920191600101612863565b505083810360408501526128ab818b6124c1565b91505082810360608401526128c081896124c1565b73ffffffffffffffffffffffffffffffffffffffff88166080850152905082810360a08401526128f18186886127e2565b91505061098260c083018461ffff169052565b602081525f6107be6020830184612475565b815173ffffffffffffffffffffffffffffffffffffffff1681526101808101602083015161295c602084018273ffffffffffffffffffffffffffffffffffffffff169052565b506040830151612984604084018273ffffffffffffffffffffffffffffffffffffffff169052565b5060608301516129ac606084018273ffffffffffffffffffffffffffffffffffffffff169052565b506080830151608083015260a083015160a083015260c083015160c083015260e083015160e083015261010083015161010083015261012083015161012083015261014083015161014083015261016083015161016083015292915050565b828152604060208201525f612a236040830184612475565b949350505050565b5f82518060208501845e5f920191825250919050565b600181811c90821680612a5557607f821691505b602082108103612a8c577f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5091905056fea164736f6c634300081c000a","sourceMap":"730:2686:39:-:0;;;1384:277;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1508:11;1521:7;1530:6;2246:404:40;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;2246:404:40;;;2404:5;2411:8;2389:6;1297:1:12;-1:-1:-1;;;;;1273:26:12;:12;-1:-1:-1;;;;;1273:26:12;;1269:95;;1322:31;;-1:-1:-1;;;1322:31:12;;1350:1;1322:31;;;811:51:45;784:18;;1322:31:12;;;;;;;;1269:95;1373:32;1392:12;1373:18;:32::i;:::-;-1:-1:-1;3501:45:32;:4;3532:13;3501:30;:45::i;:::-;3493:53;;3567:51;:7;3601:16;3567:33;:51::i;:::-;3556:62;;3642:22;;;;;;;;;;3628:36;;3691:25;;;;;;3674:42;;3744:13;3727:30;;3792:23;4326:11;;4339:14;;4304:80;;;2079:95;4304:80;;;3773:25:45;3814:18;;;3807:34;;;;3857:18;;;3850:34;4355:13:32;3900:18:45;;;3893:34;4378:4:32;3943:19:45;;;3936:61;4268:7:32;;3745:19:45;;4304:80:32;;;;;;;;;;;;4294:91;;;;;;4287:98;;4213:179;;3792:23;3767:48;;-1:-1:-1;;3847:4:32;3825:27;;-1:-1:-1;;;;;2442:25:40;::::2;::::0;;::::2;::::0;:50:::2;;-1:-1:-1::0;;;;;;2471:21:40;::::2;::::0;::::2;2442:50;:74;;;;-1:-1:-1::0;;;;;;2496:20:40;::::2;::::0;::::2;2442:74;2427:123;;;;-1:-1:-1::0;;;2427:123:40::2;;;;;;;;;;;;-1:-1:-1::0;;;;;;;;2556:49:40;;::::2;;::::0;2611:34;::::2;;::::0;1581:23:39;::::1;1573:54;;;;-1:-1:-1::0;;;1573:54:39::1;;;;;;;;;;;;-1:-1:-1::0;;;;;;;;1633:23:39::1;;::::0;730:2686;;2912:187:12;2985:16;3004:6;;-1:-1:-1;;;;;3020:17:12;;;-1:-1:-1;;;;;;3020:17:12;;;;;;3052:40;;3004:6;;;;;;;3052:40;;2985:16;3052:40;2975:124;2912:187;:::o;2887:340:28:-;2983:11;3032:2;3016:5;3010:19;:24;3006:215;;;3057:20;3071:5;3057:13;:20::i;:::-;3050:27;;;;3006:215;3134:5;3108:46;3149:5;3134;3108:46;:::i;:::-;-1:-1:-1;1390:66:28;;-1:-1:-1;3006:215:28;2887:340;;;;:::o;1708:286::-;1773:11;1796:17;1822:3;1796:30;;1854:2;1840:4;:11;:16;1836:72;;;1893:3;1879:18;;-1:-1:-1;;;1879:18:28;;;;;;;;:::i;1836:72::-;1974:11;;1957:13;1974:4;1957:13;:::i;:::-;1949:36;;1708:286;-1:-1:-1;;;1708:286:28:o;14:177:45:-;93:13;;-1:-1:-1;;;;;135:31:45;;125:42;;115:70;;181:1;178;171:12;115:70;14:177;;;:::o;196:464::-;293:6;301;309;317;370:3;358:9;349:7;345:23;341:33;338:53;;;387:1;384;377:12;338:53;410:40;440:9;410:40;:::i;:::-;400:50;;469:49;514:2;503:9;499:18;469:49;:::i;:::-;459:59;;537:49;582:2;571:9;567:18;537:49;:::i;:::-;527:59;;605:49;650:2;639:9;635:18;605:49;:::i;:::-;595:59;;196:464;;;;;;;:::o;873:127::-;934:10;929:3;925:20;922:1;915:31;965:4;962:1;955:15;989:4;986:1;979:15;1005:380;1084:1;1080:12;;;;1127;;;1148:61;;1202:4;1194:6;1190:17;1180:27;;1148:61;1255:2;1247:6;1244:14;1224:18;1221:38;1218:161;;1301:10;1296:3;1292:20;1289:1;1282:31;1336:4;1333:1;1326:15;1364:4;1361:1;1354:15;1218:161;;1005:380;;;:::o;1516:518::-;1618:2;1613:3;1610:11;1607:421;;;1654:5;1651:1;1644:16;1698:4;1695:1;1685:18;1768:2;1756:10;1752:19;1749:1;1745:27;1739:4;1735:38;1804:4;1792:10;1789:20;1786:47;;;-1:-1:-1;1827:4:45;1786:47;1882:2;1877:3;1873:12;1870:1;1866:20;1860:4;1856:31;1846:41;;1937:81;1955:2;1948:5;1945:13;1937:81;;;2014:1;2000:16;;1981:1;1970:13;1937:81;;;1941:3;;1607:421;1516:518;;;:::o;2210:1299::-;2330:10;;-1:-1:-1;;;;;2352:30:45;;2349:56;;;2385:18;;:::i;:::-;2414:97;2504:6;2464:38;2496:4;2490:11;2464:38;:::i;:::-;2458:4;2414:97;:::i;:::-;2560:4;2591:2;2580:14;;2608:1;2603:649;;;;3296:1;3313:6;3310:89;;;-1:-1:-1;3365:19:45;;;3359:26;3310:89;-1:-1:-1;;2167:1:45;2163:11;;;2159:24;2155:29;2145:40;2191:1;2187:11;;;2142:57;3412:81;;2573:930;;2603:649;1463:1;1456:14;;;1500:4;1487:18;;-1:-1:-1;;2639:20:45;;;2757:222;2771:7;2768:1;2765:14;2757:222;;;2853:19;;;2847:26;2832:42;;2960:4;2945:20;;;;2913:1;2901:14;;;;2787:12;2757:222;;;2761:3;3007:6;2998:7;2995:19;2992:201;;;3068:19;;;3062:26;-1:-1:-1;;3151:1:45;3147:14;;;3163:3;3143:24;3139:37;3135:42;3120:58;3105:74;;2992:201;-1:-1:-1;;;;3239:1:45;3223:14;;;3219:22;3206:36;;-1:-1:-1;2210:1299:45:o;4008:418::-;4157:2;4146:9;4139:21;4120:4;4189:6;4183:13;4232:6;4227:2;4216:9;4212:18;4205:34;4291:6;4286:2;4278:6;4274:15;4269:2;4258:9;4254:18;4248:50;4347:1;4342:2;4333:6;4322:9;4318:22;4314:31;4307:42;4417:2;4410;4406:7;4401:2;4393:6;4389:15;4385:29;4374:9;4370:45;4366:54;4358:62;;;4008:418;;;;:::o;4431:297::-;4549:12;;4596:4;4585:16;;;4579:23;;4549:12;4614:16;;4611:111;;;-1:-1:-1;;4688:4:45;4684:17;;;;4681:1;4677:25;4673:38;4662:50;;4431:297;-1:-1:-1;4431:297:45:o;:::-;730:2686:39;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","linkReferences":{}},"deployedBytecode":{"object":"608060405234801561000f575f5ffd5b506004361061018e575f3560e01c80637535d246116100dd5780638da5cb5b11610088578063e5209f2c11610063578063e5209f2c14610415578063e56c8cb414610428578063f2fde38b1461043b575f5ffd5b80638da5cb5b146103d2578063920f5c84146103ef578063b1b6308b14610402575f5ffd5b80638456cb59116100b85780638456cb591461038257806384b0196e1461038a5780638c01220c146103a5575f5ffd5b80637535d246146102c05780637bf703b4146102e75780638115192f14610309575f5ffd5b80633644e5151161013d5780635678d216116101185780635678d216146102835780635c975abb14610296578063715018a6146102b8575f5ffd5b80633644e515146102525780633f4ba83a146102685780634743582f14610270575f5ffd5b80630be6c2aa1161016d5780630be6c2aa146101fc5780631f273c8e1461020457806332fe7b261461022b575f5ffd5b8062ae3bf8146101925780630542975c146101a757806309802f6d146101d9575b5f5ffd5b6101a56101a036600461203b565b61044e565b005b6101af610524565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b6101ec6101e7366004612188565b6105b7565b60405190151581526020016101d0565b6101a56106b4565b6101af7f000000000000000000000000000000000000000000000000000000000000000081565b6101af7f000000000000000000000000000000000000000000000000000000000000000081565b61025a610798565b6040519081526020016101d0565b6101a56107a1565b6101af61027e3660046122b6565b6107b3565b6101a5610291366004612407565b6107c7565b5f5474010000000000000000000000000000000000000000900460ff166101ec565b6101a5610852565b6101af7f000000000000000000000000000000000000000000000000000000000000000081565b6101ec6102f536600461203b565b60036020525f908152604090205460ff1681565b61035061031736600461203b565b60046020525f90815260409020805460019091015460ff821691610100900473ffffffffffffffffffffffffffffffffffffffff169083565b60408051931515845273ffffffffffffffffffffffffffffffffffffffff9092166020840152908201526060016101d0565b6101a5610863565b610392610873565b6040516101d097969594939291906124fb565b6101ec6103b3366004612591565b600560209081525f928352604080842090915290825290205460ff1681565b5f5473ffffffffffffffffffffffffffffffffffffffff166101af565b6101ec6103fd366004612609565b6108d1565b6101a56104103660046122b6565b61098f565b6101a561042336600461203b565b610b94565b6101a56104363660046126eb565b610c64565b6101a561044936600461203b565b610d42565b610456610da7565b6105216104775f5473ffffffffffffffffffffffffffffffffffffffff1690565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff8416906370a0823190602401602060405180830381865afa1580156104df573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610503919061271e565b73ffffffffffffffffffffffffffffffffffffffff84169190610df9565b50565b5f7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16630542975c6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561058e573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105b29190612735565b905090565b5f6105c0610e7f565b82516020808501516060860151608087015161010088015160a089015160c08a015160405133985f9861069b98610680987f1ca15395c04ac473d5b42656e3782ae1fce1a113fdb5432b57f8fb0870fa3178988d989497929691959094930198895273ffffffffffffffffffffffffffffffffffffffff97881660208a01529587166040890152939095166060870152608086019190915260a085015260c084019290925263ffffffff9190911660e08301526101008201526101200190565b60405160208183030381529060405280519060200120610ed3565b90506106a8868286610f1a565b925050505b9392505050565b6106bc610e7f565b335f908152600460205260409020805460ff16610705576040517f60f6234100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f816001015411610742576040517fd32e7fc600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8054600182015461077091610100900473ffffffffffffffffffffffffffffffffffffffff16903390610fb1565b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055565b5f6105b2611014565b6107a9610da7565b6107b161114a565b565b5f6107be83836111c6565b90505b92915050565b6107cf610e7f565b3373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161461083e576040517febe91ae200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61084b8585858585611245565b5050505050565b61085a610da7565b6107b15f6114b3565b61086b610da7565b6107b1611527565b5f6060805f5f5f6060610884611595565b61088c6115c2565b604080515f808252602082019092527f0f000000000000000000000000000000000000000000000000000000000000009b939a50919850469750309650945092509050565b5f3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610941576040517f7ffc0b6500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61097f83838080601f0160208091040260200160405190810160405280939291908181526020018383808284375f920191909152506115ef92505050565b90505b9998505050505050505050565b610997610e7f565b5f6109a28383611698565b825173ffffffffffffffffffffffffffffffffffffffff9081165f9081526005602090815260408083209385168352929052205490915060ff1615610a13576040517f785fa2f400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16826020015173ffffffffffffffffffffffffffffffffffffffff1614610a7c576040517f05886ddd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ab081836101000151846040015173ffffffffffffffffffffffffffffffffffffffff16610df99092919063ffffffff16565b6040518060600160405280600115158152602001836040015173ffffffffffffffffffffffffffffffffffffffff168152602001836101200151846101000151610afa9190612750565b905273ffffffffffffffffffffffffffffffffffffffff9182165f9081526004602090815260409182902083518154928501517fffffffffffffffffffffff0000000000000000000000000000000000000000009093169015157fffffffffffffffffffffff0000000000000000000000000000000000000000ff1617610100929095169190910293909317835501516001909101555050565b73ffffffffffffffffffffffffffffffffffffffff8116610be1576040517ff6b2911f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b335f81815260056020908152604080832073ffffffffffffffffffffffffffffffffffffffff8616808552925280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055519092917f856f0b5ddd2d41f4778c648c0ab55f0285fb87f0f35b6749889ae0d8ebef3c6c91a350565b610c6c610da7565b73ffffffffffffffffffffffffffffffffffffffff8216610cb9576040517ff6b2911f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff82165f8181526003602090815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001685151590811790915591519182527fad58a21bee8db31c6b4cfcdeaf806d8b7dfa187c5da0dc88e4bffc740ce5b91a910160405180910390a25050565b610d4a610da7565b73ffffffffffffffffffffffffffffffffffffffff8116610d9e576040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081525f60048201526024015b60405180910390fd5b610521816114b3565b5f5473ffffffffffffffffffffffffffffffffffffffff1633146107b1576040517f118cdaa7000000000000000000000000000000000000000000000000000000008152336004820152602401610d95565b60405173ffffffffffffffffffffffffffffffffffffffff838116602483015260448201839052610e7a91859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611840565b505050565b5f5474010000000000000000000000000000000000000000900460ff16156107b1576040517fd93c066500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f6107c1610edf611014565b836040517f19010000000000000000000000000000000000000000000000000000000000008152600281019290925260228201526042902090565b5f8373ffffffffffffffffffffffffffffffffffffffff163b5f03610f9f575f5f610f4585856118e5565b5090925090505f816003811115610f5e57610f5e612788565b148015610f9657508573ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b925050506106ad565b610faa84848461192e565b90506106ad565b610fd373ffffffffffffffffffffffffffffffffffffffff8416833084611a76565b610e7a73ffffffffffffffffffffffffffffffffffffffff84167f000000000000000000000000000000000000000000000000000000000000000083611abc565b5f3073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614801561107957507f000000000000000000000000000000000000000000000000000000000000000046145b156110a357507f000000000000000000000000000000000000000000000000000000000000000090565b6105b2604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527f0000000000000000000000000000000000000000000000000000000000000000918101919091527f000000000000000000000000000000000000000000000000000000000000000060608201524660808201523060a08201525f9060c00160405160208183030381529060405280519060200120905090565b611152611b93565b5f80547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390a1565b5f6107be836111d58585611be6565b6040513060388201526f5af43d82803e903d91602b57fd5bf3ff60248201526014810192909252733d602d80600a3d3981f3363d3d373d3d3d363d73825260588201526037600c8201206078820152605560439091012073ffffffffffffffffffffffffffffffffffffffff1690565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16146112ca576040517f21eeab0000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61130b73ffffffffffffffffffffffffffffffffffffffff85167f00000000000000000000000000000000000000000000000000000000000000005f611abc565b6040805160018082528183019092525f916020808301908036833750506040805160018082528183019092529293505f9291506020808301908036833750506040805160018082528183019092529293505f9291506020808301908036833701905050905086835f81518110611383576113836127b5565b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505085825f815181106113d0576113d06127b5565b6020026020010181815250505f815f815181106113ef576113ef6127b5565b60209081029190910101526040517fab9c4b5d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063ab9c4b5d9061147c90309087908790879084908d908d906110cc90600401612829565b5f604051808303815f87803b158015611493575f5ffd5b505af11580156114a5573d5f5f3e3d5ffd5b505050505050505050505050565b5f805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b61152f610e7f565b5f80547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16740100000000000000000000000000000000000000001790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861119c3390565b60606105b27f00000000000000000000000000000000000000000000000000000000000000006001611ccb565b60606105b27f00000000000000000000000000000000000000000000000000000000000000006002611ccb565b6040517f0dae46860000000000000000000000000000000000000000000000000000000081525f9073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001690630dae468690611663908590600401612904565b5f604051808303815f87803b15801561167a575f5ffd5b505af115801561168c573d5f5f3e3d5ffd5b50600195945050505050565b73ffffffffffffffffffffffffffffffffffffffff82165f9081526003602052604081205460ff166116f6576040517f18dd5cd200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f6117018484611be6565b6040513060388201526f5af43d82803e903d91602b57fd5bf3ff602482015260148101869052733d602d80600a3d3981f3363d3d373d3d3d363d738152605881018290526037600c8201206078820152605560439091012090915073ffffffffffffffffffffffffffffffffffffffff16803b156117ab576040517f9b4d6ca600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6117b58583611d74565b6040517ff361d2d700000000000000000000000000000000000000000000000000000000815290915073ffffffffffffffffffffffffffffffffffffffff82169063f361d2d79061180a908790600401612916565b5f604051808303815f87803b158015611821575f5ffd5b505af1158015611833573d5f5f3e3d5ffd5b5092979650505050505050565b5f5f60205f8451602086015f885af18061185f576040513d5f823e3d81fd5b50505f513d91508115611876578060011415611890565b73ffffffffffffffffffffffffffffffffffffffff84163b155b156118df576040517f5274afe700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85166004820152602401610d95565b50505050565b5f5f5f835160410361191c576020840151604085015160608601515f1a61190e88828585611d80565b955095509550505050611927565b505081515f91506002905b9250925092565b5f5f5f8573ffffffffffffffffffffffffffffffffffffffff16858560405160240161195b929190612a0b565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f1626ba7e00000000000000000000000000000000000000000000000000000000179052516119dc9190612a2b565b5f60405180830381855afa9150503d805f8114611a14576040519150601f19603f3d011682016040523d82523d5f602084013e611a19565b606091505b5091509150818015611a2d57506020815110155b80156106a8575080517f1626ba7e0000000000000000000000000000000000000000000000000000000090611a6b908301602090810190840161271e565b149695505050505050565b60405173ffffffffffffffffffffffffffffffffffffffff84811660248301528381166044830152606482018390526118df9186918216906323b872dd90608401610e33565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f095ea7b300000000000000000000000000000000000000000000000000000000179052611b488482611e73565b6118df5760405173ffffffffffffffffffffffffffffffffffffffff84811660248301525f6044830152611b8991869182169063095ea7b390606401610e33565b6118df8482611840565b5f5474010000000000000000000000000000000000000000900460ff166107b1576040517f8dfc202b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f82825f01518360400151846060015185608001518660a001518760c001518860e001518961010001518a61012001518b61014001518c6101600151604051602001611cad9c9b9a9998979695949392919073ffffffffffffffffffffffffffffffffffffffff9c8d1681529a8c1660208c0152988b1660408b0152969099166060890152608088019490945260a087019290925260c086015260e08501526101008401526101208301939093526101408201929092526101608101919091526101800190565b60405160208183030381529060405280519060200120905092915050565b606060ff8314611ce557611cde83611ec9565b90506107c1565b818054611cf190612a41565b80601f0160208091040260200160405190810160405280929190818152602001828054611d1d90612a41565b8015611d685780601f10611d3f57610100808354040283529160200191611d68565b820191905f5260205f20905b815481529060010190602001808311611d4b57829003601f168201915b505050505090506107c1565b5f6107be83835f611f06565b5f80807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115611db957505f91506003905082611e69565b604080515f808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015611e0a573d5f5f3e3d5ffd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff8116611e6057505f925060019150829050611e69565b92505f91508190505b9450945094915050565b5f5f5f5f60205f8651602088015f8a5af192503d91505f519050828015611ebf57508115611ea45780600114611ebf565b5f8673ffffffffffffffffffffffffffffffffffffffff163b115b9695505050505050565b60605f611ed583611fda565b6040805160208082528183019092529192505f91906020820181803683375050509182525060208101929092525090565b5f81471015611f4a576040517fcf47918100000000000000000000000000000000000000000000000000000000815247600482015260248101839052604401610d95565b763d602d80600a3d3981f3363d3d373d3d3d363d730000008460601b60e81c175f526e5af43d82803e903d91602b57fd5bf38460781b17602052826037600984f5905073ffffffffffffffffffffffffffffffffffffffff81166106ad576040517fb06ebf3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f60ff8216601f8111156107c1576040517fb3512b0c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff81168114610521575f5ffd5b5f6020828403121561204b575f5ffd5b81356106ad8161201a565b80356120618161201a565b919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b604051610180810167ffffffffffffffff811182821017156120b7576120b7612066565b60405290565b803563ffffffff81168114612061575f5ffd5b80358015158114612061575f5ffd5b5f82601f8301126120ee575f5ffd5b813567ffffffffffffffff81111561210857612108612066565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810167ffffffffffffffff8111828210171561215557612155612066565b60405281815283820160200185101561216c575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f5f5f8385036101c081121561219c575f5ffd5b84356121a78161201a565b93506101807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0820112156121d9575f5ffd5b506121e2612093565b6121ee60208601612056565b81526121fc60408601612056565b602082015261220d60608601612056565b6040820152608085810135606083015260a08601359082015261223260c086016120bd565b60a082015260e08581013560c083015261010080870135918301919091526101208601359082015261226761014086016120d0565b610120820152610160858101356101408301526101808601359082015291506101a084013567ffffffffffffffff8111156122a0575f5ffd5b6122ac868287016120df565b9150509250925092565b5f5f8284036101a08112156122c9575f5ffd5b83356122d48161201a565b92506101807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe082011215612306575f5ffd5b5061230f612093565b61231b60208501612056565b815261232960408501612056565b602082015261233a60608501612056565b604082015261234b60808501612056565b606082015260a084810135608083015260c0808601359183019190915260e08086013591830191909152610100808601359183019190915261012080860135918301919091526101408086013591830191909152610160808601359183019190915261018090940135938101939093525092909150565b5f5f83601f8401126123d2575f5ffd5b50813567ffffffffffffffff8111156123e9575f5ffd5b602083019150836020828501011115612400575f5ffd5b9250929050565b5f5f5f5f5f6080868803121561241b575f5ffd5b85356124268161201a565b945060208601356124368161201a565b935060408601359250606086013567ffffffffffffffff811115612458575f5ffd5b612464888289016123c2565b969995985093965092949392505050565b5f81518084528060208401602086015e5f6020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b5f8151808452602084019350602083015f5b828110156124f15781518652602095860195909101906001016124d3565b5093949350505050565b7fff000000000000000000000000000000000000000000000000000000000000008816815260e060208201525f61253560e0830189612475565b82810360408401526125478189612475565b905086606084015273ffffffffffffffffffffffffffffffffffffffff861660808401528460a084015282810360c084015261258381856124c1565b9a9950505050505050505050565b5f5f604083850312156125a2575f5ffd5b82356125ad8161201a565b915060208301356125bd8161201a565b809150509250929050565b5f5f83601f8401126125d8575f5ffd5b50813567ffffffffffffffff8111156125ef575f5ffd5b6020830191508360208260051b8501011115612400575f5ffd5b5f5f5f5f5f5f5f5f5f60a08a8c031215612621575f5ffd5b893567ffffffffffffffff811115612637575f5ffd5b6126438c828d016125c8565b909a5098505060208a013567ffffffffffffffff811115612662575f5ffd5b61266e8c828d016125c8565b90985096505060408a013567ffffffffffffffff81111561268d575f5ffd5b6126998c828d016125c8565b90965094505060608a01356126ad8161201a565b925060808a013567ffffffffffffffff8111156126c8575f5ffd5b6126d48c828d016123c2565b915080935050809150509295985092959850929598565b5f5f604083850312156126fc575f5ffd5b82356127078161201a565b9150612715602084016120d0565b90509250929050565b5f6020828403121561272e575f5ffd5b5051919050565b5f60208284031215612745575f5ffd5b81516106ad8161201a565b808201808211156107c1577f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b81835281816020850137505f602082840101525f60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b5f60e0820173ffffffffffffffffffffffffffffffffffffffff8b16835260e06020840152808a518083526101008501915060208c0192505f5b8181101561289757835173ffffffffffffffffffffffffffffffffffffffff16835260209384019390920191600101612863565b505083810360408501526128ab818b6124c1565b91505082810360608401526128c081896124c1565b73ffffffffffffffffffffffffffffffffffffffff88166080850152905082810360a08401526128f18186886127e2565b91505061098260c083018461ffff169052565b602081525f6107be6020830184612475565b815173ffffffffffffffffffffffffffffffffffffffff1681526101808101602083015161295c602084018273ffffffffffffffffffffffffffffffffffffffff169052565b506040830151612984604084018273ffffffffffffffffffffffffffffffffffffffff169052565b5060608301516129ac606084018273ffffffffffffffffffffffffffffffffffffffff169052565b506080830151608083015260a083015160a083015260c083015160c083015260e083015160e083015261010083015161010083015261012083015161012083015261014083015161014083015261016083015161016083015292915050565b828152604060208201525f612a236040830184612475565b949350505050565b5f82518060208501845e5f920191825250919050565b600181811c90821680612a5557607f821691505b602082108103612a8c577f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5091905056fea164736f6c634300081c000a","sourceMap":"730:2686:39:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3279:125:40;;;;;;:::i;:::-;;:::i;:::-;;2085:120:39;;;:::i;:::-;;;662:42:45;650:55;;;632:74;;620:2;605:18;2085:120:39;;;;;;;;5593:644:40;;;;;;:::i;:::-;;:::i;:::-;;;4593:14:45;;4586:22;4568:41;;4556:2;4541:18;5593:644:40;4428:187:45;4829:462:40;;;:::i;1439:51::-;;;;;1532:40;;;;;6279:98;;;:::i;:::-;;;5276:25:45;;;5264:2;5249:18;6279:98:40;5130:177:45;3539:59:40;;;:::i;6419:240::-;;;;;;:::i;:::-;;:::i;3635:284::-;;;;;;:::i;:::-;;:::i;1726:84:27:-;1773:4;1796:7;;;;;;1726:84;;2293:101:12;;;:::i;973:27:39:-;;;;;1627:55:40;;;;;;:::i;:::-;;;;;;;;;;;;;;;;1745:65;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9364:14:45;;9357:22;9339:41;;9428:42;9416:55;;;9411:2;9396:18;;9389:83;9488:18;;;9481:34;9327:2;9312:18;1745:65:40;9143:378:45;3443:55:40;;;:::i;5228:557:32:-;;;:::i;:::-;;;;;;;;;;;;;:::i;1867:71:40:-;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;1638:85:12;1684:7;1710:6;;;1638:85;;1702:342:39;;;;;;:::i;:::-;;:::i;3961:826:40:-;;;;;;:::i;:::-;;:::i;5333:218::-;;;;;;:::i;:::-;;:::i;2692:303::-;;;;;;:::i;:::-;;:::i;2543:215:12:-;;;;;;:::i;:::-;;:::i;3279:125:40:-;1531:13:12;:11;:13::i;:::-;3340:59:40::1;3359:7;1684::12::0;1710:6;;;;1638:85;3359:7:40::1;3368:30;::::0;;;;3392:4:::1;3368:30;::::0;::::1;632:74:45::0;3368:15:40::1;::::0;::::1;::::0;::::1;::::0;605:18:45;;3368:30:40::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;3340:18;::::0;::::1;::::0;:59;:18:::1;:59::i;:::-;3279:125:::0;:::o;2085:120:39:-;2138:22;2175:4;:23;;;:25;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;2168:32;;2085:120;:::o;5593:644:40:-;5749:4;1350:19:27;:17;:19::i;:::-;5950:15:40;;5986:14:::1;::::0;;::::1;::::0;6013:16:::1;::::0;::::1;::::0;6041:15:::1;::::0;::::1;::::0;6068:10:::1;::::0;::::1;::::0;6090:13:::1;::::0;::::1;::::0;6115::::1;::::0;::::1;::::0;5856:282:::1;::::0;5780:10:::1;::::0;5761:16:::1;::::0;5813:339:::1;::::0;5856:282:::1;::::0;652:66:44::1;::::0;5780:10:40;;5950:15;;5986:14;;6013:16;;6041:15;;6068:10;5856:282:::1;14818:25:45::0;;;14891:42;14879:55;;;14874:2;14859:18;;14852:83;14971:55;;;14966:2;14951:18;;14944:83;15063:55;;;;15058:2;15043:18;;15036:83;15150:3;15135:19;;15128:35;;;;15194:3;15179:19;;15172:35;15238:3;15223:19;;15216:35;;;;15300:10;15288:23;;;;15282:3;15267:19;;15260:52;15343:3;15328:19;;15321:35;14805:3;14790:19;;14449:913;5856:282:40::1;;;;;;;;;;;;;5837:309;;;;;;5813:16;:339::i;:::-;5796:356;;6165:67;6202:10;6214:6;6222:9;6165:36;:67::i;:::-;6158:74;;;;1379:1:27;5593:644:40::0;;;;;:::o;4829:462::-;1350:19:27;:17;:19::i;:::-;5016:10:40::1;4953:45;5001:26:::0;;;:14:::1;:26;::::0;;;;5041:28;;::::1;;5033:58;;;;;;;;;;;;;;;;;5133:1;5105:13;:25;;;:29;5097:56;;;;;;;;;;;;;;;;;5183:19:::0;;::::1;5217:25:::0;::::1;::::0;5160:83:::1;::::0;5183:19:::1;::::0;::::1;;;::::0;5205:10:::1;::::0;5160:15:::1;:83::i;:::-;5250:36:::0;;;::::1;::::0;;4829:462::o;6279:98::-;6330:7;6352:20;:18;:20::i;3539:59::-;1531:13:12;:11;:13::i;:::-;3583:10:40::1;:8;:10::i;:::-;3539:59::o:0;6419:240::-;6567:7;6589:65;6622:21;6645:8;6589:32;:65::i;:::-;6582:72;;6419:240;;;;;:::o;3635:284::-;1350:19:27;:17;:19::i;:::-;3805:10:40::1;:29;3827:6;3805:29;;3797:57;;;;;;;;;;;;;;;;;3860:54;3878:6;3886:5;3893:6;3901:12;;3860:17;:54::i;:::-;3635:284:::0;;;;;:::o;2293:101:12:-;1531:13;:11;:13::i;:::-;2357:30:::1;2384:1;2357:18;:30::i;3443:55:40:-:0;1531:13:12;:11;:13::i;:::-;3485:8:40::1;:6;:8::i;5228:557:32:-:0;5326:13;5353:18;5385:21;5420:15;5449:25;5488:12;5514:27;5617:13;:11;:13::i;:::-;5644:16;:14;:16::i;:::-;5752;;;5736:1;5752:16;;;;;;;;;5566:212;;;;-1:-1:-1;5566:212:32;;-1:-1:-1;5674:13:32;;-1:-1:-1;5709:4:32;;-1:-1:-1;5736:1:32;-1:-1:-1;5752:16:32;-1:-1:-1;5566:212:32;-1:-1:-1;5228:557:32:o;1702:342:39:-;1926:4;1946:10;:27;1968:4;1946:27;;1938:57;;;;;;;;;;;;;;;;;2008:31;2026:12;;2008:31;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2008:17:39;;-1:-1:-1;;;2008:31:39:i;:::-;2001:38;;1702:342;;;;;;;;;;;;:::o;3961:826:40:-;1350:19:27;:17;:19::i;:::-;4145:23:40::1;4171:51;4190:21;4213:8;4171:18;:51::i;:::-;4258:14:::0;;4238:35:::1;::::0;;::::1;;::::0;;;:19:::1;:35;::::0;;;;;;;:52;;::::1;::::0;;;;;;;4145:77;;-1:-1:-1;4238:52:40::1;;4237:53;4229:83;;;;;;;;;;;;;;;;;4347:15;4326:36;;:8;:17;;;:36;;;4318:69;;;;;;;;;;;;;;;;;4457:82;4497:15;4514:8;:24;;;4464:8;:18;;;4457:39;;;;:82;;;;;:::i;:::-;4615:167;;;;;;;;4663:4;4615:167;;;;;;4682:8;:18;;;4615:167;;;;;;4748:8;:27;;;4721:8;:24;;;:54;;;;:::i;:::-;4615:167:::0;;4581:31:::1;::::0;;::::1;;::::0;;;:14:::1;:31;::::0;;;;;;;;:201;;;;;;::::1;::::0;;;;;;::::1;;::::0;;;::::1;::::0;;;::::1;::::0;;;::::1;::::0;;;::::1;::::0;;::::1;::::0;-1:-1:-1;4581:201:40;;::::1;::::0;-1:-1:-1;;3961:826:40:o;5333:218::-;5398:22;;;5390:53;;;;;;;;;;;;;;;;;5470:10;5450:31;;;;:19;:31;;;;;;;;;:41;;;;;;;;;;:48;;;;5494:4;5450:48;;;5510:36;5450:41;;5470:10;5510:36;;;5333:218;:::o;2692:303::-;1531:13:12;:11;:13::i;:::-;2803:35:40::1;::::0;::::1;2795:66;;;;;;;;;;;;;;;;;2868:46;::::0;::::1;;::::0;;;:23:::1;:46;::::0;;;;;;;;:55;;;::::1;::::0;::::1;;::::0;;::::1;::::0;;;2935;;4568:41:45;;;2935:55:40::1;::::0;4541:18:45;2935:55:40::1;;;;;;;2692:303:::0;;:::o;2543:215:12:-;1531:13;:11;:13::i;:::-;2627:22:::1;::::0;::::1;2623:91;;2672:31;::::0;::::1;::::0;;2700:1:::1;2672:31;::::0;::::1;632:74:45::0;605:18;;2672:31:12::1;;;;;;;;2623:91;2723:28;2742:8;2723:18;:28::i;1796:162::-:0;1684:7;1710:6;1855:23;1710:6;735:10:23;1855:23:12;1851:101;;1901:40;;;;;735:10:23;1901:40:12;;;632:74:45;605:18;;1901:40:12;456:256:45;1219:160:21;1328:43;;1343:14;15843:55:45;;;1328:43:21;;;15825:74:45;15915:18;;;15908:34;;;1301:71:21;;1321:5;;1343:14;;;;;15798:18:45;;1328:43:21;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1301:19;:71::i;:::-;1219:160;;;:::o;1878:128:27:-;1773:4;1796:7;;;;;;1939:61;;;1974:15;;;;;;;;;;;;;;5017:176:32;5094:7;5120:66;5153:20;:18;:20::i;:::-;5175:10;4049:4:33;4043:11;4079:10;4067:23;;4119:4;4110:14;;4103:39;;;;4171:4;4162:14;;4155:34;4227:4;4212:20;;;3874:374;1494:429:34;1600:4;1620:6;:18;;;1642:1;1620:23;1616:301;;1660:17;1679:22;1707:33;1724:4;1730:9;1707:16;:33::i;:::-;-1:-1:-1;1659:81:34;;-1:-1:-1;1659:81:34;-1:-1:-1;1768:26:34;1761:3;:33;;;;;;;;:::i;:::-;;:56;;;;;1811:6;1798:19;;:9;:19;;;1761:56;1754:63;;;;;;1616:301;1855:51;1882:6;1890:4;1896:9;1855:26;:51::i;:::-;1848:58;;;;3218:196:39;3311:51;:22;;;3334:4;3348;3355:6;3311:22;:51::i;:::-;3368:41;:18;;;3395:4;3402:6;3368:18;:41::i;3945:262:32:-;3998:7;4029:4;4021:28;4038:11;4021:28;;:63;;;;;4070:14;4053:13;:31;4021:63;4017:184;;;-1:-1:-1;4107:22:32;;3945:262::o;4017:184::-;4167:23;4304:80;;;2079:95;4304:80;;;21418:25:45;4326:11:32;21459:18:45;;;21452:34;;;;4339:14:32;21502:18:45;;;21495:34;4355:13:32;21545:18:45;;;21538:34;4378:4:32;21588:19:45;;;21581:84;4268:7:32;;21390:19:45;;4304:80:32;;;;;;;;;;;;4294:91;;;;;;4287:98;;4213:179;;2586:117:27;1597:16;:14;:16::i;:::-;2654:5:::1;2644:15:::0;;;::::1;::::0;;2674:22:::1;735:10:23::0;2683:12:27::1;2674:22;::::0;662:42:45;650:55;;;632:74;;620:2;605:18;2674:22:27::1;;;;;;;2586:117::o:0;8609:436:40:-;8758:7;8880:160;8924:21;8955:54;8977:21;9000:8;8955:21;:54::i;:::-;4780:4:19;4774:11;9027:4:40;4814::19;4805:14;;4798:32;4866:34;4859:4;4850:14;;4843:58;-1:-1:-1;4921:14:19;;4914:38;;;;4977:42;4965:55;;5049:4;5040:14;;5033:28;5123:4;5116;5107:14;;5097:31;5090:4;5081:14;;5074:55;5185:4;5178;5169:14;;;5159:31;5192:42;5155:80;;4549:702;2414:652:39;2586:4;2568:23;;:6;:23;;;2560:49;;;;;;;;;;;;;;;;;2616:36;:18;;;2643:4;2650:1;2616:18;:36::i;:::-;2685:16;;;2699:1;2685:16;;;;;;;;;2659:23;;2685:16;;;;;;;;;-1:-1:-1;;2734:16:39;;;2748:1;2734:16;;;;;;;;;2659:42;;-1:-1:-1;2707:24:39;;2734:16;-1:-1:-1;2734:16:39;;;;;;;;;-1:-1:-1;;2793:16:39;;;2807:1;2793:16;;;;;;;;;2707:43;;-1:-1:-1;2756:34:39;;2793:16;-1:-1:-1;2793:16:39;;;;;;;;;;;-1:-1:-1;2793:16:39;2756:53;;2836:5;2816:6;2823:1;2816:9;;;;;;;;:::i;:::-;;;;;;:26;;;;;;;;;;;2861:6;2848:7;2856:1;2848:10;;;;;;;;:::i;:::-;;;;;;:19;;;;;2896:1;2873:17;2891:1;2873:20;;;;;;;;:::i;:::-;;;;;;;;;;:24;2904:157;;;;;:14;:4;:14;;;;:157;;2934:4;;2947:6;;2961:7;;2976:17;;2934:4;;3022:12;;;;927:4;;2904:157;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2554:512;;;2414:652;;;;;:::o;2912:187:12:-;2985:16;3004:6;;;3020:17;;;;;;;;;;3052:40;;3004:6;;;;;;;3052:40;;2985:16;3052:40;2975:124;2912:187;:::o;2339:115:27:-;1350:19;:17;:19::i;:::-;2398:7:::1;:14:::0;;;::::1;::::0;::::1;::::0;;2427:20:::1;2434:12;735:10:23::0;;656:96;6105:126:32;6151:13;6183:41;:5;6210:13;6183:26;:41::i;6557:135::-;6606:13;6638:47;:8;6668:16;6638:29;:47::i;7185:241:40:-;7367:37;;;;;7257:4;;7367:23;:6;:23;;;;:37;;7391:12;;7367:37;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;7417:4:40;;7185:241;-1:-1:-1;;;;;7185:241:40:o;7740:865::-;7893:46;;;7870:7;7893:46;;;:23;:46;;;;;;;;7885:82;;;;;;;;;;;;;;;;;8046:12;8061:54;8083:21;8106:8;8061:21;:54::i;:::-;4780:4:19;4774:11;8239:4:40;4814::19;4805:14;;4798:32;4866:34;4859:4;4850:14;;4843:58;-1:-1:-1;4921:14:19;;4914:38;;;4977:42;4965:55;;5049:4;5040:14;;5033:28;;;5123:4;5116;5107:14;;5097:31;5090:4;5081:14;;5074:55;5185:4;5178;5169:14;;;5159:31;5033:28;;-1:-1:-1;5192:42:19;5155:80;8264:27:40;;:32;8256:68;;;;;;;;;;;;;;;;;8384:54;8410:21;8433:4;8384:25;:54::i;:::-;8514:57;;;;;8366:72;;-1:-1:-1;8514:47:40;;;;;;:57;;8562:8;;8514:57;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;8585:15:40;;7740:865;-1:-1:-1;;;;;;;7740:865:40:o;8370:720:21:-;8450:18;8478:19;8616:4;8613:1;8606:4;8600:11;8593:4;8587;8583:15;8580:1;8573:5;8566;8561:60;8673:7;8663:176;;8717:4;8711:11;8762:16;8759:1;8754:3;8739:40;8808:16;8803:3;8796:29;8663:176;-1:-1:-1;;8916:1:21;8910:8;8866:16;;-1:-1:-1;8942:15:21;;:68;;8994:11;9009:1;8994:16;;8942:68;;;8960:26;;;;:31;8942:68;8938:146;;;9033:40;;;;;662:42:45;650:55;;9033:40:21;;;632:74:45;605:18;;9033:40:21;456:256:45;8938:146:21;8440:650;;8370:720;;:::o;2129:778:31:-;2232:17;2251:16;2269:14;2299:9;:16;2319:2;2299:22;2295:606;;2604:4;2589:20;;2583:27;2653:4;2638:20;;2632:27;2710:4;2695:20;;2689:27;2337:9;2681:36;2751:25;2762:4;2681:36;2583:27;2632;2751:10;:25::i;:::-;2744:32;;;;;;;;;;;2295:606;-1:-1:-1;;2872:16:31;;2823:1;;-1:-1:-1;2827:35:31;;2295:606;2129:778;;;;;:::o;2330:458:34:-;2473:4;2490:12;2504:19;2527:6;:17;;2601:4;2607:9;2558:60;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;2527:101;;;2558:60;2527:101;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2489:139;;;;2646:7;:42;;;;;2686:2;2669:6;:13;:19;;2646:42;:134;;;;-1:-1:-1;2704:29:34;;2745:34;;2704:29;;;;;;;;;;;;:::i;:::-;:76;;2330:458;-1:-1:-1;;;;;;2330:458:34:o;1618:188:21:-;1745:53;;1760:18;20647:55:45;;;1745:53:21;;;20629:74:45;20739:55;;;20719:18;;;20712:83;20811:18;;;20804:34;;;1718:81:21;;1738:5;;1760:18;;;;;20602::45;;1745:53:21;20427:417:45;5084:380:21;5199:47;;;5214:13;15843:55:45;;5199:47:21;;;15825:74:45;15915:18;;;;15908:34;;;5199:47:21;;;;;;;;;;15798:18:45;;;;5199:47:21;;;;;;;;;;;;;;5262:44;5214:13;5199:47;5262:23;:44::i;:::-;5257:201;;5349:43;;5364:13;15843:55:45;;;5349:43:21;;;15825:74:45;5389:1:21;15915:18:45;;;15908:34;5322:71:21;;5342:5;;5364:13;;;;;15798:18:45;;5349:43:21;15651:297:45;5322:71:21;5407:40;5427:5;5434:12;5407:19;:40::i;2078:126:27:-;1773:4;1796:7;;;;;;2136:62;;2172:15;;;;;;;;;;;;;;9049:604:40;9187:7;9256:21;9289:8;:14;;;9315:8;:18;;;9345:8;:17;;;9374:8;:19;;;9405:8;:18;;;9435:8;:13;;;9460:8;:16;;;9488:8;:24;;;9524:8;:27;;;9563:8;:28;;;9603:8;:27;;;9234:406;;;;;;;;;;;;;;;;;;22163:42:45;22151:55;;;22133:74;;22243:55;;;22238:2;22223:18;;22216:83;22335:55;;;22330:2;22315:18;;22308:83;22427:55;;;;22422:2;22407:18;;22400:83;22514:3;22499:19;;22492:35;;;;22558:3;22543:19;;22536:35;;;;22602:3;22587:19;;22580:35;22646:3;22631:19;;22624:35;22690:3;22675:19;;22668:35;22734:3;22719:19;;22712:35;;;;22778:3;22763:19;;22756:36;;;;22823:3;22808:19;;22801:36;;;;22120:3;22105:19;;21676:1167;9234:406:40;;;;;;;;;;;;;9215:433;;;;;;9202:446;;9049:604;;;;:::o;3368:267:28:-;3462:13;1390:66;3491:46;;3487:142;;3560:15;3569:5;3560:8;:15::i;:::-;3553:22;;;;3487:142;3613:5;3606:12;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2870:169:19;2954:16;2989:43;3008:14;3024:4;3030:1;2989:18;:43::i;5203:1551:31:-;5329:17;;;6283:66;6270:79;;6266:164;;;-1:-1:-1;6381:1:31;;-1:-1:-1;6385:30:31;;-1:-1:-1;6417:1:31;6365:54;;6266:164;6541:24;;;6524:14;6541:24;;;;;;;;;23517:25:45;;;23590:4;23578:17;;23558:18;;;23551:45;;;;23612:18;;;23605:34;;;23655:18;;;23648:34;;;6541:24:31;;23489:19:45;;6541:24:31;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;6541:24:31;;;;;;-1:-1:-1;;6579:20:31;;;6575:113;;-1:-1:-1;6631:1:31;;-1:-1:-1;6635:29:31;;-1:-1:-1;6631:1:31;;-1:-1:-1;6615:62:31;;6575:113;6706:6;-1:-1:-1;6714:20:31;;-1:-1:-1;6714:20:31;;-1:-1:-1;5203:1551:31;;;;;;;;;:::o;9592:480:21:-;9675:4;9691:12;9713:18;9741:19;9875:4;9872:1;9865:4;9859:11;9852:4;9846;9842:15;9839:1;9832:5;9825;9820:60;9809:71;;9907:16;9893:30;;9957:1;9951:8;9936:23;;9985:7;:80;;;;-1:-1:-1;9997:15:21;;:67;;10048:11;10063:1;10048:16;9997:67;;;10044:1;10023:5;10015:26;;;:30;9997:67;9978:87;9592:480;-1:-1:-1;;;;;;9592:480:21:o;2078:378:28:-;2137:13;2162:11;2176:16;2187:4;2176:10;:16::i;:::-;2300:14;;;2311:2;2300:14;;;;;;;;;2162:30;;-1:-1:-1;2280:17:28;;2300:14;;;;;;;;;-1:-1:-1;;;2363:16:28;;;-1:-1:-1;2408:4:28;2399:14;;2392:28;;;;-1:-1:-1;2363:16:28;2078:378::o;3465:974:19:-;3594:16;3650:5;3626:21;:29;3622:123;;;3678:56;;;;;3705:21;3678:56;;;23867:25:45;23908:18;;;23901:34;;;23840:18;;3678:56:19;23693:248:45;3622:123:19;4031:48;4013:14;4007:4;4003:25;3997:4;3993:36;3990:90;3984:4;3977:104;4238:32;4221:14;4215:4;4211:25;4208:63;4202:4;4195:77;4324:4;4318;4312;4305:5;4297:32;4285:44;-1:-1:-1;4352:22:19;;;4348:85;;4397:25;;;;;;;;;;;;;;2528:245:28;2589:7;2661:4;2625:40;;2688:2;2679:11;;2675:69;;;2713:20;;;;;;;;;;;;;;14:162:45;108:42;101:5;97:54;90:5;87:65;77:93;;166:1;163;156:12;181:270;255:6;308:2;296:9;287:7;283:23;279:32;276:52;;;324:1;321;314:12;276:52;363:9;350:23;382:39;415:5;382:39;:::i;717:142::-;785:20;;814:39;785:20;814:39;:::i;:::-;717:142;;;:::o;864:184::-;916:77;913:1;906:88;1013:4;1010:1;1003:15;1037:4;1034:1;1027:15;1053:250;1120:2;1114:9;1162:6;1150:19;;1199:18;1184:34;;1220:22;;;1181:62;1178:88;;;1246:18;;:::i;:::-;1282:2;1275:22;1053:250;:::o;1308:163::-;1375:20;;1435:10;1424:22;;1414:33;;1404:61;;1461:1;1458;1451:12;1476:160;1541:20;;1597:13;;1590:21;1580:32;;1570:60;;1626:1;1623;1616:12;1641:863;1683:5;1736:3;1729:4;1721:6;1717:17;1713:27;1703:55;;1754:1;1751;1744:12;1703:55;1794:6;1781:20;1824:18;1816:6;1813:30;1810:56;;;1846:18;;:::i;:::-;1915:2;1909:9;1981:4;1969:17;;2062:66;1965:90;;;2057:2;1961:99;1957:172;1945:185;;2160:18;2145:34;;2181:22;;;2142:62;2139:88;;;2207:18;;:::i;:::-;2243:2;2236:22;2267;;;2308:19;;;2329:4;2304:30;2301:39;-1:-1:-1;2298:59:45;;;2353:1;2350;2343:12;2298:59;2417:6;2410:4;2402:6;2398:17;2391:4;2383:6;2379:17;2366:58;2472:1;2444:19;;;2465:4;2440:30;2433:41;;;;2448:6;1641:863;-1:-1:-1;;;1641:863:45:o;2509:1914::-;2617:6;2625;2633;2677:9;2668:7;2664:23;2707:3;2703:2;2699:12;2696:32;;;2724:1;2721;2714:12;2696:32;2763:9;2750:23;2782:39;2815:5;2782:39;:::i;:::-;2840:5;-1:-1:-1;2938:6:45;2869:66;2861:75;;2857:88;2854:108;;;2958:1;2955;2948:12;2854:108;;2986:17;;:::i;:::-;3028:38;3062:2;3051:9;3047:18;3028:38;:::i;:::-;3019:7;3012:55;3101:38;3135:2;3124:9;3120:18;3101:38;:::i;:::-;3096:2;3087:7;3083:16;3076:64;3174:38;3208:2;3197:9;3193:18;3174:38;:::i;:::-;3169:2;3156:16;;3149:64;3286:3;3271:19;;;3258:33;3320:2;3307:16;;3300:33;3406:3;3391:19;;3378:33;3427:17;;;3420:34;3489:38;3522:3;3507:19;;3489:38;:::i;:::-;3483:3;3470:17;;3463:65;3601:3;3586:19;;;3573:33;3635:3;3622:17;;3615:34;3722:3;3707:19;;;3694:33;3743:17;;;3736:34;;;;3843:3;3828:19;;3815:33;3864:17;;;3857:34;3926:36;3957:3;3942:19;;3926:36;:::i;:::-;3920:3;3907:17;;3900:63;4036:3;4021:19;;;4008:33;4070:3;4057:17;;4050:34;4157:6;4142:22;;4129:36;4181:17;;;4174:34;3911:7;-1:-1:-1;4285:3:45;4270:19;;4257:33;4313:18;4302:30;;4299:50;;;4345:1;4342;4335:12;4299:50;4368:49;4409:7;4400:6;4389:9;4385:22;4368:49;:::i;:::-;4358:59;;;2509:1914;;;;;:::o;5312:1765::-;5412:6;5420;5464:9;5455:7;5451:23;5494:3;5490:2;5486:12;5483:32;;;5511:1;5508;5501:12;5483:32;5550:9;5537:23;5569:39;5602:5;5569:39;:::i;:::-;5627:5;-1:-1:-1;5725:6:45;5656:66;5648:75;;5644:88;5641:108;;;5745:1;5742;5735:12;5641:108;;5773:17;;:::i;:::-;5815:38;5849:2;5838:9;5834:18;5815:38;:::i;:::-;5806:7;5799:55;5888:38;5922:2;5911:9;5907:18;5888:38;:::i;:::-;5883:2;5874:7;5870:16;5863:64;5961:38;5995:2;5984:9;5980:18;5961:38;:::i;:::-;5956:2;5947:7;5943:16;5936:64;6034:39;6068:3;6057:9;6053:19;6034:39;:::i;:::-;6029:2;6016:16;;6009:65;6147:3;6132:19;;;6119:33;6181:3;6168:17;;6161:34;6268:3;6253:19;;;6240:33;6289:17;;;6282:34;;;;6389:3;6374:19;;;6361:33;6410:17;;;6403:34;;;;6510:3;6495:19;;;6482:33;6531:17;;;6524:34;;;;6631:3;6616:19;;;6603:33;6652:17;;;6645:34;;;;6752:3;6737:19;;;6724:33;6773:17;;;6766:34;;;;6873:3;6858:19;;;6845:33;6894:17;;;6887:34;;;;6994:6;6979:22;;;6966:36;7018:17;;;7011:34;;;;-1:-1:-1;5312:1765:45;6020:7;;-1:-1:-1;5312:1765:45:o;7445:347::-;7496:8;7506:6;7560:3;7553:4;7545:6;7541:17;7537:27;7527:55;;7578:1;7575;7568:12;7527:55;-1:-1:-1;7601:20:45;;7644:18;7633:30;;7630:50;;;7676:1;7673;7666:12;7630:50;7713:4;7705:6;7701:17;7689:29;;7765:3;7758:4;7749:6;7741;7737:19;7733:30;7730:39;7727:59;;;7782:1;7779;7772:12;7727:59;7445:347;;;;;:::o;7797:837::-;7909:6;7917;7925;7933;7941;7994:3;7982:9;7973:7;7969:23;7965:33;7962:53;;;8011:1;8008;8001:12;7962:53;8050:9;8037:23;8069:39;8102:5;8069:39;:::i;:::-;8127:5;-1:-1:-1;8184:2:45;8169:18;;8156:32;8197:41;8156:32;8197:41;:::i;:::-;8257:7;-1:-1:-1;8337:2:45;8322:18;;8309:32;;-1:-1:-1;8418:2:45;8403:18;;8390:32;8445:18;8434:30;;8431:50;;;8477:1;8474;8467:12;8431:50;8516:58;8566:7;8557:6;8546:9;8542:22;8516:58;:::i;:::-;7797:837;;;;-1:-1:-1;7797:837:45;;-1:-1:-1;8593:8:45;;8490:84;7797:837;-1:-1:-1;;;7797:837:45:o;9526:348::-;9568:3;9606:5;9600:12;9633:6;9628:3;9621:19;9689:6;9682:4;9675:5;9671:16;9664:4;9659:3;9655:14;9649:47;9741:1;9734:4;9725:6;9720:3;9716:16;9712:27;9705:38;9863:4;9793:66;9788:2;9780:6;9776:15;9772:88;9767:3;9763:98;9759:109;9752:116;;;9526:348;;;;:::o;9879:420::-;9932:3;9970:5;9964:12;9997:6;9992:3;9985:19;10029:4;10024:3;10020:14;10013:21;;10068:4;10061:5;10057:16;10091:1;10101:173;10115:6;10112:1;10109:13;10101:173;;;10176:13;;10164:26;;10219:4;10210:14;;;;10247:17;;;;10137:1;10130:9;10101:173;;;-1:-1:-1;10290:3:45;;9879:420;-1:-1:-1;;;;9879:420:45:o;10304:996::-;10701:66;10693:6;10689:79;10678:9;10671:98;10805:3;10800:2;10789:9;10785:18;10778:31;10652:4;10832:46;10873:3;10862:9;10858:19;10850:6;10832:46;:::i;:::-;10926:9;10918:6;10914:22;10909:2;10898:9;10894:18;10887:50;10960:33;10986:6;10978;10960:33;:::i;:::-;10946:47;;11029:6;11024:2;11013:9;11009:18;11002:34;11085:42;11077:6;11073:55;11067:3;11056:9;11052:19;11045:84;11166:6;11160:3;11149:9;11145:19;11138:35;11222:9;11214:6;11210:22;11204:3;11193:9;11189:19;11182:51;11250:44;11287:6;11279;11250:44;:::i;:::-;11242:52;10304:996;-1:-1:-1;;;;;;;;;;10304:996:45:o;11305:404::-;11373:6;11381;11434:2;11422:9;11413:7;11409:23;11405:32;11402:52;;;11450:1;11447;11440:12;11402:52;11489:9;11476:23;11508:39;11541:5;11508:39;:::i;:::-;11566:5;-1:-1:-1;11623:2:45;11608:18;;11595:32;11636:41;11595:32;11636:41;:::i;:::-;11696:7;11686:17;;;11305:404;;;;;:::o;11714:367::-;11777:8;11787:6;11841:3;11834:4;11826:6;11822:17;11818:27;11808:55;;11859:1;11856;11849:12;11808:55;-1:-1:-1;11882:20:45;;11925:18;11914:30;;11911:50;;;11957:1;11954;11947:12;11911:50;11994:4;11986:6;11982:17;11970:29;;12054:3;12047:4;12037:6;12034:1;12030:14;12022:6;12018:27;12014:38;12011:47;12008:67;;;12071:1;12068;12061:12;12086:1547;12273:6;12281;12289;12297;12305;12313;12321;12329;12337;12390:3;12378:9;12369:7;12365:23;12361:33;12358:53;;;12407:1;12404;12397:12;12358:53;12447:9;12434:23;12480:18;12472:6;12469:30;12466:50;;;12512:1;12509;12502:12;12466:50;12551:70;12613:7;12604:6;12593:9;12589:22;12551:70;:::i;:::-;12640:8;;-1:-1:-1;12525:96:45;-1:-1:-1;;12728:2:45;12713:18;;12700:32;12757:18;12744:32;;12741:52;;;12789:1;12786;12779:12;12741:52;12828:72;12892:7;12881:8;12870:9;12866:24;12828:72;:::i;:::-;12919:8;;-1:-1:-1;12802:98:45;-1:-1:-1;;13007:2:45;12992:18;;12979:32;13036:18;13023:32;;13020:52;;;13068:1;13065;13058:12;13020:52;13107:72;13171:7;13160:8;13149:9;13145:24;13107:72;:::i;:::-;13198:8;;-1:-1:-1;13081:98:45;-1:-1:-1;;13283:2:45;13268:18;;13255:32;13296:39;13255:32;13296:39;:::i;:::-;13354:5;-1:-1:-1;13412:3:45;13397:19;;13384:33;13442:18;13429:32;;13426:52;;;13474:1;13471;13464:12;13426:52;13513:60;13565:7;13554:8;13543:9;13539:24;13513:60;:::i;:::-;13487:86;;13592:8;13582:18;;;13619:8;13609:18;;;12086:1547;;;;;;;;;;;:::o;13638:323::-;13703:6;13711;13764:2;13752:9;13743:7;13739:23;13735:32;13732:52;;;13780:1;13777;13770:12;13732:52;13819:9;13806:23;13838:39;13871:5;13838:39;:::i;:::-;13896:5;-1:-1:-1;13920:35:45;13951:2;13936:18;;13920:35;:::i;:::-;13910:45;;13638:323;;;;;:::o;13966:184::-;14036:6;14089:2;14077:9;14068:7;14064:23;14060:32;14057:52;;;14105:1;14102;14095:12;14057:52;-1:-1:-1;14128:16:45;;13966:184;-1:-1:-1;13966:184:45:o;14155:289::-;14255:6;14308:2;14296:9;14287:7;14283:23;14279:32;14276:52;;;14324:1;14321;14314:12;14276:52;14356:9;14350:16;14375:39;14408:5;14375:39;:::i;15367:279::-;15432:9;;;15453:10;;;15450:190;;;15496:77;15493:1;15486:88;15597:4;15594:1;15587:15;15625:4;15622:1;15615:15;15953:184;16005:77;16002:1;15995:88;16102:4;16099:1;16092:15;16126:4;16123:1;16116:15;16142:184;16194:77;16191:1;16184:88;16291:4;16288:1;16281:15;16315:4;16312:1;16305:15;16331:325;16419:6;16414:3;16407:19;16471:6;16464:5;16457:4;16452:3;16448:14;16435:43;;16523:1;16516:4;16507:6;16502:3;16498:16;16494:27;16487:38;16389:3;16645:4;16575:66;16570:2;16562:6;16558:15;16554:88;16549:3;16545:98;16541:109;16534:116;;16331:325;;;;:::o;16756:1512::-;17192:4;17240:3;17229:9;17225:19;17283:42;17275:6;17271:55;17260:9;17253:74;17363:3;17358:2;17347:9;17343:18;17336:31;17387:6;17422;17416:13;17453:6;17445;17438:22;17491:3;17480:9;17476:19;17469:26;;17530:2;17522:6;17518:15;17504:29;;17551:1;17561:218;17575:6;17572:1;17569:13;17561:218;;;17640:13;;17655:42;17636:62;17624:75;;17728:2;17754:15;;;;17719:12;;;;17597:1;17590:9;17561:218;;;17565:3;;17824:9;17819:3;17815:19;17810:2;17799:9;17795:18;17788:47;17858:41;17895:3;17887:6;17858:41;:::i;:::-;17844:55;;;17947:9;17939:6;17935:22;17930:2;17919:9;17915:18;17908:50;17981:44;18018:6;18010;17981:44;:::i;:::-;7159:42;7148:54;;18076:3;18061:19;;7136:67;17967:58;-1:-1:-1;18130:9:45;18122:6;18118:22;18112:3;18101:9;18097:19;18090:51;18158:49;18200:6;18192;18184;18158:49;:::i;:::-;18150:57;;;18216:46;18257:3;18246:9;18242:19;18234:6;16737;16726:18;16714:31;;16661:90;18273:218;18420:2;18409:9;18402:21;18383:4;18440:45;18481:2;18470:9;18466:18;18458:6;18440:45;:::i;18496:1137::-;18726:13;;7159:42;7148:54;7136:67;;18694:3;18679:19;;18798:4;18790:6;18786:17;18780:24;18813:54;18861:4;18850:9;18846:20;18832:12;7159:42;7148:54;7136:67;;7082:127;18813:54;;18916:4;18908:6;18904:17;18898:24;18931:56;18981:4;18970:9;18966:20;18950:14;7159:42;7148:54;7136:67;;7082:127;18931:56;;19036:4;19028:6;19024:17;19018:24;19051:56;19101:4;19090:9;19086:20;19070:14;7159:42;7148:54;7136:67;;7082:127;19051:56;;19163:4;19155:6;19151:17;19145:24;19138:4;19127:9;19123:20;19116:54;19226:4;19218:6;19214:17;19208:24;19201:4;19190:9;19186:20;19179:54;19289:4;19281:6;19277:17;19271:24;19264:4;19253:9;19249:20;19242:54;19352:4;19344:6;19340:17;19334:24;19327:4;19316:9;19312:20;19305:54;19417:6;19409;19405:19;19399:26;19390:6;19379:9;19375:22;19368:58;19484:6;19476;19472:19;19466:26;19457:6;19446:9;19442:22;19435:58;19551:6;19543;19539:19;19533:26;19524:6;19513:9;19509:22;19502:58;19618:6;19610;19606:19;19600:26;19591:6;19580:9;19576:22;19569:58;18496:1137;;;;:::o;19638:289::-;19813:6;19802:9;19795:25;19856:2;19851;19840:9;19836:18;19829:30;19776:4;19876:45;19917:2;19906:9;19902:18;19894:6;19876:45;:::i;:::-;19868:53;19638:289;-1:-1:-1;;;;19638:289:45:o;19932:301::-;20061:3;20099:6;20093:13;20145:6;20138:4;20130:6;20126:17;20121:3;20115:37;20207:1;20171:16;;20196:13;;;-1:-1:-1;20171:16:45;19932:301;-1:-1:-1;19932:301:45:o;22848:437::-;22927:1;22923:12;;;;22970;;;22991:61;;23045:4;23037:6;23033:17;23023:27;;22991:61;23098:2;23090:6;23087:14;23067:18;23064:38;23061:218;;23135:77;23132:1;23125:88;23236:4;23233:1;23226:15;23264:4;23261:1;23254:15;23061:218;;22848:437;;;:::o","linkReferences":{},"immutableReferences":{"5913":[{"start":4225,"length":32}],"5915":[{"start":4183,"length":32}],"5917":[{"start":4141,"length":32}],"5919":[{"start":4306,"length":32}],"5921":[{"start":4346,"length":32}],"5924":[{"start":5532,"length":32}],"5927":[{"start":5577,"length":32}],"10082":[{"start":709,"length":32},{"start":1319,"length":32},{"start":2282,"length":32},{"start":4079,"length":32},{"start":4679,"length":32},{"start":4838,"length":32},{"start":5175,"length":32}],"10366":[{"start":521,"length":32}],"10370":[{"start":560,"length":32},{"start":2023,"length":32},{"start":5678,"length":32}]}}}}}}},"signatures":{"function":[{"signature":"ADDRESSES_PROVIDER()","signatureHash4":"0x0542975c","signatureHash32":"0x0542975c2a1da2737443eb9bfb9d015d42f5a56612ec388c828cea9c969136f9"},{"signature":"cancelInstance(address)","signatureHash4":"0xe5209f2c","signatureHash32":"0xe5209f2ca0ba10054685cdfc39ff8c4669e8e98918b6cf3b255b03b3476d38a0"},{"signature":"deployAndTransferFlashLoan(address,(address,address,address,address,uint256,uint256,bytes32,uint256,uint256,uint256,uint256,uint256))","signatureHash4":"0xb1b6308b","signatureHash32":"0xb1b6308b5d7794cc7fe5c34c1d84e85358ddaf38e4287c65e8a3e4b31fbd406d"},{"signature":"DOMAIN_SEPARATOR()","signatureHash4":"0x3644e515","signatureHash32":"0x3644e5157256d68e3eeedd2ead302507a9c4ffaff665547d2c3623a1e9e7edf4"},{"signature":"eip712Domain()","signatureHash4":"0x84b0196e","signatureHash32":"0x84b0196e4b78e1918928c3b71e1f57a2bfc6d4a368fe07990ccc1367172719fb"},{"signature":"executeOperation(address[],uint256[],uint256[],address,bytes)","signatureHash4":"0x920f5c84","signatureHash32":"0x920f5c844ddf0877d9fdf05ba28bc18ebc6f73a76458b89ec1b1e0dec538441b"},{"signature":"flashLoanAndCallBack(address,address,uint256,bytes)","signatureHash4":"0x5678d216","signatureHash32":"0x5678d216289fde6af55973caff5dd9808ea1bf8d84ada9018320a76a14958706"},{"signature":"getInstanceDeterministicAddress(address,(address,address,address,address,uint256,uint256,bytes32,uint256,uint256,uint256,uint256,uint256))","signatureHash4":"0x4743582f","signatureHash32":"0x4743582f03040c96e55bcffc0494f2b4349eafec25d9c8219d212a25d41b5773"},{"signature":"isAdapterImplementation(address)","signatureHash4":"0x7bf703b4","signatureHash32":"0x7bf703b4c2857dde817dfac9b1b1dc347f6a6f9b8d51bdd21af8ac6bc39c5806"},{"signature":"isInstanceCancelled(address,address)","signatureHash4":"0x8c01220c","signatureHash32":"0x8c01220c620483bdd08afdcd5a9960d03748ba22afc30f3f1f2b4b0927642604"},{"signature":"notifyRepayFlashLoan()","signatureHash4":"0x0be6c2aa","signatureHash32":"0x0be6c2aab3a806fd72fdc2cc674413e8e6d28ba1bd88a8e00fd06f492159c519"},{"signature":"openFlashLoans(address)","signatureHash4":"0x8115192f","signatureHash32":"0x8115192f88e351e0a9647a2b6edbc0c4ec1ea09855dda2cf1423f208d189e913"},{"signature":"owner()","signatureHash4":"0x8da5cb5b","signatureHash32":"0x8da5cb5b36e7f68c1d2e56001220cdbdd3ba2616072f718acfda4a06441a807d"},{"signature":"pause()","signatureHash4":"0x8456cb59","signatureHash32":"0x8456cb591a934d53f6ccc6332123a165a1f3562907bf11330d847a29ca49eb89"},{"signature":"paused()","signatureHash4":"0x5c975abb","signatureHash32":"0x5c975abbf8c4d6efa68fc896e233763eb503f2318260b7bf59b19412913788b2"},{"signature":"POOL()","signatureHash4":"0x7535d246","signatureHash32":"0x7535d2464a63b7bf37797750fe9eb25b3c63e7e477ce5cc56ed399dce78e0d04"},{"signature":"renounceOwnership()","signatureHash4":"0x715018a6","signatureHash32":"0x715018a616b5f2044428f6fadb7deef4ce9ca76ef60ea57978964ad137bbe7ae"},{"signature":"rescueTokens(address)","signatureHash4":"0x00ae3bf8","signatureHash32":"0x00ae3bf8a2cbb98196935dfb1deae671d476f20442488af02dd5dddc7f2d69e9"},{"signature":"ROUTER()","signatureHash4":"0x32fe7b26","signatureHash32":"0x32fe7b260b87a8a4cac6b993db747b4379ab2f3d6256df47f7f5112bb1c94662"},{"signature":"setAdapterImplementation(address,bool)","signatureHash4":"0xe56c8cb4","signatureHash32":"0xe56c8cb441e830f2286daca2359e8d3cc826ac053fa3a754bb582409616268dd"},{"signature":"SETTLEMENT_CONTRACT()","signatureHash4":"0x1f273c8e","signatureHash32":"0x1f273c8ea657dae712e72b3bc78e8468f202038e7a2cf0af6b4ce0c9d62b9c13"},{"signature":"transferOwnership(address)","signatureHash4":"0xf2fde38b","signatureHash32":"0xf2fde38b092330466c661fc723d5289b90272a3e580e3187d1d7ef788506c557"},{"signature":"unpause()","signatureHash4":"0x3f4ba83a","signatureHash32":"0x3f4ba83af89dc9793996d9e56b8abe6dc88cd97c9c2bb23027806e9c1ffd54dc"},{"signature":"verifyOrderSignature(address,(address,address,address,uint256,uint256,uint32,bytes32,uint256,bytes32,bool,bytes32,bytes32),bytes)","signatureHash4":"0x09802f6d","signatureHash32":"0x09802f6d743e0b7d76ec857dad8ae912f41a3afd3d0583a29bc5cc1aa162fd78"}],"event":[{"signature":"CancelInstance(address,address)","signatureHash4":"0x856f0b5d","signatureHash32":"0x856f0b5ddd2d41f4778c648c0ab55f0285fb87f0f35b6749889ae0d8ebef3c6c"},{"signature":"EIP712DomainChanged()","signatureHash4":"0x0a6387c9","signatureHash32":"0x0a6387c9ea3628b88a633bb4f3b151770f70085117a15f9bf3787cda53f13d31"},{"signature":"OwnershipTransferred(address,address)","signatureHash4":"0x8be0079c","signatureHash32":"0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0"},{"signature":"Paused(address)","signatureHash4":"0x62e78cea","signatureHash32":"0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258"},{"signature":"SetAdapterImplementation(address,bool)","signatureHash4":"0xad58a21b","signatureHash32":"0xad58a21bee8db31c6b4cfcdeaf806d8b7dfa187c5da0dc88e4bffc740ce5b91a"},{"signature":"Unpaused(address)","signatureHash4":"0x5db9ee0a","signatureHash32":"0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa"}],"error":[{"signature":"CallerNotAavePool()","signatureHash4":"0x7ffc0b65","signatureHash32":"0x7ffc0b65ee658e98ffa9552164765b7c3a7468bca6091a466222aad6f8a553a3"},{"signature":"CallerNotInstance()","signatureHash4":"0x60f62341","signatureHash32":"0x60f623410790f2188b694ab3f4797cb6ded1436bec28c7562be97b021e029ba3"},{"signature":"CallerNotRouter()","signatureHash4":"0xebe91ae2","signatureHash32":"0xebe91ae2f88cfb257beb17cae13b0df39e4c2e96986ea5c4ff3a60d1b782cd9e"},{"signature":"EnforcedPause()","signatureHash4":"0xd93c0665","signatureHash32":"0xd93c0665d6c96d04a8f174024fc4ddd66c250604aff22bbec808de86dd3637e3"},{"signature":"ExpectedPause()","signatureHash4":"0x8dfc202b","signatureHash32":"0x8dfc202bcfe9a735b559bee70674422512bc5c30f687046ae8778315fb81da44"},{"signature":"FailedDeployment()","signatureHash4":"0xb06ebf3d","signatureHash32":"0xb06ebf3d5067824a3fe5d5ba19471e035a7de6c88dac362c77b162830a5b9093"},{"signature":"ImplementationAlreadyListed()","signatureHash4":"0x19f82b8e","signatureHash32":"0x19f82b8e498547f94561153ad390a2475431698fdc618948a1a4f77b6e113e55"},{"signature":"ImplementationNotActive()","signatureHash4":"0x18dd5cd2","signatureHash32":"0x18dd5cd2fa780c2d638215cd74b5b48b2bc7955afd76adf4dc5eb47c20195c21"},{"signature":"InstanceAlreadyDeployed()","signatureHash4":"0x9b4d6ca6","signatureHash32":"0x9b4d6ca606502c7ecd27411868ff3f0a024245957172b07523a00731d449a17b"},{"signature":"InstanceCancelled()","signatureHash4":"0x785fa2f4","signatureHash32":"0x785fa2f4f3d6cfae29af09492ef3854e486f269abe2cbc7bf5e0f19d6eb043f9"},{"signature":"InstanceNotInitialized()","signatureHash4":"0x08ec611b","signatureHash32":"0x08ec611bdb2846146d9f41a97315770b37cf844e6e72f2d779e6fd60f18c9445"},{"signature":"InsufficientBalance(uint256,uint256)","signatureHash4":"0xcf479181","signatureHash32":"0xcf4791818fba6e019216eb4864093b4947f674afada5d305e57d598b641dad1d"},{"signature":"InvalidLender()","signatureHash4":"0x21eeab00","signatureHash32":"0x21eeab00c3e82501b846816ef7b8afabda3e8995191f0fd22d640a8771e981ed"},{"signature":"InvalidOrderReceiver()","signatureHash4":"0x05886ddd","signatureHash32":"0x05886ddd35a06fcf5bb124a438bbddfce5cc6cc195a63ba5ec310fdf31e573e1"},{"signature":"InvalidShortString()","signatureHash4":"0xb3512b0c","signatureHash32":"0xb3512b0c6163e5f0bafab72bb631b9d58cd7a731b082f910338aa21c83d5c274"},{"signature":"InvalidZeroAddress()","signatureHash4":"0xf6b2911f","signatureHash32":"0xf6b2911f9215394c433e35003cff21befef7b60bc0c7e08dfe02af2c08ced6f9"},{"signature":"InvalidZeroAmount()","signatureHash4":"0xdd484e70","signatureHash32":"0xdd484e704bcd80f163589e7a4dbd7c69c48b11490edf2165db8ef88b9287f23d"},{"signature":"NothingToRepay()","signatureHash4":"0xd32e7fc6","signatureHash32":"0xd32e7fc6b1cc1c61a73ad6929786c6b1d26d35de62ec15252afc841c5aeec9ce"},{"signature":"OwnableInvalidOwner(address)","signatureHash4":"0x1e4fbdf7","signatureHash32":"0x1e4fbdf7f3ef8bcaa855599e3abf48b232380f183f08f6f813d9ffa5bd585188"},{"signature":"OwnableUnauthorizedAccount(address)","signatureHash4":"0x118cdaa7","signatureHash32":"0x118cdaa7a341953d1887a2245fd6665d741c67c8c50581daa59e1d03373fa188"},{"signature":"SafeERC20FailedOperation(address)","signatureHash4":"0x5274afe7","signatureHash32":"0x5274afe73c98b4749fc91ffae6b7b574e7842cb2144a159e9377a5f20b32edf9"},{"signature":"StringTooLong(string)","signatureHash4":"0x305a27a9","signatureHash32":"0x305a27a93f8e33b7392df0a0f91d6fc63847395853c45991eec52dbf24d72381"}]},"proxyResolution":{"isProxy":false,"proxyType":null,"implementations":[]},"match":"match","chainId":"1","address":"0xdeCC46a4b09162F5369c5C80383AAa9159bCf192"}