{"file_path":"src/CrossChainCanonicalAlchemicTokenV2.sol","creation_status":"success","source_code":"// SPDX-License-Identifier: GPL-3.0-or-later\npragma solidity ^0.8.11;\n\nimport {CrossChainCanonicalBase} from \"./CrossChainCanonicalBase.sol\";\nimport {AlchemicTokenV2Base} from \"./AlchemicTokenV2Base.sol\";\n\ncontract CrossChainCanonicalAlchemicTokenV2 is CrossChainCanonicalBase, AlchemicTokenV2Base {\n\n  /// @custom:oz-upgrades-unsafe-allow constructor\n  constructor() initializer {}\n\n  function initialize(\n      string memory name, \n      string memory symbol, \n      address[] memory _bridgeTokens,\n      uint256[] memory _mintCeilings\n  ) external initializer {\n    __CrossChainCanonicalBase_init(\n      name,\n      symbol,\n      msg.sender,\n      _bridgeTokens,\n      _mintCeilings\n    );\n    __AlchemicTokenV2Base_init();\n  }\n}","deployed_bytecode":"0x608060405234801561001057600080fd5b50600436106103f05760003560e01c80636c00c7f011610215578063a140edb411610125578063cd4839ca116100b8578063d9d98ce411610087578063d9d98ce4146109ac578063dd62ed3e146109bf578063e68b14ff146109d2578063ee7a069a146109e5578063f2fde38b14610a0657600080fd5b8063cd4839ca1461094d578063d505accf14610962578063d547741f14610975578063d936547e1461098857600080fd5b8063a7c571fe116100f4578063a7c571fe146108d6578063a9059cbb146108e9578063bf15c224146108fc578063c1eb71371461092057600080fd5b8063a140edb41461089e578063a217fddf146108a8578063a457c2d7146108b0578063a6beee4a146108c357600080fd5b80638980f11f116101a857806391d148541161017757806391d1485414610853578063940a1dc01461086657806395d89b4114610870578063998955d314610878578063a08d56541461088b57600080fd5b80638980f11f146108085780638da5cb5b1461081b5780639006a50f1461082d578063907a267b1461084057600080fd5b80637601f069116101e45780637601f069146107b357806379cc6790146107bb5780637ecebe00146107ce5780638237e538146107e157600080fd5b80636c00c7f01461075a57806370a082311461076d578063715018a61461079657806375b238fc1461079e57600080fd5b8063249d39e911610310578063398daa85116102a3578063459d0df011610272578063459d0df0146106fb57806353d6fd591461070e5780635cffe9de14610721578063613255ab14610734578063651fd2681461074757600080fd5b8063398daa851461069e57806340c10f19146106c257806342966c68146106d5578063445d9787146106e857600080fd5b8063313ce567116102df578063313ce567146106615780633644e5151461067057806336568abe14610678578063395093511461068b57600080fd5b8063249d39e91461060e578063280cf3ed146106175780632e48152c1461062a5780632f2ff15d1461064e57600080fd5b80630c05f82c1161038857806318160ddd1161035757806318160ddd146105a557806323b872dd146105ad578063248756d9146105c0578063248a9ca3146105eb57600080fd5b80630c05f82c146104bd57806313430d92146104ea57806313489515146104ff57806314c765081461051257600080fd5b806308f4c3f5116103c457806308f4c3f51461046f5780630919a95114610484578063095ea7b31461049757806309dac061146104aa57600080fd5b80623d4790146103f557806301ffc9a71461042957806305a7fc611461044c57806306fdde031461045a575b600080fd5b610416610403366004613400565b61019a6020526000908152604090205481565b6040519081526020015b60405180910390f35b61043c61043736600461341d565b610a19565b6040519015158152602001610420565b6101975461043c9060ff1681565b610462610a50565b604051610420919061349f565b61048261047d3660046134c0565b610ae2565b005b610482610492366004613400565b610b4a565b61043c6104a53660046134f9565b610b7c565b6104826104b8366004613400565b610b94565b6104166104cb366004613400565b6001600160a01b0316600090815261019f602052604090206002015490565b610416600080516020613cd683398151915281565b61048261050d366004613400565b610be3565b610597610520366004613400565b61019f602090815260009182526040918290208251608080820185528254825260018301548285015260028301548286015260038301546060808401919091528551918201865260048401548252600584015494820194909452600683015494810194909452600790910154918301919091529082565b604051610420929190613525565b603554610416565b61043c6105bb366004613571565b610cec565b6105d36105ce3660046135b2565b610d12565b6040516001600160a01b039091168152602001610420565b6104166105f93660046135b2565b600090815260fe602052604090206001015490565b61041661271081565b6104166106253660046134f9565b610d3d565b61043c610638366004613400565b61019c6020526000908152604090205460ff1681565b61048261065c3660046135cb565b610e90565b60405160128152602001610420565b610416610eba565b6104826106863660046135cb565b610ec9565b61043c6106993660046134f9565b610f4c565b61043c6106ac366004613400565b6101956020526000908152604090205460ff1681565b6104826106d03660046134f9565b610f6e565b6104826106e33660046135b2565b61102d565b6104826106f6366004613736565b61108a565b6104166107093660046134f9565b6111ac565b61048261071c3660046134c0565b6111d2565b61043c61072f36600461383f565b611232565b610416610742366004613400565b61138b565b610416610755366004613400565b6113ae565b6104826107683660046134f9565b6113e3565b61041661077b366004613400565b6001600160a01b031660009081526033602052604090205490565b610482611408565b610416600080516020613cb683398151915281565b61048261141c565b6104826107c93660046134f9565b611439565b6104166107dc366004613400565b6114ba565b6104167f439148f0bbc682ca079e46d6e2c2f0c1e3b820f1a291b069d8882abf8cf18dd981565b6104826108163660046134f9565b6114d8565b610162546001600160a01b03166105d3565b61041661083b3660046134f9565b61154f565b61048261084e3660046135b2565b6116ef565b61043c6108613660046135cb565b611782565b61041661019d5481565b6104626117ad565b610416610886366004613400565b6117bc565b6104826108993660046138de565b6117f4565b61041661019e5481565b610416600081565b61043c6108be3660046134f9565b611886565b6104826108d13660046135b2565b61190c565b6104826108e43660046138de565b611976565b61043c6108f73660046134f9565b611a2b565b61043c61090a366004613400565b6101986020526000908152604090205460ff1681565b61041661092e366004613400565b6001600160a01b0316600090815261019f602052604090206006015490565b610955611a39565b6040516104209190613913565b610482610970366004613960565b611a9b565b6104826109833660046135cb565b611bff565b61043c610996366004613400565b61019b6020526000908152604090205460ff1681565b6104166109ba3660046134f9565b611c24565b6104166109cd3660046139d7565b611c6b565b6104826109e03660046134c0565b611c96565b6104166109f3366004613400565b6101996020526000908152604090205481565b610482610a14366004613400565b611d2e565b60006001600160e01b03198216637965db0b60e01b1480610a4a57506301ffc9a760e01b6001600160e01b03198316145b92915050565b606060368054610a5f90613a05565b80601f0160208091040260200160405190810160405280929190818152602001828054610a8b90613a05565b8015610ad85780601f10610aad57610100808354040283529160200191610ad8565b820191906000526020600020905b815481529060010190602001808311610abb57829003601f168201915b5050505050905090565b610aea611db3565b6001600160a01b03821660008181526101986020908152604091829020805460ff191685151590811790915591519182527f017f1013f504f361fb5e4d3a829477caa14d488491d7042e78537a6d80c482e6910160405180910390a25050565b610b52611db3565b6001600160a01b0316600090815261019560205260409020805460ff19811660ff90911615179055565b600033610b8a818585611e0e565b5060019392505050565b610bac600080516020613cb683398151915233611782565b610bc8576040516282b42960e81b815260040160405180910390fd5b610be0600080516020613cd683398151915282611f32565b50565b610beb611db3565b60005b61019654811015610c5a57816001600160a01b03166101968281548110610c1757610c17613a39565b6000918252602090912001546001600160a01b031603610c4a57604051634a613c4160e01b815260040160405180910390fd5b610c5381613a65565b9050610bee565b50610196805460018082019092557f828feda00a4b64eb35101b6df8f6c29717b1ea6bae5dd03d3ddada8de0a9e7cb0180546001600160a01b0319166001600160a01b03841690811790915560008181526101986020526040808220805460ff1916909417909355915190917fa1f77cf0208e08e61710338f5370c9eba737ddc758d9f317dc5bdcff348e6e1a91a250565b600033610cfa858285611f3c565b610d05858585611fb6565b60019150505b9392505050565b6101968181548110610d2357600080fd5b6000918252602090912001546001600160a01b0316905081565b6000610d47612161565b6001600160a01b03831660009081526101986020526040902054839060ff16610d8357604051634a613c4160e01b815260040160405180910390fd5b6101975460ff1615610da857604051634a613c4160e01b815260040160405180910390fd5b6001600160a01b0384166000908152610198602052604090205460ff16610de257604051634a613c4160e01b815260040160405180910390fd5b610dec33846121bc565b336000908152610195602052604090205483925060ff16610e4a576001600160a01b038416600090815261019460205260409020620f42409060010154610e339084613a7e565b610e3d9190613a9d565b610e479083613abf565b91505b6001600160a01b038416600090815261019a602052604081208054859290610e73908490613abf565b90915550610e8490508433846122f0565b50610a4a600161013055565b600082815260fe6020526040902060010154610eab816123fd565b610eb58383612407565b505050565b6000610ec461248d565b905090565b6001600160a01b0381163314610f3e5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b610f488282612508565b5050565b600033610b8a818585610f5f8383611c6b565b610f699190613ad6565b611e0e565b33600090815261019b602052604090205460ff16610f9e576040516282b42960e81b815260040160405180910390fd5b33600090815261019c602052604090205460ff1615610fd057604051634a613c4160e01b815260040160405180910390fd5b33600090815261019f602052604090206002015415611023576000610ff4336113ae565b905080821115611017576040516305b4215560e11b815260040160405180910390fd5b611021338361256f565b505b610f4882826125c7565b33600090815261019f602052604090206006015415611080576000611051336117bc565b905080821115611074576040516305b4215560e11b815260040160405180910390fd5b61107e3383612688565b505b610be033826121bc565b600054610100900460ff16158080156110aa5750600054600160ff909116105b806110c45750303b1580156110c4575060005460ff166001145b6111275760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610f35565b6000805460ff19166001179055801561114a576000805461ff0019166101001790555b61115785853386866126e4565b61115f6128cc565b80156111a5576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050565b61019460205281600052604060002081600281106111c957600080fd5b01549150829050565b6111ea600080516020613cb683398151915233611782565b611206576040516282b42960e81b815260040160405180910390fd5b6001600160a01b0391909116600090815261019b60205260409020805460ff1916911515919091179055565b600061123c612161565b6001600160a01b038516301461126557604051630134249960e71b815260040160405180910390fd5b61126e8561138b565b84111561128e57604051630134249960e71b815260040160405180910390fd5b600061129a8686611c24565b90506112a687866125c7565b6040516323e30c8b60e01b81527f439148f0bbc682ca079e46d6e2c2f0c1e3b820f1a291b069d8882abf8cf18dd9906001600160a01b038916906323e30c8b906112fe9033908b908b9088908c908c90600401613aee565b6020604051808303816000875af115801561131d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113419190613b4a565b1461135f57604051634a613c4160e01b815260040160405180910390fd5b6113728761136d8388613ad6565b6121bc565b6001915050611382600161013055565b95945050505050565b60006001600160a01b03821630146113a557506000919050565b505061019e5490565b6001600160a01b038116600090815261019f60205260408120600381015460028201548254600190930154610a4a939061293a565b6113eb611db3565b6001600160a01b0390911660009081526101996020526040902055565b611410611db3565b61141a60006129b2565b565b611424611db3565b610197805460ff19811660ff90911615179055565b6000816114468433611c6b565b6114509190613abf565b905061145d833383611e0e565b33600090815261019f6020526040902060060154156114b0576000611481336117bc565b9050808311156114a4576040516305b4215560e11b815260040160405180910390fd5b6114ae3384612688565b505b610eb583836121bc565b6001600160a01b038116600090815260996020526040812054610a4a565b6114e0611db3565b306001600160a01b0383160361150957604051630134249960e71b815260040160405180910390fd5b6001600160a01b0382166000908152610198602052604090205460ff161561154457604051634a613c4160e01b815260040160405180910390fd5b610f488233836122f0565b6000611559612161565b6001600160a01b03831660009081526101986020526040902054839060ff1661159557604051634a613c4160e01b815260040160405180910390fd5b6101975460ff16156115ba57604051634a613c4160e01b815260040160405180910390fd5b6001600160a01b0384166000908152610198602052604090205460ff166115f457604051634a613c4160e01b815260040160405180910390fd5b6001600160a01b038416600090815261019a60205260408120546116189085613ad6565b6001600160a01b0386166000908152610199602052604090205490915081111561165557604051634a613c4160e01b815260040160405180910390fd5b6001600160a01b038516600090815261019a6020526040902081905561167d85333087612a05565b336000908152610195602052604090205484935060ff166116d8576001600160a01b03851660009081526101946020526040902054620f4240906116c19085613a7e565b6116cb9190613a9d565b6116d59084613abf565b92505b6116e233846125c7565b5050610a4a600161013055565b611707600080516020613cb683398151915233611782565b611723576040516282b42960e81b815260040160405180910390fd5b612710811061174557604051630134249960e71b815260040160405180910390fd5b61019d8190556040518181527f2a870645d0d1cf8866b52d71ff02db01b3e1dc4b70f53e2c4e85dbe60969b92e906020015b60405180910390a150565b600091825260fe602090815260408084206001600160a01b0393909316845291905290205460ff1690565b606060378054610a5f90613a05565b6001600160a01b038116600090815261019f60205260408120600781015460068201546004830154600590930154610a4a939061293a565b61180c600080516020613cb683398151915233611782565b611828576040516282b42960e81b815260040160405180910390fd5b6118328383612b12565b61183c8382612bba565b60408051838152602081018390526001600160a01b038516917f93f3bbfe8cfb354ec059175107653f49f6eb479a8622a7d83866ea015435c94491015b60405180910390a2505050565b600033816118948286611c6b565b9050838110156118f45760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610f35565b6119018286868403611e0e565b506001949350505050565b611924600080516020613cb683398151915233611782565b611940576040516282b42960e81b815260040160405180910390fd5b61019e8190556040518181527f6fa7ecc5c15a4eee2e87300bfa6827c73f06de5b70edf09ba1d1f7640539efe190602001611777565b61197e611db3565b620f4240821015806119935750620f42408110155b156119b157604051630134249960e71b815260040160405180910390fd5b60408051808201825283815260208082018490526001600160a01b0386166000908152610194909152919091206119e99160026132f1565b5060408051838152602081018390526001600160a01b038516917ff36e5def0a9227cce1f483e62a6b168e5c1dd4aa7e887e300745cdc4c2b5ab2d9101611879565b600033610b8a818585611fb6565b6060610196805480602002602001604051908101604052809291908181526020018280548015610ad857602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611a74575050505050905090565b83421115611aeb5760405162461bcd60e51b815260206004820152601d60248201527f45524332305065726d69743a206578706972656420646561646c696e650000006044820152606401610f35565b60007f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9888888611b1a8c612c68565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e0016040516020818303038152906040528051906020012090506000611b7582612c90565b90506000611b8582878787612cde565b9050896001600160a01b0316816001600160a01b031614611be85760405162461bcd60e51b815260206004820152601e60248201527f45524332305065726d69743a20696e76616c6964207369676e617475726500006044820152606401610f35565b611bf38a8a8a611e0e565b50505050505050505050565b600082815260fe6020526040902060010154611c1a816123fd565b610eb58383612508565b60006001600160a01b0383163014611c4f57604051630134249960e71b815260040160405180910390fd5b61271061019d5483611c619190613a7e565b610d0b9190613a9d565b6001600160a01b03918216600090815260346020908152604080832093909416825291909152205490565b611cae600080516020613cd683398151915233611782565b611cca576040516282b42960e81b815260040160405180910390fd5b6001600160a01b038216600081815261019c6020908152604091829020805460ff19168515159081179091558251938452908301527fe8699cf681560fd07de85543bd994263f4557bdc5179dd702f256d15fd083e1d910160405180910390a15050565b611d36611db3565b6001600160a01b038116611d9b5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610f35565b610be0816129b2565b6001600160a01b03163b151590565b610162546001600160a01b0316331461141a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610f35565b6001600160a01b038316611e705760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610f35565b6001600160a01b038216611ed15760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610f35565b6001600160a01b0383811660008181526034602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b610f488282612407565b6000611f488484611c6b565b90506000198114611fb05781811015611fa35760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610f35565b611fb08484848403611e0e565b50505050565b6001600160a01b03831661201a5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610f35565b6001600160a01b03821661207c5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610f35565b6001600160a01b038316600090815260336020526040902054818110156120f45760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610f35565b6001600160a01b0380851660008181526033602052604080822086860390559286168082529083902080548601905591517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906121549086815260200190565b60405180910390a3611fb0565b600261013054036121b45760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610f35565b600261013055565b6001600160a01b03821661221c5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610f35565b6001600160a01b038216600090815260336020526040902054818110156122905760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610f35565b6001600160a01b03831660008181526033602090815260408083208686039055603580548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3505050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b179052915160009283929087169161234c9190613b63565b6000604051808303816000865af19150503d8060008114612389576040519150601f19603f3d011682016040523d82523d6000602084013e61238e565b606091505b5091509150846001600160a01b03163b600014806123aa575081155b806123d157508051158015906123d15750808060200190518101906123cf9190613b7f565b155b156111a55784828260405163e7e40b5b60e01b8152600401610f3593929190613b9c565b600161013055565b610be08133612d06565b6124118282611782565b610f4857600082815260fe602090815260408083206001600160a01b03851684529091529020805460ff191660011790556124493390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000610ec47f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6124bc60655490565b6066546040805160208101859052908101839052606081018290524660808201523060a082015260009060c0016040516020818303038152906040528051906020012090509392505050565b6125128282611782565b15610f4857600082815260fe602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600061257a836113ae565b6001600160a01b038416600090815261019f6020526040902042905590506125a28282613abf565b6001600160a01b03909316600090815261019f60205260409020600301929092555050565b6001600160a01b03821661261d5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610f35565b806035600082825461262f9190613ad6565b90915550506001600160a01b0382166000818152603360209081526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b6000612693836117bc565b6001600160a01b038416600090815261019f602052604090204260049091015590506126bf8282613abf565b6001600160a01b03909316600090815261019f60205260409020600701929092555050565b6126ec612d5f565b6126f4612d86565b61271785604051806040016040528060018152602001603160f81b815250612db6565b6127218585612df7565b61272a85612e45565b612732612e6c565b61273b836129b2565b60005b82518110156128c45761019683828151811061275c5761275c613a39565b602090810291909101810151825460018101845560009384528284200180546001600160a01b0319166001600160a01b03909216919091179055604080518082019091526101908082529181019190915284519091610194918690859081106127c7576127c7613a39565b60200260200101516001600160a01b03166001600160a01b031681526020019081526020016000209060026127fd92919061332f565b506001610198600085848151811061281757612817613a39565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff02191690831515021790555081818151811061286857612868613a39565b6020026020010151610199600085848151811061288757612887613a39565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002081905550806128bd90613a65565b905061273e565b505050505050565b6128e4600080516020613cb683398151915233611f32565b6128fc600080516020613cd683398151915233611f32565b612922600080516020613cd6833981519152600080516020613cb6833981519152612e93565b61141a600080516020613cb683398151915280612e93565b838381146129aa57426129506201518085613ad6565b1161295c5750826129aa565b4261296a6201518085613ad6565b11156129aa57600061297c8442613abf565b9050600061298a8483613a7e565b6129949084613ad6565b90508581116129a357806129a5565b855b925050505b949350505050565b61016280546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b1790529151600092839290881691612a699190613b63565b6000604051808303816000865af19150503d8060008114612aa6576040519150601f19603f3d011682016040523d82523d6000602084013e612aab565b606091505b5091509150856001600160a01b03163b60001480612ac7575081155b80612aee5750805115801590612aee575080806020019051810190612aec9190613b7f565b155b156128c45785828260405163e7e40b5b60e01b8152600401610f3593929190613b9c565b6001600160a01b038216600090815261019f602052604081206002015490612b39846113ae565b6001600160a01b038516600090815261019f602052604090206002018490559050612b65838383612ede565b6001600160a01b038516600090815261019f6020526040902060030155612b8f6201518084613a9d565b6001600160a01b03909416600090815261019f60205260409020600181019490945550504290915550565b6001600160a01b038216600090815261019f602052604081206006015490612be1846117bc565b6001600160a01b038516600090815261019f602052604090206006018490559050612c0d838383612ede565b6001600160a01b038516600090815261019f6020526040902060070155612c376201518084613a9d565b6001600160a01b03909416600090815261019f60205260409020600581019490945550504260049092019190915550565b6001600160a01b03811660009081526099602052604090208054600181018255905b50919050565b6000610a4a612c9d61248d565b8360405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b6000806000612cef87878787612f35565b91509150612cfc81612ff9565b5095945050505050565b612d108282611782565b610f4857612d1d81613143565b612d28836020613155565b604051602001612d39929190613bc8565b60408051601f198184030181529082905262461bcd60e51b8252610f359160040161349f565b600054610100900460ff1661141a5760405162461bcd60e51b8152600401610f3590613c3d565b600054610100900460ff16612dad5760405162461bcd60e51b8152600401610f3590613c3d565b61141a336129b2565b600054610100900460ff16612ddd5760405162461bcd60e51b8152600401610f3590613c3d565b815160209283012081519190920120606591909155606655565b600054610100900460ff16612e1e5760405162461bcd60e51b8152600401610f3590613c3d565b8151612e31906036906020850190613363565b508051610eb5906037906020840190613363565b600054610100900460ff16610be05760405162461bcd60e51b8152600401610f3590613c3d565b600054610100900460ff166123f55760405162461bcd60e51b8152600401610f3590613c3d565b600082815260fe6020526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b60008084841115612f1457612ef38585613abf565b9050808311612f03576000612f0d565b612f0d8184613abf565b9150612f2d565b612f1e8486613abf565b9050612f2a8184613ad6565b91505b509392505050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115612f6c5750600090506003612ff0565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612fc0573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116612fe957600060019250925050612ff0565b9150600090505b94509492505050565b600081600481111561300d5761300d613c88565b036130155750565b600181600481111561302957613029613c88565b036130765760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610f35565b600281600481111561308a5761308a613c88565b036130d75760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610f35565b60038160048111156130eb576130eb613c88565b03610be05760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610f35565b6060610a4a6001600160a01b03831660145b60606000613164836002613a7e565b61316f906002613ad6565b67ffffffffffffffff811115613187576131876135f0565b6040519080825280601f01601f1916602001820160405280156131b1576020820181803683370190505b509050600360fc1b816000815181106131cc576131cc613a39565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106131fb576131fb613a39565b60200101906001600160f81b031916908160001a905350600061321f846002613a7e565b61322a906001613ad6565b90505b60018111156132a2576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061325e5761325e613a39565b1a60f81b82828151811061327457613274613a39565b60200101906001600160f81b031916908160001a90535060049490941c9361329b81613c9e565b905061322d565b508315610d0b5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610f35565b826002810192821561331f579160200282015b8281111561331f578251825591602001919060010190613304565b5061332b9291506133d6565b5090565b826002810192821561331f579160200282015b8281111561331f578251829061ffff16905591602001919060010190613342565b82805461336f90613a05565b90600052602060002090601f016020900481019282613391576000855561331f565b82601f106133aa57805160ff191683800117855561331f565b8280016001018555821561331f579182018281111561331f578251825591602001919060010190613304565b5b8082111561332b57600081556001016133d7565b6001600160a01b0381168114610be057600080fd5b60006020828403121561341257600080fd5b8135610d0b816133eb565b60006020828403121561342f57600080fd5b81356001600160e01b031981168114610d0b57600080fd5b60005b8381101561346257818101518382015260200161344a565b83811115611fb05750506000910152565b6000815180845261348b816020860160208601613447565b601f01601f19169290920160200192915050565b602081526000610d0b6020830184613473565b8015158114610be057600080fd5b600080604083850312156134d357600080fd5b82356134de816133eb565b915060208301356134ee816134b2565b809150509250929050565b6000806040838503121561350c57600080fd5b8235613517816133eb565b946020939093013593505050565b82518152602080840151818301526040808501518184015260608086015181850152845160808501529184015160a084015283015160c083015282015160e08201526101008101610d0b565b60008060006060848603121561358657600080fd5b8335613591816133eb565b925060208401356135a1816133eb565b929592945050506040919091013590565b6000602082840312156135c457600080fd5b5035919050565b600080604083850312156135de57600080fd5b8235915060208301356134ee816133eb565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561362f5761362f6135f0565b604052919050565b600082601f83011261364857600080fd5b813567ffffffffffffffff811115613662576136626135f0565b613675601f8201601f1916602001613606565b81815284602083860101111561368a57600080fd5b816020850160208301376000918101602001919091529392505050565b600067ffffffffffffffff8211156136c1576136c16135f0565b5060051b60200190565b600082601f8301126136dc57600080fd5b813560206136f16136ec836136a7565b613606565b82815260059290921b8401810191818101908684111561371057600080fd5b8286015b8481101561372b5780358352918301918301613714565b509695505050505050565b6000806000806080858703121561374c57600080fd5b843567ffffffffffffffff8082111561376457600080fd5b61377088838901613637565b955060209150818701358181111561378757600080fd5b61379389828a01613637565b9550506040870135818111156137a857600080fd5b8701601f810189136137b957600080fd5b80356137c76136ec826136a7565b81815260059190911b8201840190848101908b8311156137e657600080fd5b928501925b8284101561380d5783356137fe816133eb565b825292850192908501906137eb565b9650505050606087013591508082111561382657600080fd5b50613833878288016136cb565b91505092959194509250565b60008060008060006080868803121561385757600080fd5b8535613862816133eb565b94506020860135613872816133eb565b935060408601359250606086013567ffffffffffffffff8082111561389657600080fd5b818801915088601f8301126138aa57600080fd5b8135818111156138b957600080fd5b8960208285010111156138cb57600080fd5b9699959850939650602001949392505050565b6000806000606084860312156138f357600080fd5b83356138fe816133eb565b95602085013595506040909401359392505050565b6020808252825182820181905260009190848201906040850190845b818110156139545783516001600160a01b03168352928401929184019160010161392f565b50909695505050505050565b600080600080600080600060e0888a03121561397b57600080fd5b8735613986816133eb565b96506020880135613996816133eb565b95506040880135945060608801359350608088013560ff811681146139ba57600080fd5b9699959850939692959460a0840135945060c09093013592915050565b600080604083850312156139ea57600080fd5b82356139f5816133eb565b915060208301356134ee816133eb565b600181811c90821680613a1957607f821691505b602082108103612c8a57634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060018201613a7757613a77613a4f565b5060010190565b6000816000190483118215151615613a9857613a98613a4f565b500290565b600082613aba57634e487b7160e01b600052601260045260246000fd5b500490565b600082821015613ad157613ad1613a4f565b500390565b60008219821115613ae957613ae9613a4f565b500190565b6001600160a01b03878116825286166020820152604081018590526060810184905260a06080820181905281018290526000828460c0840137600060c0848401015260c0601f19601f8501168301019050979650505050505050565b600060208284031215613b5c57600080fd5b5051919050565b60008251613b75818460208701613447565b9190910192915050565b600060208284031215613b9157600080fd5b8151610d0b816134b2565b6001600160a01b0384168152821515602082015260606040820181905260009061138290830184613473565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351613c00816017850160208801613447565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351613c31816028840160208801613447565b01602801949350505050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b634e487b7160e01b600052602160045260246000fd5b600081613cad57613cad613a4f565b50600019019056fedf8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec42d3eedd6d69d410e954f4c622838ecc3acae9fdcd83cad412075c85b092770656a2646970667358221220d667b555db1df1065348edc9ce9adb4a19e3ede92f94dfdef28afcbcb7f3fc7f64736f6c634300080d0033","optimization_enabled":true,"verified_twin_address_hash":null,"is_verified":true,"compiler_settings":{"evmVersion":"london","libraries":{},"metadata":{"bytecodeHash":"ipfs"},"optimizer":{"enabled":true,"runs":200},"outputSelection":{"*":{"":["*"],"*":["*"]}},"remappings":["\"ds-test/=\"../lib/ds-test/src/","\"forge-std/=\"lib/forge-std/src/","ds-test/=lib/forge-std/lib/ds-test/src/","forge-std/=lib/forge-std/src/","openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/","openzeppelin-contracts/=lib/openzeppelin-contracts/contracts/","solmate/=lib/solmate/src/"]},"optimization_runs":200,"sourcify_repo_url":null,"decoded_constructor_args":null,"compiler_version":"v0.8.13+commit.abaa5c0e","is_verified_via_verifier_alliance":false,"verified_at":"2026-04-18T01:36:28.285759Z","implementations":[],"proxy_type":null,"external_libraries":[],"creation_bytecode":"0x60806040523480156200001157600080fd5b50600054610100900460ff1615808015620000335750600054600160ff909116105b8062000063575062000050306200013d60201b62001da41760201c565b15801562000063575060005460ff166001145b620000cb5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840160405180910390fd5b6000805460ff191660011790558015620000ef576000805461ff0019166101001790555b801562000136576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b506200014c565b6001600160a01b03163b151590565b613d2b806200015c6000396000f3fe608060405234801561001057600080fd5b50600436106103f05760003560e01c80636c00c7f011610215578063a140edb411610125578063cd4839ca116100b8578063d9d98ce411610087578063d9d98ce4146109ac578063dd62ed3e146109bf578063e68b14ff146109d2578063ee7a069a146109e5578063f2fde38b14610a0657600080fd5b8063cd4839ca1461094d578063d505accf14610962578063d547741f14610975578063d936547e1461098857600080fd5b8063a7c571fe116100f4578063a7c571fe146108d6578063a9059cbb146108e9578063bf15c224146108fc578063c1eb71371461092057600080fd5b8063a140edb41461089e578063a217fddf146108a8578063a457c2d7146108b0578063a6beee4a146108c357600080fd5b80638980f11f116101a857806391d148541161017757806391d1485414610853578063940a1dc01461086657806395d89b4114610870578063998955d314610878578063a08d56541461088b57600080fd5b80638980f11f146108085780638da5cb5b1461081b5780639006a50f1461082d578063907a267b1461084057600080fd5b80637601f069116101e45780637601f069146107b357806379cc6790146107bb5780637ecebe00146107ce5780638237e538146107e157600080fd5b80636c00c7f01461075a57806370a082311461076d578063715018a61461079657806375b238fc1461079e57600080fd5b8063249d39e911610310578063398daa85116102a3578063459d0df011610272578063459d0df0146106fb57806353d6fd591461070e5780635cffe9de14610721578063613255ab14610734578063651fd2681461074757600080fd5b8063398daa851461069e57806340c10f19146106c257806342966c68146106d5578063445d9787146106e857600080fd5b8063313ce567116102df578063313ce567146106615780633644e5151461067057806336568abe14610678578063395093511461068b57600080fd5b8063249d39e91461060e578063280cf3ed146106175780632e48152c1461062a5780632f2ff15d1461064e57600080fd5b80630c05f82c1161038857806318160ddd1161035757806318160ddd146105a557806323b872dd146105ad578063248756d9146105c0578063248a9ca3146105eb57600080fd5b80630c05f82c146104bd57806313430d92146104ea57806313489515146104ff57806314c765081461051257600080fd5b806308f4c3f5116103c457806308f4c3f51461046f5780630919a95114610484578063095ea7b31461049757806309dac061146104aa57600080fd5b80623d4790146103f557806301ffc9a71461042957806305a7fc611461044c57806306fdde031461045a575b600080fd5b610416610403366004613400565b61019a6020526000908152604090205481565b6040519081526020015b60405180910390f35b61043c61043736600461341d565b610a19565b6040519015158152602001610420565b6101975461043c9060ff1681565b610462610a50565b604051610420919061349f565b61048261047d3660046134c0565b610ae2565b005b610482610492366004613400565b610b4a565b61043c6104a53660046134f9565b610b7c565b6104826104b8366004613400565b610b94565b6104166104cb366004613400565b6001600160a01b0316600090815261019f602052604090206002015490565b610416600080516020613cd683398151915281565b61048261050d366004613400565b610be3565b610597610520366004613400565b61019f602090815260009182526040918290208251608080820185528254825260018301548285015260028301548286015260038301546060808401919091528551918201865260048401548252600584015494820194909452600683015494810194909452600790910154918301919091529082565b604051610420929190613525565b603554610416565b61043c6105bb366004613571565b610cec565b6105d36105ce3660046135b2565b610d12565b6040516001600160a01b039091168152602001610420565b6104166105f93660046135b2565b600090815260fe602052604090206001015490565b61041661271081565b6104166106253660046134f9565b610d3d565b61043c610638366004613400565b61019c6020526000908152604090205460ff1681565b61048261065c3660046135cb565b610e90565b60405160128152602001610420565b610416610eba565b6104826106863660046135cb565b610ec9565b61043c6106993660046134f9565b610f4c565b61043c6106ac366004613400565b6101956020526000908152604090205460ff1681565b6104826106d03660046134f9565b610f6e565b6104826106e33660046135b2565b61102d565b6104826106f6366004613736565b61108a565b6104166107093660046134f9565b6111ac565b61048261071c3660046134c0565b6111d2565b61043c61072f36600461383f565b611232565b610416610742366004613400565b61138b565b610416610755366004613400565b6113ae565b6104826107683660046134f9565b6113e3565b61041661077b366004613400565b6001600160a01b031660009081526033602052604090205490565b610482611408565b610416600080516020613cb683398151915281565b61048261141c565b6104826107c93660046134f9565b611439565b6104166107dc366004613400565b6114ba565b6104167f439148f0bbc682ca079e46d6e2c2f0c1e3b820f1a291b069d8882abf8cf18dd981565b6104826108163660046134f9565b6114d8565b610162546001600160a01b03166105d3565b61041661083b3660046134f9565b61154f565b61048261084e3660046135b2565b6116ef565b61043c6108613660046135cb565b611782565b61041661019d5481565b6104626117ad565b610416610886366004613400565b6117bc565b6104826108993660046138de565b6117f4565b61041661019e5481565b610416600081565b61043c6108be3660046134f9565b611886565b6104826108d13660046135b2565b61190c565b6104826108e43660046138de565b611976565b61043c6108f73660046134f9565b611a2b565b61043c61090a366004613400565b6101986020526000908152604090205460ff1681565b61041661092e366004613400565b6001600160a01b0316600090815261019f602052604090206006015490565b610955611a39565b6040516104209190613913565b610482610970366004613960565b611a9b565b6104826109833660046135cb565b611bff565b61043c610996366004613400565b61019b6020526000908152604090205460ff1681565b6104166109ba3660046134f9565b611c24565b6104166109cd3660046139d7565b611c6b565b6104826109e03660046134c0565b611c96565b6104166109f3366004613400565b6101996020526000908152604090205481565b610482610a14366004613400565b611d2e565b60006001600160e01b03198216637965db0b60e01b1480610a4a57506301ffc9a760e01b6001600160e01b03198316145b92915050565b606060368054610a5f90613a05565b80601f0160208091040260200160405190810160405280929190818152602001828054610a8b90613a05565b8015610ad85780601f10610aad57610100808354040283529160200191610ad8565b820191906000526020600020905b815481529060010190602001808311610abb57829003601f168201915b5050505050905090565b610aea611db3565b6001600160a01b03821660008181526101986020908152604091829020805460ff191685151590811790915591519182527f017f1013f504f361fb5e4d3a829477caa14d488491d7042e78537a6d80c482e6910160405180910390a25050565b610b52611db3565b6001600160a01b0316600090815261019560205260409020805460ff19811660ff90911615179055565b600033610b8a818585611e0e565b5060019392505050565b610bac600080516020613cb683398151915233611782565b610bc8576040516282b42960e81b815260040160405180910390fd5b610be0600080516020613cd683398151915282611f32565b50565b610beb611db3565b60005b61019654811015610c5a57816001600160a01b03166101968281548110610c1757610c17613a39565b6000918252602090912001546001600160a01b031603610c4a57604051634a613c4160e01b815260040160405180910390fd5b610c5381613a65565b9050610bee565b50610196805460018082019092557f828feda00a4b64eb35101b6df8f6c29717b1ea6bae5dd03d3ddada8de0a9e7cb0180546001600160a01b0319166001600160a01b03841690811790915560008181526101986020526040808220805460ff1916909417909355915190917fa1f77cf0208e08e61710338f5370c9eba737ddc758d9f317dc5bdcff348e6e1a91a250565b600033610cfa858285611f3c565b610d05858585611fb6565b60019150505b9392505050565b6101968181548110610d2357600080fd5b6000918252602090912001546001600160a01b0316905081565b6000610d47612161565b6001600160a01b03831660009081526101986020526040902054839060ff16610d8357604051634a613c4160e01b815260040160405180910390fd5b6101975460ff1615610da857604051634a613c4160e01b815260040160405180910390fd5b6001600160a01b0384166000908152610198602052604090205460ff16610de257604051634a613c4160e01b815260040160405180910390fd5b610dec33846121bc565b336000908152610195602052604090205483925060ff16610e4a576001600160a01b038416600090815261019460205260409020620f42409060010154610e339084613a7e565b610e3d9190613a9d565b610e479083613abf565b91505b6001600160a01b038416600090815261019a602052604081208054859290610e73908490613abf565b90915550610e8490508433846122f0565b50610a4a600161013055565b600082815260fe6020526040902060010154610eab816123fd565b610eb58383612407565b505050565b6000610ec461248d565b905090565b6001600160a01b0381163314610f3e5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b610f488282612508565b5050565b600033610b8a818585610f5f8383611c6b565b610f699190613ad6565b611e0e565b33600090815261019b602052604090205460ff16610f9e576040516282b42960e81b815260040160405180910390fd5b33600090815261019c602052604090205460ff1615610fd057604051634a613c4160e01b815260040160405180910390fd5b33600090815261019f602052604090206002015415611023576000610ff4336113ae565b905080821115611017576040516305b4215560e11b815260040160405180910390fd5b611021338361256f565b505b610f4882826125c7565b33600090815261019f602052604090206006015415611080576000611051336117bc565b905080821115611074576040516305b4215560e11b815260040160405180910390fd5b61107e3383612688565b505b610be033826121bc565b600054610100900460ff16158080156110aa5750600054600160ff909116105b806110c45750303b1580156110c4575060005460ff166001145b6111275760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610f35565b6000805460ff19166001179055801561114a576000805461ff0019166101001790555b61115785853386866126e4565b61115f6128cc565b80156111a5576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050565b61019460205281600052604060002081600281106111c957600080fd5b01549150829050565b6111ea600080516020613cb683398151915233611782565b611206576040516282b42960e81b815260040160405180910390fd5b6001600160a01b0391909116600090815261019b60205260409020805460ff1916911515919091179055565b600061123c612161565b6001600160a01b038516301461126557604051630134249960e71b815260040160405180910390fd5b61126e8561138b565b84111561128e57604051630134249960e71b815260040160405180910390fd5b600061129a8686611c24565b90506112a687866125c7565b6040516323e30c8b60e01b81527f439148f0bbc682ca079e46d6e2c2f0c1e3b820f1a291b069d8882abf8cf18dd9906001600160a01b038916906323e30c8b906112fe9033908b908b9088908c908c90600401613aee565b6020604051808303816000875af115801561131d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113419190613b4a565b1461135f57604051634a613c4160e01b815260040160405180910390fd5b6113728761136d8388613ad6565b6121bc565b6001915050611382600161013055565b95945050505050565b60006001600160a01b03821630146113a557506000919050565b505061019e5490565b6001600160a01b038116600090815261019f60205260408120600381015460028201548254600190930154610a4a939061293a565b6113eb611db3565b6001600160a01b0390911660009081526101996020526040902055565b611410611db3565b61141a60006129b2565b565b611424611db3565b610197805460ff19811660ff90911615179055565b6000816114468433611c6b565b6114509190613abf565b905061145d833383611e0e565b33600090815261019f6020526040902060060154156114b0576000611481336117bc565b9050808311156114a4576040516305b4215560e11b815260040160405180910390fd5b6114ae3384612688565b505b610eb583836121bc565b6001600160a01b038116600090815260996020526040812054610a4a565b6114e0611db3565b306001600160a01b0383160361150957604051630134249960e71b815260040160405180910390fd5b6001600160a01b0382166000908152610198602052604090205460ff161561154457604051634a613c4160e01b815260040160405180910390fd5b610f488233836122f0565b6000611559612161565b6001600160a01b03831660009081526101986020526040902054839060ff1661159557604051634a613c4160e01b815260040160405180910390fd5b6101975460ff16156115ba57604051634a613c4160e01b815260040160405180910390fd5b6001600160a01b0384166000908152610198602052604090205460ff166115f457604051634a613c4160e01b815260040160405180910390fd5b6001600160a01b038416600090815261019a60205260408120546116189085613ad6565b6001600160a01b0386166000908152610199602052604090205490915081111561165557604051634a613c4160e01b815260040160405180910390fd5b6001600160a01b038516600090815261019a6020526040902081905561167d85333087612a05565b336000908152610195602052604090205484935060ff166116d8576001600160a01b03851660009081526101946020526040902054620f4240906116c19085613a7e565b6116cb9190613a9d565b6116d59084613abf565b92505b6116e233846125c7565b5050610a4a600161013055565b611707600080516020613cb683398151915233611782565b611723576040516282b42960e81b815260040160405180910390fd5b612710811061174557604051630134249960e71b815260040160405180910390fd5b61019d8190556040518181527f2a870645d0d1cf8866b52d71ff02db01b3e1dc4b70f53e2c4e85dbe60969b92e906020015b60405180910390a150565b600091825260fe602090815260408084206001600160a01b0393909316845291905290205460ff1690565b606060378054610a5f90613a05565b6001600160a01b038116600090815261019f60205260408120600781015460068201546004830154600590930154610a4a939061293a565b61180c600080516020613cb683398151915233611782565b611828576040516282b42960e81b815260040160405180910390fd5b6118328383612b12565b61183c8382612bba565b60408051838152602081018390526001600160a01b038516917f93f3bbfe8cfb354ec059175107653f49f6eb479a8622a7d83866ea015435c94491015b60405180910390a2505050565b600033816118948286611c6b565b9050838110156118f45760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610f35565b6119018286868403611e0e565b506001949350505050565b611924600080516020613cb683398151915233611782565b611940576040516282b42960e81b815260040160405180910390fd5b61019e8190556040518181527f6fa7ecc5c15a4eee2e87300bfa6827c73f06de5b70edf09ba1d1f7640539efe190602001611777565b61197e611db3565b620f4240821015806119935750620f42408110155b156119b157604051630134249960e71b815260040160405180910390fd5b60408051808201825283815260208082018490526001600160a01b0386166000908152610194909152919091206119e99160026132f1565b5060408051838152602081018390526001600160a01b038516917ff36e5def0a9227cce1f483e62a6b168e5c1dd4aa7e887e300745cdc4c2b5ab2d9101611879565b600033610b8a818585611fb6565b6060610196805480602002602001604051908101604052809291908181526020018280548015610ad857602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611a74575050505050905090565b83421115611aeb5760405162461bcd60e51b815260206004820152601d60248201527f45524332305065726d69743a206578706972656420646561646c696e650000006044820152606401610f35565b60007f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9888888611b1a8c612c68565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e0016040516020818303038152906040528051906020012090506000611b7582612c90565b90506000611b8582878787612cde565b9050896001600160a01b0316816001600160a01b031614611be85760405162461bcd60e51b815260206004820152601e60248201527f45524332305065726d69743a20696e76616c6964207369676e617475726500006044820152606401610f35565b611bf38a8a8a611e0e565b50505050505050505050565b600082815260fe6020526040902060010154611c1a816123fd565b610eb58383612508565b60006001600160a01b0383163014611c4f57604051630134249960e71b815260040160405180910390fd5b61271061019d5483611c619190613a7e565b610d0b9190613a9d565b6001600160a01b03918216600090815260346020908152604080832093909416825291909152205490565b611cae600080516020613cd683398151915233611782565b611cca576040516282b42960e81b815260040160405180910390fd5b6001600160a01b038216600081815261019c6020908152604091829020805460ff19168515159081179091558251938452908301527fe8699cf681560fd07de85543bd994263f4557bdc5179dd702f256d15fd083e1d910160405180910390a15050565b611d36611db3565b6001600160a01b038116611d9b5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610f35565b610be0816129b2565b6001600160a01b03163b151590565b610162546001600160a01b0316331461141a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610f35565b6001600160a01b038316611e705760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610f35565b6001600160a01b038216611ed15760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610f35565b6001600160a01b0383811660008181526034602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b610f488282612407565b6000611f488484611c6b565b90506000198114611fb05781811015611fa35760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610f35565b611fb08484848403611e0e565b50505050565b6001600160a01b03831661201a5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610f35565b6001600160a01b03821661207c5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610f35565b6001600160a01b038316600090815260336020526040902054818110156120f45760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610f35565b6001600160a01b0380851660008181526033602052604080822086860390559286168082529083902080548601905591517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906121549086815260200190565b60405180910390a3611fb0565b600261013054036121b45760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610f35565b600261013055565b6001600160a01b03821661221c5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610f35565b6001600160a01b038216600090815260336020526040902054818110156122905760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610f35565b6001600160a01b03831660008181526033602090815260408083208686039055603580548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3505050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b179052915160009283929087169161234c9190613b63565b6000604051808303816000865af19150503d8060008114612389576040519150601f19603f3d011682016040523d82523d6000602084013e61238e565b606091505b5091509150846001600160a01b03163b600014806123aa575081155b806123d157508051158015906123d15750808060200190518101906123cf9190613b7f565b155b156111a55784828260405163e7e40b5b60e01b8152600401610f3593929190613b9c565b600161013055565b610be08133612d06565b6124118282611782565b610f4857600082815260fe602090815260408083206001600160a01b03851684529091529020805460ff191660011790556124493390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000610ec47f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6124bc60655490565b6066546040805160208101859052908101839052606081018290524660808201523060a082015260009060c0016040516020818303038152906040528051906020012090509392505050565b6125128282611782565b15610f4857600082815260fe602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600061257a836113ae565b6001600160a01b038416600090815261019f6020526040902042905590506125a28282613abf565b6001600160a01b03909316600090815261019f60205260409020600301929092555050565b6001600160a01b03821661261d5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610f35565b806035600082825461262f9190613ad6565b90915550506001600160a01b0382166000818152603360209081526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b6000612693836117bc565b6001600160a01b038416600090815261019f602052604090204260049091015590506126bf8282613abf565b6001600160a01b03909316600090815261019f60205260409020600701929092555050565b6126ec612d5f565b6126f4612d86565b61271785604051806040016040528060018152602001603160f81b815250612db6565b6127218585612df7565b61272a85612e45565b612732612e6c565b61273b836129b2565b60005b82518110156128c45761019683828151811061275c5761275c613a39565b602090810291909101810151825460018101845560009384528284200180546001600160a01b0319166001600160a01b03909216919091179055604080518082019091526101908082529181019190915284519091610194918690859081106127c7576127c7613a39565b60200260200101516001600160a01b03166001600160a01b031681526020019081526020016000209060026127fd92919061332f565b506001610198600085848151811061281757612817613a39565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff02191690831515021790555081818151811061286857612868613a39565b6020026020010151610199600085848151811061288757612887613a39565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002081905550806128bd90613a65565b905061273e565b505050505050565b6128e4600080516020613cb683398151915233611f32565b6128fc600080516020613cd683398151915233611f32565b612922600080516020613cd6833981519152600080516020613cb6833981519152612e93565b61141a600080516020613cb683398151915280612e93565b838381146129aa57426129506201518085613ad6565b1161295c5750826129aa565b4261296a6201518085613ad6565b11156129aa57600061297c8442613abf565b9050600061298a8483613a7e565b6129949084613ad6565b90508581116129a357806129a5565b855b925050505b949350505050565b61016280546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b1790529151600092839290881691612a699190613b63565b6000604051808303816000865af19150503d8060008114612aa6576040519150601f19603f3d011682016040523d82523d6000602084013e612aab565b606091505b5091509150856001600160a01b03163b60001480612ac7575081155b80612aee5750805115801590612aee575080806020019051810190612aec9190613b7f565b155b156128c45785828260405163e7e40b5b60e01b8152600401610f3593929190613b9c565b6001600160a01b038216600090815261019f602052604081206002015490612b39846113ae565b6001600160a01b038516600090815261019f602052604090206002018490559050612b65838383612ede565b6001600160a01b038516600090815261019f6020526040902060030155612b8f6201518084613a9d565b6001600160a01b03909416600090815261019f60205260409020600181019490945550504290915550565b6001600160a01b038216600090815261019f602052604081206006015490612be1846117bc565b6001600160a01b038516600090815261019f602052604090206006018490559050612c0d838383612ede565b6001600160a01b038516600090815261019f6020526040902060070155612c376201518084613a9d565b6001600160a01b03909416600090815261019f60205260409020600581019490945550504260049092019190915550565b6001600160a01b03811660009081526099602052604090208054600181018255905b50919050565b6000610a4a612c9d61248d565b8360405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b6000806000612cef87878787612f35565b91509150612cfc81612ff9565b5095945050505050565b612d108282611782565b610f4857612d1d81613143565b612d28836020613155565b604051602001612d39929190613bc8565b60408051601f198184030181529082905262461bcd60e51b8252610f359160040161349f565b600054610100900460ff1661141a5760405162461bcd60e51b8152600401610f3590613c3d565b600054610100900460ff16612dad5760405162461bcd60e51b8152600401610f3590613c3d565b61141a336129b2565b600054610100900460ff16612ddd5760405162461bcd60e51b8152600401610f3590613c3d565b815160209283012081519190920120606591909155606655565b600054610100900460ff16612e1e5760405162461bcd60e51b8152600401610f3590613c3d565b8151612e31906036906020850190613363565b508051610eb5906037906020840190613363565b600054610100900460ff16610be05760405162461bcd60e51b8152600401610f3590613c3d565b600054610100900460ff166123f55760405162461bcd60e51b8152600401610f3590613c3d565b600082815260fe6020526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b60008084841115612f1457612ef38585613abf565b9050808311612f03576000612f0d565b612f0d8184613abf565b9150612f2d565b612f1e8486613abf565b9050612f2a8184613ad6565b91505b509392505050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115612f6c5750600090506003612ff0565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612fc0573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116612fe957600060019250925050612ff0565b9150600090505b94509492505050565b600081600481111561300d5761300d613c88565b036130155750565b600181600481111561302957613029613c88565b036130765760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610f35565b600281600481111561308a5761308a613c88565b036130d75760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610f35565b60038160048111156130eb576130eb613c88565b03610be05760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610f35565b6060610a4a6001600160a01b03831660145b60606000613164836002613a7e565b61316f906002613ad6565b67ffffffffffffffff811115613187576131876135f0565b6040519080825280601f01601f1916602001820160405280156131b1576020820181803683370190505b509050600360fc1b816000815181106131cc576131cc613a39565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106131fb576131fb613a39565b60200101906001600160f81b031916908160001a905350600061321f846002613a7e565b61322a906001613ad6565b90505b60018111156132a2576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061325e5761325e613a39565b1a60f81b82828151811061327457613274613a39565b60200101906001600160f81b031916908160001a90535060049490941c9361329b81613c9e565b905061322d565b508315610d0b5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610f35565b826002810192821561331f579160200282015b8281111561331f578251825591602001919060010190613304565b5061332b9291506133d6565b5090565b826002810192821561331f579160200282015b8281111561331f578251829061ffff16905591602001919060010190613342565b82805461336f90613a05565b90600052602060002090601f016020900481019282613391576000855561331f565b82601f106133aa57805160ff191683800117855561331f565b8280016001018555821561331f579182018281111561331f578251825591602001919060010190613304565b5b8082111561332b57600081556001016133d7565b6001600160a01b0381168114610be057600080fd5b60006020828403121561341257600080fd5b8135610d0b816133eb565b60006020828403121561342f57600080fd5b81356001600160e01b031981168114610d0b57600080fd5b60005b8381101561346257818101518382015260200161344a565b83811115611fb05750506000910152565b6000815180845261348b816020860160208601613447565b601f01601f19169290920160200192915050565b602081526000610d0b6020830184613473565b8015158114610be057600080fd5b600080604083850312156134d357600080fd5b82356134de816133eb565b915060208301356134ee816134b2565b809150509250929050565b6000806040838503121561350c57600080fd5b8235613517816133eb565b946020939093013593505050565b82518152602080840151818301526040808501518184015260608086015181850152845160808501529184015160a084015283015160c083015282015160e08201526101008101610d0b565b60008060006060848603121561358657600080fd5b8335613591816133eb565b925060208401356135a1816133eb565b929592945050506040919091013590565b6000602082840312156135c457600080fd5b5035919050565b600080604083850312156135de57600080fd5b8235915060208301356134ee816133eb565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561362f5761362f6135f0565b604052919050565b600082601f83011261364857600080fd5b813567ffffffffffffffff811115613662576136626135f0565b613675601f8201601f1916602001613606565b81815284602083860101111561368a57600080fd5b816020850160208301376000918101602001919091529392505050565b600067ffffffffffffffff8211156136c1576136c16135f0565b5060051b60200190565b600082601f8301126136dc57600080fd5b813560206136f16136ec836136a7565b613606565b82815260059290921b8401810191818101908684111561371057600080fd5b8286015b8481101561372b5780358352918301918301613714565b509695505050505050565b6000806000806080858703121561374c57600080fd5b843567ffffffffffffffff8082111561376457600080fd5b61377088838901613637565b955060209150818701358181111561378757600080fd5b61379389828a01613637565b9550506040870135818111156137a857600080fd5b8701601f810189136137b957600080fd5b80356137c76136ec826136a7565b81815260059190911b8201840190848101908b8311156137e657600080fd5b928501925b8284101561380d5783356137fe816133eb565b825292850192908501906137eb565b9650505050606087013591508082111561382657600080fd5b50613833878288016136cb565b91505092959194509250565b60008060008060006080868803121561385757600080fd5b8535613862816133eb565b94506020860135613872816133eb565b935060408601359250606086013567ffffffffffffffff8082111561389657600080fd5b818801915088601f8301126138aa57600080fd5b8135818111156138b957600080fd5b8960208285010111156138cb57600080fd5b9699959850939650602001949392505050565b6000806000606084860312156138f357600080fd5b83356138fe816133eb565b95602085013595506040909401359392505050565b6020808252825182820181905260009190848201906040850190845b818110156139545783516001600160a01b03168352928401929184019160010161392f565b50909695505050505050565b600080600080600080600060e0888a03121561397b57600080fd5b8735613986816133eb565b96506020880135613996816133eb565b95506040880135945060608801359350608088013560ff811681146139ba57600080fd5b9699959850939692959460a0840135945060c09093013592915050565b600080604083850312156139ea57600080fd5b82356139f5816133eb565b915060208301356134ee816133eb565b600181811c90821680613a1957607f821691505b602082108103612c8a57634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060018201613a7757613a77613a4f565b5060010190565b6000816000190483118215151615613a9857613a98613a4f565b500290565b600082613aba57634e487b7160e01b600052601260045260246000fd5b500490565b600082821015613ad157613ad1613a4f565b500390565b60008219821115613ae957613ae9613a4f565b500190565b6001600160a01b03878116825286166020820152604081018590526060810184905260a06080820181905281018290526000828460c0840137600060c0848401015260c0601f19601f8501168301019050979650505050505050565b600060208284031215613b5c57600080fd5b5051919050565b60008251613b75818460208701613447565b9190910192915050565b600060208284031215613b9157600080fd5b8151610d0b816134b2565b6001600160a01b0384168152821515602082015260606040820181905260009061138290830184613473565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351613c00816017850160208801613447565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351613c31816028840160208801613447565b01602801949350505050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b634e487b7160e01b600052602160045260246000fd5b600081613cad57613cad613a4f565b50600019019056fedf8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec42d3eedd6d69d410e954f4c622838ecc3acae9fdcd83cad412075c85b092770656a2646970667358221220d667b555db1df1065348edc9ce9adb4a19e3ede92f94dfdef28afcbcb7f3fc7f64736f6c634300080d0033","name":"CrossChainCanonicalAlchemicTokenV2","is_blueprint":false,"license_type":"none","is_fully_verified":true,"is_verified_via_eth_bytecode_db":false,"language":"solidity","evm_version":"london","can_be_visualized_via_sol2uml":true,"is_verified_via_sourcify":false,"additional_sources":[{"file_path":"lib/openzeppelin-contracts-upgradeable/contracts/access/AccessControlUpgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (access/AccessControl.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IAccessControlUpgradeable.sol\";\nimport \"../utils/ContextUpgradeable.sol\";\nimport \"../utils/StringsUpgradeable.sol\";\nimport \"../utils/introspection/ERC165Upgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module that allows children to implement role-based access\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\n * members except through off-chain means by accessing the contract event logs. Some\n * applications may benefit from on-chain enumerability, for those cases see\n * {AccessControlEnumerable}.\n *\n * Roles are referred to by their `bytes32` identifier. These should be exposed\n * in the external API and be unique. The best way to achieve this is by\n * using `public constant` hash digests:\n *\n * ```\n * bytes32 public constant MY_ROLE = keccak256(\"MY_ROLE\");\n * ```\n *\n * Roles can be used to represent a set of permissions. To restrict access to a\n * function call, use {hasRole}:\n *\n * ```\n * function foo() public {\n *     require(hasRole(MY_ROLE, msg.sender));\n *     ...\n * }\n * ```\n *\n * Roles can be granted and revoked dynamically via the {grantRole} and\n * {revokeRole} functions. Each role has an associated admin role, and only\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\n *\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\n * that only accounts with this role will be able to grant or revoke other\n * roles. More complex role relationships can be created by using\n * {_setRoleAdmin}.\n *\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\n * grant and revoke this role. Extra precautions should be taken to secure\n * accounts that have been granted it.\n */\nabstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControlUpgradeable, ERC165Upgradeable {\n    function __AccessControl_init() internal onlyInitializing {\n    }\n\n    function __AccessControl_init_unchained() internal onlyInitializing {\n    }\n    struct RoleData {\n        mapping(address => bool) members;\n        bytes32 adminRole;\n    }\n\n    mapping(bytes32 => RoleData) private _roles;\n\n    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;\n\n    /**\n     * @dev Modifier that checks that an account has a specific role. Reverts\n     * with a standardized message including the required role.\n     *\n     * The format of the revert reason is given by the following regular expression:\n     *\n     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\n     *\n     * _Available since v4.1._\n     */\n    modifier onlyRole(bytes32 role) {\n        _checkRole(role);\n        _;\n    }\n\n    /**\n     * @dev See {IERC165-supportsInterface}.\n     */\n    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n        return interfaceId == type(IAccessControlUpgradeable).interfaceId || super.supportsInterface(interfaceId);\n    }\n\n    /**\n     * @dev Returns `true` if `account` has been granted `role`.\n     */\n    function hasRole(bytes32 role, address account) public view virtual override returns (bool) {\n        return _roles[role].members[account];\n    }\n\n    /**\n     * @dev Revert with a standard message if `_msgSender()` is missing `role`.\n     * Overriding this function changes the behavior of the {onlyRole} modifier.\n     *\n     * Format of the revert message is described in {_checkRole}.\n     *\n     * _Available since v4.6._\n     */\n    function _checkRole(bytes32 role) internal view virtual {\n        _checkRole(role, _msgSender());\n    }\n\n    /**\n     * @dev Revert with a standard message if `account` is missing `role`.\n     *\n     * The format of the revert reason is given by the following regular expression:\n     *\n     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\n     */\n    function _checkRole(bytes32 role, address account) internal view virtual {\n        if (!hasRole(role, account)) {\n            revert(\n                string(\n                    abi.encodePacked(\n                        \"AccessControl: account \",\n                        StringsUpgradeable.toHexString(account),\n                        \" is missing role \",\n                        StringsUpgradeable.toHexString(uint256(role), 32)\n                    )\n                )\n            );\n        }\n    }\n\n    /**\n     * @dev Returns the admin role that controls `role`. See {grantRole} and\n     * {revokeRole}.\n     *\n     * To change a role's admin, use {_setRoleAdmin}.\n     */\n    function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) {\n        return _roles[role].adminRole;\n    }\n\n    /**\n     * @dev Grants `role` to `account`.\n     *\n     * If `account` had not been already granted `role`, emits a {RoleGranted}\n     * event.\n     *\n     * Requirements:\n     *\n     * - the caller must have ``role``'s admin role.\n     *\n     * May emit a {RoleGranted} event.\n     */\n    function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\n        _grantRole(role, account);\n    }\n\n    /**\n     * @dev Revokes `role` from `account`.\n     *\n     * If `account` had been granted `role`, emits a {RoleRevoked} event.\n     *\n     * Requirements:\n     *\n     * - the caller must have ``role``'s admin role.\n     *\n     * May emit a {RoleRevoked} event.\n     */\n    function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\n        _revokeRole(role, account);\n    }\n\n    /**\n     * @dev Revokes `role` from the calling account.\n     *\n     * Roles are often managed via {grantRole} and {revokeRole}: this function's\n     * purpose is to provide a mechanism for accounts to lose their privileges\n     * if they are compromised (such as when a trusted device is misplaced).\n     *\n     * If the calling account had been revoked `role`, emits a {RoleRevoked}\n     * event.\n     *\n     * Requirements:\n     *\n     * - the caller must be `account`.\n     *\n     * May emit a {RoleRevoked} event.\n     */\n    function renounceRole(bytes32 role, address account) public virtual override {\n        require(account == _msgSender(), \"AccessControl: can only renounce roles for self\");\n\n        _revokeRole(role, account);\n    }\n\n    /**\n     * @dev Grants `role` to `account`.\n     *\n     * If `account` had not been already granted `role`, emits a {RoleGranted}\n     * event. Note that unlike {grantRole}, this function doesn't perform any\n     * checks on the calling account.\n     *\n     * May emit a {RoleGranted} event.\n     *\n     * [WARNING]\n     * ====\n     * This function should only be called from the constructor when setting\n     * up the initial roles for the system.\n     *\n     * Using this function in any other way is effectively circumventing the admin\n     * system imposed by {AccessControl}.\n     * ====\n     *\n     * NOTE: This function is deprecated in favor of {_grantRole}.\n     */\n    function _setupRole(bytes32 role, address account) internal virtual {\n        _grantRole(role, account);\n    }\n\n    /**\n     * @dev Sets `adminRole` as ``role``'s admin role.\n     *\n     * Emits a {RoleAdminChanged} event.\n     */\n    function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {\n        bytes32 previousAdminRole = getRoleAdmin(role);\n        _roles[role].adminRole = adminRole;\n        emit RoleAdminChanged(role, previousAdminRole, adminRole);\n    }\n\n    /**\n     * @dev Grants `role` to `account`.\n     *\n     * Internal function without access restriction.\n     *\n     * May emit a {RoleGranted} event.\n     */\n    function _grantRole(bytes32 role, address account) internal virtual {\n        if (!hasRole(role, account)) {\n            _roles[role].members[account] = true;\n            emit RoleGranted(role, account, _msgSender());\n        }\n    }\n\n    /**\n     * @dev Revokes `role` from `account`.\n     *\n     * Internal function without access restriction.\n     *\n     * May emit a {RoleRevoked} event.\n     */\n    function _revokeRole(bytes32 role, address account) internal virtual {\n        if (hasRole(role, account)) {\n            _roles[role].members[account] = false;\n            emit RoleRevoked(role, account, _msgSender());\n        }\n    }\n\n    /**\n     * @dev This empty reserved space is put in place to allow future versions to add new\n     * variables without shifting down storage in the inheritance chain.\n     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n     */\n    uint256[49] private __gap;\n}\n"},{"file_path":"lib/openzeppelin-contracts/contracts/interfaces/IERC3156FlashBorrower.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (interfaces/IERC3156FlashBorrower.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC3156 FlashBorrower, as defined in\n * https://eips.ethereum.org/EIPS/eip-3156[ERC-3156].\n *\n * _Available since v4.1._\n */\ninterface IERC3156FlashBorrower {\n    /**\n     * @dev Receive a flash loan.\n     * @param initiator The initiator of the loan.\n     * @param token The loan currency.\n     * @param amount The amount of tokens lent.\n     * @param fee The additional amount of tokens to repay.\n     * @param data Arbitrary data structure, intended to contain user-defined parameters.\n     * @return The keccak256 hash of \"IERC3156FlashBorrower.onFlashLoan\"\n     */\n    function onFlashLoan(\n        address initiator,\n        address token,\n        uint256 amount,\n        uint256 fee,\n        bytes calldata data\n    ) external returns (bytes32);\n}\n"},{"file_path":"lib/openzeppelin-contracts-upgradeable/contracts/access/IAccessControlUpgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev External interface of AccessControl declared to support ERC165 detection.\n */\ninterface IAccessControlUpgradeable {\n    /**\n     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\n     *\n     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\n     * {RoleAdminChanged} not being emitted signaling this.\n     *\n     * _Available since v3.1._\n     */\n    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\n\n    /**\n     * @dev Emitted when `account` is granted `role`.\n     *\n     * `sender` is the account that originated the contract call, an admin role\n     * bearer except when using {AccessControl-_setupRole}.\n     */\n    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\n\n    /**\n     * @dev Emitted when `account` is revoked `role`.\n     *\n     * `sender` is the account that originated the contract call:\n     *   - if using `revokeRole`, it is the admin role bearer\n     *   - if using `renounceRole`, it is the role bearer (i.e. `account`)\n     */\n    event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\n\n    /**\n     * @dev Returns `true` if `account` has been granted `role`.\n     */\n    function hasRole(bytes32 role, address account) external view returns (bool);\n\n    /**\n     * @dev Returns the admin role that controls `role`. See {grantRole} and\n     * {revokeRole}.\n     *\n     * To change a role's admin, use {AccessControl-_setRoleAdmin}.\n     */\n    function getRoleAdmin(bytes32 role) external view returns (bytes32);\n\n    /**\n     * @dev Grants `role` to `account`.\n     *\n     * If `account` had not been already granted `role`, emits a {RoleGranted}\n     * event.\n     *\n     * Requirements:\n     *\n     * - the caller must have ``role``'s admin role.\n     */\n    function grantRole(bytes32 role, address account) external;\n\n    /**\n     * @dev Revokes `role` from `account`.\n     *\n     * If `account` had been granted `role`, emits a {RoleRevoked} event.\n     *\n     * Requirements:\n     *\n     * - the caller must have ``role``'s admin role.\n     */\n    function revokeRole(bytes32 role, address account) external;\n\n    /**\n     * @dev Revokes `role` from the calling account.\n     *\n     * Roles are often managed via {grantRole} and {revokeRole}: this function's\n     * purpose is to provide a mechanism for accounts to lose their privileges\n     * if they are compromised (such as when a trusted device is misplaced).\n     *\n     * If the calling account had been granted `role`, emits a {RoleRevoked}\n     * event.\n     *\n     * Requirements:\n     *\n     * - the caller must be `account`.\n     */\n    function renounceRole(bytes32 role, address account) external;\n}\n"},{"file_path":"lib/openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/ContextUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\n    address private _owner;\n\n    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n    /**\n     * @dev Initializes the contract setting the deployer as the initial owner.\n     */\n    function __Ownable_init() internal onlyInitializing {\n        __Ownable_init_unchained();\n    }\n\n    function __Ownable_init_unchained() internal onlyInitializing {\n        _transferOwnership(_msgSender());\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        require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n    }\n\n    /**\n     * @dev Leaves the contract without owner. It will not be possible to call\n     * `onlyOwner` functions anymore. Can only be called by the current owner.\n     *\n     * NOTE: Renouncing ownership will leave the contract without an owner,\n     * thereby removing any functionality that is only available to the owner.\n     */\n    function renounceOwnership() public virtual onlyOwner {\n        _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        require(newOwner != address(0), \"Ownable: new owner is the zero address\");\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    /**\n     * @dev This empty reserved space is put in place to allow future versions to add new\n     * variables without shifting down storage in the inheritance chain.\n     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n     */\n    uint256[49] private __gap;\n}\n"},{"file_path":"lib/openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/utils/Initializable.sol)\n\npragma solidity ^0.8.2;\n\nimport \"../../utils/AddressUpgradeable.sol\";\n\n/**\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\n *\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\n * reused. This mechanism prevents re-execution of each \"step\" but allows the creation of new initialization steps in\n * case an upgrade adds a module that needs to be initialized.\n *\n * For example:\n *\n * [.hljs-theme-light.nopadding]\n * ```\n * contract MyToken is ERC20Upgradeable {\n *     function initialize() initializer public {\n *         __ERC20_init(\"MyToken\", \"MTK\");\n *     }\n * }\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\n *     function initializeV2() reinitializer(2) public {\n *         __ERC20Permit_init(\"MyToken\");\n *     }\n * }\n * ```\n *\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\n *\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\n *\n * [CAUTION]\n * ====\n * Avoid leaving a contract uninitialized.\n *\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\n *\n * [.hljs-theme-light.nopadding]\n * ```\n * /// @custom:oz-upgrades-unsafe-allow constructor\n * constructor() {\n *     _disableInitializers();\n * }\n * ```\n * ====\n */\nabstract contract Initializable {\n    /**\n     * @dev Indicates that the contract has been initialized.\n     * @custom:oz-retyped-from bool\n     */\n    uint8 private _initialized;\n\n    /**\n     * @dev Indicates that the contract is in the process of being initialized.\n     */\n    bool private _initializing;\n\n    /**\n     * @dev Triggered when the contract has been initialized or reinitialized.\n     */\n    event Initialized(uint8 version);\n\n    /**\n     * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\n     * `onlyInitializing` functions can be used to initialize parent contracts.\n     *\n     * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\n     * constructor.\n     *\n     * Emits an {Initialized} event.\n     */\n    modifier initializer() {\n        bool isTopLevelCall = !_initializing;\n        require(\n            (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\n            \"Initializable: contract is already initialized\"\n        );\n        _initialized = 1;\n        if (isTopLevelCall) {\n            _initializing = true;\n        }\n        _;\n        if (isTopLevelCall) {\n            _initializing = false;\n            emit Initialized(1);\n        }\n    }\n\n    /**\n     * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\n     * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\n     * used to initialize parent contracts.\n     *\n     * A reinitializer may be used after the original initialization step. This is essential to configure modules that\n     * are added through upgrades and that require initialization.\n     *\n     * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\n     * cannot be nested. If one is invoked in the context of another, execution will revert.\n     *\n     * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\n     * a contract, executing them in the right order is up to the developer or operator.\n     *\n     * WARNING: setting the version to 255 will prevent any future reinitialization.\n     *\n     * Emits an {Initialized} event.\n     */\n    modifier reinitializer(uint8 version) {\n        require(!_initializing && _initialized < version, \"Initializable: contract is already initialized\");\n        _initialized = version;\n        _initializing = true;\n        _;\n        _initializing = false;\n        emit Initialized(version);\n    }\n\n    /**\n     * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\n     * {initializer} and {reinitializer} modifiers, directly or indirectly.\n     */\n    modifier onlyInitializing() {\n        require(_initializing, \"Initializable: contract is not initializing\");\n        _;\n    }\n\n    /**\n     * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\n     * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\n     * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\n     * through proxies.\n     *\n     * Emits an {Initialized} event the first time it is successfully executed.\n     */\n    function _disableInitializers() internal virtual {\n        require(!_initializing, \"Initializable: contract is initializing\");\n        if (_initialized < type(uint8).max) {\n            _initialized = type(uint8).max;\n            emit Initialized(type(uint8).max);\n        }\n    }\n\n    /**\n     * @dev Internal function that returns the initialized version. Returns `_initialized`\n     */\n    function _getInitializedVersion() internal view returns (uint8) {\n        return _initialized;\n    }\n\n    /**\n     * @dev Internal function that returns the initialized version. Returns `_initializing`\n     */\n    function _isInitializing() internal view returns (bool) {\n        return _initializing;\n    }\n}\n"},{"file_path":"lib/openzeppelin-contracts-upgradeable/contracts/security/ReentrancyGuardUpgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)\n\npragma solidity ^0.8.0;\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module that helps prevent reentrant calls to a function.\n *\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\n * available, which can be applied to functions to make sure there are no nested\n * (reentrant) calls to them.\n *\n * Note that because there is a single `nonReentrant` guard, functions marked as\n * `nonReentrant` may not call one another. This can be worked around by making\n * those functions `private`, and then adding `external` `nonReentrant` entry\n * points to them.\n *\n * TIP: If you would like to learn more about reentrancy and alternative ways\n * to protect against it, check out our blog post\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\n */\nabstract contract ReentrancyGuardUpgradeable is Initializable {\n    // Booleans are more expensive than uint256 or any type that takes up a full\n    // word because each write operation emits an extra SLOAD to first read the\n    // slot's contents, replace the bits taken up by the boolean, and then write\n    // back. This is the compiler's defense against contract upgrades and\n    // pointer aliasing, and it cannot be disabled.\n\n    // The values being non-zero value makes deployment a bit more expensive,\n    // but in exchange the refund on every call to nonReentrant will be lower in\n    // amount. Since refunds are capped to a percentage of the total\n    // transaction's gas, it is best to keep them low in cases like this one, to\n    // increase the likelihood of the full refund coming into effect.\n    uint256 private constant _NOT_ENTERED = 1;\n    uint256 private constant _ENTERED = 2;\n\n    uint256 private _status;\n\n    function __ReentrancyGuard_init() internal onlyInitializing {\n        __ReentrancyGuard_init_unchained();\n    }\n\n    function __ReentrancyGuard_init_unchained() internal onlyInitializing {\n        _status = _NOT_ENTERED;\n    }\n\n    /**\n     * @dev Prevents a contract from calling itself, directly or indirectly.\n     * Calling a `nonReentrant` function from another `nonReentrant`\n     * function is not supported. It is possible to prevent this from happening\n     * by making the `nonReentrant` function external, and making it call a\n     * `private` function that does the actual work.\n     */\n    modifier nonReentrant() {\n        _nonReentrantBefore();\n        _;\n        _nonReentrantAfter();\n    }\n\n    function _nonReentrantBefore() private {\n        // On the first call to nonReentrant, _status will be _NOT_ENTERED\n        require(_status != _ENTERED, \"ReentrancyGuard: reentrant call\");\n\n        // Any calls to nonReentrant after this point will fail\n        _status = _ENTERED;\n    }\n\n    function _nonReentrantAfter() private {\n        // By storing the original value once again, a refund is triggered (see\n        // https://eips.ethereum.org/EIPS/eip-2200)\n        _status = _NOT_ENTERED;\n    }\n\n    /**\n     * @dev This empty reserved space is put in place to allow future versions to add new\n     * variables without shifting down storage in the inheritance chain.\n     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n     */\n    uint256[49] private __gap;\n}\n"},{"file_path":"lib/openzeppelin-contracts-upgradeable/contracts/token/ERC20/ERC20Upgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/ERC20.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC20Upgradeable.sol\";\nimport \"./extensions/IERC20MetadataUpgradeable.sol\";\nimport \"../../utils/ContextUpgradeable.sol\";\nimport \"../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Implementation of the {IERC20} interface.\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n * For a generic mechanism see {ERC20PresetMinterPauser}.\n *\n * TIP: For a detailed writeup see our guide\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\n *\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\n * instead returning `false` on failure. This behavior is nonetheless\n * conventional and does not conflict with the expectations of ERC20\n * applications.\n *\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\n * This allows applications to reconstruct the allowance for all accounts just\n * by listening to said events. Other implementations of the EIP may not emit\n * these events, as it isn't required by the specification.\n *\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\n * functions have been added to mitigate the well-known issues around setting\n * allowances. See {IERC20-approve}.\n */\ncontract ERC20Upgradeable is Initializable, ContextUpgradeable, IERC20Upgradeable, IERC20MetadataUpgradeable {\n    mapping(address => uint256) private _balances;\n\n    mapping(address => mapping(address => uint256)) private _allowances;\n\n    uint256 private _totalSupply;\n\n    string private _name;\n    string private _symbol;\n\n    /**\n     * @dev Sets the values for {name} and {symbol}.\n     *\n     * The default value of {decimals} is 18. To select a different value for\n     * {decimals} you should overload it.\n     *\n     * All two of these values are immutable: they can only be set once during\n     * construction.\n     */\n    function __ERC20_init(string memory name_, string memory symbol_) internal onlyInitializing {\n        __ERC20_init_unchained(name_, symbol_);\n    }\n\n    function __ERC20_init_unchained(string memory name_, string memory symbol_) internal onlyInitializing {\n        _name = name_;\n        _symbol = symbol_;\n    }\n\n    /**\n     * @dev Returns the name of the token.\n     */\n    function name() public view virtual override returns (string memory) {\n        return _name;\n    }\n\n    /**\n     * @dev Returns the symbol of the token, usually a shorter version of the\n     * name.\n     */\n    function symbol() public view virtual override returns (string memory) {\n        return _symbol;\n    }\n\n    /**\n     * @dev Returns the number of decimals used to get its user representation.\n     * For example, if `decimals` equals `2`, a balance of `505` tokens should\n     * be displayed to a user as `5.05` (`505 / 10 ** 2`).\n     *\n     * Tokens usually opt for a value of 18, imitating the relationship between\n     * Ether and Wei. This is the value {ERC20} uses, unless this function is\n     * overridden;\n     *\n     * NOTE: This information is only used for _display_ purposes: it in\n     * no way affects any of the arithmetic of the contract, including\n     * {IERC20-balanceOf} and {IERC20-transfer}.\n     */\n    function decimals() public view virtual override returns (uint8) {\n        return 18;\n    }\n\n    /**\n     * @dev See {IERC20-totalSupply}.\n     */\n    function totalSupply() public view virtual override returns (uint256) {\n        return _totalSupply;\n    }\n\n    /**\n     * @dev See {IERC20-balanceOf}.\n     */\n    function balanceOf(address account) public view virtual override returns (uint256) {\n        return _balances[account];\n    }\n\n    /**\n     * @dev See {IERC20-transfer}.\n     *\n     * Requirements:\n     *\n     * - `to` cannot be the zero address.\n     * - the caller must have a balance of at least `amount`.\n     */\n    function transfer(address to, uint256 amount) public virtual override returns (bool) {\n        address owner = _msgSender();\n        _transfer(owner, to, amount);\n        return true;\n    }\n\n    /**\n     * @dev See {IERC20-allowance}.\n     */\n    function allowance(address owner, address spender) public view virtual override returns (uint256) {\n        return _allowances[owner][spender];\n    }\n\n    /**\n     * @dev See {IERC20-approve}.\n     *\n     * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on\n     * `transferFrom`. This is semantically equivalent to an infinite approval.\n     *\n     * Requirements:\n     *\n     * - `spender` cannot be the zero address.\n     */\n    function approve(address spender, uint256 amount) public virtual override returns (bool) {\n        address owner = _msgSender();\n        _approve(owner, spender, amount);\n        return true;\n    }\n\n    /**\n     * @dev See {IERC20-transferFrom}.\n     *\n     * Emits an {Approval} event indicating the updated allowance. This is not\n     * required by the EIP. See the note at the beginning of {ERC20}.\n     *\n     * NOTE: Does not update the allowance if the current allowance\n     * is the maximum `uint256`.\n     *\n     * Requirements:\n     *\n     * - `from` and `to` cannot be the zero address.\n     * - `from` must have a balance of at least `amount`.\n     * - the caller must have allowance for ``from``'s tokens of at least\n     * `amount`.\n     */\n    function transferFrom(\n        address from,\n        address to,\n        uint256 amount\n    ) public virtual override returns (bool) {\n        address spender = _msgSender();\n        _spendAllowance(from, spender, amount);\n        _transfer(from, to, amount);\n        return true;\n    }\n\n    /**\n     * @dev Atomically increases the allowance granted to `spender` by the caller.\n     *\n     * This is an alternative to {approve} that can be used as a mitigation for\n     * problems described in {IERC20-approve}.\n     *\n     * Emits an {Approval} event indicating the updated allowance.\n     *\n     * Requirements:\n     *\n     * - `spender` cannot be the zero address.\n     */\n    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\n        address owner = _msgSender();\n        _approve(owner, spender, allowance(owner, spender) + addedValue);\n        return true;\n    }\n\n    /**\n     * @dev Atomically decreases the allowance granted to `spender` by the caller.\n     *\n     * This is an alternative to {approve} that can be used as a mitigation for\n     * problems described in {IERC20-approve}.\n     *\n     * Emits an {Approval} event indicating the updated allowance.\n     *\n     * Requirements:\n     *\n     * - `spender` cannot be the zero address.\n     * - `spender` must have allowance for the caller of at least\n     * `subtractedValue`.\n     */\n    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\n        address owner = _msgSender();\n        uint256 currentAllowance = allowance(owner, spender);\n        require(currentAllowance >= subtractedValue, \"ERC20: decreased allowance below zero\");\n        unchecked {\n            _approve(owner, spender, currentAllowance - subtractedValue);\n        }\n\n        return true;\n    }\n\n    /**\n     * @dev Moves `amount` of tokens from `from` to `to`.\n     *\n     * This internal function is equivalent to {transfer}, and can be used to\n     * e.g. implement automatic token fees, slashing mechanisms, etc.\n     *\n     * Emits a {Transfer} event.\n     *\n     * Requirements:\n     *\n     * - `from` cannot be the zero address.\n     * - `to` cannot be the zero address.\n     * - `from` must have a balance of at least `amount`.\n     */\n    function _transfer(\n        address from,\n        address to,\n        uint256 amount\n    ) internal virtual {\n        require(from != address(0), \"ERC20: transfer from the zero address\");\n        require(to != address(0), \"ERC20: transfer to the zero address\");\n\n        _beforeTokenTransfer(from, to, amount);\n\n        uint256 fromBalance = _balances[from];\n        require(fromBalance >= amount, \"ERC20: transfer amount exceeds balance\");\n        unchecked {\n            _balances[from] = fromBalance - amount;\n            // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by\n            // decrementing then incrementing.\n            _balances[to] += amount;\n        }\n\n        emit Transfer(from, to, amount);\n\n        _afterTokenTransfer(from, to, amount);\n    }\n\n    /** @dev Creates `amount` tokens and assigns them to `account`, increasing\n     * the total supply.\n     *\n     * Emits a {Transfer} event with `from` set to the zero address.\n     *\n     * Requirements:\n     *\n     * - `account` cannot be the zero address.\n     */\n    function _mint(address account, uint256 amount) internal virtual {\n        require(account != address(0), \"ERC20: mint to the zero address\");\n\n        _beforeTokenTransfer(address(0), account, amount);\n\n        _totalSupply += amount;\n        unchecked {\n            // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.\n            _balances[account] += amount;\n        }\n        emit Transfer(address(0), account, amount);\n\n        _afterTokenTransfer(address(0), account, amount);\n    }\n\n    /**\n     * @dev Destroys `amount` tokens from `account`, reducing the\n     * total supply.\n     *\n     * Emits a {Transfer} event with `to` set to the zero address.\n     *\n     * Requirements:\n     *\n     * - `account` cannot be the zero address.\n     * - `account` must have at least `amount` tokens.\n     */\n    function _burn(address account, uint256 amount) internal virtual {\n        require(account != address(0), \"ERC20: burn from the zero address\");\n\n        _beforeTokenTransfer(account, address(0), amount);\n\n        uint256 accountBalance = _balances[account];\n        require(accountBalance >= amount, \"ERC20: burn amount exceeds balance\");\n        unchecked {\n            _balances[account] = accountBalance - amount;\n            // Overflow not possible: amount <= accountBalance <= totalSupply.\n            _totalSupply -= amount;\n        }\n\n        emit Transfer(account, address(0), amount);\n\n        _afterTokenTransfer(account, address(0), amount);\n    }\n\n    /**\n     * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\n     *\n     * This internal function is equivalent to `approve`, and can be used to\n     * e.g. set automatic allowances for certain subsystems, etc.\n     *\n     * Emits an {Approval} event.\n     *\n     * Requirements:\n     *\n     * - `owner` cannot be the zero address.\n     * - `spender` cannot be the zero address.\n     */\n    function _approve(\n        address owner,\n        address spender,\n        uint256 amount\n    ) internal virtual {\n        require(owner != address(0), \"ERC20: approve from the zero address\");\n        require(spender != address(0), \"ERC20: approve to the zero address\");\n\n        _allowances[owner][spender] = amount;\n        emit Approval(owner, spender, amount);\n    }\n\n    /**\n     * @dev Updates `owner` s allowance for `spender` based on spent `amount`.\n     *\n     * Does not update the allowance amount in case of infinite allowance.\n     * Revert if not enough allowance is available.\n     *\n     * Might emit an {Approval} event.\n     */\n    function _spendAllowance(\n        address owner,\n        address spender,\n        uint256 amount\n    ) internal virtual {\n        uint256 currentAllowance = allowance(owner, spender);\n        if (currentAllowance != type(uint256).max) {\n            require(currentAllowance >= amount, \"ERC20: insufficient allowance\");\n            unchecked {\n                _approve(owner, spender, currentAllowance - amount);\n            }\n        }\n    }\n\n    /**\n     * @dev Hook that is called before any transfer of tokens. This includes\n     * minting and burning.\n     *\n     * Calling conditions:\n     *\n     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n     * will be transferred to `to`.\n     * - when `from` is zero, `amount` tokens will be minted for `to`.\n     * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\n     * - `from` and `to` are never both zero.\n     *\n     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n     */\n    function _beforeTokenTransfer(\n        address from,\n        address to,\n        uint256 amount\n    ) internal virtual {}\n\n    /**\n     * @dev Hook that is called after any transfer of tokens. This includes\n     * minting and burning.\n     *\n     * Calling conditions:\n     *\n     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n     * has been transferred to `to`.\n     * - when `from` is zero, `amount` tokens have been minted for `to`.\n     * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\n     * - `from` and `to` are never both zero.\n     *\n     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n     */\n    function _afterTokenTransfer(\n        address from,\n        address to,\n        uint256 amount\n    ) internal virtual {}\n\n    /**\n     * @dev This empty reserved space is put in place to allow future versions to add new\n     * variables without shifting down storage in the inheritance chain.\n     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n     */\n    uint256[45] private __gap;\n}\n"},{"file_path":"lib/openzeppelin-contracts-upgradeable/contracts/token/ERC20/IERC20Upgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20Upgradeable {\n    /**\n     * @dev 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 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 `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 amount) external returns (bool);\n\n    /**\n     * @dev Returns the remaining number of tokens that `spender` will be\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\n     * zero by default.\n     *\n     * This value changes when {approve} or {transferFrom} are called.\n     */\n    function allowance(address owner, address spender) external view returns (uint256);\n\n    /**\n     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\n     * that someone may use both the old and the new allowance by unfortunate\n     * transaction ordering. One possible solution to mitigate this race\n     * condition is to first reduce the spender's allowance to 0 and set the\n     * desired value afterwards:\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n     *\n     * Emits an {Approval} event.\n     */\n    function approve(address spender, uint256 amount) external returns (bool);\n\n    /**\n     * @dev Moves `amount` tokens from `from` to `to` 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 from,\n        address to,\n        uint256 amount\n    ) external returns (bool);\n}\n"},{"file_path":"lib/openzeppelin-contracts-upgradeable/contracts/token/ERC20/extensions/IERC20MetadataUpgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20Upgradeable.sol\";\n\n/**\n * @dev Interface for the optional metadata functions from the ERC20 standard.\n *\n * _Available since v4.1._\n */\ninterface IERC20MetadataUpgradeable is IERC20Upgradeable {\n    /**\n     * @dev Returns the name of the token.\n     */\n    function name() external view returns (string memory);\n\n    /**\n     * @dev Returns the symbol of the token.\n     */\n    function symbol() external view returns (string memory);\n\n    /**\n     * @dev Returns the decimals places of the token.\n     */\n    function decimals() external view returns (uint8);\n}\n"},{"file_path":"lib/openzeppelin-contracts-upgradeable/contracts/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/extensions/draft-ERC20Permit.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./draft-IERC20PermitUpgradeable.sol\";\nimport \"../ERC20Upgradeable.sol\";\nimport \"../../../utils/cryptography/ECDSAUpgradeable.sol\";\nimport \"../../../utils/cryptography/EIP712Upgradeable.sol\";\nimport \"../../../utils/CountersUpgradeable.sol\";\nimport \"../../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Implementation of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\n *\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\n * presenting a message signed by the account. By not relying on `{IERC20-approve}`, the token holder account doesn't\n * need to send a transaction, and thus is not required to hold Ether at all.\n *\n * _Available since v3.4._\n *\n * @custom:storage-size 51\n */\nabstract contract ERC20PermitUpgradeable is Initializable, ERC20Upgradeable, IERC20PermitUpgradeable, EIP712Upgradeable {\n    using CountersUpgradeable for CountersUpgradeable.Counter;\n\n    mapping(address => CountersUpgradeable.Counter) private _nonces;\n\n    // solhint-disable-next-line var-name-mixedcase\n    bytes32 private constant _PERMIT_TYPEHASH =\n        keccak256(\"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\");\n    /**\n     * @dev In previous versions `_PERMIT_TYPEHASH` was declared as `immutable`.\n     * However, to ensure consistency with the upgradeable transpiler, we will continue\n     * to reserve a slot.\n     * @custom:oz-renamed-from _PERMIT_TYPEHASH\n     */\n    // solhint-disable-next-line var-name-mixedcase\n    bytes32 private _PERMIT_TYPEHASH_DEPRECATED_SLOT;\n\n    /**\n     * @dev Initializes the {EIP712} domain separator using the `name` parameter, and setting `version` to `\"1\"`.\n     *\n     * It's a good idea to use the same `name` that is defined as the ERC20 token name.\n     */\n    function __ERC20Permit_init(string memory name) internal onlyInitializing {\n        __EIP712_init_unchained(name, \"1\");\n    }\n\n    function __ERC20Permit_init_unchained(string memory) internal onlyInitializing {}\n\n    /**\n     * @dev See {IERC20Permit-permit}.\n     */\n    function permit(\n        address owner,\n        address spender,\n        uint256 value,\n        uint256 deadline,\n        uint8 v,\n        bytes32 r,\n        bytes32 s\n    ) public virtual override {\n        require(block.timestamp <= deadline, \"ERC20Permit: expired deadline\");\n\n        bytes32 structHash = keccak256(abi.encode(_PERMIT_TYPEHASH, owner, spender, value, _useNonce(owner), deadline));\n\n        bytes32 hash = _hashTypedDataV4(structHash);\n\n        address signer = ECDSAUpgradeable.recover(hash, v, r, s);\n        require(signer == owner, \"ERC20Permit: invalid signature\");\n\n        _approve(owner, spender, value);\n    }\n\n    /**\n     * @dev See {IERC20Permit-nonces}.\n     */\n    function nonces(address owner) public view virtual override returns (uint256) {\n        return _nonces[owner].current();\n    }\n\n    /**\n     * @dev See {IERC20Permit-DOMAIN_SEPARATOR}.\n     */\n    // solhint-disable-next-line func-name-mixedcase\n    function DOMAIN_SEPARATOR() external view override returns (bytes32) {\n        return _domainSeparatorV4();\n    }\n\n    /**\n     * @dev \"Consume a nonce\": return the current value and increment.\n     *\n     * _Available since v4.1._\n     */\n    function _useNonce(address owner) internal virtual returns (uint256 current) {\n        CountersUpgradeable.Counter storage nonce = _nonces[owner];\n        current = nonce.current();\n        nonce.increment();\n    }\n\n    /**\n     * @dev This empty reserved space is put in place to allow future versions to add new\n     * variables without shifting down storage in the inheritance chain.\n     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n     */\n    uint256[49] private __gap;\n}\n"},{"file_path":"lib/openzeppelin-contracts-upgradeable/contracts/token/ERC20/extensions/draft-IERC20PermitUpgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\n *\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\n * need to send a transaction, and thus is not required to hold Ether at all.\n */\ninterface IERC20PermitUpgradeable {\n    /**\n     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\n     * given ``owner``'s signed approval.\n     *\n     * IMPORTANT: The same issues {IERC20-approve} has related to transaction\n     * ordering also apply here.\n     *\n     * Emits an {Approval} event.\n     *\n     * Requirements:\n     *\n     * - `spender` cannot be the zero address.\n     * - `deadline` must be a timestamp in the future.\n     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\n     * over the EIP712-formatted function arguments.\n     * - the signature must use ``owner``'s current nonce (see {nonces}).\n     *\n     * For more information on the signature format, see the\n     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\n     * section].\n     */\n    function permit(\n        address owner,\n        address spender,\n        uint256 value,\n        uint256 deadline,\n        uint8 v,\n        bytes32 r,\n        bytes32 s\n    ) external;\n\n    /**\n     * @dev Returns the current nonce for `owner`. This value must be\n     * included whenever a signature is generated for {permit}.\n     *\n     * Every successful call to {permit} increases ``owner``'s nonce by one. This\n     * prevents a signature from being used multiple times.\n     */\n    function nonces(address owner) external view returns (uint256);\n\n    /**\n     * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\n     */\n    // solhint-disable-next-line func-name-mixedcase\n    function DOMAIN_SEPARATOR() external view returns (bytes32);\n}\n"},{"file_path":"lib/openzeppelin-contracts-upgradeable/contracts/utils/AddressUpgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)\n\npragma solidity ^0.8.1;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary AddressUpgradeable {\n    /**\n     * @dev Returns true if `account` is a contract.\n     *\n     * [IMPORTANT]\n     * ====\n     * It is unsafe to assume that an address for which this function returns\n     * false is an externally-owned account (EOA) and not a contract.\n     *\n     * Among others, `isContract` will return false for the following\n     * types of addresses:\n     *\n     *  - an externally-owned account\n     *  - a contract in construction\n     *  - an address where a contract will be created\n     *  - an address where a contract lived, but was destroyed\n     * ====\n     *\n     * [IMPORTANT]\n     * ====\n     * You shouldn't rely on `isContract` to protect against flash loan attacks!\n     *\n     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\n     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\n     * constructor.\n     * ====\n     */\n    function isContract(address account) internal view returns (bool) {\n        // This method relies on extcodesize/address.code.length, which returns 0\n        // for contracts in construction, since the code is only stored at the end\n        // of the constructor execution.\n\n        return account.code.length > 0;\n    }\n\n    /**\n     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n     * `recipient`, forwarding all available gas and reverting on errors.\n     *\n     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n     * of certain opcodes, possibly making contracts go over the 2300 gas limit\n     * imposed by `transfer`, making them unable to receive funds via\n     * `transfer`. {sendValue} removes this limitation.\n     *\n     * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n     *\n     * IMPORTANT: because control is transferred to `recipient`, care must be\n     * taken to not create reentrancy vulnerabilities. Consider using\n     * {ReentrancyGuard} or the\n     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n     */\n    function sendValue(address payable recipient, uint256 amount) internal {\n        require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n        (bool success, ) = recipient.call{value: amount}(\"\");\n        require(success, \"Address: unable to send value, recipient may have reverted\");\n    }\n\n    /**\n     * @dev Performs a Solidity function call using a low level `call`. A\n     * plain `call` is an unsafe replacement for a function call: use this\n     * function instead.\n     *\n     * If `target` reverts with a revert reason, it is bubbled up by this\n     * function (like regular Solidity function calls).\n     *\n     * Returns the raw returned data. To convert to the expected return value,\n     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n     *\n     * Requirements:\n     *\n     * - `target` must be a contract.\n     * - calling `target` with `data` must not revert.\n     *\n     * _Available since v3.1._\n     */\n    function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n        return functionCallWithValue(target, data, 0, \"Address: low-level call failed\");\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n     * `errorMessage` as a fallback revert reason when `target` reverts.\n     *\n     * _Available since v3.1._\n     */\n    function functionCall(\n        address target,\n        bytes memory data,\n        string memory errorMessage\n    ) internal returns (bytes memory) {\n        return functionCallWithValue(target, data, 0, errorMessage);\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n     * but also transferring `value` wei to `target`.\n     *\n     * Requirements:\n     *\n     * - the calling contract must have an ETH balance of at least `value`.\n     * - the called Solidity function must be `payable`.\n     *\n     * _Available since v3.1._\n     */\n    function functionCallWithValue(\n        address target,\n        bytes memory data,\n        uint256 value\n    ) internal returns (bytes memory) {\n        return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n     * with `errorMessage` as a fallback revert reason when `target` reverts.\n     *\n     * _Available since v3.1._\n     */\n    function functionCallWithValue(\n        address target,\n        bytes memory data,\n        uint256 value,\n        string memory errorMessage\n    ) internal returns (bytes memory) {\n        require(address(this).balance >= value, \"Address: insufficient balance for call\");\n        (bool success, bytes memory returndata) = target.call{value: value}(data);\n        return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n     * but performing a static call.\n     *\n     * _Available since v3.3._\n     */\n    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n        return functionStaticCall(target, data, \"Address: low-level static call failed\");\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n     * but performing a static call.\n     *\n     * _Available since v3.3._\n     */\n    function functionStaticCall(\n        address target,\n        bytes memory data,\n        string memory errorMessage\n    ) internal view returns (bytes memory) {\n        (bool success, bytes memory returndata) = target.staticcall(data);\n        return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n    }\n\n    /**\n     * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\n     * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\n     *\n     * _Available since v4.8._\n     */\n    function verifyCallResultFromTarget(\n        address target,\n        bool success,\n        bytes memory returndata,\n        string memory errorMessage\n    ) internal view returns (bytes memory) {\n        if (success) {\n            if (returndata.length == 0) {\n                // only check isContract if the call was successful and the return data is empty\n                // otherwise we already know that it was a contract\n                require(isContract(target), \"Address: call to non-contract\");\n            }\n            return returndata;\n        } else {\n            _revert(returndata, errorMessage);\n        }\n    }\n\n    /**\n     * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\n     * revert reason or using the provided one.\n     *\n     * _Available since v4.3._\n     */\n    function verifyCallResult(\n        bool success,\n        bytes memory returndata,\n        string memory errorMessage\n    ) internal pure returns (bytes memory) {\n        if (success) {\n            return returndata;\n        } else {\n            _revert(returndata, errorMessage);\n        }\n    }\n\n    function _revert(bytes memory returndata, string memory errorMessage) private pure {\n        // Look for revert reason and bubble it up if present\n        if (returndata.length > 0) {\n            // The easiest way to bubble the revert reason is using memory via assembly\n            /// @solidity memory-safe-assembly\n            assembly {\n                let returndata_size := mload(returndata)\n                revert(add(32, returndata), returndata_size)\n            }\n        } else {\n            revert(errorMessage);\n        }\n    }\n}\n"},{"file_path":"lib/openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\n\npragma solidity ^0.8.0;\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract ContextUpgradeable is Initializable {\n    function __Context_init() internal onlyInitializing {\n    }\n\n    function __Context_init_unchained() internal onlyInitializing {\n    }\n    function _msgSender() internal view virtual returns (address) {\n        return msg.sender;\n    }\n\n    function _msgData() internal view virtual returns (bytes calldata) {\n        return msg.data;\n    }\n\n    /**\n     * @dev This empty reserved space is put in place to allow future versions to add new\n     * variables without shifting down storage in the inheritance chain.\n     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n     */\n    uint256[50] private __gap;\n}\n"},{"file_path":"lib/openzeppelin-contracts-upgradeable/contracts/utils/CountersUpgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Counters.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @title Counters\n * @author Matt Condon (@shrugs)\n * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number\n * of elements in a mapping, issuing ERC721 ids, or counting request ids.\n *\n * Include with `using Counters for Counters.Counter;`\n */\nlibrary CountersUpgradeable {\n    struct Counter {\n        // This variable should never be directly accessed by users of the library: interactions must be restricted to\n        // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add\n        // this feature: see https://github.com/ethereum/solidity/issues/4637\n        uint256 _value; // default: 0\n    }\n\n    function current(Counter storage counter) internal view returns (uint256) {\n        return counter._value;\n    }\n\n    function increment(Counter storage counter) internal {\n        unchecked {\n            counter._value += 1;\n        }\n    }\n\n    function decrement(Counter storage counter) internal {\n        uint256 value = counter._value;\n        require(value > 0, \"Counter: decrement overflow\");\n        unchecked {\n            counter._value = value - 1;\n        }\n    }\n\n    function reset(Counter storage counter) internal {\n        counter._value = 0;\n    }\n}\n"},{"file_path":"lib/openzeppelin-contracts-upgradeable/contracts/utils/StringsUpgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./math/MathUpgradeable.sol\";\n\n/**\n * @dev String operations.\n */\nlibrary StringsUpgradeable {\n    bytes16 private constant _SYMBOLS = \"0123456789abcdef\";\n    uint8 private constant _ADDRESS_LENGTH = 20;\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 = MathUpgradeable.log10(value) + 1;\n            string memory buffer = new string(length);\n            uint256 ptr;\n            /// @solidity memory-safe-assembly\n            assembly {\n                ptr := add(buffer, add(32, length))\n            }\n            while (true) {\n                ptr--;\n                /// @solidity memory-safe-assembly\n                assembly {\n                    mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\n                }\n                value /= 10;\n                if (value == 0) break;\n            }\n            return buffer;\n        }\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, MathUpgradeable.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        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] = _SYMBOLS[value & 0xf];\n            value >>= 4;\n        }\n        require(value == 0, \"Strings: hex length insufficient\");\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 representation.\n     */\n    function toHexString(address addr) internal pure returns (string memory) {\n        return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\n    }\n}\n"},{"file_path":"lib/openzeppelin-contracts-upgradeable/contracts/utils/cryptography/ECDSAUpgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/cryptography/ECDSA.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../StringsUpgradeable.sol\";\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 ECDSAUpgradeable {\n    enum RecoverError {\n        NoError,\n        InvalidSignature,\n        InvalidSignatureLength,\n        InvalidSignatureS,\n        InvalidSignatureV // Deprecated in v4.8\n    }\n\n    function _throwError(RecoverError error) private pure {\n        if (error == RecoverError.NoError) {\n            return; // no error: do nothing\n        } else if (error == RecoverError.InvalidSignature) {\n            revert(\"ECDSA: invalid signature\");\n        } else if (error == RecoverError.InvalidSignatureLength) {\n            revert(\"ECDSA: invalid signature length\");\n        } else if (error == RecoverError.InvalidSignatureS) {\n            revert(\"ECDSA: invalid signature 's' value\");\n        }\n    }\n\n    /**\n     * @dev Returns the address that signed a hashed message (`hash`) with\n     * `signature` or error string. This address can then be used for verification purposes.\n     *\n     * The `ecrecover` EVM opcode 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 {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     * _Available since v4.3._\n     */\n    function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\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            /// @solidity memory-safe-assembly\n            assembly {\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);\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 opcode 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 {toEthSignedMessageHash} on it.\n     */\n    function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\n        (address recovered, RecoverError error) = tryRecover(hash, signature);\n        _throwError(error);\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[EIP-2098 short signatures]\n     *\n     * _Available since v4.3._\n     */\n    function tryRecover(\n        bytes32 hash,\n        bytes32 r,\n        bytes32 vs\n    ) internal pure returns (address, RecoverError) {\n        bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\n        uint8 v = uint8((uint256(vs) >> 255) + 27);\n        return tryRecover(hash, v, r, s);\n    }\n\n    /**\n     * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\n     *\n     * _Available since v4.2._\n     */\n    function recover(\n        bytes32 hash,\n        bytes32 r,\n        bytes32 vs\n    ) internal pure returns (address) {\n        (address recovered, RecoverError error) = tryRecover(hash, r, vs);\n        _throwError(error);\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     * _Available since v4.3._\n     */\n    function tryRecover(\n        bytes32 hash,\n        uint8 v,\n        bytes32 r,\n        bytes32 s\n    ) internal pure returns (address, RecoverError) {\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);\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);\n        }\n\n        return (signer, RecoverError.NoError);\n    }\n\n    /**\n     * @dev Overload of {ECDSA-recover} that receives the `v`,\n     * `r` and `s` signature fields separately.\n     */\n    function recover(\n        bytes32 hash,\n        uint8 v,\n        bytes32 r,\n        bytes32 s\n    ) internal pure returns (address) {\n        (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\n        _throwError(error);\n        return recovered;\n    }\n\n    /**\n     * @dev Returns an Ethereum Signed Message, created from a `hash`. This\n     * produces hash corresponding to the one signed with the\n     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\n     * JSON-RPC method as part of EIP-191.\n     *\n     * See {recover}.\n     */\n    function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\n        // 32 is the length in bytes of hash,\n        // enforced by the type signature above\n        return keccak256(abi.encodePacked(\"\\x19Ethereum Signed Message:\\n32\", hash));\n    }\n\n    /**\n     * @dev Returns an Ethereum Signed Message, created from `s`. This\n     * produces hash corresponding to the one signed with the\n     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\n     * JSON-RPC method as part of EIP-191.\n     *\n     * See {recover}.\n     */\n    function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\n        return keccak256(abi.encodePacked(\"\\x19Ethereum Signed Message:\\n\", StringsUpgradeable.toString(s.length), s));\n    }\n\n    /**\n     * @dev Returns an Ethereum Signed Typed Data, created from a\n     * `domainSeparator` and a `structHash`. This produces hash corresponding\n     * to the one signed with the\n     * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\n     * JSON-RPC method as part of EIP-712.\n     *\n     * See {recover}.\n     */\n    function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {\n        return keccak256(abi.encodePacked(\"\\x19\\x01\", domainSeparator, structHash));\n    }\n}\n"},{"file_path":"lib/openzeppelin-contracts-upgradeable/contracts/utils/cryptography/EIP712Upgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./ECDSAUpgradeable.sol\";\nimport \"../../proxy/utils/Initializable.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 specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\n * they need in their contracts 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 * _Available since v3.4._\n *\n * @custom:storage-size 52\n */\nabstract contract EIP712Upgradeable is Initializable {\n    /* solhint-disable var-name-mixedcase */\n    bytes32 private _HASHED_NAME;\n    bytes32 private _HASHED_VERSION;\n    bytes32 private constant _TYPE_HASH = keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\");\n\n    /* solhint-enable var-name-mixedcase */\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    function __EIP712_init(string memory name, string memory version) internal onlyInitializing {\n        __EIP712_init_unchained(name, version);\n    }\n\n    function __EIP712_init_unchained(string memory name, string memory version) internal onlyInitializing {\n        bytes32 hashedName = keccak256(bytes(name));\n        bytes32 hashedVersion = keccak256(bytes(version));\n        _HASHED_NAME = hashedName;\n        _HASHED_VERSION = hashedVersion;\n    }\n\n    /**\n     * @dev Returns the domain separator for the current chain.\n     */\n    function _domainSeparatorV4() internal view returns (bytes32) {\n        return _buildDomainSeparator(_TYPE_HASH, _EIP712NameHash(), _EIP712VersionHash());\n    }\n\n    function _buildDomainSeparator(\n        bytes32 typeHash,\n        bytes32 nameHash,\n        bytes32 versionHash\n    ) private view returns (bytes32) {\n        return keccak256(abi.encode(typeHash, nameHash, versionHash, 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 ECDSAUpgradeable.toTypedDataHash(_domainSeparatorV4(), structHash);\n    }\n\n    /**\n     * @dev The hash of the name parameter for the EIP712 domain.\n     *\n     * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\n     * are a concern.\n     */\n    function _EIP712NameHash() internal virtual view returns (bytes32) {\n        return _HASHED_NAME;\n    }\n\n    /**\n     * @dev The hash of the version parameter for the EIP712 domain.\n     *\n     * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\n     * are a concern.\n     */\n    function _EIP712VersionHash() internal virtual view returns (bytes32) {\n        return _HASHED_VERSION;\n    }\n\n    /**\n     * @dev This empty reserved space is put in place to allow future versions to add new\n     * variables without shifting down storage in the inheritance chain.\n     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n     */\n    uint256[50] private __gap;\n}\n"},{"file_path":"lib/openzeppelin-contracts-upgradeable/contracts/utils/introspection/ERC165Upgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC165Upgradeable.sol\";\nimport \"../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Implementation of the {IERC165} interface.\n *\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\n * for the additional interface id that will be supported. For example:\n *\n * ```solidity\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\n * }\n * ```\n *\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\n */\nabstract contract ERC165Upgradeable is Initializable, IERC165Upgradeable {\n    function __ERC165_init() internal onlyInitializing {\n    }\n\n    function __ERC165_init_unchained() internal onlyInitializing {\n    }\n    /**\n     * @dev See {IERC165-supportsInterface}.\n     */\n    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n        return interfaceId == type(IERC165Upgradeable).interfaceId;\n    }\n\n    /**\n     * @dev This empty reserved space is put in place to allow future versions to add new\n     * variables without shifting down storage in the inheritance chain.\n     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n     */\n    uint256[50] private __gap;\n}\n"},{"file_path":"lib/openzeppelin-contracts-upgradeable/contracts/utils/introspection/IERC165Upgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\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 IERC165Upgradeable {\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[EIP 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"},{"file_path":"lib/openzeppelin-contracts-upgradeable/contracts/utils/math/MathUpgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/math/Math.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary MathUpgradeable {\n    enum Rounding {\n        Down, // Toward negative infinity\n        Up, // Toward infinity\n        Zero // Toward zero\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 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 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 up instead\n     * of rounding down.\n     */\n    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n        // (a + b - 1) / b can overflow on addition, so we distribute.\n        return a == 0 ? 0 : (a - 1) / b + 1;\n    }\n\n    /**\n     * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\n     * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\n     * with further edits by Uniswap Labs also under MIT license.\n     */\n    function mulDiv(\n        uint256 x,\n        uint256 y,\n        uint256 denominator\n    ) internal pure returns (uint256 result) {\n        unchecked {\n            // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\n            // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\n            // variables such that product = prod1 * 2^256 + prod0.\n            uint256 prod0; // Least significant 256 bits of the product\n            uint256 prod1; // Most significant 256 bits of the product\n            assembly {\n                let mm := mulmod(x, y, not(0))\n                prod0 := mul(x, y)\n                prod1 := sub(sub(mm, prod0), lt(mm, prod0))\n            }\n\n            // Handle non-overflow cases, 256 by 256 division.\n            if (prod1 == 0) {\n                return prod0 / denominator;\n            }\n\n            // Make sure the result is less than 2^256. Also prevents denominator == 0.\n            require(denominator > prod1);\n\n            ///////////////////////////////////////////////\n            // 512 by 256 division.\n            ///////////////////////////////////////////////\n\n            // Make division exact by subtracting the remainder from [prod1 prod0].\n            uint256 remainder;\n            assembly {\n                // Compute remainder using mulmod.\n                remainder := mulmod(x, y, denominator)\n\n                // Subtract 256 bit number from 512 bit number.\n                prod1 := sub(prod1, gt(remainder, prod0))\n                prod0 := sub(prod0, remainder)\n            }\n\n            // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\n            // See https://cs.stackexchange.com/q/138556/92363.\n\n            // Does not overflow because the denominator cannot be zero at this stage in the function.\n            uint256 twos = denominator & (~denominator + 1);\n            assembly {\n                // Divide denominator by twos.\n                denominator := div(denominator, twos)\n\n                // Divide [prod1 prod0] by twos.\n                prod0 := div(prod0, twos)\n\n                // Flip twos such that it is 2^256 / 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 prod1 into prod0.\n            prod0 |= prod1 * twos;\n\n            // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\n            // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\n            // four bits. That is, denominator * inv = 1 mod 2^4.\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 works\n            // in modular arithmetic, doubling the correct bits in each step.\n            inverse *= 2 - denominator * inverse; // inverse mod 2^8\n            inverse *= 2 - denominator * inverse; // inverse mod 2^16\n            inverse *= 2 - denominator * inverse; // inverse mod 2^32\n            inverse *= 2 - denominator * inverse; // inverse mod 2^64\n            inverse *= 2 - denominator * inverse; // inverse mod 2^128\n            inverse *= 2 - denominator * inverse; // inverse mod 2^256\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^256. Since the preconditions guarantee that the outcome is\n            // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\n            // is no longer required.\n            result = prod0 * inverse;\n            return result;\n        }\n    }\n\n    /**\n     * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\n     */\n    function mulDiv(\n        uint256 x,\n        uint256 y,\n        uint256 denominator,\n        Rounding rounding\n    ) internal pure returns (uint256) {\n        uint256 result = mulDiv(x, y, denominator);\n        if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\n            result += 1;\n        }\n        return result;\n    }\n\n    /**\n     * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\n     *\n     * Inspired by Henry S. Warren, Jr.'s \"Hacker's Delight\" (Chapter 11).\n     */\n    function sqrt(uint256 a) internal pure returns (uint256) {\n        if (a == 0) {\n            return 0;\n        }\n\n        // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\n        //\n        // We know that the \"msb\" (most significant bit) of our target number `a` is a power of 2 such that we have\n        // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\n        //\n        // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\n        // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\n        // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\n        //\n        // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\n        uint256 result = 1 << (log2(a) >> 1);\n\n        // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\n        // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\n        // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\n        // into the expected uint128 result.\n        unchecked {\n            result = (result + a / result) >> 1;\n            result = (result + a / result) >> 1;\n            result = (result + a / result) >> 1;\n            result = (result + a / result) >> 1;\n            result = (result + a / result) >> 1;\n            result = (result + a / result) >> 1;\n            result = (result + a / result) >> 1;\n            return min(result, a / result);\n        }\n    }\n\n    /**\n     * @notice 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 + (rounding == Rounding.Up && result * result < a ? 1 : 0);\n        }\n    }\n\n    /**\n     * @dev Return the log in base 2, rounded down, of a positive value.\n     * Returns 0 if given 0.\n     */\n    function log2(uint256 value) internal pure returns (uint256) {\n        uint256 result = 0;\n        unchecked {\n            if (value >> 128 > 0) {\n                value >>= 128;\n                result += 128;\n            }\n            if (value >> 64 > 0) {\n                value >>= 64;\n                result += 64;\n            }\n            if (value >> 32 > 0) {\n                value >>= 32;\n                result += 32;\n            }\n            if (value >> 16 > 0) {\n                value >>= 16;\n                result += 16;\n            }\n            if (value >> 8 > 0) {\n                value >>= 8;\n                result += 8;\n            }\n            if (value >> 4 > 0) {\n                value >>= 4;\n                result += 4;\n            }\n            if (value >> 2 > 0) {\n                value >>= 2;\n                result += 2;\n            }\n            if (value >> 1 > 0) {\n                result += 1;\n            }\n        }\n        return result;\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 + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\n        }\n    }\n\n    /**\n     * @dev Return the log in base 10, rounded down, of a positive value.\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 + (rounding == Rounding.Up && 10**result < value ? 1 : 0);\n        }\n    }\n\n    /**\n     * @dev Return the log in base 256, rounded down, of a positive value.\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 value) internal pure returns (uint256) {\n        uint256 result = 0;\n        unchecked {\n            if (value >> 128 > 0) {\n                value >>= 128;\n                result += 16;\n            }\n            if (value >> 64 > 0) {\n                value >>= 64;\n                result += 8;\n            }\n            if (value >> 32 > 0) {\n                value >>= 32;\n                result += 4;\n            }\n            if (value >> 16 > 0) {\n                value >>= 16;\n                result += 2;\n            }\n            if (value >> 8 > 0) {\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 log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\n        unchecked {\n            uint256 result = log256(value);\n            return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0);\n        }\n    }\n}\n"},{"file_path":"lib/openzeppelin-contracts/contracts/interfaces/IERC3156FlashLender.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC3156FlashLender.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC3156FlashBorrower.sol\";\n\n/**\n * @dev Interface of the ERC3156 FlashLender, as defined in\n * https://eips.ethereum.org/EIPS/eip-3156[ERC-3156].\n *\n * _Available since v4.1._\n */\ninterface IERC3156FlashLender {\n    /**\n     * @dev The amount of currency available to be lended.\n     * @param token The loan currency.\n     * @return The amount of `token` that can be borrowed.\n     */\n    function maxFlashLoan(address token) external view returns (uint256);\n\n    /**\n     * @dev The fee to be charged for a given loan.\n     * @param token The loan currency.\n     * @param amount The amount of tokens lent.\n     * @return The amount of `token` to be charged for the loan, on top of the returned principal.\n     */\n    function flashFee(address token, uint256 amount) external view returns (uint256);\n\n    /**\n     * @dev Initiate a flash loan.\n     * @param receiver The receiver of the tokens in the loan, and the receiver of the callback.\n     * @param token The loan currency.\n     * @param amount The amount of tokens lent.\n     * @param data Arbitrary data structure, intended to contain user-defined parameters.\n     */\n    function flashLoan(\n        IERC3156FlashBorrower receiver,\n        address token,\n        uint256 amount,\n        bytes calldata data\n    ) external returns (bool);\n}\n"},{"file_path":"lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n    /**\n     * @dev 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 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 `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 amount) external returns (bool);\n\n    /**\n     * @dev Returns the remaining number of tokens that `spender` will be\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\n     * zero by default.\n     *\n     * This value changes when {approve} or {transferFrom} are called.\n     */\n    function allowance(address owner, address spender) external view returns (uint256);\n\n    /**\n     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\n     * that someone may use both the old and the new allowance by unfortunate\n     * transaction ordering. One possible solution to mitigate this race\n     * condition is to first reduce the spender's allowance to 0 and set the\n     * desired value afterwards:\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n     *\n     * Emits an {Approval} event.\n     */\n    function approve(address spender, uint256 amount) external returns (bool);\n\n    /**\n     * @dev Moves `amount` tokens from `from` to `to` 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 from,\n        address to,\n        uint256 amount\n    ) external returns (bool);\n}\n"},{"file_path":"lib/openzeppelin-contracts/contracts/token/ERC20/extensions/IERC20Metadata.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20.sol\";\n\n/**\n * @dev Interface for the optional metadata functions from the ERC20 standard.\n *\n * _Available since v4.1._\n */\ninterface IERC20Metadata is 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 decimals places of the token.\n     */\n    function decimals() external view returns (uint8);\n}\n"},{"file_path":"src/AlchemicTokenV2Base.sol","source_code":"// SPDX-License-Identifier: GPL-3.0-or-later\npragma solidity ^0.8.11;\n\nimport {AccessControlUpgradeable} from \"../lib/openzeppelin-contracts-upgradeable/contracts/access/AccessControlUpgradeable.sol\";\nimport {ERC20Upgradeable} from \"../lib/openzeppelin-contracts-upgradeable/contracts/token/ERC20/ERC20Upgradeable.sol\";\nimport {ReentrancyGuardUpgradeable} from \"../lib/openzeppelin-contracts-upgradeable/contracts/security/ReentrancyGuardUpgradeable.sol\";\n\nimport {IllegalArgument, IllegalState, Unauthorized} from \"./base/Errors.sol\";\n\nimport {IERC3156FlashLender} from \"../lib/openzeppelin-contracts/contracts/interfaces/IERC3156FlashLender.sol\";\nimport {IERC3156FlashBorrower} from \"../lib/openzeppelin-contracts/contracts/interfaces/IERC3156FlashBorrower.sol\";\n\nimport {IXERC20} from \"./interfaces/external/connext/IXERC20.sol\";\n\n/// @title  AlchemicTokenV2\n/// @author Alchemix Finance\n///\n/// @notice This is the contract for version two alchemic tokens.\n/// @notice Initially, the contract deployer is given both the admin and minter role. This allows them to pre-mine\n///         tokens, transfer admin to a timelock contract, and lastly, grant the staking pools the minter role. After\n///         this is done, the deployer must revoke their admin role and minter role.\ncontract AlchemicTokenV2Base is ERC20Upgradeable, AccessControlUpgradeable, IERC3156FlashLender, ReentrancyGuardUpgradeable {\n  /// @notice The identifier of the role which maintains other roles.\n  bytes32 public constant ADMIN_ROLE = keccak256(\"ADMIN\");\n\n  /// @notice The identifier of the role which allows accounts to mint tokens.\n  bytes32 public constant SENTINEL_ROLE = keccak256(\"SENTINEL\");\n\n  /// @notice The expected return value from a flash mint receiver\n  bytes32 public constant CALLBACK_SUCCESS = keccak256(\"ERC3156FlashBorrower.onFlashLoan\");\n\n  /// @notice The maximum number of basis points needed to represent 100%.\n  uint256 public constant BPS = 10_000;\n\n  /// @notice A set of addresses which are whitelisted for minting new tokens.\n  mapping(address => bool) public whitelisted;\n\n  /// @notice A set of addresses which are paused from minting new tokens.\n  mapping(address => bool) public paused;\n\n  /// @notice Fee for flash minting\n  uint256 public flashMintFee;\n\n  /// @notice Max flash mint amount\n  uint256 public maxFlashLoanAmount;\n\n  // Duration used for xERC20 rate limits\n  uint256 private constant _DURATION = 1 days;\n  \n  ///@notice Maps bridge address to bridge configurations. Used for xERC20 compatability.\n  mapping(address => IXERC20.Bridge) public xBridges;\n\n  /// @notice An event which is emitted when a minter is paused from minting.\n  ///\n  /// @param minter The address of the minter which was paused.\n  /// @param state  A flag indicating if the alchemist is paused or unpaused.\n  event Paused(address minter, bool state);\n\n  /// @notice An event which is emitted when the flash mint fee is updated.\n  ///\n  /// @param fee The new flash mint fee.\n  event SetFlashMintFee(uint256 fee);\n\n  /// @notice An event which is emitted when the max flash loan is updated.\n  ///\n  /// @param maxFlashLoan The new max flash loan.\n  event SetMaxFlashLoan(uint256 maxFlashLoan);\n\n  ///@notice Emits when a limit is set\n  ///\n  /// @param _mintingLimit The updated minting limit we are setting to the bridge\n  /// @param _burningLimit The updated burning limit we are setting to the bridge\n  /// @param _bridge The address of the bridge we are setting the limit too\n  event BridgeLimitsSet(uint256 _mintingLimit, uint256 _burningLimit, address indexed _bridge);\n\n  function __AlchemicTokenV2Base_init() internal {\n    _setupRole(ADMIN_ROLE, msg.sender);\n    _setupRole(SENTINEL_ROLE, msg.sender);\n    _setRoleAdmin(SENTINEL_ROLE, ADMIN_ROLE);\n    _setRoleAdmin(ADMIN_ROLE, ADMIN_ROLE);\n  }\n\n  /// @dev A modifier which checks that the caller has the admin role.\n  modifier onlyAdmin() {\n    if (!hasRole(ADMIN_ROLE, msg.sender)) {\n      revert Unauthorized();\n    }\n    _;\n  }\n\n  /// @dev A modifier which checks that the caller has the sentinel role.\n  modifier onlySentinel() {\n    if(!hasRole(SENTINEL_ROLE, msg.sender)) {\n      revert Unauthorized();\n    }\n    _;\n  }\n\n  /// @dev A modifier which checks if whitelisted for minting.\n  modifier onlyWhitelisted() {\n    if(!whitelisted[msg.sender]) {\n      revert Unauthorized();\n    }\n    _;\n  }\n\n  /// @notice Sets the flash minting fee.\n  ///\n  /// @notice This function reverts if `msg.sender` is not an admin.\n  ///\n  /// @param newFee The new flash mint fee.\n  function setFlashFee(uint256 newFee) external onlyAdmin {\n    if (newFee >= BPS) {\n      revert IllegalArgument();\n    }\n    flashMintFee = newFee;\n    emit SetFlashMintFee(flashMintFee);\n  }\n\n  /// @notice Mints tokens to `a recipient.`\n  ///\n  /// @notice This function reverts if `msg.sender` is not whitelisted.\n  /// @notice This function reverts if `msg.sender` is paused.\n  ///\n  /// @param recipient The address to mint the tokens to.\n  /// @param amount    The amount of tokens to mint.\n  function mint(address recipient, uint256 amount) external onlyWhitelisted {\n    if (paused[msg.sender]) {\n      revert IllegalState();\n    }\n\n    // If bridge is registered check limits and adjust them accordingly.\n    if (xBridges[msg.sender].minterParams.maxLimit > 0) {\n      uint256 currentLimit = mintingCurrentLimitOf(msg.sender);\n      if (amount > currentLimit) revert IXERC20.IXERC20_NotHighEnoughLimits();\n      _useMinterLimits(msg.sender, amount);\n    }\n\n    _mint(recipient, amount);\n  }\n\n  /// @notice Sets `minter` as whitelisted to mint.\n  ///\n  /// @notice This function reverts if `msg.sender` is not an admin.\n  ///\n  /// @param minter The account to permit to mint.\n  /// @param state  A flag indicating if the minter should be able to mint.\n  function setWhitelist(address minter, bool state) external onlyAdmin {\n    whitelisted[minter] = state;\n  }\n\n  /// @notice Sets `sentinel` as a sentinel.\n  ///\n  /// @notice This function reverts if `msg.sender` is not an admin.\n  ///\n  /// @param sentinel The address to set as a sentinel.\n  function setSentinel(address sentinel) external onlyAdmin {\n    _setupRole(SENTINEL_ROLE, sentinel);\n  }\n\n  /// @notice Pauses `minter` from minting tokens.\n  ///\n  /// @notice This function reverts if `msg.sender` is not a sentinel.\n  ///\n  /// @param minter The address to set as paused or unpaused.\n  /// @param state  A flag indicating if the minter should be paused or unpaused.\n  function pauseMinter(address minter, bool state) external onlySentinel {\n    paused[minter] = state;\n    emit Paused(minter, state);\n  }\n\n  /// @notice Burns `amount` tokens from `msg.sender`.\n  ///\n  /// @param amount The amount of tokens to be burned.\n  function burn(uint256 amount) external {\n    // If bridge is registered check limits and update accordingly.\n    if (xBridges[msg.sender].burnerParams.maxLimit > 0) {\n      uint256 currentLimit = burningCurrentLimitOf(msg.sender);\n      if (amount > currentLimit) revert IXERC20.IXERC20_NotHighEnoughLimits();\n      _useBurnerLimits(msg.sender, amount);\n    }\n\n    _burn(msg.sender, amount);\n  }\n\n  /// @dev Destroys `amount` tokens from `account`, deducting from the caller's allowance.\n  ///\n  /// @param account The address the burn tokens from.\n  /// @param amount  The amount of tokens to burn.\n  function burnFrom(address account, uint256 amount) external {\n    uint256 newAllowance = allowance(account, msg.sender) - amount;\n    _approve(account, msg.sender, newAllowance);\n\n    // If bridge is registered check limits and update accordingly.\n    if (xBridges[msg.sender].burnerParams.maxLimit > 0) {\n      uint256 currentLimit = burningCurrentLimitOf(msg.sender);\n      if (amount > currentLimit) revert IXERC20.IXERC20_NotHighEnoughLimits();\n      _useBurnerLimits(msg.sender, amount);\n    }\n\n    _burn(account, amount);\n  }\n\n  /// @notice Adjusts the maximum flashloan amount.\n  ///\n  /// @param _maxFlashLoanAmount The maximum flashloan amount.\n  function setMaxFlashLoan(uint256 _maxFlashLoanAmount) external onlyAdmin {\n    maxFlashLoanAmount = _maxFlashLoanAmount;\n    emit SetMaxFlashLoan(_maxFlashLoanAmount);\n  }\n\n  /// @notice Gets the maximum amount to be flash loaned of a token.\n  ///\n  /// @param token The address of the token.\n  ///\n  /// @return The maximum amount of `token` that can be flashed loaned.\n  function maxFlashLoan(address token) public view override returns (uint256) {\n    if (token != address(this)) {\n      return 0;\n    }\n    return maxFlashLoanAmount;\n  }\n\n  /// @notice Gets the flash loan fee of `amount` of `token`.\n  ///\n  /// @param token  The address of the token.`\n  /// @param amount The amount of `token` to flash mint.\n  ///\n  /// @return The flash loan fee.\n  function flashFee(address token, uint256 amount) public view override returns (uint256) {\n    if (token != address(this)) {\n      revert IllegalArgument();\n    }\n    return amount * flashMintFee / BPS;\n  }\n\n  /// @notice Performs a flash mint (called flash loan to confirm with ERC3156 standard).\n  ///\n  /// @param receiver The address which will receive the flash minted tokens.\n  /// @param token    The address of the token to flash mint.\n  /// @param amount   How much to flash mint.\n  /// @param data     ABI encoded data to pass to the receiver.\n  ///\n  /// @return If the flash loan was successful.\n  function flashLoan(\n    IERC3156FlashBorrower receiver,\n    address token,\n    uint256 amount,\n    bytes calldata data\n  ) external override nonReentrant returns (bool) {\n    if (token != address(this)) {\n      revert IllegalArgument();\n    }\n\n    if (amount > maxFlashLoan(token)) {\n      revert IllegalArgument();\n    }\n\n    uint256 fee = flashFee(token, amount);\n\n    _mint(address(receiver), amount);\n\n    if (receiver.onFlashLoan(msg.sender, token, amount, fee, data) != CALLBACK_SUCCESS) {\n      revert IllegalState();\n    }\n\n    _burn(address(receiver), amount + fee); // Will throw error if not enough to burn\n\n    return true;\n  }\n\n  // The following functions are a part of the connext bridge xERC20 standard\n\n  /**\n   * @notice Updates the limits of any bridge\n   * @dev Can only be called by the owner\n   * @param _mintingLimit The updated minting limit we are setting to the bridge\n   * @param _burningLimit The updated burning limit we are setting to the bridge\n   * @param _bridge The address of the bridge we are setting the limits too\n   */\n  function setLimits(address _bridge, uint256 _mintingLimit, uint256 _burningLimit) external onlyAdmin {\n    _changeMinterLimit(_bridge, _mintingLimit);\n    _changeBurnerLimit(_bridge, _burningLimit);\n    emit BridgeLimitsSet(_mintingLimit, _burningLimit, _bridge);\n  }\n\n  /**\n   * @notice Returns the max limit of a bridge\n   *\n   * @param _bridge the bridge we are viewing the limits of\n   * @return _limit The limit the bridge has\n   */\n\n  function mintingMaxLimitOf(address _bridge) public view returns (uint256 _limit) {\n    _limit = xBridges[_bridge].minterParams.maxLimit;\n  }\n\n  /**\n   * @notice Returns the max limit of a bridge\n   *\n   * @param _bridge the bridge we are viewing the limits of\n   * @return _limit The limit the bridge has\n   */\n\n  function burningMaxLimitOf(address _bridge) public view returns (uint256 _limit) {\n    _limit = xBridges[_bridge].burnerParams.maxLimit;\n  }\n\n  /**\n   * @notice Returns the current limit of a bridge\n   *\n   * @param _bridge the bridge we are viewing the limits of\n   * @return _limit The limit the bridge has\n   */\n\n  function mintingCurrentLimitOf(address _bridge) public view returns (uint256 _limit) {\n    _limit = _getCurrentLimit(\n      xBridges[_bridge].minterParams.currentLimit,\n      xBridges[_bridge].minterParams.maxLimit,\n      xBridges[_bridge].minterParams.timestamp,\n      xBridges[_bridge].minterParams.ratePerSecond\n    );\n  }\n\n  /**\n   * @notice Returns the current limit of a bridge\n   *\n   * @param _bridge the bridge we are viewing the limits of\n   * @return _limit The limit the bridge has\n   */\n\n  function burningCurrentLimitOf(address _bridge) public view returns (uint256 _limit) {\n    _limit = _getCurrentLimit(\n      xBridges[_bridge].burnerParams.currentLimit,\n      xBridges[_bridge].burnerParams.maxLimit,\n      xBridges[_bridge].burnerParams.timestamp,\n      xBridges[_bridge].burnerParams.ratePerSecond\n    );\n  }\n\n  /**\n   * @notice Uses the limit of any bridge\n   * @param _bridge The address of the bridge who is being changed\n   * @param _change The change in the limit\n   */\n\n  function _useMinterLimits(address _bridge, uint256 _change) internal {\n    uint256 _currentLimit = mintingCurrentLimitOf(_bridge);\n    xBridges[_bridge].minterParams.timestamp = block.timestamp;\n    xBridges[_bridge].minterParams.currentLimit = _currentLimit - _change;\n  }\n\n  /**\n   * @notice Uses the limit of any bridge\n   * @param _bridge The address of the bridge who is being changed\n   * @param _change The change in the limit\n   */\n\n  function _useBurnerLimits(address _bridge, uint256 _change) internal {\n    uint256 _currentLimit = burningCurrentLimitOf(_bridge);\n    xBridges[_bridge].burnerParams.timestamp = block.timestamp;\n    xBridges[_bridge].burnerParams.currentLimit = _currentLimit - _change;\n  }\n\n  /**\n   * @notice Updates the limit of any bridge\n   * @dev Can only be called by the owner\n   * @param _bridge The address of the bridge we are setting the limit too\n   * @param _limit The updated limit we are setting to the bridge\n   */\n\n  function _changeMinterLimit(address _bridge, uint256 _limit) internal {\n    uint256 _oldLimit = xBridges[_bridge].minterParams.maxLimit;\n    uint256 _currentLimit = mintingCurrentLimitOf(_bridge);\n    xBridges[_bridge].minterParams.maxLimit = _limit;\n\n    xBridges[_bridge].minterParams.currentLimit = _calculateNewCurrentLimit(_limit, _oldLimit, _currentLimit);\n\n    xBridges[_bridge].minterParams.ratePerSecond = _limit / _DURATION;\n    xBridges[_bridge].minterParams.timestamp = block.timestamp;\n  }\n\n  /**\n   * @notice Updates the limit of any bridge\n   * @dev Can only be called by the owner\n   * @param _bridge The address of the bridge we are setting the limit too\n   * @param _limit The updated limit we are setting to the bridge\n   */\n\n  function _changeBurnerLimit(address _bridge, uint256 _limit) internal {\n    uint256 _oldLimit = xBridges[_bridge].burnerParams.maxLimit;\n    uint256 _currentLimit = burningCurrentLimitOf(_bridge);\n    xBridges[_bridge].burnerParams.maxLimit = _limit;\n\n    xBridges[_bridge].burnerParams.currentLimit = _calculateNewCurrentLimit(_limit, _oldLimit, _currentLimit);\n\n    xBridges[_bridge].burnerParams.ratePerSecond = _limit / _DURATION;\n    xBridges[_bridge].burnerParams.timestamp = block.timestamp;\n  }\n\n  /**\n   * @notice Updates the current limit\n   *\n   * @param _limit The new limit\n   * @param _oldLimit The old limit\n   * @param _currentLimit The current limit\n   */\n\n  function _calculateNewCurrentLimit(\n    uint256 _limit,\n    uint256 _oldLimit,\n    uint256 _currentLimit\n  ) internal pure returns (uint256 _newCurrentLimit) {\n    uint256 _difference;\n\n    if (_oldLimit > _limit) {\n      _difference = _oldLimit - _limit;\n      _newCurrentLimit = _currentLimit > _difference ? _currentLimit - _difference : 0;\n    } else {\n      _difference = _limit - _oldLimit;\n      _newCurrentLimit = _currentLimit + _difference;\n    }\n  }\n\n  /**\n   * @notice Gets the current limit\n   *\n   * @param _currentLimit The current limit\n   * @param _maxLimit The max limit\n   * @param _timestamp The timestamp of the last update\n   * @param _ratePerSecond The rate per second\n   */\n\n  function _getCurrentLimit(\n    uint256 _currentLimit,\n    uint256 _maxLimit,\n    uint256 _timestamp,\n    uint256 _ratePerSecond\n  ) internal view returns (uint256 _limit) {\n    _limit = _currentLimit;\n    if (_limit == _maxLimit) {\n      return _limit;\n    } else if (_timestamp + _DURATION <= block.timestamp) {\n      _limit = _maxLimit;\n    } else if (_timestamp + _DURATION > block.timestamp) {\n      uint256 _timePassed = block.timestamp - _timestamp;\n      uint256 _calculatedLimit = _limit + (_timePassed * _ratePerSecond);\n      _limit = _calculatedLimit > _maxLimit ? _maxLimit : _calculatedLimit;\n    }\n  }\n}\n"},{"file_path":"src/CrossChainCanonicalBase.sol","source_code":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.11;\n\nimport {ERC20PermitUpgradeable} from \"../lib/openzeppelin-contracts-upgradeable/contracts/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol\";\nimport {OwnableUpgradeable} from \"../lib/openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol\";\nimport {ReentrancyGuardUpgradeable} from \"../lib/openzeppelin-contracts-upgradeable/contracts/security/ReentrancyGuardUpgradeable.sol\";\n\nimport {IllegalArgument, IllegalState} from \"./base/Errors.sol\";\n\nimport {TokenUtils} from \"./libraries/TokenUtils.sol\";\n\ncontract CrossChainCanonicalBase is ERC20PermitUpgradeable, ReentrancyGuardUpgradeable, OwnableUpgradeable {\n\n    // Constants for various precisions\n    uint256 private constant FEE_PRECISION = 1e6; // Okay to use constant declarations since compiler does not reserve a storage slot\n\n    /* ========== STATE VARIABLES ========== */\n\n    // Swap fee numerators, denominator of FEE_PRECISION\n    mapping(address => uint256[2]) public swapFees;\n    mapping(address => bool) public feeExempt;\n\n    // Acceptable old tokens\n    address[] public bridgeTokensArray; // Used for external UIs\n\n    // Administrative booleans\n    bool public exchangesPaused; // Pause old token exchanges in case of an emergency\n    mapping(address => bool) public bridgeTokenEnabled;\n\n    /// @notice The amount that each bridge is permitted to mint.\n    mapping(address => uint256) public mintCeiling;\n\n    /// @notice The amount of tokens that each bridge has already minted.\n    mapping(address => uint256) public totalMinted;\n\n    /* ========== MODIFIERS ========== */\n\n    modifier validBridgeToken(address tokenAddress) {\n        if (!bridgeTokenEnabled[tokenAddress]) {\n            revert IllegalState();\n        }\n        _;\n    }\n\n    /* ========== INITIALIZER ========== */\n\n    function __CrossChainCanonicalBase_init(\n        string memory _name,\n        string memory _symbol,\n        address _creatorAddress,\n        address[] memory _bridgeTokens,\n        uint256[] memory _mintCeilings\n    ) internal {\n        __Context_init_unchained();\n        __Ownable_init_unchained();\n        __EIP712_init_unchained(_name, \"1\");\n        __ERC20_init_unchained(_name, _symbol);\n        __ERC20Permit_init_unchained(_name);\n        __ReentrancyGuard_init_unchained(); // Note: this is called here but not in AlchemicTokenV2Base. Careful if inheriting that without this\n        _transferOwnership(_creatorAddress);\n\n        // Initialize the starting old tokens\n        for (uint256 i = 0; i < _bridgeTokens.length; ++i){ \n            // Add to the array\n            bridgeTokensArray.push(_bridgeTokens[i]);\n\n            // Set a small swap fee initially of 0.04%\n            swapFees[_bridgeTokens[i]] = [400, 400];\n\n            // Make sure swapping is on\n            bridgeTokenEnabled[_bridgeTokens[i]] = true;\n\n            // Set mint ceiling for each bridge\n            mintCeiling[_bridgeTokens[i]] = _mintCeilings[i];\n        }\n    }\n\n    /* ========== VIEWS ========== */\n\n    // Helpful for UIs\n    function allBridgeTokens() external view returns (address[] memory) {\n        return bridgeTokensArray;\n    }\n\n    function _isFeeExempt(address targetAddress) internal view returns (bool) {\n        return feeExempt[targetAddress];\n    }\n\n    /* ========== PUBLIC FUNCTIONS ========== */\n\n    // Exchange old tokens for these canonical tokens\n    function exchangeOldForCanonical(address bridgeTokenAddress, uint256 tokenAmount) external nonReentrant validBridgeToken(bridgeTokenAddress) returns (uint256 canonicalTokensOut) {\n        if (exchangesPaused) {\n            revert IllegalState();\n        }\n\n        if (!bridgeTokenEnabled[bridgeTokenAddress]) {\n            revert IllegalState();\n        }\n\n        // Check mint caps and adjust mint count\n        uint256 total = tokenAmount + totalMinted[bridgeTokenAddress];\n        if (total > mintCeiling[bridgeTokenAddress]) {\n            revert IllegalState();\n        }\n        totalMinted[bridgeTokenAddress] = total;\n\n        // Pull in the old tokens\n        TokenUtils.safeTransferFrom(bridgeTokenAddress, msg.sender, address(this), tokenAmount);\n\n        // Handle the fee, if applicable\n        canonicalTokensOut = tokenAmount;\n        if (!_isFeeExempt(msg.sender)) {\n            canonicalTokensOut -= ((canonicalTokensOut * swapFees[bridgeTokenAddress][0]) / FEE_PRECISION);\n        }\n\n        // Mint canonical tokens and give it to the sender\n        super._mint(msg.sender, canonicalTokensOut);\n    }\n\n    // Exchange canonical tokens for old tokens\n    function exchangeCanonicalForOld(address bridgeTokenAddress, uint256 tokenAmount) external nonReentrant validBridgeToken(bridgeTokenAddress) returns (uint256 bridgeTokensOut) {\n        if (exchangesPaused) {\n            revert IllegalState();\n        }\n\n        if (!bridgeTokenEnabled[bridgeTokenAddress]) {\n            revert IllegalState();\n        }\n\n        // Burn the canonical tokens\n        super._burn(msg.sender, tokenAmount);\n\n        // Handle the fee, if applicable\n        bridgeTokensOut = tokenAmount;\n        if (!_isFeeExempt(msg.sender)) {\n            bridgeTokensOut -= ((bridgeTokensOut * swapFees[bridgeTokenAddress][1]) / FEE_PRECISION);\n        }\n\n        // Update mint count\n        totalMinted[bridgeTokenAddress] -= tokenAmount;\n\n        // Give old tokens to the sender\n        TokenUtils.safeTransfer(bridgeTokenAddress, msg.sender, bridgeTokensOut);\n    }\n\n    /* ========== RESTRICTED FUNCTIONS, BUT CUSTODIAN CAN CALL TOO ========== */\n\n    function toggleExchanges() external onlyOwner {\n        exchangesPaused = !exchangesPaused;\n    }\n\n    /* ========== RESTRICTED FUNCTIONS ========== */\n\n    function addBridgeToken(address bridgeTokenAddress) external onlyOwner {\n        // Make sure the token is not already present\n        for (uint256 i = 0; i < bridgeTokensArray.length; ++i){ \n            if (bridgeTokensArray[i] == bridgeTokenAddress) {\n                revert IllegalState();\n            }\n        }\n\n        // Add the old token\n        bridgeTokensArray.push(bridgeTokenAddress);\n\n        // Turn swapping on\n        bridgeTokenEnabled[bridgeTokenAddress] = true;\n\n        emit BridgeTokenAdded(bridgeTokenAddress);\n    }\n\n    function setBridgeToken(address bridgeTokenAddress, bool enabled) external onlyOwner {\n        // Toggle swapping\n        bridgeTokenEnabled[bridgeTokenAddress] = enabled;\n\n        emit BridgeTokenSet(bridgeTokenAddress, enabled);\n    }\n\n    function setSwapFees(address bridgeTokenAddress, uint256 _bridgeToCanonical, uint256 _canonicalToOld) external onlyOwner {\n        if(_bridgeToCanonical >= FEE_PRECISION || _canonicalToOld >= FEE_PRECISION) {\n            revert IllegalArgument();\n        }\n        swapFees[bridgeTokenAddress] = [_bridgeToCanonical, _canonicalToOld];\n\n        emit SwapFeeSet(bridgeTokenAddress, _bridgeToCanonical, _canonicalToOld);\n    }\n\n    /// @notice Sets the maximum amount of tokens that `minter` is allowed to mint.\n    ///\n    /// @notice This function reverts if `msg.sender` is not an admin.\n    ///\n    /// @param minter  The address of the minter.\n    /// @param maximum The maximum amount of tokens that the minter is allowed to mint.\n    function setCeiling(address minter, uint256 maximum) external onlyOwner {\n        mintCeiling[minter] = maximum;\n    }\n\n    function toggleFeesForAddress(address targetAddress) external onlyOwner {\n        feeExempt[targetAddress] = !feeExempt[targetAddress];\n    }\n\n    function recoverERC20(address tokenAddress, uint256 tokenAmount) external onlyOwner {\n        if (tokenAddress == address(this)) {\n            revert IllegalArgument();\n        }\n\n        if (bridgeTokenEnabled[tokenAddress]) {\n            revert IllegalState();\n        }\n\n        TokenUtils.safeTransfer(address(tokenAddress), msg.sender, tokenAmount);\n    }\n\n    /* ========== EVENTS ========== */\n\n    event BridgeTokenAdded(address indexed bridgeTokenAddress);\n    event BridgeTokenSet(address indexed bridgeTokenAddress, bool state);\n    event SwapFeeSet(address indexed bridgeTokenAddress, uint256 bridgeToCanonical, uint256 canonicalToOld);\n}"},{"file_path":"src/base/Errors.sol","source_code":"pragma solidity ^0.8.13;\n\n/// @notice An error used to indicate that an action could not be completed because either the `msg.sender` or\n///         `msg.origin` is not authorized.\nerror Unauthorized();\n\n/// @notice An error used to indicate that an action could not be completed because the contract either already existed\n///         or entered an illegal condition which is not recoverable from.\nerror IllegalState();\n\n/// @notice An error used to indicate that an action could not be completed because of an illegal argument was passed\n///         to the function.\nerror IllegalArgument();"},{"file_path":"src/interfaces/IERC20Burnable.sol","source_code":"pragma solidity >=0.5.0;\n\nimport \"../../lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol\";\n\n/// @title  IERC20Burnable\n/// @author Alchemix Finance\ninterface IERC20Burnable is IERC20 {\n    /// @notice Burns `amount` tokens from the balance of `msg.sender`.\n    ///\n    /// @param amount The amount of tokens to burn.\n    ///\n    /// @return If burning the tokens was successful.\n    function burn(uint256 amount) external returns (bool);\n\n    /// @notice Burns `amount` tokens from `owner`'s balance.\n    ///\n    /// @param owner  The address to burn tokens from.\n    /// @param amount The amount of tokens to burn.\n    ///\n    /// @return If burning the tokens was successful.\n    function burnFrom(address owner, uint256 amount) external returns (bool);\n}\n"},{"file_path":"src/interfaces/IERC20Mintable.sol","source_code":"pragma solidity >=0.5.0;\n\nimport \"../../lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol\";\n\n/// @title  IERC20Mintable\n/// @author Alchemix Finance\ninterface IERC20Mintable is IERC20 {\n    /// @notice Mints `amount` tokens to `recipient`.\n    ///\n    /// @param recipient The address which will receive the minted tokens.\n    /// @param amount    The amount of tokens to mint.\n    function mint(address recipient, uint256 amount) external;\n}"},{"file_path":"src/interfaces/external/connext/IXERC20.sol","source_code":"// SPDX-License-Identifier: UNLICENSED\npragma solidity >=0.8.4 <0.9.0;\n\ninterface IXERC20 {\n  /**\n   * @notice Emits when a lockbox is set\n   *\n   * @param _lockbox The address of the lockbox\n   */\n\n  event LockboxSet(address _lockbox);\n\n  /**\n   * @notice Emits when a limit is set\n   *\n   * @param _mintingLimit The updated minting limit we are setting to the bridge\n   * @param _burningLimit The updated burning limit we are setting to the bridge\n   * @param _bridge The address of the bridge we are setting the limit too\n   */\n  event BridgeLimitsSet(uint256 _mintingLimit, uint256 _burningLimit, address indexed _bridge);\n\n  /**\n   * @notice Reverts when a user with too low of a limit tries to call mint/burn\n   */\n\n  error IXERC20_NotHighEnoughLimits();\n\n  /**\n   * @notice Reverts when caller is not the factory\n   */\n\n  error IXERC20_NotFactory();\n\n  /**\n   * @notice Contains the full minting and burning data for a particular bridge\n   *\n   * @param minterParams The minting parameters for the bridge\n   * @param burnerParams The burning parameters for the bridge\n   */\n  struct Bridge {\n    BridgeParameters minterParams;\n    BridgeParameters burnerParams;\n  }\n\n  /**\n   * @notice Contains the mint or burn parameters for a bridge\n   *\n   * @param timestamp The timestamp of the last mint/burn\n   * @param ratePerSecond The rate per second of the bridge\n   * @param maxLimit The max limit of the bridge\n   * @param currentLimit The current limit of the bridge\n   */\n  struct BridgeParameters {\n    uint256 timestamp;\n    uint256 ratePerSecond;\n    uint256 maxLimit;\n    uint256 currentLimit;\n  }\n\n  /**\n   * @notice Sets the lockbox address\n   *\n   * @param _lockbox The address of the lockbox\n   */\n\n  function setLockbox(address _lockbox) external;\n\n  /**\n   * @notice Updates the limits of any bridge\n   * @dev Can only be called by the owner\n   * @param _mintingLimit The updated minting limit we are setting to the bridge\n   * @param _burningLimit The updated burning limit we are setting to the bridge\n   * @param _bridge The address of the bridge we are setting the limits too\n   */\n  function setLimits(address _bridge, uint256 _mintingLimit, uint256 _burningLimit) external;\n\n  /**\n   * @notice Returns the max limit of a minter\n   *\n   * @param _minter The minter we are viewing the limits of\n   *  @return _limit The limit the minter has\n   */\n  function mintingMaxLimitOf(address _minter) external view returns (uint256 _limit);\n\n  /**\n   * @notice Returns the max limit of a bridge\n   *\n   * @param _bridge the bridge we are viewing the limits of\n   * @return _limit The limit the bridge has\n   */\n\n  function burningMaxLimitOf(address _bridge) external view returns (uint256 _limit);\n\n  /**\n   * @notice Returns the current limit of a minter\n   *\n   * @param _minter The minter we are viewing the limits of\n   * @return _limit The limit the minter has\n   */\n\n  function mintingCurrentLimitOf(address _minter) external view returns (uint256 _limit);\n\n  /**\n   * @notice Returns the current limit of a bridge\n   *\n   * @param _bridge the bridge we are viewing the limits of\n   * @return _limit The limit the bridge has\n   */\n\n  function burningCurrentLimitOf(address _bridge) external view returns (uint256 _limit);\n\n  /**\n   * @notice Mints tokens for a user\n   * @dev Can only be called by a minter\n   * @param _user The address of the user who needs tokens minted\n   * @param _amount The amount of tokens being minted\n   */\n\n  function mint(address _user, uint256 _amount) external;\n\n  /**\n   * @notice Burns tokens for a user\n   * @dev Can only be called by a minter\n   * @param _user The address of the user who needs tokens burned\n   * @param _amount The amount of tokens being burned\n   */\n\n  function burn(address _user, uint256 _amount) external;\n}"},{"file_path":"src/libraries/TokenUtils.sol","source_code":"pragma solidity ^0.8.13;\n\nimport \"../../lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol\";\nimport \"../../lib/openzeppelin-contracts/contracts/token/ERC20/extensions/IERC20Metadata.sol\";\nimport \"../interfaces/IERC20Burnable.sol\";\nimport \"../interfaces/IERC20Mintable.sol\";\n\n/// @title  TokenUtils\n/// @author Alchemix Finance\nlibrary TokenUtils {\n    /// @notice An error used to indicate that a call to an ERC20 contract failed.\n    ///\n    /// @param target  The target address.\n    /// @param success If the call to the token was a success.\n    /// @param data    The resulting data from the call. This is error data when the call was not a success. Otherwise,\n    ///                this is malformed data when the call was a success.\n    error ERC20CallFailed(address target, bool success, bytes data);\n\n    /// @dev A safe function to get the decimals of an ERC20 token.\n    ///\n    /// @dev Reverts with a {CallFailed} error if execution of the query fails or returns an unexpected value.\n    ///\n    /// @param token The target token.\n    ///\n    /// @return The amount of decimals of the token.\n    function expectDecimals(address token) internal view returns (uint8) {\n        (bool success, bytes memory data) = token.staticcall(\n            abi.encodeWithSelector(IERC20Metadata.decimals.selector)\n        );\n\n        if (token.code.length == 0 || !success || data.length < 32) {\n            revert ERC20CallFailed(token, success, data);\n        }\n\n        return abi.decode(data, (uint8));\n    }\n\n    /// @dev Gets the balance of tokens held by an account.\n    ///\n    /// @dev Reverts with a {CallFailed} error if execution of the query fails or returns an unexpected value.\n    ///\n    /// @param token   The token to check the balance of.\n    /// @param account The address of the token holder.\n    ///\n    /// @return The balance of the tokens held by an account.\n    function safeBalanceOf(address token, address account) internal view returns (uint256) {\n        (bool success, bytes memory data) = token.staticcall(\n            abi.encodeWithSelector(IERC20.balanceOf.selector, account)\n        );\n\n        if (token.code.length == 0 || !success || data.length < 32) {\n            revert ERC20CallFailed(token, success, data);\n        }\n\n        return abi.decode(data, (uint256));\n    }\n\n    /// @dev Transfers tokens to another address.\n    ///\n    /// @dev Reverts with a {CallFailed} error if execution of the transfer failed or returns an unexpected value.\n    ///\n    /// @param token     The token to transfer.\n    /// @param recipient The address of the recipient.\n    /// @param amount    The amount of tokens to transfer.\n    function safeTransfer(address token, address recipient, uint256 amount) internal {\n        (bool success, bytes memory data) = token.call(\n            abi.encodeWithSelector(IERC20.transfer.selector, recipient, amount)\n        );\n\n        if (token.code.length == 0 || !success || (data.length != 0 && !abi.decode(data, (bool)))) {\n            revert ERC20CallFailed(token, success, data);\n        }\n    }\n\n    /// @dev Approves tokens for the smart contract.\n    ///\n    /// @dev Reverts with a {CallFailed} error if execution of the approval fails or returns an unexpected value.\n    ///\n    /// @param token   The token to approve.\n    /// @param spender The contract to spend the tokens.\n    /// @param value   The amount of tokens to approve.\n    function safeApprove(address token, address spender, uint256 value) internal {\n        (bool success, bytes memory data) = token.call(\n            abi.encodeWithSelector(IERC20.approve.selector, spender, value)\n        );\n\n        if (token.code.length == 0 || !success || (data.length != 0 && !abi.decode(data, (bool)))) {\n            revert ERC20CallFailed(token, success, data);\n        }\n    }\n\n    /// @dev Transfer tokens from one address to another address.\n    ///\n    /// @dev Reverts with a {CallFailed} error if execution of the transfer fails or returns an unexpected value.\n    ///\n    /// @param token     The token to transfer.\n    /// @param owner     The address of the owner.\n    /// @param recipient The address of the recipient.\n    /// @param amount    The amount of tokens to transfer.\n    function safeTransferFrom(address token, address owner, address recipient, uint256 amount) internal {\n        (bool success, bytes memory data) = token.call(\n            abi.encodeWithSelector(IERC20.transferFrom.selector, owner, recipient, amount)\n        );\n\n        if (token.code.length == 0 || !success || (data.length != 0 && !abi.decode(data, (bool)))) {\n            revert ERC20CallFailed(token, success, data);\n        }\n    }\n\n    /// @dev Mints tokens to an address.\n    ///\n    /// @dev Reverts with a {CallFailed} error if execution of the mint fails or returns an unexpected value.\n    ///\n    /// @param token     The token to mint.\n    /// @param recipient The address of the recipient.\n    /// @param amount    The amount of tokens to mint.\n    function safeMint(address token, address recipient, uint256 amount) internal {\n        (bool success, bytes memory data) = token.call(\n            abi.encodeWithSelector(IERC20Mintable.mint.selector, recipient, amount)\n        );\n\n        if (token.code.length == 0 || !success || (data.length != 0 && !abi.decode(data, (bool)))) {\n            revert ERC20CallFailed(token, success, data);\n        }\n    }\n\n    /// @dev Burns tokens.\n    ///\n    /// Reverts with a `CallFailed` error if execution of the burn fails or returns an unexpected value.\n    ///\n    /// @param token  The token to burn.\n    /// @param amount The amount of tokens to burn.\n    function safeBurn(address token, uint256 amount) internal {\n        (bool success, bytes memory data) = token.call(\n            abi.encodeWithSelector(IERC20Burnable.burn.selector, amount)\n        );\n\n        if (token.code.length == 0 || !success || (data.length != 0 && !abi.decode(data, (bool)))) {\n            revert ERC20CallFailed(token, success, data);\n        }\n    }\n\n    /// @dev Burns tokens from its total supply.\n    ///\n    /// @dev Reverts with a {CallFailed} error if execution of the burn fails or returns an unexpected value.\n    ///\n    /// @param token  The token to burn.\n    /// @param owner  The owner of the tokens.\n    /// @param amount The amount of tokens to burn.\n    function safeBurnFrom(address token, address owner, uint256 amount) internal {\n        (bool success, bytes memory data) = token.call(\n            abi.encodeWithSelector(IERC20Burnable.burnFrom.selector, owner, amount)\n        );\n\n        if (token.code.length == 0 || !success || (data.length != 0 && !abi.decode(data, (bool)))) {\n            revert ERC20CallFailed(token, success, data);\n        }\n    }\n}\n"}],"certified":false,"conflicting_implementations":null,"abi":[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"target","type":"address"},{"internalType":"bool","name":"success","type":"bool"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"ERC20CallFailed","type":"error"},{"inputs":[],"name":"IXERC20_NotHighEnoughLimits","type":"error"},{"inputs":[],"name":"IllegalArgument","type":"error"},{"inputs":[],"name":"IllegalState","type":"error"},{"inputs":[],"name":"Unauthorized","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_mintingLimit","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_burningLimit","type":"uint256"},{"indexed":true,"internalType":"address","name":"_bridge","type":"address"}],"name":"BridgeLimitsSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"bridgeTokenAddress","type":"address"}],"name":"BridgeTokenAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"bridgeTokenAddress","type":"address"},{"indexed":false,"internalType":"bool","name":"state","type":"bool"}],"name":"BridgeTokenSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","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":"minter","type":"address"},{"indexed":false,"internalType":"bool","name":"state","type":"bool"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"fee","type":"uint256"}],"name":"SetFlashMintFee","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"maxFlashLoan","type":"uint256"}],"name":"SetMaxFlashLoan","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"bridgeTokenAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"bridgeToCanonical","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"canonicalToOld","type":"uint256"}],"name":"SwapFeeSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"BPS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"CALLBACK_SUCCESS","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SENTINEL_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"bridgeTokenAddress","type":"address"}],"name":"addBridgeToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"allBridgeTokens","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"bridgeTokenEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"bridgeTokensArray","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burnFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_bridge","type":"address"}],"name":"burningCurrentLimitOf","outputs":[{"internalType":"uint256","name":"_limit","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_bridge","type":"address"}],"name":"burningMaxLimitOf","outputs":[{"internalType":"uint256","name":"_limit","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"bridgeTokenAddress","type":"address"},{"internalType":"uint256","name":"tokenAmount","type":"uint256"}],"name":"exchangeCanonicalForOld","outputs":[{"internalType":"uint256","name":"bridgeTokensOut","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"bridgeTokenAddress","type":"address"},{"internalType":"uint256","name":"tokenAmount","type":"uint256"}],"name":"exchangeOldForCanonical","outputs":[{"internalType":"uint256","name":"canonicalTokensOut","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"exchangesPaused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"feeExempt","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"flashFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC3156FlashBorrower","name":"receiver","type":"address"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"flashLoan","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"flashMintFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"address[]","name":"_bridgeTokens","type":"address[]"},{"internalType":"uint256[]","name":"_mintCeilings","type":"uint256[]"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"maxFlashLoan","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxFlashLoanAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"mintCeiling","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_bridge","type":"address"}],"name":"mintingCurrentLimitOf","outputs":[{"internalType":"uint256","name":"_limit","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_bridge","type":"address"}],"name":"mintingMaxLimitOf","outputs":[{"internalType":"uint256","name":"_limit","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"minter","type":"address"},{"internalType":"bool","name":"state","type":"bool"}],"name":"pauseMinter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"permit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"tokenAmount","type":"uint256"}],"name":"recoverERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"bridgeTokenAddress","type":"address"},{"internalType":"bool","name":"enabled","type":"bool"}],"name":"setBridgeToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"minter","type":"address"},{"internalType":"uint256","name":"maximum","type":"uint256"}],"name":"setCeiling","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newFee","type":"uint256"}],"name":"setFlashFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_bridge","type":"address"},{"internalType":"uint256","name":"_mintingLimit","type":"uint256"},{"internalType":"uint256","name":"_burningLimit","type":"uint256"}],"name":"setLimits","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxFlashLoanAmount","type":"uint256"}],"name":"setMaxFlashLoan","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sentinel","type":"address"}],"name":"setSentinel","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"bridgeTokenAddress","type":"address"},{"internalType":"uint256","name":"_bridgeToCanonical","type":"uint256"},{"internalType":"uint256","name":"_canonicalToOld","type":"uint256"}],"name":"setSwapFees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"minter","type":"address"},{"internalType":"bool","name":"state","type":"bool"}],"name":"setWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"swapFees","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"toggleExchanges","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"targetAddress","type":"address"}],"name":"toggleFeesForAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"totalMinted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"whitelisted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"xBridges","outputs":[{"components":[{"internalType":"uint256","name":"timestamp","type":"uint256"},{"internalType":"uint256","name":"ratePerSecond","type":"uint256"},{"internalType":"uint256","name":"maxLimit","type":"uint256"},{"internalType":"uint256","name":"currentLimit","type":"uint256"}],"internalType":"struct IXERC20.BridgeParameters","name":"minterParams","type":"tuple"},{"components":[{"internalType":"uint256","name":"timestamp","type":"uint256"},{"internalType":"uint256","name":"ratePerSecond","type":"uint256"},{"internalType":"uint256","name":"maxLimit","type":"uint256"},{"internalType":"uint256","name":"currentLimit","type":"uint256"}],"internalType":"struct IXERC20.BridgeParameters","name":"burnerParams","type":"tuple"}],"stateMutability":"view","type":"function"}],"is_changed_bytecode":false,"is_partially_verified":false,"constructor_args":null}