{"matchId":"29370688","creationMatch":"exact_match","runtimeMatch":"exact_match","verifiedAt":"2026-05-20T17:51:09Z","creationBytecode":{"onchainBytecode":"0x60c03461015f57601f611de438819003918201601f19168301916001600160401b03831184841017610164578084926101609460405283398101031261015f576100488161017a565b906100556020820161017a565b9060408101516060820151608083015160a084015160c08501519160e0860151936101008701519561014061012089015198015198331561014957600080546040519c9133906001600160a01b038316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a36001600160a81b0319163360ff60a01b19161760005560805260a052600155600255600355600455600555600655600755600855600d55611c55908161018f823960805181818161052f0152818161099401528181610b9a01528181610ef4015281816112740152611436015260a0518181816101f70152610a340152f35b631e4fbdf760e01b600052600060045260246000fd5b600080fd5b634e487b7160e01b600052604160045260246000fd5b51906001600160a01b038216820361015f5756fe608080604052600436101561001357600080fd5b60003560e01c908163013cf08b146115c45750806301ea83ea1461092357806302a251a3146115a65780630507377e146114d45780630a300b09146113f65780630a542fa7146113a85780630d9b22261461137c5780631a35c6021461135e57806325c33e1314611310578063287a66c9146112345780633bec7f5b146112165780633e4f49e6146111e75780633f4ba83a1461117857806341b3d1851461115a578063428548b81461110c578063470b762214610e7657806347ee3b95146109b85780634cf088d914610974578063544ffc9c146109235780635c975abb146108fd57806366666aa9146108df57806366a78e6c146108c15780636f7af91f14610873578063715018a61461080d57806382328ffc146107ef5780638456cb591461078f5780638da5cb5b146107685780638fcc9cfb1461071a57806391e71e26146106cc578063a60c117c14610658578063ae169a50146104a7578063b6a1cb2b14610459578063ba16d6001461043b578063bd149d711461041d578063d301c89d146103f5578063dd2fc2b014610327578063ea0217cf146102d9578063f2fde38b14610243578063f3d1202d146102205763f5be257d146101d757600080fd5b3461021b57600036600319011261021b5760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b600080fd5b3461021b57600036600319011261021b57602061023b611957565b604051908152f35b3461021b57602036600319011261021b576001600160a01b0361026461171f565b61026c611a00565b1680156102c3576001600160a01b036000548273ffffffffffffffffffffffffffffffffffffffff19821617600055167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3005b631e4fbdf760e01b600052600060045260246000fd5b3461021b57602036600319011261021b576004356102f5611a00565b806001556040519081527fb425f2f96d1b8d8416bf9a28254b80398b92febc9cc90ec2c147e704385e577b60203392a2005b3461021b57604036600319011261021b576024356001600160a01b038116810361021b57604090600082805161035c81611674565b8281528260208201520152600435600052600c602052600382600020016001600160a01b036000921682526020522060405161039781611674565b60ff8254169060038210156103df57606092828252604060ff600260018401549360208601948552015416920191151582526040519283525160208301525115156040820152f35b634e487b7160e01b600052602160045260246000fd5b3461021b57602036600319011261021b576020610413600435611909565b6040519015158152f35b3461021b57600036600319011261021b576020600854604051908152f35b3461021b57600036600319011261021b576020600654604051908152f35b3461021b57602036600319011261021b57600435610475611a00565b806006556040519081527f4bbac275695f9391c6b8166c70b337feb1adcbd278175a119aaf59dce5ffe49060203392a2005b3461021b57602036600319011261021b576004356104c3611998565b80600052600b602052604060002081600052600c60205260406000206001600160a01b0333166000526003810160205261050560406000208092848633611a95565b9390918415610613576105fc575b506105e8575b506040516368bfce9960e01b81526020816004817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa9081156105dc5761057f9183916000916105ad575b506001600160a01b03339116611a29565b6040519081527ff01da32686223933d8a18a391060918c7f11a3648639edd87ae013e2e273174360203392a3005b6105cf915060203d6020116105d5575b6105c781836116a6565b810190611742565b8561056e565b503d6105bd565b6040513d6000823e3d90fd5b600201805460ff1916600117905582610519565b600160a01b60ff60a01b1982541617905584610513565b60405162461bcd60e51b815260206004820152601360248201527f6e6f20636c61696d61626c6520616d6f756e74000000000000000000000000006044820152606490fd5b3461021b57604036600319011261021b5760606106b561067661171f565b60243580600052600b602052604060002081600052600c6020526040600020916001600160a01b03841660005260038301602052604060002093611a95565b906040519215158352151560208301526040820152f35b3461021b57602036600319011261021b576004356106e8611a00565b806008556040519081527f9d45ce5169732da6af34329ae6e425c283cdad15df3263a3200b9e0e1191ee5260203392a2005b3461021b57602036600319011261021b57600435610736611a00565b806004556040519081527f0f48d517989455cd80ed52427e80553e66f9b69fd5cee8e26bd1a1f9c364fba660203392a2005b3461021b57600036600319011261021b5760206001600160a01b0360005416604051908152f35b3461021b57600036600319011261021b576107a8611a00565b6107b0611998565b600160a01b60ff60a01b1960005416176000557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586020604051338152a1005b3461021b57600036600319011261021b576020600554604051908152f35b3461021b57600036600319011261021b57610826611a00565b60006001600160a01b03815473ffffffffffffffffffffffffffffffffffffffff1981168355167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b3461021b57602036600319011261021b5760043561088f611a00565b806002556040519081527f1f8d3c40deb0ed6be05c1490c226e6d0b0f23cab543f975fae8c3a615d49eed360203392a2005b3461021b57600036600319011261021b576020600754604051908152f35b3461021b57600036600319011261021b576020600954604051908152f35b3461021b57600036600319011261021b57602060ff60005460a01c166040519015158152f35b3461021b57602036600319011261021b57600435600052600c6020526040600020805461097060026001840154930154604051938493846040919493926060820195825260208201520152565b0390f35b3461021b57600036600319011261021b5760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b3461021b57608036600319011261021b5760243560043560443567ffffffffffffffff811161021b576109ef9036906004016116c8565b60643567ffffffffffffffff811161021b57610a0f9036906004016116c8565b90610a18611998565b6040516331a9108f60e11b8152600481018490526020816024817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa9081156105dc57600091610e57575b506001600160a01b0333911603610e1257610a8783611909565b610dcd576004548410610d8857600d546000198114610d2d576001019283600d5583600052600b602052604060002067ffffffffffffffff815460a81c16610d43573373ffffffffffffffffffffffffffffffffffffffff19825416178155610aef42611a60565b90610afb600154611a60565b9067ffffffffffffffff808416921682019267ffffffffffffffff8411610d2d5781547fffffff0000000000000000ffffffffffffffffffffffffffffffffffffffffff1660a89190911b7cffffffffffffffff0000000000000000000000000000000000000000001617815560018101805467ffffffffffffffff191667ffffffffffffffff94909416938417905560405163bf9befb160e01b81527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031691602082600481865afa80156105dc578a92600091610cef575b506020939282610c2492600260049a95015560025489820155600354600582015560085460068201556003610c19610c12611957565b9384611735565b910155600954611761565b600955600052600a825287604060002055604051948580926368bfce9960e01b82525afa9687156105dc57610cb88795610c9b610cc79360209b7fd8ddd70cf5ecd6d6017ed4145b845744e8a96f0800df501d124d1b4ddf56a2a998600091610cd2575b5030906001600160a01b033391166119b8565b60405194859485528a8501526080604085015260808401906118c8565b828103606084015233966118c8565b0390a3604051908152f35b610ce991508d3d8f116105d5576105c781836116a6565b8d610c88565b93925050946020833d602011610d25575b81610d0d602093836116a6565b8101031261021b579151919490918991906020610bdc565b3d9150610d00565b634e487b7160e01b600052601160045260246000fd5b60405162461bcd60e51b815260206004820152601760248201527f70726f706f73616c20616c7265616479206578697374730000000000000000006044820152606490fd5b60405162461bcd60e51b815260206004820152601260248201527f6465706f736974206e6f7420656e6f75676800000000000000000000000000006044820152606490fd5b60405162461bcd60e51b815260206004820152600a60248201527f4e465420696e20757365000000000000000000000000000000000000000000006044820152606490fd5b60405162461bcd60e51b815260206004820152600d60248201527f6e6f74204e4654206f776e6572000000000000000000000000000000000000006044820152606490fd5b610e70915060203d6020116105d5576105c781836116a6565b85610a6d565b3461021b57606036600319011261021b576004356024359060ff821680920361021b5760443567ffffffffffffffff811161021b57610eb99036906004016116c8565b90610ec2611998565b610ecb8161176e565b60058110156103df576110c7576040516303d3b32360e51b8152336004820152916020836024817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa9283156105dc57600093611090575b5081600052600c6020526040600020604060006001600160a01b033316815260038301602052209060018201805461104b57859187610fcf57610f71838254611735565b90555b5560038510156103df576020947fb8e138887d0aa13bab447e82de9d5c1777041ecd21ca36ba824ff1e6c07ddda4918160ff1982541617905560405190815284868201526060604082015280610cc7339460608301906118c8565b60018803610fec57600101610fe5838254611735565b9055610f74565b915060028703611006576002869201610fe5838254611735565b60405162461bcd60e51b815260206004820152601f60248201527f696e76616c69642076616c756520666f7220656e756d20566f746554797065006044820152606490fd5b60405162461bcd60e51b815260206004820152601160248201527f766f746520616c726561647920636173740000000000000000000000000000006044820152606490fd5b90926020823d6020116110bf575b816110ab602093836116a6565b810103126110bc5750519184610f2d565b80fd5b3d915061109e565b60405162461bcd60e51b815260206004820152600f60248201527f766f7465206e6f742061637469766500000000000000000000000000000000006044820152606490fd5b3461021b57602036600319011261021b57600435611128611a00565b806003556040519081527fbafdea067f81b214052ed0f40d39cd7d056ec2cb017f6b575f9addc4a54abe6360203392a2005b3461021b57600036600319011261021b576020600454604051908152f35b3461021b57600036600319011261021b57611191611a00565b60005460ff8160a01c16156111d65760ff60a01b19166000557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6020604051338152a1005b638dfc202b60e01b60005260046000fd5b3461021b57602036600319011261021b5761120360043561176e565b60405160058210156103df576020918152f35b3461021b57600036600319011261021b576020600254604051908152f35b3461021b57602036600319011261021b57600435611250611a00565b61125c81600954611761565b6009556040516368bfce9960e01b81526020816004817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa9081156105dc576112c39183916000916112f157506001600160a01b03339116611a29565b6040519081527ff157e68e2245c70cbc79c5da7477f57616bf886825f65d57b9ff756847672e7b60203392a2005b61130a915060203d6020116105d5576105c781836116a6565b8461056e565b3461021b57602036600319011261021b5760043561132c611a00565b806007556040519081527fbc32502cec79c9838d553dcb8fbff010442b820c0648512429a9b8fdcda05d5860203392a2005b3461021b57600036600319011261021b576020600354604051908152f35b3461021b57602036600319011261021b57600435600052600a6020526020604060002054604051908152f35b3461021b57602036600319011261021b576004356113c4611a00565b806005556040519081527f01e1bd213446551b865be02b533d852d27c7d7ba6a95013ddcd85d9146fe5a7760203392a2005b3461021b57602036600319011261021b57600435611412611998565b61141e81600954611735565b6009556040516368bfce9960e01b81526020816004817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa9081156105dc576114879183916000916114b5575030906001600160a01b033391166119b8565b6040519081527fc8b1cd545919a25e3c6ccfef8cd44d97376832801c6a7c7bbefdb3cee824edd860203392a2005b6114ce915060203d6020116105d5576105c781836116a6565b84610c88565b3461021b57602036600319011261021b576004356114f0611998565b80600052600b60205260406000206115078261176e565b60058110156103df576003036115615760038160076115369301600160ff198254161790550154600954611735565b600955337fddd8ea0b68d501f3fec76e2e93b695c2a332f0099b4e6290a0c75c51ec8063f7600080a3005b60405162461bcd60e51b815260206004820152601460248201527f6e6f7420696e76616c69642070726f706f73616c0000000000000000000000006044820152606490fd5b3461021b57600036600319011261021b576020600154604051908152f35b3461021b57602036600319011261021b5761014090600435600052600b602052604060002080549067ffffffffffffffff6001820154166002820154600383015460048401549160058501549367ffffffffffffffff60ff6007600689015498015416976001600160a01b0381168a5260ff8160a01c16151560208b015260a81c1660408901526060880152608087015260a086015260c085015260e08401526101008301521515610120820152f35b6060810190811067ffffffffffffffff82111761169057604052565b634e487b7160e01b600052604160045260246000fd5b90601f8019910116810190811067ffffffffffffffff82111761169057604052565b81601f8201121561021b5780359067ffffffffffffffff821161169057604051926116fd601f8401601f1916602001856116a6565b8284526020838301011161021b57816000926020809301838601378301015290565b600435906001600160a01b038216820361021b57565b91908201809211610d2d57565b9081602091031261021b57516001600160a01b038116810361021b5790565b91908203918211610d2d57565b80600052600b60205260ff600760406000200154166118c25780600052600b60205267ffffffffffffffff60406000205460a81c161561187d5780600052600b60205267ffffffffffffffff600160406000200154164211156118775780600052600b602052604060002081600052600c60205261271061181c61180b604060002060026118028254600184015490611735565b91015490611735565b926004600282015491015490611944565b04116118715780600052600b602052604060002090600052600c60205261271061186060406000209260056118576001860154809654611735565b91015490611944565b04111561186c57600190565b600290565b50600390565b50600090565b60405162461bcd60e51b815260206004820152601360248201527f756e6b6e6f776e2070726f706f73616c204944000000000000000000000000006044820152606490fd5b50600490565b919082519283825260005b8481106118f4575050826000602080949584010152601f8019910116010190565b806020809284010151828286010152016118d3565b600052600a602052604060002054806119225750600090565b61192b9061176e565b60058110156103df571561193f5738611877565b600190565b81810292918115918404141715610d2d57565b6009546006549081811061198d576119756127109160055490611944565b0490600754808311611992575080821061198d575090565b905090565b91505090565b60ff60005460a01c166119a757565b63d93c066560e01b60005260046000fd5b9091926001600160a01b036119fe9481604051956323b872dd60e01b60208801521660248601521660448401526064830152606482526119f96084836116a6565b611bc7565b565b6001600160a01b03600054163303611a1457565b63118cdaa760e01b6000523360045260246000fd5b6119fe926001600160a01b036040519363a9059cbb60e01b60208601521660248401526044830152604482526119f96064836116a6565b67ffffffffffffffff8111611a7c5767ffffffffffffffff1690565b6306dfcc6560e41b600052604060045260245260446000fd5b94929190936001600160a01b03825496166001600160a01b038716149460018201549182151597611ac6899361176e565b60058110156103df5760028114159081611bbb575b50611bad57879081611b9f575b50611b925781611b83575b50611b7857611b25611b3891611b20612710611b186006600388015497015487611944565b048095611761565b611944565b9260026118026001830154835490611735565b8015611b62578492048094611b4f575b5050929190565b611b5a929450611735565b913880611b48565b634e487b7160e01b600052601260045260246000fd5b505050909190600090565b60ff9150600201541638611af3565b5050505050909190600090565b60ff915060a01c1638611ae8565b505050505050909190600090565b60019150141538611adb565b906000602091828151910182855af1156105dc576000513d611c1657506001600160a01b0381163b155b611bf85750565b6001600160a01b0390635274afe760e01b6000521660045260246000fd5b60011415611bf156fea26469706673582212209f8ee8846f8ac19a7edb2820c438d9aeb25dc03d9936fa3761b4b03f1e1a059d64736f6c634300081d0033000000000000000000000000a31f6b577704b4622d2ba63f6aa1b7e92fe8c8a900000000000000000000000057b81c140bdfd35dbfbb395360a66d54a650666d00000000000000000000000000000000000000000000000000000000000697800000000000000000000000000000000000000000000000000000000000001a0a0000000000000000000000000000000000000000000000000000000000001a0a000000000000000000000000000000000000000000000000429d069189e0000000000000000000000000000000000000000000000000000000000000000001e00000000000000000000000000000000000000000000000029a2241af62c0000000000000000000000000000000000000000000000000001a055690d9db80000000000000000000000000000000000000000000000000000000000000000001e000000000000000000000000000000000000000000000000000000000000000a5","recompiledBytecode":"0x60c03461015f57601f611de438819003918201601f19168301916001600160401b03831184841017610164578084926101609460405283398101031261015f576100488161017a565b906100556020820161017a565b9060408101516060820151608083015160a084015160c08501519160e0860151936101008701519561014061012089015198015198331561014957600080546040519c9133906001600160a01b038316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a36001600160a81b0319163360ff60a01b19161760005560805260a052600155600255600355600455600555600655600755600855600d55611c55908161018f823960805181818161052f0152818161099401528181610b9a01528181610ef4015281816112740152611436015260a0518181816101f70152610a340152f35b631e4fbdf760e01b600052600060045260246000fd5b600080fd5b634e487b7160e01b600052604160045260246000fd5b51906001600160a01b038216820361015f5756fe608080604052600436101561001357600080fd5b60003560e01c908163013cf08b146115c45750806301ea83ea1461092357806302a251a3146115a65780630507377e146114d45780630a300b09146113f65780630a542fa7146113a85780630d9b22261461137c5780631a35c6021461135e57806325c33e1314611310578063287a66c9146112345780633bec7f5b146112165780633e4f49e6146111e75780633f4ba83a1461117857806341b3d1851461115a578063428548b81461110c578063470b762214610e7657806347ee3b95146109b85780634cf088d914610974578063544ffc9c146109235780635c975abb146108fd57806366666aa9146108df57806366a78e6c146108c15780636f7af91f14610873578063715018a61461080d57806382328ffc146107ef5780638456cb591461078f5780638da5cb5b146107685780638fcc9cfb1461071a57806391e71e26146106cc578063a60c117c14610658578063ae169a50146104a7578063b6a1cb2b14610459578063ba16d6001461043b578063bd149d711461041d578063d301c89d146103f5578063dd2fc2b014610327578063ea0217cf146102d9578063f2fde38b14610243578063f3d1202d146102205763f5be257d146101d757600080fd5b3461021b57600036600319011261021b5760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b600080fd5b3461021b57600036600319011261021b57602061023b611957565b604051908152f35b3461021b57602036600319011261021b576001600160a01b0361026461171f565b61026c611a00565b1680156102c3576001600160a01b036000548273ffffffffffffffffffffffffffffffffffffffff19821617600055167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3005b631e4fbdf760e01b600052600060045260246000fd5b3461021b57602036600319011261021b576004356102f5611a00565b806001556040519081527fb425f2f96d1b8d8416bf9a28254b80398b92febc9cc90ec2c147e704385e577b60203392a2005b3461021b57604036600319011261021b576024356001600160a01b038116810361021b57604090600082805161035c81611674565b8281528260208201520152600435600052600c602052600382600020016001600160a01b036000921682526020522060405161039781611674565b60ff8254169060038210156103df57606092828252604060ff600260018401549360208601948552015416920191151582526040519283525160208301525115156040820152f35b634e487b7160e01b600052602160045260246000fd5b3461021b57602036600319011261021b576020610413600435611909565b6040519015158152f35b3461021b57600036600319011261021b576020600854604051908152f35b3461021b57600036600319011261021b576020600654604051908152f35b3461021b57602036600319011261021b57600435610475611a00565b806006556040519081527f4bbac275695f9391c6b8166c70b337feb1adcbd278175a119aaf59dce5ffe49060203392a2005b3461021b57602036600319011261021b576004356104c3611998565b80600052600b602052604060002081600052600c60205260406000206001600160a01b0333166000526003810160205261050560406000208092848633611a95565b9390918415610613576105fc575b506105e8575b506040516368bfce9960e01b81526020816004817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa9081156105dc5761057f9183916000916105ad575b506001600160a01b03339116611a29565b6040519081527ff01da32686223933d8a18a391060918c7f11a3648639edd87ae013e2e273174360203392a3005b6105cf915060203d6020116105d5575b6105c781836116a6565b810190611742565b8561056e565b503d6105bd565b6040513d6000823e3d90fd5b600201805460ff1916600117905582610519565b600160a01b60ff60a01b1982541617905584610513565b60405162461bcd60e51b815260206004820152601360248201527f6e6f20636c61696d61626c6520616d6f756e74000000000000000000000000006044820152606490fd5b3461021b57604036600319011261021b5760606106b561067661171f565b60243580600052600b602052604060002081600052600c6020526040600020916001600160a01b03841660005260038301602052604060002093611a95565b906040519215158352151560208301526040820152f35b3461021b57602036600319011261021b576004356106e8611a00565b806008556040519081527f9d45ce5169732da6af34329ae6e425c283cdad15df3263a3200b9e0e1191ee5260203392a2005b3461021b57602036600319011261021b57600435610736611a00565b806004556040519081527f0f48d517989455cd80ed52427e80553e66f9b69fd5cee8e26bd1a1f9c364fba660203392a2005b3461021b57600036600319011261021b5760206001600160a01b0360005416604051908152f35b3461021b57600036600319011261021b576107a8611a00565b6107b0611998565b600160a01b60ff60a01b1960005416176000557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586020604051338152a1005b3461021b57600036600319011261021b576020600554604051908152f35b3461021b57600036600319011261021b57610826611a00565b60006001600160a01b03815473ffffffffffffffffffffffffffffffffffffffff1981168355167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b3461021b57602036600319011261021b5760043561088f611a00565b806002556040519081527f1f8d3c40deb0ed6be05c1490c226e6d0b0f23cab543f975fae8c3a615d49eed360203392a2005b3461021b57600036600319011261021b576020600754604051908152f35b3461021b57600036600319011261021b576020600954604051908152f35b3461021b57600036600319011261021b57602060ff60005460a01c166040519015158152f35b3461021b57602036600319011261021b57600435600052600c6020526040600020805461097060026001840154930154604051938493846040919493926060820195825260208201520152565b0390f35b3461021b57600036600319011261021b5760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b3461021b57608036600319011261021b5760243560043560443567ffffffffffffffff811161021b576109ef9036906004016116c8565b60643567ffffffffffffffff811161021b57610a0f9036906004016116c8565b90610a18611998565b6040516331a9108f60e11b8152600481018490526020816024817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa9081156105dc57600091610e57575b506001600160a01b0333911603610e1257610a8783611909565b610dcd576004548410610d8857600d546000198114610d2d576001019283600d5583600052600b602052604060002067ffffffffffffffff815460a81c16610d43573373ffffffffffffffffffffffffffffffffffffffff19825416178155610aef42611a60565b90610afb600154611a60565b9067ffffffffffffffff808416921682019267ffffffffffffffff8411610d2d5781547fffffff0000000000000000ffffffffffffffffffffffffffffffffffffffffff1660a89190911b7cffffffffffffffff0000000000000000000000000000000000000000001617815560018101805467ffffffffffffffff191667ffffffffffffffff94909416938417905560405163bf9befb160e01b81527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031691602082600481865afa80156105dc578a92600091610cef575b506020939282610c2492600260049a95015560025489820155600354600582015560085460068201556003610c19610c12611957565b9384611735565b910155600954611761565b600955600052600a825287604060002055604051948580926368bfce9960e01b82525afa9687156105dc57610cb88795610c9b610cc79360209b7fd8ddd70cf5ecd6d6017ed4145b845744e8a96f0800df501d124d1b4ddf56a2a998600091610cd2575b5030906001600160a01b033391166119b8565b60405194859485528a8501526080604085015260808401906118c8565b828103606084015233966118c8565b0390a3604051908152f35b610ce991508d3d8f116105d5576105c781836116a6565b8d610c88565b93925050946020833d602011610d25575b81610d0d602093836116a6565b8101031261021b579151919490918991906020610bdc565b3d9150610d00565b634e487b7160e01b600052601160045260246000fd5b60405162461bcd60e51b815260206004820152601760248201527f70726f706f73616c20616c7265616479206578697374730000000000000000006044820152606490fd5b60405162461bcd60e51b815260206004820152601260248201527f6465706f736974206e6f7420656e6f75676800000000000000000000000000006044820152606490fd5b60405162461bcd60e51b815260206004820152600a60248201527f4e465420696e20757365000000000000000000000000000000000000000000006044820152606490fd5b60405162461bcd60e51b815260206004820152600d60248201527f6e6f74204e4654206f776e6572000000000000000000000000000000000000006044820152606490fd5b610e70915060203d6020116105d5576105c781836116a6565b85610a6d565b3461021b57606036600319011261021b576004356024359060ff821680920361021b5760443567ffffffffffffffff811161021b57610eb99036906004016116c8565b90610ec2611998565b610ecb8161176e565b60058110156103df576110c7576040516303d3b32360e51b8152336004820152916020836024817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa9283156105dc57600093611090575b5081600052600c6020526040600020604060006001600160a01b033316815260038301602052209060018201805461104b57859187610fcf57610f71838254611735565b90555b5560038510156103df576020947fb8e138887d0aa13bab447e82de9d5c1777041ecd21ca36ba824ff1e6c07ddda4918160ff1982541617905560405190815284868201526060604082015280610cc7339460608301906118c8565b60018803610fec57600101610fe5838254611735565b9055610f74565b915060028703611006576002869201610fe5838254611735565b60405162461bcd60e51b815260206004820152601f60248201527f696e76616c69642076616c756520666f7220656e756d20566f746554797065006044820152606490fd5b60405162461bcd60e51b815260206004820152601160248201527f766f746520616c726561647920636173740000000000000000000000000000006044820152606490fd5b90926020823d6020116110bf575b816110ab602093836116a6565b810103126110bc5750519184610f2d565b80fd5b3d915061109e565b60405162461bcd60e51b815260206004820152600f60248201527f766f7465206e6f742061637469766500000000000000000000000000000000006044820152606490fd5b3461021b57602036600319011261021b57600435611128611a00565b806003556040519081527fbafdea067f81b214052ed0f40d39cd7d056ec2cb017f6b575f9addc4a54abe6360203392a2005b3461021b57600036600319011261021b576020600454604051908152f35b3461021b57600036600319011261021b57611191611a00565b60005460ff8160a01c16156111d65760ff60a01b19166000557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6020604051338152a1005b638dfc202b60e01b60005260046000fd5b3461021b57602036600319011261021b5761120360043561176e565b60405160058210156103df576020918152f35b3461021b57600036600319011261021b576020600254604051908152f35b3461021b57602036600319011261021b57600435611250611a00565b61125c81600954611761565b6009556040516368bfce9960e01b81526020816004817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa9081156105dc576112c39183916000916112f157506001600160a01b03339116611a29565b6040519081527ff157e68e2245c70cbc79c5da7477f57616bf886825f65d57b9ff756847672e7b60203392a2005b61130a915060203d6020116105d5576105c781836116a6565b8461056e565b3461021b57602036600319011261021b5760043561132c611a00565b806007556040519081527fbc32502cec79c9838d553dcb8fbff010442b820c0648512429a9b8fdcda05d5860203392a2005b3461021b57600036600319011261021b576020600354604051908152f35b3461021b57602036600319011261021b57600435600052600a6020526020604060002054604051908152f35b3461021b57602036600319011261021b576004356113c4611a00565b806005556040519081527f01e1bd213446551b865be02b533d852d27c7d7ba6a95013ddcd85d9146fe5a7760203392a2005b3461021b57602036600319011261021b57600435611412611998565b61141e81600954611735565b6009556040516368bfce9960e01b81526020816004817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa9081156105dc576114879183916000916114b5575030906001600160a01b033391166119b8565b6040519081527fc8b1cd545919a25e3c6ccfef8cd44d97376832801c6a7c7bbefdb3cee824edd860203392a2005b6114ce915060203d6020116105d5576105c781836116a6565b84610c88565b3461021b57602036600319011261021b576004356114f0611998565b80600052600b60205260406000206115078261176e565b60058110156103df576003036115615760038160076115369301600160ff198254161790550154600954611735565b600955337fddd8ea0b68d501f3fec76e2e93b695c2a332f0099b4e6290a0c75c51ec8063f7600080a3005b60405162461bcd60e51b815260206004820152601460248201527f6e6f7420696e76616c69642070726f706f73616c0000000000000000000000006044820152606490fd5b3461021b57600036600319011261021b576020600154604051908152f35b3461021b57602036600319011261021b5761014090600435600052600b602052604060002080549067ffffffffffffffff6001820154166002820154600383015460048401549160058501549367ffffffffffffffff60ff6007600689015498015416976001600160a01b0381168a5260ff8160a01c16151560208b015260a81c1660408901526060880152608087015260a086015260c085015260e08401526101008301521515610120820152f35b6060810190811067ffffffffffffffff82111761169057604052565b634e487b7160e01b600052604160045260246000fd5b90601f8019910116810190811067ffffffffffffffff82111761169057604052565b81601f8201121561021b5780359067ffffffffffffffff821161169057604051926116fd601f8401601f1916602001856116a6565b8284526020838301011161021b57816000926020809301838601378301015290565b600435906001600160a01b038216820361021b57565b91908201809211610d2d57565b9081602091031261021b57516001600160a01b038116810361021b5790565b91908203918211610d2d57565b80600052600b60205260ff600760406000200154166118c25780600052600b60205267ffffffffffffffff60406000205460a81c161561187d5780600052600b60205267ffffffffffffffff600160406000200154164211156118775780600052600b602052604060002081600052600c60205261271061181c61180b604060002060026118028254600184015490611735565b91015490611735565b926004600282015491015490611944565b04116118715780600052600b602052604060002090600052600c60205261271061186060406000209260056118576001860154809654611735565b91015490611944565b04111561186c57600190565b600290565b50600390565b50600090565b60405162461bcd60e51b815260206004820152601360248201527f756e6b6e6f776e2070726f706f73616c204944000000000000000000000000006044820152606490fd5b50600490565b919082519283825260005b8481106118f4575050826000602080949584010152601f8019910116010190565b806020809284010151828286010152016118d3565b600052600a602052604060002054806119225750600090565b61192b9061176e565b60058110156103df571561193f5738611877565b600190565b81810292918115918404141715610d2d57565b6009546006549081811061198d576119756127109160055490611944565b0490600754808311611992575080821061198d575090565b905090565b91505090565b60ff60005460a01c166119a757565b63d93c066560e01b60005260046000fd5b9091926001600160a01b036119fe9481604051956323b872dd60e01b60208801521660248601521660448401526064830152606482526119f96084836116a6565b611bc7565b565b6001600160a01b03600054163303611a1457565b63118cdaa760e01b6000523360045260246000fd5b6119fe926001600160a01b036040519363a9059cbb60e01b60208601521660248401526044830152604482526119f96064836116a6565b67ffffffffffffffff8111611a7c5767ffffffffffffffff1690565b6306dfcc6560e41b600052604060045260245260446000fd5b94929190936001600160a01b03825496166001600160a01b038716149460018201549182151597611ac6899361176e565b60058110156103df5760028114159081611bbb575b50611bad57879081611b9f575b50611b925781611b83575b50611b7857611b25611b3891611b20612710611b186006600388015497015487611944565b048095611761565b611944565b9260026118026001830154835490611735565b8015611b62578492048094611b4f575b5050929190565b611b5a929450611735565b913880611b48565b634e487b7160e01b600052601260045260246000fd5b505050909190600090565b60ff9150600201541638611af3565b5050505050909190600090565b60ff915060a01c1638611ae8565b505050505050909190600090565b60019150141538611adb565b906000602091828151910182855af1156105dc576000513d611c1657506001600160a01b0381163b155b611bf85750565b6001600160a01b0390635274afe760e01b6000521660045260246000fd5b60011415611bf156fea26469706673582212209f8ee8846f8ac19a7edb2820c438d9aeb25dc03d9936fa3761b4b03f1e1a059d64736f6c634300081d0033","sourceMap":"935:20584:11:-:0;;;;;;;;;;;;;-1:-1:-1;;935:20584:11;;;;-1:-1:-1;;;;;935:20584:11;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6124:10;;1273:26:0;1269:95;;-1:-1:-1;935:20584:11;;;;;;6124:10;;-1:-1:-1;;;;;935:20584:11;;;3052:40:0;;-1:-1:-1;3052:40:0;-1:-1:-1;;;;;;935:20584:11;6124:10;-1:-1:-1;;;;935:20584:11;;-1:-1:-1;935:20584:11;;6146:18;935:20584;6174:18;935:20584;;6240:40;935:20584;6290:44;935:20584;6344:24;935:20584;6378:22;935:20584;6410:22;935:20584;6442:22;935:20584;6474:38;935:20584;6522:36;935:20584;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1269:95:0;1322:31;;;-1:-1:-1;1322:31:0;-1:-1:-1;1322:31:0;935:20584:11;;-1:-1:-1;1322:31:0;935:20584:11;-1:-1:-1;935:20584:11;;;;;;-1:-1:-1;935:20584:11;;;;;-1:-1:-1;935:20584:11;;;;-1:-1:-1;;;;;935:20584:11;;;;;;:::o","linkReferences":{},"cborAuxdata":{"1":{"value":"0xa26469706673582212209f8ee8846f8ac19a7edb2820c438d9aeb25dc03d9936fa3761b4b03f1e1a059d64736f6c634300081d0033","offset":7599}},"transformations":[{"type":"insert","offset":7652,"reason":"constructorArguments"}],"transformationValues":{"constructorArguments":"0x000000000000000000000000a31f6b577704b4622d2ba63f6aa1b7e92fe8c8a900000000000000000000000057b81c140bdfd35dbfbb395360a66d54a650666d00000000000000000000000000000000000000000000000000000000000697800000000000000000000000000000000000000000000000000000000000001a0a0000000000000000000000000000000000000000000000000000000000001a0a000000000000000000000000000000000000000000000000429d069189e0000000000000000000000000000000000000000000000000000000000000000001e00000000000000000000000000000000000000000000000029a2241af62c0000000000000000000000000000000000000000000000000001a055690d9db80000000000000000000000000000000000000000000000000000000000000000001e000000000000000000000000000000000000000000000000000000000000000a5"}},"runtimeBytecode":{"onchainBytecode":"0x608080604052600436101561001357600080fd5b60003560e01c908163013cf08b146115c45750806301ea83ea1461092357806302a251a3146115a65780630507377e146114d45780630a300b09146113f65780630a542fa7146113a85780630d9b22261461137c5780631a35c6021461135e57806325c33e1314611310578063287a66c9146112345780633bec7f5b146112165780633e4f49e6146111e75780633f4ba83a1461117857806341b3d1851461115a578063428548b81461110c578063470b762214610e7657806347ee3b95146109b85780634cf088d914610974578063544ffc9c146109235780635c975abb146108fd57806366666aa9146108df57806366a78e6c146108c15780636f7af91f14610873578063715018a61461080d57806382328ffc146107ef5780638456cb591461078f5780638da5cb5b146107685780638fcc9cfb1461071a57806391e71e26146106cc578063a60c117c14610658578063ae169a50146104a7578063b6a1cb2b14610459578063ba16d6001461043b578063bd149d711461041d578063d301c89d146103f5578063dd2fc2b014610327578063ea0217cf146102d9578063f2fde38b14610243578063f3d1202d146102205763f5be257d146101d757600080fd5b3461021b57600036600319011261021b5760206040516001600160a01b037f00000000000000000000000057b81c140bdfd35dbfbb395360a66d54a650666d168152f35b600080fd5b3461021b57600036600319011261021b57602061023b611957565b604051908152f35b3461021b57602036600319011261021b576001600160a01b0361026461171f565b61026c611a00565b1680156102c3576001600160a01b036000548273ffffffffffffffffffffffffffffffffffffffff19821617600055167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3005b631e4fbdf760e01b600052600060045260246000fd5b3461021b57602036600319011261021b576004356102f5611a00565b806001556040519081527fb425f2f96d1b8d8416bf9a28254b80398b92febc9cc90ec2c147e704385e577b60203392a2005b3461021b57604036600319011261021b576024356001600160a01b038116810361021b57604090600082805161035c81611674565b8281528260208201520152600435600052600c602052600382600020016001600160a01b036000921682526020522060405161039781611674565b60ff8254169060038210156103df57606092828252604060ff600260018401549360208601948552015416920191151582526040519283525160208301525115156040820152f35b634e487b7160e01b600052602160045260246000fd5b3461021b57602036600319011261021b576020610413600435611909565b6040519015158152f35b3461021b57600036600319011261021b576020600854604051908152f35b3461021b57600036600319011261021b576020600654604051908152f35b3461021b57602036600319011261021b57600435610475611a00565b806006556040519081527f4bbac275695f9391c6b8166c70b337feb1adcbd278175a119aaf59dce5ffe49060203392a2005b3461021b57602036600319011261021b576004356104c3611998565b80600052600b602052604060002081600052600c60205260406000206001600160a01b0333166000526003810160205261050560406000208092848633611a95565b9390918415610613576105fc575b506105e8575b506040516368bfce9960e01b81526020816004817f000000000000000000000000a31f6b577704b4622d2ba63f6aa1b7e92fe8c8a96001600160a01b03165afa9081156105dc5761057f9183916000916105ad575b506001600160a01b03339116611a29565b6040519081527ff01da32686223933d8a18a391060918c7f11a3648639edd87ae013e2e273174360203392a3005b6105cf915060203d6020116105d5575b6105c781836116a6565b810190611742565b8561056e565b503d6105bd565b6040513d6000823e3d90fd5b600201805460ff1916600117905582610519565b600160a01b60ff60a01b1982541617905584610513565b60405162461bcd60e51b815260206004820152601360248201527f6e6f20636c61696d61626c6520616d6f756e74000000000000000000000000006044820152606490fd5b3461021b57604036600319011261021b5760606106b561067661171f565b60243580600052600b602052604060002081600052600c6020526040600020916001600160a01b03841660005260038301602052604060002093611a95565b906040519215158352151560208301526040820152f35b3461021b57602036600319011261021b576004356106e8611a00565b806008556040519081527f9d45ce5169732da6af34329ae6e425c283cdad15df3263a3200b9e0e1191ee5260203392a2005b3461021b57602036600319011261021b57600435610736611a00565b806004556040519081527f0f48d517989455cd80ed52427e80553e66f9b69fd5cee8e26bd1a1f9c364fba660203392a2005b3461021b57600036600319011261021b5760206001600160a01b0360005416604051908152f35b3461021b57600036600319011261021b576107a8611a00565b6107b0611998565b600160a01b60ff60a01b1960005416176000557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586020604051338152a1005b3461021b57600036600319011261021b576020600554604051908152f35b3461021b57600036600319011261021b57610826611a00565b60006001600160a01b03815473ffffffffffffffffffffffffffffffffffffffff1981168355167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b3461021b57602036600319011261021b5760043561088f611a00565b806002556040519081527f1f8d3c40deb0ed6be05c1490c226e6d0b0f23cab543f975fae8c3a615d49eed360203392a2005b3461021b57600036600319011261021b576020600754604051908152f35b3461021b57600036600319011261021b576020600954604051908152f35b3461021b57600036600319011261021b57602060ff60005460a01c166040519015158152f35b3461021b57602036600319011261021b57600435600052600c6020526040600020805461097060026001840154930154604051938493846040919493926060820195825260208201520152565b0390f35b3461021b57600036600319011261021b5760206040516001600160a01b037f000000000000000000000000a31f6b577704b4622d2ba63f6aa1b7e92fe8c8a9168152f35b3461021b57608036600319011261021b5760243560043560443567ffffffffffffffff811161021b576109ef9036906004016116c8565b60643567ffffffffffffffff811161021b57610a0f9036906004016116c8565b90610a18611998565b6040516331a9108f60e11b8152600481018490526020816024817f00000000000000000000000057b81c140bdfd35dbfbb395360a66d54a650666d6001600160a01b03165afa9081156105dc57600091610e57575b506001600160a01b0333911603610e1257610a8783611909565b610dcd576004548410610d8857600d546000198114610d2d576001019283600d5583600052600b602052604060002067ffffffffffffffff815460a81c16610d43573373ffffffffffffffffffffffffffffffffffffffff19825416178155610aef42611a60565b90610afb600154611a60565b9067ffffffffffffffff808416921682019267ffffffffffffffff8411610d2d5781547fffffff0000000000000000ffffffffffffffffffffffffffffffffffffffffff1660a89190911b7cffffffffffffffff0000000000000000000000000000000000000000001617815560018101805467ffffffffffffffff191667ffffffffffffffff94909416938417905560405163bf9befb160e01b81527f000000000000000000000000a31f6b577704b4622d2ba63f6aa1b7e92fe8c8a96001600160a01b031691602082600481865afa80156105dc578a92600091610cef575b506020939282610c2492600260049a95015560025489820155600354600582015560085460068201556003610c19610c12611957565b9384611735565b910155600954611761565b600955600052600a825287604060002055604051948580926368bfce9960e01b82525afa9687156105dc57610cb88795610c9b610cc79360209b7fd8ddd70cf5ecd6d6017ed4145b845744e8a96f0800df501d124d1b4ddf56a2a998600091610cd2575b5030906001600160a01b033391166119b8565b60405194859485528a8501526080604085015260808401906118c8565b828103606084015233966118c8565b0390a3604051908152f35b610ce991508d3d8f116105d5576105c781836116a6565b8d610c88565b93925050946020833d602011610d25575b81610d0d602093836116a6565b8101031261021b579151919490918991906020610bdc565b3d9150610d00565b634e487b7160e01b600052601160045260246000fd5b60405162461bcd60e51b815260206004820152601760248201527f70726f706f73616c20616c7265616479206578697374730000000000000000006044820152606490fd5b60405162461bcd60e51b815260206004820152601260248201527f6465706f736974206e6f7420656e6f75676800000000000000000000000000006044820152606490fd5b60405162461bcd60e51b815260206004820152600a60248201527f4e465420696e20757365000000000000000000000000000000000000000000006044820152606490fd5b60405162461bcd60e51b815260206004820152600d60248201527f6e6f74204e4654206f776e6572000000000000000000000000000000000000006044820152606490fd5b610e70915060203d6020116105d5576105c781836116a6565b85610a6d565b3461021b57606036600319011261021b576004356024359060ff821680920361021b5760443567ffffffffffffffff811161021b57610eb99036906004016116c8565b90610ec2611998565b610ecb8161176e565b60058110156103df576110c7576040516303d3b32360e51b8152336004820152916020836024817f000000000000000000000000a31f6b577704b4622d2ba63f6aa1b7e92fe8c8a96001600160a01b03165afa9283156105dc57600093611090575b5081600052600c6020526040600020604060006001600160a01b033316815260038301602052209060018201805461104b57859187610fcf57610f71838254611735565b90555b5560038510156103df576020947fb8e138887d0aa13bab447e82de9d5c1777041ecd21ca36ba824ff1e6c07ddda4918160ff1982541617905560405190815284868201526060604082015280610cc7339460608301906118c8565b60018803610fec57600101610fe5838254611735565b9055610f74565b915060028703611006576002869201610fe5838254611735565b60405162461bcd60e51b815260206004820152601f60248201527f696e76616c69642076616c756520666f7220656e756d20566f746554797065006044820152606490fd5b60405162461bcd60e51b815260206004820152601160248201527f766f746520616c726561647920636173740000000000000000000000000000006044820152606490fd5b90926020823d6020116110bf575b816110ab602093836116a6565b810103126110bc5750519184610f2d565b80fd5b3d915061109e565b60405162461bcd60e51b815260206004820152600f60248201527f766f7465206e6f742061637469766500000000000000000000000000000000006044820152606490fd5b3461021b57602036600319011261021b57600435611128611a00565b806003556040519081527fbafdea067f81b214052ed0f40d39cd7d056ec2cb017f6b575f9addc4a54abe6360203392a2005b3461021b57600036600319011261021b576020600454604051908152f35b3461021b57600036600319011261021b57611191611a00565b60005460ff8160a01c16156111d65760ff60a01b19166000557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6020604051338152a1005b638dfc202b60e01b60005260046000fd5b3461021b57602036600319011261021b5761120360043561176e565b60405160058210156103df576020918152f35b3461021b57600036600319011261021b576020600254604051908152f35b3461021b57602036600319011261021b57600435611250611a00565b61125c81600954611761565b6009556040516368bfce9960e01b81526020816004817f000000000000000000000000a31f6b577704b4622d2ba63f6aa1b7e92fe8c8a96001600160a01b03165afa9081156105dc576112c39183916000916112f157506001600160a01b03339116611a29565b6040519081527ff157e68e2245c70cbc79c5da7477f57616bf886825f65d57b9ff756847672e7b60203392a2005b61130a915060203d6020116105d5576105c781836116a6565b8461056e565b3461021b57602036600319011261021b5760043561132c611a00565b806007556040519081527fbc32502cec79c9838d553dcb8fbff010442b820c0648512429a9b8fdcda05d5860203392a2005b3461021b57600036600319011261021b576020600354604051908152f35b3461021b57602036600319011261021b57600435600052600a6020526020604060002054604051908152f35b3461021b57602036600319011261021b576004356113c4611a00565b806005556040519081527f01e1bd213446551b865be02b533d852d27c7d7ba6a95013ddcd85d9146fe5a7760203392a2005b3461021b57602036600319011261021b57600435611412611998565b61141e81600954611735565b6009556040516368bfce9960e01b81526020816004817f000000000000000000000000a31f6b577704b4622d2ba63f6aa1b7e92fe8c8a96001600160a01b03165afa9081156105dc576114879183916000916114b5575030906001600160a01b033391166119b8565b6040519081527fc8b1cd545919a25e3c6ccfef8cd44d97376832801c6a7c7bbefdb3cee824edd860203392a2005b6114ce915060203d6020116105d5576105c781836116a6565b84610c88565b3461021b57602036600319011261021b576004356114f0611998565b80600052600b60205260406000206115078261176e565b60058110156103df576003036115615760038160076115369301600160ff198254161790550154600954611735565b600955337fddd8ea0b68d501f3fec76e2e93b695c2a332f0099b4e6290a0c75c51ec8063f7600080a3005b60405162461bcd60e51b815260206004820152601460248201527f6e6f7420696e76616c69642070726f706f73616c0000000000000000000000006044820152606490fd5b3461021b57600036600319011261021b576020600154604051908152f35b3461021b57602036600319011261021b5761014090600435600052600b602052604060002080549067ffffffffffffffff6001820154166002820154600383015460048401549160058501549367ffffffffffffffff60ff6007600689015498015416976001600160a01b0381168a5260ff8160a01c16151560208b015260a81c1660408901526060880152608087015260a086015260c085015260e08401526101008301521515610120820152f35b6060810190811067ffffffffffffffff82111761169057604052565b634e487b7160e01b600052604160045260246000fd5b90601f8019910116810190811067ffffffffffffffff82111761169057604052565b81601f8201121561021b5780359067ffffffffffffffff821161169057604051926116fd601f8401601f1916602001856116a6565b8284526020838301011161021b57816000926020809301838601378301015290565b600435906001600160a01b038216820361021b57565b91908201809211610d2d57565b9081602091031261021b57516001600160a01b038116810361021b5790565b91908203918211610d2d57565b80600052600b60205260ff600760406000200154166118c25780600052600b60205267ffffffffffffffff60406000205460a81c161561187d5780600052600b60205267ffffffffffffffff600160406000200154164211156118775780600052600b602052604060002081600052600c60205261271061181c61180b604060002060026118028254600184015490611735565b91015490611735565b926004600282015491015490611944565b04116118715780600052600b602052604060002090600052600c60205261271061186060406000209260056118576001860154809654611735565b91015490611944565b04111561186c57600190565b600290565b50600390565b50600090565b60405162461bcd60e51b815260206004820152601360248201527f756e6b6e6f776e2070726f706f73616c204944000000000000000000000000006044820152606490fd5b50600490565b919082519283825260005b8481106118f4575050826000602080949584010152601f8019910116010190565b806020809284010151828286010152016118d3565b600052600a602052604060002054806119225750600090565b61192b9061176e565b60058110156103df571561193f5738611877565b600190565b81810292918115918404141715610d2d57565b6009546006549081811061198d576119756127109160055490611944565b0490600754808311611992575080821061198d575090565b905090565b91505090565b60ff60005460a01c166119a757565b63d93c066560e01b60005260046000fd5b9091926001600160a01b036119fe9481604051956323b872dd60e01b60208801521660248601521660448401526064830152606482526119f96084836116a6565b611bc7565b565b6001600160a01b03600054163303611a1457565b63118cdaa760e01b6000523360045260246000fd5b6119fe926001600160a01b036040519363a9059cbb60e01b60208601521660248401526044830152604482526119f96064836116a6565b67ffffffffffffffff8111611a7c5767ffffffffffffffff1690565b6306dfcc6560e41b600052604060045260245260446000fd5b94929190936001600160a01b03825496166001600160a01b038716149460018201549182151597611ac6899361176e565b60058110156103df5760028114159081611bbb575b50611bad57879081611b9f575b50611b925781611b83575b50611b7857611b25611b3891611b20612710611b186006600388015497015487611944565b048095611761565b611944565b9260026118026001830154835490611735565b8015611b62578492048094611b4f575b5050929190565b611b5a929450611735565b913880611b48565b634e487b7160e01b600052601260045260246000fd5b505050909190600090565b60ff9150600201541638611af3565b5050505050909190600090565b60ff915060a01c1638611ae8565b505050505050909190600090565b60019150141538611adb565b906000602091828151910182855af1156105dc576000513d611c1657506001600160a01b0381163b155b611bf85750565b6001600160a01b0390635274afe760e01b6000521660045260246000fd5b60011415611bf156fea26469706673582212209f8ee8846f8ac19a7edb2820c438d9aeb25dc03d9936fa3761b4b03f1e1a059d64736f6c634300081d0033","recompiledBytecode":"0x608080604052600436101561001357600080fd5b60003560e01c908163013cf08b146115c45750806301ea83ea1461092357806302a251a3146115a65780630507377e146114d45780630a300b09146113f65780630a542fa7146113a85780630d9b22261461137c5780631a35c6021461135e57806325c33e1314611310578063287a66c9146112345780633bec7f5b146112165780633e4f49e6146111e75780633f4ba83a1461117857806341b3d1851461115a578063428548b81461110c578063470b762214610e7657806347ee3b95146109b85780634cf088d914610974578063544ffc9c146109235780635c975abb146108fd57806366666aa9146108df57806366a78e6c146108c15780636f7af91f14610873578063715018a61461080d57806382328ffc146107ef5780638456cb591461078f5780638da5cb5b146107685780638fcc9cfb1461071a57806391e71e26146106cc578063a60c117c14610658578063ae169a50146104a7578063b6a1cb2b14610459578063ba16d6001461043b578063bd149d711461041d578063d301c89d146103f5578063dd2fc2b014610327578063ea0217cf146102d9578063f2fde38b14610243578063f3d1202d146102205763f5be257d146101d757600080fd5b3461021b57600036600319011261021b5760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b600080fd5b3461021b57600036600319011261021b57602061023b611957565b604051908152f35b3461021b57602036600319011261021b576001600160a01b0361026461171f565b61026c611a00565b1680156102c3576001600160a01b036000548273ffffffffffffffffffffffffffffffffffffffff19821617600055167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3005b631e4fbdf760e01b600052600060045260246000fd5b3461021b57602036600319011261021b576004356102f5611a00565b806001556040519081527fb425f2f96d1b8d8416bf9a28254b80398b92febc9cc90ec2c147e704385e577b60203392a2005b3461021b57604036600319011261021b576024356001600160a01b038116810361021b57604090600082805161035c81611674565b8281528260208201520152600435600052600c602052600382600020016001600160a01b036000921682526020522060405161039781611674565b60ff8254169060038210156103df57606092828252604060ff600260018401549360208601948552015416920191151582526040519283525160208301525115156040820152f35b634e487b7160e01b600052602160045260246000fd5b3461021b57602036600319011261021b576020610413600435611909565b6040519015158152f35b3461021b57600036600319011261021b576020600854604051908152f35b3461021b57600036600319011261021b576020600654604051908152f35b3461021b57602036600319011261021b57600435610475611a00565b806006556040519081527f4bbac275695f9391c6b8166c70b337feb1adcbd278175a119aaf59dce5ffe49060203392a2005b3461021b57602036600319011261021b576004356104c3611998565b80600052600b602052604060002081600052600c60205260406000206001600160a01b0333166000526003810160205261050560406000208092848633611a95565b9390918415610613576105fc575b506105e8575b506040516368bfce9960e01b81526020816004817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa9081156105dc5761057f9183916000916105ad575b506001600160a01b03339116611a29565b6040519081527ff01da32686223933d8a18a391060918c7f11a3648639edd87ae013e2e273174360203392a3005b6105cf915060203d6020116105d5575b6105c781836116a6565b810190611742565b8561056e565b503d6105bd565b6040513d6000823e3d90fd5b600201805460ff1916600117905582610519565b600160a01b60ff60a01b1982541617905584610513565b60405162461bcd60e51b815260206004820152601360248201527f6e6f20636c61696d61626c6520616d6f756e74000000000000000000000000006044820152606490fd5b3461021b57604036600319011261021b5760606106b561067661171f565b60243580600052600b602052604060002081600052600c6020526040600020916001600160a01b03841660005260038301602052604060002093611a95565b906040519215158352151560208301526040820152f35b3461021b57602036600319011261021b576004356106e8611a00565b806008556040519081527f9d45ce5169732da6af34329ae6e425c283cdad15df3263a3200b9e0e1191ee5260203392a2005b3461021b57602036600319011261021b57600435610736611a00565b806004556040519081527f0f48d517989455cd80ed52427e80553e66f9b69fd5cee8e26bd1a1f9c364fba660203392a2005b3461021b57600036600319011261021b5760206001600160a01b0360005416604051908152f35b3461021b57600036600319011261021b576107a8611a00565b6107b0611998565b600160a01b60ff60a01b1960005416176000557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586020604051338152a1005b3461021b57600036600319011261021b576020600554604051908152f35b3461021b57600036600319011261021b57610826611a00565b60006001600160a01b03815473ffffffffffffffffffffffffffffffffffffffff1981168355167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b3461021b57602036600319011261021b5760043561088f611a00565b806002556040519081527f1f8d3c40deb0ed6be05c1490c226e6d0b0f23cab543f975fae8c3a615d49eed360203392a2005b3461021b57600036600319011261021b576020600754604051908152f35b3461021b57600036600319011261021b576020600954604051908152f35b3461021b57600036600319011261021b57602060ff60005460a01c166040519015158152f35b3461021b57602036600319011261021b57600435600052600c6020526040600020805461097060026001840154930154604051938493846040919493926060820195825260208201520152565b0390f35b3461021b57600036600319011261021b5760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b3461021b57608036600319011261021b5760243560043560443567ffffffffffffffff811161021b576109ef9036906004016116c8565b60643567ffffffffffffffff811161021b57610a0f9036906004016116c8565b90610a18611998565b6040516331a9108f60e11b8152600481018490526020816024817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa9081156105dc57600091610e57575b506001600160a01b0333911603610e1257610a8783611909565b610dcd576004548410610d8857600d546000198114610d2d576001019283600d5583600052600b602052604060002067ffffffffffffffff815460a81c16610d43573373ffffffffffffffffffffffffffffffffffffffff19825416178155610aef42611a60565b90610afb600154611a60565b9067ffffffffffffffff808416921682019267ffffffffffffffff8411610d2d5781547fffffff0000000000000000ffffffffffffffffffffffffffffffffffffffffff1660a89190911b7cffffffffffffffff0000000000000000000000000000000000000000001617815560018101805467ffffffffffffffff191667ffffffffffffffff94909416938417905560405163bf9befb160e01b81527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031691602082600481865afa80156105dc578a92600091610cef575b506020939282610c2492600260049a95015560025489820155600354600582015560085460068201556003610c19610c12611957565b9384611735565b910155600954611761565b600955600052600a825287604060002055604051948580926368bfce9960e01b82525afa9687156105dc57610cb88795610c9b610cc79360209b7fd8ddd70cf5ecd6d6017ed4145b845744e8a96f0800df501d124d1b4ddf56a2a998600091610cd2575b5030906001600160a01b033391166119b8565b60405194859485528a8501526080604085015260808401906118c8565b828103606084015233966118c8565b0390a3604051908152f35b610ce991508d3d8f116105d5576105c781836116a6565b8d610c88565b93925050946020833d602011610d25575b81610d0d602093836116a6565b8101031261021b579151919490918991906020610bdc565b3d9150610d00565b634e487b7160e01b600052601160045260246000fd5b60405162461bcd60e51b815260206004820152601760248201527f70726f706f73616c20616c7265616479206578697374730000000000000000006044820152606490fd5b60405162461bcd60e51b815260206004820152601260248201527f6465706f736974206e6f7420656e6f75676800000000000000000000000000006044820152606490fd5b60405162461bcd60e51b815260206004820152600a60248201527f4e465420696e20757365000000000000000000000000000000000000000000006044820152606490fd5b60405162461bcd60e51b815260206004820152600d60248201527f6e6f74204e4654206f776e6572000000000000000000000000000000000000006044820152606490fd5b610e70915060203d6020116105d5576105c781836116a6565b85610a6d565b3461021b57606036600319011261021b576004356024359060ff821680920361021b5760443567ffffffffffffffff811161021b57610eb99036906004016116c8565b90610ec2611998565b610ecb8161176e565b60058110156103df576110c7576040516303d3b32360e51b8152336004820152916020836024817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa9283156105dc57600093611090575b5081600052600c6020526040600020604060006001600160a01b033316815260038301602052209060018201805461104b57859187610fcf57610f71838254611735565b90555b5560038510156103df576020947fb8e138887d0aa13bab447e82de9d5c1777041ecd21ca36ba824ff1e6c07ddda4918160ff1982541617905560405190815284868201526060604082015280610cc7339460608301906118c8565b60018803610fec57600101610fe5838254611735565b9055610f74565b915060028703611006576002869201610fe5838254611735565b60405162461bcd60e51b815260206004820152601f60248201527f696e76616c69642076616c756520666f7220656e756d20566f746554797065006044820152606490fd5b60405162461bcd60e51b815260206004820152601160248201527f766f746520616c726561647920636173740000000000000000000000000000006044820152606490fd5b90926020823d6020116110bf575b816110ab602093836116a6565b810103126110bc5750519184610f2d565b80fd5b3d915061109e565b60405162461bcd60e51b815260206004820152600f60248201527f766f7465206e6f742061637469766500000000000000000000000000000000006044820152606490fd5b3461021b57602036600319011261021b57600435611128611a00565b806003556040519081527fbafdea067f81b214052ed0f40d39cd7d056ec2cb017f6b575f9addc4a54abe6360203392a2005b3461021b57600036600319011261021b576020600454604051908152f35b3461021b57600036600319011261021b57611191611a00565b60005460ff8160a01c16156111d65760ff60a01b19166000557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6020604051338152a1005b638dfc202b60e01b60005260046000fd5b3461021b57602036600319011261021b5761120360043561176e565b60405160058210156103df576020918152f35b3461021b57600036600319011261021b576020600254604051908152f35b3461021b57602036600319011261021b57600435611250611a00565b61125c81600954611761565b6009556040516368bfce9960e01b81526020816004817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa9081156105dc576112c39183916000916112f157506001600160a01b03339116611a29565b6040519081527ff157e68e2245c70cbc79c5da7477f57616bf886825f65d57b9ff756847672e7b60203392a2005b61130a915060203d6020116105d5576105c781836116a6565b8461056e565b3461021b57602036600319011261021b5760043561132c611a00565b806007556040519081527fbc32502cec79c9838d553dcb8fbff010442b820c0648512429a9b8fdcda05d5860203392a2005b3461021b57600036600319011261021b576020600354604051908152f35b3461021b57602036600319011261021b57600435600052600a6020526020604060002054604051908152f35b3461021b57602036600319011261021b576004356113c4611a00565b806005556040519081527f01e1bd213446551b865be02b533d852d27c7d7ba6a95013ddcd85d9146fe5a7760203392a2005b3461021b57602036600319011261021b57600435611412611998565b61141e81600954611735565b6009556040516368bfce9960e01b81526020816004817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa9081156105dc576114879183916000916114b5575030906001600160a01b033391166119b8565b6040519081527fc8b1cd545919a25e3c6ccfef8cd44d97376832801c6a7c7bbefdb3cee824edd860203392a2005b6114ce915060203d6020116105d5576105c781836116a6565b84610c88565b3461021b57602036600319011261021b576004356114f0611998565b80600052600b60205260406000206115078261176e565b60058110156103df576003036115615760038160076115369301600160ff198254161790550154600954611735565b600955337fddd8ea0b68d501f3fec76e2e93b695c2a332f0099b4e6290a0c75c51ec8063f7600080a3005b60405162461bcd60e51b815260206004820152601460248201527f6e6f7420696e76616c69642070726f706f73616c0000000000000000000000006044820152606490fd5b3461021b57600036600319011261021b576020600154604051908152f35b3461021b57602036600319011261021b5761014090600435600052600b602052604060002080549067ffffffffffffffff6001820154166002820154600383015460048401549160058501549367ffffffffffffffff60ff6007600689015498015416976001600160a01b0381168a5260ff8160a01c16151560208b015260a81c1660408901526060880152608087015260a086015260c085015260e08401526101008301521515610120820152f35b6060810190811067ffffffffffffffff82111761169057604052565b634e487b7160e01b600052604160045260246000fd5b90601f8019910116810190811067ffffffffffffffff82111761169057604052565b81601f8201121561021b5780359067ffffffffffffffff821161169057604051926116fd601f8401601f1916602001856116a6565b8284526020838301011161021b57816000926020809301838601378301015290565b600435906001600160a01b038216820361021b57565b91908201809211610d2d57565b9081602091031261021b57516001600160a01b038116810361021b5790565b91908203918211610d2d57565b80600052600b60205260ff600760406000200154166118c25780600052600b60205267ffffffffffffffff60406000205460a81c161561187d5780600052600b60205267ffffffffffffffff600160406000200154164211156118775780600052600b602052604060002081600052600c60205261271061181c61180b604060002060026118028254600184015490611735565b91015490611735565b926004600282015491015490611944565b04116118715780600052600b602052604060002090600052600c60205261271061186060406000209260056118576001860154809654611735565b91015490611944565b04111561186c57600190565b600290565b50600390565b50600090565b60405162461bcd60e51b815260206004820152601360248201527f756e6b6e6f776e2070726f706f73616c204944000000000000000000000000006044820152606490fd5b50600490565b919082519283825260005b8481106118f4575050826000602080949584010152601f8019910116010190565b806020809284010151828286010152016118d3565b600052600a602052604060002054806119225750600090565b61192b9061176e565b60058110156103df571561193f5738611877565b600190565b81810292918115918404141715610d2d57565b6009546006549081811061198d576119756127109160055490611944565b0490600754808311611992575080821061198d575090565b905090565b91505090565b60ff60005460a01c166119a757565b63d93c066560e01b60005260046000fd5b9091926001600160a01b036119fe9481604051956323b872dd60e01b60208801521660248601521660448401526064830152606482526119f96084836116a6565b611bc7565b565b6001600160a01b03600054163303611a1457565b63118cdaa760e01b6000523360045260246000fd5b6119fe926001600160a01b036040519363a9059cbb60e01b60208601521660248401526044830152604482526119f96064836116a6565b67ffffffffffffffff8111611a7c5767ffffffffffffffff1690565b6306dfcc6560e41b600052604060045260245260446000fd5b94929190936001600160a01b03825496166001600160a01b038716149460018201549182151597611ac6899361176e565b60058110156103df5760028114159081611bbb575b50611bad57879081611b9f575b50611b925781611b83575b50611b7857611b25611b3891611b20612710611b186006600388015497015487611944565b048095611761565b611944565b9260026118026001830154835490611735565b8015611b62578492048094611b4f575b5050929190565b611b5a929450611735565b913880611b48565b634e487b7160e01b600052601260045260246000fd5b505050909190600090565b60ff9150600201541638611af3565b5050505050909190600090565b60ff915060a01c1638611ae8565b505050505050909190600090565b60019150141538611adb565b906000602091828151910182855af1156105dc576000513d611c1657506001600160a01b0381163b155b611bf85750565b6001600160a01b0390635274afe760e01b6000521660045260246000fd5b60011415611bf156fea26469706673582212209f8ee8846f8ac19a7edb2820c438d9aeb25dc03d9936fa3761b4b03f1e1a059d64736f6c634300081d0033","sourceMap":"935:20584:11:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;935:20584:11;;;;;;;-1:-1:-1;;;;;3232:32:11;935:20584;;;;;;;;;;;;;;-1:-1:-1;;935:20584:11;;;;;;;:::i;:::-;;;;;;;;;;;;;-1:-1:-1;;935:20584:11;;;;-1:-1:-1;;;;;935:20584:11;;:::i;:::-;1500:62:0;;:::i;:::-;935:20584:11;2627:22:0;;2623:91;;-1:-1:-1;;;;;935:20584:11;;;-1:-1:-1;;935:20584:11;;;;;;3052:40:0;935:20584:11;3052:40:0;;935:20584:11;2623:91:0;2672:31;;;935:20584:11;2672:31:0;935:20584:11;;;;;2672:31:0;935:20584:11;;;;;;-1:-1:-1;;935:20584:11;;;;;;1500:62:0;;:::i;:::-;935:20584:11;;;;;;;;18830:46;935:20584;18850:10;18830:46;;935:20584;;;;;;;-1:-1:-1;;935:20584:11;;;;;;-1:-1:-1;;;;;935:20584:11;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;11375:13;935:20584;;11418:21;935:20584;;;11418:21;-1:-1:-1;;;;;;935:20584:11;;;;;;;;;;;;:::i;:::-;;;;;;11418:21;935:20584;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;935:20584:11;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;-1:-1:-1;;935:20584:11;;;;;4197:32;935:20584;;;;;;;;;;;;;-1:-1:-1;;935:20584:11;;;;;3975:24;935:20584;;;;;;;;;;;;;-1:-1:-1;;935:20584:11;;;;;;1500:62:0;;:::i;:::-;935:20584:11;20253:22;935:20584;;;;;;20290:40;935:20584;20307:10;20290:40;;935:20584;;;;;;;-1:-1:-1;;935:20584:11;;;;;;1439:72:8;;:::i;:::-;935:20584:11;;;14447:9;935:20584;;;;;;;;14515:13;935:20584;;;;;-1:-1:-1;;;;;14601:10:11;935:20584;-1:-1:-1;935:20584:11;14579:21;;;935:20584;;14681:152;935:20584;-1:-1:-1;935:20584:11;14601:10;;;;;14681:152;:::i;:::-;14851:19;;;;;935:20584;;14929:78;;935:20584;15016:67;;;935:20584;-1:-1:-1;935:20584:11;;-1:-1:-1;;;15100:24:11;;935:20584;;;;15109:7;-1:-1:-1;;;;;935:20584:11;15100:24;;;;;;;15151:15;15100:24;;;935:20584;15100:24;;;935:20584;14601:10;-1:-1:-1;;;;;14601:10:11;935:20584;;15151:15;:::i;:::-;935:20584;;;;;15182:55;935:20584;14601:10;15182:55;;935:20584;15100:24;;;;935:20584;15100:24;935:20584;15100:24;;;;;;;;:::i;:::-;;;;;:::i;:::-;;;;;;;;;;935:20584;;;;;;;;;15016:67;15043:22;;935:20584;;-1:-1:-1;;935:20584:11;;;;;15016:67;;;14929:78;-1:-1:-1;;;;;;;935:20584:11;;;;;;14929:78;;;935:20584;;;-1:-1:-1;;;935:20584:11;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;935:20584:11;;;;;15817:80;935:20584;;:::i;:::-;;;;;;15637:9;935:20584;;;;;;;;15705:13;935:20584;;;;;15769:31;-1:-1:-1;;;;;935:20584:11;;-1:-1:-1;935:20584:11;15769:21;;;935:20584;;;-1:-1:-1;935:20584:11;15817:80;;:::i;:::-;935:20584;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;935:20584:11;;;;;;1500:62:0;;:::i;:::-;935:20584:11;20799:38;935:20584;;;;;;20852:56;935:20584;20877:10;20852:56;;935:20584;;;;;;;-1:-1:-1;;935:20584:11;;;;;;1500:62:0;;:::i;:::-;935:20584:11;;;;;;;;19782:42;935:20584;19800:10;19782:42;;935:20584;;;;;;;-1:-1:-1;;935:20584:11;;;;;-1:-1:-1;;;;;935:20584:11;;;;;;;;;;;;;;;-1:-1:-1;;935:20584:11;;;;1500:62:0;;:::i;:::-;1439:72:8;;:::i;:::-;-1:-1:-1;;;;;;;935:20584:11;;;;;;2551:20:8;935:20584:11;;;735:10:7;935:20584:11;;2551:20:8;935:20584:11;;;;;;;-1:-1:-1;;935:20584:11;;;;;3864:24;935:20584;;;;;;;;;;;;;-1:-1:-1;;935:20584:11;;;;1500:62:0;;:::i;:::-;935:20584:11;-1:-1:-1;;;;;935:20584:11;;-1:-1:-1;;935:20584:11;;;;;3052:40:0;;;;935:20584:11;;;;;;;-1:-1:-1;;935:20584:11;;;;;;1500:62:0;;:::i;:::-;935:20584:11;19097:40;935:20584;;;;;;19152:58;935:20584;19178:10;19152:58;;935:20584;;;;;;;-1:-1:-1;;935:20584:11;;;;;4086:24;935:20584;;;;;;;;;;;;;-1:-1:-1;;935:20584:11;;;;;4299:25;935:20584;;;;;;;;;;;;;-1:-1:-1;;935:20584:11;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;935:20584:11;;;;;;;;4536:53;935:20584;;;;;;;;4536:53;935:20584;4536:53;;935:20584;4536:53;;935:20584;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;935:20584:11;;;;;;;-1:-1:-1;;;;;3146:32:11;935:20584;;;;;;;;;;-1:-1:-1;;935:20584:11;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;:::i;:::-;1439:72:8;;;:::i;:::-;935:20584:11;;-1:-1:-1;;;8083:34:11;;935:20584;8083:34;;935:20584;;;;;;;8091:7;-1:-1:-1;;;;;935:20584:11;8083:34;;;;;;;935:20584;8083:34;;;935:20584;8121:10;-1:-1:-1;;;;;8121:10:11;935:20584;;8083:48;935:20584;;8168:20;;;:::i;:::-;935:20584;;;;8221:22;;935:20584;;8277:20;935:20584;-1:-1:-1;;935:20584:11;;;;;;;;8277:20;935:20584;;;;8381:9;935:20584;;;;;;;;;;;;;8121:10;-1:-1:-1;;935:20584:11;;;;;;8541:26;:15;:26;:::i;:::-;935:20584;8606:23;935:20584;;8606:23;:::i;:::-;935:20584;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;8679:16:11;;935:20584;;-1:-1:-1;;935:20584:11;;;;;;;;;;;;;-1:-1:-1;;;8744:31:11;;8753:7;-1:-1:-1;;;;;935:20584:11;;;;;;;8744:31;;;;;;;;935:20584;8744:31;;;935:20584;8715:26;935:20584;8715:26;;;9201:28;8715:26;;935:20584;8715:26;;;935:20584;8715:26;935:20584;8785:27;;;935:20584;8875:20;935:20584;8843:29;;;935:20584;8934:17;935:20584;8905:26;;;935:20584;8875:20;9069:25;9016:20;;:::i;:::-;9069:25;;;:::i;:::-;9046:20;;935:20584;9201:28;935:20584;9201:28;:::i;:::-;;935:20584;;;9274:13;935:20584;;;;;;;;;;;;;;;;9363:24;;;;;;;;;935:20584;9363:24;;9433:8;935:20584;9363:24;935:20584;9363:24;9458:81;9363:24;935:20584;9363:24;;;935:20584;9426:4;;8121:10;-1:-1:-1;;;;;8121:10:11;935:20584;;9433:8;:::i;:::-;935:20584;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;8121:10;935:20584;;:::i;:::-;9458:81;;;935:20584;;;;;;9363:24;;;;;;;;;;;;;;:::i;:::-;;;;8744:31;;;;;;935:20584;8744:31;;935:20584;8744:31;;;;;;935:20584;8744:31;;;:::i;:::-;;;935:20584;;;;;;8744:31;;;;935:20584;;;;8744:31;;;;;-1:-1:-1;8744:31:11;;935:20584;;;;;;;;;;;;;;;-1:-1:-1;;;935:20584:11;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;935:20584:11;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;935:20584:11;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;935:20584:11;;;;;;;;;;;;;;;;;;;;8083:34;;;;935:20584;8083:34;935:20584;8083:34;;;;;;;:::i;:::-;;;;935:20584;;;;;;-1:-1:-1;;935:20584:11;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1439:72:8;;;:::i;:::-;12888:18:11;;;:::i;:::-;935:20584;;;;;;;;;;-1:-1:-1;;;12978:38:11;;13005:10;935:20584;12978:38;;935:20584;;;;;;12987:7;-1:-1:-1;;;;;935:20584:11;12978:38;;;;;;;935:20584;12978:38;;;935:20584;;;;;13599:13;935:20584;;;;;;-1:-1:-1;;;;;;13005:10:11;935:20584;;;13659:21;;;935:20584;;;13708:11;935:20584;13708:11;;935:20584;;;;13761:35;;;;;13812:36;935:20584;;;13812:36;:::i;:::-;935:20584;;13757:382;935:20584;13659:21;935:20584;;;;;;;13095:60;935:20584;;;;;;;;;;;;;;;;;;;;;;;;;13005:10;935:20584;13005:10;935:20584;;;;;;:::i;13757:382::-;935:20584;13869:31;;935:20584;;;13916:21;:32;935:20584;;;13916:32;:::i;:::-;935:20584;;13757:382;;13865:274;13969:35;-1:-1:-1;13987:16:11;13969:35;;13987:16;;;14020:25;;;:36;935:20584;;;14020:36;:::i;13965:174::-;935:20584;;-1:-1:-1;;;14087:41:11;;935:20584;;14087:41;;935:20584;;;;;;;;;;;14087:41;;;935:20584;;;-1:-1:-1;;;935:20584:11;;;;;;;;;;;;;;;;;;;;12978:38;;;935:20584;12978:38;;935:20584;12978:38;;;;;;935:20584;12978:38;;;:::i;:::-;;;935:20584;;;;;;12978:38;;;;935:20584;;;12978:38;;;-1:-1:-1;12978:38:11;;935:20584;;;-1:-1:-1;;;935:20584:11;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;935:20584:11;;;;;;1500:62:0;;:::i;:::-;935:20584:11;19441:44;935:20584;;;;;;19500:62;935:20584;19528:10;19500:62;;935:20584;;;;;;;-1:-1:-1;;935:20584:11;;;;;;;;;;;;;;;;;;;-1:-1:-1;;935:20584:11;;;;1500:62:0;;:::i;:::-;935:20584:11;;;;;;;2264:9:8;2260:62;;-1:-1:-1;;;;935:20584:11;;;2798:22:8;935:20584:11;;;735:10:7;935:20584:11;;2798:22:8;935:20584:11;2260:62:8;2296:15;;;935:20584:11;2296:15:8;935:20584:11;;2296:15:8;935:20584:11;;;;;;-1:-1:-1;;935:20584:11;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;935:20584:11;;;;;3504:33;935:20584;;;;;;;;;;;;;-1:-1:-1;;935:20584:11;;;;;;1500:62:0;;:::i;:::-;21116:21:11;935:20584;21116:21;935:20584;21116:21;:::i;:::-;;935:20584;;;-1:-1:-1;;;21154:24:11;;935:20584;;;;21163:7;-1:-1:-1;;;;;935:20584:11;21154:24;;;;;;;21205:7;21154:24;;;935:20584;21154:24;;;21193:10;-1:-1:-1;;;;;21193:10:11;935:20584;;21205:7;:::i;:::-;935:20584;;;;;21228:38;935:20584;21193:10;21228:38;;935:20584;21154:24;;;;935:20584;21154:24;935:20584;21154:24;;;;;;;:::i;:::-;;;;935:20584;;;;;;-1:-1:-1;;935:20584:11;;;;;;1500:62:0;;:::i;:::-;935:20584:11;20506:22;935:20584;;;;;;20543:40;935:20584;20560:10;20543:40;;935:20584;;;;;;;-1:-1:-1;;935:20584:11;;;;;3646:35;935:20584;;;;;;;;;;;;;-1:-1:-1;;935:20584:11;;;;;;;;4359:48;935:20584;;;;;;;;;;;;;;;;;;;-1:-1:-1;;935:20584:11;;;;;;1500:62:0;;:::i;:::-;935:20584:11;20000:22;935:20584;;;;;;20037:40;935:20584;20054:10;20037:40;;935:20584;;;;;;;-1:-1:-1;;935:20584:11;;;;;;1439:72:8;;:::i;:::-;18367:21:11;935:20584;18367:21;935:20584;18367:21;:::i;:::-;;935:20584;;;-1:-1:-1;;;18405:24:11;;935:20584;;;;18414:7;-1:-1:-1;;;;;935:20584:11;18405:24;;;;;;;18475:7;18405:24;;;935:20584;18405:24;;;18468:4;;18448:10;-1:-1:-1;;;;;18448:10:11;935:20584;;18475:7;:::i;:::-;935:20584;;;;;18498:42;935:20584;18448:10;18498:42;;935:20584;18405:24;;;;935:20584;18405:24;935:20584;18405:24;;;;;;;:::i;:::-;;;;935:20584;;;;;;-1:-1:-1;;935:20584:11;;;;;;1439:72:8;;:::i;:::-;935:20584:11;;;17896:9;935:20584;;;;;17936:18;;;:::i;:::-;935:20584;;;;;;17958:21;17936:43;935:20584;;17958:21;18015:17;;18049:34;18015:17;;935:20584;;;;;;;;;18063:20;935:20584;18049:34;935:20584;18049:34;:::i;:::-;;935:20584;18123:10;18099:48;935:20584;18099:48;;935:20584;;;;-1:-1:-1;;;935:20584:11;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;935:20584:11;;;;;3344:27;935:20584;;;;;;;;;;;;;-1:-1:-1;;935:20584:11;;;;;;;;;;4447:49;935:20584;;;;;;;4447:49;935:20584;;4447:49;;935:20584;;4447:49;;;935:20584;4447:49;;;935:20584;;4447:49;;935:20584;4447:49;;;;935:20584;4447:49;935:20584;;4447:49;;;;935:20584;4447:49;;935:20584;;;-1:-1:-1;;;;;935:20584:11;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;-1:-1:-1;935:20584:11;;;;;-1:-1:-1;935:20584:11;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;935:20584:11;;;;;:::i;:::-;;;;;;;;;;;;;-1:-1:-1;935:20584:11;;;;;;;;;;;;;;:::o;:::-;;;;-1:-1:-1;;;;;935:20584:11;;;;;;:::o;:::-;;;;;;;;;;:::o;:::-;;;;;;;;;;-1:-1:-1;;;;;935:20584:11;;;;;;;:::o;:::-;;;;;;;;;;:::o;6686:722::-;935:20584;;;6800:9;935:20584;;;6837:17;935:20584;;;6837:17;935:20584;;6833:77;;935:20584;;;6800:9;935:20584;;;;;;;;;;6984:14;6980:74;;935:20584;;;6800:9;935:20584;;;7067:30;935:20584;;;7067:30;935:20584;;7101:15;-1:-1:-1;7067:49:11;7063:107;;935:20584;;;6800:9;935:20584;;;;;;;;11789:13;935:20584;;12002:3;11942:56;11846:77;935:20584;;;11898:25;11846:49;935:20584;;7067:30;11874:21;;935:20584;11846:49;;:::i;:::-;11898:25;;935:20584;11846:77;;:::i;:::-;11942:26;11971:27;11898:25;11942:26;;935:20584;11971:27;;935:20584;11942:56;;:::i;:::-;935:20584;-1:-1:-1;7179:87:11;;935:20584;;;6800:9;935:20584;;;;;;;;11789:13;935:20584;;12002:3;12430:83;935:20584;;;12391:21;12484:29;12431:49;7067:30;12391:21;;935:20584;;;;12431:49;:::i;:::-;12484:29;;935:20584;12430:83;;:::i;:::-;935:20584;-1:-1:-1;12391:130:11;7275:88;;7067:30;6686:722;:::o;7275:88::-;11898:25;7322:30;:::o;7179:87::-;7227:28;7234:21;7227:28;:::o;7063:107::-;7132:27;935:20584;7132:27;:::o;6980:74::-;935:20584;;-1:-1:-1;;;7014:29:11;;935:20584;7014:29;;;935:20584;;;;;;;;;;;7014:29;;;6833:77;6870:29;6877:22;6870:29;:::o;935:20584::-;;;;;;;;;-1:-1:-1;935:20584:11;;;;;;;;;-1:-1:-1;935:20584:11;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;9715:353;935:20584;;9814:13;935:20584;;;;;;9851:18;9847:193;;10049:12;935:20584;9715:353;:::o;9847:193::-;9912:20;;;:::i;:::-;935:20584;;;;;;9950:34;9946:84;;9847:193;;;9946:84;935:20584;10004:11;:::o;935:20584::-;;;;;;;;;;;;;;;;:::o;10223:374::-;10297:10;935:20584;10310:9;935:20584;10297:22;;;;10293:70;;10390:22;10416:3;935:20584;10403:9;935:20584;10390:22;;:::i;:::-;935:20584;;10442:9;935:20584;10433:18;;;10429:65;;10507:18;;;;10503:65;;10577:13;10223:374;:::o;10503:65::-;10541:16;;;:::o;10429:65::-;10467:16;;;;:::o;2002:128:8:-;935:20584:11;1920:7:8;935:20584:11;;;;2063:61:8;;2002:128::o;2063:61::-;2098:15;;;1920:7;2098:15;;1920:7;2098:15;1618:188:5;;;;-1:-1:-1;;;;;1745:53:5;1618:188;935:20584:11;;;;;;;1745:53:5;;;;935:20584:11;1745:53:5;;;935:20584:11;;;;;;;;;;;1745:53:5;;;;;;:::i;:::-;;:::i;:::-;1618:188::o;1796:162:0:-;-1:-1:-1;;;;;1710:6:0;935:20584:11;;735:10:7;1855:23:0;1851:101;;1796:162::o;1851:101::-;1901:40;;;1710:6;1901:40;735:10:7;1901:40:0;935:20584:11;;1710:6:0;1901:40;1219:160:5;1328:43;1219:160;-1:-1:-1;;;;;935:20584:11;;;;;;1328:43:5;;;;935:20584:11;1328:43:5;;;935:20584:11;;;;;;1328:43:5;;;;;;:::i;13296:213:10:-;935:20584:11;13374:24:10;;13370:103;;935:20584:11;;13296:213:10;:::o;13370:103::-;13421:41;;;;;13452:2;13421:41;935:20584:11;;;;13421:41:10;;16239:1384:11;;;;;;-1:-1:-1;;;;;935:20584:11;;;;-1:-1:-1;;;;;935:20584:11;;16555:30;16605:16;;;;935:20584;16605:20;;;;;16665:18;16605:20;16665:18;;:::i;:::-;935:20584;;;;;;16759:23;16742:40;;;:83;;;;16239:1384;16738:145;;;16932:45;;;;;16239:1384;16928:107;;;17081:47;;;16239:1384;17077:109;;;17321:59;17397:80;17222:21;17322:38;17277:3;17222:51;17246:27;17222:21;;;935:20584;17246:27;;935:20584;17222:51;;:::i;:::-;935:20584;17322:38;;;:::i;:::-;17321:59;:::i;:::-;17397:22;16759:23;17397:51;16605:16;17397:22;;935:20584;;;17397:51;;:::i;:80::-;935:20584;;;;;;;17290:188;17488:74;;;16239:1384;17571:45;;;;16239:1384;:::o;17488:74::-;17518:33;;;;;:::i;:::-;17488:74;;;;;935:20584;;;;;;;;;;;;17077:109;17144:31;;;;;;935:20584;17144:31;:::o;17081:47::-;935:20584;17105:23;;16759;17105;935:20584;;17081:47;;;16928:107;16993:31;;;;;;;;935:20584;16993:31;:::o;16932:45::-;935:20584;;;;;;16932:45;;;16738:145;16841:31;;;;;;;;;935:20584;16841:31;:::o;16742:83::-;16605:16;935:20584;;16786:39;;16742:83;;;7686:720:5;;-1:-1:-1;7823:421:5;7686:720;7823:421;;;;;;;;;;;;-1:-1:-1;7823:421:5;;8258:15;;935:20584:11;-1:-1:-1;;;;;935:20584:11;;8276:26:5;:31;8258:68;8254:146;;7686:720;:::o;8254:146::-;-1:-1:-1;;;;;8349:40:5;;;;-1:-1:-1;8349:40:5;935:20584:11;8349:40:5;935:20584:11;;-1:-1:-1;8349:40:5;8258:68;8325:1;8310:16;;8258:68;","linkReferences":{},"cborAuxdata":{"1":{"value":"0xa26469706673582212209f8ee8846f8ac19a7edb2820c438d9aeb25dc03d9936fa3761b4b03f1e1a059d64736f6c634300081d0033","offset":7200}},"immutableReferences":{"2946":[{"start":1327,"length":32},{"start":2452,"length":32},{"start":2970,"length":32},{"start":3828,"length":32},{"start":4724,"length":32},{"start":5174,"length":32}],"2948":[{"start":503,"length":32},{"start":2612,"length":32}]},"transformations":[{"id":"2946","type":"replace","offset":1327,"reason":"immutable"},{"id":"2946","type":"replace","offset":2452,"reason":"immutable"},{"id":"2946","type":"replace","offset":2970,"reason":"immutable"},{"id":"2946","type":"replace","offset":3828,"reason":"immutable"},{"id":"2946","type":"replace","offset":4724,"reason":"immutable"},{"id":"2946","type":"replace","offset":5174,"reason":"immutable"},{"id":"2948","type":"replace","offset":503,"reason":"immutable"},{"id":"2948","type":"replace","offset":2612,"reason":"immutable"}],"transformationValues":{"immutables":{"2946":"0x000000000000000000000000a31f6b577704b4622d2ba63f6aa1b7e92fe8c8a9","2948":"0x00000000000000000000000057b81c140bdfd35dbfbb395360a66d54a650666d"}}},"deployment":{"transactionHash":"0x1d4098fe9c2bb4c4419629181a1b83acb39d29968f406e7df998f2b53867e45f","blockNumber":"48140661","transactionIndex":"162","deployer":"0xa044D502c7E23840dcD5997Fb3Ba85a6DE5763E4"},"sources":{"@openzeppelin/contracts/access/Ownable.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)\n\npragma solidity ^0.8.20;\n\nimport {Context} from \"../utils/Context.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * The initial owner is set to the address provided by the deployer. This can\n * later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract Ownable is Context {\n    address private _owner;\n\n    /**\n     * @dev The caller account is not authorized to perform an operation.\n     */\n    error OwnableUnauthorizedAccount(address account);\n\n    /**\n     * @dev The owner is not a valid owner account. (eg. `address(0)`)\n     */\n    error OwnableInvalidOwner(address owner);\n\n    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n    /**\n     * @dev Initializes the contract setting the address provided by the deployer as the initial owner.\n     */\n    constructor(address initialOwner) {\n        if (initialOwner == address(0)) {\n            revert OwnableInvalidOwner(address(0));\n        }\n        _transferOwnership(initialOwner);\n    }\n\n    /**\n     * @dev Throws if called by any account other than the owner.\n     */\n    modifier onlyOwner() {\n        _checkOwner();\n        _;\n    }\n\n    /**\n     * @dev Returns the address of the current owner.\n     */\n    function owner() public view virtual returns (address) {\n        return _owner;\n    }\n\n    /**\n     * @dev Throws if the sender is not the owner.\n     */\n    function _checkOwner() internal view virtual {\n        if (owner() != _msgSender()) {\n            revert OwnableUnauthorizedAccount(_msgSender());\n        }\n    }\n\n    /**\n     * @dev Leaves the contract without owner. It will not be possible to call\n     * `onlyOwner` functions. Can only be called by the current owner.\n     *\n     * NOTE: Renouncing ownership will leave the contract without an owner,\n     * thereby disabling any functionality that is only available to the owner.\n     */\n    function renounceOwnership() public virtual onlyOwner {\n        _transferOwnership(address(0));\n    }\n\n    /**\n     * @dev Transfers ownership of the contract to a new account (`newOwner`).\n     * Can only be called by the current owner.\n     */\n    function transferOwnership(address newOwner) public virtual onlyOwner {\n        if (newOwner == address(0)) {\n            revert OwnableInvalidOwner(address(0));\n        }\n        _transferOwnership(newOwner);\n    }\n\n    /**\n     * @dev Transfers ownership of the contract to a new account (`newOwner`).\n     * Internal function without access restriction.\n     */\n    function _transferOwnership(address newOwner) internal virtual {\n        address oldOwner = _owner;\n        _owner = newOwner;\n        emit OwnershipTransferred(oldOwner, newOwner);\n    }\n}\n"},"@openzeppelin/contracts/interfaces/IERC1363.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (interfaces/IERC1363.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"./IERC20.sol\";\nimport {IERC165} from \"./IERC165.sol\";\n\n/**\n * @title IERC1363\n * @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363].\n *\n * Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract\n * after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction.\n */\ninterface IERC1363 is IERC20, IERC165 {\n    /*\n     * Note: the ERC-165 identifier for this interface is 0xb0202a11.\n     * 0xb0202a11 ===\n     *   bytes4(keccak256('transferAndCall(address,uint256)')) ^\n     *   bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^\n     *   bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^\n     *   bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^\n     *   bytes4(keccak256('approveAndCall(address,uint256)')) ^\n     *   bytes4(keccak256('approveAndCall(address,uint256,bytes)'))\n     */\n\n    /**\n     * @dev Moves a `value` amount of tokens from the caller's account to `to`\n     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n     * @param to The address which you want to transfer to.\n     * @param value The amount of tokens to be transferred.\n     * @return A boolean value indicating whether the operation succeeded unless throwing.\n     */\n    function transferAndCall(address to, uint256 value) external returns (bool);\n\n    /**\n     * @dev Moves a `value` amount of tokens from the caller's account to `to`\n     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n     * @param to The address which you want to transfer to.\n     * @param value The amount of tokens to be transferred.\n     * @param data Additional data with no specified format, sent in call to `to`.\n     * @return A boolean value indicating whether the operation succeeded unless throwing.\n     */\n    function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool);\n\n    /**\n     * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\n     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n     * @param from The address which you want to send tokens from.\n     * @param to The address which you want to transfer to.\n     * @param value The amount of tokens to be transferred.\n     * @return A boolean value indicating whether the operation succeeded unless throwing.\n     */\n    function transferFromAndCall(address from, address to, uint256 value) external returns (bool);\n\n    /**\n     * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\n     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n     * @param from The address which you want to send tokens from.\n     * @param to The address which you want to transfer to.\n     * @param value The amount of tokens to be transferred.\n     * @param data Additional data with no specified format, sent in call to `to`.\n     * @return A boolean value indicating whether the operation succeeded unless throwing.\n     */\n    function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool);\n\n    /**\n     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\n     * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\n     * @param spender The address which will spend the funds.\n     * @param value The amount of tokens to be spent.\n     * @return A boolean value indicating whether the operation succeeded unless throwing.\n     */\n    function approveAndCall(address spender, uint256 value) external returns (bool);\n\n    /**\n     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\n     * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\n     * @param spender The address which will spend the funds.\n     * @param value The amount of tokens to be spent.\n     * @param data Additional data with no specified format, sent in call to `spender`.\n     * @return A boolean value indicating whether the operation succeeded unless throwing.\n     */\n    function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool);\n}\n"},"@openzeppelin/contracts/interfaces/IERC165.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC165.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC165} from \"../utils/introspection/IERC165.sol\";\n"},"@openzeppelin/contracts/interfaces/IERC20.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC20.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"../token/ERC20/IERC20.sol\";\n"},"@openzeppelin/contracts/token/ERC20/IERC20.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Interface of the ERC-20 standard as defined in the ERC.\n */\ninterface IERC20 {\n    /**\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\n     * another (`to`).\n     *\n     * Note that `value` may be zero.\n     */\n    event Transfer(address indexed from, address indexed to, uint256 value);\n\n    /**\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n     * a call to {approve}. `value` is the new allowance.\n     */\n    event Approval(address indexed owner, address indexed spender, uint256 value);\n\n    /**\n     * @dev Returns the value of tokens in existence.\n     */\n    function totalSupply() external view returns (uint256);\n\n    /**\n     * @dev Returns the value of tokens owned by `account`.\n     */\n    function balanceOf(address account) external view returns (uint256);\n\n    /**\n     * @dev Moves a `value` amount of tokens from the caller's account to `to`.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transfer(address to, uint256 value) external returns (bool);\n\n    /**\n     * @dev Returns the remaining number of tokens that `spender` will be\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\n     * zero by default.\n     *\n     * This value changes when {approve} or {transferFrom} are called.\n     */\n    function allowance(address owner, address spender) external view returns (uint256);\n\n    /**\n     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\n     * caller's tokens.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\n     * that someone may use both the old and the new allowance by unfortunate\n     * transaction ordering. One possible solution to mitigate this race\n     * condition is to first reduce the spender's allowance to 0 and set the\n     * desired value afterwards:\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n     *\n     * Emits an {Approval} event.\n     */\n    function approve(address spender, uint256 value) external returns (bool);\n\n    /**\n     * @dev Moves a `value` amount of tokens from `from` to `to` using the\n     * allowance mechanism. `value` is then deducted from the caller's\n     * allowance.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transferFrom(address from, address to, uint256 value) external returns (bool);\n}\n"},"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.2.0) (token/ERC20/utils/SafeERC20.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"../IERC20.sol\";\nimport {IERC1363} from \"../../../interfaces/IERC1363.sol\";\n\n/**\n * @title SafeERC20\n * @dev Wrappers around ERC-20 operations that throw on failure (when the token\n * contract returns false). Tokens that return no value (and instead revert or\n * throw on failure) are also supported, non-reverting calls are assumed to be\n * successful.\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\n */\nlibrary SafeERC20 {\n    /**\n     * @dev An operation with an ERC-20 token failed.\n     */\n    error SafeERC20FailedOperation(address token);\n\n    /**\n     * @dev Indicates a failed `decreaseAllowance` request.\n     */\n    error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease);\n\n    /**\n     * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,\n     * non-reverting calls are assumed to be successful.\n     */\n    function safeTransfer(IERC20 token, address to, uint256 value) internal {\n        _callOptionalReturn(token, abi.encodeCall(token.transfer, (to, value)));\n    }\n\n    /**\n     * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the\n     * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.\n     */\n    function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\n        _callOptionalReturn(token, abi.encodeCall(token.transferFrom, (from, to, value)));\n    }\n\n    /**\n     * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\n     * non-reverting calls are assumed to be successful.\n     *\n     * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \"client\"\n     * smart contract uses ERC-7674 to set temporary allowances, then the \"client\" smart contract should avoid using\n     * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\n     * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\n     */\n    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n        uint256 oldAllowance = token.allowance(address(this), spender);\n        forceApprove(token, spender, oldAllowance + value);\n    }\n\n    /**\n     * @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no\n     * value, non-reverting calls are assumed to be successful.\n     *\n     * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \"client\"\n     * smart contract uses ERC-7674 to set temporary allowances, then the \"client\" smart contract should avoid using\n     * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\n     * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\n     */\n    function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal {\n        unchecked {\n            uint256 currentAllowance = token.allowance(address(this), spender);\n            if (currentAllowance < requestedDecrease) {\n                revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease);\n            }\n            forceApprove(token, spender, currentAllowance - requestedDecrease);\n        }\n    }\n\n    /**\n     * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,\n     * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval\n     * to be set to zero before setting it to a non-zero value, such as USDT.\n     *\n     * NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function\n     * only sets the \"standard\" allowance. Any temporary allowance will remain active, in addition to the value being\n     * set here.\n     */\n    function forceApprove(IERC20 token, address spender, uint256 value) internal {\n        bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value));\n\n        if (!_callOptionalReturnBool(token, approvalCall)) {\n            _callOptionalReturn(token, abi.encodeCall(token.approve, (spender, 0)));\n            _callOptionalReturn(token, approvalCall);\n        }\n    }\n\n    /**\n     * @dev Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no\n     * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\n     * targeting contracts.\n     *\n     * Reverts if the returned value is other than `true`.\n     */\n    function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\n        if (to.code.length == 0) {\n            safeTransfer(token, to, value);\n        } else if (!token.transferAndCall(to, value, data)) {\n            revert SafeERC20FailedOperation(address(token));\n        }\n    }\n\n    /**\n     * @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target\n     * has no code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\n     * targeting contracts.\n     *\n     * Reverts if the returned value is other than `true`.\n     */\n    function transferFromAndCallRelaxed(\n        IERC1363 token,\n        address from,\n        address to,\n        uint256 value,\n        bytes memory data\n    ) internal {\n        if (to.code.length == 0) {\n            safeTransferFrom(token, from, to, value);\n        } else if (!token.transferFromAndCall(from, to, value, data)) {\n            revert SafeERC20FailedOperation(address(token));\n        }\n    }\n\n    /**\n     * @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no\n     * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\n     * targeting contracts.\n     *\n     * NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}.\n     * Opposedly, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall}\n     * once without retrying, and relies on the returned value to be true.\n     *\n     * Reverts if the returned value is other than `true`.\n     */\n    function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\n        if (to.code.length == 0) {\n            forceApprove(token, to, value);\n        } else if (!token.approveAndCall(to, value, data)) {\n            revert SafeERC20FailedOperation(address(token));\n        }\n    }\n\n    /**\n     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n     * on the return value: the return value is optional (but if data is returned, it must not be false).\n     * @param token The token targeted by the call.\n     * @param data The call data (encoded using abi.encode or one of its variants).\n     *\n     * This is a variant of {_callOptionalReturnBool} that reverts if call fails to meet the requirements.\n     */\n    function _callOptionalReturn(IERC20 token, bytes memory data) private {\n        uint256 returnSize;\n        uint256 returnValue;\n        assembly (\"memory-safe\") {\n            let success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\n            // bubble errors\n            if iszero(success) {\n                let ptr := mload(0x40)\n                returndatacopy(ptr, 0, returndatasize())\n                revert(ptr, returndatasize())\n            }\n            returnSize := returndatasize()\n            returnValue := mload(0)\n        }\n\n        if (returnSize == 0 ? address(token).code.length == 0 : returnValue != 1) {\n            revert SafeERC20FailedOperation(address(token));\n        }\n    }\n\n    /**\n     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n     * on the return value: the return value is optional (but if data is returned, it must not be false).\n     * @param token The token targeted by the call.\n     * @param data The call data (encoded using abi.encode or one of its variants).\n     *\n     * This is a variant of {_callOptionalReturn} that silently catches all reverts and returns a bool instead.\n     */\n    function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\n        bool success;\n        uint256 returnSize;\n        uint256 returnValue;\n        assembly (\"memory-safe\") {\n            success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\n            returnSize := returndatasize()\n            returnValue := mload(0)\n        }\n        return success && (returnSize == 0 ? address(token).code.length > 0 : returnValue == 1);\n    }\n}\n"},"@openzeppelin/contracts/token/ERC721/IERC721.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC721/IERC721.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC165} from \"../../utils/introspection/IERC165.sol\";\n\n/**\n * @dev Required interface of an ERC-721 compliant contract.\n */\ninterface IERC721 is IERC165 {\n    /**\n     * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\n     */\n    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\n\n    /**\n     * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\n     */\n    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\n\n    /**\n     * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\n     */\n    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\n\n    /**\n     * @dev Returns the number of tokens in ``owner``'s account.\n     */\n    function balanceOf(address owner) external view returns (uint256 balance);\n\n    /**\n     * @dev Returns the owner of the `tokenId` token.\n     *\n     * Requirements:\n     *\n     * - `tokenId` must exist.\n     */\n    function ownerOf(uint256 tokenId) external view returns (address owner);\n\n    /**\n     * @dev Safely transfers `tokenId` token from `from` to `to`.\n     *\n     * Requirements:\n     *\n     * - `from` cannot be the zero address.\n     * - `to` cannot be the zero address.\n     * - `tokenId` token must exist and be owned by `from`.\n     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\n     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon\n     *   a safe transfer.\n     *\n     * Emits a {Transfer} event.\n     */\n    function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external;\n\n    /**\n     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\n     * are aware of the ERC-721 protocol to prevent tokens from being forever locked.\n     *\n     * Requirements:\n     *\n     * - `from` cannot be the zero address.\n     * - `to` cannot be the zero address.\n     * - `tokenId` token must exist and be owned by `from`.\n     * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or\n     *   {setApprovalForAll}.\n     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon\n     *   a safe transfer.\n     *\n     * Emits a {Transfer} event.\n     */\n    function safeTransferFrom(address from, address to, uint256 tokenId) external;\n\n    /**\n     * @dev Transfers `tokenId` token from `from` to `to`.\n     *\n     * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC-721\n     * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must\n     * understand this adds an external call which potentially creates a reentrancy vulnerability.\n     *\n     * Requirements:\n     *\n     * - `from` cannot be the zero address.\n     * - `to` cannot be the zero address.\n     * - `tokenId` token must be owned by `from`.\n     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transferFrom(address from, address to, uint256 tokenId) external;\n\n    /**\n     * @dev Gives permission to `to` to transfer `tokenId` token to another account.\n     * The approval is cleared when the token is transferred.\n     *\n     * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\n     *\n     * Requirements:\n     *\n     * - The caller must own the token or be an approved operator.\n     * - `tokenId` must exist.\n     *\n     * Emits an {Approval} event.\n     */\n    function approve(address to, uint256 tokenId) external;\n\n    /**\n     * @dev Approve or remove `operator` as an operator for the caller.\n     * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\n     *\n     * Requirements:\n     *\n     * - The `operator` cannot be the address zero.\n     *\n     * Emits an {ApprovalForAll} event.\n     */\n    function setApprovalForAll(address operator, bool approved) external;\n\n    /**\n     * @dev Returns the account approved for `tokenId` token.\n     *\n     * Requirements:\n     *\n     * - `tokenId` must exist.\n     */\n    function getApproved(uint256 tokenId) external view returns (address operator);\n\n    /**\n     * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\n     *\n     * See {setApprovalForAll}\n     */\n    function isApprovedForAll(address owner, address operator) external view returns (bool);\n}\n"},"@openzeppelin/contracts/utils/Context.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context {\n    function _msgSender() internal view virtual returns (address) {\n        return msg.sender;\n    }\n\n    function _msgData() internal view virtual returns (bytes calldata) {\n        return msg.data;\n    }\n\n    function _contextSuffixLength() internal view virtual returns (uint256) {\n        return 0;\n    }\n}\n"},"@openzeppelin/contracts/utils/Pausable.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Pausable.sol)\n\npragma solidity ^0.8.20;\n\nimport {Context} from \"../utils/Context.sol\";\n\n/**\n * @dev Contract module which allows children to implement an emergency stop\n * mechanism that can be triggered by an authorized account.\n *\n * This module is used through inheritance. It will make available the\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\n * the functions of your contract. Note that they will not be pausable by\n * simply including this module, only once the modifiers are put in place.\n */\nabstract contract Pausable is Context {\n    bool private _paused;\n\n    /**\n     * @dev Emitted when the pause is triggered by `account`.\n     */\n    event Paused(address account);\n\n    /**\n     * @dev Emitted when the pause is lifted by `account`.\n     */\n    event Unpaused(address account);\n\n    /**\n     * @dev The operation failed because the contract is paused.\n     */\n    error EnforcedPause();\n\n    /**\n     * @dev The operation failed because the contract is not paused.\n     */\n    error ExpectedPause();\n\n    /**\n     * @dev Initializes the contract in unpaused state.\n     */\n    constructor() {\n        _paused = false;\n    }\n\n    /**\n     * @dev Modifier to make a function callable only when the contract is not paused.\n     *\n     * Requirements:\n     *\n     * - The contract must not be paused.\n     */\n    modifier whenNotPaused() {\n        _requireNotPaused();\n        _;\n    }\n\n    /**\n     * @dev Modifier to make a function callable only when the contract is paused.\n     *\n     * Requirements:\n     *\n     * - The contract must be paused.\n     */\n    modifier whenPaused() {\n        _requirePaused();\n        _;\n    }\n\n    /**\n     * @dev Returns true if the contract is paused, and false otherwise.\n     */\n    function paused() public view virtual returns (bool) {\n        return _paused;\n    }\n\n    /**\n     * @dev Throws if the contract is paused.\n     */\n    function _requireNotPaused() internal view virtual {\n        if (paused()) {\n            revert EnforcedPause();\n        }\n    }\n\n    /**\n     * @dev Throws if the contract is not paused.\n     */\n    function _requirePaused() internal view virtual {\n        if (!paused()) {\n            revert ExpectedPause();\n        }\n    }\n\n    /**\n     * @dev Triggers stopped state.\n     *\n     * Requirements:\n     *\n     * - The contract must not be paused.\n     */\n    function _pause() internal virtual whenNotPaused {\n        _paused = true;\n        emit Paused(_msgSender());\n    }\n\n    /**\n     * @dev Returns to normal state.\n     *\n     * Requirements:\n     *\n     * - The contract must be paused.\n     */\n    function _unpause() internal virtual whenPaused {\n        _paused = false;\n        emit Unpaused(_msgSender());\n    }\n}\n"},"@openzeppelin/contracts/utils/introspection/IERC165.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/introspection/IERC165.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Interface of the ERC-165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[ERC].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165 {\n    /**\n     * @dev Returns true if this contract implements the interface defined by\n     * `interfaceId`. See the corresponding\n     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[ERC section]\n     * to learn more about how these ids are created.\n     *\n     * This function call must use less than 30 000 gas.\n     */\n    function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n"},"@openzeppelin/contracts/utils/math/SafeCast.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/math/SafeCast.sol)\n// This file was procedurally generated from scripts/generate/templates/SafeCast.js.\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Wrappers over Solidity's uintXX/intXX/bool casting operators with added overflow\n * checks.\n *\n * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can\n * easily result in undesired exploitation or bugs, since developers usually\n * assume that overflows raise errors. `SafeCast` restores this intuition by\n * reverting the transaction when such an operation overflows.\n *\n * Using this library instead of the unchecked operations eliminates an entire\n * class of bugs, so it's recommended to use it always.\n */\nlibrary SafeCast {\n    /**\n     * @dev Value doesn't fit in an uint of `bits` size.\n     */\n    error SafeCastOverflowedUintDowncast(uint8 bits, uint256 value);\n\n    /**\n     * @dev An int value doesn't fit in an uint of `bits` size.\n     */\n    error SafeCastOverflowedIntToUint(int256 value);\n\n    /**\n     * @dev Value doesn't fit in an int of `bits` size.\n     */\n    error SafeCastOverflowedIntDowncast(uint8 bits, int256 value);\n\n    /**\n     * @dev An uint value doesn't fit in an int of `bits` size.\n     */\n    error SafeCastOverflowedUintToInt(uint256 value);\n\n    /**\n     * @dev Returns the downcasted uint248 from uint256, reverting on\n     * overflow (when the input is greater than largest uint248).\n     *\n     * Counterpart to Solidity's `uint248` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 248 bits\n     */\n    function toUint248(uint256 value) internal pure returns (uint248) {\n        if (value > type(uint248).max) {\n            revert SafeCastOverflowedUintDowncast(248, value);\n        }\n        return uint248(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint240 from uint256, reverting on\n     * overflow (when the input is greater than largest uint240).\n     *\n     * Counterpart to Solidity's `uint240` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 240 bits\n     */\n    function toUint240(uint256 value) internal pure returns (uint240) {\n        if (value > type(uint240).max) {\n            revert SafeCastOverflowedUintDowncast(240, value);\n        }\n        return uint240(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint232 from uint256, reverting on\n     * overflow (when the input is greater than largest uint232).\n     *\n     * Counterpart to Solidity's `uint232` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 232 bits\n     */\n    function toUint232(uint256 value) internal pure returns (uint232) {\n        if (value > type(uint232).max) {\n            revert SafeCastOverflowedUintDowncast(232, value);\n        }\n        return uint232(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint224 from uint256, reverting on\n     * overflow (when the input is greater than largest uint224).\n     *\n     * Counterpart to Solidity's `uint224` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 224 bits\n     */\n    function toUint224(uint256 value) internal pure returns (uint224) {\n        if (value > type(uint224).max) {\n            revert SafeCastOverflowedUintDowncast(224, value);\n        }\n        return uint224(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint216 from uint256, reverting on\n     * overflow (when the input is greater than largest uint216).\n     *\n     * Counterpart to Solidity's `uint216` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 216 bits\n     */\n    function toUint216(uint256 value) internal pure returns (uint216) {\n        if (value > type(uint216).max) {\n            revert SafeCastOverflowedUintDowncast(216, value);\n        }\n        return uint216(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint208 from uint256, reverting on\n     * overflow (when the input is greater than largest uint208).\n     *\n     * Counterpart to Solidity's `uint208` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 208 bits\n     */\n    function toUint208(uint256 value) internal pure returns (uint208) {\n        if (value > type(uint208).max) {\n            revert SafeCastOverflowedUintDowncast(208, value);\n        }\n        return uint208(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint200 from uint256, reverting on\n     * overflow (when the input is greater than largest uint200).\n     *\n     * Counterpart to Solidity's `uint200` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 200 bits\n     */\n    function toUint200(uint256 value) internal pure returns (uint200) {\n        if (value > type(uint200).max) {\n            revert SafeCastOverflowedUintDowncast(200, value);\n        }\n        return uint200(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint192 from uint256, reverting on\n     * overflow (when the input is greater than largest uint192).\n     *\n     * Counterpart to Solidity's `uint192` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 192 bits\n     */\n    function toUint192(uint256 value) internal pure returns (uint192) {\n        if (value > type(uint192).max) {\n            revert SafeCastOverflowedUintDowncast(192, value);\n        }\n        return uint192(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint184 from uint256, reverting on\n     * overflow (when the input is greater than largest uint184).\n     *\n     * Counterpart to Solidity's `uint184` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 184 bits\n     */\n    function toUint184(uint256 value) internal pure returns (uint184) {\n        if (value > type(uint184).max) {\n            revert SafeCastOverflowedUintDowncast(184, value);\n        }\n        return uint184(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint176 from uint256, reverting on\n     * overflow (when the input is greater than largest uint176).\n     *\n     * Counterpart to Solidity's `uint176` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 176 bits\n     */\n    function toUint176(uint256 value) internal pure returns (uint176) {\n        if (value > type(uint176).max) {\n            revert SafeCastOverflowedUintDowncast(176, value);\n        }\n        return uint176(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint168 from uint256, reverting on\n     * overflow (when the input is greater than largest uint168).\n     *\n     * Counterpart to Solidity's `uint168` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 168 bits\n     */\n    function toUint168(uint256 value) internal pure returns (uint168) {\n        if (value > type(uint168).max) {\n            revert SafeCastOverflowedUintDowncast(168, value);\n        }\n        return uint168(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint160 from uint256, reverting on\n     * overflow (when the input is greater than largest uint160).\n     *\n     * Counterpart to Solidity's `uint160` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 160 bits\n     */\n    function toUint160(uint256 value) internal pure returns (uint160) {\n        if (value > type(uint160).max) {\n            revert SafeCastOverflowedUintDowncast(160, value);\n        }\n        return uint160(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint152 from uint256, reverting on\n     * overflow (when the input is greater than largest uint152).\n     *\n     * Counterpart to Solidity's `uint152` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 152 bits\n     */\n    function toUint152(uint256 value) internal pure returns (uint152) {\n        if (value > type(uint152).max) {\n            revert SafeCastOverflowedUintDowncast(152, value);\n        }\n        return uint152(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint144 from uint256, reverting on\n     * overflow (when the input is greater than largest uint144).\n     *\n     * Counterpart to Solidity's `uint144` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 144 bits\n     */\n    function toUint144(uint256 value) internal pure returns (uint144) {\n        if (value > type(uint144).max) {\n            revert SafeCastOverflowedUintDowncast(144, value);\n        }\n        return uint144(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint136 from uint256, reverting on\n     * overflow (when the input is greater than largest uint136).\n     *\n     * Counterpart to Solidity's `uint136` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 136 bits\n     */\n    function toUint136(uint256 value) internal pure returns (uint136) {\n        if (value > type(uint136).max) {\n            revert SafeCastOverflowedUintDowncast(136, value);\n        }\n        return uint136(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint128 from uint256, reverting on\n     * overflow (when the input is greater than largest uint128).\n     *\n     * Counterpart to Solidity's `uint128` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 128 bits\n     */\n    function toUint128(uint256 value) internal pure returns (uint128) {\n        if (value > type(uint128).max) {\n            revert SafeCastOverflowedUintDowncast(128, value);\n        }\n        return uint128(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint120 from uint256, reverting on\n     * overflow (when the input is greater than largest uint120).\n     *\n     * Counterpart to Solidity's `uint120` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 120 bits\n     */\n    function toUint120(uint256 value) internal pure returns (uint120) {\n        if (value > type(uint120).max) {\n            revert SafeCastOverflowedUintDowncast(120, value);\n        }\n        return uint120(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint112 from uint256, reverting on\n     * overflow (when the input is greater than largest uint112).\n     *\n     * Counterpart to Solidity's `uint112` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 112 bits\n     */\n    function toUint112(uint256 value) internal pure returns (uint112) {\n        if (value > type(uint112).max) {\n            revert SafeCastOverflowedUintDowncast(112, value);\n        }\n        return uint112(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint104 from uint256, reverting on\n     * overflow (when the input is greater than largest uint104).\n     *\n     * Counterpart to Solidity's `uint104` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 104 bits\n     */\n    function toUint104(uint256 value) internal pure returns (uint104) {\n        if (value > type(uint104).max) {\n            revert SafeCastOverflowedUintDowncast(104, value);\n        }\n        return uint104(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint96 from uint256, reverting on\n     * overflow (when the input is greater than largest uint96).\n     *\n     * Counterpart to Solidity's `uint96` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 96 bits\n     */\n    function toUint96(uint256 value) internal pure returns (uint96) {\n        if (value > type(uint96).max) {\n            revert SafeCastOverflowedUintDowncast(96, value);\n        }\n        return uint96(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint88 from uint256, reverting on\n     * overflow (when the input is greater than largest uint88).\n     *\n     * Counterpart to Solidity's `uint88` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 88 bits\n     */\n    function toUint88(uint256 value) internal pure returns (uint88) {\n        if (value > type(uint88).max) {\n            revert SafeCastOverflowedUintDowncast(88, value);\n        }\n        return uint88(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint80 from uint256, reverting on\n     * overflow (when the input is greater than largest uint80).\n     *\n     * Counterpart to Solidity's `uint80` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 80 bits\n     */\n    function toUint80(uint256 value) internal pure returns (uint80) {\n        if (value > type(uint80).max) {\n            revert SafeCastOverflowedUintDowncast(80, value);\n        }\n        return uint80(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint72 from uint256, reverting on\n     * overflow (when the input is greater than largest uint72).\n     *\n     * Counterpart to Solidity's `uint72` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 72 bits\n     */\n    function toUint72(uint256 value) internal pure returns (uint72) {\n        if (value > type(uint72).max) {\n            revert SafeCastOverflowedUintDowncast(72, value);\n        }\n        return uint72(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint64 from uint256, reverting on\n     * overflow (when the input is greater than largest uint64).\n     *\n     * Counterpart to Solidity's `uint64` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 64 bits\n     */\n    function toUint64(uint256 value) internal pure returns (uint64) {\n        if (value > type(uint64).max) {\n            revert SafeCastOverflowedUintDowncast(64, value);\n        }\n        return uint64(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint56 from uint256, reverting on\n     * overflow (when the input is greater than largest uint56).\n     *\n     * Counterpart to Solidity's `uint56` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 56 bits\n     */\n    function toUint56(uint256 value) internal pure returns (uint56) {\n        if (value > type(uint56).max) {\n            revert SafeCastOverflowedUintDowncast(56, value);\n        }\n        return uint56(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint48 from uint256, reverting on\n     * overflow (when the input is greater than largest uint48).\n     *\n     * Counterpart to Solidity's `uint48` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 48 bits\n     */\n    function toUint48(uint256 value) internal pure returns (uint48) {\n        if (value > type(uint48).max) {\n            revert SafeCastOverflowedUintDowncast(48, value);\n        }\n        return uint48(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint40 from uint256, reverting on\n     * overflow (when the input is greater than largest uint40).\n     *\n     * Counterpart to Solidity's `uint40` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 40 bits\n     */\n    function toUint40(uint256 value) internal pure returns (uint40) {\n        if (value > type(uint40).max) {\n            revert SafeCastOverflowedUintDowncast(40, value);\n        }\n        return uint40(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint32 from uint256, reverting on\n     * overflow (when the input is greater than largest uint32).\n     *\n     * Counterpart to Solidity's `uint32` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 32 bits\n     */\n    function toUint32(uint256 value) internal pure returns (uint32) {\n        if (value > type(uint32).max) {\n            revert SafeCastOverflowedUintDowncast(32, value);\n        }\n        return uint32(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint24 from uint256, reverting on\n     * overflow (when the input is greater than largest uint24).\n     *\n     * Counterpart to Solidity's `uint24` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 24 bits\n     */\n    function toUint24(uint256 value) internal pure returns (uint24) {\n        if (value > type(uint24).max) {\n            revert SafeCastOverflowedUintDowncast(24, value);\n        }\n        return uint24(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint16 from uint256, reverting on\n     * overflow (when the input is greater than largest uint16).\n     *\n     * Counterpart to Solidity's `uint16` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 16 bits\n     */\n    function toUint16(uint256 value) internal pure returns (uint16) {\n        if (value > type(uint16).max) {\n            revert SafeCastOverflowedUintDowncast(16, value);\n        }\n        return uint16(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint8 from uint256, reverting on\n     * overflow (when the input is greater than largest uint8).\n     *\n     * Counterpart to Solidity's `uint8` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 8 bits\n     */\n    function toUint8(uint256 value) internal pure returns (uint8) {\n        if (value > type(uint8).max) {\n            revert SafeCastOverflowedUintDowncast(8, value);\n        }\n        return uint8(value);\n    }\n\n    /**\n     * @dev Converts a signed int256 into an unsigned uint256.\n     *\n     * Requirements:\n     *\n     * - input must be greater than or equal to 0.\n     */\n    function toUint256(int256 value) internal pure returns (uint256) {\n        if (value < 0) {\n            revert SafeCastOverflowedIntToUint(value);\n        }\n        return uint256(value);\n    }\n\n    /**\n     * @dev Returns the downcasted int248 from int256, reverting on\n     * overflow (when the input is less than smallest int248 or\n     * greater than largest int248).\n     *\n     * Counterpart to Solidity's `int248` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 248 bits\n     */\n    function toInt248(int256 value) internal pure returns (int248 downcasted) {\n        downcasted = int248(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(248, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int240 from int256, reverting on\n     * overflow (when the input is less than smallest int240 or\n     * greater than largest int240).\n     *\n     * Counterpart to Solidity's `int240` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 240 bits\n     */\n    function toInt240(int256 value) internal pure returns (int240 downcasted) {\n        downcasted = int240(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(240, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int232 from int256, reverting on\n     * overflow (when the input is less than smallest int232 or\n     * greater than largest int232).\n     *\n     * Counterpart to Solidity's `int232` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 232 bits\n     */\n    function toInt232(int256 value) internal pure returns (int232 downcasted) {\n        downcasted = int232(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(232, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int224 from int256, reverting on\n     * overflow (when the input is less than smallest int224 or\n     * greater than largest int224).\n     *\n     * Counterpart to Solidity's `int224` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 224 bits\n     */\n    function toInt224(int256 value) internal pure returns (int224 downcasted) {\n        downcasted = int224(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(224, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int216 from int256, reverting on\n     * overflow (when the input is less than smallest int216 or\n     * greater than largest int216).\n     *\n     * Counterpart to Solidity's `int216` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 216 bits\n     */\n    function toInt216(int256 value) internal pure returns (int216 downcasted) {\n        downcasted = int216(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(216, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int208 from int256, reverting on\n     * overflow (when the input is less than smallest int208 or\n     * greater than largest int208).\n     *\n     * Counterpart to Solidity's `int208` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 208 bits\n     */\n    function toInt208(int256 value) internal pure returns (int208 downcasted) {\n        downcasted = int208(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(208, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int200 from int256, reverting on\n     * overflow (when the input is less than smallest int200 or\n     * greater than largest int200).\n     *\n     * Counterpart to Solidity's `int200` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 200 bits\n     */\n    function toInt200(int256 value) internal pure returns (int200 downcasted) {\n        downcasted = int200(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(200, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int192 from int256, reverting on\n     * overflow (when the input is less than smallest int192 or\n     * greater than largest int192).\n     *\n     * Counterpart to Solidity's `int192` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 192 bits\n     */\n    function toInt192(int256 value) internal pure returns (int192 downcasted) {\n        downcasted = int192(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(192, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int184 from int256, reverting on\n     * overflow (when the input is less than smallest int184 or\n     * greater than largest int184).\n     *\n     * Counterpart to Solidity's `int184` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 184 bits\n     */\n    function toInt184(int256 value) internal pure returns (int184 downcasted) {\n        downcasted = int184(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(184, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int176 from int256, reverting on\n     * overflow (when the input is less than smallest int176 or\n     * greater than largest int176).\n     *\n     * Counterpart to Solidity's `int176` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 176 bits\n     */\n    function toInt176(int256 value) internal pure returns (int176 downcasted) {\n        downcasted = int176(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(176, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int168 from int256, reverting on\n     * overflow (when the input is less than smallest int168 or\n     * greater than largest int168).\n     *\n     * Counterpart to Solidity's `int168` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 168 bits\n     */\n    function toInt168(int256 value) internal pure returns (int168 downcasted) {\n        downcasted = int168(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(168, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int160 from int256, reverting on\n     * overflow (when the input is less than smallest int160 or\n     * greater than largest int160).\n     *\n     * Counterpart to Solidity's `int160` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 160 bits\n     */\n    function toInt160(int256 value) internal pure returns (int160 downcasted) {\n        downcasted = int160(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(160, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int152 from int256, reverting on\n     * overflow (when the input is less than smallest int152 or\n     * greater than largest int152).\n     *\n     * Counterpart to Solidity's `int152` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 152 bits\n     */\n    function toInt152(int256 value) internal pure returns (int152 downcasted) {\n        downcasted = int152(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(152, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int144 from int256, reverting on\n     * overflow (when the input is less than smallest int144 or\n     * greater than largest int144).\n     *\n     * Counterpart to Solidity's `int144` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 144 bits\n     */\n    function toInt144(int256 value) internal pure returns (int144 downcasted) {\n        downcasted = int144(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(144, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int136 from int256, reverting on\n     * overflow (when the input is less than smallest int136 or\n     * greater than largest int136).\n     *\n     * Counterpart to Solidity's `int136` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 136 bits\n     */\n    function toInt136(int256 value) internal pure returns (int136 downcasted) {\n        downcasted = int136(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(136, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int128 from int256, reverting on\n     * overflow (when the input is less than smallest int128 or\n     * greater than largest int128).\n     *\n     * Counterpart to Solidity's `int128` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 128 bits\n     */\n    function toInt128(int256 value) internal pure returns (int128 downcasted) {\n        downcasted = int128(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(128, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int120 from int256, reverting on\n     * overflow (when the input is less than smallest int120 or\n     * greater than largest int120).\n     *\n     * Counterpart to Solidity's `int120` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 120 bits\n     */\n    function toInt120(int256 value) internal pure returns (int120 downcasted) {\n        downcasted = int120(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(120, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int112 from int256, reverting on\n     * overflow (when the input is less than smallest int112 or\n     * greater than largest int112).\n     *\n     * Counterpart to Solidity's `int112` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 112 bits\n     */\n    function toInt112(int256 value) internal pure returns (int112 downcasted) {\n        downcasted = int112(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(112, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int104 from int256, reverting on\n     * overflow (when the input is less than smallest int104 or\n     * greater than largest int104).\n     *\n     * Counterpart to Solidity's `int104` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 104 bits\n     */\n    function toInt104(int256 value) internal pure returns (int104 downcasted) {\n        downcasted = int104(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(104, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int96 from int256, reverting on\n     * overflow (when the input is less than smallest int96 or\n     * greater than largest int96).\n     *\n     * Counterpart to Solidity's `int96` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 96 bits\n     */\n    function toInt96(int256 value) internal pure returns (int96 downcasted) {\n        downcasted = int96(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(96, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int88 from int256, reverting on\n     * overflow (when the input is less than smallest int88 or\n     * greater than largest int88).\n     *\n     * Counterpart to Solidity's `int88` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 88 bits\n     */\n    function toInt88(int256 value) internal pure returns (int88 downcasted) {\n        downcasted = int88(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(88, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int80 from int256, reverting on\n     * overflow (when the input is less than smallest int80 or\n     * greater than largest int80).\n     *\n     * Counterpart to Solidity's `int80` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 80 bits\n     */\n    function toInt80(int256 value) internal pure returns (int80 downcasted) {\n        downcasted = int80(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(80, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int72 from int256, reverting on\n     * overflow (when the input is less than smallest int72 or\n     * greater than largest int72).\n     *\n     * Counterpart to Solidity's `int72` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 72 bits\n     */\n    function toInt72(int256 value) internal pure returns (int72 downcasted) {\n        downcasted = int72(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(72, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int64 from int256, reverting on\n     * overflow (when the input is less than smallest int64 or\n     * greater than largest int64).\n     *\n     * Counterpart to Solidity's `int64` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 64 bits\n     */\n    function toInt64(int256 value) internal pure returns (int64 downcasted) {\n        downcasted = int64(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(64, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int56 from int256, reverting on\n     * overflow (when the input is less than smallest int56 or\n     * greater than largest int56).\n     *\n     * Counterpart to Solidity's `int56` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 56 bits\n     */\n    function toInt56(int256 value) internal pure returns (int56 downcasted) {\n        downcasted = int56(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(56, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int48 from int256, reverting on\n     * overflow (when the input is less than smallest int48 or\n     * greater than largest int48).\n     *\n     * Counterpart to Solidity's `int48` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 48 bits\n     */\n    function toInt48(int256 value) internal pure returns (int48 downcasted) {\n        downcasted = int48(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(48, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int40 from int256, reverting on\n     * overflow (when the input is less than smallest int40 or\n     * greater than largest int40).\n     *\n     * Counterpart to Solidity's `int40` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 40 bits\n     */\n    function toInt40(int256 value) internal pure returns (int40 downcasted) {\n        downcasted = int40(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(40, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int32 from int256, reverting on\n     * overflow (when the input is less than smallest int32 or\n     * greater than largest int32).\n     *\n     * Counterpart to Solidity's `int32` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 32 bits\n     */\n    function toInt32(int256 value) internal pure returns (int32 downcasted) {\n        downcasted = int32(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(32, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int24 from int256, reverting on\n     * overflow (when the input is less than smallest int24 or\n     * greater than largest int24).\n     *\n     * Counterpart to Solidity's `int24` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 24 bits\n     */\n    function toInt24(int256 value) internal pure returns (int24 downcasted) {\n        downcasted = int24(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(24, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int16 from int256, reverting on\n     * overflow (when the input is less than smallest int16 or\n     * greater than largest int16).\n     *\n     * Counterpart to Solidity's `int16` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 16 bits\n     */\n    function toInt16(int256 value) internal pure returns (int16 downcasted) {\n        downcasted = int16(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(16, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int8 from int256, reverting on\n     * overflow (when the input is less than smallest int8 or\n     * greater than largest int8).\n     *\n     * Counterpart to Solidity's `int8` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 8 bits\n     */\n    function toInt8(int256 value) internal pure returns (int8 downcasted) {\n        downcasted = int8(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(8, value);\n        }\n    }\n\n    /**\n     * @dev Converts an unsigned uint256 into a signed int256.\n     *\n     * Requirements:\n     *\n     * - input must be less than or equal to maxInt256.\n     */\n    function toInt256(uint256 value) internal pure returns (int256) {\n        // Note: Unsafe cast below is okay because `type(int256).max` is guaranteed to be positive\n        if (value > uint256(type(int256).max)) {\n            revert SafeCastOverflowedUintToInt(value);\n        }\n        return int256(value);\n    }\n\n    /**\n     * @dev Cast a boolean (false or true) to a uint256 (0 or 1) with no jump.\n     */\n    function toUint(bool b) internal pure returns (uint256 u) {\n        assembly (\"memory-safe\") {\n            u := iszero(iszero(b))\n        }\n    }\n}\n"},"contracts/Governance.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.29;\n\nimport {Ownable} from \"@openzeppelin/contracts/access/Ownable.sol\";\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport {SafeERC20} from \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\nimport {IERC721} from \"@openzeppelin/contracts/token/ERC721/IERC721.sol\";\nimport {SafeCast} from \"@openzeppelin/contracts/utils/math/SafeCast.sol\";\nimport {Pausable} from \"@openzeppelin/contracts/utils/Pausable.sol\";\n\nimport {IStaking} from \"./interfaces/IStaking.sol\";\n\n/**\n * @title A contract for the governance of text-based proposals, with incentives for participants.\n * This is essentially a simplified version of the OpenZeppelin Governor\n * (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/5ac4d93ae318cdf6c8a1125dff3a439a2aeabb63/contracts/governance/Governor.sol),\n * with rewards and other BNB48-specific features implemented.\n */\ncontract Governance is Ownable, Pausable {\n    using SafeCast for uint256;\n    using SafeERC20 for IERC20;\n\n    enum ProposalState {\n        Active,\n        Defeated,\n        Succeeded,\n        Invalid,\n        Refunded\n    }\n\n    enum VoteType {\n        Against,\n        For,\n        Abstain\n    }\n\n    struct ProposalCore {\n        address proposer;\n        bool proposerRewardClaimed;\n        uint64 voteStart;\n        uint64 voteEnd;\n        uint256 totalStakeAtStart;\n        uint256 totalReward;\n        uint256 quorumThresholdBps;\n        uint256 forVotesThresholdBps;\n        uint256 proposerRewardBps;\n        bool refunded;\n    }\n\n    struct VoteInfo {\n        VoteType voteType;\n        uint256 weight;\n        bool rewardClaimed;\n    }\n\n    struct ProposalVote {\n        uint256 againstVotes;\n        uint256 forVotes;\n        uint256 abstainVotes;\n        mapping(address => VoteInfo) voteInfo;\n    }\n\n    // Events\n    event ProposalCreated(\n        uint256 indexed proposalId,\n        address indexed proposer,\n        uint64 voteStart,\n        uint64 voteEnd,\n        string title,\n        string description\n    );\n    event VoteCast(address indexed voter, uint256 indexed proposalId, uint8 support, uint256 weight, string reason);\n    event RewardPoolContributed(address indexed caller, uint256 amount);\n    event RewardClaimed(address indexed caller, uint256 indexed proposalId, uint256 amount);\n    event InvalidProposalRefunded(address indexed caller, uint256 indexed proposalId);\n    // Admin events\n    event VotingPeriodUpdated(address indexed caller, uint256 value);\n    event QuorumThresholdBpsUpdated(address indexed caller, uint256 value);\n    event ForVotesThresholdBpsUpdated(address indexed caller, uint256 value);\n    event MinDepositUpdated(address indexed caller, uint256 amount);\n    event RewardBpsUpdated(address indexed caller, uint256 value);\n    event MinRewardUpdated(address indexed caller, uint256 amount);\n    event MaxRewardUpdated(address indexed caller, uint256 amount);\n    event ProposerRewardBpsUpdated(address indexed caller, uint256 value);\n    event RewardPoolRemoved(address indexed caller, uint256 amount);\n\n    // The address of the Staking contract.\n    address public immutable staking;\n    // The address of the BNB48er NFT contract.\n    address public immutable bnb48er;\n\n    // The period to cast votes after a proposal is created, in seconds.\n    uint256 public votingPeriod;\n    // The required percentage of final votes within the total stakes at proposal time, expressed in basis points. 4800 = 48%.\n    uint256 public quorumThresholdBps;\n    // The required percentage of \"for\" votes within the non-abstinent voting stakes, in basis points.\n    uint256 public forVotesThresholdBps;\n    // The minimal amount of KOGE to create a proposal.\n    uint256 public minDeposit;\n    // The share of the reward pool for each proposal reward in basis points. 480 = 4.8%.\n    uint256 public rewardBps;\n    // The minimal amount of KOGE for each proposal reward from the reward pool.\n    uint256 public minReward;\n    // The maximal amount of KOGE for each proposal reward from the reward pool.\n    uint256 public maxReward;\n    // The proposer's share of each proposal reward in basis points. 480 = 4.8%.\n    uint256 public proposerRewardBps;\n\n    // The total amount of KOGE reserved for proposal rewards.\n    uint256 public rewardPool;\n    // tokenId => proposalId\n    mapping(uint256 => uint256) public bnb48ersInUse;\n    // proposalId => ProposalCore\n    mapping(uint256 => ProposalCore) public proposals;\n    // proposalId => ProposalVote\n    mapping(uint256 => ProposalVote) public proposalVotes;\n\n    // The global proposal ID.\n    uint256 private _proposalIdCounter;\n\n    /**\n     * @notice Governance constructor.\n     * @param _staking The address of the Staking contract.\n     * @param _bnb48er The address of the BNB48er NFT contract.\n     * @param _votingPeriod The period to cast votes after a proposal is created, in seconds.\n     * @param _quorumThresholdBps The required percentage of final votes within the total stakes at proposal time, in basis points.\n     * @param _forVotesThresholdBps The required percentage of \"for\" votes within the non-abstinent voting stakes, in basis points.\n     * @param _minDeposit The minimal amount of KOGE to create a proposal.\n     * @param _rewardBps The share of the reward pool for each proposal reward in basis points.\n     * @param _minReward The minimal amount of KOGE for each proposal reward from the reward pool.\n     * @param _maxReward The maximal amount of KOGE for each proposal reward from the reward pool.\n     * @param _proposerRewardBps The proposer's share of each proposal reward in basis points.\n     * @param _lastProposalId The last proposal ID from the legacy Governance contract.\n     */\n    constructor(\n        address _staking,\n        address _bnb48er,\n        uint256 _votingPeriod,\n        uint256 _quorumThresholdBps,\n        uint256 _forVotesThresholdBps,\n        uint256 _minDeposit,\n        uint256 _rewardBps,\n        uint256 _minReward,\n        uint256 _maxReward,\n        uint256 _proposerRewardBps,\n        uint256 _lastProposalId\n    ) Ownable(msg.sender) {\n        staking = _staking;\n        bnb48er = _bnb48er;\n        votingPeriod = _votingPeriod;\n        quorumThresholdBps = _quorumThresholdBps;\n        forVotesThresholdBps = _forVotesThresholdBps;\n        minDeposit = _minDeposit;\n        rewardBps = _rewardBps;\n        minReward = _minReward;\n        maxReward = _maxReward;\n        proposerRewardBps = _proposerRewardBps;\n        _proposalIdCounter = _lastProposalId;\n    }\n\n    /**\n     * @notice Returns the current state of a proposal.\n     * @param _proposalId The proposal ID.\n     */\n    function state(uint256 _proposalId) public view returns (ProposalState) {\n        ProposalCore storage proposal = proposals[_proposalId];\n\n        if (proposal.refunded) {\n            return ProposalState.Refunded;\n        }\n        uint64 voteStart = proposals[_proposalId].voteStart;\n        if (voteStart == 0) {\n            revert(\"unknown proposal ID\");\n        }\n        if (proposals[_proposalId].voteEnd >= block.timestamp) {\n            return ProposalState.Active;\n        }\n        if (!_quorumReached(_proposalId)) {\n            return ProposalState.Invalid;\n        }\n        if (_voteSucceeded(_proposalId)) {\n            return ProposalState.Succeeded;\n        }\n        return ProposalState.Defeated;\n    }\n\n    /**\n     * @notice Create a new proposal. Vote starts immediately and ends `votingPeriod` blocks afterwards.\n     * @param _tokenId The token ID for the BNB48er NFT to be associated with the proposal. An NFT can only be associated\n     * with a single active proposal.\n     * @param _deposit The amount of KOGE to be paid to the reward pool.\n     * @param _title The title of the proposal.\n     * @param _description The content of the proposal.\n     */\n    function propose(\n        uint256 _tokenId,\n        uint256 _deposit,\n        string memory _title,\n        string memory _description\n    ) external whenNotPaused returns (uint256 proposalId) {\n        require(IERC721(bnb48er).ownerOf(_tokenId) == msg.sender, \"not NFT owner\");\n        require(!isNftInUse(_tokenId), \"NFT in use\");\n        require(_deposit >= minDeposit, \"deposit not enough\");\n\n        ++_proposalIdCounter;\n        proposalId = _proposalIdCounter;\n\n        ProposalCore storage proposal = proposals[proposalId];\n        require(proposal.voteStart == 0, \"proposal already exists\");\n\n        proposal.proposer = msg.sender;\n        uint64 voteStart = block.timestamp.toUint64();\n        uint64 voteEnd = voteStart + votingPeriod.toUint64();\n        proposal.voteStart = voteStart;\n        proposal.voteEnd = voteEnd;\n        proposal.totalStakeAtStart = IStaking(staking).totalStakes();\n        proposal.quorumThresholdBps = quorumThresholdBps;\n        proposal.forVotesThresholdBps = forVotesThresholdBps;\n        proposal.proposerRewardBps = proposerRewardBps;\n\n        // Calculate reward.\n        uint256 rewardFromPool = calcRewardFromPool();\n        proposal.totalReward = rewardFromPool + _deposit;\n        // The `rewardFromPool` reserved will be refunded if the proposal fails to reach quorum.\n        rewardPool -= rewardFromPool;\n\n        // Update BNB48er in use.\n        bnb48ersInUse[_tokenId] = proposalId;\n        // Charge proposal deposit.\n        IERC20(IStaking(staking).koge()).safeTransferFrom(msg.sender, address(this), _deposit);\n\n        emit ProposalCreated(proposalId, msg.sender, voteStart, voteEnd, _title, _description);\n        return proposalId;\n    }\n\n    /**\n     * @notice Returns whether the given NFT is being used for an active proposal.\n     * @param _tokenId The token ID.\n     */\n    function isNftInUse(uint256 _tokenId) public view returns (bool) {\n        uint256 nftProposalId = bnb48ersInUse[_tokenId];\n        if (nftProposalId != 0) {\n            ProposalState inUseState = state(nftProposalId);\n            if (inUseState == ProposalState.Active) {\n                return true;\n            }\n        }\n        return false;\n    }\n\n    /**\n     * @dev Calculates the next proposal reward that should be reserved from the reward pool\n     * based on the current parameters.\n     */\n    function calcRewardFromPool() public view returns (uint256) {\n        if (rewardPool < minReward) {\n            return rewardPool;\n        }\n        uint256 reward = (rewardPool * rewardBps) / 1e4;\n        if (reward > maxReward) {\n            return maxReward;\n        }\n        if (reward < minReward) {\n            return minReward;\n        }\n        return reward;\n    }\n\n    /**\n     * @notice Accessor to the proposal vote counts.\n     * @param _proposalId The proposal ID.\n     */\n    function proposalVoteCounts(\n        uint256 _proposalId\n    ) public view returns (uint256 _againstVotes, uint256 _forVotes, uint256 _abstainVotes) {\n        ProposalVote storage proposalVote = proposalVotes[_proposalId];\n        return (proposalVote.againstVotes, proposalVote.forVotes, proposalVote.abstainVotes);\n    }\n\n    /**\n     * @notice Accessor to the vote info of a proposal for an account.\n     * @param _proposalId The proposal ID.\n     * @param _account The voting account.\n     */\n    function proposalVoteInfo(uint256 _proposalId, address _account) public view returns (VoteInfo memory _voteInfo) {\n        ProposalVote storage proposalVote = proposalVotes[_proposalId];\n        return proposalVote.voteInfo[_account];\n    }\n\n    /**\n     * @dev Returns if the amount of votes already cast passes the threshold limit.\n     * @param _proposalId The proposal ID.\n     */\n    function _quorumReached(uint256 _proposalId) internal view returns (bool) {\n        ProposalCore storage proposal = proposals[_proposalId];\n        ProposalVote storage proposalVote = proposalVotes[_proposalId];\n\n        return\n            (proposalVote.againstVotes + proposalVote.forVotes + proposalVote.abstainVotes) >=\n            ((proposal.totalStakeAtStart * proposal.quorumThresholdBps) / 1e4);\n    }\n\n    /**\n     * @dev Returns if the vote succeeded. Checks \"for\" votes threshold.\n     * @param _proposalId The proposal ID.\n     */\n    function _voteSucceeded(uint256 _proposalId) internal view returns (bool) {\n        ProposalCore storage proposal = proposals[_proposalId];\n        ProposalVote storage proposalVote = proposalVotes[_proposalId];\n\n        return\n            proposalVote.forVotes >=\n            (((proposalVote.againstVotes + proposalVote.forVotes) * proposal.forVotesThresholdBps) / 1e4);\n    }\n\n    /**\n     * @notice Casts a vote.\n     * @param _proposalId The proposal ID.\n     * @param _support The vote enum type.\n     * @param _reason The optional reason for the vote.\n     */\n    function castVote(\n        uint256 _proposalId,\n        uint8 _support,\n        string memory _reason\n    ) external whenNotPaused returns (uint256) {\n        require(state(_proposalId) == ProposalState.Active, \"vote not active\");\n\n        uint256 weight = IStaking(staking).getStake(msg.sender);\n        _countVote(_proposalId, msg.sender, _support, weight);\n\n        emit VoteCast(msg.sender, _proposalId, _support, weight, _reason);\n\n        return weight;\n    }\n\n    /**\n     * @dev Registers a vote with a given support and voting weight.\n     * @param _proposalId The proposal ID.\n     * @param _account The voting account.\n     * @param _support The vote enum type.\n     * @param _weight The weight of the vote.\n     */\n    function _countVote(uint256 _proposalId, address _account, uint8 _support, uint256 _weight) internal {\n        ProposalVote storage proposalVote = proposalVotes[_proposalId];\n        VoteInfo storage info = proposalVote.voteInfo[_account];\n        require(info.weight == 0, \"vote already cast\");\n\n        if (_support == uint8(VoteType.Against)) {\n            proposalVote.againstVotes += _weight;\n        } else if (_support == uint8(VoteType.For)) {\n            proposalVote.forVotes += _weight;\n        } else if (_support == uint8(VoteType.Abstain)) {\n            proposalVote.abstainVotes += _weight;\n        } else {\n            revert(\"invalid value for enum VoteType\");\n        }\n        info.weight = _weight;\n        info.voteType = VoteType(_support);\n    }\n\n    /**\n     * @notice Claims KOGE reward for valid proposals.\n     * @param _proposalId The proposal ID.\n     */\n    function claimReward(uint256 _proposalId) external whenNotPaused {\n        ProposalCore storage proposal = proposals[_proposalId];\n        ProposalVote storage proposalVote = proposalVotes[_proposalId];\n        VoteInfo storage voteInfo = proposalVote.voteInfo[msg.sender];\n        (bool isProposer, bool isVoter, uint256 claimableAmount) = _getClaimableRewardInfo(\n            msg.sender,\n            _proposalId,\n            proposal,\n            proposalVote,\n            voteInfo\n        );\n        require(claimableAmount > 0, \"no claimable amount\");\n\n        // Mark claimed\n        if (isProposer) {\n            proposal.proposerRewardClaimed = true;\n        }\n        if (isVoter) {\n            voteInfo.rewardClaimed = true;\n        }\n\n        IERC20(IStaking(staking).koge()).safeTransfer(msg.sender, claimableAmount);\n        emit RewardClaimed(msg.sender, _proposalId, claimableAmount);\n    }\n\n    /**\n     * @notice Get claimable reward info for an account and a proposal.\n     * @param _account The account address.\n     * @param _proposalId The proposal ID.\n     */\n    function getClaimableRewardInfo(\n        address _account,\n        uint256 _proposalId\n    ) public view returns (bool isProposer, bool isVoter, uint256 claimableAmount) {\n        ProposalCore storage proposal = proposals[_proposalId];\n        ProposalVote storage proposalVote = proposalVotes[_proposalId];\n        VoteInfo storage voteInfo = proposalVote.voteInfo[_account];\n        return _getClaimableRewardInfo(_account, _proposalId, proposal, proposalVote, voteInfo);\n    }\n\n    /**\n     * @dev Internal getter for claimable reward info for an account and a proposal.\n     * @param _account The account address.\n     * @param _proposalId The proposal ID.\n     * @param _proposal The ProposalCore.\n     * @param _proposalVote The ProposalVote.\n     * @param _voteInfo The VoteInfo of the account.\n     */\n    function _getClaimableRewardInfo(\n        address _account,\n        uint256 _proposalId,\n        ProposalCore storage _proposal,\n        ProposalVote storage _proposalVote,\n        VoteInfo storage _voteInfo\n    ) internal view returns (bool isProposer, bool isVoter, uint256 claimableAmount) {\n        isProposer = _proposal.proposer == _account;\n        isVoter = _voteInfo.weight > 0;\n        ProposalState proposalState = state(_proposalId);\n        // Proposal invalid or not finalized\n        if (proposalState != ProposalState.Succeeded && proposalState != ProposalState.Defeated) {\n            return (isProposer, isVoter, 0);\n        }\n        // Proposer already claimed\n        if (isProposer && _proposal.proposerRewardClaimed) {\n            return (isProposer, isVoter, 0);\n        }\n        // Voter already claimed\n        if (_voteInfo.weight > 0 && _voteInfo.rewardClaimed) {\n            return (isProposer, isVoter, 0);\n        }\n\n        uint256 proposerReward = (_proposal.totalReward * _proposal.proposerRewardBps) / 1e4;\n        claimableAmount =\n            ((_proposal.totalReward - proposerReward) * _voteInfo.weight) /\n            (_proposalVote.forVotes + _proposalVote.againstVotes + _proposalVote.abstainVotes);\n        if (isProposer) {\n            claimableAmount += proposerReward;\n        }\n        return (isProposer, isVoter, claimableAmount);\n    }\n\n    /**\n     * @notice Refunds KOGE to the reward pool for a proposal that failed to reach quorum.\n     * @param _proposalId The proposal ID.\n     */\n    function refundInvalidProposal(uint256 _proposalId) external whenNotPaused {\n        ProposalCore storage proposal = proposals[_proposalId];\n        require(state(_proposalId) == ProposalState.Invalid, \"not invalid proposal\");\n\n        proposal.refunded = true;\n        rewardPool += proposal.totalReward;\n\n        emit InvalidProposalRefunded(msg.sender, _proposalId);\n    }\n\n    /**\n     * @notice Contributes KOGE to the proposal reward pool.\n     * @param _amount The amount to contribute.\n     */\n    function contributeToRewardPool(uint256 _amount) external whenNotPaused {\n        rewardPool += _amount;\n        IERC20(IStaking(staking).koge()).safeTransferFrom(msg.sender, address(this), _amount);\n        emit RewardPoolContributed(msg.sender, _amount);\n    }\n\n    // -------------------- Admin --------------------\n\n    /**\n     * @dev Sets `votingPeriod`.\n     * @param _votingPeriod The new `votingPeriod`.\n     */\n    function setVotingPeriod(uint256 _votingPeriod) external onlyOwner {\n        votingPeriod = _votingPeriod;\n        emit VotingPeriodUpdated(msg.sender, _votingPeriod);\n    }\n\n    /**\n     * @dev Sets `quorumThresholdBps`.\n     * @param _quorumThresholdBps The new `quorumThresholdBps`.\n     */\n    function setQuorumThresholdBps(uint256 _quorumThresholdBps) external onlyOwner {\n        quorumThresholdBps = _quorumThresholdBps;\n        emit QuorumThresholdBpsUpdated(msg.sender, _quorumThresholdBps);\n    }\n\n    /**\n     * @dev Sets `forVotesThresholdBps`.\n     * @param _forVotesThresholdBps The new `forVotesThresholdBps`.\n     */\n    function setForVotesThresholdBps(uint256 _forVotesThresholdBps) external onlyOwner {\n        forVotesThresholdBps = _forVotesThresholdBps;\n        emit ForVotesThresholdBpsUpdated(msg.sender, _forVotesThresholdBps);\n    }\n\n    /**\n     * @dev Sets `minDeposit`.\n     * @param _minDeposit The new `minDeposit`.\n     */\n    function setMinDeposit(uint256 _minDeposit) external onlyOwner {\n        minDeposit = _minDeposit;\n        emit MinDepositUpdated(msg.sender, _minDeposit);\n    }\n\n    /**\n     * @dev Sets `rewardBps`.\n     * @param _rewardBps The new `rewardBps`.\n     */\n    function setRewardBps(uint256 _rewardBps) external onlyOwner {\n        rewardBps = _rewardBps;\n        emit RewardBpsUpdated(msg.sender, _rewardBps);\n    }\n\n    /**\n     * @dev Sets `minReward`.\n     * @param _minReward The new `minReward`.\n     */\n    function setMinReward(uint256 _minReward) external onlyOwner {\n        minReward = _minReward;\n        emit MinRewardUpdated(msg.sender, _minReward);\n    }\n\n    /**\n     * @dev Sets `maxReward`.\n     * @param _maxReward The new `maxReward`.\n     */\n    function setMaxReward(uint256 _maxReward) external onlyOwner {\n        maxReward = _maxReward;\n        emit MaxRewardUpdated(msg.sender, _maxReward);\n    }\n\n    /**\n     * @dev Sets `proposerRewardBps`.\n     * @param _proposerRewardBps The new `proposerRewardBps`.\n     */\n    function setProposerRewardBps(uint256 _proposerRewardBps) external onlyOwner {\n        proposerRewardBps = _proposerRewardBps;\n        emit ProposerRewardBpsUpdated(msg.sender, _proposerRewardBps);\n    }\n\n    /**\n     * @notice Removes KOGE from the proposal reward pool.\n     * @param _amount The amount to remove.\n     */\n    function removeFromRewardPool(uint256 _amount) external onlyOwner {\n        rewardPool -= _amount;\n        IERC20(IStaking(staking).koge()).safeTransfer(msg.sender, _amount);\n        emit RewardPoolRemoved(msg.sender, _amount);\n    }\n\n    /**\n     * @notice Pauses the contract.\n     */\n    function pause() external onlyOwner {\n        _pause();\n    }\n\n    /**\n     * @notice Unpauses the contract.\n     */\n    function unpause() external onlyOwner {\n        _unpause();\n    }\n}\n"},"contracts/interfaces/IStaking.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\ninterface IStaking {\n    function koge() external view returns (address);\n    function totalStakes() external view returns (uint256);\n    function getStake(address _user) external view returns (uint256);\n}\n"}},"compilation":{"language":"Solidity","compiler":"solc","compilerVersion":"0.8.29+commit.ab55807c","compilerSettings":{"viaIR":true,"metadata":{"useLiteralContent":true},"optimizer":{"runs":800,"enabled":true},"evmVersion":"paris"},"name":"Governance","fullyQualifiedName":"contracts/Governance.sol:Governance"},"abi":[{"type":"constructor","inputs":[{"name":"_staking","type":"address","internalType":"address"},{"name":"_bnb48er","type":"address","internalType":"address"},{"name":"_votingPeriod","type":"uint256","internalType":"uint256"},{"name":"_quorumThresholdBps","type":"uint256","internalType":"uint256"},{"name":"_forVotesThresholdBps","type":"uint256","internalType":"uint256"},{"name":"_minDeposit","type":"uint256","internalType":"uint256"},{"name":"_rewardBps","type":"uint256","internalType":"uint256"},{"name":"_minReward","type":"uint256","internalType":"uint256"},{"name":"_maxReward","type":"uint256","internalType":"uint256"},{"name":"_proposerRewardBps","type":"uint256","internalType":"uint256"},{"name":"_lastProposalId","type":"uint256","internalType":"uint256"}],"stateMutability":"nonpayable"},{"name":"EnforcedPause","type":"error","inputs":[]},{"name":"ExpectedPause","type":"error","inputs":[]},{"name":"OwnableInvalidOwner","type":"error","inputs":[{"name":"owner","type":"address","internalType":"address"}]},{"name":"OwnableUnauthorizedAccount","type":"error","inputs":[{"name":"account","type":"address","internalType":"address"}]},{"name":"SafeCastOverflowedUintDowncast","type":"error","inputs":[{"name":"bits","type":"uint8","internalType":"uint8"},{"name":"value","type":"uint256","internalType":"uint256"}]},{"name":"SafeERC20FailedOperation","type":"error","inputs":[{"name":"token","type":"address","internalType":"address"}]},{"name":"ForVotesThresholdBpsUpdated","type":"event","inputs":[{"name":"caller","type":"address","indexed":true,"internalType":"address"},{"name":"value","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"name":"InvalidProposalRefunded","type":"event","inputs":[{"name":"caller","type":"address","indexed":true,"internalType":"address"},{"name":"proposalId","type":"uint256","indexed":true,"internalType":"uint256"}],"anonymous":false},{"name":"MaxRewardUpdated","type":"event","inputs":[{"name":"caller","type":"address","indexed":true,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"name":"MinDepositUpdated","type":"event","inputs":[{"name":"caller","type":"address","indexed":true,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"name":"MinRewardUpdated","type":"event","inputs":[{"name":"caller","type":"address","indexed":true,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"name":"OwnershipTransferred","type":"event","inputs":[{"name":"previousOwner","type":"address","indexed":true,"internalType":"address"},{"name":"newOwner","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"name":"Paused","type":"event","inputs":[{"name":"account","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"name":"ProposalCreated","type":"event","inputs":[{"name":"proposalId","type":"uint256","indexed":true,"internalType":"uint256"},{"name":"proposer","type":"address","indexed":true,"internalType":"address"},{"name":"voteStart","type":"uint64","indexed":false,"internalType":"uint64"},{"name":"voteEnd","type":"uint64","indexed":false,"internalType":"uint64"},{"name":"title","type":"string","indexed":false,"internalType":"string"},{"name":"description","type":"string","indexed":false,"internalType":"string"}],"anonymous":false},{"name":"ProposerRewardBpsUpdated","type":"event","inputs":[{"name":"caller","type":"address","indexed":true,"internalType":"address"},{"name":"value","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"name":"QuorumThresholdBpsUpdated","type":"event","inputs":[{"name":"caller","type":"address","indexed":true,"internalType":"address"},{"name":"value","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"name":"RewardBpsUpdated","type":"event","inputs":[{"name":"caller","type":"address","indexed":true,"internalType":"address"},{"name":"value","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"name":"RewardClaimed","type":"event","inputs":[{"name":"caller","type":"address","indexed":true,"internalType":"address"},{"name":"proposalId","type":"uint256","indexed":true,"internalType":"uint256"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"name":"RewardPoolContributed","type":"event","inputs":[{"name":"caller","type":"address","indexed":true,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"name":"RewardPoolRemoved","type":"event","inputs":[{"name":"caller","type":"address","indexed":true,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"name":"Unpaused","type":"event","inputs":[{"name":"account","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"name":"VoteCast","type":"event","inputs":[{"name":"voter","type":"address","indexed":true,"internalType":"address"},{"name":"proposalId","type":"uint256","indexed":true,"internalType":"uint256"},{"name":"support","type":"uint8","indexed":false,"internalType":"uint8"},{"name":"weight","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"reason","type":"string","indexed":false,"internalType":"string"}],"anonymous":false},{"name":"VotingPeriodUpdated","type":"event","inputs":[{"name":"caller","type":"address","indexed":true,"internalType":"address"},{"name":"value","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"name":"bnb48er","type":"function","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"name":"bnb48ersInUse","type":"function","inputs":[{"name":"","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"calcRewardFromPool","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"castVote","type":"function","inputs":[{"name":"_proposalId","type":"uint256","internalType":"uint256"},{"name":"_support","type":"uint8","internalType":"uint8"},{"name":"_reason","type":"string","internalType":"string"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"nonpayable"},{"name":"claimReward","type":"function","inputs":[{"name":"_proposalId","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"contributeToRewardPool","type":"function","inputs":[{"name":"_amount","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"forVotesThresholdBps","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"getClaimableRewardInfo","type":"function","inputs":[{"name":"_account","type":"address","internalType":"address"},{"name":"_proposalId","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"isProposer","type":"bool","internalType":"bool"},{"name":"isVoter","type":"bool","internalType":"bool"},{"name":"claimableAmount","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"isNftInUse","type":"function","inputs":[{"name":"_tokenId","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"name":"maxReward","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"minDeposit","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"minReward","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"owner","type":"function","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"name":"pause","type":"function","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"name":"paused","type":"function","inputs":[],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"name":"proposalVoteCounts","type":"function","inputs":[{"name":"_proposalId","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"_againstVotes","type":"uint256","internalType":"uint256"},{"name":"_forVotes","type":"uint256","internalType":"uint256"},{"name":"_abstainVotes","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"proposalVoteInfo","type":"function","inputs":[{"name":"_proposalId","type":"uint256","internalType":"uint256"},{"name":"_account","type":"address","internalType":"address"}],"outputs":[{"name":"_voteInfo","type":"tuple","components":[{"name":"voteType","type":"uint8","internalType":"enum Governance.VoteType"},{"name":"weight","type":"uint256","internalType":"uint256"},{"name":"rewardClaimed","type":"bool","internalType":"bool"}],"internalType":"struct Governance.VoteInfo"}],"stateMutability":"view"},{"name":"proposalVotes","type":"function","inputs":[{"name":"","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"againstVotes","type":"uint256","internalType":"uint256"},{"name":"forVotes","type":"uint256","internalType":"uint256"},{"name":"abstainVotes","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"proposals","type":"function","inputs":[{"name":"","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"proposer","type":"address","internalType":"address"},{"name":"proposerRewardClaimed","type":"bool","internalType":"bool"},{"name":"voteStart","type":"uint64","internalType":"uint64"},{"name":"voteEnd","type":"uint64","internalType":"uint64"},{"name":"totalStakeAtStart","type":"uint256","internalType":"uint256"},{"name":"totalReward","type":"uint256","internalType":"uint256"},{"name":"quorumThresholdBps","type":"uint256","internalType":"uint256"},{"name":"forVotesThresholdBps","type":"uint256","internalType":"uint256"},{"name":"proposerRewardBps","type":"uint256","internalType":"uint256"},{"name":"refunded","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"name":"propose","type":"function","inputs":[{"name":"_tokenId","type":"uint256","internalType":"uint256"},{"name":"_deposit","type":"uint256","internalType":"uint256"},{"name":"_title","type":"string","internalType":"string"},{"name":"_description","type":"string","internalType":"string"}],"outputs":[{"name":"proposalId","type":"uint256","internalType":"uint256"}],"stateMutability":"nonpayable"},{"name":"proposerRewardBps","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"quorumThresholdBps","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"refundInvalidProposal","type":"function","inputs":[{"name":"_proposalId","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"removeFromRewardPool","type":"function","inputs":[{"name":"_amount","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"renounceOwnership","type":"function","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"name":"rewardBps","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"rewardPool","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"setForVotesThresholdBps","type":"function","inputs":[{"name":"_forVotesThresholdBps","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"setMaxReward","type":"function","inputs":[{"name":"_maxReward","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"setMinDeposit","type":"function","inputs":[{"name":"_minDeposit","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"setMinReward","type":"function","inputs":[{"name":"_minReward","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"setProposerRewardBps","type":"function","inputs":[{"name":"_proposerRewardBps","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"setQuorumThresholdBps","type":"function","inputs":[{"name":"_quorumThresholdBps","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"setRewardBps","type":"function","inputs":[{"name":"_rewardBps","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"setVotingPeriod","type":"function","inputs":[{"name":"_votingPeriod","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"staking","type":"function","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"name":"state","type":"function","inputs":[{"name":"_proposalId","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"uint8","internalType":"enum Governance.ProposalState"}],"stateMutability":"view"},{"name":"transferOwnership","type":"function","inputs":[{"name":"newOwner","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"unpause","type":"function","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"name":"votingPeriod","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"}],"metadata":{"compiler":{"version":"0.8.29+commit.ab55807c"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"address","name":"_staking","type":"address"},{"internalType":"address","name":"_bnb48er","type":"address"},{"internalType":"uint256","name":"_votingPeriod","type":"uint256"},{"internalType":"uint256","name":"_quorumThresholdBps","type":"uint256"},{"internalType":"uint256","name":"_forVotesThresholdBps","type":"uint256"},{"internalType":"uint256","name":"_minDeposit","type":"uint256"},{"internalType":"uint256","name":"_rewardBps","type":"uint256"},{"internalType":"uint256","name":"_minReward","type":"uint256"},{"internalType":"uint256","name":"_maxReward","type":"uint256"},{"internalType":"uint256","name":"_proposerRewardBps","type":"uint256"},{"internalType":"uint256","name":"_lastProposalId","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"EnforcedPause","type":"error"},{"inputs":[],"name":"ExpectedPause","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[{"internalType":"uint8","name":"bits","type":"uint8"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"SafeCastOverflowedUintDowncast","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"SafeERC20FailedOperation","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"caller","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"ForVotesThresholdBpsUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"caller","type":"address"},{"indexed":true,"internalType":"uint256","name":"proposalId","type":"uint256"}],"name":"InvalidProposalRefunded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"caller","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"MaxRewardUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"caller","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"MinDepositUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"caller","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"MinRewardUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"proposalId","type":"uint256"},{"indexed":true,"internalType":"address","name":"proposer","type":"address"},{"indexed":false,"internalType":"uint64","name":"voteStart","type":"uint64"},{"indexed":false,"internalType":"uint64","name":"voteEnd","type":"uint64"},{"indexed":false,"internalType":"string","name":"title","type":"string"},{"indexed":false,"internalType":"string","name":"description","type":"string"}],"name":"ProposalCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"caller","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"ProposerRewardBpsUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"caller","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"QuorumThresholdBpsUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"caller","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"RewardBpsUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"caller","type":"address"},{"indexed":true,"internalType":"uint256","name":"proposalId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RewardClaimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"caller","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RewardPoolContributed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"caller","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RewardPoolRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"voter","type":"address"},{"indexed":true,"internalType":"uint256","name":"proposalId","type":"uint256"},{"indexed":false,"internalType":"uint8","name":"support","type":"uint8"},{"indexed":false,"internalType":"uint256","name":"weight","type":"uint256"},{"indexed":false,"internalType":"string","name":"reason","type":"string"}],"name":"VoteCast","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"caller","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"VotingPeriodUpdated","type":"event"},{"inputs":[],"name":"bnb48er","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"bnb48ersInUse","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"calcRewardFromPool","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_proposalId","type":"uint256"},{"internalType":"uint8","name":"_support","type":"uint8"},{"internalType":"string","name":"_reason","type":"string"}],"name":"castVote","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_proposalId","type":"uint256"}],"name":"claimReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"contributeToRewardPool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"forVotesThresholdBps","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"},{"internalType":"uint256","name":"_proposalId","type":"uint256"}],"name":"getClaimableRewardInfo","outputs":[{"internalType":"bool","name":"isProposer","type":"bool"},{"internalType":"bool","name":"isVoter","type":"bool"},{"internalType":"uint256","name":"claimableAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"isNftInUse","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxReward","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minDeposit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minReward","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_proposalId","type":"uint256"}],"name":"proposalVoteCounts","outputs":[{"internalType":"uint256","name":"_againstVotes","type":"uint256"},{"internalType":"uint256","name":"_forVotes","type":"uint256"},{"internalType":"uint256","name":"_abstainVotes","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_proposalId","type":"uint256"},{"internalType":"address","name":"_account","type":"address"}],"name":"proposalVoteInfo","outputs":[{"components":[{"internalType":"enum Governance.VoteType","name":"voteType","type":"uint8"},{"internalType":"uint256","name":"weight","type":"uint256"},{"internalType":"bool","name":"rewardClaimed","type":"bool"}],"internalType":"struct Governance.VoteInfo","name":"_voteInfo","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"proposalVotes","outputs":[{"internalType":"uint256","name":"againstVotes","type":"uint256"},{"internalType":"uint256","name":"forVotes","type":"uint256"},{"internalType":"uint256","name":"abstainVotes","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"proposals","outputs":[{"internalType":"address","name":"proposer","type":"address"},{"internalType":"bool","name":"proposerRewardClaimed","type":"bool"},{"internalType":"uint64","name":"voteStart","type":"uint64"},{"internalType":"uint64","name":"voteEnd","type":"uint64"},{"internalType":"uint256","name":"totalStakeAtStart","type":"uint256"},{"internalType":"uint256","name":"totalReward","type":"uint256"},{"internalType":"uint256","name":"quorumThresholdBps","type":"uint256"},{"internalType":"uint256","name":"forVotesThresholdBps","type":"uint256"},{"internalType":"uint256","name":"proposerRewardBps","type":"uint256"},{"internalType":"bool","name":"refunded","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_deposit","type":"uint256"},{"internalType":"string","name":"_title","type":"string"},{"internalType":"string","name":"_description","type":"string"}],"name":"propose","outputs":[{"internalType":"uint256","name":"proposalId","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"proposerRewardBps","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"quorumThresholdBps","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_proposalId","type":"uint256"}],"name":"refundInvalidProposal","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"removeFromRewardPool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardBps","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardPool","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_forVotesThresholdBps","type":"uint256"}],"name":"setForVotesThresholdBps","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxReward","type":"uint256"}],"name":"setMaxReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_minDeposit","type":"uint256"}],"name":"setMinDeposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_minReward","type":"uint256"}],"name":"setMinReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_proposerRewardBps","type":"uint256"}],"name":"setProposerRewardBps","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_quorumThresholdBps","type":"uint256"}],"name":"setQuorumThresholdBps","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_rewardBps","type":"uint256"}],"name":"setRewardBps","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_votingPeriod","type":"uint256"}],"name":"setVotingPeriod","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"staking","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_proposalId","type":"uint256"}],"name":"state","outputs":[{"internalType":"enum Governance.ProposalState","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"votingPeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}],"devdoc":{"errors":{"EnforcedPause()":[{"details":"The operation failed because the contract is paused."}],"ExpectedPause()":[{"details":"The operation failed because the contract is not paused."}],"OwnableInvalidOwner(address)":[{"details":"The owner is not a valid owner account. (eg. `address(0)`)"}],"OwnableUnauthorizedAccount(address)":[{"details":"The caller account is not authorized to perform an operation."}],"SafeCastOverflowedUintDowncast(uint8,uint256)":[{"details":"Value doesn't fit in an uint of `bits` size."}],"SafeERC20FailedOperation(address)":[{"details":"An operation with an ERC-20 token failed."}]},"events":{"Paused(address)":{"details":"Emitted when the pause is triggered by `account`."},"Unpaused(address)":{"details":"Emitted when the pause is lifted by `account`."}},"kind":"dev","methods":{"calcRewardFromPool()":{"details":"Calculates the next proposal reward that should be reserved from the reward pool based on the current parameters."},"castVote(uint256,uint8,string)":{"params":{"_proposalId":"The proposal ID.","_reason":"The optional reason for the vote.","_support":"The vote enum type."}},"claimReward(uint256)":{"params":{"_proposalId":"The proposal ID."}},"constructor":{"params":{"_bnb48er":"The address of the BNB48er NFT contract.","_forVotesThresholdBps":"The required percentage of \"for\" votes within the non-abstinent voting stakes, in basis points.","_lastProposalId":"The last proposal ID from the legacy Governance contract.","_maxReward":"The maximal amount of KOGE for each proposal reward from the reward pool.","_minDeposit":"The minimal amount of KOGE to create a proposal.","_minReward":"The minimal amount of KOGE for each proposal reward from the reward pool.","_proposerRewardBps":"The proposer's share of each proposal reward in basis points.","_quorumThresholdBps":"The required percentage of final votes within the total stakes at proposal time, in basis points.","_rewardBps":"The share of the reward pool for each proposal reward in basis points.","_staking":"The address of the Staking contract.","_votingPeriod":"The period to cast votes after a proposal is created, in seconds."}},"contributeToRewardPool(uint256)":{"params":{"_amount":"The amount to contribute."}},"getClaimableRewardInfo(address,uint256)":{"params":{"_account":"The account address.","_proposalId":"The proposal ID."}},"isNftInUse(uint256)":{"params":{"_tokenId":"The token ID."}},"owner()":{"details":"Returns the address of the current owner."},"paused()":{"details":"Returns true if the contract is paused, and false otherwise."},"proposalVoteCounts(uint256)":{"params":{"_proposalId":"The proposal ID."}},"proposalVoteInfo(uint256,address)":{"params":{"_account":"The voting account.","_proposalId":"The proposal ID."}},"propose(uint256,uint256,string,string)":{"params":{"_deposit":"The amount of KOGE to be paid to the reward pool.","_description":"The content of the proposal.","_title":"The title of the proposal.","_tokenId":"The token ID for the BNB48er NFT to be associated with the proposal. An NFT can only be associated with a single active proposal."}},"refundInvalidProposal(uint256)":{"params":{"_proposalId":"The proposal ID."}},"removeFromRewardPool(uint256)":{"params":{"_amount":"The amount to remove."}},"renounceOwnership()":{"details":"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner."},"setForVotesThresholdBps(uint256)":{"details":"Sets `forVotesThresholdBps`.","params":{"_forVotesThresholdBps":"The new `forVotesThresholdBps`."}},"setMaxReward(uint256)":{"details":"Sets `maxReward`.","params":{"_maxReward":"The new `maxReward`."}},"setMinDeposit(uint256)":{"details":"Sets `minDeposit`.","params":{"_minDeposit":"The new `minDeposit`."}},"setMinReward(uint256)":{"details":"Sets `minReward`.","params":{"_minReward":"The new `minReward`."}},"setProposerRewardBps(uint256)":{"details":"Sets `proposerRewardBps`.","params":{"_proposerRewardBps":"The new `proposerRewardBps`."}},"setQuorumThresholdBps(uint256)":{"details":"Sets `quorumThresholdBps`.","params":{"_quorumThresholdBps":"The new `quorumThresholdBps`."}},"setRewardBps(uint256)":{"details":"Sets `rewardBps`.","params":{"_rewardBps":"The new `rewardBps`."}},"setVotingPeriod(uint256)":{"details":"Sets `votingPeriod`.","params":{"_votingPeriod":"The new `votingPeriod`."}},"state(uint256)":{"params":{"_proposalId":"The proposal ID."}},"transferOwnership(address)":{"details":"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner."}},"title":"A contract for the governance of text-based proposals, with incentives for participants. This is essentially a simplified version of the OpenZeppelin Governor (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/5ac4d93ae318cdf6c8a1125dff3a439a2aeabb63/contracts/governance/Governor.sol), with rewards and other BNB48-specific features implemented.","version":1},"userdoc":{"kind":"user","methods":{"castVote(uint256,uint8,string)":{"notice":"Casts a vote."},"claimReward(uint256)":{"notice":"Claims KOGE reward for valid proposals."},"constructor":{"notice":"Governance constructor."},"contributeToRewardPool(uint256)":{"notice":"Contributes KOGE to the proposal reward pool."},"getClaimableRewardInfo(address,uint256)":{"notice":"Get claimable reward info for an account and a proposal."},"isNftInUse(uint256)":{"notice":"Returns whether the given NFT is being used for an active proposal."},"pause()":{"notice":"Pauses the contract."},"proposalVoteCounts(uint256)":{"notice":"Accessor to the proposal vote counts."},"proposalVoteInfo(uint256,address)":{"notice":"Accessor to the vote info of a proposal for an account."},"propose(uint256,uint256,string,string)":{"notice":"Create a new proposal. Vote starts immediately and ends `votingPeriod` blocks afterwards."},"refundInvalidProposal(uint256)":{"notice":"Refunds KOGE to the reward pool for a proposal that failed to reach quorum."},"removeFromRewardPool(uint256)":{"notice":"Removes KOGE from the proposal reward pool."},"state(uint256)":{"notice":"Returns the current state of a proposal."},"unpause()":{"notice":"Unpauses the contract."}},"version":1}},"settings":{"compilationTarget":{"contracts/Governance.sol":"Governance"},"evmVersion":"paris","libraries":{},"metadata":{"bytecodeHash":"ipfs","useLiteralContent":true},"optimizer":{"enabled":true,"runs":800},"remappings":[],"viaIR":true},"sources":{"@openzeppelin/contracts/access/Ownable.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)\n\npragma solidity ^0.8.20;\n\nimport {Context} from \"../utils/Context.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * The initial owner is set to the address provided by the deployer. This can\n * later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract Ownable is Context {\n    address private _owner;\n\n    /**\n     * @dev The caller account is not authorized to perform an operation.\n     */\n    error OwnableUnauthorizedAccount(address account);\n\n    /**\n     * @dev The owner is not a valid owner account. (eg. `address(0)`)\n     */\n    error OwnableInvalidOwner(address owner);\n\n    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n    /**\n     * @dev Initializes the contract setting the address provided by the deployer as the initial owner.\n     */\n    constructor(address initialOwner) {\n        if (initialOwner == address(0)) {\n            revert OwnableInvalidOwner(address(0));\n        }\n        _transferOwnership(initialOwner);\n    }\n\n    /**\n     * @dev Throws if called by any account other than the owner.\n     */\n    modifier onlyOwner() {\n        _checkOwner();\n        _;\n    }\n\n    /**\n     * @dev Returns the address of the current owner.\n     */\n    function owner() public view virtual returns (address) {\n        return _owner;\n    }\n\n    /**\n     * @dev Throws if the sender is not the owner.\n     */\n    function _checkOwner() internal view virtual {\n        if (owner() != _msgSender()) {\n            revert OwnableUnauthorizedAccount(_msgSender());\n        }\n    }\n\n    /**\n     * @dev Leaves the contract without owner. It will not be possible to call\n     * `onlyOwner` functions. Can only be called by the current owner.\n     *\n     * NOTE: Renouncing ownership will leave the contract without an owner,\n     * thereby disabling any functionality that is only available to the owner.\n     */\n    function renounceOwnership() public virtual onlyOwner {\n        _transferOwnership(address(0));\n    }\n\n    /**\n     * @dev Transfers ownership of the contract to a new account (`newOwner`).\n     * Can only be called by the current owner.\n     */\n    function transferOwnership(address newOwner) public virtual onlyOwner {\n        if (newOwner == address(0)) {\n            revert OwnableInvalidOwner(address(0));\n        }\n        _transferOwnership(newOwner);\n    }\n\n    /**\n     * @dev Transfers ownership of the contract to a new account (`newOwner`).\n     * Internal function without access restriction.\n     */\n    function _transferOwnership(address newOwner) internal virtual {\n        address oldOwner = _owner;\n        _owner = newOwner;\n        emit OwnershipTransferred(oldOwner, newOwner);\n    }\n}\n","keccak256":"0xff6d0bb2e285473e5311d9d3caacb525ae3538a80758c10649a4d61029b017bb","license":"MIT"},"@openzeppelin/contracts/interfaces/IERC1363.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (interfaces/IERC1363.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"./IERC20.sol\";\nimport {IERC165} from \"./IERC165.sol\";\n\n/**\n * @title IERC1363\n * @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363].\n *\n * Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract\n * after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction.\n */\ninterface IERC1363 is IERC20, IERC165 {\n    /*\n     * Note: the ERC-165 identifier for this interface is 0xb0202a11.\n     * 0xb0202a11 ===\n     *   bytes4(keccak256('transferAndCall(address,uint256)')) ^\n     *   bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^\n     *   bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^\n     *   bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^\n     *   bytes4(keccak256('approveAndCall(address,uint256)')) ^\n     *   bytes4(keccak256('approveAndCall(address,uint256,bytes)'))\n     */\n\n    /**\n     * @dev Moves a `value` amount of tokens from the caller's account to `to`\n     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n     * @param to The address which you want to transfer to.\n     * @param value The amount of tokens to be transferred.\n     * @return A boolean value indicating whether the operation succeeded unless throwing.\n     */\n    function transferAndCall(address to, uint256 value) external returns (bool);\n\n    /**\n     * @dev Moves a `value` amount of tokens from the caller's account to `to`\n     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n     * @param to The address which you want to transfer to.\n     * @param value The amount of tokens to be transferred.\n     * @param data Additional data with no specified format, sent in call to `to`.\n     * @return A boolean value indicating whether the operation succeeded unless throwing.\n     */\n    function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool);\n\n    /**\n     * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\n     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n     * @param from The address which you want to send tokens from.\n     * @param to The address which you want to transfer to.\n     * @param value The amount of tokens to be transferred.\n     * @return A boolean value indicating whether the operation succeeded unless throwing.\n     */\n    function transferFromAndCall(address from, address to, uint256 value) external returns (bool);\n\n    /**\n     * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\n     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n     * @param from The address which you want to send tokens from.\n     * @param to The address which you want to transfer to.\n     * @param value The amount of tokens to be transferred.\n     * @param data Additional data with no specified format, sent in call to `to`.\n     * @return A boolean value indicating whether the operation succeeded unless throwing.\n     */\n    function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool);\n\n    /**\n     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\n     * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\n     * @param spender The address which will spend the funds.\n     * @param value The amount of tokens to be spent.\n     * @return A boolean value indicating whether the operation succeeded unless throwing.\n     */\n    function approveAndCall(address spender, uint256 value) external returns (bool);\n\n    /**\n     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\n     * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\n     * @param spender The address which will spend the funds.\n     * @param value The amount of tokens to be spent.\n     * @param data Additional data with no specified format, sent in call to `spender`.\n     * @return A boolean value indicating whether the operation succeeded unless throwing.\n     */\n    function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool);\n}\n","keccak256":"0x9b6b3e7803bc5f2f8cd7ad57db8ac1def61a9930a5a3107df4882e028a9605d7","license":"MIT"},"@openzeppelin/contracts/interfaces/IERC165.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC165.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC165} from \"../utils/introspection/IERC165.sol\";\n","keccak256":"0xde7e9fd9aee8d4f40772f96bb3b58836cbc6dfc0227014a061947f8821ea9724","license":"MIT"},"@openzeppelin/contracts/interfaces/IERC20.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC20.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"../token/ERC20/IERC20.sol\";\n","keccak256":"0xce41876e78d1badc0512229b4d14e4daf83bc1003d7f83978d18e0e56f965b9c","license":"MIT"},"@openzeppelin/contracts/token/ERC20/IERC20.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Interface of the ERC-20 standard as defined in the ERC.\n */\ninterface IERC20 {\n    /**\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\n     * another (`to`).\n     *\n     * Note that `value` may be zero.\n     */\n    event Transfer(address indexed from, address indexed to, uint256 value);\n\n    /**\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n     * a call to {approve}. `value` is the new allowance.\n     */\n    event Approval(address indexed owner, address indexed spender, uint256 value);\n\n    /**\n     * @dev Returns the value of tokens in existence.\n     */\n    function totalSupply() external view returns (uint256);\n\n    /**\n     * @dev Returns the value of tokens owned by `account`.\n     */\n    function balanceOf(address account) external view returns (uint256);\n\n    /**\n     * @dev Moves a `value` amount of tokens from the caller's account to `to`.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transfer(address to, uint256 value) external returns (bool);\n\n    /**\n     * @dev Returns the remaining number of tokens that `spender` will be\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\n     * zero by default.\n     *\n     * This value changes when {approve} or {transferFrom} are called.\n     */\n    function allowance(address owner, address spender) external view returns (uint256);\n\n    /**\n     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\n     * caller's tokens.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\n     * that someone may use both the old and the new allowance by unfortunate\n     * transaction ordering. One possible solution to mitigate this race\n     * condition is to first reduce the spender's allowance to 0 and set the\n     * desired value afterwards:\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n     *\n     * Emits an {Approval} event.\n     */\n    function approve(address spender, uint256 value) external returns (bool);\n\n    /**\n     * @dev Moves a `value` amount of tokens from `from` to `to` using the\n     * allowance mechanism. `value` is then deducted from the caller's\n     * allowance.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transferFrom(address from, address to, uint256 value) external returns (bool);\n}\n","keccak256":"0xe06a3f08a987af6ad2e1c1e774405d4fe08f1694b67517438b467cecf0da0ef7","license":"MIT"},"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.2.0) (token/ERC20/utils/SafeERC20.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"../IERC20.sol\";\nimport {IERC1363} from \"../../../interfaces/IERC1363.sol\";\n\n/**\n * @title SafeERC20\n * @dev Wrappers around ERC-20 operations that throw on failure (when the token\n * contract returns false). Tokens that return no value (and instead revert or\n * throw on failure) are also supported, non-reverting calls are assumed to be\n * successful.\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\n */\nlibrary SafeERC20 {\n    /**\n     * @dev An operation with an ERC-20 token failed.\n     */\n    error SafeERC20FailedOperation(address token);\n\n    /**\n     * @dev Indicates a failed `decreaseAllowance` request.\n     */\n    error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease);\n\n    /**\n     * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,\n     * non-reverting calls are assumed to be successful.\n     */\n    function safeTransfer(IERC20 token, address to, uint256 value) internal {\n        _callOptionalReturn(token, abi.encodeCall(token.transfer, (to, value)));\n    }\n\n    /**\n     * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the\n     * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.\n     */\n    function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\n        _callOptionalReturn(token, abi.encodeCall(token.transferFrom, (from, to, value)));\n    }\n\n    /**\n     * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\n     * non-reverting calls are assumed to be successful.\n     *\n     * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \"client\"\n     * smart contract uses ERC-7674 to set temporary allowances, then the \"client\" smart contract should avoid using\n     * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\n     * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\n     */\n    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n        uint256 oldAllowance = token.allowance(address(this), spender);\n        forceApprove(token, spender, oldAllowance + value);\n    }\n\n    /**\n     * @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no\n     * value, non-reverting calls are assumed to be successful.\n     *\n     * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \"client\"\n     * smart contract uses ERC-7674 to set temporary allowances, then the \"client\" smart contract should avoid using\n     * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\n     * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\n     */\n    function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal {\n        unchecked {\n            uint256 currentAllowance = token.allowance(address(this), spender);\n            if (currentAllowance < requestedDecrease) {\n                revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease);\n            }\n            forceApprove(token, spender, currentAllowance - requestedDecrease);\n        }\n    }\n\n    /**\n     * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,\n     * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval\n     * to be set to zero before setting it to a non-zero value, such as USDT.\n     *\n     * NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function\n     * only sets the \"standard\" allowance. Any temporary allowance will remain active, in addition to the value being\n     * set here.\n     */\n    function forceApprove(IERC20 token, address spender, uint256 value) internal {\n        bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value));\n\n        if (!_callOptionalReturnBool(token, approvalCall)) {\n            _callOptionalReturn(token, abi.encodeCall(token.approve, (spender, 0)));\n            _callOptionalReturn(token, approvalCall);\n        }\n    }\n\n    /**\n     * @dev Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no\n     * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\n     * targeting contracts.\n     *\n     * Reverts if the returned value is other than `true`.\n     */\n    function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\n        if (to.code.length == 0) {\n            safeTransfer(token, to, value);\n        } else if (!token.transferAndCall(to, value, data)) {\n            revert SafeERC20FailedOperation(address(token));\n        }\n    }\n\n    /**\n     * @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target\n     * has no code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\n     * targeting contracts.\n     *\n     * Reverts if the returned value is other than `true`.\n     */\n    function transferFromAndCallRelaxed(\n        IERC1363 token,\n        address from,\n        address to,\n        uint256 value,\n        bytes memory data\n    ) internal {\n        if (to.code.length == 0) {\n            safeTransferFrom(token, from, to, value);\n        } else if (!token.transferFromAndCall(from, to, value, data)) {\n            revert SafeERC20FailedOperation(address(token));\n        }\n    }\n\n    /**\n     * @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no\n     * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\n     * targeting contracts.\n     *\n     * NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}.\n     * Opposedly, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall}\n     * once without retrying, and relies on the returned value to be true.\n     *\n     * Reverts if the returned value is other than `true`.\n     */\n    function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\n        if (to.code.length == 0) {\n            forceApprove(token, to, value);\n        } else if (!token.approveAndCall(to, value, data)) {\n            revert SafeERC20FailedOperation(address(token));\n        }\n    }\n\n    /**\n     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n     * on the return value: the return value is optional (but if data is returned, it must not be false).\n     * @param token The token targeted by the call.\n     * @param data The call data (encoded using abi.encode or one of its variants).\n     *\n     * This is a variant of {_callOptionalReturnBool} that reverts if call fails to meet the requirements.\n     */\n    function _callOptionalReturn(IERC20 token, bytes memory data) private {\n        uint256 returnSize;\n        uint256 returnValue;\n        assembly (\"memory-safe\") {\n            let success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\n            // bubble errors\n            if iszero(success) {\n                let ptr := mload(0x40)\n                returndatacopy(ptr, 0, returndatasize())\n                revert(ptr, returndatasize())\n            }\n            returnSize := returndatasize()\n            returnValue := mload(0)\n        }\n\n        if (returnSize == 0 ? address(token).code.length == 0 : returnValue != 1) {\n            revert SafeERC20FailedOperation(address(token));\n        }\n    }\n\n    /**\n     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n     * on the return value: the return value is optional (but if data is returned, it must not be false).\n     * @param token The token targeted by the call.\n     * @param data The call data (encoded using abi.encode or one of its variants).\n     *\n     * This is a variant of {_callOptionalReturn} that silently catches all reverts and returns a bool instead.\n     */\n    function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\n        bool success;\n        uint256 returnSize;\n        uint256 returnValue;\n        assembly (\"memory-safe\") {\n            success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\n            returnSize := returndatasize()\n            returnValue := mload(0)\n        }\n        return success && (returnSize == 0 ? address(token).code.length > 0 : returnValue == 1);\n    }\n}\n","keccak256":"0x4ea01544758fd2c7045961904686bfe232d2220a04ecaa2d6b08dac17827febf","license":"MIT"},"@openzeppelin/contracts/token/ERC721/IERC721.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC721/IERC721.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC165} from \"../../utils/introspection/IERC165.sol\";\n\n/**\n * @dev Required interface of an ERC-721 compliant contract.\n */\ninterface IERC721 is IERC165 {\n    /**\n     * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\n     */\n    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\n\n    /**\n     * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\n     */\n    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\n\n    /**\n     * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\n     */\n    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\n\n    /**\n     * @dev Returns the number of tokens in ``owner``'s account.\n     */\n    function balanceOf(address owner) external view returns (uint256 balance);\n\n    /**\n     * @dev Returns the owner of the `tokenId` token.\n     *\n     * Requirements:\n     *\n     * - `tokenId` must exist.\n     */\n    function ownerOf(uint256 tokenId) external view returns (address owner);\n\n    /**\n     * @dev Safely transfers `tokenId` token from `from` to `to`.\n     *\n     * Requirements:\n     *\n     * - `from` cannot be the zero address.\n     * - `to` cannot be the zero address.\n     * - `tokenId` token must exist and be owned by `from`.\n     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\n     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon\n     *   a safe transfer.\n     *\n     * Emits a {Transfer} event.\n     */\n    function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external;\n\n    /**\n     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\n     * are aware of the ERC-721 protocol to prevent tokens from being forever locked.\n     *\n     * Requirements:\n     *\n     * - `from` cannot be the zero address.\n     * - `to` cannot be the zero address.\n     * - `tokenId` token must exist and be owned by `from`.\n     * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or\n     *   {setApprovalForAll}.\n     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon\n     *   a safe transfer.\n     *\n     * Emits a {Transfer} event.\n     */\n    function safeTransferFrom(address from, address to, uint256 tokenId) external;\n\n    /**\n     * @dev Transfers `tokenId` token from `from` to `to`.\n     *\n     * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC-721\n     * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must\n     * understand this adds an external call which potentially creates a reentrancy vulnerability.\n     *\n     * Requirements:\n     *\n     * - `from` cannot be the zero address.\n     * - `to` cannot be the zero address.\n     * - `tokenId` token must be owned by `from`.\n     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transferFrom(address from, address to, uint256 tokenId) external;\n\n    /**\n     * @dev Gives permission to `to` to transfer `tokenId` token to another account.\n     * The approval is cleared when the token is transferred.\n     *\n     * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\n     *\n     * Requirements:\n     *\n     * - The caller must own the token or be an approved operator.\n     * - `tokenId` must exist.\n     *\n     * Emits an {Approval} event.\n     */\n    function approve(address to, uint256 tokenId) external;\n\n    /**\n     * @dev Approve or remove `operator` as an operator for the caller.\n     * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\n     *\n     * Requirements:\n     *\n     * - The `operator` cannot be the address zero.\n     *\n     * Emits an {ApprovalForAll} event.\n     */\n    function setApprovalForAll(address operator, bool approved) external;\n\n    /**\n     * @dev Returns the account approved for `tokenId` token.\n     *\n     * Requirements:\n     *\n     * - `tokenId` must exist.\n     */\n    function getApproved(uint256 tokenId) external view returns (address operator);\n\n    /**\n     * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\n     *\n     * See {setApprovalForAll}\n     */\n    function isApprovedForAll(address owner, address operator) external view returns (bool);\n}\n","keccak256":"0x5dc63d1c6a12fe1b17793e1745877b2fcbe1964c3edfd0a482fac21ca8f18261","license":"MIT"},"@openzeppelin/contracts/utils/Context.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context {\n    function _msgSender() internal view virtual returns (address) {\n        return msg.sender;\n    }\n\n    function _msgData() internal view virtual returns (bytes calldata) {\n        return msg.data;\n    }\n\n    function _contextSuffixLength() internal view virtual returns (uint256) {\n        return 0;\n    }\n}\n","keccak256":"0x493033a8d1b176a037b2cc6a04dad01a5c157722049bbecf632ca876224dd4b2","license":"MIT"},"@openzeppelin/contracts/utils/Pausable.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Pausable.sol)\n\npragma solidity ^0.8.20;\n\nimport {Context} from \"../utils/Context.sol\";\n\n/**\n * @dev Contract module which allows children to implement an emergency stop\n * mechanism that can be triggered by an authorized account.\n *\n * This module is used through inheritance. It will make available the\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\n * the functions of your contract. Note that they will not be pausable by\n * simply including this module, only once the modifiers are put in place.\n */\nabstract contract Pausable is Context {\n    bool private _paused;\n\n    /**\n     * @dev Emitted when the pause is triggered by `account`.\n     */\n    event Paused(address account);\n\n    /**\n     * @dev Emitted when the pause is lifted by `account`.\n     */\n    event Unpaused(address account);\n\n    /**\n     * @dev The operation failed because the contract is paused.\n     */\n    error EnforcedPause();\n\n    /**\n     * @dev The operation failed because the contract is not paused.\n     */\n    error ExpectedPause();\n\n    /**\n     * @dev Initializes the contract in unpaused state.\n     */\n    constructor() {\n        _paused = false;\n    }\n\n    /**\n     * @dev Modifier to make a function callable only when the contract is not paused.\n     *\n     * Requirements:\n     *\n     * - The contract must not be paused.\n     */\n    modifier whenNotPaused() {\n        _requireNotPaused();\n        _;\n    }\n\n    /**\n     * @dev Modifier to make a function callable only when the contract is paused.\n     *\n     * Requirements:\n     *\n     * - The contract must be paused.\n     */\n    modifier whenPaused() {\n        _requirePaused();\n        _;\n    }\n\n    /**\n     * @dev Returns true if the contract is paused, and false otherwise.\n     */\n    function paused() public view virtual returns (bool) {\n        return _paused;\n    }\n\n    /**\n     * @dev Throws if the contract is paused.\n     */\n    function _requireNotPaused() internal view virtual {\n        if (paused()) {\n            revert EnforcedPause();\n        }\n    }\n\n    /**\n     * @dev Throws if the contract is not paused.\n     */\n    function _requirePaused() internal view virtual {\n        if (!paused()) {\n            revert ExpectedPause();\n        }\n    }\n\n    /**\n     * @dev Triggers stopped state.\n     *\n     * Requirements:\n     *\n     * - The contract must not be paused.\n     */\n    function _pause() internal virtual whenNotPaused {\n        _paused = true;\n        emit Paused(_msgSender());\n    }\n\n    /**\n     * @dev Returns to normal state.\n     *\n     * Requirements:\n     *\n     * - The contract must be paused.\n     */\n    function _unpause() internal virtual whenPaused {\n        _paused = false;\n        emit Unpaused(_msgSender());\n    }\n}\n","keccak256":"0xb2e5f50762c27fb4b123e3619c3c02bdcba5e515309382e5bfb6f7d6486510bd","license":"MIT"},"@openzeppelin/contracts/utils/introspection/IERC165.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/introspection/IERC165.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Interface of the ERC-165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[ERC].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165 {\n    /**\n     * @dev Returns true if this contract implements the interface defined by\n     * `interfaceId`. See the corresponding\n     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[ERC section]\n     * to learn more about how these ids are created.\n     *\n     * This function call must use less than 30 000 gas.\n     */\n    function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n","keccak256":"0x79796192ec90263f21b464d5bc90b777a525971d3de8232be80d9c4f9fb353b8","license":"MIT"},"@openzeppelin/contracts/utils/math/SafeCast.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/math/SafeCast.sol)\n// This file was procedurally generated from scripts/generate/templates/SafeCast.js.\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Wrappers over Solidity's uintXX/intXX/bool casting operators with added overflow\n * checks.\n *\n * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can\n * easily result in undesired exploitation or bugs, since developers usually\n * assume that overflows raise errors. `SafeCast` restores this intuition by\n * reverting the transaction when such an operation overflows.\n *\n * Using this library instead of the unchecked operations eliminates an entire\n * class of bugs, so it's recommended to use it always.\n */\nlibrary SafeCast {\n    /**\n     * @dev Value doesn't fit in an uint of `bits` size.\n     */\n    error SafeCastOverflowedUintDowncast(uint8 bits, uint256 value);\n\n    /**\n     * @dev An int value doesn't fit in an uint of `bits` size.\n     */\n    error SafeCastOverflowedIntToUint(int256 value);\n\n    /**\n     * @dev Value doesn't fit in an int of `bits` size.\n     */\n    error SafeCastOverflowedIntDowncast(uint8 bits, int256 value);\n\n    /**\n     * @dev An uint value doesn't fit in an int of `bits` size.\n     */\n    error SafeCastOverflowedUintToInt(uint256 value);\n\n    /**\n     * @dev Returns the downcasted uint248 from uint256, reverting on\n     * overflow (when the input is greater than largest uint248).\n     *\n     * Counterpart to Solidity's `uint248` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 248 bits\n     */\n    function toUint248(uint256 value) internal pure returns (uint248) {\n        if (value > type(uint248).max) {\n            revert SafeCastOverflowedUintDowncast(248, value);\n        }\n        return uint248(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint240 from uint256, reverting on\n     * overflow (when the input is greater than largest uint240).\n     *\n     * Counterpart to Solidity's `uint240` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 240 bits\n     */\n    function toUint240(uint256 value) internal pure returns (uint240) {\n        if (value > type(uint240).max) {\n            revert SafeCastOverflowedUintDowncast(240, value);\n        }\n        return uint240(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint232 from uint256, reverting on\n     * overflow (when the input is greater than largest uint232).\n     *\n     * Counterpart to Solidity's `uint232` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 232 bits\n     */\n    function toUint232(uint256 value) internal pure returns (uint232) {\n        if (value > type(uint232).max) {\n            revert SafeCastOverflowedUintDowncast(232, value);\n        }\n        return uint232(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint224 from uint256, reverting on\n     * overflow (when the input is greater than largest uint224).\n     *\n     * Counterpart to Solidity's `uint224` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 224 bits\n     */\n    function toUint224(uint256 value) internal pure returns (uint224) {\n        if (value > type(uint224).max) {\n            revert SafeCastOverflowedUintDowncast(224, value);\n        }\n        return uint224(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint216 from uint256, reverting on\n     * overflow (when the input is greater than largest uint216).\n     *\n     * Counterpart to Solidity's `uint216` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 216 bits\n     */\n    function toUint216(uint256 value) internal pure returns (uint216) {\n        if (value > type(uint216).max) {\n            revert SafeCastOverflowedUintDowncast(216, value);\n        }\n        return uint216(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint208 from uint256, reverting on\n     * overflow (when the input is greater than largest uint208).\n     *\n     * Counterpart to Solidity's `uint208` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 208 bits\n     */\n    function toUint208(uint256 value) internal pure returns (uint208) {\n        if (value > type(uint208).max) {\n            revert SafeCastOverflowedUintDowncast(208, value);\n        }\n        return uint208(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint200 from uint256, reverting on\n     * overflow (when the input is greater than largest uint200).\n     *\n     * Counterpart to Solidity's `uint200` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 200 bits\n     */\n    function toUint200(uint256 value) internal pure returns (uint200) {\n        if (value > type(uint200).max) {\n            revert SafeCastOverflowedUintDowncast(200, value);\n        }\n        return uint200(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint192 from uint256, reverting on\n     * overflow (when the input is greater than largest uint192).\n     *\n     * Counterpart to Solidity's `uint192` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 192 bits\n     */\n    function toUint192(uint256 value) internal pure returns (uint192) {\n        if (value > type(uint192).max) {\n            revert SafeCastOverflowedUintDowncast(192, value);\n        }\n        return uint192(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint184 from uint256, reverting on\n     * overflow (when the input is greater than largest uint184).\n     *\n     * Counterpart to Solidity's `uint184` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 184 bits\n     */\n    function toUint184(uint256 value) internal pure returns (uint184) {\n        if (value > type(uint184).max) {\n            revert SafeCastOverflowedUintDowncast(184, value);\n        }\n        return uint184(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint176 from uint256, reverting on\n     * overflow (when the input is greater than largest uint176).\n     *\n     * Counterpart to Solidity's `uint176` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 176 bits\n     */\n    function toUint176(uint256 value) internal pure returns (uint176) {\n        if (value > type(uint176).max) {\n            revert SafeCastOverflowedUintDowncast(176, value);\n        }\n        return uint176(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint168 from uint256, reverting on\n     * overflow (when the input is greater than largest uint168).\n     *\n     * Counterpart to Solidity's `uint168` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 168 bits\n     */\n    function toUint168(uint256 value) internal pure returns (uint168) {\n        if (value > type(uint168).max) {\n            revert SafeCastOverflowedUintDowncast(168, value);\n        }\n        return uint168(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint160 from uint256, reverting on\n     * overflow (when the input is greater than largest uint160).\n     *\n     * Counterpart to Solidity's `uint160` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 160 bits\n     */\n    function toUint160(uint256 value) internal pure returns (uint160) {\n        if (value > type(uint160).max) {\n            revert SafeCastOverflowedUintDowncast(160, value);\n        }\n        return uint160(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint152 from uint256, reverting on\n     * overflow (when the input is greater than largest uint152).\n     *\n     * Counterpart to Solidity's `uint152` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 152 bits\n     */\n    function toUint152(uint256 value) internal pure returns (uint152) {\n        if (value > type(uint152).max) {\n            revert SafeCastOverflowedUintDowncast(152, value);\n        }\n        return uint152(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint144 from uint256, reverting on\n     * overflow (when the input is greater than largest uint144).\n     *\n     * Counterpart to Solidity's `uint144` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 144 bits\n     */\n    function toUint144(uint256 value) internal pure returns (uint144) {\n        if (value > type(uint144).max) {\n            revert SafeCastOverflowedUintDowncast(144, value);\n        }\n        return uint144(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint136 from uint256, reverting on\n     * overflow (when the input is greater than largest uint136).\n     *\n     * Counterpart to Solidity's `uint136` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 136 bits\n     */\n    function toUint136(uint256 value) internal pure returns (uint136) {\n        if (value > type(uint136).max) {\n            revert SafeCastOverflowedUintDowncast(136, value);\n        }\n        return uint136(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint128 from uint256, reverting on\n     * overflow (when the input is greater than largest uint128).\n     *\n     * Counterpart to Solidity's `uint128` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 128 bits\n     */\n    function toUint128(uint256 value) internal pure returns (uint128) {\n        if (value > type(uint128).max) {\n            revert SafeCastOverflowedUintDowncast(128, value);\n        }\n        return uint128(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint120 from uint256, reverting on\n     * overflow (when the input is greater than largest uint120).\n     *\n     * Counterpart to Solidity's `uint120` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 120 bits\n     */\n    function toUint120(uint256 value) internal pure returns (uint120) {\n        if (value > type(uint120).max) {\n            revert SafeCastOverflowedUintDowncast(120, value);\n        }\n        return uint120(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint112 from uint256, reverting on\n     * overflow (when the input is greater than largest uint112).\n     *\n     * Counterpart to Solidity's `uint112` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 112 bits\n     */\n    function toUint112(uint256 value) internal pure returns (uint112) {\n        if (value > type(uint112).max) {\n            revert SafeCastOverflowedUintDowncast(112, value);\n        }\n        return uint112(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint104 from uint256, reverting on\n     * overflow (when the input is greater than largest uint104).\n     *\n     * Counterpart to Solidity's `uint104` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 104 bits\n     */\n    function toUint104(uint256 value) internal pure returns (uint104) {\n        if (value > type(uint104).max) {\n            revert SafeCastOverflowedUintDowncast(104, value);\n        }\n        return uint104(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint96 from uint256, reverting on\n     * overflow (when the input is greater than largest uint96).\n     *\n     * Counterpart to Solidity's `uint96` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 96 bits\n     */\n    function toUint96(uint256 value) internal pure returns (uint96) {\n        if (value > type(uint96).max) {\n            revert SafeCastOverflowedUintDowncast(96, value);\n        }\n        return uint96(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint88 from uint256, reverting on\n     * overflow (when the input is greater than largest uint88).\n     *\n     * Counterpart to Solidity's `uint88` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 88 bits\n     */\n    function toUint88(uint256 value) internal pure returns (uint88) {\n        if (value > type(uint88).max) {\n            revert SafeCastOverflowedUintDowncast(88, value);\n        }\n        return uint88(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint80 from uint256, reverting on\n     * overflow (when the input is greater than largest uint80).\n     *\n     * Counterpart to Solidity's `uint80` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 80 bits\n     */\n    function toUint80(uint256 value) internal pure returns (uint80) {\n        if (value > type(uint80).max) {\n            revert SafeCastOverflowedUintDowncast(80, value);\n        }\n        return uint80(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint72 from uint256, reverting on\n     * overflow (when the input is greater than largest uint72).\n     *\n     * Counterpart to Solidity's `uint72` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 72 bits\n     */\n    function toUint72(uint256 value) internal pure returns (uint72) {\n        if (value > type(uint72).max) {\n            revert SafeCastOverflowedUintDowncast(72, value);\n        }\n        return uint72(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint64 from uint256, reverting on\n     * overflow (when the input is greater than largest uint64).\n     *\n     * Counterpart to Solidity's `uint64` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 64 bits\n     */\n    function toUint64(uint256 value) internal pure returns (uint64) {\n        if (value > type(uint64).max) {\n            revert SafeCastOverflowedUintDowncast(64, value);\n        }\n        return uint64(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint56 from uint256, reverting on\n     * overflow (when the input is greater than largest uint56).\n     *\n     * Counterpart to Solidity's `uint56` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 56 bits\n     */\n    function toUint56(uint256 value) internal pure returns (uint56) {\n        if (value > type(uint56).max) {\n            revert SafeCastOverflowedUintDowncast(56, value);\n        }\n        return uint56(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint48 from uint256, reverting on\n     * overflow (when the input is greater than largest uint48).\n     *\n     * Counterpart to Solidity's `uint48` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 48 bits\n     */\n    function toUint48(uint256 value) internal pure returns (uint48) {\n        if (value > type(uint48).max) {\n            revert SafeCastOverflowedUintDowncast(48, value);\n        }\n        return uint48(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint40 from uint256, reverting on\n     * overflow (when the input is greater than largest uint40).\n     *\n     * Counterpart to Solidity's `uint40` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 40 bits\n     */\n    function toUint40(uint256 value) internal pure returns (uint40) {\n        if (value > type(uint40).max) {\n            revert SafeCastOverflowedUintDowncast(40, value);\n        }\n        return uint40(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint32 from uint256, reverting on\n     * overflow (when the input is greater than largest uint32).\n     *\n     * Counterpart to Solidity's `uint32` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 32 bits\n     */\n    function toUint32(uint256 value) internal pure returns (uint32) {\n        if (value > type(uint32).max) {\n            revert SafeCastOverflowedUintDowncast(32, value);\n        }\n        return uint32(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint24 from uint256, reverting on\n     * overflow (when the input is greater than largest uint24).\n     *\n     * Counterpart to Solidity's `uint24` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 24 bits\n     */\n    function toUint24(uint256 value) internal pure returns (uint24) {\n        if (value > type(uint24).max) {\n            revert SafeCastOverflowedUintDowncast(24, value);\n        }\n        return uint24(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint16 from uint256, reverting on\n     * overflow (when the input is greater than largest uint16).\n     *\n     * Counterpart to Solidity's `uint16` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 16 bits\n     */\n    function toUint16(uint256 value) internal pure returns (uint16) {\n        if (value > type(uint16).max) {\n            revert SafeCastOverflowedUintDowncast(16, value);\n        }\n        return uint16(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint8 from uint256, reverting on\n     * overflow (when the input is greater than largest uint8).\n     *\n     * Counterpart to Solidity's `uint8` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 8 bits\n     */\n    function toUint8(uint256 value) internal pure returns (uint8) {\n        if (value > type(uint8).max) {\n            revert SafeCastOverflowedUintDowncast(8, value);\n        }\n        return uint8(value);\n    }\n\n    /**\n     * @dev Converts a signed int256 into an unsigned uint256.\n     *\n     * Requirements:\n     *\n     * - input must be greater than or equal to 0.\n     */\n    function toUint256(int256 value) internal pure returns (uint256) {\n        if (value < 0) {\n            revert SafeCastOverflowedIntToUint(value);\n        }\n        return uint256(value);\n    }\n\n    /**\n     * @dev Returns the downcasted int248 from int256, reverting on\n     * overflow (when the input is less than smallest int248 or\n     * greater than largest int248).\n     *\n     * Counterpart to Solidity's `int248` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 248 bits\n     */\n    function toInt248(int256 value) internal pure returns (int248 downcasted) {\n        downcasted = int248(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(248, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int240 from int256, reverting on\n     * overflow (when the input is less than smallest int240 or\n     * greater than largest int240).\n     *\n     * Counterpart to Solidity's `int240` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 240 bits\n     */\n    function toInt240(int256 value) internal pure returns (int240 downcasted) {\n        downcasted = int240(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(240, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int232 from int256, reverting on\n     * overflow (when the input is less than smallest int232 or\n     * greater than largest int232).\n     *\n     * Counterpart to Solidity's `int232` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 232 bits\n     */\n    function toInt232(int256 value) internal pure returns (int232 downcasted) {\n        downcasted = int232(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(232, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int224 from int256, reverting on\n     * overflow (when the input is less than smallest int224 or\n     * greater than largest int224).\n     *\n     * Counterpart to Solidity's `int224` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 224 bits\n     */\n    function toInt224(int256 value) internal pure returns (int224 downcasted) {\n        downcasted = int224(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(224, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int216 from int256, reverting on\n     * overflow (when the input is less than smallest int216 or\n     * greater than largest int216).\n     *\n     * Counterpart to Solidity's `int216` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 216 bits\n     */\n    function toInt216(int256 value) internal pure returns (int216 downcasted) {\n        downcasted = int216(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(216, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int208 from int256, reverting on\n     * overflow (when the input is less than smallest int208 or\n     * greater than largest int208).\n     *\n     * Counterpart to Solidity's `int208` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 208 bits\n     */\n    function toInt208(int256 value) internal pure returns (int208 downcasted) {\n        downcasted = int208(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(208, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int200 from int256, reverting on\n     * overflow (when the input is less than smallest int200 or\n     * greater than largest int200).\n     *\n     * Counterpart to Solidity's `int200` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 200 bits\n     */\n    function toInt200(int256 value) internal pure returns (int200 downcasted) {\n        downcasted = int200(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(200, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int192 from int256, reverting on\n     * overflow (when the input is less than smallest int192 or\n     * greater than largest int192).\n     *\n     * Counterpart to Solidity's `int192` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 192 bits\n     */\n    function toInt192(int256 value) internal pure returns (int192 downcasted) {\n        downcasted = int192(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(192, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int184 from int256, reverting on\n     * overflow (when the input is less than smallest int184 or\n     * greater than largest int184).\n     *\n     * Counterpart to Solidity's `int184` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 184 bits\n     */\n    function toInt184(int256 value) internal pure returns (int184 downcasted) {\n        downcasted = int184(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(184, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int176 from int256, reverting on\n     * overflow (when the input is less than smallest int176 or\n     * greater than largest int176).\n     *\n     * Counterpart to Solidity's `int176` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 176 bits\n     */\n    function toInt176(int256 value) internal pure returns (int176 downcasted) {\n        downcasted = int176(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(176, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int168 from int256, reverting on\n     * overflow (when the input is less than smallest int168 or\n     * greater than largest int168).\n     *\n     * Counterpart to Solidity's `int168` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 168 bits\n     */\n    function toInt168(int256 value) internal pure returns (int168 downcasted) {\n        downcasted = int168(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(168, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int160 from int256, reverting on\n     * overflow (when the input is less than smallest int160 or\n     * greater than largest int160).\n     *\n     * Counterpart to Solidity's `int160` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 160 bits\n     */\n    function toInt160(int256 value) internal pure returns (int160 downcasted) {\n        downcasted = int160(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(160, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int152 from int256, reverting on\n     * overflow (when the input is less than smallest int152 or\n     * greater than largest int152).\n     *\n     * Counterpart to Solidity's `int152` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 152 bits\n     */\n    function toInt152(int256 value) internal pure returns (int152 downcasted) {\n        downcasted = int152(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(152, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int144 from int256, reverting on\n     * overflow (when the input is less than smallest int144 or\n     * greater than largest int144).\n     *\n     * Counterpart to Solidity's `int144` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 144 bits\n     */\n    function toInt144(int256 value) internal pure returns (int144 downcasted) {\n        downcasted = int144(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(144, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int136 from int256, reverting on\n     * overflow (when the input is less than smallest int136 or\n     * greater than largest int136).\n     *\n     * Counterpart to Solidity's `int136` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 136 bits\n     */\n    function toInt136(int256 value) internal pure returns (int136 downcasted) {\n        downcasted = int136(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(136, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int128 from int256, reverting on\n     * overflow (when the input is less than smallest int128 or\n     * greater than largest int128).\n     *\n     * Counterpart to Solidity's `int128` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 128 bits\n     */\n    function toInt128(int256 value) internal pure returns (int128 downcasted) {\n        downcasted = int128(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(128, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int120 from int256, reverting on\n     * overflow (when the input is less than smallest int120 or\n     * greater than largest int120).\n     *\n     * Counterpart to Solidity's `int120` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 120 bits\n     */\n    function toInt120(int256 value) internal pure returns (int120 downcasted) {\n        downcasted = int120(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(120, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int112 from int256, reverting on\n     * overflow (when the input is less than smallest int112 or\n     * greater than largest int112).\n     *\n     * Counterpart to Solidity's `int112` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 112 bits\n     */\n    function toInt112(int256 value) internal pure returns (int112 downcasted) {\n        downcasted = int112(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(112, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int104 from int256, reverting on\n     * overflow (when the input is less than smallest int104 or\n     * greater than largest int104).\n     *\n     * Counterpart to Solidity's `int104` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 104 bits\n     */\n    function toInt104(int256 value) internal pure returns (int104 downcasted) {\n        downcasted = int104(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(104, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int96 from int256, reverting on\n     * overflow (when the input is less than smallest int96 or\n     * greater than largest int96).\n     *\n     * Counterpart to Solidity's `int96` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 96 bits\n     */\n    function toInt96(int256 value) internal pure returns (int96 downcasted) {\n        downcasted = int96(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(96, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int88 from int256, reverting on\n     * overflow (when the input is less than smallest int88 or\n     * greater than largest int88).\n     *\n     * Counterpart to Solidity's `int88` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 88 bits\n     */\n    function toInt88(int256 value) internal pure returns (int88 downcasted) {\n        downcasted = int88(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(88, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int80 from int256, reverting on\n     * overflow (when the input is less than smallest int80 or\n     * greater than largest int80).\n     *\n     * Counterpart to Solidity's `int80` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 80 bits\n     */\n    function toInt80(int256 value) internal pure returns (int80 downcasted) {\n        downcasted = int80(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(80, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int72 from int256, reverting on\n     * overflow (when the input is less than smallest int72 or\n     * greater than largest int72).\n     *\n     * Counterpart to Solidity's `int72` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 72 bits\n     */\n    function toInt72(int256 value) internal pure returns (int72 downcasted) {\n        downcasted = int72(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(72, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int64 from int256, reverting on\n     * overflow (when the input is less than smallest int64 or\n     * greater than largest int64).\n     *\n     * Counterpart to Solidity's `int64` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 64 bits\n     */\n    function toInt64(int256 value) internal pure returns (int64 downcasted) {\n        downcasted = int64(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(64, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int56 from int256, reverting on\n     * overflow (when the input is less than smallest int56 or\n     * greater than largest int56).\n     *\n     * Counterpart to Solidity's `int56` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 56 bits\n     */\n    function toInt56(int256 value) internal pure returns (int56 downcasted) {\n        downcasted = int56(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(56, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int48 from int256, reverting on\n     * overflow (when the input is less than smallest int48 or\n     * greater than largest int48).\n     *\n     * Counterpart to Solidity's `int48` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 48 bits\n     */\n    function toInt48(int256 value) internal pure returns (int48 downcasted) {\n        downcasted = int48(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(48, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int40 from int256, reverting on\n     * overflow (when the input is less than smallest int40 or\n     * greater than largest int40).\n     *\n     * Counterpart to Solidity's `int40` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 40 bits\n     */\n    function toInt40(int256 value) internal pure returns (int40 downcasted) {\n        downcasted = int40(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(40, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int32 from int256, reverting on\n     * overflow (when the input is less than smallest int32 or\n     * greater than largest int32).\n     *\n     * Counterpart to Solidity's `int32` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 32 bits\n     */\n    function toInt32(int256 value) internal pure returns (int32 downcasted) {\n        downcasted = int32(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(32, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int24 from int256, reverting on\n     * overflow (when the input is less than smallest int24 or\n     * greater than largest int24).\n     *\n     * Counterpart to Solidity's `int24` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 24 bits\n     */\n    function toInt24(int256 value) internal pure returns (int24 downcasted) {\n        downcasted = int24(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(24, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int16 from int256, reverting on\n     * overflow (when the input is less than smallest int16 or\n     * greater than largest int16).\n     *\n     * Counterpart to Solidity's `int16` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 16 bits\n     */\n    function toInt16(int256 value) internal pure returns (int16 downcasted) {\n        downcasted = int16(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(16, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int8 from int256, reverting on\n     * overflow (when the input is less than smallest int8 or\n     * greater than largest int8).\n     *\n     * Counterpart to Solidity's `int8` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 8 bits\n     */\n    function toInt8(int256 value) internal pure returns (int8 downcasted) {\n        downcasted = int8(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(8, value);\n        }\n    }\n\n    /**\n     * @dev Converts an unsigned uint256 into a signed int256.\n     *\n     * Requirements:\n     *\n     * - input must be less than or equal to maxInt256.\n     */\n    function toInt256(uint256 value) internal pure returns (int256) {\n        // Note: Unsafe cast below is okay because `type(int256).max` is guaranteed to be positive\n        if (value > uint256(type(int256).max)) {\n            revert SafeCastOverflowedUintToInt(value);\n        }\n        return int256(value);\n    }\n\n    /**\n     * @dev Cast a boolean (false or true) to a uint256 (0 or 1) with no jump.\n     */\n    function toUint(bool b) internal pure returns (uint256 u) {\n        assembly (\"memory-safe\") {\n            u := iszero(iszero(b))\n        }\n    }\n}\n","keccak256":"0x195533c86d0ef72bcc06456a4f66a9b941f38eb403739b00f21fd7c1abd1ae54","license":"MIT"},"contracts/Governance.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.29;\n\nimport {Ownable} from \"@openzeppelin/contracts/access/Ownable.sol\";\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport {SafeERC20} from \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\nimport {IERC721} from \"@openzeppelin/contracts/token/ERC721/IERC721.sol\";\nimport {SafeCast} from \"@openzeppelin/contracts/utils/math/SafeCast.sol\";\nimport {Pausable} from \"@openzeppelin/contracts/utils/Pausable.sol\";\n\nimport {IStaking} from \"./interfaces/IStaking.sol\";\n\n/**\n * @title A contract for the governance of text-based proposals, with incentives for participants.\n * This is essentially a simplified version of the OpenZeppelin Governor\n * (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/5ac4d93ae318cdf6c8a1125dff3a439a2aeabb63/contracts/governance/Governor.sol),\n * with rewards and other BNB48-specific features implemented.\n */\ncontract Governance is Ownable, Pausable {\n    using SafeCast for uint256;\n    using SafeERC20 for IERC20;\n\n    enum ProposalState {\n        Active,\n        Defeated,\n        Succeeded,\n        Invalid,\n        Refunded\n    }\n\n    enum VoteType {\n        Against,\n        For,\n        Abstain\n    }\n\n    struct ProposalCore {\n        address proposer;\n        bool proposerRewardClaimed;\n        uint64 voteStart;\n        uint64 voteEnd;\n        uint256 totalStakeAtStart;\n        uint256 totalReward;\n        uint256 quorumThresholdBps;\n        uint256 forVotesThresholdBps;\n        uint256 proposerRewardBps;\n        bool refunded;\n    }\n\n    struct VoteInfo {\n        VoteType voteType;\n        uint256 weight;\n        bool rewardClaimed;\n    }\n\n    struct ProposalVote {\n        uint256 againstVotes;\n        uint256 forVotes;\n        uint256 abstainVotes;\n        mapping(address => VoteInfo) voteInfo;\n    }\n\n    // Events\n    event ProposalCreated(\n        uint256 indexed proposalId,\n        address indexed proposer,\n        uint64 voteStart,\n        uint64 voteEnd,\n        string title,\n        string description\n    );\n    event VoteCast(address indexed voter, uint256 indexed proposalId, uint8 support, uint256 weight, string reason);\n    event RewardPoolContributed(address indexed caller, uint256 amount);\n    event RewardClaimed(address indexed caller, uint256 indexed proposalId, uint256 amount);\n    event InvalidProposalRefunded(address indexed caller, uint256 indexed proposalId);\n    // Admin events\n    event VotingPeriodUpdated(address indexed caller, uint256 value);\n    event QuorumThresholdBpsUpdated(address indexed caller, uint256 value);\n    event ForVotesThresholdBpsUpdated(address indexed caller, uint256 value);\n    event MinDepositUpdated(address indexed caller, uint256 amount);\n    event RewardBpsUpdated(address indexed caller, uint256 value);\n    event MinRewardUpdated(address indexed caller, uint256 amount);\n    event MaxRewardUpdated(address indexed caller, uint256 amount);\n    event ProposerRewardBpsUpdated(address indexed caller, uint256 value);\n    event RewardPoolRemoved(address indexed caller, uint256 amount);\n\n    // The address of the Staking contract.\n    address public immutable staking;\n    // The address of the BNB48er NFT contract.\n    address public immutable bnb48er;\n\n    // The period to cast votes after a proposal is created, in seconds.\n    uint256 public votingPeriod;\n    // The required percentage of final votes within the total stakes at proposal time, expressed in basis points. 4800 = 48%.\n    uint256 public quorumThresholdBps;\n    // The required percentage of \"for\" votes within the non-abstinent voting stakes, in basis points.\n    uint256 public forVotesThresholdBps;\n    // The minimal amount of KOGE to create a proposal.\n    uint256 public minDeposit;\n    // The share of the reward pool for each proposal reward in basis points. 480 = 4.8%.\n    uint256 public rewardBps;\n    // The minimal amount of KOGE for each proposal reward from the reward pool.\n    uint256 public minReward;\n    // The maximal amount of KOGE for each proposal reward from the reward pool.\n    uint256 public maxReward;\n    // The proposer's share of each proposal reward in basis points. 480 = 4.8%.\n    uint256 public proposerRewardBps;\n\n    // The total amount of KOGE reserved for proposal rewards.\n    uint256 public rewardPool;\n    // tokenId => proposalId\n    mapping(uint256 => uint256) public bnb48ersInUse;\n    // proposalId => ProposalCore\n    mapping(uint256 => ProposalCore) public proposals;\n    // proposalId => ProposalVote\n    mapping(uint256 => ProposalVote) public proposalVotes;\n\n    // The global proposal ID.\n    uint256 private _proposalIdCounter;\n\n    /**\n     * @notice Governance constructor.\n     * @param _staking The address of the Staking contract.\n     * @param _bnb48er The address of the BNB48er NFT contract.\n     * @param _votingPeriod The period to cast votes after a proposal is created, in seconds.\n     * @param _quorumThresholdBps The required percentage of final votes within the total stakes at proposal time, in basis points.\n     * @param _forVotesThresholdBps The required percentage of \"for\" votes within the non-abstinent voting stakes, in basis points.\n     * @param _minDeposit The minimal amount of KOGE to create a proposal.\n     * @param _rewardBps The share of the reward pool for each proposal reward in basis points.\n     * @param _minReward The minimal amount of KOGE for each proposal reward from the reward pool.\n     * @param _maxReward The maximal amount of KOGE for each proposal reward from the reward pool.\n     * @param _proposerRewardBps The proposer's share of each proposal reward in basis points.\n     * @param _lastProposalId The last proposal ID from the legacy Governance contract.\n     */\n    constructor(\n        address _staking,\n        address _bnb48er,\n        uint256 _votingPeriod,\n        uint256 _quorumThresholdBps,\n        uint256 _forVotesThresholdBps,\n        uint256 _minDeposit,\n        uint256 _rewardBps,\n        uint256 _minReward,\n        uint256 _maxReward,\n        uint256 _proposerRewardBps,\n        uint256 _lastProposalId\n    ) Ownable(msg.sender) {\n        staking = _staking;\n        bnb48er = _bnb48er;\n        votingPeriod = _votingPeriod;\n        quorumThresholdBps = _quorumThresholdBps;\n        forVotesThresholdBps = _forVotesThresholdBps;\n        minDeposit = _minDeposit;\n        rewardBps = _rewardBps;\n        minReward = _minReward;\n        maxReward = _maxReward;\n        proposerRewardBps = _proposerRewardBps;\n        _proposalIdCounter = _lastProposalId;\n    }\n\n    /**\n     * @notice Returns the current state of a proposal.\n     * @param _proposalId The proposal ID.\n     */\n    function state(uint256 _proposalId) public view returns (ProposalState) {\n        ProposalCore storage proposal = proposals[_proposalId];\n\n        if (proposal.refunded) {\n            return ProposalState.Refunded;\n        }\n        uint64 voteStart = proposals[_proposalId].voteStart;\n        if (voteStart == 0) {\n            revert(\"unknown proposal ID\");\n        }\n        if (proposals[_proposalId].voteEnd >= block.timestamp) {\n            return ProposalState.Active;\n        }\n        if (!_quorumReached(_proposalId)) {\n            return ProposalState.Invalid;\n        }\n        if (_voteSucceeded(_proposalId)) {\n            return ProposalState.Succeeded;\n        }\n        return ProposalState.Defeated;\n    }\n\n    /**\n     * @notice Create a new proposal. Vote starts immediately and ends `votingPeriod` blocks afterwards.\n     * @param _tokenId The token ID for the BNB48er NFT to be associated with the proposal. An NFT can only be associated\n     * with a single active proposal.\n     * @param _deposit The amount of KOGE to be paid to the reward pool.\n     * @param _title The title of the proposal.\n     * @param _description The content of the proposal.\n     */\n    function propose(\n        uint256 _tokenId,\n        uint256 _deposit,\n        string memory _title,\n        string memory _description\n    ) external whenNotPaused returns (uint256 proposalId) {\n        require(IERC721(bnb48er).ownerOf(_tokenId) == msg.sender, \"not NFT owner\");\n        require(!isNftInUse(_tokenId), \"NFT in use\");\n        require(_deposit >= minDeposit, \"deposit not enough\");\n\n        ++_proposalIdCounter;\n        proposalId = _proposalIdCounter;\n\n        ProposalCore storage proposal = proposals[proposalId];\n        require(proposal.voteStart == 0, \"proposal already exists\");\n\n        proposal.proposer = msg.sender;\n        uint64 voteStart = block.timestamp.toUint64();\n        uint64 voteEnd = voteStart + votingPeriod.toUint64();\n        proposal.voteStart = voteStart;\n        proposal.voteEnd = voteEnd;\n        proposal.totalStakeAtStart = IStaking(staking).totalStakes();\n        proposal.quorumThresholdBps = quorumThresholdBps;\n        proposal.forVotesThresholdBps = forVotesThresholdBps;\n        proposal.proposerRewardBps = proposerRewardBps;\n\n        // Calculate reward.\n        uint256 rewardFromPool = calcRewardFromPool();\n        proposal.totalReward = rewardFromPool + _deposit;\n        // The `rewardFromPool` reserved will be refunded if the proposal fails to reach quorum.\n        rewardPool -= rewardFromPool;\n\n        // Update BNB48er in use.\n        bnb48ersInUse[_tokenId] = proposalId;\n        // Charge proposal deposit.\n        IERC20(IStaking(staking).koge()).safeTransferFrom(msg.sender, address(this), _deposit);\n\n        emit ProposalCreated(proposalId, msg.sender, voteStart, voteEnd, _title, _description);\n        return proposalId;\n    }\n\n    /**\n     * @notice Returns whether the given NFT is being used for an active proposal.\n     * @param _tokenId The token ID.\n     */\n    function isNftInUse(uint256 _tokenId) public view returns (bool) {\n        uint256 nftProposalId = bnb48ersInUse[_tokenId];\n        if (nftProposalId != 0) {\n            ProposalState inUseState = state(nftProposalId);\n            if (inUseState == ProposalState.Active) {\n                return true;\n            }\n        }\n        return false;\n    }\n\n    /**\n     * @dev Calculates the next proposal reward that should be reserved from the reward pool\n     * based on the current parameters.\n     */\n    function calcRewardFromPool() public view returns (uint256) {\n        if (rewardPool < minReward) {\n            return rewardPool;\n        }\n        uint256 reward = (rewardPool * rewardBps) / 1e4;\n        if (reward > maxReward) {\n            return maxReward;\n        }\n        if (reward < minReward) {\n            return minReward;\n        }\n        return reward;\n    }\n\n    /**\n     * @notice Accessor to the proposal vote counts.\n     * @param _proposalId The proposal ID.\n     */\n    function proposalVoteCounts(\n        uint256 _proposalId\n    ) public view returns (uint256 _againstVotes, uint256 _forVotes, uint256 _abstainVotes) {\n        ProposalVote storage proposalVote = proposalVotes[_proposalId];\n        return (proposalVote.againstVotes, proposalVote.forVotes, proposalVote.abstainVotes);\n    }\n\n    /**\n     * @notice Accessor to the vote info of a proposal for an account.\n     * @param _proposalId The proposal ID.\n     * @param _account The voting account.\n     */\n    function proposalVoteInfo(uint256 _proposalId, address _account) public view returns (VoteInfo memory _voteInfo) {\n        ProposalVote storage proposalVote = proposalVotes[_proposalId];\n        return proposalVote.voteInfo[_account];\n    }\n\n    /**\n     * @dev Returns if the amount of votes already cast passes the threshold limit.\n     * @param _proposalId The proposal ID.\n     */\n    function _quorumReached(uint256 _proposalId) internal view returns (bool) {\n        ProposalCore storage proposal = proposals[_proposalId];\n        ProposalVote storage proposalVote = proposalVotes[_proposalId];\n\n        return\n            (proposalVote.againstVotes + proposalVote.forVotes + proposalVote.abstainVotes) >=\n            ((proposal.totalStakeAtStart * proposal.quorumThresholdBps) / 1e4);\n    }\n\n    /**\n     * @dev Returns if the vote succeeded. Checks \"for\" votes threshold.\n     * @param _proposalId The proposal ID.\n     */\n    function _voteSucceeded(uint256 _proposalId) internal view returns (bool) {\n        ProposalCore storage proposal = proposals[_proposalId];\n        ProposalVote storage proposalVote = proposalVotes[_proposalId];\n\n        return\n            proposalVote.forVotes >=\n            (((proposalVote.againstVotes + proposalVote.forVotes) * proposal.forVotesThresholdBps) / 1e4);\n    }\n\n    /**\n     * @notice Casts a vote.\n     * @param _proposalId The proposal ID.\n     * @param _support The vote enum type.\n     * @param _reason The optional reason for the vote.\n     */\n    function castVote(\n        uint256 _proposalId,\n        uint8 _support,\n        string memory _reason\n    ) external whenNotPaused returns (uint256) {\n        require(state(_proposalId) == ProposalState.Active, \"vote not active\");\n\n        uint256 weight = IStaking(staking).getStake(msg.sender);\n        _countVote(_proposalId, msg.sender, _support, weight);\n\n        emit VoteCast(msg.sender, _proposalId, _support, weight, _reason);\n\n        return weight;\n    }\n\n    /**\n     * @dev Registers a vote with a given support and voting weight.\n     * @param _proposalId The proposal ID.\n     * @param _account The voting account.\n     * @param _support The vote enum type.\n     * @param _weight The weight of the vote.\n     */\n    function _countVote(uint256 _proposalId, address _account, uint8 _support, uint256 _weight) internal {\n        ProposalVote storage proposalVote = proposalVotes[_proposalId];\n        VoteInfo storage info = proposalVote.voteInfo[_account];\n        require(info.weight == 0, \"vote already cast\");\n\n        if (_support == uint8(VoteType.Against)) {\n            proposalVote.againstVotes += _weight;\n        } else if (_support == uint8(VoteType.For)) {\n            proposalVote.forVotes += _weight;\n        } else if (_support == uint8(VoteType.Abstain)) {\n            proposalVote.abstainVotes += _weight;\n        } else {\n            revert(\"invalid value for enum VoteType\");\n        }\n        info.weight = _weight;\n        info.voteType = VoteType(_support);\n    }\n\n    /**\n     * @notice Claims KOGE reward for valid proposals.\n     * @param _proposalId The proposal ID.\n     */\n    function claimReward(uint256 _proposalId) external whenNotPaused {\n        ProposalCore storage proposal = proposals[_proposalId];\n        ProposalVote storage proposalVote = proposalVotes[_proposalId];\n        VoteInfo storage voteInfo = proposalVote.voteInfo[msg.sender];\n        (bool isProposer, bool isVoter, uint256 claimableAmount) = _getClaimableRewardInfo(\n            msg.sender,\n            _proposalId,\n            proposal,\n            proposalVote,\n            voteInfo\n        );\n        require(claimableAmount > 0, \"no claimable amount\");\n\n        // Mark claimed\n        if (isProposer) {\n            proposal.proposerRewardClaimed = true;\n        }\n        if (isVoter) {\n            voteInfo.rewardClaimed = true;\n        }\n\n        IERC20(IStaking(staking).koge()).safeTransfer(msg.sender, claimableAmount);\n        emit RewardClaimed(msg.sender, _proposalId, claimableAmount);\n    }\n\n    /**\n     * @notice Get claimable reward info for an account and a proposal.\n     * @param _account The account address.\n     * @param _proposalId The proposal ID.\n     */\n    function getClaimableRewardInfo(\n        address _account,\n        uint256 _proposalId\n    ) public view returns (bool isProposer, bool isVoter, uint256 claimableAmount) {\n        ProposalCore storage proposal = proposals[_proposalId];\n        ProposalVote storage proposalVote = proposalVotes[_proposalId];\n        VoteInfo storage voteInfo = proposalVote.voteInfo[_account];\n        return _getClaimableRewardInfo(_account, _proposalId, proposal, proposalVote, voteInfo);\n    }\n\n    /**\n     * @dev Internal getter for claimable reward info for an account and a proposal.\n     * @param _account The account address.\n     * @param _proposalId The proposal ID.\n     * @param _proposal The ProposalCore.\n     * @param _proposalVote The ProposalVote.\n     * @param _voteInfo The VoteInfo of the account.\n     */\n    function _getClaimableRewardInfo(\n        address _account,\n        uint256 _proposalId,\n        ProposalCore storage _proposal,\n        ProposalVote storage _proposalVote,\n        VoteInfo storage _voteInfo\n    ) internal view returns (bool isProposer, bool isVoter, uint256 claimableAmount) {\n        isProposer = _proposal.proposer == _account;\n        isVoter = _voteInfo.weight > 0;\n        ProposalState proposalState = state(_proposalId);\n        // Proposal invalid or not finalized\n        if (proposalState != ProposalState.Succeeded && proposalState != ProposalState.Defeated) {\n            return (isProposer, isVoter, 0);\n        }\n        // Proposer already claimed\n        if (isProposer && _proposal.proposerRewardClaimed) {\n            return (isProposer, isVoter, 0);\n        }\n        // Voter already claimed\n        if (_voteInfo.weight > 0 && _voteInfo.rewardClaimed) {\n            return (isProposer, isVoter, 0);\n        }\n\n        uint256 proposerReward = (_proposal.totalReward * _proposal.proposerRewardBps) / 1e4;\n        claimableAmount =\n            ((_proposal.totalReward - proposerReward) * _voteInfo.weight) /\n            (_proposalVote.forVotes + _proposalVote.againstVotes + _proposalVote.abstainVotes);\n        if (isProposer) {\n            claimableAmount += proposerReward;\n        }\n        return (isProposer, isVoter, claimableAmount);\n    }\n\n    /**\n     * @notice Refunds KOGE to the reward pool for a proposal that failed to reach quorum.\n     * @param _proposalId The proposal ID.\n     */\n    function refundInvalidProposal(uint256 _proposalId) external whenNotPaused {\n        ProposalCore storage proposal = proposals[_proposalId];\n        require(state(_proposalId) == ProposalState.Invalid, \"not invalid proposal\");\n\n        proposal.refunded = true;\n        rewardPool += proposal.totalReward;\n\n        emit InvalidProposalRefunded(msg.sender, _proposalId);\n    }\n\n    /**\n     * @notice Contributes KOGE to the proposal reward pool.\n     * @param _amount The amount to contribute.\n     */\n    function contributeToRewardPool(uint256 _amount) external whenNotPaused {\n        rewardPool += _amount;\n        IERC20(IStaking(staking).koge()).safeTransferFrom(msg.sender, address(this), _amount);\n        emit RewardPoolContributed(msg.sender, _amount);\n    }\n\n    // -------------------- Admin --------------------\n\n    /**\n     * @dev Sets `votingPeriod`.\n     * @param _votingPeriod The new `votingPeriod`.\n     */\n    function setVotingPeriod(uint256 _votingPeriod) external onlyOwner {\n        votingPeriod = _votingPeriod;\n        emit VotingPeriodUpdated(msg.sender, _votingPeriod);\n    }\n\n    /**\n     * @dev Sets `quorumThresholdBps`.\n     * @param _quorumThresholdBps The new `quorumThresholdBps`.\n     */\n    function setQuorumThresholdBps(uint256 _quorumThresholdBps) external onlyOwner {\n        quorumThresholdBps = _quorumThresholdBps;\n        emit QuorumThresholdBpsUpdated(msg.sender, _quorumThresholdBps);\n    }\n\n    /**\n     * @dev Sets `forVotesThresholdBps`.\n     * @param _forVotesThresholdBps The new `forVotesThresholdBps`.\n     */\n    function setForVotesThresholdBps(uint256 _forVotesThresholdBps) external onlyOwner {\n        forVotesThresholdBps = _forVotesThresholdBps;\n        emit ForVotesThresholdBpsUpdated(msg.sender, _forVotesThresholdBps);\n    }\n\n    /**\n     * @dev Sets `minDeposit`.\n     * @param _minDeposit The new `minDeposit`.\n     */\n    function setMinDeposit(uint256 _minDeposit) external onlyOwner {\n        minDeposit = _minDeposit;\n        emit MinDepositUpdated(msg.sender, _minDeposit);\n    }\n\n    /**\n     * @dev Sets `rewardBps`.\n     * @param _rewardBps The new `rewardBps`.\n     */\n    function setRewardBps(uint256 _rewardBps) external onlyOwner {\n        rewardBps = _rewardBps;\n        emit RewardBpsUpdated(msg.sender, _rewardBps);\n    }\n\n    /**\n     * @dev Sets `minReward`.\n     * @param _minReward The new `minReward`.\n     */\n    function setMinReward(uint256 _minReward) external onlyOwner {\n        minReward = _minReward;\n        emit MinRewardUpdated(msg.sender, _minReward);\n    }\n\n    /**\n     * @dev Sets `maxReward`.\n     * @param _maxReward The new `maxReward`.\n     */\n    function setMaxReward(uint256 _maxReward) external onlyOwner {\n        maxReward = _maxReward;\n        emit MaxRewardUpdated(msg.sender, _maxReward);\n    }\n\n    /**\n     * @dev Sets `proposerRewardBps`.\n     * @param _proposerRewardBps The new `proposerRewardBps`.\n     */\n    function setProposerRewardBps(uint256 _proposerRewardBps) external onlyOwner {\n        proposerRewardBps = _proposerRewardBps;\n        emit ProposerRewardBpsUpdated(msg.sender, _proposerRewardBps);\n    }\n\n    /**\n     * @notice Removes KOGE from the proposal reward pool.\n     * @param _amount The amount to remove.\n     */\n    function removeFromRewardPool(uint256 _amount) external onlyOwner {\n        rewardPool -= _amount;\n        IERC20(IStaking(staking).koge()).safeTransfer(msg.sender, _amount);\n        emit RewardPoolRemoved(msg.sender, _amount);\n    }\n\n    /**\n     * @notice Pauses the contract.\n     */\n    function pause() external onlyOwner {\n        _pause();\n    }\n\n    /**\n     * @notice Unpauses the contract.\n     */\n    function unpause() external onlyOwner {\n        _unpause();\n    }\n}\n","keccak256":"0x008f2a4962de49f6ad532a1711200737d4edf329df848e3af56dce2751fd931a","license":"MIT"},"contracts/interfaces/IStaking.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\ninterface IStaking {\n    function koge() external view returns (address);\n    function totalStakes() external view returns (uint256);\n    function getStake(address _user) external view returns (uint256);\n}\n","keccak256":"0x798058f5aac57d928685f5f2956c84e7a39963a0637201dd66d5f823b49f3edb","license":"MIT"}},"version":1},"storageLayout":{"types":{"t_bool":{"label":"bool","encoding":"inplace","numberOfBytes":"1"},"t_uint64":{"label":"uint64","encoding":"inplace","numberOfBytes":"8"},"t_address":{"label":"address","encoding":"inplace","numberOfBytes":"20"},"t_uint256":{"label":"uint256","encoding":"inplace","numberOfBytes":"32"},"t_enum(VoteType)2803":{"label":"enum Governance.VoteType","encoding":"inplace","numberOfBytes":"1"},"t_mapping(t_uint256,t_uint256)":{"key":"t_uint256","label":"mapping(uint256 => uint256)","value":"t_uint256","encoding":"mapping","numberOfBytes":"32"},"t_struct(VoteInfo)2832_storage":{"label":"struct Governance.VoteInfo","members":[{"slot":"0","type":"t_enum(VoteType)2803","astId":2827,"label":"voteType","offset":0,"contract":"contracts/Governance.sol:Governance"},{"slot":"1","type":"t_uint256","astId":2829,"label":"weight","offset":0,"contract":"contracts/Governance.sol:Governance"},{"slot":"2","type":"t_bool","astId":2831,"label":"rewardClaimed","offset":0,"contract":"contracts/Governance.sol:Governance"}],"encoding":"inplace","numberOfBytes":"96"},"t_struct(ProposalCore)2824_storage":{"label":"struct Governance.ProposalCore","members":[{"slot":"0","type":"t_address","astId":2805,"label":"proposer","offset":0,"contract":"contracts/Governance.sol:Governance"},{"slot":"0","type":"t_bool","astId":2807,"label":"proposerRewardClaimed","offset":20,"contract":"contracts/Governance.sol:Governance"},{"slot":"0","type":"t_uint64","astId":2809,"label":"voteStart","offset":21,"contract":"contracts/Governance.sol:Governance"},{"slot":"1","type":"t_uint64","astId":2811,"label":"voteEnd","offset":0,"contract":"contracts/Governance.sol:Governance"},{"slot":"2","type":"t_uint256","astId":2813,"label":"totalStakeAtStart","offset":0,"contract":"contracts/Governance.sol:Governance"},{"slot":"3","type":"t_uint256","astId":2815,"label":"totalReward","offset":0,"contract":"contracts/Governance.sol:Governance"},{"slot":"4","type":"t_uint256","astId":2817,"label":"quorumThresholdBps","offset":0,"contract":"contracts/Governance.sol:Governance"},{"slot":"5","type":"t_uint256","astId":2819,"label":"forVotesThresholdBps","offset":0,"contract":"contracts/Governance.sol:Governance"},{"slot":"6","type":"t_uint256","astId":2821,"label":"proposerRewardBps","offset":0,"contract":"contracts/Governance.sol:Governance"},{"slot":"7","type":"t_bool","astId":2823,"label":"refunded","offset":0,"contract":"contracts/Governance.sol:Governance"}],"encoding":"inplace","numberOfBytes":"256"},"t_struct(ProposalVote)2844_storage":{"label":"struct Governance.ProposalVote","members":[{"slot":"0","type":"t_uint256","astId":2834,"label":"againstVotes","offset":0,"contract":"contracts/Governance.sol:Governance"},{"slot":"1","type":"t_uint256","astId":2836,"label":"forVotes","offset":0,"contract":"contracts/Governance.sol:Governance"},{"slot":"2","type":"t_uint256","astId":2838,"label":"abstainVotes","offset":0,"contract":"contracts/Governance.sol:Governance"},{"slot":"3","type":"t_mapping(t_address,t_struct(VoteInfo)2832_storage)","astId":2843,"label":"voteInfo","offset":0,"contract":"contracts/Governance.sol:Governance"}],"encoding":"inplace","numberOfBytes":"128"},"t_mapping(t_address,t_struct(VoteInfo)2832_storage)":{"key":"t_address","label":"mapping(address => struct Governance.VoteInfo)","value":"t_struct(VoteInfo)2832_storage","encoding":"mapping","numberOfBytes":"32"},"t_mapping(t_uint256,t_struct(ProposalCore)2824_storage)":{"key":"t_uint256","label":"mapping(uint256 => struct Governance.ProposalCore)","value":"t_struct(ProposalCore)2824_storage","encoding":"mapping","numberOfBytes":"32"},"t_mapping(t_uint256,t_struct(ProposalVote)2844_storage)":{"key":"t_uint256","label":"mapping(uint256 => struct Governance.ProposalVote)","value":"t_struct(ProposalVote)2844_storage","encoding":"mapping","numberOfBytes":"32"}},"storage":[{"slot":"0","type":"t_address","astId":8,"label":"_owner","offset":0,"contract":"contracts/Governance.sol:Governance"},{"slot":"0","type":"t_bool","astId":880,"label":"_paused","offset":20,"contract":"contracts/Governance.sol:Governance"},{"slot":"1","type":"t_uint256","astId":2950,"label":"votingPeriod","offset":0,"contract":"contracts/Governance.sol:Governance"},{"slot":"2","type":"t_uint256","astId":2952,"label":"quorumThresholdBps","offset":0,"contract":"contracts/Governance.sol:Governance"},{"slot":"3","type":"t_uint256","astId":2954,"label":"forVotesThresholdBps","offset":0,"contract":"contracts/Governance.sol:Governance"},{"slot":"4","type":"t_uint256","astId":2956,"label":"minDeposit","offset":0,"contract":"contracts/Governance.sol:Governance"},{"slot":"5","type":"t_uint256","astId":2958,"label":"rewardBps","offset":0,"contract":"contracts/Governance.sol:Governance"},{"slot":"6","type":"t_uint256","astId":2960,"label":"minReward","offset":0,"contract":"contracts/Governance.sol:Governance"},{"slot":"7","type":"t_uint256","astId":2962,"label":"maxReward","offset":0,"contract":"contracts/Governance.sol:Governance"},{"slot":"8","type":"t_uint256","astId":2964,"label":"proposerRewardBps","offset":0,"contract":"contracts/Governance.sol:Governance"},{"slot":"9","type":"t_uint256","astId":2966,"label":"rewardPool","offset":0,"contract":"contracts/Governance.sol:Governance"},{"slot":"10","type":"t_mapping(t_uint256,t_uint256)","astId":2970,"label":"bnb48ersInUse","offset":0,"contract":"contracts/Governance.sol:Governance"},{"slot":"11","type":"t_mapping(t_uint256,t_struct(ProposalCore)2824_storage)","astId":2975,"label":"proposals","offset":0,"contract":"contracts/Governance.sol:Governance"},{"slot":"12","type":"t_mapping(t_uint256,t_struct(ProposalVote)2844_storage)","astId":2980,"label":"proposalVotes","offset":0,"contract":"contracts/Governance.sol:Governance"},{"slot":"13","type":"t_uint256","astId":2982,"label":"_proposalIdCounter","offset":0,"contract":"contracts/Governance.sol:Governance"}]},"transientStorageLayout":{"types":null,"storage":[]},"userdoc":{"kind":"user","methods":{"pause()":{"notice":"Pauses the contract."},"unpause()":{"notice":"Unpauses the contract."},"constructor":{"notice":"Governance constructor."},"state(uint256)":{"notice":"Returns the current state of a proposal."},"isNftInUse(uint256)":{"notice":"Returns whether the given NFT is being used for an active proposal."},"claimReward(uint256)":{"notice":"Claims KOGE reward for valid proposals."},"proposalVoteCounts(uint256)":{"notice":"Accessor to the proposal vote counts."},"removeFromRewardPool(uint256)":{"notice":"Removes KOGE from the proposal reward pool."},"castVote(uint256,uint8,string)":{"notice":"Casts a vote."},"refundInvalidProposal(uint256)":{"notice":"Refunds KOGE to the reward pool for a proposal that failed to reach quorum."},"contributeToRewardPool(uint256)":{"notice":"Contributes KOGE to the proposal reward pool."},"proposalVoteInfo(uint256,address)":{"notice":"Accessor to the vote info of a proposal for an account."},"propose(uint256,uint256,string,string)":{"notice":"Create a new proposal. Vote starts immediately and ends `votingPeriod` blocks afterwards."},"getClaimableRewardInfo(address,uint256)":{"notice":"Get claimable reward info for an account and a proposal."}},"version":1},"devdoc":{"kind":"dev","title":"A contract for the governance of text-based proposals, with incentives for participants. This is essentially a simplified version of the OpenZeppelin Governor (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/5ac4d93ae318cdf6c8a1125dff3a439a2aeabb63/contracts/governance/Governor.sol), with rewards and other BNB48-specific features implemented.","errors":{"EnforcedPause()":[{"details":"The operation failed because the contract is paused."}],"ExpectedPause()":[{"details":"The operation failed because the contract is not paused."}],"OwnableInvalidOwner(address)":[{"details":"The owner is not a valid owner account. (eg. `address(0)`)"}],"SafeERC20FailedOperation(address)":[{"details":"An operation with an ERC-20 token failed."}],"OwnableUnauthorizedAccount(address)":[{"details":"The caller account is not authorized to perform an operation."}],"SafeCastOverflowedUintDowncast(uint8,uint256)":[{"details":"Value doesn't fit in an uint of `bits` size."}]},"events":{"Paused(address)":{"details":"Emitted when the pause is triggered by `account`."},"Unpaused(address)":{"details":"Emitted when the pause is lifted by `account`."}},"methods":{"owner()":{"details":"Returns the address of the current owner."},"paused()":{"details":"Returns true if the contract is paused, and false otherwise."},"constructor":{"params":{"_bnb48er":"The address of the BNB48er NFT contract.","_staking":"The address of the Staking contract.","_maxReward":"The maximal amount of KOGE for each proposal reward from the reward pool.","_minReward":"The minimal amount of KOGE for each proposal reward from the reward pool.","_rewardBps":"The share of the reward pool for each proposal reward in basis points.","_minDeposit":"The minimal amount of KOGE to create a proposal.","_votingPeriod":"The period to cast votes after a proposal is created, in seconds.","_lastProposalId":"The last proposal ID from the legacy Governance contract.","_proposerRewardBps":"The proposer's share of each proposal reward in basis points.","_quorumThresholdBps":"The required percentage of final votes within the total stakes at proposal time, in basis points.","_forVotesThresholdBps":"The required percentage of \"for\" votes within the non-abstinent voting stakes, in basis points."}},"state(uint256)":{"params":{"_proposalId":"The proposal ID."}},"isNftInUse(uint256)":{"params":{"_tokenId":"The token ID."}},"renounceOwnership()":{"details":"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner."},"calcRewardFromPool()":{"details":"Calculates the next proposal reward that should be reserved from the reward pool based on the current parameters."},"claimReward(uint256)":{"params":{"_proposalId":"The proposal ID."}},"setMaxReward(uint256)":{"params":{"_maxReward":"The new `maxReward`."},"details":"Sets `maxReward`."},"setMinReward(uint256)":{"params":{"_minReward":"The new `minReward`."},"details":"Sets `minReward`."},"setRewardBps(uint256)":{"params":{"_rewardBps":"The new `rewardBps`."},"details":"Sets `rewardBps`."},"setMinDeposit(uint256)":{"params":{"_minDeposit":"The new `minDeposit`."},"details":"Sets `minDeposit`."},"setVotingPeriod(uint256)":{"params":{"_votingPeriod":"The new `votingPeriod`."},"details":"Sets `votingPeriod`."},"transferOwnership(address)":{"details":"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner."},"proposalVoteCounts(uint256)":{"params":{"_proposalId":"The proposal ID."}},"removeFromRewardPool(uint256)":{"params":{"_amount":"The amount to remove."}},"setProposerRewardBps(uint256)":{"params":{"_proposerRewardBps":"The new `proposerRewardBps`."},"details":"Sets `proposerRewardBps`."},"castVote(uint256,uint8,string)":{"params":{"_reason":"The optional reason for the vote.","_support":"The vote enum type.","_proposalId":"The proposal ID."}},"refundInvalidProposal(uint256)":{"params":{"_proposalId":"The proposal ID."}},"setQuorumThresholdBps(uint256)":{"params":{"_quorumThresholdBps":"The new `quorumThresholdBps`."},"details":"Sets `quorumThresholdBps`."},"contributeToRewardPool(uint256)":{"params":{"_amount":"The amount to contribute."}},"setForVotesThresholdBps(uint256)":{"params":{"_forVotesThresholdBps":"The new `forVotesThresholdBps`."},"details":"Sets `forVotesThresholdBps`."},"proposalVoteInfo(uint256,address)":{"params":{"_account":"The voting account.","_proposalId":"The proposal ID."}},"propose(uint256,uint256,string,string)":{"params":{"_title":"The title of the proposal.","_deposit":"The amount of KOGE to be paid to the reward pool.","_tokenId":"The token ID for the BNB48er NFT to be associated with the proposal. An NFT can only be associated with a single active proposal.","_description":"The content of the proposal."}},"getClaimableRewardInfo(address,uint256)":{"params":{"_account":"The account address.","_proposalId":"The proposal ID."}}},"version":1},"sourceIds":{"contracts/Governance.sol":{"id":11},"contracts/interfaces/IStaking.sol":{"id":12},"@openzeppelin/contracts/utils/Context.sol":{"id":7},"@openzeppelin/contracts/access/Ownable.sol":{"id":0},"@openzeppelin/contracts/utils/Pausable.sol":{"id":8},"@openzeppelin/contracts/interfaces/IERC20.sol":{"id":3},"@openzeppelin/contracts/interfaces/IERC165.sol":{"id":2},"@openzeppelin/contracts/token/ERC20/IERC20.sol":{"id":4},"@openzeppelin/contracts/interfaces/IERC1363.sol":{"id":1},"@openzeppelin/contracts/utils/math/SafeCast.sol":{"id":10},"@openzeppelin/contracts/token/ERC721/IERC721.sol":{"id":6},"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol":{"id":5},"@openzeppelin/contracts/utils/introspection/IERC165.sol":{"id":9}},"additionalInput":null,"stdJsonInput":{"sources":{"contracts/Governance.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.29;\n\nimport {Ownable} from \"@openzeppelin/contracts/access/Ownable.sol\";\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport {SafeERC20} from \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\nimport {IERC721} from \"@openzeppelin/contracts/token/ERC721/IERC721.sol\";\nimport {SafeCast} from \"@openzeppelin/contracts/utils/math/SafeCast.sol\";\nimport {Pausable} from \"@openzeppelin/contracts/utils/Pausable.sol\";\n\nimport {IStaking} from \"./interfaces/IStaking.sol\";\n\n/**\n * @title A contract for the governance of text-based proposals, with incentives for participants.\n * This is essentially a simplified version of the OpenZeppelin Governor\n * (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/5ac4d93ae318cdf6c8a1125dff3a439a2aeabb63/contracts/governance/Governor.sol),\n * with rewards and other BNB48-specific features implemented.\n */\ncontract Governance is Ownable, Pausable {\n    using SafeCast for uint256;\n    using SafeERC20 for IERC20;\n\n    enum ProposalState {\n        Active,\n        Defeated,\n        Succeeded,\n        Invalid,\n        Refunded\n    }\n\n    enum VoteType {\n        Against,\n        For,\n        Abstain\n    }\n\n    struct ProposalCore {\n        address proposer;\n        bool proposerRewardClaimed;\n        uint64 voteStart;\n        uint64 voteEnd;\n        uint256 totalStakeAtStart;\n        uint256 totalReward;\n        uint256 quorumThresholdBps;\n        uint256 forVotesThresholdBps;\n        uint256 proposerRewardBps;\n        bool refunded;\n    }\n\n    struct VoteInfo {\n        VoteType voteType;\n        uint256 weight;\n        bool rewardClaimed;\n    }\n\n    struct ProposalVote {\n        uint256 againstVotes;\n        uint256 forVotes;\n        uint256 abstainVotes;\n        mapping(address => VoteInfo) voteInfo;\n    }\n\n    // Events\n    event ProposalCreated(\n        uint256 indexed proposalId,\n        address indexed proposer,\n        uint64 voteStart,\n        uint64 voteEnd,\n        string title,\n        string description\n    );\n    event VoteCast(address indexed voter, uint256 indexed proposalId, uint8 support, uint256 weight, string reason);\n    event RewardPoolContributed(address indexed caller, uint256 amount);\n    event RewardClaimed(address indexed caller, uint256 indexed proposalId, uint256 amount);\n    event InvalidProposalRefunded(address indexed caller, uint256 indexed proposalId);\n    // Admin events\n    event VotingPeriodUpdated(address indexed caller, uint256 value);\n    event QuorumThresholdBpsUpdated(address indexed caller, uint256 value);\n    event ForVotesThresholdBpsUpdated(address indexed caller, uint256 value);\n    event MinDepositUpdated(address indexed caller, uint256 amount);\n    event RewardBpsUpdated(address indexed caller, uint256 value);\n    event MinRewardUpdated(address indexed caller, uint256 amount);\n    event MaxRewardUpdated(address indexed caller, uint256 amount);\n    event ProposerRewardBpsUpdated(address indexed caller, uint256 value);\n    event RewardPoolRemoved(address indexed caller, uint256 amount);\n\n    // The address of the Staking contract.\n    address public immutable staking;\n    // The address of the BNB48er NFT contract.\n    address public immutable bnb48er;\n\n    // The period to cast votes after a proposal is created, in seconds.\n    uint256 public votingPeriod;\n    // The required percentage of final votes within the total stakes at proposal time, expressed in basis points. 4800 = 48%.\n    uint256 public quorumThresholdBps;\n    // The required percentage of \"for\" votes within the non-abstinent voting stakes, in basis points.\n    uint256 public forVotesThresholdBps;\n    // The minimal amount of KOGE to create a proposal.\n    uint256 public minDeposit;\n    // The share of the reward pool for each proposal reward in basis points. 480 = 4.8%.\n    uint256 public rewardBps;\n    // The minimal amount of KOGE for each proposal reward from the reward pool.\n    uint256 public minReward;\n    // The maximal amount of KOGE for each proposal reward from the reward pool.\n    uint256 public maxReward;\n    // The proposer's share of each proposal reward in basis points. 480 = 4.8%.\n    uint256 public proposerRewardBps;\n\n    // The total amount of KOGE reserved for proposal rewards.\n    uint256 public rewardPool;\n    // tokenId => proposalId\n    mapping(uint256 => uint256) public bnb48ersInUse;\n    // proposalId => ProposalCore\n    mapping(uint256 => ProposalCore) public proposals;\n    // proposalId => ProposalVote\n    mapping(uint256 => ProposalVote) public proposalVotes;\n\n    // The global proposal ID.\n    uint256 private _proposalIdCounter;\n\n    /**\n     * @notice Governance constructor.\n     * @param _staking The address of the Staking contract.\n     * @param _bnb48er The address of the BNB48er NFT contract.\n     * @param _votingPeriod The period to cast votes after a proposal is created, in seconds.\n     * @param _quorumThresholdBps The required percentage of final votes within the total stakes at proposal time, in basis points.\n     * @param _forVotesThresholdBps The required percentage of \"for\" votes within the non-abstinent voting stakes, in basis points.\n     * @param _minDeposit The minimal amount of KOGE to create a proposal.\n     * @param _rewardBps The share of the reward pool for each proposal reward in basis points.\n     * @param _minReward The minimal amount of KOGE for each proposal reward from the reward pool.\n     * @param _maxReward The maximal amount of KOGE for each proposal reward from the reward pool.\n     * @param _proposerRewardBps The proposer's share of each proposal reward in basis points.\n     * @param _lastProposalId The last proposal ID from the legacy Governance contract.\n     */\n    constructor(\n        address _staking,\n        address _bnb48er,\n        uint256 _votingPeriod,\n        uint256 _quorumThresholdBps,\n        uint256 _forVotesThresholdBps,\n        uint256 _minDeposit,\n        uint256 _rewardBps,\n        uint256 _minReward,\n        uint256 _maxReward,\n        uint256 _proposerRewardBps,\n        uint256 _lastProposalId\n    ) Ownable(msg.sender) {\n        staking = _staking;\n        bnb48er = _bnb48er;\n        votingPeriod = _votingPeriod;\n        quorumThresholdBps = _quorumThresholdBps;\n        forVotesThresholdBps = _forVotesThresholdBps;\n        minDeposit = _minDeposit;\n        rewardBps = _rewardBps;\n        minReward = _minReward;\n        maxReward = _maxReward;\n        proposerRewardBps = _proposerRewardBps;\n        _proposalIdCounter = _lastProposalId;\n    }\n\n    /**\n     * @notice Returns the current state of a proposal.\n     * @param _proposalId The proposal ID.\n     */\n    function state(uint256 _proposalId) public view returns (ProposalState) {\n        ProposalCore storage proposal = proposals[_proposalId];\n\n        if (proposal.refunded) {\n            return ProposalState.Refunded;\n        }\n        uint64 voteStart = proposals[_proposalId].voteStart;\n        if (voteStart == 0) {\n            revert(\"unknown proposal ID\");\n        }\n        if (proposals[_proposalId].voteEnd >= block.timestamp) {\n            return ProposalState.Active;\n        }\n        if (!_quorumReached(_proposalId)) {\n            return ProposalState.Invalid;\n        }\n        if (_voteSucceeded(_proposalId)) {\n            return ProposalState.Succeeded;\n        }\n        return ProposalState.Defeated;\n    }\n\n    /**\n     * @notice Create a new proposal. Vote starts immediately and ends `votingPeriod` blocks afterwards.\n     * @param _tokenId The token ID for the BNB48er NFT to be associated with the proposal. An NFT can only be associated\n     * with a single active proposal.\n     * @param _deposit The amount of KOGE to be paid to the reward pool.\n     * @param _title The title of the proposal.\n     * @param _description The content of the proposal.\n     */\n    function propose(\n        uint256 _tokenId,\n        uint256 _deposit,\n        string memory _title,\n        string memory _description\n    ) external whenNotPaused returns (uint256 proposalId) {\n        require(IERC721(bnb48er).ownerOf(_tokenId) == msg.sender, \"not NFT owner\");\n        require(!isNftInUse(_tokenId), \"NFT in use\");\n        require(_deposit >= minDeposit, \"deposit not enough\");\n\n        ++_proposalIdCounter;\n        proposalId = _proposalIdCounter;\n\n        ProposalCore storage proposal = proposals[proposalId];\n        require(proposal.voteStart == 0, \"proposal already exists\");\n\n        proposal.proposer = msg.sender;\n        uint64 voteStart = block.timestamp.toUint64();\n        uint64 voteEnd = voteStart + votingPeriod.toUint64();\n        proposal.voteStart = voteStart;\n        proposal.voteEnd = voteEnd;\n        proposal.totalStakeAtStart = IStaking(staking).totalStakes();\n        proposal.quorumThresholdBps = quorumThresholdBps;\n        proposal.forVotesThresholdBps = forVotesThresholdBps;\n        proposal.proposerRewardBps = proposerRewardBps;\n\n        // Calculate reward.\n        uint256 rewardFromPool = calcRewardFromPool();\n        proposal.totalReward = rewardFromPool + _deposit;\n        // The `rewardFromPool` reserved will be refunded if the proposal fails to reach quorum.\n        rewardPool -= rewardFromPool;\n\n        // Update BNB48er in use.\n        bnb48ersInUse[_tokenId] = proposalId;\n        // Charge proposal deposit.\n        IERC20(IStaking(staking).koge()).safeTransferFrom(msg.sender, address(this), _deposit);\n\n        emit ProposalCreated(proposalId, msg.sender, voteStart, voteEnd, _title, _description);\n        return proposalId;\n    }\n\n    /**\n     * @notice Returns whether the given NFT is being used for an active proposal.\n     * @param _tokenId The token ID.\n     */\n    function isNftInUse(uint256 _tokenId) public view returns (bool) {\n        uint256 nftProposalId = bnb48ersInUse[_tokenId];\n        if (nftProposalId != 0) {\n            ProposalState inUseState = state(nftProposalId);\n            if (inUseState == ProposalState.Active) {\n                return true;\n            }\n        }\n        return false;\n    }\n\n    /**\n     * @dev Calculates the next proposal reward that should be reserved from the reward pool\n     * based on the current parameters.\n     */\n    function calcRewardFromPool() public view returns (uint256) {\n        if (rewardPool < minReward) {\n            return rewardPool;\n        }\n        uint256 reward = (rewardPool * rewardBps) / 1e4;\n        if (reward > maxReward) {\n            return maxReward;\n        }\n        if (reward < minReward) {\n            return minReward;\n        }\n        return reward;\n    }\n\n    /**\n     * @notice Accessor to the proposal vote counts.\n     * @param _proposalId The proposal ID.\n     */\n    function proposalVoteCounts(\n        uint256 _proposalId\n    ) public view returns (uint256 _againstVotes, uint256 _forVotes, uint256 _abstainVotes) {\n        ProposalVote storage proposalVote = proposalVotes[_proposalId];\n        return (proposalVote.againstVotes, proposalVote.forVotes, proposalVote.abstainVotes);\n    }\n\n    /**\n     * @notice Accessor to the vote info of a proposal for an account.\n     * @param _proposalId The proposal ID.\n     * @param _account The voting account.\n     */\n    function proposalVoteInfo(uint256 _proposalId, address _account) public view returns (VoteInfo memory _voteInfo) {\n        ProposalVote storage proposalVote = proposalVotes[_proposalId];\n        return proposalVote.voteInfo[_account];\n    }\n\n    /**\n     * @dev Returns if the amount of votes already cast passes the threshold limit.\n     * @param _proposalId The proposal ID.\n     */\n    function _quorumReached(uint256 _proposalId) internal view returns (bool) {\n        ProposalCore storage proposal = proposals[_proposalId];\n        ProposalVote storage proposalVote = proposalVotes[_proposalId];\n\n        return\n            (proposalVote.againstVotes + proposalVote.forVotes + proposalVote.abstainVotes) >=\n            ((proposal.totalStakeAtStart * proposal.quorumThresholdBps) / 1e4);\n    }\n\n    /**\n     * @dev Returns if the vote succeeded. Checks \"for\" votes threshold.\n     * @param _proposalId The proposal ID.\n     */\n    function _voteSucceeded(uint256 _proposalId) internal view returns (bool) {\n        ProposalCore storage proposal = proposals[_proposalId];\n        ProposalVote storage proposalVote = proposalVotes[_proposalId];\n\n        return\n            proposalVote.forVotes >=\n            (((proposalVote.againstVotes + proposalVote.forVotes) * proposal.forVotesThresholdBps) / 1e4);\n    }\n\n    /**\n     * @notice Casts a vote.\n     * @param _proposalId The proposal ID.\n     * @param _support The vote enum type.\n     * @param _reason The optional reason for the vote.\n     */\n    function castVote(\n        uint256 _proposalId,\n        uint8 _support,\n        string memory _reason\n    ) external whenNotPaused returns (uint256) {\n        require(state(_proposalId) == ProposalState.Active, \"vote not active\");\n\n        uint256 weight = IStaking(staking).getStake(msg.sender);\n        _countVote(_proposalId, msg.sender, _support, weight);\n\n        emit VoteCast(msg.sender, _proposalId, _support, weight, _reason);\n\n        return weight;\n    }\n\n    /**\n     * @dev Registers a vote with a given support and voting weight.\n     * @param _proposalId The proposal ID.\n     * @param _account The voting account.\n     * @param _support The vote enum type.\n     * @param _weight The weight of the vote.\n     */\n    function _countVote(uint256 _proposalId, address _account, uint8 _support, uint256 _weight) internal {\n        ProposalVote storage proposalVote = proposalVotes[_proposalId];\n        VoteInfo storage info = proposalVote.voteInfo[_account];\n        require(info.weight == 0, \"vote already cast\");\n\n        if (_support == uint8(VoteType.Against)) {\n            proposalVote.againstVotes += _weight;\n        } else if (_support == uint8(VoteType.For)) {\n            proposalVote.forVotes += _weight;\n        } else if (_support == uint8(VoteType.Abstain)) {\n            proposalVote.abstainVotes += _weight;\n        } else {\n            revert(\"invalid value for enum VoteType\");\n        }\n        info.weight = _weight;\n        info.voteType = VoteType(_support);\n    }\n\n    /**\n     * @notice Claims KOGE reward for valid proposals.\n     * @param _proposalId The proposal ID.\n     */\n    function claimReward(uint256 _proposalId) external whenNotPaused {\n        ProposalCore storage proposal = proposals[_proposalId];\n        ProposalVote storage proposalVote = proposalVotes[_proposalId];\n        VoteInfo storage voteInfo = proposalVote.voteInfo[msg.sender];\n        (bool isProposer, bool isVoter, uint256 claimableAmount) = _getClaimableRewardInfo(\n            msg.sender,\n            _proposalId,\n            proposal,\n            proposalVote,\n            voteInfo\n        );\n        require(claimableAmount > 0, \"no claimable amount\");\n\n        // Mark claimed\n        if (isProposer) {\n            proposal.proposerRewardClaimed = true;\n        }\n        if (isVoter) {\n            voteInfo.rewardClaimed = true;\n        }\n\n        IERC20(IStaking(staking).koge()).safeTransfer(msg.sender, claimableAmount);\n        emit RewardClaimed(msg.sender, _proposalId, claimableAmount);\n    }\n\n    /**\n     * @notice Get claimable reward info for an account and a proposal.\n     * @param _account The account address.\n     * @param _proposalId The proposal ID.\n     */\n    function getClaimableRewardInfo(\n        address _account,\n        uint256 _proposalId\n    ) public view returns (bool isProposer, bool isVoter, uint256 claimableAmount) {\n        ProposalCore storage proposal = proposals[_proposalId];\n        ProposalVote storage proposalVote = proposalVotes[_proposalId];\n        VoteInfo storage voteInfo = proposalVote.voteInfo[_account];\n        return _getClaimableRewardInfo(_account, _proposalId, proposal, proposalVote, voteInfo);\n    }\n\n    /**\n     * @dev Internal getter for claimable reward info for an account and a proposal.\n     * @param _account The account address.\n     * @param _proposalId The proposal ID.\n     * @param _proposal The ProposalCore.\n     * @param _proposalVote The ProposalVote.\n     * @param _voteInfo The VoteInfo of the account.\n     */\n    function _getClaimableRewardInfo(\n        address _account,\n        uint256 _proposalId,\n        ProposalCore storage _proposal,\n        ProposalVote storage _proposalVote,\n        VoteInfo storage _voteInfo\n    ) internal view returns (bool isProposer, bool isVoter, uint256 claimableAmount) {\n        isProposer = _proposal.proposer == _account;\n        isVoter = _voteInfo.weight > 0;\n        ProposalState proposalState = state(_proposalId);\n        // Proposal invalid or not finalized\n        if (proposalState != ProposalState.Succeeded && proposalState != ProposalState.Defeated) {\n            return (isProposer, isVoter, 0);\n        }\n        // Proposer already claimed\n        if (isProposer && _proposal.proposerRewardClaimed) {\n            return (isProposer, isVoter, 0);\n        }\n        // Voter already claimed\n        if (_voteInfo.weight > 0 && _voteInfo.rewardClaimed) {\n            return (isProposer, isVoter, 0);\n        }\n\n        uint256 proposerReward = (_proposal.totalReward * _proposal.proposerRewardBps) / 1e4;\n        claimableAmount =\n            ((_proposal.totalReward - proposerReward) * _voteInfo.weight) /\n            (_proposalVote.forVotes + _proposalVote.againstVotes + _proposalVote.abstainVotes);\n        if (isProposer) {\n            claimableAmount += proposerReward;\n        }\n        return (isProposer, isVoter, claimableAmount);\n    }\n\n    /**\n     * @notice Refunds KOGE to the reward pool for a proposal that failed to reach quorum.\n     * @param _proposalId The proposal ID.\n     */\n    function refundInvalidProposal(uint256 _proposalId) external whenNotPaused {\n        ProposalCore storage proposal = proposals[_proposalId];\n        require(state(_proposalId) == ProposalState.Invalid, \"not invalid proposal\");\n\n        proposal.refunded = true;\n        rewardPool += proposal.totalReward;\n\n        emit InvalidProposalRefunded(msg.sender, _proposalId);\n    }\n\n    /**\n     * @notice Contributes KOGE to the proposal reward pool.\n     * @param _amount The amount to contribute.\n     */\n    function contributeToRewardPool(uint256 _amount) external whenNotPaused {\n        rewardPool += _amount;\n        IERC20(IStaking(staking).koge()).safeTransferFrom(msg.sender, address(this), _amount);\n        emit RewardPoolContributed(msg.sender, _amount);\n    }\n\n    // -------------------- Admin --------------------\n\n    /**\n     * @dev Sets `votingPeriod`.\n     * @param _votingPeriod The new `votingPeriod`.\n     */\n    function setVotingPeriod(uint256 _votingPeriod) external onlyOwner {\n        votingPeriod = _votingPeriod;\n        emit VotingPeriodUpdated(msg.sender, _votingPeriod);\n    }\n\n    /**\n     * @dev Sets `quorumThresholdBps`.\n     * @param _quorumThresholdBps The new `quorumThresholdBps`.\n     */\n    function setQuorumThresholdBps(uint256 _quorumThresholdBps) external onlyOwner {\n        quorumThresholdBps = _quorumThresholdBps;\n        emit QuorumThresholdBpsUpdated(msg.sender, _quorumThresholdBps);\n    }\n\n    /**\n     * @dev Sets `forVotesThresholdBps`.\n     * @param _forVotesThresholdBps The new `forVotesThresholdBps`.\n     */\n    function setForVotesThresholdBps(uint256 _forVotesThresholdBps) external onlyOwner {\n        forVotesThresholdBps = _forVotesThresholdBps;\n        emit ForVotesThresholdBpsUpdated(msg.sender, _forVotesThresholdBps);\n    }\n\n    /**\n     * @dev Sets `minDeposit`.\n     * @param _minDeposit The new `minDeposit`.\n     */\n    function setMinDeposit(uint256 _minDeposit) external onlyOwner {\n        minDeposit = _minDeposit;\n        emit MinDepositUpdated(msg.sender, _minDeposit);\n    }\n\n    /**\n     * @dev Sets `rewardBps`.\n     * @param _rewardBps The new `rewardBps`.\n     */\n    function setRewardBps(uint256 _rewardBps) external onlyOwner {\n        rewardBps = _rewardBps;\n        emit RewardBpsUpdated(msg.sender, _rewardBps);\n    }\n\n    /**\n     * @dev Sets `minReward`.\n     * @param _minReward The new `minReward`.\n     */\n    function setMinReward(uint256 _minReward) external onlyOwner {\n        minReward = _minReward;\n        emit MinRewardUpdated(msg.sender, _minReward);\n    }\n\n    /**\n     * @dev Sets `maxReward`.\n     * @param _maxReward The new `maxReward`.\n     */\n    function setMaxReward(uint256 _maxReward) external onlyOwner {\n        maxReward = _maxReward;\n        emit MaxRewardUpdated(msg.sender, _maxReward);\n    }\n\n    /**\n     * @dev Sets `proposerRewardBps`.\n     * @param _proposerRewardBps The new `proposerRewardBps`.\n     */\n    function setProposerRewardBps(uint256 _proposerRewardBps) external onlyOwner {\n        proposerRewardBps = _proposerRewardBps;\n        emit ProposerRewardBpsUpdated(msg.sender, _proposerRewardBps);\n    }\n\n    /**\n     * @notice Removes KOGE from the proposal reward pool.\n     * @param _amount The amount to remove.\n     */\n    function removeFromRewardPool(uint256 _amount) external onlyOwner {\n        rewardPool -= _amount;\n        IERC20(IStaking(staking).koge()).safeTransfer(msg.sender, _amount);\n        emit RewardPoolRemoved(msg.sender, _amount);\n    }\n\n    /**\n     * @notice Pauses the contract.\n     */\n    function pause() external onlyOwner {\n        _pause();\n    }\n\n    /**\n     * @notice Unpauses the contract.\n     */\n    function unpause() external onlyOwner {\n        _unpause();\n    }\n}\n"},"contracts/interfaces/IStaking.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\ninterface IStaking {\n    function koge() external view returns (address);\n    function totalStakes() external view returns (uint256);\n    function getStake(address _user) external view returns (uint256);\n}\n"},"@openzeppelin/contracts/utils/Context.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context {\n    function _msgSender() internal view virtual returns (address) {\n        return msg.sender;\n    }\n\n    function _msgData() internal view virtual returns (bytes calldata) {\n        return msg.data;\n    }\n\n    function _contextSuffixLength() internal view virtual returns (uint256) {\n        return 0;\n    }\n}\n"},"@openzeppelin/contracts/access/Ownable.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)\n\npragma solidity ^0.8.20;\n\nimport {Context} from \"../utils/Context.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * The initial owner is set to the address provided by the deployer. This can\n * later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract Ownable is Context {\n    address private _owner;\n\n    /**\n     * @dev The caller account is not authorized to perform an operation.\n     */\n    error OwnableUnauthorizedAccount(address account);\n\n    /**\n     * @dev The owner is not a valid owner account. (eg. `address(0)`)\n     */\n    error OwnableInvalidOwner(address owner);\n\n    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n    /**\n     * @dev Initializes the contract setting the address provided by the deployer as the initial owner.\n     */\n    constructor(address initialOwner) {\n        if (initialOwner == address(0)) {\n            revert OwnableInvalidOwner(address(0));\n        }\n        _transferOwnership(initialOwner);\n    }\n\n    /**\n     * @dev Throws if called by any account other than the owner.\n     */\n    modifier onlyOwner() {\n        _checkOwner();\n        _;\n    }\n\n    /**\n     * @dev Returns the address of the current owner.\n     */\n    function owner() public view virtual returns (address) {\n        return _owner;\n    }\n\n    /**\n     * @dev Throws if the sender is not the owner.\n     */\n    function _checkOwner() internal view virtual {\n        if (owner() != _msgSender()) {\n            revert OwnableUnauthorizedAccount(_msgSender());\n        }\n    }\n\n    /**\n     * @dev Leaves the contract without owner. It will not be possible to call\n     * `onlyOwner` functions. Can only be called by the current owner.\n     *\n     * NOTE: Renouncing ownership will leave the contract without an owner,\n     * thereby disabling any functionality that is only available to the owner.\n     */\n    function renounceOwnership() public virtual onlyOwner {\n        _transferOwnership(address(0));\n    }\n\n    /**\n     * @dev Transfers ownership of the contract to a new account (`newOwner`).\n     * Can only be called by the current owner.\n     */\n    function transferOwnership(address newOwner) public virtual onlyOwner {\n        if (newOwner == address(0)) {\n            revert OwnableInvalidOwner(address(0));\n        }\n        _transferOwnership(newOwner);\n    }\n\n    /**\n     * @dev Transfers ownership of the contract to a new account (`newOwner`).\n     * Internal function without access restriction.\n     */\n    function _transferOwnership(address newOwner) internal virtual {\n        address oldOwner = _owner;\n        _owner = newOwner;\n        emit OwnershipTransferred(oldOwner, newOwner);\n    }\n}\n"},"@openzeppelin/contracts/utils/Pausable.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Pausable.sol)\n\npragma solidity ^0.8.20;\n\nimport {Context} from \"../utils/Context.sol\";\n\n/**\n * @dev Contract module which allows children to implement an emergency stop\n * mechanism that can be triggered by an authorized account.\n *\n * This module is used through inheritance. It will make available the\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\n * the functions of your contract. Note that they will not be pausable by\n * simply including this module, only once the modifiers are put in place.\n */\nabstract contract Pausable is Context {\n    bool private _paused;\n\n    /**\n     * @dev Emitted when the pause is triggered by `account`.\n     */\n    event Paused(address account);\n\n    /**\n     * @dev Emitted when the pause is lifted by `account`.\n     */\n    event Unpaused(address account);\n\n    /**\n     * @dev The operation failed because the contract is paused.\n     */\n    error EnforcedPause();\n\n    /**\n     * @dev The operation failed because the contract is not paused.\n     */\n    error ExpectedPause();\n\n    /**\n     * @dev Initializes the contract in unpaused state.\n     */\n    constructor() {\n        _paused = false;\n    }\n\n    /**\n     * @dev Modifier to make a function callable only when the contract is not paused.\n     *\n     * Requirements:\n     *\n     * - The contract must not be paused.\n     */\n    modifier whenNotPaused() {\n        _requireNotPaused();\n        _;\n    }\n\n    /**\n     * @dev Modifier to make a function callable only when the contract is paused.\n     *\n     * Requirements:\n     *\n     * - The contract must be paused.\n     */\n    modifier whenPaused() {\n        _requirePaused();\n        _;\n    }\n\n    /**\n     * @dev Returns true if the contract is paused, and false otherwise.\n     */\n    function paused() public view virtual returns (bool) {\n        return _paused;\n    }\n\n    /**\n     * @dev Throws if the contract is paused.\n     */\n    function _requireNotPaused() internal view virtual {\n        if (paused()) {\n            revert EnforcedPause();\n        }\n    }\n\n    /**\n     * @dev Throws if the contract is not paused.\n     */\n    function _requirePaused() internal view virtual {\n        if (!paused()) {\n            revert ExpectedPause();\n        }\n    }\n\n    /**\n     * @dev Triggers stopped state.\n     *\n     * Requirements:\n     *\n     * - The contract must not be paused.\n     */\n    function _pause() internal virtual whenNotPaused {\n        _paused = true;\n        emit Paused(_msgSender());\n    }\n\n    /**\n     * @dev Returns to normal state.\n     *\n     * Requirements:\n     *\n     * - The contract must be paused.\n     */\n    function _unpause() internal virtual whenPaused {\n        _paused = false;\n        emit Unpaused(_msgSender());\n    }\n}\n"},"@openzeppelin/contracts/interfaces/IERC20.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC20.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"../token/ERC20/IERC20.sol\";\n"},"@openzeppelin/contracts/interfaces/IERC165.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC165.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC165} from \"../utils/introspection/IERC165.sol\";\n"},"@openzeppelin/contracts/token/ERC20/IERC20.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Interface of the ERC-20 standard as defined in the ERC.\n */\ninterface IERC20 {\n    /**\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\n     * another (`to`).\n     *\n     * Note that `value` may be zero.\n     */\n    event Transfer(address indexed from, address indexed to, uint256 value);\n\n    /**\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n     * a call to {approve}. `value` is the new allowance.\n     */\n    event Approval(address indexed owner, address indexed spender, uint256 value);\n\n    /**\n     * @dev Returns the value of tokens in existence.\n     */\n    function totalSupply() external view returns (uint256);\n\n    /**\n     * @dev Returns the value of tokens owned by `account`.\n     */\n    function balanceOf(address account) external view returns (uint256);\n\n    /**\n     * @dev Moves a `value` amount of tokens from the caller's account to `to`.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transfer(address to, uint256 value) external returns (bool);\n\n    /**\n     * @dev Returns the remaining number of tokens that `spender` will be\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\n     * zero by default.\n     *\n     * This value changes when {approve} or {transferFrom} are called.\n     */\n    function allowance(address owner, address spender) external view returns (uint256);\n\n    /**\n     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\n     * caller's tokens.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\n     * that someone may use both the old and the new allowance by unfortunate\n     * transaction ordering. One possible solution to mitigate this race\n     * condition is to first reduce the spender's allowance to 0 and set the\n     * desired value afterwards:\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n     *\n     * Emits an {Approval} event.\n     */\n    function approve(address spender, uint256 value) external returns (bool);\n\n    /**\n     * @dev Moves a `value` amount of tokens from `from` to `to` using the\n     * allowance mechanism. `value` is then deducted from the caller's\n     * allowance.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transferFrom(address from, address to, uint256 value) external returns (bool);\n}\n"},"@openzeppelin/contracts/interfaces/IERC1363.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (interfaces/IERC1363.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"./IERC20.sol\";\nimport {IERC165} from \"./IERC165.sol\";\n\n/**\n * @title IERC1363\n * @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363].\n *\n * Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract\n * after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction.\n */\ninterface IERC1363 is IERC20, IERC165 {\n    /*\n     * Note: the ERC-165 identifier for this interface is 0xb0202a11.\n     * 0xb0202a11 ===\n     *   bytes4(keccak256('transferAndCall(address,uint256)')) ^\n     *   bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^\n     *   bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^\n     *   bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^\n     *   bytes4(keccak256('approveAndCall(address,uint256)')) ^\n     *   bytes4(keccak256('approveAndCall(address,uint256,bytes)'))\n     */\n\n    /**\n     * @dev Moves a `value` amount of tokens from the caller's account to `to`\n     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n     * @param to The address which you want to transfer to.\n     * @param value The amount of tokens to be transferred.\n     * @return A boolean value indicating whether the operation succeeded unless throwing.\n     */\n    function transferAndCall(address to, uint256 value) external returns (bool);\n\n    /**\n     * @dev Moves a `value` amount of tokens from the caller's account to `to`\n     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n     * @param to The address which you want to transfer to.\n     * @param value The amount of tokens to be transferred.\n     * @param data Additional data with no specified format, sent in call to `to`.\n     * @return A boolean value indicating whether the operation succeeded unless throwing.\n     */\n    function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool);\n\n    /**\n     * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\n     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n     * @param from The address which you want to send tokens from.\n     * @param to The address which you want to transfer to.\n     * @param value The amount of tokens to be transferred.\n     * @return A boolean value indicating whether the operation succeeded unless throwing.\n     */\n    function transferFromAndCall(address from, address to, uint256 value) external returns (bool);\n\n    /**\n     * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\n     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n     * @param from The address which you want to send tokens from.\n     * @param to The address which you want to transfer to.\n     * @param value The amount of tokens to be transferred.\n     * @param data Additional data with no specified format, sent in call to `to`.\n     * @return A boolean value indicating whether the operation succeeded unless throwing.\n     */\n    function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool);\n\n    /**\n     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\n     * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\n     * @param spender The address which will spend the funds.\n     * @param value The amount of tokens to be spent.\n     * @return A boolean value indicating whether the operation succeeded unless throwing.\n     */\n    function approveAndCall(address spender, uint256 value) external returns (bool);\n\n    /**\n     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\n     * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\n     * @param spender The address which will spend the funds.\n     * @param value The amount of tokens to be spent.\n     * @param data Additional data with no specified format, sent in call to `spender`.\n     * @return A boolean value indicating whether the operation succeeded unless throwing.\n     */\n    function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool);\n}\n"},"@openzeppelin/contracts/utils/math/SafeCast.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/math/SafeCast.sol)\n// This file was procedurally generated from scripts/generate/templates/SafeCast.js.\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Wrappers over Solidity's uintXX/intXX/bool casting operators with added overflow\n * checks.\n *\n * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can\n * easily result in undesired exploitation or bugs, since developers usually\n * assume that overflows raise errors. `SafeCast` restores this intuition by\n * reverting the transaction when such an operation overflows.\n *\n * Using this library instead of the unchecked operations eliminates an entire\n * class of bugs, so it's recommended to use it always.\n */\nlibrary SafeCast {\n    /**\n     * @dev Value doesn't fit in an uint of `bits` size.\n     */\n    error SafeCastOverflowedUintDowncast(uint8 bits, uint256 value);\n\n    /**\n     * @dev An int value doesn't fit in an uint of `bits` size.\n     */\n    error SafeCastOverflowedIntToUint(int256 value);\n\n    /**\n     * @dev Value doesn't fit in an int of `bits` size.\n     */\n    error SafeCastOverflowedIntDowncast(uint8 bits, int256 value);\n\n    /**\n     * @dev An uint value doesn't fit in an int of `bits` size.\n     */\n    error SafeCastOverflowedUintToInt(uint256 value);\n\n    /**\n     * @dev Returns the downcasted uint248 from uint256, reverting on\n     * overflow (when the input is greater than largest uint248).\n     *\n     * Counterpart to Solidity's `uint248` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 248 bits\n     */\n    function toUint248(uint256 value) internal pure returns (uint248) {\n        if (value > type(uint248).max) {\n            revert SafeCastOverflowedUintDowncast(248, value);\n        }\n        return uint248(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint240 from uint256, reverting on\n     * overflow (when the input is greater than largest uint240).\n     *\n     * Counterpart to Solidity's `uint240` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 240 bits\n     */\n    function toUint240(uint256 value) internal pure returns (uint240) {\n        if (value > type(uint240).max) {\n            revert SafeCastOverflowedUintDowncast(240, value);\n        }\n        return uint240(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint232 from uint256, reverting on\n     * overflow (when the input is greater than largest uint232).\n     *\n     * Counterpart to Solidity's `uint232` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 232 bits\n     */\n    function toUint232(uint256 value) internal pure returns (uint232) {\n        if (value > type(uint232).max) {\n            revert SafeCastOverflowedUintDowncast(232, value);\n        }\n        return uint232(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint224 from uint256, reverting on\n     * overflow (when the input is greater than largest uint224).\n     *\n     * Counterpart to Solidity's `uint224` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 224 bits\n     */\n    function toUint224(uint256 value) internal pure returns (uint224) {\n        if (value > type(uint224).max) {\n            revert SafeCastOverflowedUintDowncast(224, value);\n        }\n        return uint224(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint216 from uint256, reverting on\n     * overflow (when the input is greater than largest uint216).\n     *\n     * Counterpart to Solidity's `uint216` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 216 bits\n     */\n    function toUint216(uint256 value) internal pure returns (uint216) {\n        if (value > type(uint216).max) {\n            revert SafeCastOverflowedUintDowncast(216, value);\n        }\n        return uint216(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint208 from uint256, reverting on\n     * overflow (when the input is greater than largest uint208).\n     *\n     * Counterpart to Solidity's `uint208` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 208 bits\n     */\n    function toUint208(uint256 value) internal pure returns (uint208) {\n        if (value > type(uint208).max) {\n            revert SafeCastOverflowedUintDowncast(208, value);\n        }\n        return uint208(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint200 from uint256, reverting on\n     * overflow (when the input is greater than largest uint200).\n     *\n     * Counterpart to Solidity's `uint200` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 200 bits\n     */\n    function toUint200(uint256 value) internal pure returns (uint200) {\n        if (value > type(uint200).max) {\n            revert SafeCastOverflowedUintDowncast(200, value);\n        }\n        return uint200(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint192 from uint256, reverting on\n     * overflow (when the input is greater than largest uint192).\n     *\n     * Counterpart to Solidity's `uint192` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 192 bits\n     */\n    function toUint192(uint256 value) internal pure returns (uint192) {\n        if (value > type(uint192).max) {\n            revert SafeCastOverflowedUintDowncast(192, value);\n        }\n        return uint192(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint184 from uint256, reverting on\n     * overflow (when the input is greater than largest uint184).\n     *\n     * Counterpart to Solidity's `uint184` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 184 bits\n     */\n    function toUint184(uint256 value) internal pure returns (uint184) {\n        if (value > type(uint184).max) {\n            revert SafeCastOverflowedUintDowncast(184, value);\n        }\n        return uint184(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint176 from uint256, reverting on\n     * overflow (when the input is greater than largest uint176).\n     *\n     * Counterpart to Solidity's `uint176` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 176 bits\n     */\n    function toUint176(uint256 value) internal pure returns (uint176) {\n        if (value > type(uint176).max) {\n            revert SafeCastOverflowedUintDowncast(176, value);\n        }\n        return uint176(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint168 from uint256, reverting on\n     * overflow (when the input is greater than largest uint168).\n     *\n     * Counterpart to Solidity's `uint168` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 168 bits\n     */\n    function toUint168(uint256 value) internal pure returns (uint168) {\n        if (value > type(uint168).max) {\n            revert SafeCastOverflowedUintDowncast(168, value);\n        }\n        return uint168(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint160 from uint256, reverting on\n     * overflow (when the input is greater than largest uint160).\n     *\n     * Counterpart to Solidity's `uint160` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 160 bits\n     */\n    function toUint160(uint256 value) internal pure returns (uint160) {\n        if (value > type(uint160).max) {\n            revert SafeCastOverflowedUintDowncast(160, value);\n        }\n        return uint160(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint152 from uint256, reverting on\n     * overflow (when the input is greater than largest uint152).\n     *\n     * Counterpart to Solidity's `uint152` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 152 bits\n     */\n    function toUint152(uint256 value) internal pure returns (uint152) {\n        if (value > type(uint152).max) {\n            revert SafeCastOverflowedUintDowncast(152, value);\n        }\n        return uint152(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint144 from uint256, reverting on\n     * overflow (when the input is greater than largest uint144).\n     *\n     * Counterpart to Solidity's `uint144` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 144 bits\n     */\n    function toUint144(uint256 value) internal pure returns (uint144) {\n        if (value > type(uint144).max) {\n            revert SafeCastOverflowedUintDowncast(144, value);\n        }\n        return uint144(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint136 from uint256, reverting on\n     * overflow (when the input is greater than largest uint136).\n     *\n     * Counterpart to Solidity's `uint136` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 136 bits\n     */\n    function toUint136(uint256 value) internal pure returns (uint136) {\n        if (value > type(uint136).max) {\n            revert SafeCastOverflowedUintDowncast(136, value);\n        }\n        return uint136(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint128 from uint256, reverting on\n     * overflow (when the input is greater than largest uint128).\n     *\n     * Counterpart to Solidity's `uint128` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 128 bits\n     */\n    function toUint128(uint256 value) internal pure returns (uint128) {\n        if (value > type(uint128).max) {\n            revert SafeCastOverflowedUintDowncast(128, value);\n        }\n        return uint128(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint120 from uint256, reverting on\n     * overflow (when the input is greater than largest uint120).\n     *\n     * Counterpart to Solidity's `uint120` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 120 bits\n     */\n    function toUint120(uint256 value) internal pure returns (uint120) {\n        if (value > type(uint120).max) {\n            revert SafeCastOverflowedUintDowncast(120, value);\n        }\n        return uint120(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint112 from uint256, reverting on\n     * overflow (when the input is greater than largest uint112).\n     *\n     * Counterpart to Solidity's `uint112` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 112 bits\n     */\n    function toUint112(uint256 value) internal pure returns (uint112) {\n        if (value > type(uint112).max) {\n            revert SafeCastOverflowedUintDowncast(112, value);\n        }\n        return uint112(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint104 from uint256, reverting on\n     * overflow (when the input is greater than largest uint104).\n     *\n     * Counterpart to Solidity's `uint104` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 104 bits\n     */\n    function toUint104(uint256 value) internal pure returns (uint104) {\n        if (value > type(uint104).max) {\n            revert SafeCastOverflowedUintDowncast(104, value);\n        }\n        return uint104(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint96 from uint256, reverting on\n     * overflow (when the input is greater than largest uint96).\n     *\n     * Counterpart to Solidity's `uint96` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 96 bits\n     */\n    function toUint96(uint256 value) internal pure returns (uint96) {\n        if (value > type(uint96).max) {\n            revert SafeCastOverflowedUintDowncast(96, value);\n        }\n        return uint96(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint88 from uint256, reverting on\n     * overflow (when the input is greater than largest uint88).\n     *\n     * Counterpart to Solidity's `uint88` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 88 bits\n     */\n    function toUint88(uint256 value) internal pure returns (uint88) {\n        if (value > type(uint88).max) {\n            revert SafeCastOverflowedUintDowncast(88, value);\n        }\n        return uint88(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint80 from uint256, reverting on\n     * overflow (when the input is greater than largest uint80).\n     *\n     * Counterpart to Solidity's `uint80` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 80 bits\n     */\n    function toUint80(uint256 value) internal pure returns (uint80) {\n        if (value > type(uint80).max) {\n            revert SafeCastOverflowedUintDowncast(80, value);\n        }\n        return uint80(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint72 from uint256, reverting on\n     * overflow (when the input is greater than largest uint72).\n     *\n     * Counterpart to Solidity's `uint72` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 72 bits\n     */\n    function toUint72(uint256 value) internal pure returns (uint72) {\n        if (value > type(uint72).max) {\n            revert SafeCastOverflowedUintDowncast(72, value);\n        }\n        return uint72(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint64 from uint256, reverting on\n     * overflow (when the input is greater than largest uint64).\n     *\n     * Counterpart to Solidity's `uint64` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 64 bits\n     */\n    function toUint64(uint256 value) internal pure returns (uint64) {\n        if (value > type(uint64).max) {\n            revert SafeCastOverflowedUintDowncast(64, value);\n        }\n        return uint64(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint56 from uint256, reverting on\n     * overflow (when the input is greater than largest uint56).\n     *\n     * Counterpart to Solidity's `uint56` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 56 bits\n     */\n    function toUint56(uint256 value) internal pure returns (uint56) {\n        if (value > type(uint56).max) {\n            revert SafeCastOverflowedUintDowncast(56, value);\n        }\n        return uint56(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint48 from uint256, reverting on\n     * overflow (when the input is greater than largest uint48).\n     *\n     * Counterpart to Solidity's `uint48` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 48 bits\n     */\n    function toUint48(uint256 value) internal pure returns (uint48) {\n        if (value > type(uint48).max) {\n            revert SafeCastOverflowedUintDowncast(48, value);\n        }\n        return uint48(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint40 from uint256, reverting on\n     * overflow (when the input is greater than largest uint40).\n     *\n     * Counterpart to Solidity's `uint40` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 40 bits\n     */\n    function toUint40(uint256 value) internal pure returns (uint40) {\n        if (value > type(uint40).max) {\n            revert SafeCastOverflowedUintDowncast(40, value);\n        }\n        return uint40(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint32 from uint256, reverting on\n     * overflow (when the input is greater than largest uint32).\n     *\n     * Counterpart to Solidity's `uint32` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 32 bits\n     */\n    function toUint32(uint256 value) internal pure returns (uint32) {\n        if (value > type(uint32).max) {\n            revert SafeCastOverflowedUintDowncast(32, value);\n        }\n        return uint32(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint24 from uint256, reverting on\n     * overflow (when the input is greater than largest uint24).\n     *\n     * Counterpart to Solidity's `uint24` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 24 bits\n     */\n    function toUint24(uint256 value) internal pure returns (uint24) {\n        if (value > type(uint24).max) {\n            revert SafeCastOverflowedUintDowncast(24, value);\n        }\n        return uint24(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint16 from uint256, reverting on\n     * overflow (when the input is greater than largest uint16).\n     *\n     * Counterpart to Solidity's `uint16` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 16 bits\n     */\n    function toUint16(uint256 value) internal pure returns (uint16) {\n        if (value > type(uint16).max) {\n            revert SafeCastOverflowedUintDowncast(16, value);\n        }\n        return uint16(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint8 from uint256, reverting on\n     * overflow (when the input is greater than largest uint8).\n     *\n     * Counterpart to Solidity's `uint8` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 8 bits\n     */\n    function toUint8(uint256 value) internal pure returns (uint8) {\n        if (value > type(uint8).max) {\n            revert SafeCastOverflowedUintDowncast(8, value);\n        }\n        return uint8(value);\n    }\n\n    /**\n     * @dev Converts a signed int256 into an unsigned uint256.\n     *\n     * Requirements:\n     *\n     * - input must be greater than or equal to 0.\n     */\n    function toUint256(int256 value) internal pure returns (uint256) {\n        if (value < 0) {\n            revert SafeCastOverflowedIntToUint(value);\n        }\n        return uint256(value);\n    }\n\n    /**\n     * @dev Returns the downcasted int248 from int256, reverting on\n     * overflow (when the input is less than smallest int248 or\n     * greater than largest int248).\n     *\n     * Counterpart to Solidity's `int248` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 248 bits\n     */\n    function toInt248(int256 value) internal pure returns (int248 downcasted) {\n        downcasted = int248(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(248, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int240 from int256, reverting on\n     * overflow (when the input is less than smallest int240 or\n     * greater than largest int240).\n     *\n     * Counterpart to Solidity's `int240` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 240 bits\n     */\n    function toInt240(int256 value) internal pure returns (int240 downcasted) {\n        downcasted = int240(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(240, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int232 from int256, reverting on\n     * overflow (when the input is less than smallest int232 or\n     * greater than largest int232).\n     *\n     * Counterpart to Solidity's `int232` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 232 bits\n     */\n    function toInt232(int256 value) internal pure returns (int232 downcasted) {\n        downcasted = int232(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(232, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int224 from int256, reverting on\n     * overflow (when the input is less than smallest int224 or\n     * greater than largest int224).\n     *\n     * Counterpart to Solidity's `int224` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 224 bits\n     */\n    function toInt224(int256 value) internal pure returns (int224 downcasted) {\n        downcasted = int224(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(224, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int216 from int256, reverting on\n     * overflow (when the input is less than smallest int216 or\n     * greater than largest int216).\n     *\n     * Counterpart to Solidity's `int216` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 216 bits\n     */\n    function toInt216(int256 value) internal pure returns (int216 downcasted) {\n        downcasted = int216(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(216, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int208 from int256, reverting on\n     * overflow (when the input is less than smallest int208 or\n     * greater than largest int208).\n     *\n     * Counterpart to Solidity's `int208` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 208 bits\n     */\n    function toInt208(int256 value) internal pure returns (int208 downcasted) {\n        downcasted = int208(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(208, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int200 from int256, reverting on\n     * overflow (when the input is less than smallest int200 or\n     * greater than largest int200).\n     *\n     * Counterpart to Solidity's `int200` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 200 bits\n     */\n    function toInt200(int256 value) internal pure returns (int200 downcasted) {\n        downcasted = int200(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(200, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int192 from int256, reverting on\n     * overflow (when the input is less than smallest int192 or\n     * greater than largest int192).\n     *\n     * Counterpart to Solidity's `int192` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 192 bits\n     */\n    function toInt192(int256 value) internal pure returns (int192 downcasted) {\n        downcasted = int192(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(192, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int184 from int256, reverting on\n     * overflow (when the input is less than smallest int184 or\n     * greater than largest int184).\n     *\n     * Counterpart to Solidity's `int184` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 184 bits\n     */\n    function toInt184(int256 value) internal pure returns (int184 downcasted) {\n        downcasted = int184(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(184, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int176 from int256, reverting on\n     * overflow (when the input is less than smallest int176 or\n     * greater than largest int176).\n     *\n     * Counterpart to Solidity's `int176` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 176 bits\n     */\n    function toInt176(int256 value) internal pure returns (int176 downcasted) {\n        downcasted = int176(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(176, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int168 from int256, reverting on\n     * overflow (when the input is less than smallest int168 or\n     * greater than largest int168).\n     *\n     * Counterpart to Solidity's `int168` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 168 bits\n     */\n    function toInt168(int256 value) internal pure returns (int168 downcasted) {\n        downcasted = int168(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(168, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int160 from int256, reverting on\n     * overflow (when the input is less than smallest int160 or\n     * greater than largest int160).\n     *\n     * Counterpart to Solidity's `int160` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 160 bits\n     */\n    function toInt160(int256 value) internal pure returns (int160 downcasted) {\n        downcasted = int160(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(160, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int152 from int256, reverting on\n     * overflow (when the input is less than smallest int152 or\n     * greater than largest int152).\n     *\n     * Counterpart to Solidity's `int152` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 152 bits\n     */\n    function toInt152(int256 value) internal pure returns (int152 downcasted) {\n        downcasted = int152(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(152, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int144 from int256, reverting on\n     * overflow (when the input is less than smallest int144 or\n     * greater than largest int144).\n     *\n     * Counterpart to Solidity's `int144` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 144 bits\n     */\n    function toInt144(int256 value) internal pure returns (int144 downcasted) {\n        downcasted = int144(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(144, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int136 from int256, reverting on\n     * overflow (when the input is less than smallest int136 or\n     * greater than largest int136).\n     *\n     * Counterpart to Solidity's `int136` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 136 bits\n     */\n    function toInt136(int256 value) internal pure returns (int136 downcasted) {\n        downcasted = int136(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(136, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int128 from int256, reverting on\n     * overflow (when the input is less than smallest int128 or\n     * greater than largest int128).\n     *\n     * Counterpart to Solidity's `int128` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 128 bits\n     */\n    function toInt128(int256 value) internal pure returns (int128 downcasted) {\n        downcasted = int128(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(128, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int120 from int256, reverting on\n     * overflow (when the input is less than smallest int120 or\n     * greater than largest int120).\n     *\n     * Counterpart to Solidity's `int120` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 120 bits\n     */\n    function toInt120(int256 value) internal pure returns (int120 downcasted) {\n        downcasted = int120(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(120, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int112 from int256, reverting on\n     * overflow (when the input is less than smallest int112 or\n     * greater than largest int112).\n     *\n     * Counterpart to Solidity's `int112` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 112 bits\n     */\n    function toInt112(int256 value) internal pure returns (int112 downcasted) {\n        downcasted = int112(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(112, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int104 from int256, reverting on\n     * overflow (when the input is less than smallest int104 or\n     * greater than largest int104).\n     *\n     * Counterpart to Solidity's `int104` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 104 bits\n     */\n    function toInt104(int256 value) internal pure returns (int104 downcasted) {\n        downcasted = int104(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(104, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int96 from int256, reverting on\n     * overflow (when the input is less than smallest int96 or\n     * greater than largest int96).\n     *\n     * Counterpart to Solidity's `int96` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 96 bits\n     */\n    function toInt96(int256 value) internal pure returns (int96 downcasted) {\n        downcasted = int96(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(96, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int88 from int256, reverting on\n     * overflow (when the input is less than smallest int88 or\n     * greater than largest int88).\n     *\n     * Counterpart to Solidity's `int88` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 88 bits\n     */\n    function toInt88(int256 value) internal pure returns (int88 downcasted) {\n        downcasted = int88(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(88, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int80 from int256, reverting on\n     * overflow (when the input is less than smallest int80 or\n     * greater than largest int80).\n     *\n     * Counterpart to Solidity's `int80` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 80 bits\n     */\n    function toInt80(int256 value) internal pure returns (int80 downcasted) {\n        downcasted = int80(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(80, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int72 from int256, reverting on\n     * overflow (when the input is less than smallest int72 or\n     * greater than largest int72).\n     *\n     * Counterpart to Solidity's `int72` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 72 bits\n     */\n    function toInt72(int256 value) internal pure returns (int72 downcasted) {\n        downcasted = int72(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(72, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int64 from int256, reverting on\n     * overflow (when the input is less than smallest int64 or\n     * greater than largest int64).\n     *\n     * Counterpart to Solidity's `int64` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 64 bits\n     */\n    function toInt64(int256 value) internal pure returns (int64 downcasted) {\n        downcasted = int64(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(64, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int56 from int256, reverting on\n     * overflow (when the input is less than smallest int56 or\n     * greater than largest int56).\n     *\n     * Counterpart to Solidity's `int56` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 56 bits\n     */\n    function toInt56(int256 value) internal pure returns (int56 downcasted) {\n        downcasted = int56(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(56, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int48 from int256, reverting on\n     * overflow (when the input is less than smallest int48 or\n     * greater than largest int48).\n     *\n     * Counterpart to Solidity's `int48` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 48 bits\n     */\n    function toInt48(int256 value) internal pure returns (int48 downcasted) {\n        downcasted = int48(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(48, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int40 from int256, reverting on\n     * overflow (when the input is less than smallest int40 or\n     * greater than largest int40).\n     *\n     * Counterpart to Solidity's `int40` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 40 bits\n     */\n    function toInt40(int256 value) internal pure returns (int40 downcasted) {\n        downcasted = int40(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(40, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int32 from int256, reverting on\n     * overflow (when the input is less than smallest int32 or\n     * greater than largest int32).\n     *\n     * Counterpart to Solidity's `int32` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 32 bits\n     */\n    function toInt32(int256 value) internal pure returns (int32 downcasted) {\n        downcasted = int32(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(32, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int24 from int256, reverting on\n     * overflow (when the input is less than smallest int24 or\n     * greater than largest int24).\n     *\n     * Counterpart to Solidity's `int24` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 24 bits\n     */\n    function toInt24(int256 value) internal pure returns (int24 downcasted) {\n        downcasted = int24(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(24, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int16 from int256, reverting on\n     * overflow (when the input is less than smallest int16 or\n     * greater than largest int16).\n     *\n     * Counterpart to Solidity's `int16` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 16 bits\n     */\n    function toInt16(int256 value) internal pure returns (int16 downcasted) {\n        downcasted = int16(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(16, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int8 from int256, reverting on\n     * overflow (when the input is less than smallest int8 or\n     * greater than largest int8).\n     *\n     * Counterpart to Solidity's `int8` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 8 bits\n     */\n    function toInt8(int256 value) internal pure returns (int8 downcasted) {\n        downcasted = int8(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(8, value);\n        }\n    }\n\n    /**\n     * @dev Converts an unsigned uint256 into a signed int256.\n     *\n     * Requirements:\n     *\n     * - input must be less than or equal to maxInt256.\n     */\n    function toInt256(uint256 value) internal pure returns (int256) {\n        // Note: Unsafe cast below is okay because `type(int256).max` is guaranteed to be positive\n        if (value > uint256(type(int256).max)) {\n            revert SafeCastOverflowedUintToInt(value);\n        }\n        return int256(value);\n    }\n\n    /**\n     * @dev Cast a boolean (false or true) to a uint256 (0 or 1) with no jump.\n     */\n    function toUint(bool b) internal pure returns (uint256 u) {\n        assembly (\"memory-safe\") {\n            u := iszero(iszero(b))\n        }\n    }\n}\n"},"@openzeppelin/contracts/token/ERC721/IERC721.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC721/IERC721.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC165} from \"../../utils/introspection/IERC165.sol\";\n\n/**\n * @dev Required interface of an ERC-721 compliant contract.\n */\ninterface IERC721 is IERC165 {\n    /**\n     * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\n     */\n    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\n\n    /**\n     * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\n     */\n    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\n\n    /**\n     * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\n     */\n    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\n\n    /**\n     * @dev Returns the number of tokens in ``owner``'s account.\n     */\n    function balanceOf(address owner) external view returns (uint256 balance);\n\n    /**\n     * @dev Returns the owner of the `tokenId` token.\n     *\n     * Requirements:\n     *\n     * - `tokenId` must exist.\n     */\n    function ownerOf(uint256 tokenId) external view returns (address owner);\n\n    /**\n     * @dev Safely transfers `tokenId` token from `from` to `to`.\n     *\n     * Requirements:\n     *\n     * - `from` cannot be the zero address.\n     * - `to` cannot be the zero address.\n     * - `tokenId` token must exist and be owned by `from`.\n     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\n     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon\n     *   a safe transfer.\n     *\n     * Emits a {Transfer} event.\n     */\n    function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external;\n\n    /**\n     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\n     * are aware of the ERC-721 protocol to prevent tokens from being forever locked.\n     *\n     * Requirements:\n     *\n     * - `from` cannot be the zero address.\n     * - `to` cannot be the zero address.\n     * - `tokenId` token must exist and be owned by `from`.\n     * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or\n     *   {setApprovalForAll}.\n     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon\n     *   a safe transfer.\n     *\n     * Emits a {Transfer} event.\n     */\n    function safeTransferFrom(address from, address to, uint256 tokenId) external;\n\n    /**\n     * @dev Transfers `tokenId` token from `from` to `to`.\n     *\n     * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC-721\n     * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must\n     * understand this adds an external call which potentially creates a reentrancy vulnerability.\n     *\n     * Requirements:\n     *\n     * - `from` cannot be the zero address.\n     * - `to` cannot be the zero address.\n     * - `tokenId` token must be owned by `from`.\n     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transferFrom(address from, address to, uint256 tokenId) external;\n\n    /**\n     * @dev Gives permission to `to` to transfer `tokenId` token to another account.\n     * The approval is cleared when the token is transferred.\n     *\n     * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\n     *\n     * Requirements:\n     *\n     * - The caller must own the token or be an approved operator.\n     * - `tokenId` must exist.\n     *\n     * Emits an {Approval} event.\n     */\n    function approve(address to, uint256 tokenId) external;\n\n    /**\n     * @dev Approve or remove `operator` as an operator for the caller.\n     * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\n     *\n     * Requirements:\n     *\n     * - The `operator` cannot be the address zero.\n     *\n     * Emits an {ApprovalForAll} event.\n     */\n    function setApprovalForAll(address operator, bool approved) external;\n\n    /**\n     * @dev Returns the account approved for `tokenId` token.\n     *\n     * Requirements:\n     *\n     * - `tokenId` must exist.\n     */\n    function getApproved(uint256 tokenId) external view returns (address operator);\n\n    /**\n     * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\n     *\n     * See {setApprovalForAll}\n     */\n    function isApprovedForAll(address owner, address operator) external view returns (bool);\n}\n"},"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.2.0) (token/ERC20/utils/SafeERC20.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"../IERC20.sol\";\nimport {IERC1363} from \"../../../interfaces/IERC1363.sol\";\n\n/**\n * @title SafeERC20\n * @dev Wrappers around ERC-20 operations that throw on failure (when the token\n * contract returns false). Tokens that return no value (and instead revert or\n * throw on failure) are also supported, non-reverting calls are assumed to be\n * successful.\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\n */\nlibrary SafeERC20 {\n    /**\n     * @dev An operation with an ERC-20 token failed.\n     */\n    error SafeERC20FailedOperation(address token);\n\n    /**\n     * @dev Indicates a failed `decreaseAllowance` request.\n     */\n    error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease);\n\n    /**\n     * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,\n     * non-reverting calls are assumed to be successful.\n     */\n    function safeTransfer(IERC20 token, address to, uint256 value) internal {\n        _callOptionalReturn(token, abi.encodeCall(token.transfer, (to, value)));\n    }\n\n    /**\n     * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the\n     * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.\n     */\n    function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\n        _callOptionalReturn(token, abi.encodeCall(token.transferFrom, (from, to, value)));\n    }\n\n    /**\n     * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\n     * non-reverting calls are assumed to be successful.\n     *\n     * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \"client\"\n     * smart contract uses ERC-7674 to set temporary allowances, then the \"client\" smart contract should avoid using\n     * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\n     * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\n     */\n    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n        uint256 oldAllowance = token.allowance(address(this), spender);\n        forceApprove(token, spender, oldAllowance + value);\n    }\n\n    /**\n     * @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no\n     * value, non-reverting calls are assumed to be successful.\n     *\n     * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \"client\"\n     * smart contract uses ERC-7674 to set temporary allowances, then the \"client\" smart contract should avoid using\n     * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\n     * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\n     */\n    function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal {\n        unchecked {\n            uint256 currentAllowance = token.allowance(address(this), spender);\n            if (currentAllowance < requestedDecrease) {\n                revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease);\n            }\n            forceApprove(token, spender, currentAllowance - requestedDecrease);\n        }\n    }\n\n    /**\n     * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,\n     * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval\n     * to be set to zero before setting it to a non-zero value, such as USDT.\n     *\n     * NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function\n     * only sets the \"standard\" allowance. Any temporary allowance will remain active, in addition to the value being\n     * set here.\n     */\n    function forceApprove(IERC20 token, address spender, uint256 value) internal {\n        bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value));\n\n        if (!_callOptionalReturnBool(token, approvalCall)) {\n            _callOptionalReturn(token, abi.encodeCall(token.approve, (spender, 0)));\n            _callOptionalReturn(token, approvalCall);\n        }\n    }\n\n    /**\n     * @dev Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no\n     * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\n     * targeting contracts.\n     *\n     * Reverts if the returned value is other than `true`.\n     */\n    function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\n        if (to.code.length == 0) {\n            safeTransfer(token, to, value);\n        } else if (!token.transferAndCall(to, value, data)) {\n            revert SafeERC20FailedOperation(address(token));\n        }\n    }\n\n    /**\n     * @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target\n     * has no code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\n     * targeting contracts.\n     *\n     * Reverts if the returned value is other than `true`.\n     */\n    function transferFromAndCallRelaxed(\n        IERC1363 token,\n        address from,\n        address to,\n        uint256 value,\n        bytes memory data\n    ) internal {\n        if (to.code.length == 0) {\n            safeTransferFrom(token, from, to, value);\n        } else if (!token.transferFromAndCall(from, to, value, data)) {\n            revert SafeERC20FailedOperation(address(token));\n        }\n    }\n\n    /**\n     * @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no\n     * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\n     * targeting contracts.\n     *\n     * NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}.\n     * Opposedly, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall}\n     * once without retrying, and relies on the returned value to be true.\n     *\n     * Reverts if the returned value is other than `true`.\n     */\n    function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\n        if (to.code.length == 0) {\n            forceApprove(token, to, value);\n        } else if (!token.approveAndCall(to, value, data)) {\n            revert SafeERC20FailedOperation(address(token));\n        }\n    }\n\n    /**\n     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n     * on the return value: the return value is optional (but if data is returned, it must not be false).\n     * @param token The token targeted by the call.\n     * @param data The call data (encoded using abi.encode or one of its variants).\n     *\n     * This is a variant of {_callOptionalReturnBool} that reverts if call fails to meet the requirements.\n     */\n    function _callOptionalReturn(IERC20 token, bytes memory data) private {\n        uint256 returnSize;\n        uint256 returnValue;\n        assembly (\"memory-safe\") {\n            let success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\n            // bubble errors\n            if iszero(success) {\n                let ptr := mload(0x40)\n                returndatacopy(ptr, 0, returndatasize())\n                revert(ptr, returndatasize())\n            }\n            returnSize := returndatasize()\n            returnValue := mload(0)\n        }\n\n        if (returnSize == 0 ? address(token).code.length == 0 : returnValue != 1) {\n            revert SafeERC20FailedOperation(address(token));\n        }\n    }\n\n    /**\n     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n     * on the return value: the return value is optional (but if data is returned, it must not be false).\n     * @param token The token targeted by the call.\n     * @param data The call data (encoded using abi.encode or one of its variants).\n     *\n     * This is a variant of {_callOptionalReturn} that silently catches all reverts and returns a bool instead.\n     */\n    function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\n        bool success;\n        uint256 returnSize;\n        uint256 returnValue;\n        assembly (\"memory-safe\") {\n            success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\n            returnSize := returndatasize()\n            returnValue := mload(0)\n        }\n        return success && (returnSize == 0 ? address(token).code.length > 0 : returnValue == 1);\n    }\n}\n"},"@openzeppelin/contracts/utils/introspection/IERC165.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/introspection/IERC165.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Interface of the ERC-165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[ERC].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165 {\n    /**\n     * @dev Returns true if this contract implements the interface defined by\n     * `interfaceId`. See the corresponding\n     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[ERC section]\n     * to learn more about how these ids are created.\n     *\n     * This function call must use less than 30 000 gas.\n     */\n    function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n"}},"language":"Solidity","settings":{"viaIR":true,"metadata":{"useLiteralContent":true},"optimizer":{"runs":800,"enabled":true},"evmVersion":"paris"}},"stdJsonOutput":{"sources":{"contracts/Governance.sol":{"id":11},"contracts/interfaces/IStaking.sol":{"id":12},"@openzeppelin/contracts/utils/Context.sol":{"id":7},"@openzeppelin/contracts/access/Ownable.sol":{"id":0},"@openzeppelin/contracts/utils/Pausable.sol":{"id":8},"@openzeppelin/contracts/interfaces/IERC20.sol":{"id":3},"@openzeppelin/contracts/interfaces/IERC165.sol":{"id":2},"@openzeppelin/contracts/token/ERC20/IERC20.sol":{"id":4},"@openzeppelin/contracts/interfaces/IERC1363.sol":{"id":1},"@openzeppelin/contracts/utils/math/SafeCast.sol":{"id":10},"@openzeppelin/contracts/token/ERC721/IERC721.sol":{"id":6},"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol":{"id":5},"@openzeppelin/contracts/utils/introspection/IERC165.sol":{"id":9}},"contracts":{"contracts/Governance.sol":{"Governance":{"abi":[{"type":"constructor","inputs":[{"name":"_staking","type":"address","internalType":"address"},{"name":"_bnb48er","type":"address","internalType":"address"},{"name":"_votingPeriod","type":"uint256","internalType":"uint256"},{"name":"_quorumThresholdBps","type":"uint256","internalType":"uint256"},{"name":"_forVotesThresholdBps","type":"uint256","internalType":"uint256"},{"name":"_minDeposit","type":"uint256","internalType":"uint256"},{"name":"_rewardBps","type":"uint256","internalType":"uint256"},{"name":"_minReward","type":"uint256","internalType":"uint256"},{"name":"_maxReward","type":"uint256","internalType":"uint256"},{"name":"_proposerRewardBps","type":"uint256","internalType":"uint256"},{"name":"_lastProposalId","type":"uint256","internalType":"uint256"}],"stateMutability":"nonpayable"},{"name":"EnforcedPause","type":"error","inputs":[]},{"name":"ExpectedPause","type":"error","inputs":[]},{"name":"OwnableInvalidOwner","type":"error","inputs":[{"name":"owner","type":"address","internalType":"address"}]},{"name":"OwnableUnauthorizedAccount","type":"error","inputs":[{"name":"account","type":"address","internalType":"address"}]},{"name":"SafeCastOverflowedUintDowncast","type":"error","inputs":[{"name":"bits","type":"uint8","internalType":"uint8"},{"name":"value","type":"uint256","internalType":"uint256"}]},{"name":"SafeERC20FailedOperation","type":"error","inputs":[{"name":"token","type":"address","internalType":"address"}]},{"name":"ForVotesThresholdBpsUpdated","type":"event","inputs":[{"name":"caller","type":"address","indexed":true,"internalType":"address"},{"name":"value","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"name":"InvalidProposalRefunded","type":"event","inputs":[{"name":"caller","type":"address","indexed":true,"internalType":"address"},{"name":"proposalId","type":"uint256","indexed":true,"internalType":"uint256"}],"anonymous":false},{"name":"MaxRewardUpdated","type":"event","inputs":[{"name":"caller","type":"address","indexed":true,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"name":"MinDepositUpdated","type":"event","inputs":[{"name":"caller","type":"address","indexed":true,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"name":"MinRewardUpdated","type":"event","inputs":[{"name":"caller","type":"address","indexed":true,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"name":"OwnershipTransferred","type":"event","inputs":[{"name":"previousOwner","type":"address","indexed":true,"internalType":"address"},{"name":"newOwner","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"name":"Paused","type":"event","inputs":[{"name":"account","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"name":"ProposalCreated","type":"event","inputs":[{"name":"proposalId","type":"uint256","indexed":true,"internalType":"uint256"},{"name":"proposer","type":"address","indexed":true,"internalType":"address"},{"name":"voteStart","type":"uint64","indexed":false,"internalType":"uint64"},{"name":"voteEnd","type":"uint64","indexed":false,"internalType":"uint64"},{"name":"title","type":"string","indexed":false,"internalType":"string"},{"name":"description","type":"string","indexed":false,"internalType":"string"}],"anonymous":false},{"name":"ProposerRewardBpsUpdated","type":"event","inputs":[{"name":"caller","type":"address","indexed":true,"internalType":"address"},{"name":"value","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"name":"QuorumThresholdBpsUpdated","type":"event","inputs":[{"name":"caller","type":"address","indexed":true,"internalType":"address"},{"name":"value","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"name":"RewardBpsUpdated","type":"event","inputs":[{"name":"caller","type":"address","indexed":true,"internalType":"address"},{"name":"value","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"name":"RewardClaimed","type":"event","inputs":[{"name":"caller","type":"address","indexed":true,"internalType":"address"},{"name":"proposalId","type":"uint256","indexed":true,"internalType":"uint256"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"name":"RewardPoolContributed","type":"event","inputs":[{"name":"caller","type":"address","indexed":true,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"name":"RewardPoolRemoved","type":"event","inputs":[{"name":"caller","type":"address","indexed":true,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"name":"Unpaused","type":"event","inputs":[{"name":"account","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"name":"VoteCast","type":"event","inputs":[{"name":"voter","type":"address","indexed":true,"internalType":"address"},{"name":"proposalId","type":"uint256","indexed":true,"internalType":"uint256"},{"name":"support","type":"uint8","indexed":false,"internalType":"uint8"},{"name":"weight","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"reason","type":"string","indexed":false,"internalType":"string"}],"anonymous":false},{"name":"VotingPeriodUpdated","type":"event","inputs":[{"name":"caller","type":"address","indexed":true,"internalType":"address"},{"name":"value","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"name":"bnb48er","type":"function","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"name":"bnb48ersInUse","type":"function","inputs":[{"name":"","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"calcRewardFromPool","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"castVote","type":"function","inputs":[{"name":"_proposalId","type":"uint256","internalType":"uint256"},{"name":"_support","type":"uint8","internalType":"uint8"},{"name":"_reason","type":"string","internalType":"string"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"nonpayable"},{"name":"claimReward","type":"function","inputs":[{"name":"_proposalId","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"contributeToRewardPool","type":"function","inputs":[{"name":"_amount","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"forVotesThresholdBps","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"getClaimableRewardInfo","type":"function","inputs":[{"name":"_account","type":"address","internalType":"address"},{"name":"_proposalId","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"isProposer","type":"bool","internalType":"bool"},{"name":"isVoter","type":"bool","internalType":"bool"},{"name":"claimableAmount","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"isNftInUse","type":"function","inputs":[{"name":"_tokenId","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"name":"maxReward","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"minDeposit","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"minReward","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"owner","type":"function","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"name":"pause","type":"function","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"name":"paused","type":"function","inputs":[],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"name":"proposalVoteCounts","type":"function","inputs":[{"name":"_proposalId","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"_againstVotes","type":"uint256","internalType":"uint256"},{"name":"_forVotes","type":"uint256","internalType":"uint256"},{"name":"_abstainVotes","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"proposalVoteInfo","type":"function","inputs":[{"name":"_proposalId","type":"uint256","internalType":"uint256"},{"name":"_account","type":"address","internalType":"address"}],"outputs":[{"name":"_voteInfo","type":"tuple","components":[{"name":"voteType","type":"uint8","internalType":"enum Governance.VoteType"},{"name":"weight","type":"uint256","internalType":"uint256"},{"name":"rewardClaimed","type":"bool","internalType":"bool"}],"internalType":"struct Governance.VoteInfo"}],"stateMutability":"view"},{"name":"proposalVotes","type":"function","inputs":[{"name":"","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"againstVotes","type":"uint256","internalType":"uint256"},{"name":"forVotes","type":"uint256","internalType":"uint256"},{"name":"abstainVotes","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"proposals","type":"function","inputs":[{"name":"","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"proposer","type":"address","internalType":"address"},{"name":"proposerRewardClaimed","type":"bool","internalType":"bool"},{"name":"voteStart","type":"uint64","internalType":"uint64"},{"name":"voteEnd","type":"uint64","internalType":"uint64"},{"name":"totalStakeAtStart","type":"uint256","internalType":"uint256"},{"name":"totalReward","type":"uint256","internalType":"uint256"},{"name":"quorumThresholdBps","type":"uint256","internalType":"uint256"},{"name":"forVotesThresholdBps","type":"uint256","internalType":"uint256"},{"name":"proposerRewardBps","type":"uint256","internalType":"uint256"},{"name":"refunded","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"name":"propose","type":"function","inputs":[{"name":"_tokenId","type":"uint256","internalType":"uint256"},{"name":"_deposit","type":"uint256","internalType":"uint256"},{"name":"_title","type":"string","internalType":"string"},{"name":"_description","type":"string","internalType":"string"}],"outputs":[{"name":"proposalId","type":"uint256","internalType":"uint256"}],"stateMutability":"nonpayable"},{"name":"proposerRewardBps","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"quorumThresholdBps","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"refundInvalidProposal","type":"function","inputs":[{"name":"_proposalId","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"removeFromRewardPool","type":"function","inputs":[{"name":"_amount","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"renounceOwnership","type":"function","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"name":"rewardBps","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"rewardPool","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"setForVotesThresholdBps","type":"function","inputs":[{"name":"_forVotesThresholdBps","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"setMaxReward","type":"function","inputs":[{"name":"_maxReward","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"setMinDeposit","type":"function","inputs":[{"name":"_minDeposit","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"setMinReward","type":"function","inputs":[{"name":"_minReward","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"setProposerRewardBps","type":"function","inputs":[{"name":"_proposerRewardBps","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"setQuorumThresholdBps","type":"function","inputs":[{"name":"_quorumThresholdBps","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"setRewardBps","type":"function","inputs":[{"name":"_rewardBps","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"setVotingPeriod","type":"function","inputs":[{"name":"_votingPeriod","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"staking","type":"function","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"name":"state","type":"function","inputs":[{"name":"_proposalId","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"uint8","internalType":"enum Governance.ProposalState"}],"stateMutability":"view"},{"name":"transferOwnership","type":"function","inputs":[{"name":"newOwner","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"unpause","type":"function","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"name":"votingPeriod","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"}],"metadata":"{\"compiler\":{\"version\":\"0.8.29+commit.ab55807c\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_staking\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_bnb48er\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_votingPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_quorumThresholdBps\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_forVotesThresholdBps\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minDeposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_rewardBps\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minReward\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxReward\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_proposerRewardBps\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_lastProposalId\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"EnforcedPause\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ExpectedPause\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"OwnableInvalidOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"OwnableUnauthorizedAccount\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"bits\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"SafeCastOverflowedUintDowncast\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"SafeERC20FailedOperation\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"ForVotesThresholdBpsUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"proposalId\",\"type\":\"uint256\"}],\"name\":\"InvalidProposalRefunded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"MaxRewardUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"MinDepositUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"MinRewardUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"proposalId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"proposer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"voteStart\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"voteEnd\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"title\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"description\",\"type\":\"string\"}],\"name\":\"ProposalCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"ProposerRewardBpsUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"QuorumThresholdBpsUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"RewardBpsUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"proposalId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"RewardClaimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"RewardPoolContributed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"RewardPoolRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"voter\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"proposalId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"support\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"weight\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"reason\",\"type\":\"string\"}],\"name\":\"VoteCast\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"VotingPeriodUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"bnb48er\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"bnb48ersInUse\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"calcRewardFromPool\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_proposalId\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"_support\",\"type\":\"uint8\"},{\"internalType\":\"string\",\"name\":\"_reason\",\"type\":\"string\"}],\"name\":\"castVote\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_proposalId\",\"type\":\"uint256\"}],\"name\":\"claimReward\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"contributeToRewardPool\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"forVotesThresholdBps\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_proposalId\",\"type\":\"uint256\"}],\"name\":\"getClaimableRewardInfo\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"isProposer\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"isVoter\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"claimableAmount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenId\",\"type\":\"uint256\"}],\"name\":\"isNftInUse\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxReward\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minDeposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minReward\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_proposalId\",\"type\":\"uint256\"}],\"name\":\"proposalVoteCounts\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"_againstVotes\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_forVotes\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_abstainVotes\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_proposalId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"}],\"name\":\"proposalVoteInfo\",\"outputs\":[{\"components\":[{\"internalType\":\"enum Governance.VoteType\",\"name\":\"voteType\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"weight\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"rewardClaimed\",\"type\":\"bool\"}],\"internalType\":\"struct Governance.VoteInfo\",\"name\":\"_voteInfo\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"proposalVotes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"againstVotes\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"forVotes\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"abstainVotes\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"proposals\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"proposer\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"proposerRewardClaimed\",\"type\":\"bool\"},{\"internalType\":\"uint64\",\"name\":\"voteStart\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"voteEnd\",\"type\":\"uint64\"},{\"internalType\":\"uint256\",\"name\":\"totalStakeAtStart\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"totalReward\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quorumThresholdBps\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"forVotesThresholdBps\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"proposerRewardBps\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"refunded\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_deposit\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"_title\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_description\",\"type\":\"string\"}],\"name\":\"propose\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"proposalId\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proposerRewardBps\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"quorumThresholdBps\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_proposalId\",\"type\":\"uint256\"}],\"name\":\"refundInvalidProposal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"removeFromRewardPool\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rewardBps\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rewardPool\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_forVotesThresholdBps\",\"type\":\"uint256\"}],\"name\":\"setForVotesThresholdBps\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_maxReward\",\"type\":\"uint256\"}],\"name\":\"setMaxReward\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_minDeposit\",\"type\":\"uint256\"}],\"name\":\"setMinDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_minReward\",\"type\":\"uint256\"}],\"name\":\"setMinReward\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_proposerRewardBps\",\"type\":\"uint256\"}],\"name\":\"setProposerRewardBps\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_quorumThresholdBps\",\"type\":\"uint256\"}],\"name\":\"setQuorumThresholdBps\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_rewardBps\",\"type\":\"uint256\"}],\"name\":\"setRewardBps\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_votingPeriod\",\"type\":\"uint256\"}],\"name\":\"setVotingPeriod\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"staking\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_proposalId\",\"type\":\"uint256\"}],\"name\":\"state\",\"outputs\":[{\"internalType\":\"enum Governance.ProposalState\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"votingPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"EnforcedPause()\":[{\"details\":\"The operation failed because the contract is paused.\"}],\"ExpectedPause()\":[{\"details\":\"The operation failed because the contract is not paused.\"}],\"OwnableInvalidOwner(address)\":[{\"details\":\"The owner is not a valid owner account. (eg. `address(0)`)\"}],\"OwnableUnauthorizedAccount(address)\":[{\"details\":\"The caller account is not authorized to perform an operation.\"}],\"SafeCastOverflowedUintDowncast(uint8,uint256)\":[{\"details\":\"Value doesn't fit in an uint of `bits` size.\"}],\"SafeERC20FailedOperation(address)\":[{\"details\":\"An operation with an ERC-20 token failed.\"}]},\"events\":{\"Paused(address)\":{\"details\":\"Emitted when the pause is triggered by `account`.\"},\"Unpaused(address)\":{\"details\":\"Emitted when the pause is lifted by `account`.\"}},\"kind\":\"dev\",\"methods\":{\"calcRewardFromPool()\":{\"details\":\"Calculates the next proposal reward that should be reserved from the reward pool based on the current parameters.\"},\"castVote(uint256,uint8,string)\":{\"params\":{\"_proposalId\":\"The proposal ID.\",\"_reason\":\"The optional reason for the vote.\",\"_support\":\"The vote enum type.\"}},\"claimReward(uint256)\":{\"params\":{\"_proposalId\":\"The proposal ID.\"}},\"constructor\":{\"params\":{\"_bnb48er\":\"The address of the BNB48er NFT contract.\",\"_forVotesThresholdBps\":\"The required percentage of \\\"for\\\" votes within the non-abstinent voting stakes, in basis points.\",\"_lastProposalId\":\"The last proposal ID from the legacy Governance contract.\",\"_maxReward\":\"The maximal amount of KOGE for each proposal reward from the reward pool.\",\"_minDeposit\":\"The minimal amount of KOGE to create a proposal.\",\"_minReward\":\"The minimal amount of KOGE for each proposal reward from the reward pool.\",\"_proposerRewardBps\":\"The proposer's share of each proposal reward in basis points.\",\"_quorumThresholdBps\":\"The required percentage of final votes within the total stakes at proposal time, in basis points.\",\"_rewardBps\":\"The share of the reward pool for each proposal reward in basis points.\",\"_staking\":\"The address of the Staking contract.\",\"_votingPeriod\":\"The period to cast votes after a proposal is created, in seconds.\"}},\"contributeToRewardPool(uint256)\":{\"params\":{\"_amount\":\"The amount to contribute.\"}},\"getClaimableRewardInfo(address,uint256)\":{\"params\":{\"_account\":\"The account address.\",\"_proposalId\":\"The proposal ID.\"}},\"isNftInUse(uint256)\":{\"params\":{\"_tokenId\":\"The token ID.\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"proposalVoteCounts(uint256)\":{\"params\":{\"_proposalId\":\"The proposal ID.\"}},\"proposalVoteInfo(uint256,address)\":{\"params\":{\"_account\":\"The voting account.\",\"_proposalId\":\"The proposal ID.\"}},\"propose(uint256,uint256,string,string)\":{\"params\":{\"_deposit\":\"The amount of KOGE to be paid to the reward pool.\",\"_description\":\"The content of the proposal.\",\"_title\":\"The title of the proposal.\",\"_tokenId\":\"The token ID for the BNB48er NFT to be associated with the proposal. An NFT can only be associated with a single active proposal.\"}},\"refundInvalidProposal(uint256)\":{\"params\":{\"_proposalId\":\"The proposal ID.\"}},\"removeFromRewardPool(uint256)\":{\"params\":{\"_amount\":\"The amount to remove.\"}},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.\"},\"setForVotesThresholdBps(uint256)\":{\"details\":\"Sets `forVotesThresholdBps`.\",\"params\":{\"_forVotesThresholdBps\":\"The new `forVotesThresholdBps`.\"}},\"setMaxReward(uint256)\":{\"details\":\"Sets `maxReward`.\",\"params\":{\"_maxReward\":\"The new `maxReward`.\"}},\"setMinDeposit(uint256)\":{\"details\":\"Sets `minDeposit`.\",\"params\":{\"_minDeposit\":\"The new `minDeposit`.\"}},\"setMinReward(uint256)\":{\"details\":\"Sets `minReward`.\",\"params\":{\"_minReward\":\"The new `minReward`.\"}},\"setProposerRewardBps(uint256)\":{\"details\":\"Sets `proposerRewardBps`.\",\"params\":{\"_proposerRewardBps\":\"The new `proposerRewardBps`.\"}},\"setQuorumThresholdBps(uint256)\":{\"details\":\"Sets `quorumThresholdBps`.\",\"params\":{\"_quorumThresholdBps\":\"The new `quorumThresholdBps`.\"}},\"setRewardBps(uint256)\":{\"details\":\"Sets `rewardBps`.\",\"params\":{\"_rewardBps\":\"The new `rewardBps`.\"}},\"setVotingPeriod(uint256)\":{\"details\":\"Sets `votingPeriod`.\",\"params\":{\"_votingPeriod\":\"The new `votingPeriod`.\"}},\"state(uint256)\":{\"params\":{\"_proposalId\":\"The proposal ID.\"}},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"title\":\"A contract for the governance of text-based proposals, with incentives for participants. This is essentially a simplified version of the OpenZeppelin Governor (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/5ac4d93ae318cdf6c8a1125dff3a439a2aeabb63/contracts/governance/Governor.sol), with rewards and other BNB48-specific features implemented.\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"castVote(uint256,uint8,string)\":{\"notice\":\"Casts a vote.\"},\"claimReward(uint256)\":{\"notice\":\"Claims KOGE reward for valid proposals.\"},\"constructor\":{\"notice\":\"Governance constructor.\"},\"contributeToRewardPool(uint256)\":{\"notice\":\"Contributes KOGE to the proposal reward pool.\"},\"getClaimableRewardInfo(address,uint256)\":{\"notice\":\"Get claimable reward info for an account and a proposal.\"},\"isNftInUse(uint256)\":{\"notice\":\"Returns whether the given NFT is being used for an active proposal.\"},\"pause()\":{\"notice\":\"Pauses the contract.\"},\"proposalVoteCounts(uint256)\":{\"notice\":\"Accessor to the proposal vote counts.\"},\"proposalVoteInfo(uint256,address)\":{\"notice\":\"Accessor to the vote info of a proposal for an account.\"},\"propose(uint256,uint256,string,string)\":{\"notice\":\"Create a new proposal. Vote starts immediately and ends `votingPeriod` blocks afterwards.\"},\"refundInvalidProposal(uint256)\":{\"notice\":\"Refunds KOGE to the reward pool for a proposal that failed to reach quorum.\"},\"removeFromRewardPool(uint256)\":{\"notice\":\"Removes KOGE from the proposal reward pool.\"},\"state(uint256)\":{\"notice\":\"Returns the current state of a proposal.\"},\"unpause()\":{\"notice\":\"Unpauses the contract.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/Governance.sol\":\"Governance\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":800},\"remappings\":[],\"viaIR\":true},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {Context} from \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * The initial owner is set to the address provided by the deployer. This can\\n * later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n    address private _owner;\\n\\n    /**\\n     * @dev The caller account is not authorized to perform an operation.\\n     */\\n    error OwnableUnauthorizedAccount(address account);\\n\\n    /**\\n     * @dev The owner is not a valid owner account. (eg. `address(0)`)\\n     */\\n    error OwnableInvalidOwner(address owner);\\n\\n    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n    /**\\n     * @dev Initializes the contract setting the address provided by the deployer as the initial owner.\\n     */\\n    constructor(address initialOwner) {\\n        if (initialOwner == address(0)) {\\n            revert OwnableInvalidOwner(address(0));\\n        }\\n        _transferOwnership(initialOwner);\\n    }\\n\\n    /**\\n     * @dev Throws if called by any account other than the owner.\\n     */\\n    modifier onlyOwner() {\\n        _checkOwner();\\n        _;\\n    }\\n\\n    /**\\n     * @dev Returns the address of the current owner.\\n     */\\n    function owner() public view virtual returns (address) {\\n        return _owner;\\n    }\\n\\n    /**\\n     * @dev Throws if the sender is not the owner.\\n     */\\n    function _checkOwner() internal view virtual {\\n        if (owner() != _msgSender()) {\\n            revert OwnableUnauthorizedAccount(_msgSender());\\n        }\\n    }\\n\\n    /**\\n     * @dev Leaves the contract without owner. It will not be possible to call\\n     * `onlyOwner` functions. Can only be called by the current owner.\\n     *\\n     * NOTE: Renouncing ownership will leave the contract without an owner,\\n     * thereby disabling any functionality that is only available to the owner.\\n     */\\n    function renounceOwnership() public virtual onlyOwner {\\n        _transferOwnership(address(0));\\n    }\\n\\n    /**\\n     * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n     * Can only be called by the current owner.\\n     */\\n    function transferOwnership(address newOwner) public virtual onlyOwner {\\n        if (newOwner == address(0)) {\\n            revert OwnableInvalidOwner(address(0));\\n        }\\n        _transferOwnership(newOwner);\\n    }\\n\\n    /**\\n     * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n     * Internal function without access restriction.\\n     */\\n    function _transferOwnership(address newOwner) internal virtual {\\n        address oldOwner = _owner;\\n        _owner = newOwner;\\n        emit OwnershipTransferred(oldOwner, newOwner);\\n    }\\n}\\n\",\"keccak256\":\"0xff6d0bb2e285473e5311d9d3caacb525ae3538a80758c10649a4d61029b017bb\",\"license\":\"MIT\"},\"@openzeppelin/contracts/interfaces/IERC1363.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.1.0) (interfaces/IERC1363.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IERC20} from \\\"./IERC20.sol\\\";\\nimport {IERC165} from \\\"./IERC165.sol\\\";\\n\\n/**\\n * @title IERC1363\\n * @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363].\\n *\\n * Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract\\n * after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction.\\n */\\ninterface IERC1363 is IERC20, IERC165 {\\n    /*\\n     * Note: the ERC-165 identifier for this interface is 0xb0202a11.\\n     * 0xb0202a11 ===\\n     *   bytes4(keccak256('transferAndCall(address,uint256)')) ^\\n     *   bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^\\n     *   bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^\\n     *   bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^\\n     *   bytes4(keccak256('approveAndCall(address,uint256)')) ^\\n     *   bytes4(keccak256('approveAndCall(address,uint256,bytes)'))\\n     */\\n\\n    /**\\n     * @dev Moves a `value` amount of tokens from the caller's account to `to`\\n     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n     * @param to The address which you want to transfer to.\\n     * @param value The amount of tokens to be transferred.\\n     * @return A boolean value indicating whether the operation succeeded unless throwing.\\n     */\\n    function transferAndCall(address to, uint256 value) external returns (bool);\\n\\n    /**\\n     * @dev Moves a `value` amount of tokens from the caller's account to `to`\\n     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n     * @param to The address which you want to transfer to.\\n     * @param value The amount of tokens to be transferred.\\n     * @param data Additional data with no specified format, sent in call to `to`.\\n     * @return A boolean value indicating whether the operation succeeded unless throwing.\\n     */\\n    function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool);\\n\\n    /**\\n     * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\\n     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n     * @param from The address which you want to send tokens from.\\n     * @param to The address which you want to transfer to.\\n     * @param value The amount of tokens to be transferred.\\n     * @return A boolean value indicating whether the operation succeeded unless throwing.\\n     */\\n    function transferFromAndCall(address from, address to, uint256 value) external returns (bool);\\n\\n    /**\\n     * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\\n     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n     * @param from The address which you want to send tokens from.\\n     * @param to The address which you want to transfer to.\\n     * @param value The amount of tokens to be transferred.\\n     * @param data Additional data with no specified format, sent in call to `to`.\\n     * @return A boolean value indicating whether the operation succeeded unless throwing.\\n     */\\n    function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool);\\n\\n    /**\\n     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n     * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\\n     * @param spender The address which will spend the funds.\\n     * @param value The amount of tokens to be spent.\\n     * @return A boolean value indicating whether the operation succeeded unless throwing.\\n     */\\n    function approveAndCall(address spender, uint256 value) external returns (bool);\\n\\n    /**\\n     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n     * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\\n     * @param spender The address which will spend the funds.\\n     * @param value The amount of tokens to be spent.\\n     * @param data Additional data with no specified format, sent in call to `spender`.\\n     * @return A boolean value indicating whether the operation succeeded unless throwing.\\n     */\\n    function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool);\\n}\\n\",\"keccak256\":\"0x9b6b3e7803bc5f2f8cd7ad57db8ac1def61a9930a5a3107df4882e028a9605d7\",\"license\":\"MIT\"},\"@openzeppelin/contracts/interfaces/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC165.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IERC165} from \\\"../utils/introspection/IERC165.sol\\\";\\n\",\"keccak256\":\"0xde7e9fd9aee8d4f40772f96bb3b58836cbc6dfc0227014a061947f8821ea9724\",\"license\":\"MIT\"},\"@openzeppelin/contracts/interfaces/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC20.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IERC20} from \\\"../token/ERC20/IERC20.sol\\\";\\n\",\"keccak256\":\"0xce41876e78d1badc0512229b4d14e4daf83bc1003d7f83978d18e0e56f965b9c\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Interface of the ERC-20 standard as defined in the ERC.\\n */\\ninterface IERC20 {\\n    /**\\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n     * another (`to`).\\n     *\\n     * Note that `value` may be zero.\\n     */\\n    event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n    /**\\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n     * a call to {approve}. `value` is the new allowance.\\n     */\\n    event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n    /**\\n     * @dev Returns the value of tokens in existence.\\n     */\\n    function totalSupply() external view returns (uint256);\\n\\n    /**\\n     * @dev Returns the value of tokens owned by `account`.\\n     */\\n    function balanceOf(address account) external view returns (uint256);\\n\\n    /**\\n     * @dev Moves a `value` amount of tokens from the caller's account to `to`.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transfer(address to, uint256 value) external returns (bool);\\n\\n    /**\\n     * @dev Returns the remaining number of tokens that `spender` will be\\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n     * zero by default.\\n     *\\n     * This value changes when {approve} or {transferFrom} are called.\\n     */\\n    function allowance(address owner, address spender) external view returns (uint256);\\n\\n    /**\\n     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n     * caller's tokens.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n     * that someone may use both the old and the new allowance by unfortunate\\n     * transaction ordering. One possible solution to mitigate this race\\n     * condition is to first reduce the spender's allowance to 0 and set the\\n     * desired value afterwards:\\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n     *\\n     * Emits an {Approval} event.\\n     */\\n    function approve(address spender, uint256 value) external returns (bool);\\n\\n    /**\\n     * @dev Moves a `value` amount of tokens from `from` to `to` using the\\n     * allowance mechanism. `value` is then deducted from the caller's\\n     * allowance.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transferFrom(address from, address to, uint256 value) external returns (bool);\\n}\\n\",\"keccak256\":\"0xe06a3f08a987af6ad2e1c1e774405d4fe08f1694b67517438b467cecf0da0ef7\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.2.0) (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IERC20} from \\\"../IERC20.sol\\\";\\nimport {IERC1363} from \\\"../../../interfaces/IERC1363.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC-20 operations that throw on failure (when the token\\n * contract returns false). Tokens that return no value (and instead revert or\\n * throw on failure) are also supported, non-reverting calls are assumed to be\\n * successful.\\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\n */\\nlibrary SafeERC20 {\\n    /**\\n     * @dev An operation with an ERC-20 token failed.\\n     */\\n    error SafeERC20FailedOperation(address token);\\n\\n    /**\\n     * @dev Indicates a failed `decreaseAllowance` request.\\n     */\\n    error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease);\\n\\n    /**\\n     * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,\\n     * non-reverting calls are assumed to be successful.\\n     */\\n    function safeTransfer(IERC20 token, address to, uint256 value) internal {\\n        _callOptionalReturn(token, abi.encodeCall(token.transfer, (to, value)));\\n    }\\n\\n    /**\\n     * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the\\n     * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.\\n     */\\n    function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\\n        _callOptionalReturn(token, abi.encodeCall(token.transferFrom, (from, to, value)));\\n    }\\n\\n    /**\\n     * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\\n     * non-reverting calls are assumed to be successful.\\n     *\\n     * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \\\"client\\\"\\n     * smart contract uses ERC-7674 to set temporary allowances, then the \\\"client\\\" smart contract should avoid using\\n     * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\\n     * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\\n     */\\n    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n        uint256 oldAllowance = token.allowance(address(this), spender);\\n        forceApprove(token, spender, oldAllowance + value);\\n    }\\n\\n    /**\\n     * @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no\\n     * value, non-reverting calls are assumed to be successful.\\n     *\\n     * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \\\"client\\\"\\n     * smart contract uses ERC-7674 to set temporary allowances, then the \\\"client\\\" smart contract should avoid using\\n     * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\\n     * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\\n     */\\n    function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal {\\n        unchecked {\\n            uint256 currentAllowance = token.allowance(address(this), spender);\\n            if (currentAllowance < requestedDecrease) {\\n                revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease);\\n            }\\n            forceApprove(token, spender, currentAllowance - requestedDecrease);\\n        }\\n    }\\n\\n    /**\\n     * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,\\n     * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval\\n     * to be set to zero before setting it to a non-zero value, such as USDT.\\n     *\\n     * NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function\\n     * only sets the \\\"standard\\\" allowance. Any temporary allowance will remain active, in addition to the value being\\n     * set here.\\n     */\\n    function forceApprove(IERC20 token, address spender, uint256 value) internal {\\n        bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value));\\n\\n        if (!_callOptionalReturnBool(token, approvalCall)) {\\n            _callOptionalReturn(token, abi.encodeCall(token.approve, (spender, 0)));\\n            _callOptionalReturn(token, approvalCall);\\n        }\\n    }\\n\\n    /**\\n     * @dev Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no\\n     * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n     * targeting contracts.\\n     *\\n     * Reverts if the returned value is other than `true`.\\n     */\\n    function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\\n        if (to.code.length == 0) {\\n            safeTransfer(token, to, value);\\n        } else if (!token.transferAndCall(to, value, data)) {\\n            revert SafeERC20FailedOperation(address(token));\\n        }\\n    }\\n\\n    /**\\n     * @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target\\n     * has no code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n     * targeting contracts.\\n     *\\n     * Reverts if the returned value is other than `true`.\\n     */\\n    function transferFromAndCallRelaxed(\\n        IERC1363 token,\\n        address from,\\n        address to,\\n        uint256 value,\\n        bytes memory data\\n    ) internal {\\n        if (to.code.length == 0) {\\n            safeTransferFrom(token, from, to, value);\\n        } else if (!token.transferFromAndCall(from, to, value, data)) {\\n            revert SafeERC20FailedOperation(address(token));\\n        }\\n    }\\n\\n    /**\\n     * @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no\\n     * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n     * targeting contracts.\\n     *\\n     * NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}.\\n     * Opposedly, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall}\\n     * once without retrying, and relies on the returned value to be true.\\n     *\\n     * Reverts if the returned value is other than `true`.\\n     */\\n    function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\\n        if (to.code.length == 0) {\\n            forceApprove(token, to, value);\\n        } else if (!token.approveAndCall(to, value, data)) {\\n            revert SafeERC20FailedOperation(address(token));\\n        }\\n    }\\n\\n    /**\\n     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n     * on the return value: the return value is optional (but if data is returned, it must not be false).\\n     * @param token The token targeted by the call.\\n     * @param data The call data (encoded using abi.encode or one of its variants).\\n     *\\n     * This is a variant of {_callOptionalReturnBool} that reverts if call fails to meet the requirements.\\n     */\\n    function _callOptionalReturn(IERC20 token, bytes memory data) private {\\n        uint256 returnSize;\\n        uint256 returnValue;\\n        assembly (\\\"memory-safe\\\") {\\n            let success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\\n            // bubble errors\\n            if iszero(success) {\\n                let ptr := mload(0x40)\\n                returndatacopy(ptr, 0, returndatasize())\\n                revert(ptr, returndatasize())\\n            }\\n            returnSize := returndatasize()\\n            returnValue := mload(0)\\n        }\\n\\n        if (returnSize == 0 ? address(token).code.length == 0 : returnValue != 1) {\\n            revert SafeERC20FailedOperation(address(token));\\n        }\\n    }\\n\\n    /**\\n     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n     * on the return value: the return value is optional (but if data is returned, it must not be false).\\n     * @param token The token targeted by the call.\\n     * @param data The call data (encoded using abi.encode or one of its variants).\\n     *\\n     * This is a variant of {_callOptionalReturn} that silently catches all reverts and returns a bool instead.\\n     */\\n    function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\\n        bool success;\\n        uint256 returnSize;\\n        uint256 returnValue;\\n        assembly (\\\"memory-safe\\\") {\\n            success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\\n            returnSize := returndatasize()\\n            returnValue := mload(0)\\n        }\\n        return success && (returnSize == 0 ? address(token).code.length > 0 : returnValue == 1);\\n    }\\n}\\n\",\"keccak256\":\"0x4ea01544758fd2c7045961904686bfe232d2220a04ecaa2d6b08dac17827febf\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/IERC721.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC721/IERC721.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IERC165} from \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC-721 compliant contract.\\n */\\ninterface IERC721 is IERC165 {\\n    /**\\n     * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\\n     */\\n    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\\n\\n    /**\\n     * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\\n     */\\n    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\\n\\n    /**\\n     * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\\n     */\\n    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\\n\\n    /**\\n     * @dev Returns the number of tokens in ``owner``'s account.\\n     */\\n    function balanceOf(address owner) external view returns (uint256 balance);\\n\\n    /**\\n     * @dev Returns the owner of the `tokenId` token.\\n     *\\n     * Requirements:\\n     *\\n     * - `tokenId` must exist.\\n     */\\n    function ownerOf(uint256 tokenId) external view returns (address owner);\\n\\n    /**\\n     * @dev Safely transfers `tokenId` token from `from` to `to`.\\n     *\\n     * Requirements:\\n     *\\n     * - `from` cannot be the zero address.\\n     * - `to` cannot be the zero address.\\n     * - `tokenId` token must exist and be owned by `from`.\\n     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon\\n     *   a safe transfer.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external;\\n\\n    /**\\n     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\\n     * are aware of the ERC-721 protocol to prevent tokens from being forever locked.\\n     *\\n     * Requirements:\\n     *\\n     * - `from` cannot be the zero address.\\n     * - `to` cannot be the zero address.\\n     * - `tokenId` token must exist and be owned by `from`.\\n     * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or\\n     *   {setApprovalForAll}.\\n     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon\\n     *   a safe transfer.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function safeTransferFrom(address from, address to, uint256 tokenId) external;\\n\\n    /**\\n     * @dev Transfers `tokenId` token from `from` to `to`.\\n     *\\n     * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC-721\\n     * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must\\n     * understand this adds an external call which potentially creates a reentrancy vulnerability.\\n     *\\n     * Requirements:\\n     *\\n     * - `from` cannot be the zero address.\\n     * - `to` cannot be the zero address.\\n     * - `tokenId` token must be owned by `from`.\\n     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transferFrom(address from, address to, uint256 tokenId) external;\\n\\n    /**\\n     * @dev Gives permission to `to` to transfer `tokenId` token to another account.\\n     * The approval is cleared when the token is transferred.\\n     *\\n     * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\\n     *\\n     * Requirements:\\n     *\\n     * - The caller must own the token or be an approved operator.\\n     * - `tokenId` must exist.\\n     *\\n     * Emits an {Approval} event.\\n     */\\n    function approve(address to, uint256 tokenId) external;\\n\\n    /**\\n     * @dev Approve or remove `operator` as an operator for the caller.\\n     * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\\n     *\\n     * Requirements:\\n     *\\n     * - The `operator` cannot be the address zero.\\n     *\\n     * Emits an {ApprovalForAll} event.\\n     */\\n    function setApprovalForAll(address operator, bool approved) external;\\n\\n    /**\\n     * @dev Returns the account approved for `tokenId` token.\\n     *\\n     * Requirements:\\n     *\\n     * - `tokenId` must exist.\\n     */\\n    function getApproved(uint256 tokenId) external view returns (address operator);\\n\\n    /**\\n     * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\\n     *\\n     * See {setApprovalForAll}\\n     */\\n    function isApprovedForAll(address owner, address operator) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x5dc63d1c6a12fe1b17793e1745877b2fcbe1964c3edfd0a482fac21ca8f18261\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n    function _msgSender() internal view virtual returns (address) {\\n        return msg.sender;\\n    }\\n\\n    function _msgData() internal view virtual returns (bytes calldata) {\\n        return msg.data;\\n    }\\n\\n    function _contextSuffixLength() internal view virtual returns (uint256) {\\n        return 0;\\n    }\\n}\\n\",\"keccak256\":\"0x493033a8d1b176a037b2cc6a04dad01a5c157722049bbecf632ca876224dd4b2\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Pausable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Pausable.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {Context} from \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which allows children to implement an emergency stop\\n * mechanism that can be triggered by an authorized account.\\n *\\n * This module is used through inheritance. It will make available the\\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\\n * the functions of your contract. Note that they will not be pausable by\\n * simply including this module, only once the modifiers are put in place.\\n */\\nabstract contract Pausable is Context {\\n    bool private _paused;\\n\\n    /**\\n     * @dev Emitted when the pause is triggered by `account`.\\n     */\\n    event Paused(address account);\\n\\n    /**\\n     * @dev Emitted when the pause is lifted by `account`.\\n     */\\n    event Unpaused(address account);\\n\\n    /**\\n     * @dev The operation failed because the contract is paused.\\n     */\\n    error EnforcedPause();\\n\\n    /**\\n     * @dev The operation failed because the contract is not paused.\\n     */\\n    error ExpectedPause();\\n\\n    /**\\n     * @dev Initializes the contract in unpaused state.\\n     */\\n    constructor() {\\n        _paused = false;\\n    }\\n\\n    /**\\n     * @dev Modifier to make a function callable only when the contract is not paused.\\n     *\\n     * Requirements:\\n     *\\n     * - The contract must not be paused.\\n     */\\n    modifier whenNotPaused() {\\n        _requireNotPaused();\\n        _;\\n    }\\n\\n    /**\\n     * @dev Modifier to make a function callable only when the contract is paused.\\n     *\\n     * Requirements:\\n     *\\n     * - The contract must be paused.\\n     */\\n    modifier whenPaused() {\\n        _requirePaused();\\n        _;\\n    }\\n\\n    /**\\n     * @dev Returns true if the contract is paused, and false otherwise.\\n     */\\n    function paused() public view virtual returns (bool) {\\n        return _paused;\\n    }\\n\\n    /**\\n     * @dev Throws if the contract is paused.\\n     */\\n    function _requireNotPaused() internal view virtual {\\n        if (paused()) {\\n            revert EnforcedPause();\\n        }\\n    }\\n\\n    /**\\n     * @dev Throws if the contract is not paused.\\n     */\\n    function _requirePaused() internal view virtual {\\n        if (!paused()) {\\n            revert ExpectedPause();\\n        }\\n    }\\n\\n    /**\\n     * @dev Triggers stopped state.\\n     *\\n     * Requirements:\\n     *\\n     * - The contract must not be paused.\\n     */\\n    function _pause() internal virtual whenNotPaused {\\n        _paused = true;\\n        emit Paused(_msgSender());\\n    }\\n\\n    /**\\n     * @dev Returns to normal state.\\n     *\\n     * Requirements:\\n     *\\n     * - The contract must be paused.\\n     */\\n    function _unpause() internal virtual whenPaused {\\n        _paused = false;\\n        emit Unpaused(_msgSender());\\n    }\\n}\\n\",\"keccak256\":\"0xb2e5f50762c27fb4b123e3619c3c02bdcba5e515309382e5bfb6f7d6486510bd\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Interface of the ERC-165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[ERC].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n    /**\\n     * @dev Returns true if this contract implements the interface defined by\\n     * `interfaceId`. See the corresponding\\n     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[ERC section]\\n     * to learn more about how these ids are created.\\n     *\\n     * This function call must use less than 30 000 gas.\\n     */\\n    function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x79796192ec90263f21b464d5bc90b777a525971d3de8232be80d9c4f9fb353b8\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SafeCast.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/math/SafeCast.sol)\\n// This file was procedurally generated from scripts/generate/templates/SafeCast.js.\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Wrappers over Solidity's uintXX/intXX/bool casting operators with added overflow\\n * checks.\\n *\\n * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can\\n * easily result in undesired exploitation or bugs, since developers usually\\n * assume that overflows raise errors. `SafeCast` restores this intuition by\\n * reverting the transaction when such an operation overflows.\\n *\\n * Using this library instead of the unchecked operations eliminates an entire\\n * class of bugs, so it's recommended to use it always.\\n */\\nlibrary SafeCast {\\n    /**\\n     * @dev Value doesn't fit in an uint of `bits` size.\\n     */\\n    error SafeCastOverflowedUintDowncast(uint8 bits, uint256 value);\\n\\n    /**\\n     * @dev An int value doesn't fit in an uint of `bits` size.\\n     */\\n    error SafeCastOverflowedIntToUint(int256 value);\\n\\n    /**\\n     * @dev Value doesn't fit in an int of `bits` size.\\n     */\\n    error SafeCastOverflowedIntDowncast(uint8 bits, int256 value);\\n\\n    /**\\n     * @dev An uint value doesn't fit in an int of `bits` size.\\n     */\\n    error SafeCastOverflowedUintToInt(uint256 value);\\n\\n    /**\\n     * @dev Returns the downcasted uint248 from uint256, reverting on\\n     * overflow (when the input is greater than largest uint248).\\n     *\\n     * Counterpart to Solidity's `uint248` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - input must fit into 248 bits\\n     */\\n    function toUint248(uint256 value) internal pure returns (uint248) {\\n        if (value > type(uint248).max) {\\n            revert SafeCastOverflowedUintDowncast(248, value);\\n        }\\n        return uint248(value);\\n    }\\n\\n    /**\\n     * @dev Returns the downcasted uint240 from uint256, reverting on\\n     * overflow (when the input is greater than largest uint240).\\n     *\\n     * Counterpart to Solidity's `uint240` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - input must fit into 240 bits\\n     */\\n    function toUint240(uint256 value) internal pure returns (uint240) {\\n        if (value > type(uint240).max) {\\n            revert SafeCastOverflowedUintDowncast(240, value);\\n        }\\n        return uint240(value);\\n    }\\n\\n    /**\\n     * @dev Returns the downcasted uint232 from uint256, reverting on\\n     * overflow (when the input is greater than largest uint232).\\n     *\\n     * Counterpart to Solidity's `uint232` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - input must fit into 232 bits\\n     */\\n    function toUint232(uint256 value) internal pure returns (uint232) {\\n        if (value > type(uint232).max) {\\n            revert SafeCastOverflowedUintDowncast(232, value);\\n        }\\n        return uint232(value);\\n    }\\n\\n    /**\\n     * @dev Returns the downcasted uint224 from uint256, reverting on\\n     * overflow (when the input is greater than largest uint224).\\n     *\\n     * Counterpart to Solidity's `uint224` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - input must fit into 224 bits\\n     */\\n    function toUint224(uint256 value) internal pure returns (uint224) {\\n        if (value > type(uint224).max) {\\n            revert SafeCastOverflowedUintDowncast(224, value);\\n        }\\n        return uint224(value);\\n    }\\n\\n    /**\\n     * @dev Returns the downcasted uint216 from uint256, reverting on\\n     * overflow (when the input is greater than largest uint216).\\n     *\\n     * Counterpart to Solidity's `uint216` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - input must fit into 216 bits\\n     */\\n    function toUint216(uint256 value) internal pure returns (uint216) {\\n        if (value > type(uint216).max) {\\n            revert SafeCastOverflowedUintDowncast(216, value);\\n        }\\n        return uint216(value);\\n    }\\n\\n    /**\\n     * @dev Returns the downcasted uint208 from uint256, reverting on\\n     * overflow (when the input is greater than largest uint208).\\n     *\\n     * Counterpart to Solidity's `uint208` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - input must fit into 208 bits\\n     */\\n    function toUint208(uint256 value) internal pure returns (uint208) {\\n        if (value > type(uint208).max) {\\n            revert SafeCastOverflowedUintDowncast(208, value);\\n        }\\n        return uint208(value);\\n    }\\n\\n    /**\\n     * @dev Returns the downcasted uint200 from uint256, reverting on\\n     * overflow (when the input is greater than largest uint200).\\n     *\\n     * Counterpart to Solidity's `uint200` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - input must fit into 200 bits\\n     */\\n    function toUint200(uint256 value) internal pure returns (uint200) {\\n        if (value > type(uint200).max) {\\n            revert SafeCastOverflowedUintDowncast(200, value);\\n        }\\n        return uint200(value);\\n    }\\n\\n    /**\\n     * @dev Returns the downcasted uint192 from uint256, reverting on\\n     * overflow (when the input is greater than largest uint192).\\n     *\\n     * Counterpart to Solidity's `uint192` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - input must fit into 192 bits\\n     */\\n    function toUint192(uint256 value) internal pure returns (uint192) {\\n        if (value > type(uint192).max) {\\n            revert SafeCastOverflowedUintDowncast(192, value);\\n        }\\n        return uint192(value);\\n    }\\n\\n    /**\\n     * @dev Returns the downcasted uint184 from uint256, reverting on\\n     * overflow (when the input is greater than largest uint184).\\n     *\\n     * Counterpart to Solidity's `uint184` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - input must fit into 184 bits\\n     */\\n    function toUint184(uint256 value) internal pure returns (uint184) {\\n        if (value > type(uint184).max) {\\n            revert SafeCastOverflowedUintDowncast(184, value);\\n        }\\n        return uint184(value);\\n    }\\n\\n    /**\\n     * @dev Returns the downcasted uint176 from uint256, reverting on\\n     * overflow (when the input is greater than largest uint176).\\n     *\\n     * Counterpart to Solidity's `uint176` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - input must fit into 176 bits\\n     */\\n    function toUint176(uint256 value) internal pure returns (uint176) {\\n        if (value > type(uint176).max) {\\n            revert SafeCastOverflowedUintDowncast(176, value);\\n        }\\n        return uint176(value);\\n    }\\n\\n    /**\\n     * @dev Returns the downcasted uint168 from uint256, reverting on\\n     * overflow (when the input is greater than largest uint168).\\n     *\\n     * Counterpart to Solidity's `uint168` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - input must fit into 168 bits\\n     */\\n    function toUint168(uint256 value) internal pure returns (uint168) {\\n        if (value > type(uint168).max) {\\n            revert SafeCastOverflowedUintDowncast(168, value);\\n        }\\n        return uint168(value);\\n    }\\n\\n    /**\\n     * @dev Returns the downcasted uint160 from uint256, reverting on\\n     * overflow (when the input is greater than largest uint160).\\n     *\\n     * Counterpart to Solidity's `uint160` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - input must fit into 160 bits\\n     */\\n    function toUint160(uint256 value) internal pure returns (uint160) {\\n        if (value > type(uint160).max) {\\n            revert SafeCastOverflowedUintDowncast(160, value);\\n        }\\n        return uint160(value);\\n    }\\n\\n    /**\\n     * @dev Returns the downcasted uint152 from uint256, reverting on\\n     * overflow (when the input is greater than largest uint152).\\n     *\\n     * Counterpart to Solidity's `uint152` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - input must fit into 152 bits\\n     */\\n    function toUint152(uint256 value) internal pure returns (uint152) {\\n        if (value > type(uint152).max) {\\n            revert SafeCastOverflowedUintDowncast(152, value);\\n        }\\n        return uint152(value);\\n    }\\n\\n    /**\\n     * @dev Returns the downcasted uint144 from uint256, reverting on\\n     * overflow (when the input is greater than largest uint144).\\n     *\\n     * Counterpart to Solidity's `uint144` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - input must fit into 144 bits\\n     */\\n    function toUint144(uint256 value) internal pure returns (uint144) {\\n        if (value > type(uint144).max) {\\n            revert SafeCastOverflowedUintDowncast(144, value);\\n        }\\n        return uint144(value);\\n    }\\n\\n    /**\\n     * @dev Returns the downcasted uint136 from uint256, reverting on\\n     * overflow (when the input is greater than largest uint136).\\n     *\\n     * Counterpart to Solidity's `uint136` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - input must fit into 136 bits\\n     */\\n    function toUint136(uint256 value) internal pure returns (uint136) {\\n        if (value > type(uint136).max) {\\n            revert SafeCastOverflowedUintDowncast(136, value);\\n        }\\n        return uint136(value);\\n    }\\n\\n    /**\\n     * @dev Returns the downcasted uint128 from uint256, reverting on\\n     * overflow (when the input is greater than largest uint128).\\n     *\\n     * Counterpart to Solidity's `uint128` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - input must fit into 128 bits\\n     */\\n    function toUint128(uint256 value) internal pure returns (uint128) {\\n        if (value > type(uint128).max) {\\n            revert SafeCastOverflowedUintDowncast(128, value);\\n        }\\n        return uint128(value);\\n    }\\n\\n    /**\\n     * @dev Returns the downcasted uint120 from uint256, reverting on\\n     * overflow (when the input is greater than largest uint120).\\n     *\\n     * Counterpart to Solidity's `uint120` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - input must fit into 120 bits\\n     */\\n    function toUint120(uint256 value) internal pure returns (uint120) {\\n        if (value > type(uint120).max) {\\n            revert SafeCastOverflowedUintDowncast(120, value);\\n        }\\n        return uint120(value);\\n    }\\n\\n    /**\\n     * @dev Returns the downcasted uint112 from uint256, reverting on\\n     * overflow (when the input is greater than largest uint112).\\n     *\\n     * Counterpart to Solidity's `uint112` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - input must fit into 112 bits\\n     */\\n    function toUint112(uint256 value) internal pure returns (uint112) {\\n        if (value > type(uint112).max) {\\n            revert SafeCastOverflowedUintDowncast(112, value);\\n        }\\n        return uint112(value);\\n    }\\n\\n    /**\\n     * @dev Returns the downcasted uint104 from uint256, reverting on\\n     * overflow (when the input is greater than largest uint104).\\n     *\\n     * Counterpart to Solidity's `uint104` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - input must fit into 104 bits\\n     */\\n    function toUint104(uint256 value) internal pure returns (uint104) {\\n        if (value > type(uint104).max) {\\n            revert SafeCastOverflowedUintDowncast(104, value);\\n        }\\n        return uint104(value);\\n    }\\n\\n    /**\\n     * @dev Returns the downcasted uint96 from uint256, reverting on\\n     * overflow (when the input is greater than largest uint96).\\n     *\\n     * Counterpart to Solidity's `uint96` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - input must fit into 96 bits\\n     */\\n    function toUint96(uint256 value) internal pure returns (uint96) {\\n        if (value > type(uint96).max) {\\n            revert SafeCastOverflowedUintDowncast(96, value);\\n        }\\n        return uint96(value);\\n    }\\n\\n    /**\\n     * @dev Returns the downcasted uint88 from uint256, reverting on\\n     * overflow (when the input is greater than largest uint88).\\n     *\\n     * Counterpart to Solidity's `uint88` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - input must fit into 88 bits\\n     */\\n    function toUint88(uint256 value) internal pure returns (uint88) {\\n        if (value > type(uint88).max) {\\n            revert SafeCastOverflowedUintDowncast(88, value);\\n        }\\n        return uint88(value);\\n    }\\n\\n    /**\\n     * @dev Returns the downcasted uint80 from uint256, reverting on\\n     * overflow (when the input is greater than largest uint80).\\n     *\\n     * Counterpart to Solidity's `uint80` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - input must fit into 80 bits\\n     */\\n    function toUint80(uint256 value) internal pure returns (uint80) {\\n        if (value > type(uint80).max) {\\n            revert SafeCastOverflowedUintDowncast(80, value);\\n        }\\n        return uint80(value);\\n    }\\n\\n    /**\\n     * @dev Returns the downcasted uint72 from uint256, reverting on\\n     * overflow (when the input is greater than largest uint72).\\n     *\\n     * Counterpart to Solidity's `uint72` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - input must fit into 72 bits\\n     */\\n    function toUint72(uint256 value) internal pure returns (uint72) {\\n        if (value > type(uint72).max) {\\n            revert SafeCastOverflowedUintDowncast(72, value);\\n        }\\n        return uint72(value);\\n    }\\n\\n    /**\\n     * @dev Returns the downcasted uint64 from uint256, reverting on\\n     * overflow (when the input is greater than largest uint64).\\n     *\\n     * Counterpart to Solidity's `uint64` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - input must fit into 64 bits\\n     */\\n    function toUint64(uint256 value) internal pure returns (uint64) {\\n        if (value > type(uint64).max) {\\n            revert SafeCastOverflowedUintDowncast(64, value);\\n        }\\n        return uint64(value);\\n    }\\n\\n    /**\\n     * @dev Returns the downcasted uint56 from uint256, reverting on\\n     * overflow (when the input is greater than largest uint56).\\n     *\\n     * Counterpart to Solidity's `uint56` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - input must fit into 56 bits\\n     */\\n    function toUint56(uint256 value) internal pure returns (uint56) {\\n        if (value > type(uint56).max) {\\n            revert SafeCastOverflowedUintDowncast(56, value);\\n        }\\n        return uint56(value);\\n    }\\n\\n    /**\\n     * @dev Returns the downcasted uint48 from uint256, reverting on\\n     * overflow (when the input is greater than largest uint48).\\n     *\\n     * Counterpart to Solidity's `uint48` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - input must fit into 48 bits\\n     */\\n    function toUint48(uint256 value) internal pure returns (uint48) {\\n        if (value > type(uint48).max) {\\n            revert SafeCastOverflowedUintDowncast(48, value);\\n        }\\n        return uint48(value);\\n    }\\n\\n    /**\\n     * @dev Returns the downcasted uint40 from uint256, reverting on\\n     * overflow (when the input is greater than largest uint40).\\n     *\\n     * Counterpart to Solidity's `uint40` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - input must fit into 40 bits\\n     */\\n    function toUint40(uint256 value) internal pure returns (uint40) {\\n        if (value > type(uint40).max) {\\n            revert SafeCastOverflowedUintDowncast(40, value);\\n        }\\n        return uint40(value);\\n    }\\n\\n    /**\\n     * @dev Returns the downcasted uint32 from uint256, reverting on\\n     * overflow (when the input is greater than largest uint32).\\n     *\\n     * Counterpart to Solidity's `uint32` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - input must fit into 32 bits\\n     */\\n    function toUint32(uint256 value) internal pure returns (uint32) {\\n        if (value > type(uint32).max) {\\n            revert SafeCastOverflowedUintDowncast(32, value);\\n        }\\n        return uint32(value);\\n    }\\n\\n    /**\\n     * @dev Returns the downcasted uint24 from uint256, reverting on\\n     * overflow (when the input is greater than largest uint24).\\n     *\\n     * Counterpart to Solidity's `uint24` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - input must fit into 24 bits\\n     */\\n    function toUint24(uint256 value) internal pure returns (uint24) {\\n        if (value > type(uint24).max) {\\n            revert SafeCastOverflowedUintDowncast(24, value);\\n        }\\n        return uint24(value);\\n    }\\n\\n    /**\\n     * @dev Returns the downcasted uint16 from uint256, reverting on\\n     * overflow (when the input is greater than largest uint16).\\n     *\\n     * Counterpart to Solidity's `uint16` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - input must fit into 16 bits\\n     */\\n    function toUint16(uint256 value) internal pure returns (uint16) {\\n        if (value > type(uint16).max) {\\n            revert SafeCastOverflowedUintDowncast(16, value);\\n        }\\n        return uint16(value);\\n    }\\n\\n    /**\\n     * @dev Returns the downcasted uint8 from uint256, reverting on\\n     * overflow (when the input is greater than largest uint8).\\n     *\\n     * Counterpart to Solidity's `uint8` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - input must fit into 8 bits\\n     */\\n    function toUint8(uint256 value) internal pure returns (uint8) {\\n        if (value > type(uint8).max) {\\n            revert SafeCastOverflowedUintDowncast(8, value);\\n        }\\n        return uint8(value);\\n    }\\n\\n    /**\\n     * @dev Converts a signed int256 into an unsigned uint256.\\n     *\\n     * Requirements:\\n     *\\n     * - input must be greater than or equal to 0.\\n     */\\n    function toUint256(int256 value) internal pure returns (uint256) {\\n        if (value < 0) {\\n            revert SafeCastOverflowedIntToUint(value);\\n        }\\n        return uint256(value);\\n    }\\n\\n    /**\\n     * @dev Returns the downcasted int248 from int256, reverting on\\n     * overflow (when the input is less than smallest int248 or\\n     * greater than largest int248).\\n     *\\n     * Counterpart to Solidity's `int248` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - input must fit into 248 bits\\n     */\\n    function toInt248(int256 value) internal pure returns (int248 downcasted) {\\n        downcasted = int248(value);\\n        if (downcasted != value) {\\n            revert SafeCastOverflowedIntDowncast(248, value);\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns the downcasted int240 from int256, reverting on\\n     * overflow (when the input is less than smallest int240 or\\n     * greater than largest int240).\\n     *\\n     * Counterpart to Solidity's `int240` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - input must fit into 240 bits\\n     */\\n    function toInt240(int256 value) internal pure returns (int240 downcasted) {\\n        downcasted = int240(value);\\n        if (downcasted != value) {\\n            revert SafeCastOverflowedIntDowncast(240, value);\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns the downcasted int232 from int256, reverting on\\n     * overflow (when the input is less than smallest int232 or\\n     * greater than largest int232).\\n     *\\n     * Counterpart to Solidity's `int232` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - input must fit into 232 bits\\n     */\\n    function toInt232(int256 value) internal pure returns (int232 downcasted) {\\n        downcasted = int232(value);\\n        if (downcasted != value) {\\n            revert SafeCastOverflowedIntDowncast(232, value);\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns the downcasted int224 from int256, reverting on\\n     * overflow (when the input is less than smallest int224 or\\n     * greater than largest int224).\\n     *\\n     * Counterpart to Solidity's `int224` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - input must fit into 224 bits\\n     */\\n    function toInt224(int256 value) internal pure returns (int224 downcasted) {\\n        downcasted = int224(value);\\n        if (downcasted != value) {\\n            revert SafeCastOverflowedIntDowncast(224, value);\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns the downcasted int216 from int256, reverting on\\n     * overflow (when the input is less than smallest int216 or\\n     * greater than largest int216).\\n     *\\n     * Counterpart to Solidity's `int216` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - input must fit into 216 bits\\n     */\\n    function toInt216(int256 value) internal pure returns (int216 downcasted) {\\n        downcasted = int216(value);\\n        if (downcasted != value) {\\n            revert SafeCastOverflowedIntDowncast(216, value);\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns the downcasted int208 from int256, reverting on\\n     * overflow (when the input is less than smallest int208 or\\n     * greater than largest int208).\\n     *\\n     * Counterpart to Solidity's `int208` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - input must fit into 208 bits\\n     */\\n    function toInt208(int256 value) internal pure returns (int208 downcasted) {\\n        downcasted = int208(value);\\n        if (downcasted != value) {\\n            revert SafeCastOverflowedIntDowncast(208, value);\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns the downcasted int200 from int256, reverting on\\n     * overflow (when the input is less than smallest int200 or\\n     * greater than largest int200).\\n     *\\n     * Counterpart to Solidity's `int200` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - input must fit into 200 bits\\n     */\\n    function toInt200(int256 value) internal pure returns (int200 downcasted) {\\n        downcasted = int200(value);\\n        if (downcasted != value) {\\n            revert SafeCastOverflowedIntDowncast(200, value);\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns the downcasted int192 from int256, reverting on\\n     * overflow (when the input is less than smallest int192 or\\n     * greater than largest int192).\\n     *\\n     * Counterpart to Solidity's `int192` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - input must fit into 192 bits\\n     */\\n    function toInt192(int256 value) internal pure returns (int192 downcasted) {\\n        downcasted = int192(value);\\n        if (downcasted != value) {\\n            revert SafeCastOverflowedIntDowncast(192, value);\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns the downcasted int184 from int256, reverting on\\n     * overflow (when the input is less than smallest int184 or\\n     * greater than largest int184).\\n     *\\n     * Counterpart to Solidity's `int184` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - input must fit into 184 bits\\n     */\\n    function toInt184(int256 value) internal pure returns (int184 downcasted) {\\n        downcasted = int184(value);\\n        if (downcasted != value) {\\n            revert SafeCastOverflowedIntDowncast(184, value);\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns the downcasted int176 from int256, reverting on\\n     * overflow (when the input is less than smallest int176 or\\n     * greater than largest int176).\\n     *\\n     * Counterpart to Solidity's `int176` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - input must fit into 176 bits\\n     */\\n    function toInt176(int256 value) internal pure returns (int176 downcasted) {\\n        downcasted = int176(value);\\n        if (downcasted != value) {\\n            revert SafeCastOverflowedIntDowncast(176, value);\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns the downcasted int168 from int256, reverting on\\n     * overflow (when the input is less than smallest int168 or\\n     * greater than largest int168).\\n     *\\n     * Counterpart to Solidity's `int168` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - input must fit into 168 bits\\n     */\\n    function toInt168(int256 value) internal pure returns (int168 downcasted) {\\n        downcasted = int168(value);\\n        if (downcasted != value) {\\n            revert SafeCastOverflowedIntDowncast(168, value);\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns the downcasted int160 from int256, reverting on\\n     * overflow (when the input is less than smallest int160 or\\n     * greater than largest int160).\\n     *\\n     * Counterpart to Solidity's `int160` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - input must fit into 160 bits\\n     */\\n    function toInt160(int256 value) internal pure returns (int160 downcasted) {\\n        downcasted = int160(value);\\n        if (downcasted != value) {\\n            revert SafeCastOverflowedIntDowncast(160, value);\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns the downcasted int152 from int256, reverting on\\n     * overflow (when the input is less than smallest int152 or\\n     * greater than largest int152).\\n     *\\n     * Counterpart to Solidity's `int152` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - input must fit into 152 bits\\n     */\\n    function toInt152(int256 value) internal pure returns (int152 downcasted) {\\n        downcasted = int152(value);\\n        if (downcasted != value) {\\n            revert SafeCastOverflowedIntDowncast(152, value);\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns the downcasted int144 from int256, reverting on\\n     * overflow (when the input is less than smallest int144 or\\n     * greater than largest int144).\\n     *\\n     * Counterpart to Solidity's `int144` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - input must fit into 144 bits\\n     */\\n    function toInt144(int256 value) internal pure returns (int144 downcasted) {\\n        downcasted = int144(value);\\n        if (downcasted != value) {\\n            revert SafeCastOverflowedIntDowncast(144, value);\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns the downcasted int136 from int256, reverting on\\n     * overflow (when the input is less than smallest int136 or\\n     * greater than largest int136).\\n     *\\n     * Counterpart to Solidity's `int136` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - input must fit into 136 bits\\n     */\\n    function toInt136(int256 value) internal pure returns (int136 downcasted) {\\n        downcasted = int136(value);\\n        if (downcasted != value) {\\n            revert SafeCastOverflowedIntDowncast(136, value);\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns the downcasted int128 from int256, reverting on\\n     * overflow (when the input is less than smallest int128 or\\n     * greater than largest int128).\\n     *\\n     * Counterpart to Solidity's `int128` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - input must fit into 128 bits\\n     */\\n    function toInt128(int256 value) internal pure returns (int128 downcasted) {\\n        downcasted = int128(value);\\n        if (downcasted != value) {\\n            revert SafeCastOverflowedIntDowncast(128, value);\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns the downcasted int120 from int256, reverting on\\n     * overflow (when the input is less than smallest int120 or\\n     * greater than largest int120).\\n     *\\n     * Counterpart to Solidity's `int120` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - input must fit into 120 bits\\n     */\\n    function toInt120(int256 value) internal pure returns (int120 downcasted) {\\n        downcasted = int120(value);\\n        if (downcasted != value) {\\n            revert SafeCastOverflowedIntDowncast(120, value);\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns the downcasted int112 from int256, reverting on\\n     * overflow (when the input is less than smallest int112 or\\n     * greater than largest int112).\\n     *\\n     * Counterpart to Solidity's `int112` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - input must fit into 112 bits\\n     */\\n    function toInt112(int256 value) internal pure returns (int112 downcasted) {\\n        downcasted = int112(value);\\n        if (downcasted != value) {\\n            revert SafeCastOverflowedIntDowncast(112, value);\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns the downcasted int104 from int256, reverting on\\n     * overflow (when the input is less than smallest int104 or\\n     * greater than largest int104).\\n     *\\n     * Counterpart to Solidity's `int104` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - input must fit into 104 bits\\n     */\\n    function toInt104(int256 value) internal pure returns (int104 downcasted) {\\n        downcasted = int104(value);\\n        if (downcasted != value) {\\n            revert SafeCastOverflowedIntDowncast(104, value);\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns the downcasted int96 from int256, reverting on\\n     * overflow (when the input is less than smallest int96 or\\n     * greater than largest int96).\\n     *\\n     * Counterpart to Solidity's `int96` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - input must fit into 96 bits\\n     */\\n    function toInt96(int256 value) internal pure returns (int96 downcasted) {\\n        downcasted = int96(value);\\n        if (downcasted != value) {\\n            revert SafeCastOverflowedIntDowncast(96, value);\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns the downcasted int88 from int256, reverting on\\n     * overflow (when the input is less than smallest int88 or\\n     * greater than largest int88).\\n     *\\n     * Counterpart to Solidity's `int88` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - input must fit into 88 bits\\n     */\\n    function toInt88(int256 value) internal pure returns (int88 downcasted) {\\n        downcasted = int88(value);\\n        if (downcasted != value) {\\n            revert SafeCastOverflowedIntDowncast(88, value);\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns the downcasted int80 from int256, reverting on\\n     * overflow (when the input is less than smallest int80 or\\n     * greater than largest int80).\\n     *\\n     * Counterpart to Solidity's `int80` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - input must fit into 80 bits\\n     */\\n    function toInt80(int256 value) internal pure returns (int80 downcasted) {\\n        downcasted = int80(value);\\n        if (downcasted != value) {\\n            revert SafeCastOverflowedIntDowncast(80, value);\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns the downcasted int72 from int256, reverting on\\n     * overflow (when the input is less than smallest int72 or\\n     * greater than largest int72).\\n     *\\n     * Counterpart to Solidity's `int72` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - input must fit into 72 bits\\n     */\\n    function toInt72(int256 value) internal pure returns (int72 downcasted) {\\n        downcasted = int72(value);\\n        if (downcasted != value) {\\n            revert SafeCastOverflowedIntDowncast(72, value);\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns the downcasted int64 from int256, reverting on\\n     * overflow (when the input is less than smallest int64 or\\n     * greater than largest int64).\\n     *\\n     * Counterpart to Solidity's `int64` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - input must fit into 64 bits\\n     */\\n    function toInt64(int256 value) internal pure returns (int64 downcasted) {\\n        downcasted = int64(value);\\n        if (downcasted != value) {\\n            revert SafeCastOverflowedIntDowncast(64, value);\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns the downcasted int56 from int256, reverting on\\n     * overflow (when the input is less than smallest int56 or\\n     * greater than largest int56).\\n     *\\n     * Counterpart to Solidity's `int56` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - input must fit into 56 bits\\n     */\\n    function toInt56(int256 value) internal pure returns (int56 downcasted) {\\n        downcasted = int56(value);\\n        if (downcasted != value) {\\n            revert SafeCastOverflowedIntDowncast(56, value);\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns the downcasted int48 from int256, reverting on\\n     * overflow (when the input is less than smallest int48 or\\n     * greater than largest int48).\\n     *\\n     * Counterpart to Solidity's `int48` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - input must fit into 48 bits\\n     */\\n    function toInt48(int256 value) internal pure returns (int48 downcasted) {\\n        downcasted = int48(value);\\n        if (downcasted != value) {\\n            revert SafeCastOverflowedIntDowncast(48, value);\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns the downcasted int40 from int256, reverting on\\n     * overflow (when the input is less than smallest int40 or\\n     * greater than largest int40).\\n     *\\n     * Counterpart to Solidity's `int40` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - input must fit into 40 bits\\n     */\\n    function toInt40(int256 value) internal pure returns (int40 downcasted) {\\n        downcasted = int40(value);\\n        if (downcasted != value) {\\n            revert SafeCastOverflowedIntDowncast(40, value);\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns the downcasted int32 from int256, reverting on\\n     * overflow (when the input is less than smallest int32 or\\n     * greater than largest int32).\\n     *\\n     * Counterpart to Solidity's `int32` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - input must fit into 32 bits\\n     */\\n    function toInt32(int256 value) internal pure returns (int32 downcasted) {\\n        downcasted = int32(value);\\n        if (downcasted != value) {\\n            revert SafeCastOverflowedIntDowncast(32, value);\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns the downcasted int24 from int256, reverting on\\n     * overflow (when the input is less than smallest int24 or\\n     * greater than largest int24).\\n     *\\n     * Counterpart to Solidity's `int24` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - input must fit into 24 bits\\n     */\\n    function toInt24(int256 value) internal pure returns (int24 downcasted) {\\n        downcasted = int24(value);\\n        if (downcasted != value) {\\n            revert SafeCastOverflowedIntDowncast(24, value);\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns the downcasted int16 from int256, reverting on\\n     * overflow (when the input is less than smallest int16 or\\n     * greater than largest int16).\\n     *\\n     * Counterpart to Solidity's `int16` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - input must fit into 16 bits\\n     */\\n    function toInt16(int256 value) internal pure returns (int16 downcasted) {\\n        downcasted = int16(value);\\n        if (downcasted != value) {\\n            revert SafeCastOverflowedIntDowncast(16, value);\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns the downcasted int8 from int256, reverting on\\n     * overflow (when the input is less than smallest int8 or\\n     * greater than largest int8).\\n     *\\n     * Counterpart to Solidity's `int8` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - input must fit into 8 bits\\n     */\\n    function toInt8(int256 value) internal pure returns (int8 downcasted) {\\n        downcasted = int8(value);\\n        if (downcasted != value) {\\n            revert SafeCastOverflowedIntDowncast(8, value);\\n        }\\n    }\\n\\n    /**\\n     * @dev Converts an unsigned uint256 into a signed int256.\\n     *\\n     * Requirements:\\n     *\\n     * - input must be less than or equal to maxInt256.\\n     */\\n    function toInt256(uint256 value) internal pure returns (int256) {\\n        // Note: Unsafe cast below is okay because `type(int256).max` is guaranteed to be positive\\n        if (value > uint256(type(int256).max)) {\\n            revert SafeCastOverflowedUintToInt(value);\\n        }\\n        return int256(value);\\n    }\\n\\n    /**\\n     * @dev Cast a boolean (false or true) to a uint256 (0 or 1) with no jump.\\n     */\\n    function toUint(bool b) internal pure returns (uint256 u) {\\n        assembly (\\\"memory-safe\\\") {\\n            u := iszero(iszero(b))\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x195533c86d0ef72bcc06456a4f66a9b941f38eb403739b00f21fd7c1abd1ae54\",\"license\":\"MIT\"},\"contracts/Governance.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.29;\\n\\nimport {Ownable} from \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\nimport {IERC20} from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport {SafeERC20} from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\nimport {IERC721} from \\\"@openzeppelin/contracts/token/ERC721/IERC721.sol\\\";\\nimport {SafeCast} from \\\"@openzeppelin/contracts/utils/math/SafeCast.sol\\\";\\nimport {Pausable} from \\\"@openzeppelin/contracts/utils/Pausable.sol\\\";\\n\\nimport {IStaking} from \\\"./interfaces/IStaking.sol\\\";\\n\\n/**\\n * @title A contract for the governance of text-based proposals, with incentives for participants.\\n * This is essentially a simplified version of the OpenZeppelin Governor\\n * (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/5ac4d93ae318cdf6c8a1125dff3a439a2aeabb63/contracts/governance/Governor.sol),\\n * with rewards and other BNB48-specific features implemented.\\n */\\ncontract Governance is Ownable, Pausable {\\n    using SafeCast for uint256;\\n    using SafeERC20 for IERC20;\\n\\n    enum ProposalState {\\n        Active,\\n        Defeated,\\n        Succeeded,\\n        Invalid,\\n        Refunded\\n    }\\n\\n    enum VoteType {\\n        Against,\\n        For,\\n        Abstain\\n    }\\n\\n    struct ProposalCore {\\n        address proposer;\\n        bool proposerRewardClaimed;\\n        uint64 voteStart;\\n        uint64 voteEnd;\\n        uint256 totalStakeAtStart;\\n        uint256 totalReward;\\n        uint256 quorumThresholdBps;\\n        uint256 forVotesThresholdBps;\\n        uint256 proposerRewardBps;\\n        bool refunded;\\n    }\\n\\n    struct VoteInfo {\\n        VoteType voteType;\\n        uint256 weight;\\n        bool rewardClaimed;\\n    }\\n\\n    struct ProposalVote {\\n        uint256 againstVotes;\\n        uint256 forVotes;\\n        uint256 abstainVotes;\\n        mapping(address => VoteInfo) voteInfo;\\n    }\\n\\n    // Events\\n    event ProposalCreated(\\n        uint256 indexed proposalId,\\n        address indexed proposer,\\n        uint64 voteStart,\\n        uint64 voteEnd,\\n        string title,\\n        string description\\n    );\\n    event VoteCast(address indexed voter, uint256 indexed proposalId, uint8 support, uint256 weight, string reason);\\n    event RewardPoolContributed(address indexed caller, uint256 amount);\\n    event RewardClaimed(address indexed caller, uint256 indexed proposalId, uint256 amount);\\n    event InvalidProposalRefunded(address indexed caller, uint256 indexed proposalId);\\n    // Admin events\\n    event VotingPeriodUpdated(address indexed caller, uint256 value);\\n    event QuorumThresholdBpsUpdated(address indexed caller, uint256 value);\\n    event ForVotesThresholdBpsUpdated(address indexed caller, uint256 value);\\n    event MinDepositUpdated(address indexed caller, uint256 amount);\\n    event RewardBpsUpdated(address indexed caller, uint256 value);\\n    event MinRewardUpdated(address indexed caller, uint256 amount);\\n    event MaxRewardUpdated(address indexed caller, uint256 amount);\\n    event ProposerRewardBpsUpdated(address indexed caller, uint256 value);\\n    event RewardPoolRemoved(address indexed caller, uint256 amount);\\n\\n    // The address of the Staking contract.\\n    address public immutable staking;\\n    // The address of the BNB48er NFT contract.\\n    address public immutable bnb48er;\\n\\n    // The period to cast votes after a proposal is created, in seconds.\\n    uint256 public votingPeriod;\\n    // The required percentage of final votes within the total stakes at proposal time, expressed in basis points. 4800 = 48%.\\n    uint256 public quorumThresholdBps;\\n    // The required percentage of \\\"for\\\" votes within the non-abstinent voting stakes, in basis points.\\n    uint256 public forVotesThresholdBps;\\n    // The minimal amount of KOGE to create a proposal.\\n    uint256 public minDeposit;\\n    // The share of the reward pool for each proposal reward in basis points. 480 = 4.8%.\\n    uint256 public rewardBps;\\n    // The minimal amount of KOGE for each proposal reward from the reward pool.\\n    uint256 public minReward;\\n    // The maximal amount of KOGE for each proposal reward from the reward pool.\\n    uint256 public maxReward;\\n    // The proposer's share of each proposal reward in basis points. 480 = 4.8%.\\n    uint256 public proposerRewardBps;\\n\\n    // The total amount of KOGE reserved for proposal rewards.\\n    uint256 public rewardPool;\\n    // tokenId => proposalId\\n    mapping(uint256 => uint256) public bnb48ersInUse;\\n    // proposalId => ProposalCore\\n    mapping(uint256 => ProposalCore) public proposals;\\n    // proposalId => ProposalVote\\n    mapping(uint256 => ProposalVote) public proposalVotes;\\n\\n    // The global proposal ID.\\n    uint256 private _proposalIdCounter;\\n\\n    /**\\n     * @notice Governance constructor.\\n     * @param _staking The address of the Staking contract.\\n     * @param _bnb48er The address of the BNB48er NFT contract.\\n     * @param _votingPeriod The period to cast votes after a proposal is created, in seconds.\\n     * @param _quorumThresholdBps The required percentage of final votes within the total stakes at proposal time, in basis points.\\n     * @param _forVotesThresholdBps The required percentage of \\\"for\\\" votes within the non-abstinent voting stakes, in basis points.\\n     * @param _minDeposit The minimal amount of KOGE to create a proposal.\\n     * @param _rewardBps The share of the reward pool for each proposal reward in basis points.\\n     * @param _minReward The minimal amount of KOGE for each proposal reward from the reward pool.\\n     * @param _maxReward The maximal amount of KOGE for each proposal reward from the reward pool.\\n     * @param _proposerRewardBps The proposer's share of each proposal reward in basis points.\\n     * @param _lastProposalId The last proposal ID from the legacy Governance contract.\\n     */\\n    constructor(\\n        address _staking,\\n        address _bnb48er,\\n        uint256 _votingPeriod,\\n        uint256 _quorumThresholdBps,\\n        uint256 _forVotesThresholdBps,\\n        uint256 _minDeposit,\\n        uint256 _rewardBps,\\n        uint256 _minReward,\\n        uint256 _maxReward,\\n        uint256 _proposerRewardBps,\\n        uint256 _lastProposalId\\n    ) Ownable(msg.sender) {\\n        staking = _staking;\\n        bnb48er = _bnb48er;\\n        votingPeriod = _votingPeriod;\\n        quorumThresholdBps = _quorumThresholdBps;\\n        forVotesThresholdBps = _forVotesThresholdBps;\\n        minDeposit = _minDeposit;\\n        rewardBps = _rewardBps;\\n        minReward = _minReward;\\n        maxReward = _maxReward;\\n        proposerRewardBps = _proposerRewardBps;\\n        _proposalIdCounter = _lastProposalId;\\n    }\\n\\n    /**\\n     * @notice Returns the current state of a proposal.\\n     * @param _proposalId The proposal ID.\\n     */\\n    function state(uint256 _proposalId) public view returns (ProposalState) {\\n        ProposalCore storage proposal = proposals[_proposalId];\\n\\n        if (proposal.refunded) {\\n            return ProposalState.Refunded;\\n        }\\n        uint64 voteStart = proposals[_proposalId].voteStart;\\n        if (voteStart == 0) {\\n            revert(\\\"unknown proposal ID\\\");\\n        }\\n        if (proposals[_proposalId].voteEnd >= block.timestamp) {\\n            return ProposalState.Active;\\n        }\\n        if (!_quorumReached(_proposalId)) {\\n            return ProposalState.Invalid;\\n        }\\n        if (_voteSucceeded(_proposalId)) {\\n            return ProposalState.Succeeded;\\n        }\\n        return ProposalState.Defeated;\\n    }\\n\\n    /**\\n     * @notice Create a new proposal. Vote starts immediately and ends `votingPeriod` blocks afterwards.\\n     * @param _tokenId The token ID for the BNB48er NFT to be associated with the proposal. An NFT can only be associated\\n     * with a single active proposal.\\n     * @param _deposit The amount of KOGE to be paid to the reward pool.\\n     * @param _title The title of the proposal.\\n     * @param _description The content of the proposal.\\n     */\\n    function propose(\\n        uint256 _tokenId,\\n        uint256 _deposit,\\n        string memory _title,\\n        string memory _description\\n    ) external whenNotPaused returns (uint256 proposalId) {\\n        require(IERC721(bnb48er).ownerOf(_tokenId) == msg.sender, \\\"not NFT owner\\\");\\n        require(!isNftInUse(_tokenId), \\\"NFT in use\\\");\\n        require(_deposit >= minDeposit, \\\"deposit not enough\\\");\\n\\n        ++_proposalIdCounter;\\n        proposalId = _proposalIdCounter;\\n\\n        ProposalCore storage proposal = proposals[proposalId];\\n        require(proposal.voteStart == 0, \\\"proposal already exists\\\");\\n\\n        proposal.proposer = msg.sender;\\n        uint64 voteStart = block.timestamp.toUint64();\\n        uint64 voteEnd = voteStart + votingPeriod.toUint64();\\n        proposal.voteStart = voteStart;\\n        proposal.voteEnd = voteEnd;\\n        proposal.totalStakeAtStart = IStaking(staking).totalStakes();\\n        proposal.quorumThresholdBps = quorumThresholdBps;\\n        proposal.forVotesThresholdBps = forVotesThresholdBps;\\n        proposal.proposerRewardBps = proposerRewardBps;\\n\\n        // Calculate reward.\\n        uint256 rewardFromPool = calcRewardFromPool();\\n        proposal.totalReward = rewardFromPool + _deposit;\\n        // The `rewardFromPool` reserved will be refunded if the proposal fails to reach quorum.\\n        rewardPool -= rewardFromPool;\\n\\n        // Update BNB48er in use.\\n        bnb48ersInUse[_tokenId] = proposalId;\\n        // Charge proposal deposit.\\n        IERC20(IStaking(staking).koge()).safeTransferFrom(msg.sender, address(this), _deposit);\\n\\n        emit ProposalCreated(proposalId, msg.sender, voteStart, voteEnd, _title, _description);\\n        return proposalId;\\n    }\\n\\n    /**\\n     * @notice Returns whether the given NFT is being used for an active proposal.\\n     * @param _tokenId The token ID.\\n     */\\n    function isNftInUse(uint256 _tokenId) public view returns (bool) {\\n        uint256 nftProposalId = bnb48ersInUse[_tokenId];\\n        if (nftProposalId != 0) {\\n            ProposalState inUseState = state(nftProposalId);\\n            if (inUseState == ProposalState.Active) {\\n                return true;\\n            }\\n        }\\n        return false;\\n    }\\n\\n    /**\\n     * @dev Calculates the next proposal reward that should be reserved from the reward pool\\n     * based on the current parameters.\\n     */\\n    function calcRewardFromPool() public view returns (uint256) {\\n        if (rewardPool < minReward) {\\n            return rewardPool;\\n        }\\n        uint256 reward = (rewardPool * rewardBps) / 1e4;\\n        if (reward > maxReward) {\\n            return maxReward;\\n        }\\n        if (reward < minReward) {\\n            return minReward;\\n        }\\n        return reward;\\n    }\\n\\n    /**\\n     * @notice Accessor to the proposal vote counts.\\n     * @param _proposalId The proposal ID.\\n     */\\n    function proposalVoteCounts(\\n        uint256 _proposalId\\n    ) public view returns (uint256 _againstVotes, uint256 _forVotes, uint256 _abstainVotes) {\\n        ProposalVote storage proposalVote = proposalVotes[_proposalId];\\n        return (proposalVote.againstVotes, proposalVote.forVotes, proposalVote.abstainVotes);\\n    }\\n\\n    /**\\n     * @notice Accessor to the vote info of a proposal for an account.\\n     * @param _proposalId The proposal ID.\\n     * @param _account The voting account.\\n     */\\n    function proposalVoteInfo(uint256 _proposalId, address _account) public view returns (VoteInfo memory _voteInfo) {\\n        ProposalVote storage proposalVote = proposalVotes[_proposalId];\\n        return proposalVote.voteInfo[_account];\\n    }\\n\\n    /**\\n     * @dev Returns if the amount of votes already cast passes the threshold limit.\\n     * @param _proposalId The proposal ID.\\n     */\\n    function _quorumReached(uint256 _proposalId) internal view returns (bool) {\\n        ProposalCore storage proposal = proposals[_proposalId];\\n        ProposalVote storage proposalVote = proposalVotes[_proposalId];\\n\\n        return\\n            (proposalVote.againstVotes + proposalVote.forVotes + proposalVote.abstainVotes) >=\\n            ((proposal.totalStakeAtStart * proposal.quorumThresholdBps) / 1e4);\\n    }\\n\\n    /**\\n     * @dev Returns if the vote succeeded. Checks \\\"for\\\" votes threshold.\\n     * @param _proposalId The proposal ID.\\n     */\\n    function _voteSucceeded(uint256 _proposalId) internal view returns (bool) {\\n        ProposalCore storage proposal = proposals[_proposalId];\\n        ProposalVote storage proposalVote = proposalVotes[_proposalId];\\n\\n        return\\n            proposalVote.forVotes >=\\n            (((proposalVote.againstVotes + proposalVote.forVotes) * proposal.forVotesThresholdBps) / 1e4);\\n    }\\n\\n    /**\\n     * @notice Casts a vote.\\n     * @param _proposalId The proposal ID.\\n     * @param _support The vote enum type.\\n     * @param _reason The optional reason for the vote.\\n     */\\n    function castVote(\\n        uint256 _proposalId,\\n        uint8 _support,\\n        string memory _reason\\n    ) external whenNotPaused returns (uint256) {\\n        require(state(_proposalId) == ProposalState.Active, \\\"vote not active\\\");\\n\\n        uint256 weight = IStaking(staking).getStake(msg.sender);\\n        _countVote(_proposalId, msg.sender, _support, weight);\\n\\n        emit VoteCast(msg.sender, _proposalId, _support, weight, _reason);\\n\\n        return weight;\\n    }\\n\\n    /**\\n     * @dev Registers a vote with a given support and voting weight.\\n     * @param _proposalId The proposal ID.\\n     * @param _account The voting account.\\n     * @param _support The vote enum type.\\n     * @param _weight The weight of the vote.\\n     */\\n    function _countVote(uint256 _proposalId, address _account, uint8 _support, uint256 _weight) internal {\\n        ProposalVote storage proposalVote = proposalVotes[_proposalId];\\n        VoteInfo storage info = proposalVote.voteInfo[_account];\\n        require(info.weight == 0, \\\"vote already cast\\\");\\n\\n        if (_support == uint8(VoteType.Against)) {\\n            proposalVote.againstVotes += _weight;\\n        } else if (_support == uint8(VoteType.For)) {\\n            proposalVote.forVotes += _weight;\\n        } else if (_support == uint8(VoteType.Abstain)) {\\n            proposalVote.abstainVotes += _weight;\\n        } else {\\n            revert(\\\"invalid value for enum VoteType\\\");\\n        }\\n        info.weight = _weight;\\n        info.voteType = VoteType(_support);\\n    }\\n\\n    /**\\n     * @notice Claims KOGE reward for valid proposals.\\n     * @param _proposalId The proposal ID.\\n     */\\n    function claimReward(uint256 _proposalId) external whenNotPaused {\\n        ProposalCore storage proposal = proposals[_proposalId];\\n        ProposalVote storage proposalVote = proposalVotes[_proposalId];\\n        VoteInfo storage voteInfo = proposalVote.voteInfo[msg.sender];\\n        (bool isProposer, bool isVoter, uint256 claimableAmount) = _getClaimableRewardInfo(\\n            msg.sender,\\n            _proposalId,\\n            proposal,\\n            proposalVote,\\n            voteInfo\\n        );\\n        require(claimableAmount > 0, \\\"no claimable amount\\\");\\n\\n        // Mark claimed\\n        if (isProposer) {\\n            proposal.proposerRewardClaimed = true;\\n        }\\n        if (isVoter) {\\n            voteInfo.rewardClaimed = true;\\n        }\\n\\n        IERC20(IStaking(staking).koge()).safeTransfer(msg.sender, claimableAmount);\\n        emit RewardClaimed(msg.sender, _proposalId, claimableAmount);\\n    }\\n\\n    /**\\n     * @notice Get claimable reward info for an account and a proposal.\\n     * @param _account The account address.\\n     * @param _proposalId The proposal ID.\\n     */\\n    function getClaimableRewardInfo(\\n        address _account,\\n        uint256 _proposalId\\n    ) public view returns (bool isProposer, bool isVoter, uint256 claimableAmount) {\\n        ProposalCore storage proposal = proposals[_proposalId];\\n        ProposalVote storage proposalVote = proposalVotes[_proposalId];\\n        VoteInfo storage voteInfo = proposalVote.voteInfo[_account];\\n        return _getClaimableRewardInfo(_account, _proposalId, proposal, proposalVote, voteInfo);\\n    }\\n\\n    /**\\n     * @dev Internal getter for claimable reward info for an account and a proposal.\\n     * @param _account The account address.\\n     * @param _proposalId The proposal ID.\\n     * @param _proposal The ProposalCore.\\n     * @param _proposalVote The ProposalVote.\\n     * @param _voteInfo The VoteInfo of the account.\\n     */\\n    function _getClaimableRewardInfo(\\n        address _account,\\n        uint256 _proposalId,\\n        ProposalCore storage _proposal,\\n        ProposalVote storage _proposalVote,\\n        VoteInfo storage _voteInfo\\n    ) internal view returns (bool isProposer, bool isVoter, uint256 claimableAmount) {\\n        isProposer = _proposal.proposer == _account;\\n        isVoter = _voteInfo.weight > 0;\\n        ProposalState proposalState = state(_proposalId);\\n        // Proposal invalid or not finalized\\n        if (proposalState != ProposalState.Succeeded && proposalState != ProposalState.Defeated) {\\n            return (isProposer, isVoter, 0);\\n        }\\n        // Proposer already claimed\\n        if (isProposer && _proposal.proposerRewardClaimed) {\\n            return (isProposer, isVoter, 0);\\n        }\\n        // Voter already claimed\\n        if (_voteInfo.weight > 0 && _voteInfo.rewardClaimed) {\\n            return (isProposer, isVoter, 0);\\n        }\\n\\n        uint256 proposerReward = (_proposal.totalReward * _proposal.proposerRewardBps) / 1e4;\\n        claimableAmount =\\n            ((_proposal.totalReward - proposerReward) * _voteInfo.weight) /\\n            (_proposalVote.forVotes + _proposalVote.againstVotes + _proposalVote.abstainVotes);\\n        if (isProposer) {\\n            claimableAmount += proposerReward;\\n        }\\n        return (isProposer, isVoter, claimableAmount);\\n    }\\n\\n    /**\\n     * @notice Refunds KOGE to the reward pool for a proposal that failed to reach quorum.\\n     * @param _proposalId The proposal ID.\\n     */\\n    function refundInvalidProposal(uint256 _proposalId) external whenNotPaused {\\n        ProposalCore storage proposal = proposals[_proposalId];\\n        require(state(_proposalId) == ProposalState.Invalid, \\\"not invalid proposal\\\");\\n\\n        proposal.refunded = true;\\n        rewardPool += proposal.totalReward;\\n\\n        emit InvalidProposalRefunded(msg.sender, _proposalId);\\n    }\\n\\n    /**\\n     * @notice Contributes KOGE to the proposal reward pool.\\n     * @param _amount The amount to contribute.\\n     */\\n    function contributeToRewardPool(uint256 _amount) external whenNotPaused {\\n        rewardPool += _amount;\\n        IERC20(IStaking(staking).koge()).safeTransferFrom(msg.sender, address(this), _amount);\\n        emit RewardPoolContributed(msg.sender, _amount);\\n    }\\n\\n    // -------------------- Admin --------------------\\n\\n    /**\\n     * @dev Sets `votingPeriod`.\\n     * @param _votingPeriod The new `votingPeriod`.\\n     */\\n    function setVotingPeriod(uint256 _votingPeriod) external onlyOwner {\\n        votingPeriod = _votingPeriod;\\n        emit VotingPeriodUpdated(msg.sender, _votingPeriod);\\n    }\\n\\n    /**\\n     * @dev Sets `quorumThresholdBps`.\\n     * @param _quorumThresholdBps The new `quorumThresholdBps`.\\n     */\\n    function setQuorumThresholdBps(uint256 _quorumThresholdBps) external onlyOwner {\\n        quorumThresholdBps = _quorumThresholdBps;\\n        emit QuorumThresholdBpsUpdated(msg.sender, _quorumThresholdBps);\\n    }\\n\\n    /**\\n     * @dev Sets `forVotesThresholdBps`.\\n     * @param _forVotesThresholdBps The new `forVotesThresholdBps`.\\n     */\\n    function setForVotesThresholdBps(uint256 _forVotesThresholdBps) external onlyOwner {\\n        forVotesThresholdBps = _forVotesThresholdBps;\\n        emit ForVotesThresholdBpsUpdated(msg.sender, _forVotesThresholdBps);\\n    }\\n\\n    /**\\n     * @dev Sets `minDeposit`.\\n     * @param _minDeposit The new `minDeposit`.\\n     */\\n    function setMinDeposit(uint256 _minDeposit) external onlyOwner {\\n        minDeposit = _minDeposit;\\n        emit MinDepositUpdated(msg.sender, _minDeposit);\\n    }\\n\\n    /**\\n     * @dev Sets `rewardBps`.\\n     * @param _rewardBps The new `rewardBps`.\\n     */\\n    function setRewardBps(uint256 _rewardBps) external onlyOwner {\\n        rewardBps = _rewardBps;\\n        emit RewardBpsUpdated(msg.sender, _rewardBps);\\n    }\\n\\n    /**\\n     * @dev Sets `minReward`.\\n     * @param _minReward The new `minReward`.\\n     */\\n    function setMinReward(uint256 _minReward) external onlyOwner {\\n        minReward = _minReward;\\n        emit MinRewardUpdated(msg.sender, _minReward);\\n    }\\n\\n    /**\\n     * @dev Sets `maxReward`.\\n     * @param _maxReward The new `maxReward`.\\n     */\\n    function setMaxReward(uint256 _maxReward) external onlyOwner {\\n        maxReward = _maxReward;\\n        emit MaxRewardUpdated(msg.sender, _maxReward);\\n    }\\n\\n    /**\\n     * @dev Sets `proposerRewardBps`.\\n     * @param _proposerRewardBps The new `proposerRewardBps`.\\n     */\\n    function setProposerRewardBps(uint256 _proposerRewardBps) external onlyOwner {\\n        proposerRewardBps = _proposerRewardBps;\\n        emit ProposerRewardBpsUpdated(msg.sender, _proposerRewardBps);\\n    }\\n\\n    /**\\n     * @notice Removes KOGE from the proposal reward pool.\\n     * @param _amount The amount to remove.\\n     */\\n    function removeFromRewardPool(uint256 _amount) external onlyOwner {\\n        rewardPool -= _amount;\\n        IERC20(IStaking(staking).koge()).safeTransfer(msg.sender, _amount);\\n        emit RewardPoolRemoved(msg.sender, _amount);\\n    }\\n\\n    /**\\n     * @notice Pauses the contract.\\n     */\\n    function pause() external onlyOwner {\\n        _pause();\\n    }\\n\\n    /**\\n     * @notice Unpauses the contract.\\n     */\\n    function unpause() external onlyOwner {\\n        _unpause();\\n    }\\n}\\n\",\"keccak256\":\"0x008f2a4962de49f6ad532a1711200737d4edf329df848e3af56dce2751fd931a\",\"license\":\"MIT\"},\"contracts/interfaces/IStaking.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\ninterface IStaking {\\n    function koge() external view returns (address);\\n    function totalStakes() external view returns (uint256);\\n    function getStake(address _user) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x798058f5aac57d928685f5f2956c84e7a39963a0637201dd66d5f823b49f3edb\",\"license\":\"MIT\"}},\"version\":1}","userdoc":{"kind":"user","methods":{"pause()":{"notice":"Pauses the contract."},"unpause()":{"notice":"Unpauses the contract."},"constructor":{"notice":"Governance constructor."},"state(uint256)":{"notice":"Returns the current state of a proposal."},"isNftInUse(uint256)":{"notice":"Returns whether the given NFT is being used for an active proposal."},"claimReward(uint256)":{"notice":"Claims KOGE reward for valid proposals."},"proposalVoteCounts(uint256)":{"notice":"Accessor to the proposal vote counts."},"removeFromRewardPool(uint256)":{"notice":"Removes KOGE from the proposal reward pool."},"castVote(uint256,uint8,string)":{"notice":"Casts a vote."},"refundInvalidProposal(uint256)":{"notice":"Refunds KOGE to the reward pool for a proposal that failed to reach quorum."},"contributeToRewardPool(uint256)":{"notice":"Contributes KOGE to the proposal reward pool."},"proposalVoteInfo(uint256,address)":{"notice":"Accessor to the vote info of a proposal for an account."},"propose(uint256,uint256,string,string)":{"notice":"Create a new proposal. Vote starts immediately and ends `votingPeriod` blocks afterwards."},"getClaimableRewardInfo(address,uint256)":{"notice":"Get claimable reward info for an account and a proposal."}},"version":1},"devdoc":{"kind":"dev","title":"A contract for the governance of text-based proposals, with incentives for participants. This is essentially a simplified version of the OpenZeppelin Governor (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/5ac4d93ae318cdf6c8a1125dff3a439a2aeabb63/contracts/governance/Governor.sol), with rewards and other BNB48-specific features implemented.","errors":{"EnforcedPause()":[{"details":"The operation failed because the contract is paused."}],"ExpectedPause()":[{"details":"The operation failed because the contract is not paused."}],"OwnableInvalidOwner(address)":[{"details":"The owner is not a valid owner account. (eg. `address(0)`)"}],"SafeERC20FailedOperation(address)":[{"details":"An operation with an ERC-20 token failed."}],"OwnableUnauthorizedAccount(address)":[{"details":"The caller account is not authorized to perform an operation."}],"SafeCastOverflowedUintDowncast(uint8,uint256)":[{"details":"Value doesn't fit in an uint of `bits` size."}]},"events":{"Paused(address)":{"details":"Emitted when the pause is triggered by `account`."},"Unpaused(address)":{"details":"Emitted when the pause is lifted by `account`."}},"methods":{"owner()":{"details":"Returns the address of the current owner."},"paused()":{"details":"Returns true if the contract is paused, and false otherwise."},"constructor":{"params":{"_bnb48er":"The address of the BNB48er NFT contract.","_staking":"The address of the Staking contract.","_maxReward":"The maximal amount of KOGE for each proposal reward from the reward pool.","_minReward":"The minimal amount of KOGE for each proposal reward from the reward pool.","_rewardBps":"The share of the reward pool for each proposal reward in basis points.","_minDeposit":"The minimal amount of KOGE to create a proposal.","_votingPeriod":"The period to cast votes after a proposal is created, in seconds.","_lastProposalId":"The last proposal ID from the legacy Governance contract.","_proposerRewardBps":"The proposer's share of each proposal reward in basis points.","_quorumThresholdBps":"The required percentage of final votes within the total stakes at proposal time, in basis points.","_forVotesThresholdBps":"The required percentage of \"for\" votes within the non-abstinent voting stakes, in basis points."}},"state(uint256)":{"params":{"_proposalId":"The proposal ID."}},"isNftInUse(uint256)":{"params":{"_tokenId":"The token ID."}},"renounceOwnership()":{"details":"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner."},"calcRewardFromPool()":{"details":"Calculates the next proposal reward that should be reserved from the reward pool based on the current parameters."},"claimReward(uint256)":{"params":{"_proposalId":"The proposal ID."}},"setMaxReward(uint256)":{"params":{"_maxReward":"The new `maxReward`."},"details":"Sets `maxReward`."},"setMinReward(uint256)":{"params":{"_minReward":"The new `minReward`."},"details":"Sets `minReward`."},"setRewardBps(uint256)":{"params":{"_rewardBps":"The new `rewardBps`."},"details":"Sets `rewardBps`."},"setMinDeposit(uint256)":{"params":{"_minDeposit":"The new `minDeposit`."},"details":"Sets `minDeposit`."},"setVotingPeriod(uint256)":{"params":{"_votingPeriod":"The new `votingPeriod`."},"details":"Sets `votingPeriod`."},"transferOwnership(address)":{"details":"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner."},"proposalVoteCounts(uint256)":{"params":{"_proposalId":"The proposal ID."}},"removeFromRewardPool(uint256)":{"params":{"_amount":"The amount to remove."}},"setProposerRewardBps(uint256)":{"params":{"_proposerRewardBps":"The new `proposerRewardBps`."},"details":"Sets `proposerRewardBps`."},"castVote(uint256,uint8,string)":{"params":{"_reason":"The optional reason for the vote.","_support":"The vote enum type.","_proposalId":"The proposal ID."}},"refundInvalidProposal(uint256)":{"params":{"_proposalId":"The proposal ID."}},"setQuorumThresholdBps(uint256)":{"params":{"_quorumThresholdBps":"The new `quorumThresholdBps`."},"details":"Sets `quorumThresholdBps`."},"contributeToRewardPool(uint256)":{"params":{"_amount":"The amount to contribute."}},"setForVotesThresholdBps(uint256)":{"params":{"_forVotesThresholdBps":"The new `forVotesThresholdBps`."},"details":"Sets `forVotesThresholdBps`."},"proposalVoteInfo(uint256,address)":{"params":{"_account":"The voting account.","_proposalId":"The proposal ID."}},"propose(uint256,uint256,string,string)":{"params":{"_title":"The title of the proposal.","_deposit":"The amount of KOGE to be paid to the reward pool.","_tokenId":"The token ID for the BNB48er NFT to be associated with the proposal. An NFT can only be associated with a single active proposal.","_description":"The content of the proposal."}},"getClaimableRewardInfo(address,uint256)":{"params":{"_account":"The account address.","_proposalId":"The proposal ID."}}},"version":1},"storageLayout":{"types":{"t_bool":{"label":"bool","encoding":"inplace","numberOfBytes":"1"},"t_uint64":{"label":"uint64","encoding":"inplace","numberOfBytes":"8"},"t_address":{"label":"address","encoding":"inplace","numberOfBytes":"20"},"t_uint256":{"label":"uint256","encoding":"inplace","numberOfBytes":"32"},"t_enum(VoteType)2803":{"label":"enum Governance.VoteType","encoding":"inplace","numberOfBytes":"1"},"t_mapping(t_uint256,t_uint256)":{"key":"t_uint256","label":"mapping(uint256 => uint256)","value":"t_uint256","encoding":"mapping","numberOfBytes":"32"},"t_struct(VoteInfo)2832_storage":{"label":"struct Governance.VoteInfo","members":[{"slot":"0","type":"t_enum(VoteType)2803","astId":2827,"label":"voteType","offset":0,"contract":"contracts/Governance.sol:Governance"},{"slot":"1","type":"t_uint256","astId":2829,"label":"weight","offset":0,"contract":"contracts/Governance.sol:Governance"},{"slot":"2","type":"t_bool","astId":2831,"label":"rewardClaimed","offset":0,"contract":"contracts/Governance.sol:Governance"}],"encoding":"inplace","numberOfBytes":"96"},"t_struct(ProposalCore)2824_storage":{"label":"struct Governance.ProposalCore","members":[{"slot":"0","type":"t_address","astId":2805,"label":"proposer","offset":0,"contract":"contracts/Governance.sol:Governance"},{"slot":"0","type":"t_bool","astId":2807,"label":"proposerRewardClaimed","offset":20,"contract":"contracts/Governance.sol:Governance"},{"slot":"0","type":"t_uint64","astId":2809,"label":"voteStart","offset":21,"contract":"contracts/Governance.sol:Governance"},{"slot":"1","type":"t_uint64","astId":2811,"label":"voteEnd","offset":0,"contract":"contracts/Governance.sol:Governance"},{"slot":"2","type":"t_uint256","astId":2813,"label":"totalStakeAtStart","offset":0,"contract":"contracts/Governance.sol:Governance"},{"slot":"3","type":"t_uint256","astId":2815,"label":"totalReward","offset":0,"contract":"contracts/Governance.sol:Governance"},{"slot":"4","type":"t_uint256","astId":2817,"label":"quorumThresholdBps","offset":0,"contract":"contracts/Governance.sol:Governance"},{"slot":"5","type":"t_uint256","astId":2819,"label":"forVotesThresholdBps","offset":0,"contract":"contracts/Governance.sol:Governance"},{"slot":"6","type":"t_uint256","astId":2821,"label":"proposerRewardBps","offset":0,"contract":"contracts/Governance.sol:Governance"},{"slot":"7","type":"t_bool","astId":2823,"label":"refunded","offset":0,"contract":"contracts/Governance.sol:Governance"}],"encoding":"inplace","numberOfBytes":"256"},"t_struct(ProposalVote)2844_storage":{"label":"struct Governance.ProposalVote","members":[{"slot":"0","type":"t_uint256","astId":2834,"label":"againstVotes","offset":0,"contract":"contracts/Governance.sol:Governance"},{"slot":"1","type":"t_uint256","astId":2836,"label":"forVotes","offset":0,"contract":"contracts/Governance.sol:Governance"},{"slot":"2","type":"t_uint256","astId":2838,"label":"abstainVotes","offset":0,"contract":"contracts/Governance.sol:Governance"},{"slot":"3","type":"t_mapping(t_address,t_struct(VoteInfo)2832_storage)","astId":2843,"label":"voteInfo","offset":0,"contract":"contracts/Governance.sol:Governance"}],"encoding":"inplace","numberOfBytes":"128"},"t_mapping(t_address,t_struct(VoteInfo)2832_storage)":{"key":"t_address","label":"mapping(address => struct Governance.VoteInfo)","value":"t_struct(VoteInfo)2832_storage","encoding":"mapping","numberOfBytes":"32"},"t_mapping(t_uint256,t_struct(ProposalCore)2824_storage)":{"key":"t_uint256","label":"mapping(uint256 => struct Governance.ProposalCore)","value":"t_struct(ProposalCore)2824_storage","encoding":"mapping","numberOfBytes":"32"},"t_mapping(t_uint256,t_struct(ProposalVote)2844_storage)":{"key":"t_uint256","label":"mapping(uint256 => struct Governance.ProposalVote)","value":"t_struct(ProposalVote)2844_storage","encoding":"mapping","numberOfBytes":"32"}},"storage":[{"slot":"0","type":"t_address","astId":8,"label":"_owner","offset":0,"contract":"contracts/Governance.sol:Governance"},{"slot":"0","type":"t_bool","astId":880,"label":"_paused","offset":20,"contract":"contracts/Governance.sol:Governance"},{"slot":"1","type":"t_uint256","astId":2950,"label":"votingPeriod","offset":0,"contract":"contracts/Governance.sol:Governance"},{"slot":"2","type":"t_uint256","astId":2952,"label":"quorumThresholdBps","offset":0,"contract":"contracts/Governance.sol:Governance"},{"slot":"3","type":"t_uint256","astId":2954,"label":"forVotesThresholdBps","offset":0,"contract":"contracts/Governance.sol:Governance"},{"slot":"4","type":"t_uint256","astId":2956,"label":"minDeposit","offset":0,"contract":"contracts/Governance.sol:Governance"},{"slot":"5","type":"t_uint256","astId":2958,"label":"rewardBps","offset":0,"contract":"contracts/Governance.sol:Governance"},{"slot":"6","type":"t_uint256","astId":2960,"label":"minReward","offset":0,"contract":"contracts/Governance.sol:Governance"},{"slot":"7","type":"t_uint256","astId":2962,"label":"maxReward","offset":0,"contract":"contracts/Governance.sol:Governance"},{"slot":"8","type":"t_uint256","astId":2964,"label":"proposerRewardBps","offset":0,"contract":"contracts/Governance.sol:Governance"},{"slot":"9","type":"t_uint256","astId":2966,"label":"rewardPool","offset":0,"contract":"contracts/Governance.sol:Governance"},{"slot":"10","type":"t_mapping(t_uint256,t_uint256)","astId":2970,"label":"bnb48ersInUse","offset":0,"contract":"contracts/Governance.sol:Governance"},{"slot":"11","type":"t_mapping(t_uint256,t_struct(ProposalCore)2824_storage)","astId":2975,"label":"proposals","offset":0,"contract":"contracts/Governance.sol:Governance"},{"slot":"12","type":"t_mapping(t_uint256,t_struct(ProposalVote)2844_storage)","astId":2980,"label":"proposalVotes","offset":0,"contract":"contracts/Governance.sol:Governance"},{"slot":"13","type":"t_uint256","astId":2982,"label":"_proposalIdCounter","offset":0,"contract":"contracts/Governance.sol:Governance"}]},"transientStorageLayout":{"types":null,"storage":[]},"evm":{"bytecode":{"object":"60c03461015f57601f611de438819003918201601f19168301916001600160401b03831184841017610164578084926101609460405283398101031261015f576100488161017a565b906100556020820161017a565b9060408101516060820151608083015160a084015160c08501519160e0860151936101008701519561014061012089015198015198331561014957600080546040519c9133906001600160a01b038316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a36001600160a81b0319163360ff60a01b19161760005560805260a052600155600255600355600455600555600655600755600855600d55611c55908161018f823960805181818161052f0152818161099401528181610b9a01528181610ef4015281816112740152611436015260a0518181816101f70152610a340152f35b631e4fbdf760e01b600052600060045260246000fd5b600080fd5b634e487b7160e01b600052604160045260246000fd5b51906001600160a01b038216820361015f5756fe608080604052600436101561001357600080fd5b60003560e01c908163013cf08b146115c45750806301ea83ea1461092357806302a251a3146115a65780630507377e146114d45780630a300b09146113f65780630a542fa7146113a85780630d9b22261461137c5780631a35c6021461135e57806325c33e1314611310578063287a66c9146112345780633bec7f5b146112165780633e4f49e6146111e75780633f4ba83a1461117857806341b3d1851461115a578063428548b81461110c578063470b762214610e7657806347ee3b95146109b85780634cf088d914610974578063544ffc9c146109235780635c975abb146108fd57806366666aa9146108df57806366a78e6c146108c15780636f7af91f14610873578063715018a61461080d57806382328ffc146107ef5780638456cb591461078f5780638da5cb5b146107685780638fcc9cfb1461071a57806391e71e26146106cc578063a60c117c14610658578063ae169a50146104a7578063b6a1cb2b14610459578063ba16d6001461043b578063bd149d711461041d578063d301c89d146103f5578063dd2fc2b014610327578063ea0217cf146102d9578063f2fde38b14610243578063f3d1202d146102205763f5be257d146101d757600080fd5b3461021b57600036600319011261021b5760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b600080fd5b3461021b57600036600319011261021b57602061023b611957565b604051908152f35b3461021b57602036600319011261021b576001600160a01b0361026461171f565b61026c611a00565b1680156102c3576001600160a01b036000548273ffffffffffffffffffffffffffffffffffffffff19821617600055167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3005b631e4fbdf760e01b600052600060045260246000fd5b3461021b57602036600319011261021b576004356102f5611a00565b806001556040519081527fb425f2f96d1b8d8416bf9a28254b80398b92febc9cc90ec2c147e704385e577b60203392a2005b3461021b57604036600319011261021b576024356001600160a01b038116810361021b57604090600082805161035c81611674565b8281528260208201520152600435600052600c602052600382600020016001600160a01b036000921682526020522060405161039781611674565b60ff8254169060038210156103df57606092828252604060ff600260018401549360208601948552015416920191151582526040519283525160208301525115156040820152f35b634e487b7160e01b600052602160045260246000fd5b3461021b57602036600319011261021b576020610413600435611909565b6040519015158152f35b3461021b57600036600319011261021b576020600854604051908152f35b3461021b57600036600319011261021b576020600654604051908152f35b3461021b57602036600319011261021b57600435610475611a00565b806006556040519081527f4bbac275695f9391c6b8166c70b337feb1adcbd278175a119aaf59dce5ffe49060203392a2005b3461021b57602036600319011261021b576004356104c3611998565b80600052600b602052604060002081600052600c60205260406000206001600160a01b0333166000526003810160205261050560406000208092848633611a95565b9390918415610613576105fc575b506105e8575b506040516368bfce9960e01b81526020816004817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa9081156105dc5761057f9183916000916105ad575b506001600160a01b03339116611a29565b6040519081527ff01da32686223933d8a18a391060918c7f11a3648639edd87ae013e2e273174360203392a3005b6105cf915060203d6020116105d5575b6105c781836116a6565b810190611742565b8561056e565b503d6105bd565b6040513d6000823e3d90fd5b600201805460ff1916600117905582610519565b600160a01b60ff60a01b1982541617905584610513565b60405162461bcd60e51b815260206004820152601360248201527f6e6f20636c61696d61626c6520616d6f756e74000000000000000000000000006044820152606490fd5b3461021b57604036600319011261021b5760606106b561067661171f565b60243580600052600b602052604060002081600052600c6020526040600020916001600160a01b03841660005260038301602052604060002093611a95565b906040519215158352151560208301526040820152f35b3461021b57602036600319011261021b576004356106e8611a00565b806008556040519081527f9d45ce5169732da6af34329ae6e425c283cdad15df3263a3200b9e0e1191ee5260203392a2005b3461021b57602036600319011261021b57600435610736611a00565b806004556040519081527f0f48d517989455cd80ed52427e80553e66f9b69fd5cee8e26bd1a1f9c364fba660203392a2005b3461021b57600036600319011261021b5760206001600160a01b0360005416604051908152f35b3461021b57600036600319011261021b576107a8611a00565b6107b0611998565b600160a01b60ff60a01b1960005416176000557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586020604051338152a1005b3461021b57600036600319011261021b576020600554604051908152f35b3461021b57600036600319011261021b57610826611a00565b60006001600160a01b03815473ffffffffffffffffffffffffffffffffffffffff1981168355167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b3461021b57602036600319011261021b5760043561088f611a00565b806002556040519081527f1f8d3c40deb0ed6be05c1490c226e6d0b0f23cab543f975fae8c3a615d49eed360203392a2005b3461021b57600036600319011261021b576020600754604051908152f35b3461021b57600036600319011261021b576020600954604051908152f35b3461021b57600036600319011261021b57602060ff60005460a01c166040519015158152f35b3461021b57602036600319011261021b57600435600052600c6020526040600020805461097060026001840154930154604051938493846040919493926060820195825260208201520152565b0390f35b3461021b57600036600319011261021b5760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b3461021b57608036600319011261021b5760243560043560443567ffffffffffffffff811161021b576109ef9036906004016116c8565b60643567ffffffffffffffff811161021b57610a0f9036906004016116c8565b90610a18611998565b6040516331a9108f60e11b8152600481018490526020816024817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa9081156105dc57600091610e57575b506001600160a01b0333911603610e1257610a8783611909565b610dcd576004548410610d8857600d546000198114610d2d576001019283600d5583600052600b602052604060002067ffffffffffffffff815460a81c16610d43573373ffffffffffffffffffffffffffffffffffffffff19825416178155610aef42611a60565b90610afb600154611a60565b9067ffffffffffffffff808416921682019267ffffffffffffffff8411610d2d5781547fffffff0000000000000000ffffffffffffffffffffffffffffffffffffffffff1660a89190911b7cffffffffffffffff0000000000000000000000000000000000000000001617815560018101805467ffffffffffffffff191667ffffffffffffffff94909416938417905560405163bf9befb160e01b81527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031691602082600481865afa80156105dc578a92600091610cef575b506020939282610c2492600260049a95015560025489820155600354600582015560085460068201556003610c19610c12611957565b9384611735565b910155600954611761565b600955600052600a825287604060002055604051948580926368bfce9960e01b82525afa9687156105dc57610cb88795610c9b610cc79360209b7fd8ddd70cf5ecd6d6017ed4145b845744e8a96f0800df501d124d1b4ddf56a2a998600091610cd2575b5030906001600160a01b033391166119b8565b60405194859485528a8501526080604085015260808401906118c8565b828103606084015233966118c8565b0390a3604051908152f35b610ce991508d3d8f116105d5576105c781836116a6565b8d610c88565b93925050946020833d602011610d25575b81610d0d602093836116a6565b8101031261021b579151919490918991906020610bdc565b3d9150610d00565b634e487b7160e01b600052601160045260246000fd5b60405162461bcd60e51b815260206004820152601760248201527f70726f706f73616c20616c7265616479206578697374730000000000000000006044820152606490fd5b60405162461bcd60e51b815260206004820152601260248201527f6465706f736974206e6f7420656e6f75676800000000000000000000000000006044820152606490fd5b60405162461bcd60e51b815260206004820152600a60248201527f4e465420696e20757365000000000000000000000000000000000000000000006044820152606490fd5b60405162461bcd60e51b815260206004820152600d60248201527f6e6f74204e4654206f776e6572000000000000000000000000000000000000006044820152606490fd5b610e70915060203d6020116105d5576105c781836116a6565b85610a6d565b3461021b57606036600319011261021b576004356024359060ff821680920361021b5760443567ffffffffffffffff811161021b57610eb99036906004016116c8565b90610ec2611998565b610ecb8161176e565b60058110156103df576110c7576040516303d3b32360e51b8152336004820152916020836024817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa9283156105dc57600093611090575b5081600052600c6020526040600020604060006001600160a01b033316815260038301602052209060018201805461104b57859187610fcf57610f71838254611735565b90555b5560038510156103df576020947fb8e138887d0aa13bab447e82de9d5c1777041ecd21ca36ba824ff1e6c07ddda4918160ff1982541617905560405190815284868201526060604082015280610cc7339460608301906118c8565b60018803610fec57600101610fe5838254611735565b9055610f74565b915060028703611006576002869201610fe5838254611735565b60405162461bcd60e51b815260206004820152601f60248201527f696e76616c69642076616c756520666f7220656e756d20566f746554797065006044820152606490fd5b60405162461bcd60e51b815260206004820152601160248201527f766f746520616c726561647920636173740000000000000000000000000000006044820152606490fd5b90926020823d6020116110bf575b816110ab602093836116a6565b810103126110bc5750519184610f2d565b80fd5b3d915061109e565b60405162461bcd60e51b815260206004820152600f60248201527f766f7465206e6f742061637469766500000000000000000000000000000000006044820152606490fd5b3461021b57602036600319011261021b57600435611128611a00565b806003556040519081527fbafdea067f81b214052ed0f40d39cd7d056ec2cb017f6b575f9addc4a54abe6360203392a2005b3461021b57600036600319011261021b576020600454604051908152f35b3461021b57600036600319011261021b57611191611a00565b60005460ff8160a01c16156111d65760ff60a01b19166000557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6020604051338152a1005b638dfc202b60e01b60005260046000fd5b3461021b57602036600319011261021b5761120360043561176e565b60405160058210156103df576020918152f35b3461021b57600036600319011261021b576020600254604051908152f35b3461021b57602036600319011261021b57600435611250611a00565b61125c81600954611761565b6009556040516368bfce9960e01b81526020816004817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa9081156105dc576112c39183916000916112f157506001600160a01b03339116611a29565b6040519081527ff157e68e2245c70cbc79c5da7477f57616bf886825f65d57b9ff756847672e7b60203392a2005b61130a915060203d6020116105d5576105c781836116a6565b8461056e565b3461021b57602036600319011261021b5760043561132c611a00565b806007556040519081527fbc32502cec79c9838d553dcb8fbff010442b820c0648512429a9b8fdcda05d5860203392a2005b3461021b57600036600319011261021b576020600354604051908152f35b3461021b57602036600319011261021b57600435600052600a6020526020604060002054604051908152f35b3461021b57602036600319011261021b576004356113c4611a00565b806005556040519081527f01e1bd213446551b865be02b533d852d27c7d7ba6a95013ddcd85d9146fe5a7760203392a2005b3461021b57602036600319011261021b57600435611412611998565b61141e81600954611735565b6009556040516368bfce9960e01b81526020816004817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa9081156105dc576114879183916000916114b5575030906001600160a01b033391166119b8565b6040519081527fc8b1cd545919a25e3c6ccfef8cd44d97376832801c6a7c7bbefdb3cee824edd860203392a2005b6114ce915060203d6020116105d5576105c781836116a6565b84610c88565b3461021b57602036600319011261021b576004356114f0611998565b80600052600b60205260406000206115078261176e565b60058110156103df576003036115615760038160076115369301600160ff198254161790550154600954611735565b600955337fddd8ea0b68d501f3fec76e2e93b695c2a332f0099b4e6290a0c75c51ec8063f7600080a3005b60405162461bcd60e51b815260206004820152601460248201527f6e6f7420696e76616c69642070726f706f73616c0000000000000000000000006044820152606490fd5b3461021b57600036600319011261021b576020600154604051908152f35b3461021b57602036600319011261021b5761014090600435600052600b602052604060002080549067ffffffffffffffff6001820154166002820154600383015460048401549160058501549367ffffffffffffffff60ff6007600689015498015416976001600160a01b0381168a5260ff8160a01c16151560208b015260a81c1660408901526060880152608087015260a086015260c085015260e08401526101008301521515610120820152f35b6060810190811067ffffffffffffffff82111761169057604052565b634e487b7160e01b600052604160045260246000fd5b90601f8019910116810190811067ffffffffffffffff82111761169057604052565b81601f8201121561021b5780359067ffffffffffffffff821161169057604051926116fd601f8401601f1916602001856116a6565b8284526020838301011161021b57816000926020809301838601378301015290565b600435906001600160a01b038216820361021b57565b91908201809211610d2d57565b9081602091031261021b57516001600160a01b038116810361021b5790565b91908203918211610d2d57565b80600052600b60205260ff600760406000200154166118c25780600052600b60205267ffffffffffffffff60406000205460a81c161561187d5780600052600b60205267ffffffffffffffff600160406000200154164211156118775780600052600b602052604060002081600052600c60205261271061181c61180b604060002060026118028254600184015490611735565b91015490611735565b926004600282015491015490611944565b04116118715780600052600b602052604060002090600052600c60205261271061186060406000209260056118576001860154809654611735565b91015490611944565b04111561186c57600190565b600290565b50600390565b50600090565b60405162461bcd60e51b815260206004820152601360248201527f756e6b6e6f776e2070726f706f73616c204944000000000000000000000000006044820152606490fd5b50600490565b919082519283825260005b8481106118f4575050826000602080949584010152601f8019910116010190565b806020809284010151828286010152016118d3565b600052600a602052604060002054806119225750600090565b61192b9061176e565b60058110156103df571561193f5738611877565b600190565b81810292918115918404141715610d2d57565b6009546006549081811061198d576119756127109160055490611944565b0490600754808311611992575080821061198d575090565b905090565b91505090565b60ff60005460a01c166119a757565b63d93c066560e01b60005260046000fd5b9091926001600160a01b036119fe9481604051956323b872dd60e01b60208801521660248601521660448401526064830152606482526119f96084836116a6565b611bc7565b565b6001600160a01b03600054163303611a1457565b63118cdaa760e01b6000523360045260246000fd5b6119fe926001600160a01b036040519363a9059cbb60e01b60208601521660248401526044830152604482526119f96064836116a6565b67ffffffffffffffff8111611a7c5767ffffffffffffffff1690565b6306dfcc6560e41b600052604060045260245260446000fd5b94929190936001600160a01b03825496166001600160a01b038716149460018201549182151597611ac6899361176e565b60058110156103df5760028114159081611bbb575b50611bad57879081611b9f575b50611b925781611b83575b50611b7857611b25611b3891611b20612710611b186006600388015497015487611944565b048095611761565b611944565b9260026118026001830154835490611735565b8015611b62578492048094611b4f575b5050929190565b611b5a929450611735565b913880611b48565b634e487b7160e01b600052601260045260246000fd5b505050909190600090565b60ff9150600201541638611af3565b5050505050909190600090565b60ff915060a01c1638611ae8565b505050505050909190600090565b60019150141538611adb565b906000602091828151910182855af1156105dc576000513d611c1657506001600160a01b0381163b155b611bf85750565b6001600160a01b0390635274afe760e01b6000521660045260246000fd5b60011415611bf156fea26469706673582212209f8ee8846f8ac19a7edb2820c438d9aeb25dc03d9936fa3761b4b03f1e1a059d64736f6c634300081d0033","sourceMap":"935:20584:11:-:0;;;;;;;;;;;;;-1:-1:-1;;935:20584:11;;;;-1:-1:-1;;;;;935:20584:11;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6124:10;;1273:26:0;1269:95;;-1:-1:-1;935:20584:11;;;;;;6124:10;;-1:-1:-1;;;;;935:20584:11;;;3052:40:0;;-1:-1:-1;3052:40:0;-1:-1:-1;;;;;;935:20584:11;6124:10;-1:-1:-1;;;;935:20584:11;;-1:-1:-1;935:20584:11;;6146:18;935:20584;6174:18;935:20584;;6240:40;935:20584;6290:44;935:20584;6344:24;935:20584;6378:22;935:20584;6410:22;935:20584;6442:22;935:20584;6474:38;935:20584;6522:36;935:20584;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1269:95:0;1322:31;;;-1:-1:-1;1322:31:0;-1:-1:-1;1322:31:0;935:20584:11;;-1:-1:-1;1322:31:0;935:20584:11;-1:-1:-1;935:20584:11;;;;;;-1:-1:-1;935:20584:11;;;;;-1:-1:-1;935:20584:11;;;;-1:-1:-1;;;;;935:20584:11;;;;;;:::o","linkReferences":{}},"deployedBytecode":{"object":"608080604052600436101561001357600080fd5b60003560e01c908163013cf08b146115c45750806301ea83ea1461092357806302a251a3146115a65780630507377e146114d45780630a300b09146113f65780630a542fa7146113a85780630d9b22261461137c5780631a35c6021461135e57806325c33e1314611310578063287a66c9146112345780633bec7f5b146112165780633e4f49e6146111e75780633f4ba83a1461117857806341b3d1851461115a578063428548b81461110c578063470b762214610e7657806347ee3b95146109b85780634cf088d914610974578063544ffc9c146109235780635c975abb146108fd57806366666aa9146108df57806366a78e6c146108c15780636f7af91f14610873578063715018a61461080d57806382328ffc146107ef5780638456cb591461078f5780638da5cb5b146107685780638fcc9cfb1461071a57806391e71e26146106cc578063a60c117c14610658578063ae169a50146104a7578063b6a1cb2b14610459578063ba16d6001461043b578063bd149d711461041d578063d301c89d146103f5578063dd2fc2b014610327578063ea0217cf146102d9578063f2fde38b14610243578063f3d1202d146102205763f5be257d146101d757600080fd5b3461021b57600036600319011261021b5760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b600080fd5b3461021b57600036600319011261021b57602061023b611957565b604051908152f35b3461021b57602036600319011261021b576001600160a01b0361026461171f565b61026c611a00565b1680156102c3576001600160a01b036000548273ffffffffffffffffffffffffffffffffffffffff19821617600055167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3005b631e4fbdf760e01b600052600060045260246000fd5b3461021b57602036600319011261021b576004356102f5611a00565b806001556040519081527fb425f2f96d1b8d8416bf9a28254b80398b92febc9cc90ec2c147e704385e577b60203392a2005b3461021b57604036600319011261021b576024356001600160a01b038116810361021b57604090600082805161035c81611674565b8281528260208201520152600435600052600c602052600382600020016001600160a01b036000921682526020522060405161039781611674565b60ff8254169060038210156103df57606092828252604060ff600260018401549360208601948552015416920191151582526040519283525160208301525115156040820152f35b634e487b7160e01b600052602160045260246000fd5b3461021b57602036600319011261021b576020610413600435611909565b6040519015158152f35b3461021b57600036600319011261021b576020600854604051908152f35b3461021b57600036600319011261021b576020600654604051908152f35b3461021b57602036600319011261021b57600435610475611a00565b806006556040519081527f4bbac275695f9391c6b8166c70b337feb1adcbd278175a119aaf59dce5ffe49060203392a2005b3461021b57602036600319011261021b576004356104c3611998565b80600052600b602052604060002081600052600c60205260406000206001600160a01b0333166000526003810160205261050560406000208092848633611a95565b9390918415610613576105fc575b506105e8575b506040516368bfce9960e01b81526020816004817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa9081156105dc5761057f9183916000916105ad575b506001600160a01b03339116611a29565b6040519081527ff01da32686223933d8a18a391060918c7f11a3648639edd87ae013e2e273174360203392a3005b6105cf915060203d6020116105d5575b6105c781836116a6565b810190611742565b8561056e565b503d6105bd565b6040513d6000823e3d90fd5b600201805460ff1916600117905582610519565b600160a01b60ff60a01b1982541617905584610513565b60405162461bcd60e51b815260206004820152601360248201527f6e6f20636c61696d61626c6520616d6f756e74000000000000000000000000006044820152606490fd5b3461021b57604036600319011261021b5760606106b561067661171f565b60243580600052600b602052604060002081600052600c6020526040600020916001600160a01b03841660005260038301602052604060002093611a95565b906040519215158352151560208301526040820152f35b3461021b57602036600319011261021b576004356106e8611a00565b806008556040519081527f9d45ce5169732da6af34329ae6e425c283cdad15df3263a3200b9e0e1191ee5260203392a2005b3461021b57602036600319011261021b57600435610736611a00565b806004556040519081527f0f48d517989455cd80ed52427e80553e66f9b69fd5cee8e26bd1a1f9c364fba660203392a2005b3461021b57600036600319011261021b5760206001600160a01b0360005416604051908152f35b3461021b57600036600319011261021b576107a8611a00565b6107b0611998565b600160a01b60ff60a01b1960005416176000557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586020604051338152a1005b3461021b57600036600319011261021b576020600554604051908152f35b3461021b57600036600319011261021b57610826611a00565b60006001600160a01b03815473ffffffffffffffffffffffffffffffffffffffff1981168355167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b3461021b57602036600319011261021b5760043561088f611a00565b806002556040519081527f1f8d3c40deb0ed6be05c1490c226e6d0b0f23cab543f975fae8c3a615d49eed360203392a2005b3461021b57600036600319011261021b576020600754604051908152f35b3461021b57600036600319011261021b576020600954604051908152f35b3461021b57600036600319011261021b57602060ff60005460a01c166040519015158152f35b3461021b57602036600319011261021b57600435600052600c6020526040600020805461097060026001840154930154604051938493846040919493926060820195825260208201520152565b0390f35b3461021b57600036600319011261021b5760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b3461021b57608036600319011261021b5760243560043560443567ffffffffffffffff811161021b576109ef9036906004016116c8565b60643567ffffffffffffffff811161021b57610a0f9036906004016116c8565b90610a18611998565b6040516331a9108f60e11b8152600481018490526020816024817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa9081156105dc57600091610e57575b506001600160a01b0333911603610e1257610a8783611909565b610dcd576004548410610d8857600d546000198114610d2d576001019283600d5583600052600b602052604060002067ffffffffffffffff815460a81c16610d43573373ffffffffffffffffffffffffffffffffffffffff19825416178155610aef42611a60565b90610afb600154611a60565b9067ffffffffffffffff808416921682019267ffffffffffffffff8411610d2d5781547fffffff0000000000000000ffffffffffffffffffffffffffffffffffffffffff1660a89190911b7cffffffffffffffff0000000000000000000000000000000000000000001617815560018101805467ffffffffffffffff191667ffffffffffffffff94909416938417905560405163bf9befb160e01b81527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031691602082600481865afa80156105dc578a92600091610cef575b506020939282610c2492600260049a95015560025489820155600354600582015560085460068201556003610c19610c12611957565b9384611735565b910155600954611761565b600955600052600a825287604060002055604051948580926368bfce9960e01b82525afa9687156105dc57610cb88795610c9b610cc79360209b7fd8ddd70cf5ecd6d6017ed4145b845744e8a96f0800df501d124d1b4ddf56a2a998600091610cd2575b5030906001600160a01b033391166119b8565b60405194859485528a8501526080604085015260808401906118c8565b828103606084015233966118c8565b0390a3604051908152f35b610ce991508d3d8f116105d5576105c781836116a6565b8d610c88565b93925050946020833d602011610d25575b81610d0d602093836116a6565b8101031261021b579151919490918991906020610bdc565b3d9150610d00565b634e487b7160e01b600052601160045260246000fd5b60405162461bcd60e51b815260206004820152601760248201527f70726f706f73616c20616c7265616479206578697374730000000000000000006044820152606490fd5b60405162461bcd60e51b815260206004820152601260248201527f6465706f736974206e6f7420656e6f75676800000000000000000000000000006044820152606490fd5b60405162461bcd60e51b815260206004820152600a60248201527f4e465420696e20757365000000000000000000000000000000000000000000006044820152606490fd5b60405162461bcd60e51b815260206004820152600d60248201527f6e6f74204e4654206f776e6572000000000000000000000000000000000000006044820152606490fd5b610e70915060203d6020116105d5576105c781836116a6565b85610a6d565b3461021b57606036600319011261021b576004356024359060ff821680920361021b5760443567ffffffffffffffff811161021b57610eb99036906004016116c8565b90610ec2611998565b610ecb8161176e565b60058110156103df576110c7576040516303d3b32360e51b8152336004820152916020836024817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa9283156105dc57600093611090575b5081600052600c6020526040600020604060006001600160a01b033316815260038301602052209060018201805461104b57859187610fcf57610f71838254611735565b90555b5560038510156103df576020947fb8e138887d0aa13bab447e82de9d5c1777041ecd21ca36ba824ff1e6c07ddda4918160ff1982541617905560405190815284868201526060604082015280610cc7339460608301906118c8565b60018803610fec57600101610fe5838254611735565b9055610f74565b915060028703611006576002869201610fe5838254611735565b60405162461bcd60e51b815260206004820152601f60248201527f696e76616c69642076616c756520666f7220656e756d20566f746554797065006044820152606490fd5b60405162461bcd60e51b815260206004820152601160248201527f766f746520616c726561647920636173740000000000000000000000000000006044820152606490fd5b90926020823d6020116110bf575b816110ab602093836116a6565b810103126110bc5750519184610f2d565b80fd5b3d915061109e565b60405162461bcd60e51b815260206004820152600f60248201527f766f7465206e6f742061637469766500000000000000000000000000000000006044820152606490fd5b3461021b57602036600319011261021b57600435611128611a00565b806003556040519081527fbafdea067f81b214052ed0f40d39cd7d056ec2cb017f6b575f9addc4a54abe6360203392a2005b3461021b57600036600319011261021b576020600454604051908152f35b3461021b57600036600319011261021b57611191611a00565b60005460ff8160a01c16156111d65760ff60a01b19166000557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6020604051338152a1005b638dfc202b60e01b60005260046000fd5b3461021b57602036600319011261021b5761120360043561176e565b60405160058210156103df576020918152f35b3461021b57600036600319011261021b576020600254604051908152f35b3461021b57602036600319011261021b57600435611250611a00565b61125c81600954611761565b6009556040516368bfce9960e01b81526020816004817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa9081156105dc576112c39183916000916112f157506001600160a01b03339116611a29565b6040519081527ff157e68e2245c70cbc79c5da7477f57616bf886825f65d57b9ff756847672e7b60203392a2005b61130a915060203d6020116105d5576105c781836116a6565b8461056e565b3461021b57602036600319011261021b5760043561132c611a00565b806007556040519081527fbc32502cec79c9838d553dcb8fbff010442b820c0648512429a9b8fdcda05d5860203392a2005b3461021b57600036600319011261021b576020600354604051908152f35b3461021b57602036600319011261021b57600435600052600a6020526020604060002054604051908152f35b3461021b57602036600319011261021b576004356113c4611a00565b806005556040519081527f01e1bd213446551b865be02b533d852d27c7d7ba6a95013ddcd85d9146fe5a7760203392a2005b3461021b57602036600319011261021b57600435611412611998565b61141e81600954611735565b6009556040516368bfce9960e01b81526020816004817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa9081156105dc576114879183916000916114b5575030906001600160a01b033391166119b8565b6040519081527fc8b1cd545919a25e3c6ccfef8cd44d97376832801c6a7c7bbefdb3cee824edd860203392a2005b6114ce915060203d6020116105d5576105c781836116a6565b84610c88565b3461021b57602036600319011261021b576004356114f0611998565b80600052600b60205260406000206115078261176e565b60058110156103df576003036115615760038160076115369301600160ff198254161790550154600954611735565b600955337fddd8ea0b68d501f3fec76e2e93b695c2a332f0099b4e6290a0c75c51ec8063f7600080a3005b60405162461bcd60e51b815260206004820152601460248201527f6e6f7420696e76616c69642070726f706f73616c0000000000000000000000006044820152606490fd5b3461021b57600036600319011261021b576020600154604051908152f35b3461021b57602036600319011261021b5761014090600435600052600b602052604060002080549067ffffffffffffffff6001820154166002820154600383015460048401549160058501549367ffffffffffffffff60ff6007600689015498015416976001600160a01b0381168a5260ff8160a01c16151560208b015260a81c1660408901526060880152608087015260a086015260c085015260e08401526101008301521515610120820152f35b6060810190811067ffffffffffffffff82111761169057604052565b634e487b7160e01b600052604160045260246000fd5b90601f8019910116810190811067ffffffffffffffff82111761169057604052565b81601f8201121561021b5780359067ffffffffffffffff821161169057604051926116fd601f8401601f1916602001856116a6565b8284526020838301011161021b57816000926020809301838601378301015290565b600435906001600160a01b038216820361021b57565b91908201809211610d2d57565b9081602091031261021b57516001600160a01b038116810361021b5790565b91908203918211610d2d57565b80600052600b60205260ff600760406000200154166118c25780600052600b60205267ffffffffffffffff60406000205460a81c161561187d5780600052600b60205267ffffffffffffffff600160406000200154164211156118775780600052600b602052604060002081600052600c60205261271061181c61180b604060002060026118028254600184015490611735565b91015490611735565b926004600282015491015490611944565b04116118715780600052600b602052604060002090600052600c60205261271061186060406000209260056118576001860154809654611735565b91015490611944565b04111561186c57600190565b600290565b50600390565b50600090565b60405162461bcd60e51b815260206004820152601360248201527f756e6b6e6f776e2070726f706f73616c204944000000000000000000000000006044820152606490fd5b50600490565b919082519283825260005b8481106118f4575050826000602080949584010152601f8019910116010190565b806020809284010151828286010152016118d3565b600052600a602052604060002054806119225750600090565b61192b9061176e565b60058110156103df571561193f5738611877565b600190565b81810292918115918404141715610d2d57565b6009546006549081811061198d576119756127109160055490611944565b0490600754808311611992575080821061198d575090565b905090565b91505090565b60ff60005460a01c166119a757565b63d93c066560e01b60005260046000fd5b9091926001600160a01b036119fe9481604051956323b872dd60e01b60208801521660248601521660448401526064830152606482526119f96084836116a6565b611bc7565b565b6001600160a01b03600054163303611a1457565b63118cdaa760e01b6000523360045260246000fd5b6119fe926001600160a01b036040519363a9059cbb60e01b60208601521660248401526044830152604482526119f96064836116a6565b67ffffffffffffffff8111611a7c5767ffffffffffffffff1690565b6306dfcc6560e41b600052604060045260245260446000fd5b94929190936001600160a01b03825496166001600160a01b038716149460018201549182151597611ac6899361176e565b60058110156103df5760028114159081611bbb575b50611bad57879081611b9f575b50611b925781611b83575b50611b7857611b25611b3891611b20612710611b186006600388015497015487611944565b048095611761565b611944565b9260026118026001830154835490611735565b8015611b62578492048094611b4f575b5050929190565b611b5a929450611735565b913880611b48565b634e487b7160e01b600052601260045260246000fd5b505050909190600090565b60ff9150600201541638611af3565b5050505050909190600090565b60ff915060a01c1638611ae8565b505050505050909190600090565b60019150141538611adb565b906000602091828151910182855af1156105dc576000513d611c1657506001600160a01b0381163b155b611bf85750565b6001600160a01b0390635274afe760e01b6000521660045260246000fd5b60011415611bf156fea26469706673582212209f8ee8846f8ac19a7edb2820c438d9aeb25dc03d9936fa3761b4b03f1e1a059d64736f6c634300081d0033","sourceMap":"935:20584:11:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;935:20584:11;;;;;;;-1:-1:-1;;;;;3232:32:11;935:20584;;;;;;;;;;;;;;-1:-1:-1;;935:20584:11;;;;;;;:::i;:::-;;;;;;;;;;;;;-1:-1:-1;;935:20584:11;;;;-1:-1:-1;;;;;935:20584:11;;:::i;:::-;1500:62:0;;:::i;:::-;935:20584:11;2627:22:0;;2623:91;;-1:-1:-1;;;;;935:20584:11;;;-1:-1:-1;;935:20584:11;;;;;;3052:40:0;935:20584:11;3052:40:0;;935:20584:11;2623:91:0;2672:31;;;935:20584:11;2672:31:0;935:20584:11;;;;;2672:31:0;935:20584:11;;;;;;-1:-1:-1;;935:20584:11;;;;;;1500:62:0;;:::i;:::-;935:20584:11;;;;;;;;18830:46;935:20584;18850:10;18830:46;;935:20584;;;;;;;-1:-1:-1;;935:20584:11;;;;;;-1:-1:-1;;;;;935:20584:11;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;11375:13;935:20584;;11418:21;935:20584;;;11418:21;-1:-1:-1;;;;;;935:20584:11;;;;;;;;;;;;:::i;:::-;;;;;;11418:21;935:20584;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;935:20584:11;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;-1:-1:-1;;935:20584:11;;;;;4197:32;935:20584;;;;;;;;;;;;;-1:-1:-1;;935:20584:11;;;;;3975:24;935:20584;;;;;;;;;;;;;-1:-1:-1;;935:20584:11;;;;;;1500:62:0;;:::i;:::-;935:20584:11;20253:22;935:20584;;;;;;20290:40;935:20584;20307:10;20290:40;;935:20584;;;;;;;-1:-1:-1;;935:20584:11;;;;;;1439:72:8;;:::i;:::-;935:20584:11;;;14447:9;935:20584;;;;;;;;14515:13;935:20584;;;;;-1:-1:-1;;;;;14601:10:11;935:20584;-1:-1:-1;935:20584:11;14579:21;;;935:20584;;14681:152;935:20584;-1:-1:-1;935:20584:11;14601:10;;;;;14681:152;:::i;:::-;14851:19;;;;;935:20584;;14929:78;;935:20584;15016:67;;;935:20584;-1:-1:-1;935:20584:11;;-1:-1:-1;;;15100:24:11;;935:20584;;;;15109:7;-1:-1:-1;;;;;935:20584:11;15100:24;;;;;;;15151:15;15100:24;;;935:20584;15100:24;;;935:20584;14601:10;-1:-1:-1;;;;;14601:10:11;935:20584;;15151:15;:::i;:::-;935:20584;;;;;15182:55;935:20584;14601:10;15182:55;;935:20584;15100:24;;;;935:20584;15100:24;935:20584;15100:24;;;;;;;;:::i;:::-;;;;;:::i;:::-;;;;;;;;;;935:20584;;;;;;;;;15016:67;15043:22;;935:20584;;-1:-1:-1;;935:20584:11;;;;;15016:67;;;14929:78;-1:-1:-1;;;;;;;935:20584:11;;;;;;14929:78;;;935:20584;;;-1:-1:-1;;;935:20584:11;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;935:20584:11;;;;;15817:80;935:20584;;:::i;:::-;;;;;;15637:9;935:20584;;;;;;;;15705:13;935:20584;;;;;15769:31;-1:-1:-1;;;;;935:20584:11;;-1:-1:-1;935:20584:11;15769:21;;;935:20584;;;-1:-1:-1;935:20584:11;15817:80;;:::i;:::-;935:20584;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;935:20584:11;;;;;;1500:62:0;;:::i;:::-;935:20584:11;20799:38;935:20584;;;;;;20852:56;935:20584;20877:10;20852:56;;935:20584;;;;;;;-1:-1:-1;;935:20584:11;;;;;;1500:62:0;;:::i;:::-;935:20584:11;;;;;;;;19782:42;935:20584;19800:10;19782:42;;935:20584;;;;;;;-1:-1:-1;;935:20584:11;;;;;-1:-1:-1;;;;;935:20584:11;;;;;;;;;;;;;;;-1:-1:-1;;935:20584:11;;;;1500:62:0;;:::i;:::-;1439:72:8;;:::i;:::-;-1:-1:-1;;;;;;;935:20584:11;;;;;;2551:20:8;935:20584:11;;;735:10:7;935:20584:11;;2551:20:8;935:20584:11;;;;;;;-1:-1:-1;;935:20584:11;;;;;3864:24;935:20584;;;;;;;;;;;;;-1:-1:-1;;935:20584:11;;;;1500:62:0;;:::i;:::-;935:20584:11;-1:-1:-1;;;;;935:20584:11;;-1:-1:-1;;935:20584:11;;;;;3052:40:0;;;;935:20584:11;;;;;;;-1:-1:-1;;935:20584:11;;;;;;1500:62:0;;:::i;:::-;935:20584:11;19097:40;935:20584;;;;;;19152:58;935:20584;19178:10;19152:58;;935:20584;;;;;;;-1:-1:-1;;935:20584:11;;;;;4086:24;935:20584;;;;;;;;;;;;;-1:-1:-1;;935:20584:11;;;;;4299:25;935:20584;;;;;;;;;;;;;-1:-1:-1;;935:20584:11;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;935:20584:11;;;;;;;;4536:53;935:20584;;;;;;;;4536:53;935:20584;4536:53;;935:20584;4536:53;;935:20584;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;935:20584:11;;;;;;;-1:-1:-1;;;;;3146:32:11;935:20584;;;;;;;;;;-1:-1:-1;;935:20584:11;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;:::i;:::-;1439:72:8;;;:::i;:::-;935:20584:11;;-1:-1:-1;;;8083:34:11;;935:20584;8083:34;;935:20584;;;;;;;8091:7;-1:-1:-1;;;;;935:20584:11;8083:34;;;;;;;935:20584;8083:34;;;935:20584;8121:10;-1:-1:-1;;;;;8121:10:11;935:20584;;8083:48;935:20584;;8168:20;;;:::i;:::-;935:20584;;;;8221:22;;935:20584;;8277:20;935:20584;-1:-1:-1;;935:20584:11;;;;;;;;8277:20;935:20584;;;;8381:9;935:20584;;;;;;;;;;;;;8121:10;-1:-1:-1;;935:20584:11;;;;;;8541:26;:15;:26;:::i;:::-;935:20584;8606:23;935:20584;;8606:23;:::i;:::-;935:20584;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;8679:16:11;;935:20584;;-1:-1:-1;;935:20584:11;;;;;;;;;;;;;-1:-1:-1;;;8744:31:11;;8753:7;-1:-1:-1;;;;;935:20584:11;;;;;;;8744:31;;;;;;;;935:20584;8744:31;;;935:20584;8715:26;935:20584;8715:26;;;9201:28;8715:26;;935:20584;8715:26;;;935:20584;8715:26;935:20584;8785:27;;;935:20584;8875:20;935:20584;8843:29;;;935:20584;8934:17;935:20584;8905:26;;;935:20584;8875:20;9069:25;9016:20;;:::i;:::-;9069:25;;;:::i;:::-;9046:20;;935:20584;9201:28;935:20584;9201:28;:::i;:::-;;935:20584;;;9274:13;935:20584;;;;;;;;;;;;;;;;9363:24;;;;;;;;;935:20584;9363:24;;9433:8;935:20584;9363:24;935:20584;9363:24;9458:81;9363:24;935:20584;9363:24;;;935:20584;9426:4;;8121:10;-1:-1:-1;;;;;8121:10:11;935:20584;;9433:8;:::i;:::-;935:20584;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;8121:10;935:20584;;:::i;:::-;9458:81;;;935:20584;;;;;;9363:24;;;;;;;;;;;;;;:::i;:::-;;;;8744:31;;;;;;935:20584;8744:31;;935:20584;8744:31;;;;;;935:20584;8744:31;;;:::i;:::-;;;935:20584;;;;;;8744:31;;;;935:20584;;;;8744:31;;;;;-1:-1:-1;8744:31:11;;935:20584;;;;;;;;;;;;;;;-1:-1:-1;;;935:20584:11;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;935:20584:11;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;935:20584:11;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;935:20584:11;;;;;;;;;;;;;;;;;;;;8083:34;;;;935:20584;8083:34;935:20584;8083:34;;;;;;;:::i;:::-;;;;935:20584;;;;;;-1:-1:-1;;935:20584:11;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1439:72:8;;;:::i;:::-;12888:18:11;;;:::i;:::-;935:20584;;;;;;;;;;-1:-1:-1;;;12978:38:11;;13005:10;935:20584;12978:38;;935:20584;;;;;;12987:7;-1:-1:-1;;;;;935:20584:11;12978:38;;;;;;;935:20584;12978:38;;;935:20584;;;;;13599:13;935:20584;;;;;;-1:-1:-1;;;;;;13005:10:11;935:20584;;;13659:21;;;935:20584;;;13708:11;935:20584;13708:11;;935:20584;;;;13761:35;;;;;13812:36;935:20584;;;13812:36;:::i;:::-;935:20584;;13757:382;935:20584;13659:21;935:20584;;;;;;;13095:60;935:20584;;;;;;;;;;;;;;;;;;;;;;;;;13005:10;935:20584;13005:10;935:20584;;;;;;:::i;13757:382::-;935:20584;13869:31;;935:20584;;;13916:21;:32;935:20584;;;13916:32;:::i;:::-;935:20584;;13757:382;;13865:274;13969:35;-1:-1:-1;13987:16:11;13969:35;;13987:16;;;14020:25;;;:36;935:20584;;;14020:36;:::i;13965:174::-;935:20584;;-1:-1:-1;;;14087:41:11;;935:20584;;14087:41;;935:20584;;;;;;;;;;;14087:41;;;935:20584;;;-1:-1:-1;;;935:20584:11;;;;;;;;;;;;;;;;;;;;12978:38;;;935:20584;12978:38;;935:20584;12978:38;;;;;;935:20584;12978:38;;;:::i;:::-;;;935:20584;;;;;;12978:38;;;;935:20584;;;12978:38;;;-1:-1:-1;12978:38:11;;935:20584;;;-1:-1:-1;;;935:20584:11;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;935:20584:11;;;;;;1500:62:0;;:::i;:::-;935:20584:11;19441:44;935:20584;;;;;;19500:62;935:20584;19528:10;19500:62;;935:20584;;;;;;;-1:-1:-1;;935:20584:11;;;;;;;;;;;;;;;;;;;-1:-1:-1;;935:20584:11;;;;1500:62:0;;:::i;:::-;935:20584:11;;;;;;;2264:9:8;2260:62;;-1:-1:-1;;;;935:20584:11;;;2798:22:8;935:20584:11;;;735:10:7;935:20584:11;;2798:22:8;935:20584:11;2260:62:8;2296:15;;;935:20584:11;2296:15:8;935:20584:11;;2296:15:8;935:20584:11;;;;;;-1:-1:-1;;935:20584:11;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;935:20584:11;;;;;3504:33;935:20584;;;;;;;;;;;;;-1:-1:-1;;935:20584:11;;;;;;1500:62:0;;:::i;:::-;21116:21:11;935:20584;21116:21;935:20584;21116:21;:::i;:::-;;935:20584;;;-1:-1:-1;;;21154:24:11;;935:20584;;;;21163:7;-1:-1:-1;;;;;935:20584:11;21154:24;;;;;;;21205:7;21154:24;;;935:20584;21154:24;;;21193:10;-1:-1:-1;;;;;21193:10:11;935:20584;;21205:7;:::i;:::-;935:20584;;;;;21228:38;935:20584;21193:10;21228:38;;935:20584;21154:24;;;;935:20584;21154:24;935:20584;21154:24;;;;;;;:::i;:::-;;;;935:20584;;;;;;-1:-1:-1;;935:20584:11;;;;;;1500:62:0;;:::i;:::-;935:20584:11;20506:22;935:20584;;;;;;20543:40;935:20584;20560:10;20543:40;;935:20584;;;;;;;-1:-1:-1;;935:20584:11;;;;;3646:35;935:20584;;;;;;;;;;;;;-1:-1:-1;;935:20584:11;;;;;;;;4359:48;935:20584;;;;;;;;;;;;;;;;;;;-1:-1:-1;;935:20584:11;;;;;;1500:62:0;;:::i;:::-;935:20584:11;20000:22;935:20584;;;;;;20037:40;935:20584;20054:10;20037:40;;935:20584;;;;;;;-1:-1:-1;;935:20584:11;;;;;;1439:72:8;;:::i;:::-;18367:21:11;935:20584;18367:21;935:20584;18367:21;:::i;:::-;;935:20584;;;-1:-1:-1;;;18405:24:11;;935:20584;;;;18414:7;-1:-1:-1;;;;;935:20584:11;18405:24;;;;;;;18475:7;18405:24;;;935:20584;18405:24;;;18468:4;;18448:10;-1:-1:-1;;;;;18448:10:11;935:20584;;18475:7;:::i;:::-;935:20584;;;;;18498:42;935:20584;18448:10;18498:42;;935:20584;18405:24;;;;935:20584;18405:24;935:20584;18405:24;;;;;;;:::i;:::-;;;;935:20584;;;;;;-1:-1:-1;;935:20584:11;;;;;;1439:72:8;;:::i;:::-;935:20584:11;;;17896:9;935:20584;;;;;17936:18;;;:::i;:::-;935:20584;;;;;;17958:21;17936:43;935:20584;;17958:21;18015:17;;18049:34;18015:17;;935:20584;;;;;;;;;18063:20;935:20584;18049:34;935:20584;18049:34;:::i;:::-;;935:20584;18123:10;18099:48;935:20584;18099:48;;935:20584;;;;-1:-1:-1;;;935:20584:11;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;935:20584:11;;;;;3344:27;935:20584;;;;;;;;;;;;;-1:-1:-1;;935:20584:11;;;;;;;;;;4447:49;935:20584;;;;;;;4447:49;935:20584;;4447:49;;935:20584;;4447:49;;;935:20584;4447:49;;;935:20584;;4447:49;;935:20584;4447:49;;;;935:20584;4447:49;935:20584;;4447:49;;;;935:20584;4447:49;;935:20584;;;-1:-1:-1;;;;;935:20584:11;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;-1:-1:-1;935:20584:11;;;;;-1:-1:-1;935:20584:11;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;935:20584:11;;;;;:::i;:::-;;;;;;;;;;;;;-1:-1:-1;935:20584:11;;;;;;;;;;;;;;:::o;:::-;;;;-1:-1:-1;;;;;935:20584:11;;;;;;:::o;:::-;;;;;;;;;;:::o;:::-;;;;;;;;;;-1:-1:-1;;;;;935:20584:11;;;;;;;:::o;:::-;;;;;;;;;;:::o;6686:722::-;935:20584;;;6800:9;935:20584;;;6837:17;935:20584;;;6837:17;935:20584;;6833:77;;935:20584;;;6800:9;935:20584;;;;;;;;;;6984:14;6980:74;;935:20584;;;6800:9;935:20584;;;7067:30;935:20584;;;7067:30;935:20584;;7101:15;-1:-1:-1;7067:49:11;7063:107;;935:20584;;;6800:9;935:20584;;;;;;;;11789:13;935:20584;;12002:3;11942:56;11846:77;935:20584;;;11898:25;11846:49;935:20584;;7067:30;11874:21;;935:20584;11846:49;;:::i;:::-;11898:25;;935:20584;11846:77;;:::i;:::-;11942:26;11971:27;11898:25;11942:26;;935:20584;11971:27;;935:20584;11942:56;;:::i;:::-;935:20584;-1:-1:-1;7179:87:11;;935:20584;;;6800:9;935:20584;;;;;;;;11789:13;935:20584;;12002:3;12430:83;935:20584;;;12391:21;12484:29;12431:49;7067:30;12391:21;;935:20584;;;;12431:49;:::i;:::-;12484:29;;935:20584;12430:83;;:::i;:::-;935:20584;-1:-1:-1;12391:130:11;7275:88;;7067:30;6686:722;:::o;7275:88::-;11898:25;7322:30;:::o;7179:87::-;7227:28;7234:21;7227:28;:::o;7063:107::-;7132:27;935:20584;7132:27;:::o;6980:74::-;935:20584;;-1:-1:-1;;;7014:29:11;;935:20584;7014:29;;;935:20584;;;;;;;;;;;7014:29;;;6833:77;6870:29;6877:22;6870:29;:::o;935:20584::-;;;;;;;;;-1:-1:-1;935:20584:11;;;;;;;;;-1:-1:-1;935:20584:11;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;9715:353;935:20584;;9814:13;935:20584;;;;;;9851:18;9847:193;;10049:12;935:20584;9715:353;:::o;9847:193::-;9912:20;;;:::i;:::-;935:20584;;;;;;9950:34;9946:84;;9847:193;;;9946:84;935:20584;10004:11;:::o;935:20584::-;;;;;;;;;;;;;;;;:::o;10223:374::-;10297:10;935:20584;10310:9;935:20584;10297:22;;;;10293:70;;10390:22;10416:3;935:20584;10403:9;935:20584;10390:22;;:::i;:::-;935:20584;;10442:9;935:20584;10433:18;;;10429:65;;10507:18;;;;10503:65;;10577:13;10223:374;:::o;10503:65::-;10541:16;;;:::o;10429:65::-;10467:16;;;;:::o;2002:128:8:-;935:20584:11;1920:7:8;935:20584:11;;;;2063:61:8;;2002:128::o;2063:61::-;2098:15;;;1920:7;2098:15;;1920:7;2098:15;1618:188:5;;;;-1:-1:-1;;;;;1745:53:5;1618:188;935:20584:11;;;;;;;1745:53:5;;;;935:20584:11;1745:53:5;;;935:20584:11;;;;;;;;;;;1745:53:5;;;;;;:::i;:::-;;:::i;:::-;1618:188::o;1796:162:0:-;-1:-1:-1;;;;;1710:6:0;935:20584:11;;735:10:7;1855:23:0;1851:101;;1796:162::o;1851:101::-;1901:40;;;1710:6;1901:40;735:10:7;1901:40:0;935:20584:11;;1710:6:0;1901:40;1219:160:5;1328:43;1219:160;-1:-1:-1;;;;;935:20584:11;;;;;;1328:43:5;;;;935:20584:11;1328:43:5;;;935:20584:11;;;;;;1328:43:5;;;;;;:::i;13296:213:10:-;935:20584:11;13374:24:10;;13370:103;;935:20584:11;;13296:213:10;:::o;13370:103::-;13421:41;;;;;13452:2;13421:41;935:20584:11;;;;13421:41:10;;16239:1384:11;;;;;;-1:-1:-1;;;;;935:20584:11;;;;-1:-1:-1;;;;;935:20584:11;;16555:30;16605:16;;;;935:20584;16605:20;;;;;16665:18;16605:20;16665:18;;:::i;:::-;935:20584;;;;;;16759:23;16742:40;;;:83;;;;16239:1384;16738:145;;;16932:45;;;;;16239:1384;16928:107;;;17081:47;;;16239:1384;17077:109;;;17321:59;17397:80;17222:21;17322:38;17277:3;17222:51;17246:27;17222:21;;;935:20584;17246:27;;935:20584;17222:51;;:::i;:::-;935:20584;17322:38;;;:::i;:::-;17321:59;:::i;:::-;17397:22;16759:23;17397:51;16605:16;17397:22;;935:20584;;;17397:51;;:::i;:80::-;935:20584;;;;;;;17290:188;17488:74;;;16239:1384;17571:45;;;;16239:1384;:::o;17488:74::-;17518:33;;;;;:::i;:::-;17488:74;;;;;935:20584;;;;;;;;;;;;17077:109;17144:31;;;;;;935:20584;17144:31;:::o;17081:47::-;935:20584;17105:23;;16759;17105;935:20584;;17081:47;;;16928:107;16993:31;;;;;;;;935:20584;16993:31;:::o;16932:45::-;935:20584;;;;;;16932:45;;;16738:145;16841:31;;;;;;;;;935:20584;16841:31;:::o;16742:83::-;16605:16;935:20584;;16786:39;;16742:83;;;7686:720:5;;-1:-1:-1;7823:421:5;7686:720;7823:421;;;;;;;;;;;;-1:-1:-1;7823:421:5;;8258:15;;935:20584:11;-1:-1:-1;;;;;935:20584:11;;8276:26:5;:31;8258:68;8254:146;;7686:720;:::o;8254:146::-;-1:-1:-1;;;;;8349:40:5;;;;-1:-1:-1;8349:40:5;935:20584:11;8349:40:5;935:20584:11;;-1:-1:-1;8349:40:5;8258:68;8325:1;8310:16;;8258:68;","linkReferences":{},"immutableReferences":{"2946":[{"start":1327,"length":32},{"start":2452,"length":32},{"start":2970,"length":32},{"start":3828,"length":32},{"start":4724,"length":32},{"start":5174,"length":32}],"2948":[{"start":503,"length":32},{"start":2612,"length":32}]}}}}}}},"signatures":{"function":[{"signature":"bnb48er()","signatureHash4":"0xf5be257d","signatureHash32":"0xf5be257dbe3def094db9da46c73b8dc5e90f2128f18287e16868f803b73d5242"},{"signature":"bnb48ersInUse(uint256)","signatureHash4":"0x0d9b2226","signatureHash32":"0x0d9b2226a38eb5acb3bd22dc4efa30df87b49e817f3b1d37601dc2bbf2d366bb"},{"signature":"calcRewardFromPool()","signatureHash4":"0xf3d1202d","signatureHash32":"0xf3d1202d71d09f3cf4a65a3dd48b26219e9e5b6b4d93085c7d59e81a78c03aab"},{"signature":"castVote(uint256,uint8,string)","signatureHash4":"0x470b7622","signatureHash32":"0x470b762239906fe1597ab15e115496b67a2b1ed7903cd8900d64b4c4f567ec8d"},{"signature":"claimReward(uint256)","signatureHash4":"0xae169a50","signatureHash32":"0xae169a5004636bbb1ebada67c36e90b2c4d71fc69b9f36d0bf665ba14a071f4d"},{"signature":"contributeToRewardPool(uint256)","signatureHash4":"0x0a300b09","signatureHash32":"0x0a300b09378b0116c62a2f49a113b4382cd5f532e94ca2ed27dcb5120ced9ca3"},{"signature":"forVotesThresholdBps()","signatureHash4":"0x1a35c602","signatureHash32":"0x1a35c60232dc5170d9f81b74ca1aa3696a609a16b57c9ae56dd4ee4b83f8b01f"},{"signature":"getClaimableRewardInfo(address,uint256)","signatureHash4":"0xa60c117c","signatureHash32":"0xa60c117cf165cc9b372b3401b6b345ef05f85e984459f0afcc0ec716317cb670"},{"signature":"isNftInUse(uint256)","signatureHash4":"0xd301c89d","signatureHash32":"0xd301c89de4e4e1484ff5440aa25f13ebc7261420172c35ba67f04940ae431814"},{"signature":"maxReward()","signatureHash4":"0x66a78e6c","signatureHash32":"0x66a78e6c131fd2c8f1ef08865b78053327c7b54c00509529164e439439f3f294"},{"signature":"minDeposit()","signatureHash4":"0x41b3d185","signatureHash32":"0x41b3d1854ea7d16b2018d4f09a7341397f6a1a30cfed4c8083d55d19411e779d"},{"signature":"minReward()","signatureHash4":"0xba16d600","signatureHash32":"0xba16d600dd708fc7848983965af7062127540725555ddc145df8c992784769b5"},{"signature":"owner()","signatureHash4":"0x8da5cb5b","signatureHash32":"0x8da5cb5b36e7f68c1d2e56001220cdbdd3ba2616072f718acfda4a06441a807d"},{"signature":"pause()","signatureHash4":"0x8456cb59","signatureHash32":"0x8456cb591a934d53f6ccc6332123a165a1f3562907bf11330d847a29ca49eb89"},{"signature":"paused()","signatureHash4":"0x5c975abb","signatureHash32":"0x5c975abbf8c4d6efa68fc896e233763eb503f2318260b7bf59b19412913788b2"},{"signature":"proposals(uint256)","signatureHash4":"0x013cf08b","signatureHash32":"0x013cf08bfb77fe2271e8712c3467b68f101c2be5018f4e1db2e4f8af427dd570"},{"signature":"proposalVoteCounts(uint256)","signatureHash4":"0x01ea83ea","signatureHash32":"0x01ea83ea08cea1b7067a361e66f1dc8fe560cd600d64b6c14d33dcfd3c08a40a"},{"signature":"proposalVoteInfo(uint256,address)","signatureHash4":"0xdd2fc2b0","signatureHash32":"0xdd2fc2b04faec3c3ad35dd205ac861c659b809b2f90c9259102448d3ca8f643a"},{"signature":"proposalVotes(uint256)","signatureHash4":"0x544ffc9c","signatureHash32":"0x544ffc9c44a51a2de0af4200593cbf198949430d390cff8e2745e846955bf10e"},{"signature":"proposerRewardBps()","signatureHash4":"0xbd149d71","signatureHash32":"0xbd149d716c332fef0a3ae36138cc6e8873f38ba9f1626cdc6c5705030e800d24"},{"signature":"propose(uint256,uint256,string,string)","signatureHash4":"0x47ee3b95","signatureHash32":"0x47ee3b9596d557960c6b19c4cd8a72f7f70bcbf0bd08752ad60dc42c653f6316"},{"signature":"quorumThresholdBps()","signatureHash4":"0x3bec7f5b","signatureHash32":"0x3bec7f5b978fd4734406f967c3776b020c010c4ec89831d2ff25ec56cda2deb6"},{"signature":"refundInvalidProposal(uint256)","signatureHash4":"0x0507377e","signatureHash32":"0x0507377e55418738ae7fd8e51e3ad7992fa4dc423f8692d251f7750b7484e42d"},{"signature":"removeFromRewardPool(uint256)","signatureHash4":"0x287a66c9","signatureHash32":"0x287a66c90eb20848ca10106c9c2ee6efe19219f96d551574f9937cf9cfb5e3c8"},{"signature":"renounceOwnership()","signatureHash4":"0x715018a6","signatureHash32":"0x715018a616b5f2044428f6fadb7deef4ce9ca76ef60ea57978964ad137bbe7ae"},{"signature":"rewardBps()","signatureHash4":"0x82328ffc","signatureHash32":"0x82328ffc26da98a91fdf58be9b55590c06f91a2c5416b00e242d40c00b6958ac"},{"signature":"rewardPool()","signatureHash4":"0x66666aa9","signatureHash32":"0x66666aa90b4926b8f97291fab83f4d08fd42911d3a83cda325c7ca7ee831d93b"},{"signature":"setForVotesThresholdBps(uint256)","signatureHash4":"0x428548b8","signatureHash32":"0x428548b8a5df8b4263014fa0fb3c9105ea7ce954a273cdbf8b5a4239e3c9a706"},{"signature":"setMaxReward(uint256)","signatureHash4":"0x25c33e13","signatureHash32":"0x25c33e13264390d0889bf8a2c5dad4b63e333bed3cc05192f11e8d5c7c14a6fa"},{"signature":"setMinDeposit(uint256)","signatureHash4":"0x8fcc9cfb","signatureHash32":"0x8fcc9cfb36cf2bdc572da69ddb56bb7132b84aa3108eef5bfd4fdda669e38605"},{"signature":"setMinReward(uint256)","signatureHash4":"0xb6a1cb2b","signatureHash32":"0xb6a1cb2bb2c98b8e9fdd4fc7786b20a438456e176414fb4f7e36387c7c197472"},{"signature":"setProposerRewardBps(uint256)","signatureHash4":"0x91e71e26","signatureHash32":"0x91e71e26e6bf77f5c9e49069cdd551b2ecc5e9f552e87db4d37b51123b55ed9d"},{"signature":"setQuorumThresholdBps(uint256)","signatureHash4":"0x6f7af91f","signatureHash32":"0x6f7af91f0f5b63f184dbf0efaeb0095ffa8b8c6409564fd950c56b5473bbf740"},{"signature":"setRewardBps(uint256)","signatureHash4":"0x0a542fa7","signatureHash32":"0x0a542fa7b7a29d9a64b80323da089bfe84f63a9d0b43e553fdf3d516bcb896c4"},{"signature":"setVotingPeriod(uint256)","signatureHash4":"0xea0217cf","signatureHash32":"0xea0217cf9f23b1a6c1973558189929832133af54b56888066031039c95b7c493"},{"signature":"staking()","signatureHash4":"0x4cf088d9","signatureHash32":"0x4cf088d99cdcc3849c6e3347a342e632ea145b43d563ff7182bc6e930797e161"},{"signature":"state(uint256)","signatureHash4":"0x3e4f49e6","signatureHash32":"0x3e4f49e652f693984dd7275f5fc4408373a2319382f06b947da322ee252665a0"},{"signature":"transferOwnership(address)","signatureHash4":"0xf2fde38b","signatureHash32":"0xf2fde38b092330466c661fc723d5289b90272a3e580e3187d1d7ef788506c557"},{"signature":"unpause()","signatureHash4":"0x3f4ba83a","signatureHash32":"0x3f4ba83af89dc9793996d9e56b8abe6dc88cd97c9c2bb23027806e9c1ffd54dc"},{"signature":"votingPeriod()","signatureHash4":"0x02a251a3","signatureHash32":"0x02a251a3c27fae516703e1a6b6b00e095049734567eea4eba2ff5baf7b6f5d25"}],"event":[{"signature":"ForVotesThresholdBpsUpdated(address,uint256)","signatureHash4":"0xbafdea06","signatureHash32":"0xbafdea067f81b214052ed0f40d39cd7d056ec2cb017f6b575f9addc4a54abe63"},{"signature":"InvalidProposalRefunded(address,uint256)","signatureHash4":"0xddd8ea0b","signatureHash32":"0xddd8ea0b68d501f3fec76e2e93b695c2a332f0099b4e6290a0c75c51ec8063f7"},{"signature":"MaxRewardUpdated(address,uint256)","signatureHash4":"0xbc32502c","signatureHash32":"0xbc32502cec79c9838d553dcb8fbff010442b820c0648512429a9b8fdcda05d58"},{"signature":"MinDepositUpdated(address,uint256)","signatureHash4":"0x0f48d517","signatureHash32":"0x0f48d517989455cd80ed52427e80553e66f9b69fd5cee8e26bd1a1f9c364fba6"},{"signature":"MinRewardUpdated(address,uint256)","signatureHash4":"0x4bbac275","signatureHash32":"0x4bbac275695f9391c6b8166c70b337feb1adcbd278175a119aaf59dce5ffe490"},{"signature":"OwnershipTransferred(address,address)","signatureHash4":"0x8be0079c","signatureHash32":"0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0"},{"signature":"Paused(address)","signatureHash4":"0x62e78cea","signatureHash32":"0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258"},{"signature":"ProposalCreated(uint256,address,uint64,uint64,string,string)","signatureHash4":"0xd8ddd70c","signatureHash32":"0xd8ddd70cf5ecd6d6017ed4145b845744e8a96f0800df501d124d1b4ddf56a2a9"},{"signature":"ProposerRewardBpsUpdated(address,uint256)","signatureHash4":"0x9d45ce51","signatureHash32":"0x9d45ce5169732da6af34329ae6e425c283cdad15df3263a3200b9e0e1191ee52"},{"signature":"QuorumThresholdBpsUpdated(address,uint256)","signatureHash4":"0x1f8d3c40","signatureHash32":"0x1f8d3c40deb0ed6be05c1490c226e6d0b0f23cab543f975fae8c3a615d49eed3"},{"signature":"RewardBpsUpdated(address,uint256)","signatureHash4":"0x01e1bd21","signatureHash32":"0x01e1bd213446551b865be02b533d852d27c7d7ba6a95013ddcd85d9146fe5a77"},{"signature":"RewardClaimed(address,uint256,uint256)","signatureHash4":"0xf01da326","signatureHash32":"0xf01da32686223933d8a18a391060918c7f11a3648639edd87ae013e2e2731743"},{"signature":"RewardPoolContributed(address,uint256)","signatureHash4":"0xc8b1cd54","signatureHash32":"0xc8b1cd545919a25e3c6ccfef8cd44d97376832801c6a7c7bbefdb3cee824edd8"},{"signature":"RewardPoolRemoved(address,uint256)","signatureHash4":"0xf157e68e","signatureHash32":"0xf157e68e2245c70cbc79c5da7477f57616bf886825f65d57b9ff756847672e7b"},{"signature":"Unpaused(address)","signatureHash4":"0x5db9ee0a","signatureHash32":"0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa"},{"signature":"VoteCast(address,uint256,uint8,uint256,string)","signatureHash4":"0xb8e13888","signatureHash32":"0xb8e138887d0aa13bab447e82de9d5c1777041ecd21ca36ba824ff1e6c07ddda4"},{"signature":"VotingPeriodUpdated(address,uint256)","signatureHash4":"0xb425f2f9","signatureHash32":"0xb425f2f96d1b8d8416bf9a28254b80398b92febc9cc90ec2c147e704385e577b"}],"error":[{"signature":"EnforcedPause()","signatureHash4":"0xd93c0665","signatureHash32":"0xd93c0665d6c96d04a8f174024fc4ddd66c250604aff22bbec808de86dd3637e3"},{"signature":"ExpectedPause()","signatureHash4":"0x8dfc202b","signatureHash32":"0x8dfc202bcfe9a735b559bee70674422512bc5c30f687046ae8778315fb81da44"},{"signature":"OwnableInvalidOwner(address)","signatureHash4":"0x1e4fbdf7","signatureHash32":"0x1e4fbdf7f3ef8bcaa855599e3abf48b232380f183f08f6f813d9ffa5bd585188"},{"signature":"OwnableUnauthorizedAccount(address)","signatureHash4":"0x118cdaa7","signatureHash32":"0x118cdaa7a341953d1887a2245fd6665d741c67c8c50581daa59e1d03373fa188"},{"signature":"SafeCastOverflowedUintDowncast(uint8,uint256)","signatureHash4":"0x6dfcc650","signatureHash32":"0x6dfcc6503a32754ce7a89698e18201fc5294fd4aad43edefee786f88423b1a12"},{"signature":"SafeERC20FailedOperation(address)","signatureHash4":"0x5274afe7","signatureHash32":"0x5274afe73c98b4749fc91ffae6b7b574e7842cb2144a159e9377a5f20b32edf9"}]},"proxyResolution":{"isProxy":false,"proxyType":null,"implementations":[]},"match":"exact_match","chainId":"56","address":"0x548011bb876F5e9EeE1A346eA54b9EF7A2Ad53C8"}