// File: contracts/RDE2.sol




// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/// @title: Rodro Editions 2
/// @author: manifold.xyz

import "./ERC1155Creator.sol";

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//                                                                                                                                                                                                                //
//                                                                                                                                                                                                                //
//    PGGGGGGGPGGGGGPGGGPGGGGGGGPPPPPPPP5PPP555PPP55P555P55PPPPPPGGGGGPPPPPPGGGGGPPPP555P555P5555YYY5Y5YYY555PPPP555PY555P555P5555Y5P555555555YPPP555555YP55555PPPPPPPPPPPPPGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGP    //
//    PPPPGGGGGGGGGGPGGGGPGGGGGPPPPPPPPP5PPPPP55PPP5PP5PPP5PPPPPPPPPGGPPPPPPPPPPPGPPPP5PP55555555YYY55P5555Y5555P55Y5Y5555P5555YYY5PP5P55555YY55PP55555YY555555PPPGGP5PPPPPPGPPPPGPPGGGGPGGGGGGGGGGGGGGGGGGBBB    //
//    GGGGGPPGGGGGGGGGGGGBGGGGGGPPPPPPPPPPPPPP555PPPPPPP5555GPPPPPPPPPP5PPPPGGGPGPGGP5Y55555P55Y5Y55Y5P5555YY55PP555YY555PP55P5555PPP5PP5Y5555PPPP5555555Y55555PPPGPPPPPPPPPGPGGGGPGGGGGGGGGGGGGGGGPGGGBBBG5J?    //
//    GGGPGGGGGGPGPGGGGGGGGGGGPGP5555PPGGGPPPPPPPP5PP5555555PGPPPGPPPPY5PGPGGGPPGGPPPP555555P5555Y5Y55Y55YY55555555555555PPPP5P555PP555PP5555PP55YYY555555555PPPPPGPGP55PPGGGGGGGGGGGGGGGGGGGGGGGGBB#BG5J7!7?J    //
//    GGGGGGGGPGGGGGGGPGGGGPGGGPP555PPGGGPPPPPPPPPPP55555555PPPPGGGPPPPPPPPPPPPPPPPGGP5555P5555P5Y5555555YYJY55P55555PP55555P5PP555PP55P5555555P55555Y5555PP5PGGP5PPPPPP55PPGGGGGGGGGGGGGGGGGGGGBBG5?7!77?JJJJ    //
//    GGPGGGGGGGGGGGGGPGPGGGPGGGPGPPPPPPPPPPPPPPPP555555Y5555PPPPGPPPPPP5PGPPPGPPPPGPPPPPPP5PPPP5555YYYYYYYYY5P55555Y55555P555YPPP5PP55PPPP55555555Y555555555PPPPPGP55P555PGGGGGGGGGGGGGPPGGBBG5?!!!7??JJJJJJJ    //
//    GGGGGGGGGPGPGGPGGGGGGGGPGPGGGPPPPPPPPPPPP5PPP55555555555GPPPPPPPPPPPPPPGPPPPP55PP55PPPPP55PYY55YYYYYYY5PPPP55P5PPP5PPP555PPPPP5555PP5555P555Y5555555Y555PPPPPPP5PPPPPPGGGGGGGGGGGGGBBPJ7!!7????????JJJJJ    //
//    GGGGGGGGGPPPPPPGPPGGGPPPPPPPGPPPPPPPPPPPPPP5P5P555555555PGPPPGPPPPPPPPP555PPP5PP5555555P5PP5Y55YYYY555555555PPP555PPPP555Y55P55555PPPPPPP555555555555P5PPPPPPPPPPPPGPGGGGGGGGPGBBG5?!!77????????JJ???JJ?    //
//    GGGGGGGGGGPPGP5PPGGGPPPGGPPPGGGPPPPPPPP5PPPP55555555YY555PPPPPPPPPPPPPPP5Y55PP5PP555P55P5555YYYYYYYYY55555P5PPPPP5PPPPPPP5555Y555PPPP55PP555555555555PPPPPPPPPPPPPPPPPGGGGGBBBPJ7!!7?????????????J?JJJJJ    //
//    PGGGGGGGGGGPPPPGGGPGPPPGGPGGGGGPPPPP5555PPPP55555Y5555555PPPPPPPPPPPPPPP555Y55PPPP55P5P55555YJJYYYYYY55PP5P55P55PPPPPPPPPPP5P5Y55PP5P55P5555555555555PP5PPPPPPPPPPGPPPGGGBG5?!!77?????????????????JJJJJJ    //
//    PPGPPGPPGGGPGPPGPPGGPPGGGGGGGGGGGGGP55PPPPPPP5555555555555PPPPPPPPP5PPPP5P55P5PPPP5555P55P55YYY5YYYYY55YYYP5PPPPPPP5555PPP55555PPPPP5P5555Y5555555555PP5PPPP5PPPPGPGGBBGPP7^7?????????????????????JJJJJJ    //
//    PP5PPPPPPGGPGGGGGPGGGGGGGGGGGGGGGGP55PPP5PPPP55555555555555PPPPPPPPPPPPPPPPPGPPPPPP5PPP55P5P555YYYYYYYY5555P5PPP5P55555PP55P5Y5P55PP55555555555555555PPPPGPP5PPPGPGBB5YPGGPJ!7?????????????????????J??JJ    //
//    P5555GGPGGGPGGGGGGGGGGGGGGGGGGGGGPPPPPPPPPPPPPP55555555555YPPPPPPPPPPPPPPPPPPPPPPP55P555P555Y55Y5YYYY5Y55P55555555YYP5555P555555555555555YY555555Y5P5PPPPPPPPPPPBBGJ!G&PPGPP5~7?????????????????????????    //
//    PPP555PGGGGGGGGGGGGGGGGGGGGGGGGGPGGPPPPPPPPPPPP5555555555PPPGGGPPPPPPPPPPPPPPPPPPP555555555Y5YYYYYYYYYY555555555555Y555555PP555555555555YYYY5Y55555P55PPGBGGGPGBP7^:^5@&PPBBP5?!??????????????????????JJ    //
//    P5P55PPGGGGGGGGGGGGGGGGGGGGPGGGPGGGGPPPPPPPPPPPP5555PPP55YJJ????JJJYY55PPGGPP555PP555555555Y5YYYYYYYYYY55555555555555PP555P5JY55555YY5YYY5YYYY55Y5PPPPBG5JYPB&5!::^^!!Y@#PPB#&@Y!7??????????????????J?JJ    //
//    PPPPPPPPGGGGGGGGGGGGGGGGGGGGGGGGGGGGGPPPPPPPPPPPPPP5YJ???77?JY55PPPGGGGGGGGBGPY55P5YY5Y55555YYYYYYYYYJY55555555555P555555555YYYYY55Y55YYYYYY5YYYY5BGG#B?JJY##!^!~~!7??!75#B55B@B!7!????????????JJ???JJJJ    //
//    PPPPPPPPPPGPPGGGGGGGPGPPGGGGGGGGGGGGGPPPPPPPPPGPYJ???????Y55PGGGGGGGGGPPPGGGGGBBGP5YYYY5YJYY5YYYYYYYYYY555Y5555555P5555555P555YYYY5Y55YYYYYYYYYY5#5J?J#5JJJJBY7????????77JP##GPG&#7!??????????????J??JJJ    //
//    PPPPPPPP55PPPPPPPGPGGGPPGGGGGGGGGGPGPPPPPPPGG5J???????J55PPPGPPPPPPPPPPPPPGGGBGB##GYYJYYYYYY5JJJJJYYYYJY5Y55Y555555555555555555Y55YYYYYYYYYJ5GPPG&JJJJP#JJJJBG777?7777??7!YPG##BY7!777??????????JJ?J?JJJ    //
//    P5PPPP55PPPPPPPPGGGGGPGGGGPGGGGGGGGPGPPPPGG5????????J55PP5JJJ??77!!~~~~~~~!!7?JY5P##5YYYY5YYYYYYJJJJJJJ55555Y5555Y55555Y55555YYYYYYYYYYYYYYGGJJYG&JJJJY&5Y5P#G7?7?????????!?PYB##G5?55!7?????????JJJJJJJ    //
//    PPP5P55Y55555PPPGGGGGPPPGPPGGGGGGGGPGGGGB5?????????5PPPYJ?7!!~~~~~~~~~~~~~~~~^^^^~~7?Y5P5YY5YJJJJJJJJJJY555YY555555555JYY55YYYYYY5YYYJJJYY5#??JJY#JJJJJP##BBGJ7?7??????????7!7&@&YG&B5777????????????J??    //
//    PPP55PPPP5P555PGGPPGGPGPPPPGGGGGGGBGPJ?PY????????YP5P5?7~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^~!JP5YYYJJJJJYYYJYYYYYY55YYYYY55YYY55YYYYYYYYYYYYYYJPB?JJJP#JJJJJYP##?777??????????????7?G#PPB##GGG?7??????????J??    //
//    PPP5PPPPP555555PPGPPPPPPPPPPPPGGGPJ!~75J????????55PPJ!~~~~~~~~~~~~~~~^^~~^~~~~~~^^^^^~~^^^7YPYJJJJJJJJJ55YYY55YJYYYY5555555YYYYYYYJYYYJYY55#GJJJYGBGGGGGG#57??77???????????????7!!&@@B?5@5!77????????JJJ    //
//    PP55555PP5P55555PPPPPPPPGPPPPGB57~~~7P?????????PYP57~~~~~~~~~~~~~~~!7JY555PPPPP55YJ??7!~~^^:~?55JJJJJJY5555Y5YYY55Y55555Y5YYYYYYYJYJJJPPYY5PBG5JYPPGGB&P5J77?77??7???????????????7JB#&##GPG5?7???????JJJ    //
//    PPPP5P55555555Y555PPGPPPPPPGG57~~~~!PJ????????PYP5!~~~~~~~~~~~~7JPB&@@&BGGGGGGP555PPPPPP5YJ7~^:!Y5JJJYY555555YYY5555555P555YY5YYYYYJJ5G??JJJ?JBBBGGGGB#?77777?77??????????????????77!JGG#@GG57?????JJYPB    //
//    PPPPP55555555555555PPPPPPPGP7~~~~~~PJ????????GYP5!~~~~~~~~~~!YGBBGGP55PGB#BGPPJJJJJJJJJJJY55P5J!^~Y5JJJYYYYY5YYY55555555Y55YYYJYYYYJJYBYJJJJJJ5G##PPG5?7?777777?????????????????????77?PPYJ77??JJJYPG#BG    //
//    PPPPPPP5555555P55555PPPPPBY~~~~~~~Y5????????55P5!~~~~~~~~^!5BBGP5YJJJJJ?JJ5GBGP5JJJJJJY55PPPPPGG5J?5B5YYJYY555Y55YY55YY55YYJYYYJYJJJJ5B#GGPPYYPG#P777777??7777777?????????7???????????7777??JJJYPG#BBGGG    //
//    P55PPPPP55555555555555PPBJ~~~~~~~!P????????JGYG7~~~~~~~~~YBBGPYJJJJJJJJJJJ?7JGBGPJJ5PPP5YJJJJ????JJJY5PGY555YY555Y555YY5YJYYJYYYYYJY#PYJJJY5G#BGY77777?7???7??7?77???????????????????????JJJYPGBBBGGGGGG    //
//    PPPP55PPP55555555555555BJ~~~~~~~~5Y????????GYGJ~~~~~~~^7GBGPYJJJJJJJJJJJJJJJ775#GGG5YJJ????JJY55PPPP55YBB555YYYY5Y555YY5YYYYY5YJYJJYBGPJJJJJJY#?7777777???777?7???7777??77????????????JJJYPGBBGPPGGGGGGG    //
//    PPPPPPPPPPYY5555555555PP~~~~~~~~!P????????YPP57~~~~~~^?#GP5JJJJJJJJJJJJJJJJJJ7!G&GPJ?JJY55PPPP5YYJJJJJJJY5PG5YY5Y55555YYYJYJY5YYYJJJJYPBPJJJJ?5B777??77?7?????7???77?77???7777?????JYYPGBBBGPPPPPGPGGGGG    //
//    5PPPP55PPPP5555555555YB?~~~~~~~~J5????????GYG?~~~~~~~?#GP5JJJJY5555PPPPPPPPPP5J5#PPP5PBBG5YJJ?JJY555555555Y5#5Y5YYY5YYYYYYYYYYYYJJJJJJYG&5JJJJ?GPYJ??77777777777??????????????JJ5PGGBBGGPPPPPP5PGGGGGGGG    //
//    P5P5555PPPPP555555555YBJ~~~~~~~~PJ???????JGPP7~~~~~~!#GPPY5GGGPP5YYYJJJJJJJJJYY5GBGB#B5JJ??JY5P5J?!~~^^^^~!7YPP5Y5Y5JY55YYYYYYYYJJJJ5G57J#JJJJ??JY5PP5Y?7?JJYY5555YYYYYYYY5PPG#BPP#BPPPPPPPPPPPGGGGGGGGG    //
//    P55555PPPPPPPP55555555GP7~~~~~~!P????????55GY!~~~~~~Y#PBBBBPYJJJJJJJJJJJJYYY555YJP&GPPJJJJ5PY7~^^:~?YYY?~:.:::!#PYYYJ55YYYJJYY55JY5PY!~77#5JJJJJJJ???JYPB###BBBBBBBBBBBBBBBBB#GYJ?!5#GPPGPPPPPGGGGGGGGGG    //
//    P55555PP5PPPPPP55555555BY?!~~~~?P????????GYG?~~~~~~~B##BG5YJJJJJJJJJY5PPPP55YYYYYYPGBGP5PPJ!^^::~P5J&@@@@B!::^JGPG5YJ55YYJYPGG55PPY!!7777PBJJJJJJJJJJJ??JBG5Y55PPPPGGPPGGGGBB5J?7!~^?BBPPPPPPGGGGGGGGGGG    //
//    PP555555PPPPPPP5555555Y5GYJ7!~~J5????????GYG7~~~~~~7&#GP5JJJJJJJJ5PGP5YJJJJJJJJ????JG#BB?~^^::::JBJJ&@@@@@&7J5Y7J#5555YY5PG5J7777777777??Y&5JJJJJJJJJJJJ?JYJJJJJJYYYYPBBBBBPJ7!~~!!!~~5BGPPPGGGGGGGGGGGG    //
//    P5555555PPP55555P55YYYYY5GYJJ?75Y???????YPP5!~~~~~^J&PP5JJJJJJ5GGPYJJJJJJJJJJY5P5YJ???JP?^:::::::^J#@@@@@&B5J?JPBP555PGGGG7777777777??JPGGGBGYJJJJJJJJJJJJJJJJJJJJYPBBBBB5?!!~!!!!!!!!^7GBPPGPPGGGGGGGGG    //
//    PPPPPPP5555P5555P555YYYYY5GPJJJGJ???????5PGJ!~~~~~~Y#PPJJJJYPBG5JJJJJJJJJY55YJ7~^::::::~B~::::::~B@@&#BPYJ?YPG&GYYY5GB5JJGJ777777777JY#PYYYYPGGP55YJJJJJJJJJJYYPGBBBBBPJ!~~~!!!!!!!!!!!~~JBBPPPGGGGGGGGG    //
//    P5PPPPPP5555555555555YYYYJJ5G5YGJ???????GG5?~~~~~~~J#P5JJ5G#GYJJJJJJJJY5PPPPPP5J7^:::::J#JJJY55PPP5YYJ??YPGG5P#5YYYYGB?JJJPY7777777?JGBJJYYYYY5PGGGGGGGGGGGGGGGB&BBB57~~!!!!!!!!!!!!!!!!~^~YBGPPPPGGGGPP    //
//    PPPPPPPPP5555555P55555YYYYYYY5PB??????JPGGJ?!~~~~~~7#G55G##5JJJJJJJJ5P5JG#J?&@@@@#Y^:^YPPPP55YYJJ??JJJJJYJ??557PYJYYY#PJJJJ5PYJ?7?YGGPYYYYYYY5P55555555YYYYYYJY5&&57~~~!!!!!!!!!!!!!!!!!~~~^!YBGGPPGGPPP    //
//    PP5PPPPPPPP5555555555555YYYJYY5GGYYJY5PGGPPPP5J!~~~~GBG##GPYJJJJJYPPJ!^P&#JY&@@@@@@P7PYGYJJJJJJJJJJJJJJ?JYGGY7!?BYJYYYPG5JJJJY5PBGPYJJYYJJJYY5555555555YYYYYYYP#P!~~~~~!!!~~~~!!!!!!!~!!!~~!~^!YBBGP5PPP    //
//    PPPPPPPPPPPPP55555555555YYYPBBGP55PGB#BGPP55Y5PPJ~~~7##GPPPPYY5PPY7~^::^!JB@@@@@@@@BY7YBJJJJJJYYYYYY555BBG5YYYYYPGP5YJY5GGGP5PGP5J??JYJYYYYYY55555555YYYYYYYYG#?~~~~!!!!!~!~~~~!!!!!!!!!!!~!!!~~~JPGPPPP    //
//    PPPPPPP55PPPP5P5555555Y5GG5YJJY5PPYJY5GBGPPPPPYYG5~~~?#BGGGGPYJ7~^^::::P&@@@@@@&B5J775BJJJJJJJJJJJ????JY55JJJJJ???J5BG55GPY555J????JYYYYYJYY55555555YYYYYYYYY5PGP5?!~~!~~~!!~~!!!!~~!!!!!!!!!!!!~~~7YGGG    //
//    PPPPPPPPPPPP55PP55555YPG?~~!!!!!7YGPYYY5BBPPPPGPJ5P!~~7G5?7!!~!~^^~~~~!Y&&#BG5Y???J5GPJJYPJJJJJJJJJJJJJ??JJJJJJJJJJPGJJJY#J?????JJ?JYYYYYYJYYY55555YYYYYYYYYJJJJYPGG57~~~~!!!!!!!!!!~~!!~!!!!!!!!!!~~~7Y    //
//    PPPPGPPPPPPPPP55555YYPB!:^J5PGPJ!!75BYYYYBBPPPPPP?YG~~~~JG#GGGP55555555YYJ????JY5PP5JJJJBBYJJJJJJJJJJJJJJJJJJJJJJYGPJYYYP#PPJ?????JYJJJJJYYY555555YYYYYYYYYJJJJJYJYYPBGJ~~~~!!!!!!!!!!!!!!!!!!!!!!!!!!~~    //
//    PPPPGPPP5PPPPPPY555YY#7:^5BBGGBBP77!YB5YYYBBPPPPPP7P5~~~~~YBBPJJJJJJJJYYY55PGPPP5YJJJJJGBPJJJJJJJJJJJJJJJJJJJJJYGGYJYY5GPYY#Y??JJJJYYYJJYYY555555YYYYYYYYYYJJJJYYJJY55PBG?~~!~~~!!!!!!!!!!!!!!!!!!!!!!!!    //
//    PPPPGPPPPPPP5PPP555PGB^:YBBPPPPPBG77!YBYYYY#GPPPPGY?B7~~~~~!P&BGBBBBBBBBBGP5YJJJJJJJJ5BGPYJJJJJJJJJJJJJJJJJJYPGPYJYY5PP5YYBP?????JYYYJYYY5Y5555Y5JYJYYYYYJYJJYYYJJY55555P#G7~!!!!!!!!!!!!!!!!!!!!!!!!!!!    //
//    PPPPPPP55555PPP555PPBG!7BBGGGGGGPBP77!GGYYYG#PPPPPP7PY~~~~~~~Y#GPGP555YYYJJJJJJJJY5PBGP5JJJJJJJJJJJJJJJJY5PPPYJJY5PPPYJYP#5??????JYYJJYYYYYYY555JJYYJYYYJJYJYJJJJYY5555555G#Y~!!~!!!!!!!!!!!!!!!!!!!!!!7    //
//    PPPPPPPP55555PP55555BP7?BBGBBBBBBG#?!!?#YYY5&PPPPPP?YP~~~~~~~~?#GPPYJJJJJJJJJJJJ5PGPYJJJJJJJJJJJJJJYY5PPP5YYY5PPP5YYY5GB##?J????JYYYYJYYYY555Y5YJJJYJYJJJJJJJJJJYY55Y555555P#P!~!!!!!!!!!!!!!!!!!!!!!!!!    //
//    PPPPPPPPP5555PPPP555GG!?B#BBBBBBBGB5!7!BBGGG&GPPPPPJYG~~~~~~~~~?#GGPJJJJJJJJJJJJJJJJJJJJJJJJJYY55PPP55YY55PPP5YYYY5GBBGYPP??????JYJYYYJYJYY5YYYJJJJJYJJJJJJJJJJ5YY55Y555555PPBB7~~!!!!!!~!!!!!!!!!!!!!!7    //
//    PPPPPPPPPPP5PP55P5555#77GBBBBBBBBGBP!7!PGYYY#BGPPPP?5P~~~~~~~~~~Y#PGYJJJJJJJJJJJJJJJJJYY55PPPP55YYY55PPP55YYY5PGBBBG5YJ?BJ?????JYYYYYYYYYYY5YJYYJJJJJJJYJJJJJY555YYYY55555PP55G#J~~!!!!!!!!!!!!!!!!!!!!7    //
//    55PPPPPPPPP555555555YB5!5B#BBBBBBG#5!7!PGYYY&@@&###B&?~~~~~~~~~~~BGGPJJJJJJJJJJJJJJYPPPP55YYY55PPPP55YYY5PPGBBGP5YYJJJ7PP??????YYYYYYYYYYY5YJJJJJJJYJJJYJJJJY55YYYYY555PP5PP5PPPBG7~!!!!!!!!!!!!!!!!!!!7    //
//    5YY5PPPP55PPP55555555P#?7GBBBBBBBG#J777BPYYP&#&@@@&@B~~~~~~~~~~~~Y#PGYJJJJJJJJJJJPGP5YYYY5PPP55YY55PPGBBGGP5YYJJJJJJJ7YB?????JJYYJYJYYYYYYYYJJJJJJYJJJJJJJJY55555555Y5PPP5P55P5YYPB5!~!!!!!!!!!!!7!!!!!!    //
//    YYY5555PPP5PP5Y55555Y5GB77PB#BBBB#5777?#YYY##BGGGGPB?~~~~~~~~~~~~!#GGPJJJJJJJJJYBPYYYYPPP5YYY5PGBBGPP5YYJJJJJJJJJJJ?7YBJ?????JYJJJYYYYYYY5YJJJJJYYJJJJJJYJYY55Y5YYYY5555P5P555YYYY5GBY!!!7!!!!!7!!!!!!!!    //
//    Y5Y5Y5555P5P5P5Y55YY555GB?!JGBB#BY7777GPYYB@@@@@@@&J~~~~~~~~~~~~~~PBPPYJJJJJJJJBPYY5PG5YYY5GBGP5YJJJJJJJJJJJJJJJJJ?75GJ??????YYJYJY5YYYYYYJJJJJJJJJJJJJJJY555YYYYY5555555P55YYYY5YYY5BB57!!!!!!!!!!!!!!!    //
//    YYYYYY5YYY5P555555555555PB577???7777?GGY5#@@@@@@@&J~~~~~~~~~~~~~~~7#GG5JJJJJJJPBYY5G5YYYGBBPYJJJJJJJJJJJJJJJJJJJJ7JGB????????YJYYYY55YYYYJJJJJJJJJJJJJJJ55YY555555555P5555YYYYYYYYY5YGBJPPJ7!!!!!!!!!!!!    //
//    YYYYYYYYYY5YYY555555555555GGPJ????J5GP5B&@@@@@@&G7~!~~~~~~~~~~~~~~~5#PPJJJJYJJY#5YYY5PPBG5JJJJJJJJJJJJJJJJJJJJJ?JPG5BY??????JJJYYYYYYYYYYJJJJJJJJJJJJJJYYY555Y5555555555YYYYYYY5YYYYY#B7!?5P5J7!!!!!!!!!    //
//    YYY555YYYYYYYYYY555555555555PGGGG####&@@@@@@&#P?!~!!~~~~~~~~~~~~~~~~GBP5JJJPGJJYPPPPP5YJJJJJJJJJJJJJJJJJJJJJJ?YPG5?!7B??????JJYYJYYYYYYYYJJJJJ?JJJJJJYYYYY5YY555555555YYYYYY5Y5YY5PP5?YGGP?!?YPP5?!!!!!7    //
//    55YYYYYYYYYYYYJYYY5555555555Y5555#5Y5PPGGGP5J7!~!~~!~~~~~~~~~~~~~~~~~P#PJJJYBG5YJJJJJJJJJJJJJJJJJJJJJJJJJJJYPPPY?7~~^GY?????JJYYYYYYYYJJJJJJJ???JJJJYYYYYY5555555555YYYJYYYYYY55PPJ!~~!!??7!!!!7?7!!!777    //
//    5555YYYYYYYYYYYJYJYY555PPP55PPPPPB#JJJJJ?77!~~!~~~~!!!!!~~~~~~~~~~~~~~YBGYJJY5PGP5JJJJJJJJJJJJJJJJJJJJJY5PPPYJ7!~~~~^P5????JJJJJJYYYYJJJJJJJJJJJJJJYYYYYYY555555555YJYYYYYYY5PPY7~~!!!!!!!!!!!!!!!7!!77!    //
//    55555YYYYYYYYYYJYY55PPGGPPPPPPPPPPBBJJ7?7!!!!~!!!!!!!!!!!!~~~~~~~~~~~~~7PBPJJJJJJJJJJJJJJJJJJJJJJJYY5PPP5J?7!!~~~~~~^B5???JJJJJJYYYJY??JJJJJJJJJJJYYYJYYYYYYY5YY5YYYYYJYY5PPY7!~!!!!!!!!!!7!!!!!!!7!!!!7    //
//    55555Y55YYYYYY5PPPPPPPPPPPPGGGGGPPPBBY!~~~!!!!!!!!!!!!!!!!~~!!~~~~~~~~~~~!YPP55YYJJJJJJJJJJYYY5PPGPPYJ?7!~~~~~~~~~~^!&J??JJJJJYYYYYYJJJJJJ?JJJJJJJJYYYYJYJJYJ5YYJJJJY55PPY7~~!!!!!!!!!7777!!!!!777777777    //
//    5555555YY5Y5PGPP5PPPGGGGGGBPYY#GGGPPB#5!~!!!!!!!!!!!!!!!!!~!!!!~~!~~!~~~~~~~!?JY5555555PPPPP55YJ?7!!~~~~~~~~~~~~~~!!#B???JYYYJYYYYYJJJYJJJJJJ?JJYJYYYY555Y5555YJYY5PP5?!~~!!!!!!!!!!!!!!!!!!7!!!!777777!    //
//    5555555YY5GGP5PPGGGGGGGGGG?!~5BPGGGGPG#G7~!!!!!!!!!!!!!!!!!!!!!~!!!~~~~~~~~~~~~~~~!!!!!!!!!!~~~~~!~~!!!!~~~~!~~~~~7JP55YYYJJJYYYYYJ?JJJJ?J?JJJYYYYYYYY555Y55YY55PYJ7!~!!!!!!!!!!!!!!!!!!!7!!7!!!77777777    //
//    55555555GGPPPGGGGGGGGGGG#7!!!PBPPPGGGPPGB57!!!!!!!!!~!!!!!!!!!!!!!!!~!!!!!!~~!!!!~~~~~~~!!~!~~~~~!~!!~~~~~!!!!!!~~~~~~!7?J5PPP55YJ???JJ???J?JYYYYYYYY5555PPP5Y?7!~~!!!!!!!!!!!!!!!!!!!!!!!!!777777777!77    //
//    PPPP55PBGPGGGGGGGGGGGGGGB!!!!7GBGGGGGGGGGBB57~~!!!!~~!!!!J!!!!!!!!!!!!!!!~~~~~!!!!!!!~~~!!!!!!!!!!~~~!JJJJ!~!~~!~~~~!!!~~~^~!?Y5P5YYJ??????JJJYYYY5PPPP5Y?7!!~~!!!!!!!!!!!!!!!!!!!!!!77!!7!!777777777777    //
//    PPPPPBBGGGGGGGGGGGGGGGGGB5!~!~!YPGGGGGGGGGGBB57!!!!!!!!7B5!!!!!!!!!!!!!~~7????!!!!!!~~!!!!!!!!!!!!!~!P!~!7P!!~~!~~!!!!!!!!!~~~^^~!?Y55YJ??JY55PPP5YJ?!~~~~!!!!!!!!!!!!!!!!!!!!!!!7!!!777!7!!7777777777!7    //
//    PPPPBBPGPPGGGGGGGGGGGGGGPBGY?7!!7JP#GGGGGGGGGBB57~!!!!JBJ!!!!!!!!!!!!!!~YJ!~~?5!!!!!!!~!!!!!!!!!!!!!7P!Y7PP!!~~~~!!!!!!!!!!!!!!!~~~~~!?YPG5YJ?7!~~~~~!!!!!!!!!!!!!!!!!!!!!!!!!!!!777!!777777777777777!?P    //
//    PPGBBGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGB#5?77PG7!!!!!!!!!!!!!!!!GJ??7!P!!!!!!!!!!!!!!!!!!!!!~?PG^JY~!!~!~!!!!!!!!~!!!!!!!!!~~~~~!7~~~~~!!!!!!!!!!!!!!!!!!!!!!!!!!!7!!!!!!!777!77!777777777!!JGBG    //
//    PP#PPPPPPPPPPPGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGPPPGBP#5!!!!!!!!!!!!!!!!!!P5^Y5J7!!!!!!!!!!!!!!!!!!!!!!~7PY~P!!!!!!!!!!!!!!!!!!!!~~!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!7!!!!!!7777777777777!7YBBG55    //
//    5PP#GBBBB####PY55555PPPGGGGGGGGGPGGGPP55PP5PGBGBBB@B?!!!!!!!!!!!!!!!~~75Y^JJ~!!!!!!!!!!!!!!!!!!!!!!!!!7YG^57!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!7!!!!!!!!!!!!!!7777!!!!!!!!!777777777?5BBP5P55    //
//    5PBPGBGB&#B#G~~~~!?JYJ??5GBBG###BPY7?JJ?!~~~7JPB&#Y!!!!!!!!!!!!!!!!!!?PY^JJ~!!!!!!!!!!!!!!!!!!!!!!!!!!!JG~5?!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!77777!!!!!77!777777?YGBGP55PP55    //
//    PB5PBBB&BGG#5^~~~7BP#@&J~!75GB#57~^!PPB@#?^^^^7#G7!!!!!!!!!!!!!!!!!!JP?~YJ!!!!!!!!!!!!!!!!!!!!!!!!!!!!!JG~5?!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!7!!!!?YPBBP555555555    //
//    #5PBBB&#GGGB#?~^Y&#@@@@#~^^~!PG^^^7##@@@@#^^!5GP7!!!!!!!!7!!!!!!!!75P7!Y?!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!YG~P!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!7!!!7!!777!!!!!!!!!!!!!!!!!!!!!!7YPBGP555555Y5Y555    //
//    5PBBB&#BGGGGB#PYPBGGGGBGYYJ?!?BY?!?B#GGGGPPGPJYJ!!!!!!!!!!!!!!!!!?PY!?Y7!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!7PY~P~!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!7!7!77!!!!7777!!!!!!!!!!!77!!!!!!?YPGG5YYYY555Y5Y55555    //
//    PBBB#&BGGGGGPPPPPPP5P55555555G#GPPBPPPPPGBGJ!JY7!!!!!!!!!!!!!!!75577YJ!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!JG!JJ~!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!77!7!!7777!!7777!!!!!!!!!!777!!7YPBG55YYYYYYY5555YY5555    //
//    BBBB&#BGGGGGGGGGGGGGGGGGGGGGPGGGGPPBGB##G?!!YY7!!!!!!!!77!!!!!J5?!JY7!!!!77!!!!!!!!!!!!!!!!!!!!!!!!!!7PY~P!!!!!!!!!!!!!!!!!!!!                                                                              //
//                                                                                                                                                                                                                //
//                                                                                                                                                                                                                //
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////


