diff --git a/packages/contracts/mastercopies.json b/packages/contracts/mastercopies.json new file mode 100644 index 0000000..eab70c0 --- /dev/null +++ b/packages/contracts/mastercopies.json @@ -0,0 +1,1149 @@ +{ + "ExitERC20": { + "1.1.0": { + "contractName": "ExitERC20", + "sourceName": "contracts/ExitModule/ExitERC20Module.sol", + "contractVersion": "1.1.0", + "compilerVersion": "v0.8.6+commit.11564f7e", + "factory": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "address": "0xc67f5aD16f91BAf6839BBBbf98549453b1B02C68", + "bytecode": "0x60806040523480156200001157600080fd5b50604051620046ba380380620046ba8339818101604052810190620000379190620008c0565b6001606981905550600085858585856040516020016200005c95949392919062000a1c565b60405160208183030381529060405290506200007e816200008a60201b60201c565b50505050505062000cce565b600080600080600085806020019051810190620000a8919062000838565b94509450945094509450620000c26200031f60201b60201c565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16141562000135576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200012c9062000b01565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415620001a8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200019f9062000a9b565b60405180910390fd5b83606660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555082606760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081606a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080606b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550620002bd856200041e60201b60201c565b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f98b6e848bcb9ab7cb2c546075f85f11bb4e96cbcbcb49aab03e65f45c33c621360405160405180910390a3505050505050565b600060019054906101000a900460ff168062000346575060008054906101000a900460ff16155b62000388576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200037f9062000abd565b60405180910390fd5b60008060019054906101000a900460ff161590508015620003d9576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b620003e96200053460201b60201c565b620003f96200061360201b60201c565b80156200041b5760008060016101000a81548160ff0219169083151502179055505b50565b6200042e6200071260201b60201c565b73ffffffffffffffffffffffffffffffffffffffff16620004546200071a60201b60201c565b73ffffffffffffffffffffffffffffffffffffffff1614620004ad576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620004a49062000adf565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141562000520576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620005179062000a79565b60405180910390fd5b62000531816200074460201b60201c565b50565b600060019054906101000a900460ff16806200055b575060008054906101000a900460ff16155b6200059d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620005949062000abd565b60405180910390fd5b60008060019054906101000a900460ff161590508015620005ee576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b8015620006105760008060016101000a81548160ff0219169083151502179055505b50565b600060019054906101000a900460ff16806200063a575060008054906101000a900460ff16155b6200067c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620006739062000abd565b60405180910390fd5b60008060019054906101000a900460ff161590508015620006cd576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b620006ed620006e16200071260201b60201c565b6200074460201b60201c565b80156200070f5760008060016101000a81548160ff0219169083151502179055505b50565b600033905090565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081603360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6000815190506200081b8162000c9a565b92915050565b600081519050620008328162000cb4565b92915050565b600080600080600060a0868803121562000857576200085662000b7c565b5b6000620008678882890162000821565b95505060206200087a8882890162000821565b94505060406200088d8882890162000821565b9350506060620008a08882890162000821565b9250506080620008b38882890162000821565b9150509295509295909350565b600080600080600060a08688031215620008df57620008de62000b7c565b5b6000620008ef888289016200080a565b955050602062000902888289016200080a565b945050604062000915888289016200080a565b935050606062000928888289016200080a565b92505060806200093b888289016200080a565b9150509295509295909350565b620009538162000b34565b82525050565b60006200096860268362000b23565b9150620009758262000b81565b604082019050919050565b60006200098f601e8362000b23565b91506200099c8262000bd0565b602082019050919050565b6000620009b6602e8362000b23565b9150620009c38262000bf9565b604082019050919050565b6000620009dd60208362000b23565b9150620009ea8262000c48565b602082019050919050565b600062000a04601e8362000b23565b915062000a118262000c71565b602082019050919050565b600060a08201905062000a33600083018862000948565b62000a42602083018762000948565b62000a51604083018662000948565b62000a60606083018562000948565b62000a6f608083018462000948565b9695505050505050565b6000602082019050818103600083015262000a948162000959565b9050919050565b6000602082019050818103600083015262000ab68162000980565b9050919050565b6000602082019050818103600083015262000ad881620009a7565b9050919050565b6000602082019050818103600083015262000afa81620009ce565b9050919050565b6000602082019050818103600083015262000b1c81620009f5565b9050919050565b600082825260208201905092915050565b600062000b418262000b5c565b9050919050565b600062000b558262000b5c565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600080fd5b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f5461726765742063616e206e6f74206265207a65726f20616464726573730000600082015250565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160008201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f4176617461722063616e206e6f74206265207a65726f20616464726573730000600082015250565b62000ca58162000b34565b811462000cb157600080fd5b50565b62000cbf8162000b48565b811462000ccb57600080fd5b50565b6139dc8062000cde6000396000f3fe608060405234801561001057600080fd5b50600436106101375760003560e01c80638da5cb5b116100b8578063b68877101161007c578063b6887710146102ee578063c91063891461031e578063d4b839921461033c578063e19a9dd91461035a578063ef96880414610376578063f2fde38b1461039257610137565b80638da5cb5b1461025e5780639358928b1461027c578063a4f9edbf1461029a578063ac346e89146102b6578063af20af8a146102d257610137565b8063715018a6116100ff578063715018a6146101e0578063776d1a01146101ea5780637c89d2f0146102065780637ceab3b114610224578063826bec451461024257610137565b806301ffc9a71461013c57806302ada99c1461016c578063086cfca8146101885780632b112e49146101a45780635aef7de6146101c2575b600080fd5b61015660048036038101906101519190612778565b6103ae565b6040516101639190612e01565b60405180910390f35b61018660048036038101906101819190612656565b610410565b005b6101a2600480360381019061019d9190612656565b6104d0565b005b6101ac610612565b6040516101b991906130f8565b60405180910390f35b6101ca6106b9565b6040516101d79190612c81565b60405180910390f35b6101e86106df565b005b61020460048036038101906101ff9190612656565b610767565b005b61020e6108a9565b60405161021b9190612e7b565b60405180910390f35b61022c6108cf565b6040516102399190612c81565b60405180910390f35b61025c600480360381019061025791906126fe565b6108f5565b005b610266610ad3565b6040516102739190612c81565b60405180910390f35b610284610afd565b6040516102919190612e60565b60405180910390f35b6102b460048036038101906102af91906127a5565b610b23565b005b6102d060048036038101906102cb91906126fe565b610da0565b005b6102ec60048036038101906102e7919061281b565b610f7d565b005b61030860048036038101906103039190612656565b61128f565b6040516103159190612e01565b60405180910390f35b6103266112af565b6040516103339190612c81565b60405180910390f35b6103446112d9565b6040516103519190612c81565b60405180910390f35b610374600480360381019061036f9190612656565b6112ff565b005b610390600480360381019061038b9190612656565b611535565b005b6103ac60048036038101906103a79190612656565b6115f5565b005b60006301ffc9a760e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610409575063af20af8a60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b9050919050565b6104186116ed565b73ffffffffffffffffffffffffffffffffffffffff16610436610ad3565b73ffffffffffffffffffffffffffffffffffffffff161461048c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161048390612f98565b60405180910390fd5b80606a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6104d86116ed565b73ffffffffffffffffffffffffffffffffffffffff166104f6610ad3565b73ffffffffffffffffffffffffffffffffffffffff161461054c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161054390612f98565b60405180910390fd5b6000606660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081606660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f52ae88b092de36f87fb43fe794eb1381023b9c1bce563a871154022c63dce34260405160405180910390a35050565b6000606b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636d4ce63c6040518163ffffffff1660e01b815260040160206040518083038186803b15801561067c57600080fd5b505afa158015610690573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106b491906127ee565b905090565b606660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6106e76116ed565b73ffffffffffffffffffffffffffffffffffffffff16610705610ad3565b73ffffffffffffffffffffffffffffffffffffffff161461075b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161075290612f98565b60405180910390fd5b61076560006116f5565b565b61076f6116ed565b73ffffffffffffffffffffffffffffffffffffffff1661078d610ad3565b73ffffffffffffffffffffffffffffffffffffffff16146107e3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107da90612f98565b60405180910390fd5b6000606760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081606760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f90cc2f570a6eb594b1580ea3e41247d2d73a55281889e86bd4ec2fc29c7e62d660405160405180910390a35050565b606a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b606560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6108fd6116ed565b73ffffffffffffffffffffffffffffffffffffffff1661091b610ad3565b73ffffffffffffffffffffffffffffffffffffffff1614610971576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161096890612f98565b60405180910390fd5b60005b828290508160ff161015610ace576068600084848460ff1681811061099c5761099b6134a6565b5b90506020020160208101906109b19190612656565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615610a39576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a3090612fd8565b60405180910390fd5b60016068600085858560ff16818110610a5557610a546134a6565b5b9050602002016020810190610a6a9190612656565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610ac6906133ef565b915050610974565b505050565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600080600085806020019051810190610b3f9190612683565b94509450945094509450610b516117bb565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415610bc1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bb890612fb8565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610c31576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c2890612f38565b60405180910390fd5b83606660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555082606760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081606a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080606b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610d3e856115f5565b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f98b6e848bcb9ab7cb2c546075f85f11bb4e96cbcbcb49aab03e65f45c33c621360405160405180910390a3505050505050565b610da86116ed565b73ffffffffffffffffffffffffffffffffffffffff16610dc6610ad3565b73ffffffffffffffffffffffffffffffffffffffff1614610e1c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e1390612f98565b60405180910390fd5b60005b828290508160ff161015610f78576068600084848460ff16818110610e4757610e466134a6565b5b9050602002016020810190610e5c9190612656565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16610ee3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610eda90612eb8565b60405180910390fd5b60006068600085858560ff16818110610eff57610efe6134a6565b5b9050602002016020810190610f149190612656565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610f70906133ef565b915050610e1f565b505050565b60026069541415610fc3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fba906130b8565b60405180910390fd5b600260698190555082606a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b81526004016110279190612c81565b60206040518083038186803b15801561103f57600080fd5b505afa158015611053573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061107791906127ee565b10156110b8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110af90613018565b60405180910390fd5b60005b828290508160ff16101561119757606a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1683838360ff16818110611118576111176134a6565b5b905060200201602081019061112d9190612656565b73ffffffffffffffffffffffffffffffffffffffff161415611184576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161117b90613058565b60405180910390fd5b808061118f906133ef565b9150506110bb565b506000836111a3610612565b6040516020016111b4929190613113565b604051602081830303815290604052905061123633606660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1686606a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166118a4909392919063ffffffff16565b611281838380806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508261192d565b506001606981905550505050565b60686020528060005260406000206000915054906101000a900460ff1681565b6000606560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6113076116ed565b73ffffffffffffffffffffffffffffffffffffffff16611325610ad3565b73ffffffffffffffffffffffffffffffffffffffff161461137b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161137290612f98565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611498578073ffffffffffffffffffffffffffffffffffffffff166301ffc9a77fe6d7a83a000000000000000000000000000000000000000000000000000000006040518263ffffffff1660e01b81526004016114089190612e45565b60206040518083038186803b15801561142057600080fd5b505afa158015611434573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611458919061274b565b611497576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161148e90612ff8565b60405180910390fd5b5b80606560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f1151116914515bc0891ff9047a6cb32cf902546f83066499bcf8ba33d2353fa2606560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660405161152a9190612c81565b60405180910390a150565b61153d6116ed565b73ffffffffffffffffffffffffffffffffffffffff1661155b610ad3565b73ffffffffffffffffffffffffffffffffffffffff16146115b1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115a890612f98565b60405180910390fd5b80606b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6115fd6116ed565b73ffffffffffffffffffffffffffffffffffffffff1661161b610ad3565b73ffffffffffffffffffffffffffffffffffffffff1614611671576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161166890612f98565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156116e1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116d890612ef8565b60405180910390fd5b6116ea816116f5565b50565b600033905090565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081603360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600060019054906101000a900460ff16806117e1575060008054906101000a900460ff16155b611820576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161181790612f58565b60405180910390fd5b60008060019054906101000a900460ff161590508015611870576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b611878611c7b565b611880611d54565b80156118a15760008060016101000a81548160ff0219169083151502179055505b50565b611927846323b872dd60e01b8585856040516024016118c593929190612c9c565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611e3d565b50505050565b6000606660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163111156119bc576119bb336119b6606660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163184611f04565b611f42565b5b60008060005b84518160ff161015611c315760686000868360ff16815181106119e8576119e76134a6565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615611a78576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a6f90613098565b60405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff16858260ff1681518110611aa557611aa46134a6565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1611611b03576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611afa906130d8565b60405180910390fd5b848160ff1681518110611b1957611b186134a6565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff166370a08231606660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518263ffffffff1660e01b8152600401611b7b9190612c81565b60206040518083038186803b158015611b9357600080fd5b505afa158015611ba7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bcb91906127ee565b9150611bfe858260ff1681518110611be657611be56134a6565b5b602002602001015133611bf98588611f04565b611fc7565b848160ff1681518110611c1457611c136134a6565b5b602002602001015192508080611c29906133ef565b9150506119c2565b503373ffffffffffffffffffffffffffffffffffffffff167f19713765ac35da5948240df5d5347716cd4dc3815a2890a3c94df4a1e745136a60405160405180910390a250505050565b600060019054906101000a900460ff1680611ca1575060008054906101000a900460ff16155b611ce0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611cd790612f58565b60405180910390fd5b60008060019054906101000a900460ff161590508015611d30576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b8015611d515760008060016101000a81548160ff0219169083151502179055505b50565b600060019054906101000a900460ff1680611d7a575060008054906101000a900460ff16155b611db9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611db090612f58565b60405180910390fd5b60008060019054906101000a900460ff161590508015611e09576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b611e19611e146116ed565b6116f5565b8015611e3a5760008060016101000a81548160ff0219169083151502179055505b50565b6000611e9f826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166120779092919063ffffffff16565b9050600081511115611eff5780806020019051810190611ebf919061274b565b611efe576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ef590613078565b60405180910390fd5b5b505050565b600080600083806020019051810190611f1d919061287b565b91509150808583611f2e9190613206565b611f3891906131d5565b9250505092915050565b611f8482826040518060400160405280600281526020017f3078000000000000000000000000000000000000000000000000000000000000815250600061208f565b611fc3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611fba90612f78565b60405180910390fd5b5050565b600063a9059cbb8383604051602401611fe1929190612cd3565b6040516020818303038152906040529060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905061203284600083600061208f565b612071576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161206890612ed8565b60405180910390fd5b50505050565b60606120868484600085612384565b90509392505050565b60008073ffffffffffffffffffffffffffffffffffffffff16606560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146121c157606560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166375f0bb528686868660008060008060006040518060400160405280600281526020017f307800000000000000000000000000000000000000000000000000000000000081525060006040518c63ffffffff1660e01b815260040161218e9b9a99989796959493929190612d48565b600060405180830381600087803b1580156121a857600080fd5b505af11580156121bc573d6000803e3d6000fd5b505050505b606760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663468721a7868686866040518563ffffffff1660e01b81526004016122229493929190612cfc565b602060405180830381600087803b15801561223c57600080fd5b505af1158015612250573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612274919061274b565b9050600073ffffffffffffffffffffffffffffffffffffffff16606560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461237c57606560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663932713687f3078000000000000000000000000000000000000000000000000000000000000836040518363ffffffff1660e01b8152600401612349929190612e1c565b600060405180830381600087803b15801561236357600080fd5b505af1158015612377573d6000803e3d6000fd5b505050505b949350505050565b6060824710156123c9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016123c090612f18565b60405180910390fd5b6123d285612498565b612411576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161240890613038565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff16858760405161243a9190612c6a565b60006040518083038185875af1925050503d8060008114612477576040519150601f19603f3d011682016040523d82523d6000602084013e61247c565b606091505b509150915061248c8282866124ab565b92505050949350505050565b600080823b905060008111915050919050565b606083156124bb5782905061250b565b6000835111156124ce5782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125029190612e96565b60405180910390fd5b9392505050565b600061252561252084613161565b61313c565b90508281526020810184848401111561254157612540613513565b5b61254c84828561337c565b509392505050565b60008135905061256381613933565b92915050565b6000815190506125788161394a565b92915050565b60008083601f84011261259457612593613509565b5b8235905067ffffffffffffffff8111156125b1576125b0613504565b5b6020830191508360208202830111156125cd576125cc61350e565b5b9250929050565b6000815190506125e381613961565b92915050565b6000813590506125f881613978565b92915050565b600082601f83011261261357612612613509565b5b8135612623848260208601612512565b91505092915050565b60008135905061263b8161398f565b92915050565b6000815190506126508161398f565b92915050565b60006020828403121561266c5761266b61351d565b5b600061267a84828501612554565b91505092915050565b600080600080600060a0868803121561269f5761269e61351d565b5b60006126ad88828901612569565b95505060206126be88828901612569565b94505060406126cf88828901612569565b93505060606126e088828901612569565b92505060806126f188828901612569565b9150509295509295909350565b600080602083850312156127155761271461351d565b5b600083013567ffffffffffffffff81111561273357612732613518565b5b61273f8582860161257e565b92509250509250929050565b6000602082840312156127615761276061351d565b5b600061276f848285016125d4565b91505092915050565b60006020828403121561278e5761278d61351d565b5b600061279c848285016125e9565b91505092915050565b6000602082840312156127bb576127ba61351d565b5b600082013567ffffffffffffffff8111156127d9576127d8613518565b5b6127e5848285016125fe565b91505092915050565b6000602082840312156128045761280361351d565b5b600061281284828501612641565b91505092915050565b6000806000604084860312156128345761283361351d565b5b60006128428682870161262c565b935050602084013567ffffffffffffffff81111561286357612862613518565b5b61286f8682870161257e565b92509250509250925092565b600080604083850312156128925761289161351d565b5b60006128a085828601612641565b92505060206128b185828601612641565b9150509250929050565b6128c481613272565b82525050565b6128d381613260565b82525050565b6128e281613284565b82525050565b6128f181613290565b82525050565b6129008161329a565b82525050565b600061291182613192565b61291b81856131a8565b935061292b81856020860161338b565b61293481613522565b840191505092915050565b600061294a82613192565b61295481856131b9565b935061296481856020860161338b565b80840191505092915050565b61297981613310565b82525050565b61298881613334565b82525050565b61299781613358565b82525050565b6129a68161336a565b82525050565b60006129b78261319d565b6129c181856131c4565b93506129d181856020860161338b565b6129da81613522565b840191505092915050565b60006129f26010836131c4565b91506129fd82613533565b602082019050919050565b6000612a156017836131c4565b9150612a208261355c565b602082019050919050565b6000612a386026836131c4565b9150612a4382613585565b604082019050919050565b6000612a5b6026836131c4565b9150612a66826135d4565b604082019050919050565b6000612a7e601e836131c4565b9150612a8982613623565b602082019050919050565b6000612aa1602e836131c4565b9150612aac8261364c565b604082019050919050565b6000612ac4601e836131c4565b9150612acf8261369b565b602082019050919050565b6000612ae76020836131c4565b9150612af2826136c4565b602082019050919050565b6000612b0a601e836131c4565b9150612b15826136ed565b602082019050919050565b6000612b2d6014836131c4565b9150612b3882613716565b602082019050919050565b6000612b506020836131c4565b9150612b5b8261373f565b602082019050919050565b6000612b736028836131c4565b9150612b7e82613768565b604082019050919050565b6000612b96601d836131c4565b9150612ba1826137b7565b602082019050919050565b6000612bb96022836131c4565b9150612bc4826137e0565b604082019050919050565b6000612bdc602a836131c4565b9150612be78261382f565b604082019050919050565b6000612bff600c836131c4565b9150612c0a8261387e565b602082019050919050565b6000612c22601f836131c4565b9150612c2d826138a7565b602082019050919050565b6000612c456030836131c4565b9150612c50826138d0565b604082019050919050565b612c64816132f9565b82525050565b6000612c76828461293f565b915081905092915050565b6000602082019050612c9660008301846128ca565b92915050565b6000606082019050612cb160008301866128ca565b612cbe60208301856128ca565b612ccb6040830184612c5b565b949350505050565b6000604082019050612ce860008301856128ca565b612cf56020830184612c5b565b9392505050565b6000608082019050612d1160008301876128ca565b612d1e6020830186612c5b565b8181036040830152612d308185612906565b9050612d3f606083018461298e565b95945050505050565b600061016082019050612d5e600083018e6128ca565b612d6b602083018d612c5b565b8181036040830152612d7d818c612906565b9050612d8c606083018b61298e565b612d99608083018a61299d565b612da660a083018961299d565b612db360c083018861299d565b612dc060e08301876128ca565b612dce6101008301866128bb565b818103610120830152612de18185612906565b9050612df16101408301846128ca565b9c9b505050505050505050505050565b6000602082019050612e1660008301846128d9565b92915050565b6000604082019050612e3160008301856128e8565b612e3e60208301846128d9565b9392505050565b6000602082019050612e5a60008301846128f7565b92915050565b6000602082019050612e756000830184612970565b92915050565b6000602082019050612e90600083018461297f565b92915050565b60006020820190508181036000830152612eb081846129ac565b905092915050565b60006020820190508181036000830152612ed1816129e5565b9050919050565b60006020820190508181036000830152612ef181612a08565b9050919050565b60006020820190508181036000830152612f1181612a2b565b9050919050565b60006020820190508181036000830152612f3181612a4e565b9050919050565b60006020820190508181036000830152612f5181612a71565b9050919050565b60006020820190508181036000830152612f7181612a94565b9050919050565b60006020820190508181036000830152612f9181612ab7565b9050919050565b60006020820190508181036000830152612fb181612ada565b9050919050565b60006020820190508181036000830152612fd181612afd565b9050919050565b60006020820190508181036000830152612ff181612b20565b9050919050565b6000602082019050818103600083015261301181612b43565b9050919050565b6000602082019050818103600083015261303181612b66565b9050919050565b6000602082019050818103600083015261305181612b89565b9050919050565b6000602082019050818103600083015261307181612bac565b9050919050565b6000602082019050818103600083015261309181612bcf565b9050919050565b600060208201905081810360008301526130b181612bf2565b9050919050565b600060208201905081810360008301526130d181612c15565b9050919050565b600060208201905081810360008301526130f181612c38565b9050919050565b600060208201905061310d6000830184612c5b565b92915050565b60006040820190506131286000830185612c5b565b6131356020830184612c5b565b9392505050565b6000613146613157565b905061315282826133be565b919050565b6000604051905090565b600067ffffffffffffffff82111561317c5761317b6134d5565b5b61318582613522565b9050602081019050919050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b60006131e0826132f9565b91506131eb836132f9565b9250826131fb576131fa613448565b5b828204905092915050565b6000613211826132f9565b915061321c836132f9565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561325557613254613419565b5b828202905092915050565b600061326b826132d9565b9050919050565b600061327d826132d9565b9050919050565b60008115159050919050565b6000819050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b60008190506132d48261391f565b919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b600061331b82613322565b9050919050565b600061332d826132d9565b9050919050565b600061333f82613346565b9050919050565b6000613351826132d9565b9050919050565b6000613363826132c6565b9050919050565b6000613375826132f9565b9050919050565b82818337600083830152505050565b60005b838110156133a957808201518184015260208101905061338e565b838111156133b8576000848401525b50505050565b6133c782613522565b810181811067ffffffffffffffff821117156133e6576133e56134d5565b5b80604052505050565b60006133fa82613303565b915060ff82141561340e5761340d613419565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f546f6b656e206e6f742064656e69656400000000000000000000000000000000600082015250565b7f4572726f72206f6e20746f6b656e207472616e73666572000000000000000000600082015250565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b7f5461726765742063616e206e6f74206265207a65726f20616464726573730000600082015250565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160008201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b7f4572726f72206f6e206e6174697665206173736574207472616e736665720000600082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f4176617461722063616e206e6f74206265207a65726f20616464726573730000600082015250565b7f546f6b656e20616c72656164792064656e696564000000000000000000000000600082015250565b7f477561726420646f6573206e6f7420696d706c656d656e742049455243313635600082015250565b7f416d6f756e7420746f2072656465656d2069732067726561746572207468616e60008201527f2062616c616e6365000000000000000000000000000000000000000000000000602082015250565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b7f44657369676e6174656420746f6b656e2063616e27742062652072656465656d60008201527f6564000000000000000000000000000000000000000000000000000000000000602082015250565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b7f44656e69656420746f6b656e0000000000000000000000000000000000000000600082015250565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00600082015250565b7f746f6b656e735b5d206973206f7574206f66206f72646572206f7220636f6e7460008201527f61696e732061206475706c696361746500000000000000000000000000000000602082015250565b600281106139305761392f613477565b5b50565b61393c81613260565b811461394757600080fd5b50565b61395381613272565b811461395e57600080fd5b50565b61396a81613284565b811461397557600080fd5b50565b6139818161329a565b811461398c57600080fd5b50565b613998816132f9565b81146139a357600080fd5b5056fea26469706673582212208c65cc2f2a81895da88aec1d287825dfca91c2a1e56b0960e857a8827a2d7fc264736f6c63430008060033", + "constructorArgs": { + "types": [ + "address", + "address", + "address", + "address", + "address" + ], + "values": [ + "0x0000000000000000000000000000000000000001", + "0x0000000000000000000000000000000000000001", + "0x0000000000000000000000000000000000000001", + "0x0000000000000000000000000000000000000001", + "0x0000000000000000000000000000000000000001" + ] + }, + "salt": "0x0000000000000000000000000000000000000000000000000000000000000000", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_owner", + "type": "address" + }, + { + "internalType": "address", + "name": "_avatar", + "type": "address" + }, + { + "internalType": "address", + "name": "_target", + "type": "address" + }, + { + "internalType": "address", + "name": "_designatedToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_circulatingSupply", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousAvatar", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newAvatar", + "type": "address" + } + ], + "name": "AvatarSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "guard", + "type": "address" + } + ], + "name": "ChangedGuard", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "initiator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "avatar", + "type": "address" + } + ], + "name": "ExitModuleSetup", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "leaver", + "type": "address" + } + ], + "name": "ExitSuccessful", + "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": true, + "internalType": "address", + "name": "previousTarget", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newTarget", + "type": "address" + } + ], + "name": "TargetSet", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "tokens", + "type": "address[]" + } + ], + "name": "addToDenyList", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "avatar", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "circulatingSupply", + "outputs": [ + { + "internalType": "contract CirculatingSupplyERC20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "deniedTokens", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "designatedToken", + "outputs": [ + { + "internalType": "contract ERC20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amountToRedeem", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "tokens", + "type": "address[]" + } + ], + "name": "exit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "getCirculatingSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getGuard", + "outputs": [ + { + "internalType": "address", + "name": "_guard", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "guard", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "tokens", + "type": "address[]" + } + ], + "name": "removeFromDenyList", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_avatar", + "type": "address" + } + ], + "name": "setAvatar", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_circulatingSupply", + "type": "address" + } + ], + "name": "setCirculatingSupply", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_token", + "type": "address" + } + ], + "name": "setDesignatedToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_guard", + "type": "address" + } + ], + "name": "setGuard", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_target", + "type": "address" + } + ], + "name": "setTarget", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "initParams", + "type": "bytes" + } + ], + "name": "setUp", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceID", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "target", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "compilerInput": { + "language": "Solidity", + "sources": { + "@gnosis.pm/safe-contracts/contracts/common/Enum.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\n/// @title Enum - Collection of enums\n/// @author Richard Meissner - \ncontract Enum {\n enum Operation {Call, DelegateCall}\n}\n" + }, + "@gnosis.pm/zodiac/contracts/core/Module.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\n\n/// @title Module Interface - A contract that can pass messages to a Module Manager contract if enabled by that contract.\npragma solidity >=0.7.0 <0.9.0;\n\nimport \"../interfaces/IAvatar.sol\";\nimport \"../factory/FactoryFriendly.sol\";\nimport \"../guard/Guardable.sol\";\n\nabstract contract Module is FactoryFriendly, Guardable {\n /// @dev Emitted each time the avatar is set.\n event AvatarSet(address indexed previousAvatar, address indexed newAvatar);\n /// @dev Emitted each time the Target is set.\n event TargetSet(address indexed previousTarget, address indexed newTarget);\n\n /// @dev Address that will ultimately execute function calls.\n address public avatar;\n /// @dev Address that this module will pass transactions to.\n address public target;\n\n /// @dev Sets the avatar to a new avatar (`newAvatar`).\n /// @notice Can only be called by the current owner.\n function setAvatar(address _avatar) public onlyOwner {\n address previousAvatar = avatar;\n avatar = _avatar;\n emit AvatarSet(previousAvatar, _avatar);\n }\n\n /// @dev Sets the target to a new target (`newTarget`).\n /// @notice Can only be called by the current owner.\n function setTarget(address _target) public onlyOwner {\n address previousTarget = target;\n target = _target;\n emit TargetSet(previousTarget, _target);\n }\n\n /// @dev Passes a transaction to be executed by the avatar.\n /// @notice Can only be called by this contract.\n /// @param to Destination address of module transaction.\n /// @param value Ether value of module transaction.\n /// @param data Data payload of module transaction.\n /// @param operation Operation type of module transaction: 0 == call, 1 == delegate call.\n function exec(\n address to,\n uint256 value,\n bytes memory data,\n Enum.Operation operation\n ) internal returns (bool success) {\n /// check if a transactioon guard is enabled.\n if (guard != address(0)) {\n IGuard(guard).checkTransaction(\n /// Transaction info used by module transactions\n to,\n value,\n data,\n operation,\n /// Zero out the redundant transaction information only used for Safe multisig transctions\n 0,\n 0,\n 0,\n address(0),\n payable(0),\n bytes(\"0x\"),\n address(0)\n );\n }\n success = IAvatar(target).execTransactionFromModule(\n to,\n value,\n data,\n operation\n );\n if (guard != address(0)) {\n IGuard(guard).checkAfterExecution(bytes32(\"0x\"), success);\n }\n return success;\n }\n\n /// @dev Passes a transaction to be executed by the target and returns data.\n /// @notice Can only be called by this contract.\n /// @param to Destination address of module transaction.\n /// @param value Ether value of module transaction.\n /// @param data Data payload of module transaction.\n /// @param operation Operation type of module transaction: 0 == call, 1 == delegate call.\n function execAndReturnData(\n address to,\n uint256 value,\n bytes memory data,\n Enum.Operation operation\n ) internal returns (bool success, bytes memory returnData) {\n /// check if a transactioon guard is enabled.\n if (guard != address(0)) {\n IGuard(guard).checkTransaction(\n /// Transaction info used by module transactions\n to,\n value,\n data,\n operation,\n /// Zero out the redundant transaction information only used for Safe multisig transctions\n 0,\n 0,\n 0,\n address(0),\n payable(0),\n bytes(\"0x\"),\n address(0)\n );\n }\n (success, returnData) = IAvatar(target)\n .execTransactionFromModuleReturnData(to, value, data, operation);\n if (guard != address(0)) {\n IGuard(guard).checkAfterExecution(bytes32(\"0x\"), success);\n }\n return (success, returnData);\n }\n}\n" + }, + "@gnosis.pm/zodiac/contracts/factory/FactoryFriendly.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\n\n/// @title Zodiac FactoryFriendly - A contract that allows other contracts to be initializable and pass bytes as arguments to define contract state\npragma solidity >=0.7.0 <0.9.0;\n\nimport \"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\";\n\nabstract contract FactoryFriendly is OwnableUpgradeable {\n function setUp(bytes memory initializeParams) public virtual;\n}\n" + }, + "@gnosis.pm/zodiac/contracts/guard/BaseGuard.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\nimport \"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\";\nimport \"@openzeppelin/contracts/utils/introspection/IERC165.sol\";\nimport \"../interfaces/IGuard.sol\";\n\nabstract contract BaseGuard is IERC165 {\n function supportsInterface(bytes4 interfaceId)\n external\n pure\n override\n returns (bool)\n {\n return\n interfaceId == type(IGuard).interfaceId || // 0xe6d7a83a\n interfaceId == type(IERC165).interfaceId; // 0x01ffc9a7\n }\n\n /// Module transactions only use the first four parameters: to, value, data, and operation.\n /// Module.sol hardcodes the remaining parameters as 0 since they are not used for module transactions.\n /// This interface is used to maintain compatibilty with Gnosis Safe transaction guards.\n function checkTransaction(\n address to,\n uint256 value,\n bytes memory data,\n Enum.Operation operation,\n uint256 safeTxGas,\n uint256 baseGas,\n uint256 gasPrice,\n address gasToken,\n address payable refundReceiver,\n bytes memory signatures,\n address msgSender\n ) external virtual;\n\n function checkAfterExecution(bytes32 txHash, bool success) external virtual;\n}\n" + }, + "@gnosis.pm/zodiac/contracts/guard/Guardable.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\nimport \"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\";\nimport \"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\";\nimport \"./BaseGuard.sol\";\n\n/// @title Guardable - A contract that manages fallback calls made to this contract\ncontract Guardable is OwnableUpgradeable {\n event ChangedGuard(address guard);\n\n address public guard;\n\n /// @dev Set a guard that checks transactions before execution\n /// @param _guard The address of the guard to be used or the 0 address to disable the guard\n function setGuard(address _guard) external onlyOwner {\n if (_guard != address(0)) {\n require(\n BaseGuard(_guard).supportsInterface(type(IGuard).interfaceId),\n \"Guard does not implement IERC165\"\n );\n }\n guard = _guard;\n emit ChangedGuard(guard);\n }\n\n function getGuard() external view returns (address _guard) {\n return guard;\n }\n}\n" + }, + "@gnosis.pm/zodiac/contracts/interfaces/IAvatar.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\n\n/// @title Zodiac Avatar - A contract that manages modules that can execute transactions via this contract.\npragma solidity >=0.7.0 <0.9.0;\n\nimport \"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\";\n\ninterface IAvatar {\n /// @dev Enables a module on the avatar.\n /// @notice Can only be called by the avatar.\n /// @notice Modules should be stored as a linked list.\n /// @notice Must emit EnabledModule(address module) if successful.\n /// @param module Module to be enabled.\n function enableModule(address module) external;\n\n /// @dev Disables a module on the avatar.\n /// @notice Can only be called by the avatar.\n /// @notice Must emit DisabledModule(address module) if successful.\n /// @param prevModule Address that pointed to the module to be removed in the linked list\n /// @param module Module to be removed.\n function disableModule(address prevModule, address module) external;\n\n /// @dev Allows a Module to execute a transaction.\n /// @notice Can only be called by an enabled module.\n /// @notice Must emit ExecutionFromModuleSuccess(address module) if successful.\n /// @notice Must emit ExecutionFromModuleFailure(address module) if unsuccessful.\n /// @param to Destination address of module transaction.\n /// @param value Ether value of module transaction.\n /// @param data Data payload of module transaction.\n /// @param operation Operation type of module transaction: 0 == call, 1 == delegate call.\n function execTransactionFromModule(\n address to,\n uint256 value,\n bytes memory data,\n Enum.Operation operation\n ) external returns (bool success);\n\n /// @dev Allows a Module to execute a transaction and return data\n /// @notice Can only be called by an enabled module.\n /// @notice Must emit ExecutionFromModuleSuccess(address module) if successful.\n /// @notice Must emit ExecutionFromModuleFailure(address module) if unsuccessful.\n /// @param to Destination address of module transaction.\n /// @param value Ether value of module transaction.\n /// @param data Data payload of module transaction.\n /// @param operation Operation type of module transaction: 0 == call, 1 == delegate call.\n function execTransactionFromModuleReturnData(\n address to,\n uint256 value,\n bytes memory data,\n Enum.Operation operation\n ) external returns (bool success, bytes memory returnData);\n\n /// @dev Returns if an module is enabled\n /// @return True if the module is enabled\n function isModuleEnabled(address module) external view returns (bool);\n\n /// @dev Returns array of modules.\n /// @param start Start of the page.\n /// @param pageSize Maximum number of modules that should be returned.\n /// @return array Array of modules.\n /// @return next Start of the next page.\n function getModulesPaginated(address start, uint256 pageSize)\n external\n view\n returns (address[] memory array, address next);\n}\n" + }, + "@gnosis.pm/zodiac/contracts/interfaces/IGuard.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\nimport \"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\";\n\ninterface IGuard {\n function checkTransaction(\n address to,\n uint256 value,\n bytes memory data,\n Enum.Operation operation,\n uint256 safeTxGas,\n uint256 baseGas,\n uint256 gasPrice,\n address gasToken,\n address payable refundReceiver,\n bytes memory signatures,\n address msgSender\n ) external;\n\n function checkAfterExecution(bytes32 txHash, bool success) external;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../utils/ContextUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\n address private _owner;\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the deployer as the initial owner.\n */\n function __Ownable_init() internal initializer {\n __Context_init_unchained();\n __Ownable_init_unchained();\n }\n\n function __Ownable_init_unchained() internal initializer {\n _setOwner(_msgSender());\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 called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n _;\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions anymore. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby removing any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n _setOwner(address(0));\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner {\n require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n _setOwner(newOwner);\n }\n\n function _setOwner(address newOwner) private {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n uint256[49] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\n * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\n *\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\n *\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\n */\nabstract contract Initializable {\n /**\n * @dev Indicates that the contract has been initialized.\n */\n bool private _initialized;\n\n /**\n * @dev Indicates that the contract is in the process of being initialized.\n */\n bool private _initializing;\n\n /**\n * @dev Modifier to protect an initializer function from being invoked twice.\n */\n modifier initializer() {\n require(_initializing || !_initialized, \"Initializable: contract is already initialized\");\n\n bool isTopLevelCall = !_initializing;\n if (isTopLevelCall) {\n _initializing = true;\n _initialized = true;\n }\n\n _;\n\n if (isTopLevelCall) {\n _initializing = false;\n }\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract ContextUpgradeable is Initializable {\n function __Context_init() internal initializer {\n __Context_init_unchained();\n }\n\n function __Context_init_unchained() internal initializer {\n }\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n uint256[50] private __gap;\n}\n" + }, + "@openzeppelin/contracts/security/ReentrancyGuard.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Contract module that helps prevent reentrant calls to a function.\n *\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\n * available, which can be applied to functions to make sure there are no nested\n * (reentrant) calls to them.\n *\n * Note that because there is a single `nonReentrant` guard, functions marked as\n * `nonReentrant` may not call one another. This can be worked around by making\n * those functions `private`, and then adding `external` `nonReentrant` entry\n * points to them.\n *\n * TIP: If you would like to learn more about reentrancy and alternative ways\n * to protect against it, check out our blog post\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\n */\nabstract contract ReentrancyGuard {\n // Booleans are more expensive than uint256 or any type that takes up a full\n // word because each write operation emits an extra SLOAD to first read the\n // slot's contents, replace the bits taken up by the boolean, and then write\n // back. This is the compiler's defense against contract upgrades and\n // pointer aliasing, and it cannot be disabled.\n\n // The values being non-zero value makes deployment a bit more expensive,\n // but in exchange the refund on every call to nonReentrant will be lower in\n // amount. Since refunds are capped to a percentage of the total\n // transaction's gas, it is best to keep them low in cases like this one, to\n // increase the likelihood of the full refund coming into effect.\n uint256 private constant _NOT_ENTERED = 1;\n uint256 private constant _ENTERED = 2;\n\n uint256 private _status;\n\n constructor() {\n _status = _NOT_ENTERED;\n }\n\n /**\n * @dev Prevents a contract from calling itself, directly or indirectly.\n * Calling a `nonReentrant` function from another `nonReentrant`\n * function is not supported. It is possible to prevent this from happening\n * by making the `nonReentrant` function external, and make it call a\n * `private` function that does the actual work.\n */\n modifier nonReentrant() {\n // On the first call to nonReentrant, _notEntered will be true\n require(_status != _ENTERED, \"ReentrancyGuard: reentrant call\");\n\n // Any calls to nonReentrant after this point will fail\n _status = _ENTERED;\n\n _;\n\n // By storing the original value once again, a refund is triggered (see\n // https://eips.ethereum.org/EIPS/eip-2200)\n _status = _NOT_ENTERED;\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/ERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./IERC20.sol\";\nimport \"./extensions/IERC20Metadata.sol\";\nimport \"../../utils/Context.sol\";\n\n/**\n * @dev Implementation of the {IERC20} interface.\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n * For a generic mechanism see {ERC20PresetMinterPauser}.\n *\n * TIP: For a detailed writeup see our guide\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\n *\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\n * instead returning `false` on failure. This behavior is nonetheless\n * conventional and does not conflict with the expectations of ERC20\n * applications.\n *\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\n * This allows applications to reconstruct the allowance for all accounts just\n * by listening to said events. Other implementations of the EIP may not emit\n * these events, as it isn't required by the specification.\n *\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\n * functions have been added to mitigate the well-known issues around setting\n * allowances. See {IERC20-approve}.\n */\ncontract ERC20 is Context, IERC20, IERC20Metadata {\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n uint256 private _totalSupply;\n\n string private _name;\n string private _symbol;\n\n /**\n * @dev Sets the values for {name} and {symbol}.\n *\n * The default value of {decimals} is 18. To select a different value for\n * {decimals} you should overload it.\n *\n * All two of these values are immutable: they can only be set once during\n * construction.\n */\n constructor(string memory name_, string memory symbol_) {\n _name = name_;\n _symbol = symbol_;\n }\n\n /**\n * @dev Returns the name of the token.\n */\n function name() public view virtual override returns (string memory) {\n return _name;\n }\n\n /**\n * @dev Returns the symbol of the token, usually a shorter version of the\n * name.\n */\n function symbol() public view virtual override returns (string memory) {\n return _symbol;\n }\n\n /**\n * @dev Returns the number of decimals used to get its user representation.\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\n *\n * Tokens usually opt for a value of 18, imitating the relationship between\n * Ether and Wei. This is the value {ERC20} uses, unless this function is\n * overridden;\n *\n * NOTE: This information is only used for _display_ purposes: it in\n * no way affects any of the arithmetic of the contract, including\n * {IERC20-balanceOf} and {IERC20-transfer}.\n */\n function decimals() public view virtual override returns (uint8) {\n return 18;\n }\n\n /**\n * @dev See {IERC20-totalSupply}.\n */\n function totalSupply() public view virtual override returns (uint256) {\n return _totalSupply;\n }\n\n /**\n * @dev See {IERC20-balanceOf}.\n */\n function balanceOf(address account) public view virtual override returns (uint256) {\n return _balances[account];\n }\n\n /**\n * @dev See {IERC20-transfer}.\n *\n * Requirements:\n *\n * - `recipient` cannot be the zero address.\n * - the caller must have a balance of at least `amount`.\n */\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\n _transfer(_msgSender(), recipient, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-allowance}.\n */\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n /**\n * @dev See {IERC20-approve}.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\n _approve(_msgSender(), spender, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-transferFrom}.\n *\n * Emits an {Approval} event indicating the updated allowance. This is not\n * required by the EIP. See the note at the beginning of {ERC20}.\n *\n * Requirements:\n *\n * - `sender` and `recipient` cannot be the zero address.\n * - `sender` must have a balance of at least `amount`.\n * - the caller must have allowance for ``sender``'s tokens of at least\n * `amount`.\n */\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transfer(sender, recipient, amount);\n\n uint256 currentAllowance = _allowances[sender][_msgSender()];\n require(currentAllowance >= amount, \"ERC20: transfer amount exceeds allowance\");\n unchecked {\n _approve(sender, _msgSender(), currentAllowance - amount);\n }\n\n return true;\n }\n\n /**\n * @dev Atomically increases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue);\n return true;\n }\n\n /**\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n * - `spender` must have allowance for the caller of at least\n * `subtractedValue`.\n */\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\n uint256 currentAllowance = _allowances[_msgSender()][spender];\n require(currentAllowance >= subtractedValue, \"ERC20: decreased allowance below zero\");\n unchecked {\n _approve(_msgSender(), spender, currentAllowance - subtractedValue);\n }\n\n return true;\n }\n\n /**\n * @dev Moves `amount` of tokens from `sender` to `recipient`.\n *\n * This internal function is equivalent to {transfer}, and can be used to\n * e.g. implement automatic token fees, slashing mechanisms, etc.\n *\n * Emits a {Transfer} event.\n *\n * Requirements:\n *\n * - `sender` cannot be the zero address.\n * - `recipient` cannot be the zero address.\n * - `sender` must have a balance of at least `amount`.\n */\n function _transfer(\n address sender,\n address recipient,\n uint256 amount\n ) internal virtual {\n require(sender != address(0), \"ERC20: transfer from the zero address\");\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\n\n _beforeTokenTransfer(sender, recipient, amount);\n\n uint256 senderBalance = _balances[sender];\n require(senderBalance >= amount, \"ERC20: transfer amount exceeds balance\");\n unchecked {\n _balances[sender] = senderBalance - amount;\n }\n _balances[recipient] += amount;\n\n emit Transfer(sender, recipient, amount);\n\n _afterTokenTransfer(sender, recipient, amount);\n }\n\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\n * the total supply.\n *\n * Emits a {Transfer} event with `from` set to the zero address.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n */\n function _mint(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: mint to the zero address\");\n\n _beforeTokenTransfer(address(0), account, amount);\n\n _totalSupply += amount;\n _balances[account] += amount;\n emit Transfer(address(0), account, amount);\n\n _afterTokenTransfer(address(0), account, amount);\n }\n\n /**\n * @dev Destroys `amount` tokens from `account`, reducing the\n * total supply.\n *\n * Emits a {Transfer} event with `to` set to the zero address.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n * - `account` must have at least `amount` tokens.\n */\n function _burn(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: burn from the zero address\");\n\n _beforeTokenTransfer(account, address(0), amount);\n\n uint256 accountBalance = _balances[account];\n require(accountBalance >= amount, \"ERC20: burn amount exceeds balance\");\n unchecked {\n _balances[account] = accountBalance - amount;\n }\n _totalSupply -= amount;\n\n emit Transfer(account, address(0), amount);\n\n _afterTokenTransfer(account, address(0), amount);\n }\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\n *\n * This internal function is equivalent to `approve`, and can be used to\n * e.g. set automatic allowances for certain subsystems, etc.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `owner` cannot be the zero address.\n * - `spender` cannot be the zero address.\n */\n function _approve(\n address owner,\n address spender,\n uint256 amount\n ) internal virtual {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n emit Approval(owner, spender, amount);\n }\n\n /**\n * @dev Hook that is called before any transfer of tokens. This includes\n * minting and burning.\n *\n * Calling conditions:\n *\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * will be transferred to `to`.\n * - when `from` is zero, `amount` tokens will be minted for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\n * - `from` and `to` are never both zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual {}\n\n /**\n * @dev Hook that is called after any transfer of tokens. This includes\n * minting and burning.\n *\n * Calling conditions:\n *\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * has been transferred to `to`.\n * - when `from` is zero, `amount` tokens have been minted for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\n * - `from` and `to` are never both zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _afterTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual {}\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20.sol\";\n\n/**\n * @dev Interface for the optional metadata functions from the ERC20 standard.\n *\n * _Available since v4.1._\n */\ninterface IERC20Metadata is IERC20 {\n /**\n * @dev Returns the name of the token.\n */\n function name() external view returns (string memory);\n\n /**\n * @dev Returns the symbol of the token.\n */\n function symbol() external view returns (string memory);\n\n /**\n * @dev Returns the decimals places of the token.\n */\n function decimals() external view returns (uint8);\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/IERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller's account to `recipient`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address recipient, uint256 amount) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `sender` to `recipient` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) external returns (bool);\n\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20.sol\";\nimport \"../../../utils/Address.sol\";\n\n/**\n * @title SafeERC20\n * @dev Wrappers around ERC20 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 using Address for address;\n\n function safeTransfer(\n IERC20 token,\n address to,\n uint256 value\n ) internal {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\n }\n\n function safeTransferFrom(\n IERC20 token,\n address from,\n address to,\n uint256 value\n ) internal {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\n }\n\n /**\n * @dev Deprecated. This function has issues similar to the ones found in\n * {IERC20-approve}, and its usage is discouraged.\n *\n * Whenever possible, use {safeIncreaseAllowance} and\n * {safeDecreaseAllowance} instead.\n */\n function safeApprove(\n IERC20 token,\n address spender,\n uint256 value\n ) internal {\n // safeApprove should only be called when setting an initial allowance,\n // or when resetting it to zero. To increase and decrease it, use\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\n require(\n (value == 0) || (token.allowance(address(this), spender) == 0),\n \"SafeERC20: approve from non-zero to non-zero allowance\"\n );\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\n }\n\n function safeIncreaseAllowance(\n IERC20 token,\n address spender,\n uint256 value\n ) internal {\n uint256 newAllowance = token.allowance(address(this), spender) + value;\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n\n function safeDecreaseAllowance(\n IERC20 token,\n address spender,\n uint256 value\n ) internal {\n unchecked {\n uint256 oldAllowance = token.allowance(address(this), spender);\n require(oldAllowance >= value, \"SafeERC20: decreased allowance below zero\");\n uint256 newAllowance = oldAllowance - value;\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\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 function _callOptionalReturn(IERC20 token, bytes memory data) private {\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\n // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that\n // the target address contains contract code and also asserts for success in the low-level call.\n\n bytes memory returndata = address(token).functionCall(data, \"SafeERC20: low-level call failed\");\n if (returndata.length > 0) {\n // Return data is optional\n require(abi.decode(returndata, (bool)), \"SafeERC20: ERC20 operation did not succeed\");\n }\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC721/ERC721.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./IERC721.sol\";\nimport \"./IERC721Receiver.sol\";\nimport \"./extensions/IERC721Metadata.sol\";\nimport \"../../utils/Address.sol\";\nimport \"../../utils/Context.sol\";\nimport \"../../utils/Strings.sol\";\nimport \"../../utils/introspection/ERC165.sol\";\n\n/**\n * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including\n * the Metadata extension, but not including the Enumerable extension, which is available separately as\n * {ERC721Enumerable}.\n */\ncontract ERC721 is Context, ERC165, IERC721, IERC721Metadata {\n using Address for address;\n using Strings for uint256;\n\n // Token name\n string private _name;\n\n // Token symbol\n string private _symbol;\n\n // Mapping from token ID to owner address\n mapping(uint256 => address) private _owners;\n\n // Mapping owner address to token count\n mapping(address => uint256) private _balances;\n\n // Mapping from token ID to approved address\n mapping(uint256 => address) private _tokenApprovals;\n\n // Mapping from owner to operator approvals\n mapping(address => mapping(address => bool)) private _operatorApprovals;\n\n /**\n * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.\n */\n constructor(string memory name_, string memory symbol_) {\n _name = name_;\n _symbol = symbol_;\n }\n\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {\n return\n interfaceId == type(IERC721).interfaceId ||\n interfaceId == type(IERC721Metadata).interfaceId ||\n super.supportsInterface(interfaceId);\n }\n\n /**\n * @dev See {IERC721-balanceOf}.\n */\n function balanceOf(address owner) public view virtual override returns (uint256) {\n require(owner != address(0), \"ERC721: balance query for the zero address\");\n return _balances[owner];\n }\n\n /**\n * @dev See {IERC721-ownerOf}.\n */\n function ownerOf(uint256 tokenId) public view virtual override returns (address) {\n address owner = _owners[tokenId];\n require(owner != address(0), \"ERC721: owner query for nonexistent token\");\n return owner;\n }\n\n /**\n * @dev See {IERC721Metadata-name}.\n */\n function name() public view virtual override returns (string memory) {\n return _name;\n }\n\n /**\n * @dev See {IERC721Metadata-symbol}.\n */\n function symbol() public view virtual override returns (string memory) {\n return _symbol;\n }\n\n /**\n * @dev See {IERC721Metadata-tokenURI}.\n */\n function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {\n require(_exists(tokenId), \"ERC721Metadata: URI query for nonexistent token\");\n\n string memory baseURI = _baseURI();\n return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : \"\";\n }\n\n /**\n * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each\n * token will be the concatenation of the `baseURI` and the `tokenId`. Empty\n * by default, can be overriden in child contracts.\n */\n function _baseURI() internal view virtual returns (string memory) {\n return \"\";\n }\n\n /**\n * @dev See {IERC721-approve}.\n */\n function approve(address to, uint256 tokenId) public virtual override {\n address owner = ERC721.ownerOf(tokenId);\n require(to != owner, \"ERC721: approval to current owner\");\n\n require(\n _msgSender() == owner || isApprovedForAll(owner, _msgSender()),\n \"ERC721: approve caller is not owner nor approved for all\"\n );\n\n _approve(to, tokenId);\n }\n\n /**\n * @dev See {IERC721-getApproved}.\n */\n function getApproved(uint256 tokenId) public view virtual override returns (address) {\n require(_exists(tokenId), \"ERC721: approved query for nonexistent token\");\n\n return _tokenApprovals[tokenId];\n }\n\n /**\n * @dev See {IERC721-setApprovalForAll}.\n */\n function setApprovalForAll(address operator, bool approved) public virtual override {\n require(operator != _msgSender(), \"ERC721: approve to caller\");\n\n _operatorApprovals[_msgSender()][operator] = approved;\n emit ApprovalForAll(_msgSender(), operator, approved);\n }\n\n /**\n * @dev See {IERC721-isApprovedForAll}.\n */\n function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {\n return _operatorApprovals[owner][operator];\n }\n\n /**\n * @dev See {IERC721-transferFrom}.\n */\n function transferFrom(\n address from,\n address to,\n uint256 tokenId\n ) public virtual override {\n //solhint-disable-next-line max-line-length\n require(_isApprovedOrOwner(_msgSender(), tokenId), \"ERC721: transfer caller is not owner nor approved\");\n\n _transfer(from, to, tokenId);\n }\n\n /**\n * @dev See {IERC721-safeTransferFrom}.\n */\n function safeTransferFrom(\n address from,\n address to,\n uint256 tokenId\n ) public virtual override {\n safeTransferFrom(from, to, tokenId, \"\");\n }\n\n /**\n * @dev See {IERC721-safeTransferFrom}.\n */\n function safeTransferFrom(\n address from,\n address to,\n uint256 tokenId,\n bytes memory _data\n ) public virtual override {\n require(_isApprovedOrOwner(_msgSender(), tokenId), \"ERC721: transfer caller is not owner nor approved\");\n _safeTransfer(from, to, tokenId, _data);\n }\n\n /**\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\n *\n * `_data` is additional data, it has no specified format and it is sent in call to `to`.\n *\n * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.\n * implement alternative mechanisms to perform token transfer, such as signature-based.\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 `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n *\n * Emits a {Transfer} event.\n */\n function _safeTransfer(\n address from,\n address to,\n uint256 tokenId,\n bytes memory _data\n ) internal virtual {\n _transfer(from, to, tokenId);\n require(_checkOnERC721Received(from, to, tokenId, _data), \"ERC721: transfer to non ERC721Receiver implementer\");\n }\n\n /**\n * @dev Returns whether `tokenId` exists.\n *\n * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.\n *\n * Tokens start existing when they are minted (`_mint`),\n * and stop existing when they are burned (`_burn`).\n */\n function _exists(uint256 tokenId) internal view virtual returns (bool) {\n return _owners[tokenId] != address(0);\n }\n\n /**\n * @dev Returns whether `spender` is allowed to manage `tokenId`.\n *\n * Requirements:\n *\n * - `tokenId` must exist.\n */\n function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {\n require(_exists(tokenId), \"ERC721: operator query for nonexistent token\");\n address owner = ERC721.ownerOf(tokenId);\n return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender));\n }\n\n /**\n * @dev Safely mints `tokenId` and transfers it to `to`.\n *\n * Requirements:\n *\n * - `tokenId` must not exist.\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n *\n * Emits a {Transfer} event.\n */\n function _safeMint(address to, uint256 tokenId) internal virtual {\n _safeMint(to, tokenId, \"\");\n }\n\n /**\n * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is\n * forwarded in {IERC721Receiver-onERC721Received} to contract recipients.\n */\n function _safeMint(\n address to,\n uint256 tokenId,\n bytes memory _data\n ) internal virtual {\n _mint(to, tokenId);\n require(\n _checkOnERC721Received(address(0), to, tokenId, _data),\n \"ERC721: transfer to non ERC721Receiver implementer\"\n );\n }\n\n /**\n * @dev Mints `tokenId` and transfers it to `to`.\n *\n * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible\n *\n * Requirements:\n *\n * - `tokenId` must not exist.\n * - `to` cannot be the zero address.\n *\n * Emits a {Transfer} event.\n */\n function _mint(address to, uint256 tokenId) internal virtual {\n require(to != address(0), \"ERC721: mint to the zero address\");\n require(!_exists(tokenId), \"ERC721: token already minted\");\n\n _beforeTokenTransfer(address(0), to, tokenId);\n\n _balances[to] += 1;\n _owners[tokenId] = to;\n\n emit Transfer(address(0), to, tokenId);\n }\n\n /**\n * @dev Destroys `tokenId`.\n * The approval is cleared when the token is burned.\n *\n * Requirements:\n *\n * - `tokenId` must exist.\n *\n * Emits a {Transfer} event.\n */\n function _burn(uint256 tokenId) internal virtual {\n address owner = ERC721.ownerOf(tokenId);\n\n _beforeTokenTransfer(owner, address(0), tokenId);\n\n // Clear approvals\n _approve(address(0), tokenId);\n\n _balances[owner] -= 1;\n delete _owners[tokenId];\n\n emit Transfer(owner, address(0), tokenId);\n }\n\n /**\n * @dev Transfers `tokenId` from `from` to `to`.\n * As opposed to {transferFrom}, this imposes no restrictions on msg.sender.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - `tokenId` token must be owned by `from`.\n *\n * Emits a {Transfer} event.\n */\n function _transfer(\n address from,\n address to,\n uint256 tokenId\n ) internal virtual {\n require(ERC721.ownerOf(tokenId) == from, \"ERC721: transfer of token that is not own\");\n require(to != address(0), \"ERC721: transfer to the zero address\");\n\n _beforeTokenTransfer(from, to, tokenId);\n\n // Clear approvals from the previous owner\n _approve(address(0), tokenId);\n\n _balances[from] -= 1;\n _balances[to] += 1;\n _owners[tokenId] = to;\n\n emit Transfer(from, to, tokenId);\n }\n\n /**\n * @dev Approve `to` to operate on `tokenId`\n *\n * Emits a {Approval} event.\n */\n function _approve(address to, uint256 tokenId) internal virtual {\n _tokenApprovals[tokenId] = to;\n emit Approval(ERC721.ownerOf(tokenId), to, tokenId);\n }\n\n /**\n * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.\n * The call is not executed if the target address is not a contract.\n *\n * @param from address representing the previous owner of the given token ID\n * @param to target address that will receive the tokens\n * @param tokenId uint256 ID of the token to be transferred\n * @param _data bytes optional data to send along with the call\n * @return bool whether the call correctly returned the expected magic value\n */\n function _checkOnERC721Received(\n address from,\n address to,\n uint256 tokenId,\n bytes memory _data\n ) private returns (bool) {\n if (to.isContract()) {\n try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) {\n return retval == IERC721Receiver.onERC721Received.selector;\n } catch (bytes memory reason) {\n if (reason.length == 0) {\n revert(\"ERC721: transfer to non ERC721Receiver implementer\");\n } else {\n assembly {\n revert(add(32, reason), mload(reason))\n }\n }\n }\n } else {\n return true;\n }\n }\n\n /**\n * @dev Hook that is called before any token transfer. This includes minting\n * and burning.\n *\n * Calling conditions:\n *\n * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be\n * transferred to `to`.\n * - When `from` is zero, `tokenId` will be minted for `to`.\n * - When `to` is zero, ``from``'s `tokenId` will be burned.\n * - `from` and `to` are never both zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256 tokenId\n ) internal virtual {}\n}\n" + }, + "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../ERC721.sol\";\nimport \"./IERC721Enumerable.sol\";\n\n/**\n * @dev This implements an optional extension of {ERC721} defined in the EIP that adds\n * enumerability of all the token ids in the contract as well as all token ids owned by each\n * account.\n */\nabstract contract ERC721Enumerable is ERC721, IERC721Enumerable {\n // Mapping from owner to list of owned token IDs\n mapping(address => mapping(uint256 => uint256)) private _ownedTokens;\n\n // Mapping from token ID to index of the owner tokens list\n mapping(uint256 => uint256) private _ownedTokensIndex;\n\n // Array with all token ids, used for enumeration\n uint256[] private _allTokens;\n\n // Mapping from token id to position in the allTokens array\n mapping(uint256 => uint256) private _allTokensIndex;\n\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) {\n return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId);\n }\n\n /**\n * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.\n */\n function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) {\n require(index < ERC721.balanceOf(owner), \"ERC721Enumerable: owner index out of bounds\");\n return _ownedTokens[owner][index];\n }\n\n /**\n * @dev See {IERC721Enumerable-totalSupply}.\n */\n function totalSupply() public view virtual override returns (uint256) {\n return _allTokens.length;\n }\n\n /**\n * @dev See {IERC721Enumerable-tokenByIndex}.\n */\n function tokenByIndex(uint256 index) public view virtual override returns (uint256) {\n require(index < ERC721Enumerable.totalSupply(), \"ERC721Enumerable: global index out of bounds\");\n return _allTokens[index];\n }\n\n /**\n * @dev Hook that is called before any token transfer. This includes minting\n * and burning.\n *\n * Calling conditions:\n *\n * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be\n * transferred to `to`.\n * - When `from` is zero, `tokenId` will be minted for `to`.\n * - When `to` is zero, ``from``'s `tokenId` will be burned.\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256 tokenId\n ) internal virtual override {\n super._beforeTokenTransfer(from, to, tokenId);\n\n if (from == address(0)) {\n _addTokenToAllTokensEnumeration(tokenId);\n } else if (from != to) {\n _removeTokenFromOwnerEnumeration(from, tokenId);\n }\n if (to == address(0)) {\n _removeTokenFromAllTokensEnumeration(tokenId);\n } else if (to != from) {\n _addTokenToOwnerEnumeration(to, tokenId);\n }\n }\n\n /**\n * @dev Private function to add a token to this extension's ownership-tracking data structures.\n * @param to address representing the new owner of the given token ID\n * @param tokenId uint256 ID of the token to be added to the tokens list of the given address\n */\n function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {\n uint256 length = ERC721.balanceOf(to);\n _ownedTokens[to][length] = tokenId;\n _ownedTokensIndex[tokenId] = length;\n }\n\n /**\n * @dev Private function to add a token to this extension's token tracking data structures.\n * @param tokenId uint256 ID of the token to be added to the tokens list\n */\n function _addTokenToAllTokensEnumeration(uint256 tokenId) private {\n _allTokensIndex[tokenId] = _allTokens.length;\n _allTokens.push(tokenId);\n }\n\n /**\n * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that\n * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for\n * gas optimizations e.g. when performing a transfer operation (avoiding double writes).\n * This has O(1) time complexity, but alters the order of the _ownedTokens array.\n * @param from address representing the previous owner of the given token ID\n * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address\n */\n function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private {\n // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and\n // then delete the last slot (swap and pop).\n\n uint256 lastTokenIndex = ERC721.balanceOf(from) - 1;\n uint256 tokenIndex = _ownedTokensIndex[tokenId];\n\n // When the token to delete is the last token, the swap operation is unnecessary\n if (tokenIndex != lastTokenIndex) {\n uint256 lastTokenId = _ownedTokens[from][lastTokenIndex];\n\n _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token\n _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index\n }\n\n // This also deletes the contents at the last position of the array\n delete _ownedTokensIndex[tokenId];\n delete _ownedTokens[from][lastTokenIndex];\n }\n\n /**\n * @dev Private function to remove a token from this extension's token tracking data structures.\n * This has O(1) time complexity, but alters the order of the _allTokens array.\n * @param tokenId uint256 ID of the token to be removed from the tokens list\n */\n function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private {\n // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and\n // then delete the last slot (swap and pop).\n\n uint256 lastTokenIndex = _allTokens.length - 1;\n uint256 tokenIndex = _allTokensIndex[tokenId];\n\n // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so\n // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding\n // an 'if' statement (like in _removeTokenFromOwnerEnumeration)\n uint256 lastTokenId = _allTokens[lastTokenIndex];\n\n _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token\n _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index\n\n // This also deletes the contents at the last position of the array\n delete _allTokensIndex[tokenId];\n _allTokens.pop();\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../IERC721.sol\";\n\n/**\n * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension\n * @dev See https://eips.ethereum.org/EIPS/eip-721\n */\ninterface IERC721Enumerable is IERC721 {\n /**\n * @dev Returns the total amount of tokens stored by the contract.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns a token ID owned by `owner` at a given `index` of its token list.\n * Use along with {balanceOf} to enumerate all of ``owner``'s tokens.\n */\n function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId);\n\n /**\n * @dev Returns a token ID at a given `index` of all the tokens stored by the contract.\n * Use along with {totalSupply} to enumerate all tokens.\n */\n function tokenByIndex(uint256 index) external view returns (uint256);\n}\n" + }, + "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../IERC721.sol\";\n\n/**\n * @title ERC-721 Non-Fungible Token Standard, optional metadata extension\n * @dev See https://eips.ethereum.org/EIPS/eip-721\n */\ninterface IERC721Metadata is IERC721 {\n /**\n * @dev Returns the token collection name.\n */\n function name() external view returns (string memory);\n\n /**\n * @dev Returns the token collection symbol.\n */\n function symbol() external view returns (string memory);\n\n /**\n * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.\n */\n function tokenURI(uint256 tokenId) external view returns (string memory);\n}\n" + }, + "@openzeppelin/contracts/token/ERC721/IERC721.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../../utils/introspection/IERC165.sol\";\n\n/**\n * @dev Required interface of an ERC721 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`, checking first that contract recipients\n * are aware of the ERC721 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 be have been allowed 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 a safe transfer.\n *\n * Emits a {Transfer} event.\n */\n function safeTransferFrom(\n address from,\n address to,\n uint256 tokenId\n ) external;\n\n /**\n * @dev Transfers `tokenId` token from `from` to `to`.\n *\n * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.\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(\n address from,\n address to,\n uint256 tokenId\n ) 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 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 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 caller.\n *\n * Emits an {ApprovalForAll} event.\n */\n function setApprovalForAll(address operator, bool _approved) external;\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 /**\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 a safe transfer.\n *\n * Emits a {Transfer} event.\n */\n function safeTransferFrom(\n address from,\n address to,\n uint256 tokenId,\n bytes calldata data\n ) external;\n}\n" + }, + "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @title ERC721 token receiver interface\n * @dev Interface for any contract that wants to support safeTransfers\n * from ERC721 asset contracts.\n */\ninterface IERC721Receiver {\n /**\n * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}\n * by `operator` from `from`, this function is called.\n *\n * It must return its Solidity selector to confirm the token transfer.\n * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.\n *\n * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`.\n */\n function onERC721Received(\n address operator,\n address from,\n uint256 tokenId,\n bytes calldata data\n ) external returns (bytes4);\n}\n" + }, + "@openzeppelin/contracts/utils/Address.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize, which returns 0 for contracts in\n // construction, since the code is only stored at the end of the\n // constructor execution.\n\n uint256 size;\n assembly {\n size := extcodesize(account)\n }\n return size > 0;\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n (bool success, ) = recipient.call{value: amount}(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain `call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCall(target, data, \"Address: low-level call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(address(this).balance >= value, \"Address: insufficient balance for call\");\n require(isContract(target), \"Address: call to non-contract\");\n\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n return functionStaticCall(target, data, \"Address: low-level static call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n require(isContract(target), \"Address: static call to non-contract\");\n\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionDelegateCall(target, data, \"Address: low-level delegate call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(isContract(target), \"Address: delegate call to non-contract\");\n\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason using the provided one.\n *\n * _Available since v4.3._\n */\n function verifyCallResult(\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal pure returns (bytes memory) {\n if (success) {\n return returndata;\n } else {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Context.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\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" + }, + "@openzeppelin/contracts/utils/introspection/ERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./IERC165.sol\";\n\n/**\n * @dev Implementation of the {IERC165} interface.\n *\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\n * for the additional interface id that will be supported. For example:\n *\n * ```solidity\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\n * }\n * ```\n *\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\n */\nabstract contract ERC165 is IERC165 {\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n return interfaceId == type(IERC165).interfaceId;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/introspection/IERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface 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[EIP section]\n * to learn more about how these ids are created.\n *\n * This function call must use less than 30 000 gas.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n" + }, + "@openzeppelin/contracts/utils/Strings.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n bytes16 private constant _HEX_SYMBOLS = \"0123456789abcdef\";\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\n */\n function toString(uint256 value) internal pure returns (string memory) {\n // Inspired by OraclizeAPI's implementation - MIT licence\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\n\n if (value == 0) {\n return \"0\";\n }\n uint256 temp = value;\n uint256 digits;\n while (temp != 0) {\n digits++;\n temp /= 10;\n }\n bytes memory buffer = new bytes(digits);\n while (value != 0) {\n digits -= 1;\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\n value /= 10;\n }\n return string(buffer);\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\n */\n function toHexString(uint256 value) internal pure returns (string memory) {\n if (value == 0) {\n return \"0x00\";\n }\n uint256 temp = value;\n uint256 length = 0;\n while (temp != 0) {\n length++;\n temp >>= 8;\n }\n return toHexString(value, length);\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\n */\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\n bytes memory buffer = new bytes(2 * length + 2);\n buffer[0] = \"0\";\n buffer[1] = \"x\";\n for (uint256 i = 2 * length + 1; i > 1; --i) {\n buffer[i] = _HEX_SYMBOLS[value & 0xf];\n value >>= 4;\n }\n require(value == 0, \"Strings: hex length insufficient\");\n return string(buffer);\n }\n}\n" + }, + "contracts/CirculatingSupply/CirculatingSupplyBase.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity ^0.8.6;\n\nimport \"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\";\nimport \"@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol\";\nimport \"./utils/ExclusionList.sol\";\n\nabstract contract CirculatingSupplyBase is OwnableUpgradeable, ExclusionList {\n event TokenSet(address indexed newToken);\n\n address public token;\n\n function setUp(bytes memory initializeParams) public {\n (address _owner, address _token, address[] memory _exclusions) = abi\n .decode(initializeParams, (address, address, address[]));\n __Ownable_init();\n transferOwnership(_owner);\n setupExclusions();\n token = _token;\n for (uint256 i = 0; i < _exclusions.length; i++) {\n _excludeAddress(_exclusions[i]);\n }\n }\n\n /// @dev Sets the token to calculate circulating supply of\n /// @param _token token to calculate circulating supply of\n /// @notice This can only be called by the owner\n function setToken(address _token) public onlyOwner {\n token = _token;\n emit TokenSet(_token);\n }\n\n /// @dev Removes an excluded address\n /// @param prevExclusion Exclusion that pointed to the exclusion to be removed in the linked list\n /// @param exclusion Exclusion to be removed\n /// @notice This can only be called by the owner\n function removeExclusion(address prevExclusion, address exclusion)\n public\n onlyOwner\n {\n _removeExclusion(prevExclusion, exclusion);\n }\n\n /// @dev Enables the balance of an address from the circulatingSupply calculation\n /// @param exclusion Address to be excluded\n /// @notice This can only be called by the owner\n function exclude(address exclusion) public onlyOwner {\n _excludeAddress(exclusion);\n }\n\n function get() public view virtual returns (uint256 circulatingSupply);\n}\n" + }, + "contracts/CirculatingSupply/CirculatingSupplyERC20.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity ^0.8.6;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport \"./CirculatingSupplyBase.sol\";\n\ncontract CirculatingSupplyERC20 is CirculatingSupplyBase {\n constructor(\n address _owner,\n address _token,\n address[] memory _exclusions\n ) {\n bytes memory initParams = abi.encode(_owner, _token, _exclusions);\n setUp(initParams);\n }\n\n function get() public view override returns (uint256 circulatingSupply) {\n circulatingSupply = ERC20(token).totalSupply();\n if (exclusions[SENTINEL_EXCLUSIONS] != SENTINEL_EXCLUSIONS) {\n address exclusion = exclusions[SENTINEL_EXCLUSIONS];\n while (exclusion != SENTINEL_EXCLUSIONS) {\n circulatingSupply -= ERC20(token).balanceOf(exclusion);\n exclusion = exclusions[exclusion];\n }\n }\n return circulatingSupply;\n }\n}\n" + }, + "contracts/CirculatingSupply/utils/ExclusionList.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity ^0.8.6;\n\ncontract ExclusionList {\n event ExclusionAdded(address indexed excludedAddress);\n event ExclusionRemoved(address indexed RemovedAddress);\n\n address internal constant SENTINEL_EXCLUSIONS = address(0x1);\n\n // Mapping of excluded addresses\n mapping(address => address) internal exclusions;\n\n function setupExclusions() internal {\n require(\n exclusions[SENTINEL_EXCLUSIONS] == address(0),\n \"setUpModules has already been called\"\n );\n exclusions[SENTINEL_EXCLUSIONS] = SENTINEL_EXCLUSIONS;\n }\n\n /// @dev Removes an excluded address\n /// @param prevExclusion Exclusion that pointed to the exclusion to be removed in the linked list\n /// @param exclusion Exclusion to be removed\n /// @notice This can only be called by the owner\n function _removeExclusion(address prevExclusion, address exclusion)\n internal\n {\n require(\n exclusion != address(0) && exclusion != SENTINEL_EXCLUSIONS,\n \"Invalid exclusion\"\n );\n require(\n exclusions[prevExclusion] == exclusion,\n \"Exclusion already disabled\"\n );\n exclusions[prevExclusion] = exclusions[exclusion];\n exclusions[exclusion] = address(0);\n emit ExclusionRemoved(exclusion);\n }\n\n function _excludeAddress(address exclusion) internal {\n require(\n exclusion != address(0) && exclusion != SENTINEL_EXCLUSIONS,\n \"Invalid exclusion\"\n );\n require(\n exclusions[exclusion] == address(0),\n \"Exclusion already enabled\"\n );\n exclusions[exclusion] = exclusions[SENTINEL_EXCLUSIONS];\n exclusions[SENTINEL_EXCLUSIONS] = exclusion;\n emit ExclusionAdded(exclusion);\n }\n\n /// @dev Returns if an exclusion is enabled\n /// @return True if the exclusion is enabled\n function isExcluded(address _exclusion) public view returns (bool) {\n return\n SENTINEL_EXCLUSIONS != _exclusion &&\n exclusions[_exclusion] != address(0);\n }\n\n /// @dev Returns array of exclusions.\n /// @param start Start of the page.\n /// @param pageSize Maximum number of exclusions that should be returned.\n /// @return array Array of exclusions.\n /// @return next Start of the next page.\n function getExclusionsPaginated(address start, uint256 pageSize)\n public\n view\n returns (address[] memory array, address next)\n {\n // Init array with max page size\n array = new address[](pageSize);\n\n // Populate return array\n uint256 exclusionCount = 0;\n address currentExclusion = exclusions[start];\n while (\n currentExclusion != address(0x0) &&\n currentExclusion != SENTINEL_EXCLUSIONS &&\n exclusionCount < pageSize\n ) {\n array[exclusionCount] = currentExclusion;\n currentExclusion = exclusions[currentExclusion];\n exclusionCount++;\n }\n next = currentExclusion;\n // Set correct size of returned array\n // solhint-disable-next-line no-inline-assembly\n assembly {\n mstore(array, exclusionCount)\n }\n }\n}\n" + }, + "contracts/ExitModule/ExitBase.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\nimport \"@gnosis.pm/zodiac/contracts/core/Module.sol\";\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport \"@openzeppelin/contracts/utils/introspection/IERC165.sol\";\nimport \"./IExitBase.sol\";\n\nabstract contract ExitBase is Module, IExitBase, IERC165 {\n // @notice Mapping of denied tokens defined by the avatar\n mapping(address => bool) public deniedTokens;\n\n function getExitAmount(uint256 supply, bytes memory params)\n internal\n view\n virtual\n returns (uint256);\n\n // @dev Execute the share of assets and the transfer of designated tokens\n // @param tokens Array of tokens to claim, ordered lowest to highest\n // @param params used to calculate the exit amount per token\n // @notice Will revert if tokens[] is not ordered highest to lowest, contains duplicates, or includes denied tokens\n function _exit(address[] memory tokens, bytes memory params) internal {\n if (avatar.balance > 0) {\n transferNativeAsset(\n msg.sender,\n getExitAmount(avatar.balance, params)\n );\n }\n\n address previousToken;\n uint256 avatarTokenBalance;\n for (uint8 i = 0; i < tokens.length; i++) {\n require(!deniedTokens[tokens[i]], \"Denied token\");\n require(\n tokens[i] > previousToken,\n \"tokens[] is out of order or contains a duplicate\"\n );\n avatarTokenBalance = ERC20(tokens[i]).balanceOf(avatar);\n transferToken(\n tokens[i],\n msg.sender,\n getExitAmount(avatarTokenBalance, params)\n );\n previousToken = tokens[i];\n }\n\n emit ExitSuccessful(msg.sender);\n }\n\n // @dev Execute a token transfer through the avatar\n // @param token address of token to transfer\n // @param to address that will receive the transfer\n // @param amount to transfer\n function transferToken(\n address token,\n address to,\n uint256 amount\n ) private {\n // 0xa9059cbb - bytes4(keccak256(\"transfer(address,uint256)\"))\n bytes memory data = abi.encodeWithSelector(0xa9059cbb, to, amount);\n require(\n exec(token, 0, data, Enum.Operation.Call),\n \"Error on token transfer\"\n );\n }\n\n // @dev Execute a token transfer through the avatar\n // @param to address that will receive the transfer\n // @param amount to transfer\n function transferNativeAsset(address to, uint256 amount) private {\n require(\n exec(to, amount, bytes(\"0x\"), Enum.Operation.Call),\n \"Error on native asset transfer\"\n );\n }\n\n // @dev Add a batch of token addresses to denied tokens list\n // @param tokens Batch of addresses to add into the denied token list\n // @notice Can not add duplicate token address or it will throw\n // @notice Can only be modified by owner\n function addToDenyList(address[] calldata tokens) external onlyOwner {\n for (uint8 i; i < tokens.length; i++) {\n require(!deniedTokens[tokens[i]], \"Token already denied\");\n deniedTokens[tokens[i]] = true;\n }\n }\n\n // @dev Remove a batch of token addresses from denied tokens list\n // @param tokens Batch of addresses to be removed from the denied token list\n // @notice If a non-denied token address is passed, the function will throw\n // @notice Can only be modified by owner\n function removeFromDenyList(address[] calldata tokens) external onlyOwner {\n for (uint8 i; i < tokens.length; i++) {\n require(deniedTokens[tokens[i]], \"Token not denied\");\n deniedTokens[tokens[i]] = false;\n }\n }\n\n function supportsInterface(bytes4 interfaceID)\n external\n pure\n override\n returns (bool)\n {\n return interfaceID == 0x01ffc9a7 || interfaceID == 0xaf20af8a;\n }\n}\n" + }, + "contracts/ExitModule/ExitERC20Module.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity ^0.8.6;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\nimport \"@openzeppelin/contracts/security/ReentrancyGuard.sol\";\n\nimport \"./ExitBase.sol\";\nimport \"../CirculatingSupply/CirculatingSupplyERC20.sol\";\n\ncontract ExitERC20 is ExitBase, ReentrancyGuard {\n using SafeERC20 for ERC20;\n\n ERC20 public designatedToken;\n CirculatingSupplyERC20 public circulatingSupply;\n\n // @dev Initialize function, will be triggered when a new proxy is deployed\n // @param _owner Address of the owner\n // @param _avatar Address of the avatar (e.g. a Safe or Delay Module)\n // @param _target Address that this module will pass transactions to\n // @param _designatedToken Address of the ERC20 token that will define the share of users\n // @param _circulatingSupply Circulating Supply of designated token\n // @notice Designated token address can not be zero\n constructor(\n address _owner,\n address _avatar,\n address _target,\n address _designatedToken,\n address _circulatingSupply\n ) {\n bytes memory initParams = abi.encode(\n _owner,\n _avatar,\n _target,\n _designatedToken,\n _circulatingSupply\n );\n setUp(initParams);\n }\n\n function setUp(bytes memory initParams) public override {\n (\n address _owner,\n address _avatar,\n address _target,\n address _designatedToken,\n address _circulatingSupply\n ) = abi.decode(\n initParams,\n (address, address, address, address, address)\n );\n __Ownable_init();\n require(_avatar != address(0), \"Avatar can not be zero address\");\n require(_target != address(0), \"Target can not be zero address\");\n avatar = _avatar;\n target = _target;\n designatedToken = ERC20(_designatedToken);\n circulatingSupply = CirculatingSupplyERC20(_circulatingSupply);\n\n transferOwnership(_owner);\n\n emit ExitModuleSetup(msg.sender, _avatar);\n }\n\n // @dev Execute the share of assets and the transfer of designated tokens\n // @param amountToRedeem Amount to be sent to the avatar\n // @param tokens Array of tokens to claim, ordered lowest to highest\n // @notice Will revert if tokens[] is not ordered highest to lowest, contains duplicates,\n // includes the designated token or includes denied tokens\n function exit(uint256 amountToRedeem, address[] calldata tokens)\n external\n override\n nonReentrant\n {\n require(\n designatedToken.balanceOf(msg.sender) >= amountToRedeem,\n \"Amount to redeem is greater than balance\"\n );\n\n for (uint8 i = 0; i < tokens.length; i++) {\n require(\n tokens[i] != address(designatedToken),\n \"Designated token can't be redeemed\"\n );\n }\n\n bytes memory params = abi.encode(\n amountToRedeem,\n getCirculatingSupply()\n );\n\n designatedToken.safeTransferFrom(msg.sender, avatar, amountToRedeem);\n\n _exit(tokens, params);\n }\n\n function getExitAmount(uint256 amount, bytes memory params)\n internal\n pure\n override\n returns (uint256)\n {\n (uint256 amountToRedeem, uint256 _circulatingSupply) = abi.decode(\n params,\n (uint256, uint256)\n );\n return (amountToRedeem * amount) / _circulatingSupply;\n }\n\n // @dev Change the designated token address variable\n // @param _token Address of new designated token\n // @notice Can only be modified by owner\n function setDesignatedToken(address _token) public onlyOwner {\n designatedToken = ERC20(_token);\n }\n\n // @dev Change the circulating supply variable\n // @param _circulatingSupply Address of new circulating supply contract\n // @notice Can only be modified by owner\n function setCirculatingSupply(address _circulatingSupply) public onlyOwner {\n circulatingSupply = CirculatingSupplyERC20(_circulatingSupply);\n }\n\n function getCirculatingSupply() public view returns (uint256) {\n return circulatingSupply.get();\n }\n}\n" + }, + "contracts/ExitModule/IExitBase.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\ninterface IExitBase {\n event ExitModuleSetup(address indexed initiator, address indexed avatar);\n event ExitSuccessful(address indexed leaver);\n\n function exit(uint256 amountToRedeem, address[] calldata tokens) external;\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": false, + "runs": 200 + }, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "storageLayout", + "evm.gasEstimates" + ], + "": [ + "ast" + ] + } + }, + "metadata": { + "useLiteralContent": true + } + } + } + } + }, + "ExitERC721": { + "1.1.0": { + "contractName": "ExitERC721", + "sourceName": "contracts/ExitModule/ExitERC721Module.sol", + "contractVersion": "1.1.0", + "compilerVersion": "v0.8.6+commit.11564f7e", + "factory": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "address": "0xD3579C14a4181EfC3DF35C3103D20823A8C8d718", + "bytecode": "0x60806040523480156200001157600080fd5b5060405162004055380380620040558339818101604052810190620000379190620008c0565b6001606981905550600085858585856040516020016200005c95949392919062000a1c565b60405160208183030381529060405290506200007e816200008a60201b60201c565b50505050505062000cce565b600080600080600085806020019051810190620000a8919062000838565b94509450945094509450620000c26200031f60201b60201c565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16141562000135576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200012c9062000b01565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415620001a8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200019f9062000a9b565b60405180910390fd5b83606660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555082606760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081606a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080606b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550620002bd856200041e60201b60201c565b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f98b6e848bcb9ab7cb2c546075f85f11bb4e96cbcbcb49aab03e65f45c33c621360405160405180910390a3505050505050565b600060019054906101000a900460ff168062000346575060008054906101000a900460ff16155b62000388576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200037f9062000abd565b60405180910390fd5b60008060019054906101000a900460ff161590508015620003d9576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b620003e96200053460201b60201c565b620003f96200061360201b60201c565b80156200041b5760008060016101000a81548160ff0219169083151502179055505b50565b6200042e6200071260201b60201c565b73ffffffffffffffffffffffffffffffffffffffff16620004546200071a60201b60201c565b73ffffffffffffffffffffffffffffffffffffffff1614620004ad576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620004a49062000adf565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141562000520576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620005179062000a79565b60405180910390fd5b62000531816200074460201b60201c565b50565b600060019054906101000a900460ff16806200055b575060008054906101000a900460ff16155b6200059d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620005949062000abd565b60405180910390fd5b60008060019054906101000a900460ff161590508015620005ee576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b8015620006105760008060016101000a81548160ff0219169083151502179055505b50565b600060019054906101000a900460ff16806200063a575060008054906101000a900460ff16155b6200067c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620006739062000abd565b60405180910390fd5b60008060019054906101000a900460ff161590508015620006cd576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b620006ed620006e16200071260201b60201c565b6200074460201b60201c565b80156200070f5760008060016101000a81548160ff0219169083151502179055505b50565b600033905090565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081603360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6000815190506200081b8162000c9a565b92915050565b600081519050620008328162000cb4565b92915050565b600080600080600060a0868803121562000857576200085662000b7c565b5b6000620008678882890162000821565b95505060206200087a8882890162000821565b94505060406200088d8882890162000821565b9350506060620008a08882890162000821565b9250506080620008b38882890162000821565b9150509295509295909350565b600080600080600060a08688031215620008df57620008de62000b7c565b5b6000620008ef888289016200080a565b955050602062000902888289016200080a565b945050604062000915888289016200080a565b935050606062000928888289016200080a565b92505060806200093b888289016200080a565b9150509295509295909350565b620009538162000b34565b82525050565b60006200096860268362000b23565b9150620009758262000b81565b604082019050919050565b60006200098f601e8362000b23565b91506200099c8262000bd0565b602082019050919050565b6000620009b6602e8362000b23565b9150620009c38262000bf9565b604082019050919050565b6000620009dd60208362000b23565b9150620009ea8262000c48565b602082019050919050565b600062000a04601e8362000b23565b915062000a118262000c71565b602082019050919050565b600060a08201905062000a33600083018862000948565b62000a42602083018762000948565b62000a51604083018662000948565b62000a60606083018562000948565b62000a6f608083018462000948565b9695505050505050565b6000602082019050818103600083015262000a948162000959565b9050919050565b6000602082019050818103600083015262000ab68162000980565b9050919050565b6000602082019050818103600083015262000ad881620009a7565b9050919050565b6000602082019050818103600083015262000afa81620009ce565b9050919050565b6000602082019050818103600083015262000b1c81620009f5565b9050919050565b600082825260208201905092915050565b600062000b418262000b5c565b9050919050565b600062000b558262000b5c565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600080fd5b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f5461726765742063616e206e6f74206265207a65726f20616464726573730000600082015250565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160008201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f4176617461722063616e206e6f74206265207a65726f20616464726573730000600082015250565b62000ca58162000b34565b811462000cb157600080fd5b50565b62000cbf8162000b48565b811462000ccb57600080fd5b50565b6133778062000cde6000396000f3fe608060405234801561001057600080fd5b50600436106101375760003560e01c80638da5cb5b116100b8578063b68877101161007c578063b6887710146102ee578063c91063891461031e578063d4b839921461033c578063e19a9dd91461035a578063ef96880414610376578063f2fde38b1461039257610137565b80638da5cb5b1461025e5780639358928b1461027c578063a4f9edbf1461029a578063ac346e89146102b6578063af20af8a146102d257610137565b8063768b5fd5116100ff578063768b5fd5146101ce578063776d1a01146101ea5780637ceab3b1146102065780637de1e53614610224578063826bec451461024257610137565b806301ffc9a71461013c578063086cfca81461016c5780632b112e49146101885780635aef7de6146101a6578063715018a6146101c4575b600080fd5b610156600480360381019061015191906124d7565b6103ae565b6040516101639190612a13565b60405180910390f35b61018660048036038101906101819190612388565b610410565b005b610190610552565b60405161019d9190612c68565b60405180910390f35b6101ae6105f9565b6040516101bb9190612893565b60405180910390f35b6101cc61061f565b005b6101e860048036038101906101e39190612388565b6106a7565b005b61020460048036038101906101ff9190612388565b610767565b005b61020e6108a9565b60405161021b9190612893565b60405180910390f35b61022c6108cf565b6040516102399190612a8d565b60405180910390f35b61025c6004803603810190610257919061245d565b6108f5565b005b610266610ad3565b6040516102739190612893565b60405180910390f35b610284610afd565b6040516102919190612a72565b60405180910390f35b6102b460048036038101906102af9190612504565b610b23565b005b6102d060048036038101906102cb919061245d565b610da0565b005b6102ec60048036038101906102e7919061257a565b610f7d565b005b61030860048036038101906103039190612388565b6112b2565b6040516103159190612a13565b60405180910390f35b6103266112d2565b6040516103339190612893565b60405180910390f35b6103446112fc565b6040516103519190612893565b60405180910390f35b610374600480360381019061036f9190612388565b611322565b005b610390600480360381019061038b9190612388565b611558565b005b6103ac60048036038101906103a79190612388565b611618565b005b60006301ffc9a760e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610409575063af20af8a60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b9050919050565b610418611710565b73ffffffffffffffffffffffffffffffffffffffff16610436610ad3565b73ffffffffffffffffffffffffffffffffffffffff161461048c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161048390612b68565b60405180910390fd5b6000606660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081606660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f52ae88b092de36f87fb43fe794eb1381023b9c1bce563a871154022c63dce34260405160405180910390a35050565b6000606b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636d4ce63c6040518163ffffffff1660e01b815260040160206040518083038186803b1580156105bc57600080fd5b505afa1580156105d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105f4919061254d565b905090565b606660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b610627611710565b73ffffffffffffffffffffffffffffffffffffffff16610645610ad3565b73ffffffffffffffffffffffffffffffffffffffff161461069b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161069290612b68565b60405180910390fd5b6106a56000611718565b565b6106af611710565b73ffffffffffffffffffffffffffffffffffffffff166106cd610ad3565b73ffffffffffffffffffffffffffffffffffffffff1614610723576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161071a90612b68565b60405180910390fd5b80606a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b61076f611710565b73ffffffffffffffffffffffffffffffffffffffff1661078d610ad3565b73ffffffffffffffffffffffffffffffffffffffff16146107e3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107da90612b68565b60405180910390fd5b6000606760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081606760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f90cc2f570a6eb594b1580ea3e41247d2d73a55281889e86bd4ec2fc29c7e62d660405160405180910390a35050565b606560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b606a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6108fd611710565b73ffffffffffffffffffffffffffffffffffffffff1661091b610ad3565b73ffffffffffffffffffffffffffffffffffffffff1614610971576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161096890612b68565b60405180910390fd5b60005b828290508160ff161015610ace576068600084848460ff1681811061099c5761099b612f7d565b5b90506020020160208101906109b19190612388565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615610a39576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a3090612ba8565b60405180910390fd5b60016068600085858560ff16818110610a5557610a54612f7d565b5b9050602002016020810190610a6a9190612388565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610ac690612ec6565b915050610974565b505050565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600080600085806020019051810190610b3f91906123e2565b94509450945094509450610b516117de565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415610bc1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bb890612b88565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610c31576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c2890612b08565b60405180910390fd5b83606660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555082606760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081606a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080606b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610d3e85611618565b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f98b6e848bcb9ab7cb2c546075f85f11bb4e96cbcbcb49aab03e65f45c33c621360405160405180910390a3505050505050565b610da8611710565b73ffffffffffffffffffffffffffffffffffffffff16610dc6610ad3565b73ffffffffffffffffffffffffffffffffffffffff1614610e1c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e1390612b68565b60405180910390fd5b60005b828290508160ff161015610f78576068600084848460ff16818110610e4757610e46612f7d565b5b9050602002016020810190610e5c9190612388565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16610ee3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610eda90612aa8565b60405180910390fd5b60006068600085858560ff16818110610eff57610efe612f7d565b5b9050602002016020810190610f149190612388565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610f7090612ec6565b915050610e1f565b505050565b60026069541415610fc3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fba90612c28565b60405180910390fd5b60026069819055503373ffffffffffffffffffffffffffffffffffffffff16606a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e856040518263ffffffff1660e01b815260040161103d9190612c68565b60206040518083038186803b15801561105557600080fd5b505afa158015611069573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061108d91906123b5565b73ffffffffffffffffffffffffffffffffffffffff16146110e3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110da90612be8565b60405180910390fd5b6000606b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636d4ce63c6040518163ffffffff1660e01b815260040160206040518083038186803b15801561114d57600080fd5b505afa158015611161573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611185919061254d565b6040516020016111959190612c68565b6040516020818303038152906040529050606a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd33606660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16876040518463ffffffff1660e01b8152600401611227939291906128ae565b600060405180830381600087803b15801561124157600080fd5b505af1158015611255573d6000803e3d6000fd5b505050506112a4838380806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050826118c7565b506001606981905550505050565b60686020528060005260406000206000915054906101000a900460ff1681565b6000606560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61132a611710565b73ffffffffffffffffffffffffffffffffffffffff16611348610ad3565b73ffffffffffffffffffffffffffffffffffffffff161461139e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161139590612b68565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146114bb578073ffffffffffffffffffffffffffffffffffffffff166301ffc9a77fe6d7a83a000000000000000000000000000000000000000000000000000000006040518263ffffffff1660e01b815260040161142b9190612a57565b60206040518083038186803b15801561144357600080fd5b505afa158015611457573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061147b91906124aa565b6114ba576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114b190612bc8565b60405180910390fd5b5b80606560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f1151116914515bc0891ff9047a6cb32cf902546f83066499bcf8ba33d2353fa2606560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660405161154d9190612893565b60405180910390a150565b611560611710565b73ffffffffffffffffffffffffffffffffffffffff1661157e610ad3565b73ffffffffffffffffffffffffffffffffffffffff16146115d4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115cb90612b68565b60405180910390fd5b80606b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b611620611710565b73ffffffffffffffffffffffffffffffffffffffff1661163e610ad3565b73ffffffffffffffffffffffffffffffffffffffff1614611694576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161168b90612b68565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611704576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116fb90612ae8565b60405180910390fd5b61170d81611718565b50565b600033905090565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081603360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600060019054906101000a900460ff1680611804575060008054906101000a900460ff16155b611843576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161183a90612b28565b60405180910390fd5b60008060019054906101000a900460ff161590508015611893576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b61189b611c15565b6118a3611cee565b80156118c45760008060016101000a81548160ff0219169083151502179055505b50565b6000606660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163111156119565761195533611950606660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163184611dd7565b611e05565b5b60008060005b84518160ff161015611bcb5760686000868360ff168151811061198257611981612f7d565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615611a12576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a0990612c08565b60405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff16858260ff1681518110611a3f57611a3e612f7d565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1611611a9d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a9490612c48565b60405180910390fd5b848160ff1681518110611ab357611ab2612f7d565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff166370a08231606660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518263ffffffff1660e01b8152600401611b159190612893565b60206040518083038186803b158015611b2d57600080fd5b505afa158015611b41573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b65919061254d565b9150611b98858260ff1681518110611b8057611b7f612f7d565b5b602002602001015133611b938588611dd7565b611e8a565b848160ff1681518110611bae57611bad612f7d565b5b602002602001015192508080611bc390612ec6565b91505061195c565b503373ffffffffffffffffffffffffffffffffffffffff167f19713765ac35da5948240df5d5347716cd4dc3815a2890a3c94df4a1e745136a60405160405180910390a250505050565b600060019054906101000a900460ff1680611c3b575060008054906101000a900460ff16155b611c7a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c7190612b28565b60405180910390fd5b60008060019054906101000a900460ff161590508015611cca576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b8015611ceb5760008060016101000a81548160ff0219169083151502179055505b50565b600060019054906101000a900460ff1680611d14575060008054906101000a900460ff16155b611d53576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d4a90612b28565b60405180910390fd5b60008060019054906101000a900460ff161590508015611da3576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b611db3611dae611710565b611718565b8015611dd45760008060016101000a81548160ff0219169083151502179055505b50565b60008082806020019051810190611dee919061254d565b90508084611dfc9190612d06565b91505092915050565b611e4782826040518060400160405280600281526020017f30780000000000000000000000000000000000000000000000000000000000008152506000611f3a565b611e86576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e7d90612b48565b60405180910390fd5b5050565b600063a9059cbb8383604051602401611ea49291906128e5565b6040516020818303038152906040529060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050611ef5846000836000611f3a565b611f34576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f2b90612ac8565b60405180910390fd5b50505050565b60008073ffffffffffffffffffffffffffffffffffffffff16606560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461206c57606560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166375f0bb528686868660008060008060006040518060400160405280600281526020017f307800000000000000000000000000000000000000000000000000000000000081525060006040518c63ffffffff1660e01b81526004016120399b9a9998979695949392919061295a565b600060405180830381600087803b15801561205357600080fd5b505af1158015612067573d6000803e3d6000fd5b505050505b606760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663468721a7868686866040518563ffffffff1660e01b81526004016120cd949392919061290e565b602060405180830381600087803b1580156120e757600080fd5b505af11580156120fb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061211f91906124aa565b9050600073ffffffffffffffffffffffffffffffffffffffff16606560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461222757606560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663932713687f3078000000000000000000000000000000000000000000000000000000000000836040518363ffffffff1660e01b81526004016121f4929190612a2e565b600060405180830381600087803b15801561220e57600080fd5b505af1158015612222573d6000803e3d6000fd5b505050505b949350505050565b600061224261223d84612ca8565b612c83565b90508281526020810184848401111561225e5761225d612fea565b5b612269848285612e53565b509392505050565b600081359050612280816132ce565b92915050565b600081519050612295816132ce565b92915050565b6000815190506122aa816132e5565b92915050565b60008083601f8401126122c6576122c5612fe0565b5b8235905067ffffffffffffffff8111156122e3576122e2612fdb565b5b6020830191508360208202830111156122ff576122fe612fe5565b5b9250929050565b600081519050612315816132fc565b92915050565b60008135905061232a81613313565b92915050565b600082601f83011261234557612344612fe0565b5b813561235584826020860161222f565b91505092915050565b60008135905061236d8161332a565b92915050565b6000815190506123828161332a565b92915050565b60006020828403121561239e5761239d612ff4565b5b60006123ac84828501612271565b91505092915050565b6000602082840312156123cb576123ca612ff4565b5b60006123d984828501612286565b91505092915050565b600080600080600060a086880312156123fe576123fd612ff4565b5b600061240c8882890161229b565b955050602061241d8882890161229b565b945050604061242e8882890161229b565b935050606061243f8882890161229b565b92505060806124508882890161229b565b9150509295509295909350565b6000806020838503121561247457612473612ff4565b5b600083013567ffffffffffffffff81111561249257612491612fef565b5b61249e858286016122b0565b92509250509250929050565b6000602082840312156124c0576124bf612ff4565b5b60006124ce84828501612306565b91505092915050565b6000602082840312156124ed576124ec612ff4565b5b60006124fb8482850161231b565b91505092915050565b60006020828403121561251a57612519612ff4565b5b600082013567ffffffffffffffff81111561253857612537612fef565b5b61254484828501612330565b91505092915050565b60006020828403121561256357612562612ff4565b5b600061257184828501612373565b91505092915050565b60008060006040848603121561259357612592612ff4565b5b60006125a18682870161235e565b935050602084013567ffffffffffffffff8111156125c2576125c1612fef565b5b6125ce868287016122b0565b92509250509250925092565b6125e381612d49565b82525050565b6125f281612d37565b82525050565b61260181612d5b565b82525050565b61261081612d67565b82525050565b61261f81612d71565b82525050565b600061263082612cd9565b61263a8185612ce4565b935061264a818560208601612e62565b61265381612ff9565b840191505092915050565b61266781612de7565b82525050565b61267681612e0b565b82525050565b61268581612e2f565b82525050565b61269481612e41565b82525050565b60006126a7601083612cf5565b91506126b28261300a565b602082019050919050565b60006126ca601783612cf5565b91506126d582613033565b602082019050919050565b60006126ed602683612cf5565b91506126f88261305c565b604082019050919050565b6000612710601e83612cf5565b915061271b826130ab565b602082019050919050565b6000612733602e83612cf5565b915061273e826130d4565b604082019050919050565b6000612756601e83612cf5565b915061276182613123565b602082019050919050565b6000612779602083612cf5565b91506127848261314c565b602082019050919050565b600061279c601e83612cf5565b91506127a782613175565b602082019050919050565b60006127bf601483612cf5565b91506127ca8261319e565b602082019050919050565b60006127e2602083612cf5565b91506127ed826131c7565b602082019050919050565b6000612805601983612cf5565b9150612810826131f0565b602082019050919050565b6000612828600c83612cf5565b915061283382613219565b602082019050919050565b600061284b601f83612cf5565b915061285682613242565b602082019050919050565b600061286e603083612cf5565b91506128798261326b565b604082019050919050565b61288d81612dd0565b82525050565b60006020820190506128a860008301846125e9565b92915050565b60006060820190506128c360008301866125e9565b6128d060208301856125e9565b6128dd6040830184612884565b949350505050565b60006040820190506128fa60008301856125e9565b6129076020830184612884565b9392505050565b600060808201905061292360008301876125e9565b6129306020830186612884565b81810360408301526129428185612625565b9050612951606083018461267c565b95945050505050565b600061016082019050612970600083018e6125e9565b61297d602083018d612884565b818103604083015261298f818c612625565b905061299e606083018b61267c565b6129ab608083018a61268b565b6129b860a083018961268b565b6129c560c083018861268b565b6129d260e08301876125e9565b6129e06101008301866125da565b8181036101208301526129f38185612625565b9050612a036101408301846125e9565b9c9b505050505050505050505050565b6000602082019050612a2860008301846125f8565b92915050565b6000604082019050612a436000830185612607565b612a5060208301846125f8565b9392505050565b6000602082019050612a6c6000830184612616565b92915050565b6000602082019050612a87600083018461265e565b92915050565b6000602082019050612aa2600083018461266d565b92915050565b60006020820190508181036000830152612ac18161269a565b9050919050565b60006020820190508181036000830152612ae1816126bd565b9050919050565b60006020820190508181036000830152612b01816126e0565b9050919050565b60006020820190508181036000830152612b2181612703565b9050919050565b60006020820190508181036000830152612b4181612726565b9050919050565b60006020820190508181036000830152612b6181612749565b9050919050565b60006020820190508181036000830152612b818161276c565b9050919050565b60006020820190508181036000830152612ba18161278f565b9050919050565b60006020820190508181036000830152612bc1816127b2565b9050919050565b60006020820190508181036000830152612be1816127d5565b9050919050565b60006020820190508181036000830152612c01816127f8565b9050919050565b60006020820190508181036000830152612c218161281b565b9050919050565b60006020820190508181036000830152612c418161283e565b9050919050565b60006020820190508181036000830152612c6181612861565b9050919050565b6000602082019050612c7d6000830184612884565b92915050565b6000612c8d612c9e565b9050612c998282612e95565b919050565b6000604051905090565b600067ffffffffffffffff821115612cc357612cc2612fac565b5b612ccc82612ff9565b9050602081019050919050565b600081519050919050565b600082825260208201905092915050565b600082825260208201905092915050565b6000612d1182612dd0565b9150612d1c83612dd0565b925082612d2c57612d2b612f1f565b5b828204905092915050565b6000612d4282612db0565b9050919050565b6000612d5482612db0565b9050919050565b60008115159050919050565b6000819050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6000819050612dab826132ba565b919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b6000612df282612df9565b9050919050565b6000612e0482612db0565b9050919050565b6000612e1682612e1d565b9050919050565b6000612e2882612db0565b9050919050565b6000612e3a82612d9d565b9050919050565b6000612e4c82612dd0565b9050919050565b82818337600083830152505050565b60005b83811015612e80578082015181840152602081019050612e65565b83811115612e8f576000848401525b50505050565b612e9e82612ff9565b810181811067ffffffffffffffff82111715612ebd57612ebc612fac565b5b80604052505050565b6000612ed182612dda565b915060ff821415612ee557612ee4612ef0565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f546f6b656e206e6f742064656e69656400000000000000000000000000000000600082015250565b7f4572726f72206f6e20746f6b656e207472616e73666572000000000000000000600082015250565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f5461726765742063616e206e6f74206265207a65726f20616464726573730000600082015250565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160008201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b7f4572726f72206f6e206e6174697665206173736574207472616e736665720000600082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f4176617461722063616e206e6f74206265207a65726f20616464726573730000600082015250565b7f546f6b656e20616c72656164792064656e696564000000000000000000000000600082015250565b7f477561726420646f6573206e6f7420696d706c656d656e742049455243313635600082015250565b7f4f6e6c7920746f6b656e206f776e65722063616e206578697400000000000000600082015250565b7f44656e69656420746f6b656e0000000000000000000000000000000000000000600082015250565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00600082015250565b7f746f6b656e735b5d206973206f7574206f66206f72646572206f7220636f6e7460008201527f61696e732061206475706c696361746500000000000000000000000000000000602082015250565b600281106132cb576132ca612f4e565b5b50565b6132d781612d37565b81146132e257600080fd5b50565b6132ee81612d49565b81146132f957600080fd5b50565b61330581612d5b565b811461331057600080fd5b50565b61331c81612d71565b811461332757600080fd5b50565b61333381612dd0565b811461333e57600080fd5b5056fea2646970667358221220d5e82e831a1adfe28a55e80f4c9993d7eff326332c6d22ff05befb07b8a0165d64736f6c63430008060033", + "constructorArgs": { + "types": [ + "address", + "address", + "address", + "address", + "address" + ], + "values": [ + "0x0000000000000000000000000000000000000001", + "0x0000000000000000000000000000000000000001", + "0x0000000000000000000000000000000000000001", + "0x0000000000000000000000000000000000000001", + "0x0000000000000000000000000000000000000001" + ] + }, + "salt": "0x0000000000000000000000000000000000000000000000000000000000000000", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_owner", + "type": "address" + }, + { + "internalType": "address", + "name": "_avatar", + "type": "address" + }, + { + "internalType": "address", + "name": "_target", + "type": "address" + }, + { + "internalType": "address", + "name": "_collection", + "type": "address" + }, + { + "internalType": "address", + "name": "_circulatingSupply", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousAvatar", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newAvatar", + "type": "address" + } + ], + "name": "AvatarSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "guard", + "type": "address" + } + ], + "name": "ChangedGuard", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "initiator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "avatar", + "type": "address" + } + ], + "name": "ExitModuleSetup", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "leaver", + "type": "address" + } + ], + "name": "ExitSuccessful", + "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": true, + "internalType": "address", + "name": "previousTarget", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newTarget", + "type": "address" + } + ], + "name": "TargetSet", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "tokens", + "type": "address[]" + } + ], + "name": "addToDenyList", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "avatar", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "circulatingSupply", + "outputs": [ + { + "internalType": "contract CirculatingSupplyERC721", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "collection", + "outputs": [ + { + "internalType": "contract ERC721Enumerable", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "deniedTokens", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "tokens", + "type": "address[]" + } + ], + "name": "exit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "getCirculatingSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getGuard", + "outputs": [ + { + "internalType": "address", + "name": "_guard", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "guard", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "tokens", + "type": "address[]" + } + ], + "name": "removeFromDenyList", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_avatar", + "type": "address" + } + ], + "name": "setAvatar", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_circulatingSupply", + "type": "address" + } + ], + "name": "setCirculatingSupply", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_collection", + "type": "address" + } + ], + "name": "setCollection", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_guard", + "type": "address" + } + ], + "name": "setGuard", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_target", + "type": "address" + } + ], + "name": "setTarget", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "initParams", + "type": "bytes" + } + ], + "name": "setUp", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceID", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "target", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "compilerInput": { + "language": "Solidity", + "sources": { + "@gnosis.pm/safe-contracts/contracts/common/Enum.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\n/// @title Enum - Collection of enums\n/// @author Richard Meissner - \ncontract Enum {\n enum Operation {Call, DelegateCall}\n}\n" + }, + "@gnosis.pm/zodiac/contracts/core/Module.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\n\n/// @title Module Interface - A contract that can pass messages to a Module Manager contract if enabled by that contract.\npragma solidity >=0.7.0 <0.9.0;\n\nimport \"../interfaces/IAvatar.sol\";\nimport \"../factory/FactoryFriendly.sol\";\nimport \"../guard/Guardable.sol\";\n\nabstract contract Module is FactoryFriendly, Guardable {\n /// @dev Emitted each time the avatar is set.\n event AvatarSet(address indexed previousAvatar, address indexed newAvatar);\n /// @dev Emitted each time the Target is set.\n event TargetSet(address indexed previousTarget, address indexed newTarget);\n\n /// @dev Address that will ultimately execute function calls.\n address public avatar;\n /// @dev Address that this module will pass transactions to.\n address public target;\n\n /// @dev Sets the avatar to a new avatar (`newAvatar`).\n /// @notice Can only be called by the current owner.\n function setAvatar(address _avatar) public onlyOwner {\n address previousAvatar = avatar;\n avatar = _avatar;\n emit AvatarSet(previousAvatar, _avatar);\n }\n\n /// @dev Sets the target to a new target (`newTarget`).\n /// @notice Can only be called by the current owner.\n function setTarget(address _target) public onlyOwner {\n address previousTarget = target;\n target = _target;\n emit TargetSet(previousTarget, _target);\n }\n\n /// @dev Passes a transaction to be executed by the avatar.\n /// @notice Can only be called by this contract.\n /// @param to Destination address of module transaction.\n /// @param value Ether value of module transaction.\n /// @param data Data payload of module transaction.\n /// @param operation Operation type of module transaction: 0 == call, 1 == delegate call.\n function exec(\n address to,\n uint256 value,\n bytes memory data,\n Enum.Operation operation\n ) internal returns (bool success) {\n /// check if a transactioon guard is enabled.\n if (guard != address(0)) {\n IGuard(guard).checkTransaction(\n /// Transaction info used by module transactions\n to,\n value,\n data,\n operation,\n /// Zero out the redundant transaction information only used for Safe multisig transctions\n 0,\n 0,\n 0,\n address(0),\n payable(0),\n bytes(\"0x\"),\n address(0)\n );\n }\n success = IAvatar(target).execTransactionFromModule(\n to,\n value,\n data,\n operation\n );\n if (guard != address(0)) {\n IGuard(guard).checkAfterExecution(bytes32(\"0x\"), success);\n }\n return success;\n }\n\n /// @dev Passes a transaction to be executed by the target and returns data.\n /// @notice Can only be called by this contract.\n /// @param to Destination address of module transaction.\n /// @param value Ether value of module transaction.\n /// @param data Data payload of module transaction.\n /// @param operation Operation type of module transaction: 0 == call, 1 == delegate call.\n function execAndReturnData(\n address to,\n uint256 value,\n bytes memory data,\n Enum.Operation operation\n ) internal returns (bool success, bytes memory returnData) {\n /// check if a transactioon guard is enabled.\n if (guard != address(0)) {\n IGuard(guard).checkTransaction(\n /// Transaction info used by module transactions\n to,\n value,\n data,\n operation,\n /// Zero out the redundant transaction information only used for Safe multisig transctions\n 0,\n 0,\n 0,\n address(0),\n payable(0),\n bytes(\"0x\"),\n address(0)\n );\n }\n (success, returnData) = IAvatar(target)\n .execTransactionFromModuleReturnData(to, value, data, operation);\n if (guard != address(0)) {\n IGuard(guard).checkAfterExecution(bytes32(\"0x\"), success);\n }\n return (success, returnData);\n }\n}\n" + }, + "@gnosis.pm/zodiac/contracts/factory/FactoryFriendly.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\n\n/// @title Zodiac FactoryFriendly - A contract that allows other contracts to be initializable and pass bytes as arguments to define contract state\npragma solidity >=0.7.0 <0.9.0;\n\nimport \"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\";\n\nabstract contract FactoryFriendly is OwnableUpgradeable {\n function setUp(bytes memory initializeParams) public virtual;\n}\n" + }, + "@gnosis.pm/zodiac/contracts/guard/BaseGuard.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\nimport \"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\";\nimport \"@openzeppelin/contracts/utils/introspection/IERC165.sol\";\nimport \"../interfaces/IGuard.sol\";\n\nabstract contract BaseGuard is IERC165 {\n function supportsInterface(bytes4 interfaceId)\n external\n pure\n override\n returns (bool)\n {\n return\n interfaceId == type(IGuard).interfaceId || // 0xe6d7a83a\n interfaceId == type(IERC165).interfaceId; // 0x01ffc9a7\n }\n\n /// Module transactions only use the first four parameters: to, value, data, and operation.\n /// Module.sol hardcodes the remaining parameters as 0 since they are not used for module transactions.\n /// This interface is used to maintain compatibilty with Gnosis Safe transaction guards.\n function checkTransaction(\n address to,\n uint256 value,\n bytes memory data,\n Enum.Operation operation,\n uint256 safeTxGas,\n uint256 baseGas,\n uint256 gasPrice,\n address gasToken,\n address payable refundReceiver,\n bytes memory signatures,\n address msgSender\n ) external virtual;\n\n function checkAfterExecution(bytes32 txHash, bool success) external virtual;\n}\n" + }, + "@gnosis.pm/zodiac/contracts/guard/Guardable.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\nimport \"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\";\nimport \"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\";\nimport \"./BaseGuard.sol\";\n\n/// @title Guardable - A contract that manages fallback calls made to this contract\ncontract Guardable is OwnableUpgradeable {\n event ChangedGuard(address guard);\n\n address public guard;\n\n /// @dev Set a guard that checks transactions before execution\n /// @param _guard The address of the guard to be used or the 0 address to disable the guard\n function setGuard(address _guard) external onlyOwner {\n if (_guard != address(0)) {\n require(\n BaseGuard(_guard).supportsInterface(type(IGuard).interfaceId),\n \"Guard does not implement IERC165\"\n );\n }\n guard = _guard;\n emit ChangedGuard(guard);\n }\n\n function getGuard() external view returns (address _guard) {\n return guard;\n }\n}\n" + }, + "@gnosis.pm/zodiac/contracts/interfaces/IAvatar.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\n\n/// @title Zodiac Avatar - A contract that manages modules that can execute transactions via this contract.\npragma solidity >=0.7.0 <0.9.0;\n\nimport \"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\";\n\ninterface IAvatar {\n /// @dev Enables a module on the avatar.\n /// @notice Can only be called by the avatar.\n /// @notice Modules should be stored as a linked list.\n /// @notice Must emit EnabledModule(address module) if successful.\n /// @param module Module to be enabled.\n function enableModule(address module) external;\n\n /// @dev Disables a module on the avatar.\n /// @notice Can only be called by the avatar.\n /// @notice Must emit DisabledModule(address module) if successful.\n /// @param prevModule Address that pointed to the module to be removed in the linked list\n /// @param module Module to be removed.\n function disableModule(address prevModule, address module) external;\n\n /// @dev Allows a Module to execute a transaction.\n /// @notice Can only be called by an enabled module.\n /// @notice Must emit ExecutionFromModuleSuccess(address module) if successful.\n /// @notice Must emit ExecutionFromModuleFailure(address module) if unsuccessful.\n /// @param to Destination address of module transaction.\n /// @param value Ether value of module transaction.\n /// @param data Data payload of module transaction.\n /// @param operation Operation type of module transaction: 0 == call, 1 == delegate call.\n function execTransactionFromModule(\n address to,\n uint256 value,\n bytes memory data,\n Enum.Operation operation\n ) external returns (bool success);\n\n /// @dev Allows a Module to execute a transaction and return data\n /// @notice Can only be called by an enabled module.\n /// @notice Must emit ExecutionFromModuleSuccess(address module) if successful.\n /// @notice Must emit ExecutionFromModuleFailure(address module) if unsuccessful.\n /// @param to Destination address of module transaction.\n /// @param value Ether value of module transaction.\n /// @param data Data payload of module transaction.\n /// @param operation Operation type of module transaction: 0 == call, 1 == delegate call.\n function execTransactionFromModuleReturnData(\n address to,\n uint256 value,\n bytes memory data,\n Enum.Operation operation\n ) external returns (bool success, bytes memory returnData);\n\n /// @dev Returns if an module is enabled\n /// @return True if the module is enabled\n function isModuleEnabled(address module) external view returns (bool);\n\n /// @dev Returns array of modules.\n /// @param start Start of the page.\n /// @param pageSize Maximum number of modules that should be returned.\n /// @return array Array of modules.\n /// @return next Start of the next page.\n function getModulesPaginated(address start, uint256 pageSize)\n external\n view\n returns (address[] memory array, address next);\n}\n" + }, + "@gnosis.pm/zodiac/contracts/interfaces/IGuard.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\nimport \"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\";\n\ninterface IGuard {\n function checkTransaction(\n address to,\n uint256 value,\n bytes memory data,\n Enum.Operation operation,\n uint256 safeTxGas,\n uint256 baseGas,\n uint256 gasPrice,\n address gasToken,\n address payable refundReceiver,\n bytes memory signatures,\n address msgSender\n ) external;\n\n function checkAfterExecution(bytes32 txHash, bool success) external;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../utils/ContextUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\n address private _owner;\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the deployer as the initial owner.\n */\n function __Ownable_init() internal initializer {\n __Context_init_unchained();\n __Ownable_init_unchained();\n }\n\n function __Ownable_init_unchained() internal initializer {\n _setOwner(_msgSender());\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 called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n _;\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions anymore. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby removing any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n _setOwner(address(0));\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner {\n require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n _setOwner(newOwner);\n }\n\n function _setOwner(address newOwner) private {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n uint256[49] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\n * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\n *\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\n *\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\n */\nabstract contract Initializable {\n /**\n * @dev Indicates that the contract has been initialized.\n */\n bool private _initialized;\n\n /**\n * @dev Indicates that the contract is in the process of being initialized.\n */\n bool private _initializing;\n\n /**\n * @dev Modifier to protect an initializer function from being invoked twice.\n */\n modifier initializer() {\n require(_initializing || !_initialized, \"Initializable: contract is already initialized\");\n\n bool isTopLevelCall = !_initializing;\n if (isTopLevelCall) {\n _initializing = true;\n _initialized = true;\n }\n\n _;\n\n if (isTopLevelCall) {\n _initializing = false;\n }\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract ContextUpgradeable is Initializable {\n function __Context_init() internal initializer {\n __Context_init_unchained();\n }\n\n function __Context_init_unchained() internal initializer {\n }\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n uint256[50] private __gap;\n}\n" + }, + "@openzeppelin/contracts/security/ReentrancyGuard.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Contract module that helps prevent reentrant calls to a function.\n *\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\n * available, which can be applied to functions to make sure there are no nested\n * (reentrant) calls to them.\n *\n * Note that because there is a single `nonReentrant` guard, functions marked as\n * `nonReentrant` may not call one another. This can be worked around by making\n * those functions `private`, and then adding `external` `nonReentrant` entry\n * points to them.\n *\n * TIP: If you would like to learn more about reentrancy and alternative ways\n * to protect against it, check out our blog post\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\n */\nabstract contract ReentrancyGuard {\n // Booleans are more expensive than uint256 or any type that takes up a full\n // word because each write operation emits an extra SLOAD to first read the\n // slot's contents, replace the bits taken up by the boolean, and then write\n // back. This is the compiler's defense against contract upgrades and\n // pointer aliasing, and it cannot be disabled.\n\n // The values being non-zero value makes deployment a bit more expensive,\n // but in exchange the refund on every call to nonReentrant will be lower in\n // amount. Since refunds are capped to a percentage of the total\n // transaction's gas, it is best to keep them low in cases like this one, to\n // increase the likelihood of the full refund coming into effect.\n uint256 private constant _NOT_ENTERED = 1;\n uint256 private constant _ENTERED = 2;\n\n uint256 private _status;\n\n constructor() {\n _status = _NOT_ENTERED;\n }\n\n /**\n * @dev Prevents a contract from calling itself, directly or indirectly.\n * Calling a `nonReentrant` function from another `nonReentrant`\n * function is not supported. It is possible to prevent this from happening\n * by making the `nonReentrant` function external, and make it call a\n * `private` function that does the actual work.\n */\n modifier nonReentrant() {\n // On the first call to nonReentrant, _notEntered will be true\n require(_status != _ENTERED, \"ReentrancyGuard: reentrant call\");\n\n // Any calls to nonReentrant after this point will fail\n _status = _ENTERED;\n\n _;\n\n // By storing the original value once again, a refund is triggered (see\n // https://eips.ethereum.org/EIPS/eip-2200)\n _status = _NOT_ENTERED;\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/ERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./IERC20.sol\";\nimport \"./extensions/IERC20Metadata.sol\";\nimport \"../../utils/Context.sol\";\n\n/**\n * @dev Implementation of the {IERC20} interface.\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n * For a generic mechanism see {ERC20PresetMinterPauser}.\n *\n * TIP: For a detailed writeup see our guide\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\n *\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\n * instead returning `false` on failure. This behavior is nonetheless\n * conventional and does not conflict with the expectations of ERC20\n * applications.\n *\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\n * This allows applications to reconstruct the allowance for all accounts just\n * by listening to said events. Other implementations of the EIP may not emit\n * these events, as it isn't required by the specification.\n *\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\n * functions have been added to mitigate the well-known issues around setting\n * allowances. See {IERC20-approve}.\n */\ncontract ERC20 is Context, IERC20, IERC20Metadata {\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n uint256 private _totalSupply;\n\n string private _name;\n string private _symbol;\n\n /**\n * @dev Sets the values for {name} and {symbol}.\n *\n * The default value of {decimals} is 18. To select a different value for\n * {decimals} you should overload it.\n *\n * All two of these values are immutable: they can only be set once during\n * construction.\n */\n constructor(string memory name_, string memory symbol_) {\n _name = name_;\n _symbol = symbol_;\n }\n\n /**\n * @dev Returns the name of the token.\n */\n function name() public view virtual override returns (string memory) {\n return _name;\n }\n\n /**\n * @dev Returns the symbol of the token, usually a shorter version of the\n * name.\n */\n function symbol() public view virtual override returns (string memory) {\n return _symbol;\n }\n\n /**\n * @dev Returns the number of decimals used to get its user representation.\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\n *\n * Tokens usually opt for a value of 18, imitating the relationship between\n * Ether and Wei. This is the value {ERC20} uses, unless this function is\n * overridden;\n *\n * NOTE: This information is only used for _display_ purposes: it in\n * no way affects any of the arithmetic of the contract, including\n * {IERC20-balanceOf} and {IERC20-transfer}.\n */\n function decimals() public view virtual override returns (uint8) {\n return 18;\n }\n\n /**\n * @dev See {IERC20-totalSupply}.\n */\n function totalSupply() public view virtual override returns (uint256) {\n return _totalSupply;\n }\n\n /**\n * @dev See {IERC20-balanceOf}.\n */\n function balanceOf(address account) public view virtual override returns (uint256) {\n return _balances[account];\n }\n\n /**\n * @dev See {IERC20-transfer}.\n *\n * Requirements:\n *\n * - `recipient` cannot be the zero address.\n * - the caller must have a balance of at least `amount`.\n */\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\n _transfer(_msgSender(), recipient, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-allowance}.\n */\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n /**\n * @dev See {IERC20-approve}.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\n _approve(_msgSender(), spender, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-transferFrom}.\n *\n * Emits an {Approval} event indicating the updated allowance. This is not\n * required by the EIP. See the note at the beginning of {ERC20}.\n *\n * Requirements:\n *\n * - `sender` and `recipient` cannot be the zero address.\n * - `sender` must have a balance of at least `amount`.\n * - the caller must have allowance for ``sender``'s tokens of at least\n * `amount`.\n */\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transfer(sender, recipient, amount);\n\n uint256 currentAllowance = _allowances[sender][_msgSender()];\n require(currentAllowance >= amount, \"ERC20: transfer amount exceeds allowance\");\n unchecked {\n _approve(sender, _msgSender(), currentAllowance - amount);\n }\n\n return true;\n }\n\n /**\n * @dev Atomically increases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue);\n return true;\n }\n\n /**\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n * - `spender` must have allowance for the caller of at least\n * `subtractedValue`.\n */\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\n uint256 currentAllowance = _allowances[_msgSender()][spender];\n require(currentAllowance >= subtractedValue, \"ERC20: decreased allowance below zero\");\n unchecked {\n _approve(_msgSender(), spender, currentAllowance - subtractedValue);\n }\n\n return true;\n }\n\n /**\n * @dev Moves `amount` of tokens from `sender` to `recipient`.\n *\n * This internal function is equivalent to {transfer}, and can be used to\n * e.g. implement automatic token fees, slashing mechanisms, etc.\n *\n * Emits a {Transfer} event.\n *\n * Requirements:\n *\n * - `sender` cannot be the zero address.\n * - `recipient` cannot be the zero address.\n * - `sender` must have a balance of at least `amount`.\n */\n function _transfer(\n address sender,\n address recipient,\n uint256 amount\n ) internal virtual {\n require(sender != address(0), \"ERC20: transfer from the zero address\");\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\n\n _beforeTokenTransfer(sender, recipient, amount);\n\n uint256 senderBalance = _balances[sender];\n require(senderBalance >= amount, \"ERC20: transfer amount exceeds balance\");\n unchecked {\n _balances[sender] = senderBalance - amount;\n }\n _balances[recipient] += amount;\n\n emit Transfer(sender, recipient, amount);\n\n _afterTokenTransfer(sender, recipient, amount);\n }\n\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\n * the total supply.\n *\n * Emits a {Transfer} event with `from` set to the zero address.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n */\n function _mint(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: mint to the zero address\");\n\n _beforeTokenTransfer(address(0), account, amount);\n\n _totalSupply += amount;\n _balances[account] += amount;\n emit Transfer(address(0), account, amount);\n\n _afterTokenTransfer(address(0), account, amount);\n }\n\n /**\n * @dev Destroys `amount` tokens from `account`, reducing the\n * total supply.\n *\n * Emits a {Transfer} event with `to` set to the zero address.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n * - `account` must have at least `amount` tokens.\n */\n function _burn(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: burn from the zero address\");\n\n _beforeTokenTransfer(account, address(0), amount);\n\n uint256 accountBalance = _balances[account];\n require(accountBalance >= amount, \"ERC20: burn amount exceeds balance\");\n unchecked {\n _balances[account] = accountBalance - amount;\n }\n _totalSupply -= amount;\n\n emit Transfer(account, address(0), amount);\n\n _afterTokenTransfer(account, address(0), amount);\n }\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\n *\n * This internal function is equivalent to `approve`, and can be used to\n * e.g. set automatic allowances for certain subsystems, etc.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `owner` cannot be the zero address.\n * - `spender` cannot be the zero address.\n */\n function _approve(\n address owner,\n address spender,\n uint256 amount\n ) internal virtual {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n emit Approval(owner, spender, amount);\n }\n\n /**\n * @dev Hook that is called before any transfer of tokens. This includes\n * minting and burning.\n *\n * Calling conditions:\n *\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * will be transferred to `to`.\n * - when `from` is zero, `amount` tokens will be minted for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\n * - `from` and `to` are never both zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual {}\n\n /**\n * @dev Hook that is called after any transfer of tokens. This includes\n * minting and burning.\n *\n * Calling conditions:\n *\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * has been transferred to `to`.\n * - when `from` is zero, `amount` tokens have been minted for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\n * - `from` and `to` are never both zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _afterTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual {}\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20.sol\";\n\n/**\n * @dev Interface for the optional metadata functions from the ERC20 standard.\n *\n * _Available since v4.1._\n */\ninterface IERC20Metadata is IERC20 {\n /**\n * @dev Returns the name of the token.\n */\n function name() external view returns (string memory);\n\n /**\n * @dev Returns the symbol of the token.\n */\n function symbol() external view returns (string memory);\n\n /**\n * @dev Returns the decimals places of the token.\n */\n function decimals() external view returns (uint8);\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/IERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller's account to `recipient`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address recipient, uint256 amount) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `sender` to `recipient` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) external returns (bool);\n\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n" + }, + "@openzeppelin/contracts/token/ERC721/ERC721.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./IERC721.sol\";\nimport \"./IERC721Receiver.sol\";\nimport \"./extensions/IERC721Metadata.sol\";\nimport \"../../utils/Address.sol\";\nimport \"../../utils/Context.sol\";\nimport \"../../utils/Strings.sol\";\nimport \"../../utils/introspection/ERC165.sol\";\n\n/**\n * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including\n * the Metadata extension, but not including the Enumerable extension, which is available separately as\n * {ERC721Enumerable}.\n */\ncontract ERC721 is Context, ERC165, IERC721, IERC721Metadata {\n using Address for address;\n using Strings for uint256;\n\n // Token name\n string private _name;\n\n // Token symbol\n string private _symbol;\n\n // Mapping from token ID to owner address\n mapping(uint256 => address) private _owners;\n\n // Mapping owner address to token count\n mapping(address => uint256) private _balances;\n\n // Mapping from token ID to approved address\n mapping(uint256 => address) private _tokenApprovals;\n\n // Mapping from owner to operator approvals\n mapping(address => mapping(address => bool)) private _operatorApprovals;\n\n /**\n * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.\n */\n constructor(string memory name_, string memory symbol_) {\n _name = name_;\n _symbol = symbol_;\n }\n\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {\n return\n interfaceId == type(IERC721).interfaceId ||\n interfaceId == type(IERC721Metadata).interfaceId ||\n super.supportsInterface(interfaceId);\n }\n\n /**\n * @dev See {IERC721-balanceOf}.\n */\n function balanceOf(address owner) public view virtual override returns (uint256) {\n require(owner != address(0), \"ERC721: balance query for the zero address\");\n return _balances[owner];\n }\n\n /**\n * @dev See {IERC721-ownerOf}.\n */\n function ownerOf(uint256 tokenId) public view virtual override returns (address) {\n address owner = _owners[tokenId];\n require(owner != address(0), \"ERC721: owner query for nonexistent token\");\n return owner;\n }\n\n /**\n * @dev See {IERC721Metadata-name}.\n */\n function name() public view virtual override returns (string memory) {\n return _name;\n }\n\n /**\n * @dev See {IERC721Metadata-symbol}.\n */\n function symbol() public view virtual override returns (string memory) {\n return _symbol;\n }\n\n /**\n * @dev See {IERC721Metadata-tokenURI}.\n */\n function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {\n require(_exists(tokenId), \"ERC721Metadata: URI query for nonexistent token\");\n\n string memory baseURI = _baseURI();\n return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : \"\";\n }\n\n /**\n * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each\n * token will be the concatenation of the `baseURI` and the `tokenId`. Empty\n * by default, can be overriden in child contracts.\n */\n function _baseURI() internal view virtual returns (string memory) {\n return \"\";\n }\n\n /**\n * @dev See {IERC721-approve}.\n */\n function approve(address to, uint256 tokenId) public virtual override {\n address owner = ERC721.ownerOf(tokenId);\n require(to != owner, \"ERC721: approval to current owner\");\n\n require(\n _msgSender() == owner || isApprovedForAll(owner, _msgSender()),\n \"ERC721: approve caller is not owner nor approved for all\"\n );\n\n _approve(to, tokenId);\n }\n\n /**\n * @dev See {IERC721-getApproved}.\n */\n function getApproved(uint256 tokenId) public view virtual override returns (address) {\n require(_exists(tokenId), \"ERC721: approved query for nonexistent token\");\n\n return _tokenApprovals[tokenId];\n }\n\n /**\n * @dev See {IERC721-setApprovalForAll}.\n */\n function setApprovalForAll(address operator, bool approved) public virtual override {\n require(operator != _msgSender(), \"ERC721: approve to caller\");\n\n _operatorApprovals[_msgSender()][operator] = approved;\n emit ApprovalForAll(_msgSender(), operator, approved);\n }\n\n /**\n * @dev See {IERC721-isApprovedForAll}.\n */\n function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {\n return _operatorApprovals[owner][operator];\n }\n\n /**\n * @dev See {IERC721-transferFrom}.\n */\n function transferFrom(\n address from,\n address to,\n uint256 tokenId\n ) public virtual override {\n //solhint-disable-next-line max-line-length\n require(_isApprovedOrOwner(_msgSender(), tokenId), \"ERC721: transfer caller is not owner nor approved\");\n\n _transfer(from, to, tokenId);\n }\n\n /**\n * @dev See {IERC721-safeTransferFrom}.\n */\n function safeTransferFrom(\n address from,\n address to,\n uint256 tokenId\n ) public virtual override {\n safeTransferFrom(from, to, tokenId, \"\");\n }\n\n /**\n * @dev See {IERC721-safeTransferFrom}.\n */\n function safeTransferFrom(\n address from,\n address to,\n uint256 tokenId,\n bytes memory _data\n ) public virtual override {\n require(_isApprovedOrOwner(_msgSender(), tokenId), \"ERC721: transfer caller is not owner nor approved\");\n _safeTransfer(from, to, tokenId, _data);\n }\n\n /**\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\n *\n * `_data` is additional data, it has no specified format and it is sent in call to `to`.\n *\n * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.\n * implement alternative mechanisms to perform token transfer, such as signature-based.\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 `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n *\n * Emits a {Transfer} event.\n */\n function _safeTransfer(\n address from,\n address to,\n uint256 tokenId,\n bytes memory _data\n ) internal virtual {\n _transfer(from, to, tokenId);\n require(_checkOnERC721Received(from, to, tokenId, _data), \"ERC721: transfer to non ERC721Receiver implementer\");\n }\n\n /**\n * @dev Returns whether `tokenId` exists.\n *\n * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.\n *\n * Tokens start existing when they are minted (`_mint`),\n * and stop existing when they are burned (`_burn`).\n */\n function _exists(uint256 tokenId) internal view virtual returns (bool) {\n return _owners[tokenId] != address(0);\n }\n\n /**\n * @dev Returns whether `spender` is allowed to manage `tokenId`.\n *\n * Requirements:\n *\n * - `tokenId` must exist.\n */\n function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {\n require(_exists(tokenId), \"ERC721: operator query for nonexistent token\");\n address owner = ERC721.ownerOf(tokenId);\n return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender));\n }\n\n /**\n * @dev Safely mints `tokenId` and transfers it to `to`.\n *\n * Requirements:\n *\n * - `tokenId` must not exist.\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n *\n * Emits a {Transfer} event.\n */\n function _safeMint(address to, uint256 tokenId) internal virtual {\n _safeMint(to, tokenId, \"\");\n }\n\n /**\n * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is\n * forwarded in {IERC721Receiver-onERC721Received} to contract recipients.\n */\n function _safeMint(\n address to,\n uint256 tokenId,\n bytes memory _data\n ) internal virtual {\n _mint(to, tokenId);\n require(\n _checkOnERC721Received(address(0), to, tokenId, _data),\n \"ERC721: transfer to non ERC721Receiver implementer\"\n );\n }\n\n /**\n * @dev Mints `tokenId` and transfers it to `to`.\n *\n * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible\n *\n * Requirements:\n *\n * - `tokenId` must not exist.\n * - `to` cannot be the zero address.\n *\n * Emits a {Transfer} event.\n */\n function _mint(address to, uint256 tokenId) internal virtual {\n require(to != address(0), \"ERC721: mint to the zero address\");\n require(!_exists(tokenId), \"ERC721: token already minted\");\n\n _beforeTokenTransfer(address(0), to, tokenId);\n\n _balances[to] += 1;\n _owners[tokenId] = to;\n\n emit Transfer(address(0), to, tokenId);\n }\n\n /**\n * @dev Destroys `tokenId`.\n * The approval is cleared when the token is burned.\n *\n * Requirements:\n *\n * - `tokenId` must exist.\n *\n * Emits a {Transfer} event.\n */\n function _burn(uint256 tokenId) internal virtual {\n address owner = ERC721.ownerOf(tokenId);\n\n _beforeTokenTransfer(owner, address(0), tokenId);\n\n // Clear approvals\n _approve(address(0), tokenId);\n\n _balances[owner] -= 1;\n delete _owners[tokenId];\n\n emit Transfer(owner, address(0), tokenId);\n }\n\n /**\n * @dev Transfers `tokenId` from `from` to `to`.\n * As opposed to {transferFrom}, this imposes no restrictions on msg.sender.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - `tokenId` token must be owned by `from`.\n *\n * Emits a {Transfer} event.\n */\n function _transfer(\n address from,\n address to,\n uint256 tokenId\n ) internal virtual {\n require(ERC721.ownerOf(tokenId) == from, \"ERC721: transfer of token that is not own\");\n require(to != address(0), \"ERC721: transfer to the zero address\");\n\n _beforeTokenTransfer(from, to, tokenId);\n\n // Clear approvals from the previous owner\n _approve(address(0), tokenId);\n\n _balances[from] -= 1;\n _balances[to] += 1;\n _owners[tokenId] = to;\n\n emit Transfer(from, to, tokenId);\n }\n\n /**\n * @dev Approve `to` to operate on `tokenId`\n *\n * Emits a {Approval} event.\n */\n function _approve(address to, uint256 tokenId) internal virtual {\n _tokenApprovals[tokenId] = to;\n emit Approval(ERC721.ownerOf(tokenId), to, tokenId);\n }\n\n /**\n * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.\n * The call is not executed if the target address is not a contract.\n *\n * @param from address representing the previous owner of the given token ID\n * @param to target address that will receive the tokens\n * @param tokenId uint256 ID of the token to be transferred\n * @param _data bytes optional data to send along with the call\n * @return bool whether the call correctly returned the expected magic value\n */\n function _checkOnERC721Received(\n address from,\n address to,\n uint256 tokenId,\n bytes memory _data\n ) private returns (bool) {\n if (to.isContract()) {\n try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) {\n return retval == IERC721Receiver.onERC721Received.selector;\n } catch (bytes memory reason) {\n if (reason.length == 0) {\n revert(\"ERC721: transfer to non ERC721Receiver implementer\");\n } else {\n assembly {\n revert(add(32, reason), mload(reason))\n }\n }\n }\n } else {\n return true;\n }\n }\n\n /**\n * @dev Hook that is called before any token transfer. This includes minting\n * and burning.\n *\n * Calling conditions:\n *\n * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be\n * transferred to `to`.\n * - When `from` is zero, `tokenId` will be minted for `to`.\n * - When `to` is zero, ``from``'s `tokenId` will be burned.\n * - `from` and `to` are never both zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256 tokenId\n ) internal virtual {}\n}\n" + }, + "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../ERC721.sol\";\nimport \"./IERC721Enumerable.sol\";\n\n/**\n * @dev This implements an optional extension of {ERC721} defined in the EIP that adds\n * enumerability of all the token ids in the contract as well as all token ids owned by each\n * account.\n */\nabstract contract ERC721Enumerable is ERC721, IERC721Enumerable {\n // Mapping from owner to list of owned token IDs\n mapping(address => mapping(uint256 => uint256)) private _ownedTokens;\n\n // Mapping from token ID to index of the owner tokens list\n mapping(uint256 => uint256) private _ownedTokensIndex;\n\n // Array with all token ids, used for enumeration\n uint256[] private _allTokens;\n\n // Mapping from token id to position in the allTokens array\n mapping(uint256 => uint256) private _allTokensIndex;\n\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) {\n return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId);\n }\n\n /**\n * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.\n */\n function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) {\n require(index < ERC721.balanceOf(owner), \"ERC721Enumerable: owner index out of bounds\");\n return _ownedTokens[owner][index];\n }\n\n /**\n * @dev See {IERC721Enumerable-totalSupply}.\n */\n function totalSupply() public view virtual override returns (uint256) {\n return _allTokens.length;\n }\n\n /**\n * @dev See {IERC721Enumerable-tokenByIndex}.\n */\n function tokenByIndex(uint256 index) public view virtual override returns (uint256) {\n require(index < ERC721Enumerable.totalSupply(), \"ERC721Enumerable: global index out of bounds\");\n return _allTokens[index];\n }\n\n /**\n * @dev Hook that is called before any token transfer. This includes minting\n * and burning.\n *\n * Calling conditions:\n *\n * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be\n * transferred to `to`.\n * - When `from` is zero, `tokenId` will be minted for `to`.\n * - When `to` is zero, ``from``'s `tokenId` will be burned.\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256 tokenId\n ) internal virtual override {\n super._beforeTokenTransfer(from, to, tokenId);\n\n if (from == address(0)) {\n _addTokenToAllTokensEnumeration(tokenId);\n } else if (from != to) {\n _removeTokenFromOwnerEnumeration(from, tokenId);\n }\n if (to == address(0)) {\n _removeTokenFromAllTokensEnumeration(tokenId);\n } else if (to != from) {\n _addTokenToOwnerEnumeration(to, tokenId);\n }\n }\n\n /**\n * @dev Private function to add a token to this extension's ownership-tracking data structures.\n * @param to address representing the new owner of the given token ID\n * @param tokenId uint256 ID of the token to be added to the tokens list of the given address\n */\n function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {\n uint256 length = ERC721.balanceOf(to);\n _ownedTokens[to][length] = tokenId;\n _ownedTokensIndex[tokenId] = length;\n }\n\n /**\n * @dev Private function to add a token to this extension's token tracking data structures.\n * @param tokenId uint256 ID of the token to be added to the tokens list\n */\n function _addTokenToAllTokensEnumeration(uint256 tokenId) private {\n _allTokensIndex[tokenId] = _allTokens.length;\n _allTokens.push(tokenId);\n }\n\n /**\n * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that\n * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for\n * gas optimizations e.g. when performing a transfer operation (avoiding double writes).\n * This has O(1) time complexity, but alters the order of the _ownedTokens array.\n * @param from address representing the previous owner of the given token ID\n * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address\n */\n function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private {\n // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and\n // then delete the last slot (swap and pop).\n\n uint256 lastTokenIndex = ERC721.balanceOf(from) - 1;\n uint256 tokenIndex = _ownedTokensIndex[tokenId];\n\n // When the token to delete is the last token, the swap operation is unnecessary\n if (tokenIndex != lastTokenIndex) {\n uint256 lastTokenId = _ownedTokens[from][lastTokenIndex];\n\n _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token\n _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index\n }\n\n // This also deletes the contents at the last position of the array\n delete _ownedTokensIndex[tokenId];\n delete _ownedTokens[from][lastTokenIndex];\n }\n\n /**\n * @dev Private function to remove a token from this extension's token tracking data structures.\n * This has O(1) time complexity, but alters the order of the _allTokens array.\n * @param tokenId uint256 ID of the token to be removed from the tokens list\n */\n function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private {\n // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and\n // then delete the last slot (swap and pop).\n\n uint256 lastTokenIndex = _allTokens.length - 1;\n uint256 tokenIndex = _allTokensIndex[tokenId];\n\n // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so\n // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding\n // an 'if' statement (like in _removeTokenFromOwnerEnumeration)\n uint256 lastTokenId = _allTokens[lastTokenIndex];\n\n _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token\n _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index\n\n // This also deletes the contents at the last position of the array\n delete _allTokensIndex[tokenId];\n _allTokens.pop();\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../IERC721.sol\";\n\n/**\n * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension\n * @dev See https://eips.ethereum.org/EIPS/eip-721\n */\ninterface IERC721Enumerable is IERC721 {\n /**\n * @dev Returns the total amount of tokens stored by the contract.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns a token ID owned by `owner` at a given `index` of its token list.\n * Use along with {balanceOf} to enumerate all of ``owner``'s tokens.\n */\n function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId);\n\n /**\n * @dev Returns a token ID at a given `index` of all the tokens stored by the contract.\n * Use along with {totalSupply} to enumerate all tokens.\n */\n function tokenByIndex(uint256 index) external view returns (uint256);\n}\n" + }, + "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../IERC721.sol\";\n\n/**\n * @title ERC-721 Non-Fungible Token Standard, optional metadata extension\n * @dev See https://eips.ethereum.org/EIPS/eip-721\n */\ninterface IERC721Metadata is IERC721 {\n /**\n * @dev Returns the token collection name.\n */\n function name() external view returns (string memory);\n\n /**\n * @dev Returns the token collection symbol.\n */\n function symbol() external view returns (string memory);\n\n /**\n * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.\n */\n function tokenURI(uint256 tokenId) external view returns (string memory);\n}\n" + }, + "@openzeppelin/contracts/token/ERC721/IERC721.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../../utils/introspection/IERC165.sol\";\n\n/**\n * @dev Required interface of an ERC721 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`, checking first that contract recipients\n * are aware of the ERC721 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 be have been allowed 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 a safe transfer.\n *\n * Emits a {Transfer} event.\n */\n function safeTransferFrom(\n address from,\n address to,\n uint256 tokenId\n ) external;\n\n /**\n * @dev Transfers `tokenId` token from `from` to `to`.\n *\n * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.\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(\n address from,\n address to,\n uint256 tokenId\n ) 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 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 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 caller.\n *\n * Emits an {ApprovalForAll} event.\n */\n function setApprovalForAll(address operator, bool _approved) external;\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 /**\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 a safe transfer.\n *\n * Emits a {Transfer} event.\n */\n function safeTransferFrom(\n address from,\n address to,\n uint256 tokenId,\n bytes calldata data\n ) external;\n}\n" + }, + "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @title ERC721 token receiver interface\n * @dev Interface for any contract that wants to support safeTransfers\n * from ERC721 asset contracts.\n */\ninterface IERC721Receiver {\n /**\n * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}\n * by `operator` from `from`, this function is called.\n *\n * It must return its Solidity selector to confirm the token transfer.\n * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.\n *\n * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`.\n */\n function onERC721Received(\n address operator,\n address from,\n uint256 tokenId,\n bytes calldata data\n ) external returns (bytes4);\n}\n" + }, + "@openzeppelin/contracts/utils/Address.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize, which returns 0 for contracts in\n // construction, since the code is only stored at the end of the\n // constructor execution.\n\n uint256 size;\n assembly {\n size := extcodesize(account)\n }\n return size > 0;\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n (bool success, ) = recipient.call{value: amount}(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain `call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCall(target, data, \"Address: low-level call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(address(this).balance >= value, \"Address: insufficient balance for call\");\n require(isContract(target), \"Address: call to non-contract\");\n\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n return functionStaticCall(target, data, \"Address: low-level static call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n require(isContract(target), \"Address: static call to non-contract\");\n\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionDelegateCall(target, data, \"Address: low-level delegate call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(isContract(target), \"Address: delegate call to non-contract\");\n\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason using the provided one.\n *\n * _Available since v4.3._\n */\n function verifyCallResult(\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal pure returns (bytes memory) {\n if (success) {\n return returndata;\n } else {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Context.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\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" + }, + "@openzeppelin/contracts/utils/introspection/ERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./IERC165.sol\";\n\n/**\n * @dev Implementation of the {IERC165} interface.\n *\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\n * for the additional interface id that will be supported. For example:\n *\n * ```solidity\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\n * }\n * ```\n *\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\n */\nabstract contract ERC165 is IERC165 {\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n return interfaceId == type(IERC165).interfaceId;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/introspection/IERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface 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[EIP section]\n * to learn more about how these ids are created.\n *\n * This function call must use less than 30 000 gas.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n" + }, + "@openzeppelin/contracts/utils/Strings.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n bytes16 private constant _HEX_SYMBOLS = \"0123456789abcdef\";\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\n */\n function toString(uint256 value) internal pure returns (string memory) {\n // Inspired by OraclizeAPI's implementation - MIT licence\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\n\n if (value == 0) {\n return \"0\";\n }\n uint256 temp = value;\n uint256 digits;\n while (temp != 0) {\n digits++;\n temp /= 10;\n }\n bytes memory buffer = new bytes(digits);\n while (value != 0) {\n digits -= 1;\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\n value /= 10;\n }\n return string(buffer);\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\n */\n function toHexString(uint256 value) internal pure returns (string memory) {\n if (value == 0) {\n return \"0x00\";\n }\n uint256 temp = value;\n uint256 length = 0;\n while (temp != 0) {\n length++;\n temp >>= 8;\n }\n return toHexString(value, length);\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\n */\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\n bytes memory buffer = new bytes(2 * length + 2);\n buffer[0] = \"0\";\n buffer[1] = \"x\";\n for (uint256 i = 2 * length + 1; i > 1; --i) {\n buffer[i] = _HEX_SYMBOLS[value & 0xf];\n value >>= 4;\n }\n require(value == 0, \"Strings: hex length insufficient\");\n return string(buffer);\n }\n}\n" + }, + "contracts/CirculatingSupply/CirculatingSupplyBase.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity ^0.8.6;\n\nimport \"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\";\nimport \"@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol\";\nimport \"./utils/ExclusionList.sol\";\n\nabstract contract CirculatingSupplyBase is OwnableUpgradeable, ExclusionList {\n event TokenSet(address indexed newToken);\n\n address public token;\n\n function setUp(bytes memory initializeParams) public {\n (address _owner, address _token, address[] memory _exclusions) = abi\n .decode(initializeParams, (address, address, address[]));\n __Ownable_init();\n transferOwnership(_owner);\n setupExclusions();\n token = _token;\n for (uint256 i = 0; i < _exclusions.length; i++) {\n _excludeAddress(_exclusions[i]);\n }\n }\n\n /// @dev Sets the token to calculate circulating supply of\n /// @param _token token to calculate circulating supply of\n /// @notice This can only be called by the owner\n function setToken(address _token) public onlyOwner {\n token = _token;\n emit TokenSet(_token);\n }\n\n /// @dev Removes an excluded address\n /// @param prevExclusion Exclusion that pointed to the exclusion to be removed in the linked list\n /// @param exclusion Exclusion to be removed\n /// @notice This can only be called by the owner\n function removeExclusion(address prevExclusion, address exclusion)\n public\n onlyOwner\n {\n _removeExclusion(prevExclusion, exclusion);\n }\n\n /// @dev Enables the balance of an address from the circulatingSupply calculation\n /// @param exclusion Address to be excluded\n /// @notice This can only be called by the owner\n function exclude(address exclusion) public onlyOwner {\n _excludeAddress(exclusion);\n }\n\n function get() public view virtual returns (uint256 circulatingSupply);\n}\n" + }, + "contracts/CirculatingSupply/CirculatingSupplyERC721.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity ^0.8.6;\n\nimport \"@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol\";\nimport \"./CirculatingSupplyBase.sol\";\n\ncontract CirculatingSupplyERC721 is CirculatingSupplyBase {\n constructor(\n address _owner,\n address _token,\n address[] memory _exclusions\n ) {\n bytes memory initParams = abi.encode(_owner, _token, _exclusions);\n setUp(initParams);\n }\n\n function get() public view override returns (uint256 circulatingSupply) {\n circulatingSupply = ERC721Enumerable(token).totalSupply();\n if (exclusions[SENTINEL_EXCLUSIONS] != SENTINEL_EXCLUSIONS) {\n address exclusion = exclusions[SENTINEL_EXCLUSIONS];\n while (exclusion != SENTINEL_EXCLUSIONS) {\n circulatingSupply -= ERC721(token).balanceOf(exclusion);\n exclusion = exclusions[exclusion];\n }\n }\n return circulatingSupply;\n }\n}\n" + }, + "contracts/CirculatingSupply/utils/ExclusionList.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity ^0.8.6;\n\ncontract ExclusionList {\n event ExclusionAdded(address indexed excludedAddress);\n event ExclusionRemoved(address indexed RemovedAddress);\n\n address internal constant SENTINEL_EXCLUSIONS = address(0x1);\n\n // Mapping of excluded addresses\n mapping(address => address) internal exclusions;\n\n function setupExclusions() internal {\n require(\n exclusions[SENTINEL_EXCLUSIONS] == address(0),\n \"setUpModules has already been called\"\n );\n exclusions[SENTINEL_EXCLUSIONS] = SENTINEL_EXCLUSIONS;\n }\n\n /// @dev Removes an excluded address\n /// @param prevExclusion Exclusion that pointed to the exclusion to be removed in the linked list\n /// @param exclusion Exclusion to be removed\n /// @notice This can only be called by the owner\n function _removeExclusion(address prevExclusion, address exclusion)\n internal\n {\n require(\n exclusion != address(0) && exclusion != SENTINEL_EXCLUSIONS,\n \"Invalid exclusion\"\n );\n require(\n exclusions[prevExclusion] == exclusion,\n \"Exclusion already disabled\"\n );\n exclusions[prevExclusion] = exclusions[exclusion];\n exclusions[exclusion] = address(0);\n emit ExclusionRemoved(exclusion);\n }\n\n function _excludeAddress(address exclusion) internal {\n require(\n exclusion != address(0) && exclusion != SENTINEL_EXCLUSIONS,\n \"Invalid exclusion\"\n );\n require(\n exclusions[exclusion] == address(0),\n \"Exclusion already enabled\"\n );\n exclusions[exclusion] = exclusions[SENTINEL_EXCLUSIONS];\n exclusions[SENTINEL_EXCLUSIONS] = exclusion;\n emit ExclusionAdded(exclusion);\n }\n\n /// @dev Returns if an exclusion is enabled\n /// @return True if the exclusion is enabled\n function isExcluded(address _exclusion) public view returns (bool) {\n return\n SENTINEL_EXCLUSIONS != _exclusion &&\n exclusions[_exclusion] != address(0);\n }\n\n /// @dev Returns array of exclusions.\n /// @param start Start of the page.\n /// @param pageSize Maximum number of exclusions that should be returned.\n /// @return array Array of exclusions.\n /// @return next Start of the next page.\n function getExclusionsPaginated(address start, uint256 pageSize)\n public\n view\n returns (address[] memory array, address next)\n {\n // Init array with max page size\n array = new address[](pageSize);\n\n // Populate return array\n uint256 exclusionCount = 0;\n address currentExclusion = exclusions[start];\n while (\n currentExclusion != address(0x0) &&\n currentExclusion != SENTINEL_EXCLUSIONS &&\n exclusionCount < pageSize\n ) {\n array[exclusionCount] = currentExclusion;\n currentExclusion = exclusions[currentExclusion];\n exclusionCount++;\n }\n next = currentExclusion;\n // Set correct size of returned array\n // solhint-disable-next-line no-inline-assembly\n assembly {\n mstore(array, exclusionCount)\n }\n }\n}\n" + }, + "contracts/ExitModule/ExitBase.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\nimport \"@gnosis.pm/zodiac/contracts/core/Module.sol\";\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport \"@openzeppelin/contracts/utils/introspection/IERC165.sol\";\nimport \"./IExitBase.sol\";\n\nabstract contract ExitBase is Module, IExitBase, IERC165 {\n // @notice Mapping of denied tokens defined by the avatar\n mapping(address => bool) public deniedTokens;\n\n function getExitAmount(uint256 supply, bytes memory params)\n internal\n view\n virtual\n returns (uint256);\n\n // @dev Execute the share of assets and the transfer of designated tokens\n // @param tokens Array of tokens to claim, ordered lowest to highest\n // @param params used to calculate the exit amount per token\n // @notice Will revert if tokens[] is not ordered highest to lowest, contains duplicates, or includes denied tokens\n function _exit(address[] memory tokens, bytes memory params) internal {\n if (avatar.balance > 0) {\n transferNativeAsset(\n msg.sender,\n getExitAmount(avatar.balance, params)\n );\n }\n\n address previousToken;\n uint256 avatarTokenBalance;\n for (uint8 i = 0; i < tokens.length; i++) {\n require(!deniedTokens[tokens[i]], \"Denied token\");\n require(\n tokens[i] > previousToken,\n \"tokens[] is out of order or contains a duplicate\"\n );\n avatarTokenBalance = ERC20(tokens[i]).balanceOf(avatar);\n transferToken(\n tokens[i],\n msg.sender,\n getExitAmount(avatarTokenBalance, params)\n );\n previousToken = tokens[i];\n }\n\n emit ExitSuccessful(msg.sender);\n }\n\n // @dev Execute a token transfer through the avatar\n // @param token address of token to transfer\n // @param to address that will receive the transfer\n // @param amount to transfer\n function transferToken(\n address token,\n address to,\n uint256 amount\n ) private {\n // 0xa9059cbb - bytes4(keccak256(\"transfer(address,uint256)\"))\n bytes memory data = abi.encodeWithSelector(0xa9059cbb, to, amount);\n require(\n exec(token, 0, data, Enum.Operation.Call),\n \"Error on token transfer\"\n );\n }\n\n // @dev Execute a token transfer through the avatar\n // @param to address that will receive the transfer\n // @param amount to transfer\n function transferNativeAsset(address to, uint256 amount) private {\n require(\n exec(to, amount, bytes(\"0x\"), Enum.Operation.Call),\n \"Error on native asset transfer\"\n );\n }\n\n // @dev Add a batch of token addresses to denied tokens list\n // @param tokens Batch of addresses to add into the denied token list\n // @notice Can not add duplicate token address or it will throw\n // @notice Can only be modified by owner\n function addToDenyList(address[] calldata tokens) external onlyOwner {\n for (uint8 i; i < tokens.length; i++) {\n require(!deniedTokens[tokens[i]], \"Token already denied\");\n deniedTokens[tokens[i]] = true;\n }\n }\n\n // @dev Remove a batch of token addresses from denied tokens list\n // @param tokens Batch of addresses to be removed from the denied token list\n // @notice If a non-denied token address is passed, the function will throw\n // @notice Can only be modified by owner\n function removeFromDenyList(address[] calldata tokens) external onlyOwner {\n for (uint8 i; i < tokens.length; i++) {\n require(deniedTokens[tokens[i]], \"Token not denied\");\n deniedTokens[tokens[i]] = false;\n }\n }\n\n function supportsInterface(bytes4 interfaceID)\n external\n pure\n override\n returns (bool)\n {\n return interfaceID == 0x01ffc9a7 || interfaceID == 0xaf20af8a;\n }\n}\n" + }, + "contracts/ExitModule/ExitERC721Module.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity ^0.8.6;\n\nimport \"@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol\";\nimport \"@openzeppelin/contracts/security/ReentrancyGuard.sol\";\n\nimport \"./ExitBase.sol\";\nimport \"../CirculatingSupply/CirculatingSupplyERC721.sol\";\n\ncontract ExitERC721 is ExitBase, ReentrancyGuard {\n ERC721Enumerable public collection;\n CirculatingSupplyERC721 public circulatingSupply;\n\n // @dev Initialize function, will be triggered when a new proxy is deployed\n // @param _owner Address of the owner\n // @param _avatar Address of the avatar (e.g. a Safe or Delay Module)\n // @param _target Address that this module will pass transactions to\n // @param _designatedToken Address of the ERC721 token\n // @notice Designated token address can not be zero\n constructor(\n address _owner,\n address _avatar,\n address _target,\n address _collection,\n address _circulatingSupply\n ) {\n bytes memory initParams = abi.encode(\n _owner,\n _avatar,\n _target,\n _collection,\n _circulatingSupply\n );\n setUp(initParams);\n }\n\n function setUp(bytes memory initParams) public override {\n (\n address _owner,\n address _avatar,\n address _target,\n address _collection,\n address _circulatingSupply\n ) = abi.decode(\n initParams,\n (address, address, address, address, address)\n );\n __Ownable_init();\n require(_avatar != address(0), \"Avatar can not be zero address\");\n require(_target != address(0), \"Target can not be zero address\");\n avatar = _avatar;\n target = _target;\n collection = ERC721Enumerable(_collection);\n circulatingSupply = CirculatingSupplyERC721(_circulatingSupply);\n\n transferOwnership(_owner);\n\n emit ExitModuleSetup(msg.sender, _avatar);\n }\n\n // @dev Execute the share of assets and the transfer of designated tokens\n // @param tokenId of token to be used to exit\n // @param tokens Array of tokens to claim, ordered lowest to highest\n // @notice Will revert if tokens[] is not ordered highest to lowest, contains duplicates, or includes denied tokens\n function exit(uint256 tokenId, address[] calldata tokens)\n external\n override\n nonReentrant\n {\n require(\n collection.ownerOf(tokenId) == msg.sender,\n \"Only token owner can exit\"\n );\n\n bytes memory params = abi.encode(circulatingSupply.get());\n\n // Transfer asset to avatar (safe)\n collection.transferFrom(msg.sender, avatar, tokenId);\n\n _exit(tokens, params);\n }\n\n // @dev Change the designated token address variable\n // @param _token Address of new designated token\n // @notice Can only be modified by owner\n function setCollection(address _collection) public onlyOwner {\n collection = ERC721Enumerable(_collection);\n }\n\n function getExitAmount(uint256 supply, bytes memory params)\n internal\n pure\n override\n returns (uint256)\n {\n uint256 _circulatingSupply = abi.decode(params, (uint256));\n return supply / _circulatingSupply;\n }\n\n // @dev Change the circulating supply variable\n // @param _circulatingSupply Address of new circulating supply contract\n // @notice Can only be modified by owner\n function setCirculatingSupply(address _circulatingSupply) public onlyOwner {\n circulatingSupply = CirculatingSupplyERC721(_circulatingSupply);\n }\n\n function getCirculatingSupply() public view returns (uint256) {\n return circulatingSupply.get();\n }\n}\n" + }, + "contracts/ExitModule/IExitBase.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\ninterface IExitBase {\n event ExitModuleSetup(address indexed initiator, address indexed avatar);\n event ExitSuccessful(address indexed leaver);\n\n function exit(uint256 amountToRedeem, address[] calldata tokens) external;\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": false, + "runs": 200 + }, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "storageLayout", + "evm.gasEstimates" + ], + "": [ + "ast" + ] + } + }, + "metadata": { + "useLiteralContent": true + } + } + } + } + } +} \ No newline at end of file