contract RDE2 is ERC1155Creator {
    constructor() ERC1155Creator() {}
}

// File: contracts/ERC1155Creator.sol




// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/// @author: manifold.xyz

import "@openzeppelin/contracts/proxy/Proxy.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/StorageSlot.sol";

contract ERC1155Creator is Proxy {

    constructor() {
        assert(_IMPLEMENTATION_SLOT == bytes32(uint256(keccak256("eip1967.proxy.implementation")) - 1));
        StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = 0x142FD5b9d67721EfDA3A5E2E9be47A96c9B724A4;
        Address.functionDelegateCall(
            0x142FD5b9d67721EfDA3A5E2E9be47A96c9B724A4,
            abi.encodeWithSignature("initialize()")
        );
    }

    /**
     * @dev Storage slot with the address of the current implementation.
     * This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1, and is
     * validated in the constructor.
     */
    bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;

    /**
     * @dev Returns the current implementation address.
     */
     function implementation() public view returns (address) {
        return _implementation();
    }

    function _implementation() internal override view returns (address) {
        return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;
    }    

}

// File: node_modules/@openzeppelin/contracts/proxy/Proxy.sol



// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (proxy/Proxy.sol)

pragma solidity ^0.8.0;

/**
 * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM
 * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to
 * be specified by overriding the virtual {_implementation} function.
 *
 * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a
 * different contract through the {_delegate} function.
 *
 * The success and return data of the delegated call will be returned back to the caller of the proxy.
 */
abstract contract Proxy {
    /**
     * @dev Delegates the current call to `implementation`.
     *
     * This function does not return to its internal call site, it will return directly to the external caller.
     */
    function _delegate(address implementation) internal virtual {
        assembly {
            // Copy msg.data. We take full control of memory in this inline assembly
            // block because it will not return to Solidity code. We overwrite the
            // Solidity scratch pad at memory position 0.
            calldatacopy(0, 0, calldatasize())

            // Call the implementation.
            // out and outsize are 0 because we don't know the size yet.
            let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)

            // Copy the returned data.
            returndatacopy(0, 0, returndatasize())

            switch result
            // delegatecall returns 0 on error.
            case 0 {
                revert(0, returndatasize())
            }
            default {
                return(0, returndatasize())
            }
        }
    }

    /**
     * @dev This is a virtual function that should be overridden so it returns the address to which the fallback function
     * and {_fallback} should delegate.
     */
    function _implementation() internal view virtual returns (address);

    /**
     * @dev Delegates the current call to the address returned by `_implementation()`.
     *
     * This function does not return to its internal call site, it will return directly to the external caller.
     */
    function _fallback() internal virtual {
        _beforeFallback();
        _delegate(_implementation());
    }

    /**
     * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other
     * function in the contract matches the call data.
     */
    fallback() external payable virtual {
        _fallback();
    }

    /**
     * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data
     * is empty.
     */
    receive() external payable virtual {
        _fallback();
    }

    /**
     * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`
     * call, or as part of the Solidity `fallback` or `receive` functions.
     *
     * If overridden should call `super._beforeFallback()`.
     */
    function _beforeFallback() internal virtual {}
}

// File: node_modules/@openzeppelin/contracts/utils/Address.sol



// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly
                /// @solidity memory-safe-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

// File: node_modules/@openzeppelin/contracts/utils/StorageSlot.sol



// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol)

pragma solidity ^0.8.0;

/**
 * @dev Library for reading and writing primitive types to specific storage slots.
 *
 * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.
 * This library helps with reading and writing to such slots without the need for inline assembly.
 *
 * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.
 *
 * Example usage to set ERC1967 implementation slot:
 * ```
 * contract ERC1967 {
 *     bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
 *
 *     function _getImplementation() internal view returns (address) {
 *         return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;
 *     }
 *
 *     function _setImplementation(address newImplementation) internal {
 *         require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract");
 *         StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;
 *     }
 * }
 * ```
 *
 * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._
 */
library StorageSlot {
    struct AddressSlot {
        address value;
    }

    struct BooleanSlot {
        bool value;
    }

    struct Bytes32Slot {
        bytes32 value;
    }

    struct Uint256Slot {
        uint256 value;
    }

    /**
     * @dev Returns an `AddressSlot` with member `value` located at `slot`.
     */
    function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := slot
        }
    }

    /**
     * @dev Returns an `BooleanSlot` with member `value` located at `slot`.
     */
    function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := slot
        }
    }

    /**
     * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.
     */
    function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := slot
        }
    }

    /**
     * @dev Returns an `Uint256Slot` with member `value` located at `slot`.
     */
    function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := slot
        }
    }
}