Cryo Explorer Ethereum Mainnet

Address Contract Verified

Address 0xabA2B07783951D4c8e282212F3490fEd3B06D25d
Balance 0 ETH
Nonce 1
Code Size 21550 bytes
Indexed Transactions 0
External Etherscan · Sourcify

Contract Bytecode

21550 bytes
0x6080604052600436106102515760003560e01c806373aa9e9411610139578063a8284c30116100b6578063d03c390c1161007a578063d03c390c146108da578063d4a10fe414610903578063d76a386a14610940578063e57de1fd14610969578063edd64adf146109a6578063f2fde38b146109d657610251565b8063a8284c30146107ca578063aee9dfd8146107fa578063b7b04fae14610837578063c8d7c04114610860578063cbdcc7241461089d57610251565b80639e29dd36116100fd5780639e29dd36146106f6578063a11ec70a14610712578063a3b2cca61461073b578063a47d29cb14610764578063a6fadad9146107a157610251565b806373aa9e941461061157806382a41c121461063a5780638da5cb5b1461066557806396ffc66c1461069057806397dc86cf146106cd57610251565b806328317801116101d25780633e30918c116101965780633e30918c146105265780633e48e8481461054f57806340c10f1914610578578063418cdce7146105a85780635d97d515146105d1578063715018a6146105fa57610251565b8063283178011461043c5780632ecf45041461047957806337859963146104b65780633ccfd60b146104df5780633e276fd5146104f657610251565b80631cadd032116102195780631cadd0321461033e5780631fbdd72d1461037b578063200e8188146103a657806320895a79146103d657806325b75d681461041357610251565b806301ea479414610256578063081565d41461027f5780630e0530c6146102a85780630ea066e8146102d15780630ff9e2f314610301575b600080fd5b34801561026257600080fd5b5061027d60048036038101906102789190613bc4565b6109ff565b005b34801561028b57600080fd5b506102a660048036038101906102a19190613c20565b610b35565b005b3480156102b457600080fd5b506102cf60048036038101906102ca9190613c20565b610c27565b005b6102eb60048036038101906102e69190613cab565b610d19565b6040516102f89190613d0d565b60405180910390f35b34801561030d57600080fd5b5061032860048036038101906103239190613c20565b61109f565b6040516103359190613d43565b60405180910390f35b34801561034a57600080fd5b5061036560048036038101906103609190613c20565b6110bf565b6040516103729190613d43565b60405180910390f35b34801561038757600080fd5b506103906110df565b60405161039d9190613dbd565b60405180910390f35b6103c060048036038101906103bb9190613dd8565b611105565b6040516103cd9190613d0d565b60405180910390f35b3480156103e257600080fd5b506103fd60048036038101906103f89190613e65565b611a30565b60405161040a9190613d43565b60405180910390f35b34801561041f57600080fd5b5061043a60048036038101906104359190613bc4565b611a5f565b005b34801561044857600080fd5b50610463600480360381019061045e9190613c20565b611b95565b6040516104709190613d43565b60405180910390f35b34801561048557600080fd5b506104a0600480360381019061049b9190613ea5565b611bb5565b6040516104ad9190613d43565b60405180910390f35b3480156104c257600080fd5b506104dd60048036038101906104d89190613bc4565b611be4565b005b3480156104eb57600080fd5b506104f4611d1a565b005b610510600480360381019061050b9190613ee5565b611de5565b60405161051d9190613d0d565b60405180910390f35b34801561053257600080fd5b5061054d60048036038101906105489190613ea5565b611f33565b005b34801561055b57600080fd5b5061057660048036038101906105719190613bc4565b611ff2565b005b610592600480360381019061058d9190613ee5565b612128565b60405161059f9190613d0d565b60405180910390f35b3480156105b457600080fd5b506105cf60048036038101906105ca9190613f5b565b612429565b005b3480156105dd57600080fd5b506105f860048036038101906105f39190613c20565b612525565b005b34801561060657600080fd5b5061060f612617565b005b34801561061d57600080fd5b5061063860048036038101906106339190613f9b565b61269f565b005b34801561064657600080fd5b5061064f61275f565b60405161065c9190613fe9565b60405180910390f35b34801561067157600080fd5b5061067a612785565b6040516106879190614013565b60405180910390f35b34801561069c57600080fd5b506106b760048036038101906106b29190613c20565b6127ae565b6040516106c4919061403d565b60405180910390f35b3480156106d957600080fd5b506106f460048036038101906106ef9190613ea5565b6127c6565b005b610710600480360381019061070b9190613cab565b6128fc565b005b34801561071e57600080fd5b5061073960048036038101906107349190613c20565b612aad565b005b34801561074757600080fd5b50610762600480360381019061075d9190613bc4565b612be0565b005b34801561077057600080fd5b5061078b60048036038101906107869190613c20565b612d16565b6040516107989190614013565b60405180910390f35b3480156107ad57600080fd5b506107c860048036038101906107c39190613c20565b612d49565b005b6107e460048036038101906107df9190613ee5565b612e3b565b6040516107f19190613d0d565b60405180910390f35b34801561080657600080fd5b50610821600480360381019061081c9190613ea5565b61307a565b60405161082e9190613d43565b60405180910390f35b34801561084357600080fd5b5061085e60048036038101906108599190613bc4565b6130a9565b005b34801561086c57600080fd5b5061088760048036038101906108829190613c20565b6131df565b6040516108949190613d0d565b60405180910390f35b3480156108a957600080fd5b506108c460048036038101906108bf9190613c20565b6131f7565b6040516108d19190613d43565b60405180910390f35b3480156108e657600080fd5b5061090160048036038101906108fc9190613c20565b613217565b005b34801561090f57600080fd5b5061092a60048036038101906109259190613e65565b613309565b6040516109379190613d43565b60405180910390f35b34801561094c57600080fd5b5061096760048036038101906109629190613e65565b613338565b005b34801561097557600080fd5b50610990600480360381019061098b9190613c20565b613469565b60405161099d9190613d43565b60405180910390f35b6109c060048036038101906109bb91906140b8565b613489565b6040516109cd9190613d0d565b60405180910390f35b3480156109e257600080fd5b506109fd60048036038101906109f89190613f9b565b6137bb565b005b816008600082815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610aa1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a9890614189565b60405180910390fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166301ea479484846040518363ffffffff1660e01b8152600401610afe929190614217565b600060405180830381600087803b158015610b1857600080fd5b505af1158015610b2c573d6000803e3d6000fd5b50505050505050565b806008600082815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610bd7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bce90614189565b60405180910390fd5b600d600083815260200190815260200160002060009054906101000a900460ff1615600d600084815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b806008600082815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610cc9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cc090614189565b60405180910390fd5b600e600083815260200190815260200160002060009054906101000a900460ff1615600e600084815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b6000600260015403610d60576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d5790614293565b60405180910390fd5b60026001819055506000600f600085815260200190815260200160002054905060008111610dc3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dba90614325565b60405180910390fd5b6000620f42408085610dd59190614374565b85610de091906143d4565b610dea9190614408565b9050818114610e2e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e25906144ab565b60405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e866040518263ffffffff1660e01b8152600401610ea09190613d0d565b602060405180830381865afa158015610ebd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ee191906144e0565b73ffffffffffffffffffffffffffffffffffffffff1614610f37576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f2e9061457f565b60405180910390fd5b6000151560066000878152602001908152602001600020600086815260200190815260200160002060009054906101000a900460ff16151514610faf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fa6906145eb565b60405180910390fd5b600160066000878152602001908152602001600020600086815260200190815260200160002060006101000a81548160ff021916908315150217905550600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166340c10f193488886040518463ffffffff1660e01b815260040161104a92919061460b565b60206040518083038185885af1158015611068573d6000803e3d6000fd5b50505050506040513d601f19601f8201168201806040525081019061108d9190614649565b92505050600180819055509392505050565b600e6020528060005260406000206000915054906101000a900460ff1681565b600b6020528060005260406000206000915054906101000a900460ff1681565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060026001540361114c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161114390614293565b60405180910390fd5b60026001819055506000339050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161461129a576000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166390c9a2d03386600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518463ffffffff1660e01b815260040161121093929190614676565b6020604051808303816000875af115801561122f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061125391906146d9565b905080611295576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161128c90614752565b60405180910390fd5b839150505b600c600088815260200190815260200160002060009054906101000a900460ff166112fa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112f1906147e4565b60405180910390fd5b6000620f4240808861130c9190614374565b8861131791906143d4565b6113219190614408565b905060018114611366576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161135d90614876565b60405180910390fd5b60001515600660008a8152602001908152602001600020600089815260200190815260200160002060009054906101000a900460ff161515146113de576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113d590614908565b60405180910390fd5b6000620f424080886113f09190614374565b886113fb91906143d4565b6114059190614408565b90506002811461144a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114419061499a565b60405180910390fd5b60001515600660008b8152602001908152602001600020600089815260200190815260200160002060009054906101000a900460ff161515146114c2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114b990614a2c565b60405180910390fd5b6000620f424080886114d49190614374565b886114df91906143d4565b6114e99190614408565b90506003811461152e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161152590614abe565b60405180910390fd5b60001515600660008c8152602001908152602001600020600089815260200190815260200160002060009054906101000a900460ff161515146115a6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161159d90614b50565b60405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e8b6040518263ffffffff1660e01b81526004016116189190613d0d565b602060405180830381865afa158015611635573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061165991906144e0565b73ffffffffffffffffffffffffffffffffffffffff16146116af576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116a690614be2565b60405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e8a6040518263ffffffff1660e01b81526004016117219190613d0d565b602060405180830381865afa15801561173e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061176291906144e0565b73ffffffffffffffffffffffffffffffffffffffff16146117b8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117af90614c74565b60405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e896040518263ffffffff1660e01b815260040161182a9190613d0d565b602060405180830381865afa158015611847573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061186b91906144e0565b73ffffffffffffffffffffffffffffffffffffffff16146118c1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118b890614d06565b60405180910390fd5b6001600660008c815260200190815260200160002060008b815260200190815260200160002060006101000a81548160ff0219169083151502179055506001600660008c815260200190815260200160002060008a815260200190815260200160002060006101000a81548160ff0219169083151502179055506001600660008c8152602001908152602001600020600089815260200190815260200160002060006101000a81548160ff021916908315150217905550600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166340c10f19348d8d6040518463ffffffff1660e01b81526004016119d692919061460b565b60206040518083038185885af11580156119f4573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190611a199190614649565b945050505050600180819055509695505050505050565b60046020528160005260406000206020528060005260406000206000915091509054906101000a900460ff1681565b816008600082815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611b01576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611af890614189565b60405180910390fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166325b75d6884846040518363ffffffff1660e01b8152600401611b5e929190614217565b600060405180830381600087803b158015611b7857600080fd5b505af1158015611b8c573d6000803e3d6000fd5b50505050505050565b600c6020528060005260406000206000915054906101000a900460ff1681565b60066020528160005260406000206020528060005260406000206000915091509054906101000a900460ff1681565b816008600082815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611c86576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c7d90614189565b60405180910390fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633785996384846040518363ffffffff1660e01b8152600401611ce3929190614217565b600060405180830381600087803b158015611cfd57600080fd5b505af1158015611d11573d6000803e3d6000fd5b50505050505050565b611d226138b2565b73ffffffffffffffffffffffffffffffffffffffff16611d40612785565b73ffffffffffffffffffffffffffffffffffffffff1614611d96576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d8d90614d72565b60405180910390fd5b60004790503373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015611de1573d6000803e3d6000fd5b5050565b6000816008600082815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611e89576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e8090614189565b60405180910390fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166340c10f193486866040518463ffffffff1660e01b8152600401611ee792919061460b565b60206040518083038185885af1158015611f05573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190611f2a9190614649565b91505092915050565b816008600082815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611fd5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611fcc90614189565b60405180910390fd5b81600f600085815260200190815260200160002081905550505050565b816008600082815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614612094576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161208b90614189565b60405180910390fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633e48e84884846040518363ffffffff1660e01b81526004016120f1929190614217565b600060405180830381600087803b15801561210b57600080fd5b505af115801561211f573d6000803e3d6000fd5b50505050505050565b600060026001540361216f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161216690614293565b60405180910390fd5b60026001819055503373ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff16146121e5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121dc90614e04565b60405180910390fd5b600a600083815260200190815260200160002060009054906101000a900460ff16612245576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161223c90614e70565b60405180910390fd5b600e600083815260200190815260200160002060009054906101000a900460ff161561237957600015156004600084815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615151461230f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161230690614edc565b60405180910390fd5b60016004600084815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166340c10f193485856040518463ffffffff1660e01b81526004016123d792919061460b565b60206040518083038185885af11580156123f5573d6000803e3d6000fd5b50505050506040513d601f19601f8201168201806040525081019061241a9190614649565b90506001808190555092915050565b816008600082815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806124c9575061249a612785565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b612508576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124ff90614f48565b60405180910390fd5b816009600085815260200190815260200160002081905550505050565b806008600082815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146125c7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125be90614189565b60405180910390fd5b600b600083815260200190815260200160002060009054906101000a900460ff1615600b600084815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b61261f6138b2565b73ffffffffffffffffffffffffffffffffffffffff1661263d612785565b73ffffffffffffffffffffffffffffffffffffffff1614612693576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161268a90614d72565b60405180910390fd5b61269d60006138ba565b565b6126a76138b2565b73ffffffffffffffffffffffffffffffffffffffff166126c5612785565b73ffffffffffffffffffffffffffffffffffffffff161461271b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161271290614d72565b60405180910390fd5b80600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60096020528060005260406000206000915090505481565b816008600082815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614612868576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161285f90614189565b60405180910390fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166397dc86cf84846040518363ffffffff1660e01b81526004016128c5929190614f68565b600060405180830381600087803b1580156128df57600080fd5b505af11580156128f3573d6000803e3d6000fd5b50505050505050565b816008600082815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061299c575061296d612785565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b6129db576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016129d290614f48565b60405180910390fd5b60005b82811015612aa657600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166340c10f198434612a309190614408565b87876040518463ffffffff1660e01b8152600401612a4f92919061460b565b60206040518083038185885af1158015612a6d573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190612a929190614649565b508080612a9e90614f91565b9150506129de565b5050505050565b806008600082815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614612b4f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612b4690614189565b60405180910390fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a11ec70a836040518263ffffffff1660e01b8152600401612baa9190613d0d565b600060405180830381600087803b158015612bc457600080fd5b505af1158015612bd8573d6000803e3d6000fd5b505050505050565b816008600082815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614612c82576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612c7990614189565b60405180910390fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a3b2cca684846040518363ffffffff1660e01b8152600401612cdf929190614217565b600060405180830381600087803b158015612cf957600080fd5b505af1158015612d0d573d6000803e3d6000fd5b50505050505050565b60086020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b806008600082815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614612deb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612de290614189565b60405180910390fd5b600c600083815260200190815260200160002060009054906101000a900460ff1615600c600084815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b6000600260015403612e82576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612e7990614293565b60405180910390fd5b6002600181905550816000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401612ee89190614013565b602060405180830381865afa158015612f05573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f299190614649565b11612f69576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612f6090615025565b60405180910390fd5b600b600084815260200190815260200160002060009054906101000a900460ff16612fc9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612fc0906150b7565b60405180910390fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166340c10f193486866040518463ffffffff1660e01b815260040161302792919061460b565b60206040518083038185885af1158015613045573d6000803e3d6000fd5b50505050506040513d601f19601f8201168201806040525081019061306a9190614649565b9150506001808190555092915050565b60076020528160005260406000206020528060005260406000206000915091509054906101000a900460ff1681565b816008600082815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461314b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161314290614189565b60405180910390fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b7b04fae84846040518363ffffffff1660e01b81526004016131a8929190614217565b600060405180830381600087803b1580156131c257600080fd5b505af11580156131d6573d6000803e3d6000fd5b50505050505050565b600f6020528060005260406000206000915090505481565b600a6020528060005260406000206000915054906101000a900460ff1681565b806008600082815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146132b9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016132b090614189565b60405180910390fd5b600a600083815260200190815260200160002060009054906101000a900460ff1615600a600084815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b60056020528160005260406000206020528060005260406000206000915091509054906101000a900460ff1681565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633af32abf336040518263ffffffff1660e01b81526004016133939190614013565b602060405180830381865afa1580156133b0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906133d491906146d9565b613413576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161340a90615123565b60405180910390fd5b806008600084815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050565b600d6020528060005260406000206000915054906101000a900460ff1681565b60006002600154036134d0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016134c790614293565b60405180910390fd5b6002600181905550600d600085815260200190815260200160002060009054906101000a900460ff16613538576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161352f9061518f565b60405180910390fd5b6005600085815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16156135d6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016135cd906151fb565b60405180910390fd5b6000336040516020016135e99190615263565b604051602081830303815290604052805190602001209050613660848480806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505060096000888152602001908152602001600020548361397e565b61369f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613696906152ca565b60405180910390fd5b60016005600087815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166340c10f193488886040518463ffffffff1660e01b815260040161376692919061460b565b60206040518083038185885af1158015613784573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906137a99190614649565b91505060018081905550949350505050565b6137c36138b2565b73ffffffffffffffffffffffffffffffffffffffff166137e1612785565b73ffffffffffffffffffffffffffffffffffffffff1614613837576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161382e90614d72565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036138a6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161389d9061535c565b60405180910390fd5b6138af816138ba565b50565b600033905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60008082905060005b8551811015613a265760008682815181106139a5576139a461537c565b5b602002602001015190508083116139e65782816040516020016139c99291906153cc565b604051602081830303815290604052805190602001209250613a12565b80836040516020016139f99291906153cc565b6040516020818303038152906040528051906020012092505b508080613a1e90614f91565b915050613987565b508381149150509392505050565b6000604051905090565b600080fd5b600080fd5b6000819050919050565b613a5b81613a48565b8114613a6657600080fd5b50565b600081359050613a7881613a52565b92915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b613ad182613a88565b810181811067ffffffffffffffff82111715613af057613aef613a99565b5b80604052505050565b6000613b03613a34565b9050613b0f8282613ac8565b919050565b600067ffffffffffffffff821115613b2f57613b2e613a99565b5b613b3882613a88565b9050602081019050919050565b82818337600083830152505050565b6000613b67613b6284613b14565b613af9565b905082815260208101848484011115613b8357613b82613a83565b5b613b8e848285613b45565b509392505050565b600082601f830112613bab57613baa613a7e565b5b8135613bbb848260208601613b54565b91505092915050565b60008060408385031215613bdb57613bda613a3e565b5b6000613be985828601613a69565b925050602083013567ffffffffffffffff811115613c0a57613c09613a43565b5b613c1685828601613b96565b9150509250929050565b600060208284031215613c3657613c35613a3e565b5b6000613c4484828501613a69565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000613c7882613c4d565b9050919050565b613c8881613c6d565b8114613c9357600080fd5b50565b600081359050613ca581613c7f565b92915050565b600080600060608486031215613cc457613cc3613a3e565b5b6000613cd286828701613c96565b9350506020613ce386828701613a69565b9250506040613cf486828701613a69565b9150509250925092565b613d0781613a48565b82525050565b6000602082019050613d226000830184613cfe565b92915050565b60008115159050919050565b613d3d81613d28565b82525050565b6000602082019050613d586000830184613d34565b92915050565b6000819050919050565b6000613d83613d7e613d7984613c4d565b613d5e565b613c4d565b9050919050565b6000613d9582613d68565b9050919050565b6000613da782613d8a565b9050919050565b613db781613d9c565b82525050565b6000602082019050613dd26000830184613dae565b92915050565b60008060008060008060c08789031215613df557613df4613a3e565b5b6000613e0389828a01613c96565b9650506020613e1489828a01613a69565b9550506040613e2589828a01613a69565b9450506060613e3689828a01613a69565b9350506080613e4789828a01613a69565b92505060a0613e5889828a01613c96565b9150509295509295509295565b60008060408385031215613e7c57613e7b613a3e565b5b6000613e8a85828601613a69565b9250506020613e9b85828601613c96565b9150509250929050565b60008060408385031215613ebc57613ebb613a3e565b5b6000613eca85828601613a69565b9250506020613edb85828601613a69565b9150509250929050565b60008060408385031215613efc57613efb613a3e565b5b6000613f0a85828601613c96565b9250506020613f1b85828601613a69565b9150509250929050565b6000819050919050565b613f3881613f25565b8114613f4357600080fd5b50565b600081359050613f5581613f2f565b92915050565b60008060408385031215613f7257613f71613a3e565b5b6000613f8085828601613a69565b9250506020613f9185828601613f46565b9150509250929050565b600060208284031215613fb157613fb0613a3e565b5b6000613fbf84828501613c96565b91505092915050565b6000613fd382613d8a565b9050919050565b613fe381613fc8565b82525050565b6000602082019050613ffe6000830184613fda565b92915050565b61400d81613c6d565b82525050565b60006020820190506140286000830184614004565b92915050565b61403781613f25565b82525050565b6000602082019050614052600083018461402e565b92915050565b600080fd5b600080fd5b60008083601f84011261407857614077613a7e565b5b8235905067ffffffffffffffff81111561409557614094614058565b5b6020830191508360208202830111156140b1576140b061405d565b5b9250929050565b600080600080606085870312156140d2576140d1613a3e565b5b60006140e087828801613c96565b94505060206140f187828801613a69565b935050604085013567ffffffffffffffff81111561411257614111613a43565b5b61411e87828801614062565b925092505092959194509250565b600082825260208201905092915050565b7f4f6e6c7920617274697374000000000000000000000000000000000000000000600082015250565b6000614173600b8361412c565b915061417e8261413d565b602082019050919050565b600060208201905081810360008301526141a281614166565b9050919050565b600081519050919050565b60005b838110156141d25780820151818401526020810190506141b7565b60008484015250505050565b60006141e9826141a9565b6141f3818561412c565b93506142038185602086016141b4565b61420c81613a88565b840191505092915050565b600060408201905061422c6000830185613cfe565b818103602083015261423e81846141de565b90509392505050565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00600082015250565b600061427d601f8361412c565b915061428882614247565b602082019050919050565b600060208201905081810360008301526142ac81614270565b9050919050565b7f50726f6a656374206d7573742062652061637469766520666f722070726f6a6560008201527f63742d686f6c646572207370656369666963206d696e74730000000000000000602082015250565b600061430f60388361412c565b915061431a826142b3565b604082019050919050565b6000602082019050818103600083015261433e81614302565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061437f82613a48565b915061438a83613a48565b92508261439a57614399614345565b5b828206905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006143df82613a48565b91506143ea83613a48565b9250828203905081811115614402576144016143a5565b5b92915050565b600061441382613a48565b915061441e83613a48565b92508261442e5761442d614345565b5b828204905092915050565b7f6d757374207061737320696e206120746f6b656e2069642066726f6d2074686560008201527f20636f72726563742070726f6a65637400000000000000000000000000000000602082015250565b600061449560308361412c565b91506144a082614439565b604082019050919050565b600060208201905081810360008301526144c481614488565b9050919050565b6000815190506144da81613c7f565b92915050565b6000602082840312156144f6576144f5613a3e565b5b6000614504848285016144cb565b91505092915050565b7f73656e646572206d757374206f776e20746f6b656e206964207061737365642060008201527f696e000000000000000000000000000000000000000000000000000000000000602082015250565b600061456960228361412c565b91506145748261450d565b604082019050919050565b600060208201905081810360008301526145988161455c565b9050919050565b7f746f6b656e20616c7265616479207573656420746f206d696e74000000000000600082015250565b60006145d5601a8361412c565b91506145e08261459f565b602082019050919050565b60006020820190508181036000830152614604816145c8565b9050919050565b60006040820190506146206000830185614004565b61462d6020830184613cfe565b9392505050565b60008151905061464381613a52565b92915050565b60006020828403121561465f5761465e613a3e565b5b600061466d84828501614634565b91505092915050565b600060608201905061468b6000830186614004565b6146986020830185614004565b6146a56040830184614004565b949350505050565b6146b681613d28565b81146146c157600080fd5b50565b6000815190506146d3816146ad565b92915050565b6000602082840312156146ef576146ee613a3e565b5b60006146fd848285016146c4565b91505092915050565b7f696e76616c69642064656c65676174652d7661756c742070616972696e670000600082015250565b600061473c601e8361412c565b915061474782614706565b602082019050919050565b6000602082019050818103600083015261476b8161472f565b9050919050565b7f50726f6a656374206d7573742062652061637469766520666f722067656e657360008201527f69732073657420686f6c64657273000000000000000000000000000000000000602082015250565b60006147ce602e8361412c565b91506147d982614772565b604082019050919050565b600060208201905081810360008301526147fd816147c1565b9050919050565b7f6d757374207061737320696e206120746f6b656e2069642066726f6d2070726f60008201527f6a65637420310000000000000000000000000000000000000000000000000000602082015250565b600061486060268361412c565b915061486b82614804565b604082019050919050565b6000602082019050818103600083015261488f81614853565b9050919050565b7f70726f6a656374203120746f6b656e20616c7265616479207573656420746f2060008201527f6d696e7400000000000000000000000000000000000000000000000000000000602082015250565b60006148f260248361412c565b91506148fd82614896565b604082019050919050565b60006020820190508181036000830152614921816148e5565b9050919050565b7f6d757374207061737320696e206120746f6b656e2069642066726f6d2070726f60008201527f6a65637420320000000000000000000000000000000000000000000000000000602082015250565b600061498460268361412c565b915061498f82614928565b604082019050919050565b600060208201905081810360008301526149b381614977565b9050919050565b7f70726f6a656374203220746f6b656e20616c7265616479207573656420746f2060008201527f6d696e7400000000000000000000000000000000000000000000000000000000602082015250565b6000614a1660248361412c565b9150614a21826149ba565b604082019050919050565b60006020820190508181036000830152614a4581614a09565b9050919050565b7f6d757374207061737320696e206120746f6b656e2069642066726f6d2070726f60008201527f6a65637420330000000000000000000000000000000000000000000000000000602082015250565b6000614aa860268361412c565b9150614ab382614a4c565b604082019050919050565b60006020820190508181036000830152614ad781614a9b565b9050919050565b7f70726f6a656374203320746f6b656e20616c7265616479207573656420746f2060008201527f6d696e7400000000000000000000000000000000000000000000000000000000602082015250565b6000614b3a60248361412c565b9150614b4582614ade565b604082019050919050565b60006020820190508181036000830152614b6981614b2d565b9050919050565b7f6d757374206f776e207468652073656c656374656420746f6b656e2066726f6d60008201527f2070726f6a656374203100000000000000000000000000000000000000000000602082015250565b6000614bcc602a8361412c565b9150614bd782614b70565b604082019050919050565b60006020820190508181036000830152614bfb81614bbf565b9050919050565b7f6d757374206f776e207468652073656c656374656420746f6b656e2066726f6d60008201527f2070726f6a656374203200000000000000000000000000000000000000000000602082015250565b6000614c5e602a8361412c565b9150614c6982614c02565b604082019050919050565b60006020820190508181036000830152614c8d81614c51565b9050919050565b7f6d757374206f776e207468652073656c656374656420746f6b656e2066726f6d60008201527f2070726f6a656374203300000000000000000000000000000000000000000000602082015250565b6000614cf0602a8361412c565b9150614cfb82614c94565b604082019050919050565b60006020820190508181036000830152614d1f81614ce3565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000614d5c60208361412c565b9150614d6782614d26565b602082019050919050565b60006020820190508181036000830152614d8b81614d4f565b9050919050565b7f63616e6e6f742062652063616c6c65642066726f6d20616e6f7468657220636f60008201527f6e74726163740000000000000000000000000000000000000000000000000000602082015250565b6000614dee60268361412c565b9150614df982614d92565b604082019050919050565b60006020820190508181036000830152614e1d81614de1565b9050919050565b7f50726f6a656374206d7573742062652061637469766500000000000000000000600082015250565b6000614e5a60168361412c565b9150614e6582614e24565b602082019050919050565b60006020820190508181036000830152614e8981614e4d565b9050919050565b7f4f6e65206d696e74207065722061646472657373000000000000000000000000600082015250565b6000614ec660148361412c565b9150614ed182614e90565b602082019050919050565b60006020820190508181036000830152614ef581614eb9565b9050919050565b7f4f6e6c7920617274697374206f72206f776e6572000000000000000000000000600082015250565b6000614f3260148361412c565b9150614f3d82614efc565b602082019050919050565b60006020820190508181036000830152614f6181614f25565b9050919050565b6000604082019050614f7d6000830185613cfe565b614f8a6020830184613cfe565b9392505050565b6000614f9c82613a48565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203614fce57614fcd6143a5565b5b600182019050919050565b7f486f6c64657273206f6e6c790000000000000000000000000000000000000000600082015250565b600061500f600c8361412c565b915061501a82614fd9565b602082019050919050565b6000602082019050818103600083015261503e81615002565b9050919050565b7f50726f6a656374206d7573742062652061637469766520666f7220686f6c646560008201527f7273000000000000000000000000000000000000000000000000000000000000602082015250565b60006150a160228361412c565b91506150ac82615045565b604082019050919050565b600060208201905081810360008301526150d081615094565b9050919050565b7f4f6e6c7920616c6c6f774c697374656400000000000000000000000000000000600082015250565b600061510d60108361412c565b9150615118826150d7565b602082019050919050565b6000602082019050818103600083015261513c81615100565b9050919050565b7f4d65726b6c65206d696e74206973206e6f742061637469766500000000000000600082015250565b600061517960198361412c565b915061518482615143565b602082019050919050565b600060208201905081810360008301526151a88161516c565b9050919050565b7f416c7265616479206d696e746564207769746820746869732070726f6f660000600082015250565b60006151e5601e8361412c565b91506151f0826151af565b602082019050919050565b60006020820190508181036000830152615214816151d8565b9050919050565b60008160601b9050919050565b60006152338261521b565b9050919050565b600061524582615228565b9050919050565b61525d61525882613c6d565b61523a565b82525050565b600061526f828461524c565b60148201915081905092915050565b7f496e76616c69642070726f6f6600000000000000000000000000000000000000600082015250565b60006152b4600d8361412c565b91506152bf8261527e565b602082019050919050565b600060208201905081810360008301526152e3816152a7565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b600061534660268361412c565b9150615351826152ea565b604082019050919050565b6000602082019050818103600083015261537581615339565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000819050919050565b6153c66153c182613f25565b6153ab565b82525050565b60006153d882856153b5565b6020820191506153e882846153b5565b602082019150819050939250505056fea2646970667358221220429e205f39ff33218a48dcf1a8d62d2dc75a31db955d458f65a81cdc5d8cd07264736f6c63430008110033

Verified Source Code Full Match

Compiler: v0.8.17+commit.8df45f5f EVM: london Optimization: No
ArtistProxy.sol 283 lines
//SPDX-License-Identifier: MIT

pragma solidity >=0.6.2;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";

interface IBrainDrops {
   function mint(address recipient, uint _projectId) external payable returns (uint256);

   function updateProjectArtistName(uint256 _projectId, string memory _projectArtistName) external;

   function updateProjectDescription(uint256 _projectId, string memory _projectDescription) external;

   function updateProjectWebsite(uint256 _projectId, string memory _projectWebsite) external;

   function updateProjectLicense(uint256 _projectId, string memory _projectLicense) external;

   function updateProjectBaseURI(uint256 _projectId, string memory _projectBaseURI) external;

   function updateProjectPricePerTokenInWei(uint256 _projectId, uint256 _pricePerTokenInWei) external;

   function toggleProjectIsPaused(uint256 _projectId) external;

   function setProvenanceHash(uint256 _projectId, string memory provenanceHash) external;

   function balanceOf(address owner) external view returns (uint256 balance);

   function ownerOf(uint256 tokenId) external view returns (address owner);

   function isWhitelisted(address sender) external view returns (bool whitelisted);

   function transferFrom(address from, address to, uint256 tokenId) external;
}

interface IDelegationRegistry {
   function checkDelegateForContract(address delegate, address vault, address contract_) external returns(bool);
}

contract ArtistProxy is Ownable, ReentrancyGuard {
    constructor(address _braindropsAddress) {
      braindrops = IBrainDrops(_braindropsAddress);
    }

    IBrainDrops public braindrops;
    IDelegationRegistry public delegationRegistry;

    mapping(uint256 => mapping(address => bool)) public projectIdToProxyDropAddressMinted;
    mapping(uint256 => mapping(address => bool)) public projectIdToMerkleDropAddressMinted;
    mapping(uint256 => mapping(uint256 => bool)) public projectIdToGenesisDropTokenMinted;
    mapping(uint256 => mapping(uint256 => bool)) public projectIdToProjectSpecificHoldersTokenMinted;

    mapping(uint256 => address) public projectIdToArtistAddress;
    mapping(uint256 => bytes32) public projectIdToMerkleRoot;
    mapping(uint256 => bool) public projectIdToProjectActivated;
    mapping(uint256 => bool) public projectIdToHolderActivated;
    mapping(uint256 => bool) public projectIdToGenesisDropActivated;
    mapping(uint256 => bool) public projectIdToIsMerkleTreeActivated;
    mapping(uint256 => bool) public projectIdToProjectIsAddressMintLimited;

    mapping(uint256 => uint256) public projectIdToOlderProjectId;

    modifier onlyArtist(uint256 _projectId) {
        require(msg.sender == projectIdToArtistAddress[_projectId], "Only artist");
        _;
    }

    modifier onlyArtistOrOwner(uint256 _projectId) {
        require(msg.sender == projectIdToArtistAddress[_projectId] || msg.sender == owner(), "Only artist or owner");
        _;
    }

    modifier onlyAllowListed() {
        require(braindrops.isWhitelisted(msg.sender), "Only allowListed");
        _;
    }

    modifier onlyHolders(uint256 _projectId) {
        require(braindrops.balanceOf(msg.sender) > 0, "Holders only");
        _;
    }

    function setProjectMerkleRoot(uint projectId, bytes32 merkleRoot) public onlyArtistOrOwner(projectId) {
        projectIdToMerkleRoot[projectId] = merkleRoot;
    }

    function setDelegationRegistry(address _registryAddress) public onlyOwner {
      delegationRegistry = IDelegationRegistry(_registryAddress);
    }

    function setArtist(uint projectId, address artistAddress) public onlyAllowListed {
        projectIdToArtistAddress[projectId] = artistAddress;
    }

    function updateProjectArtistName(uint256 _projectId, string memory _projectArtistName) onlyArtist(_projectId) public {
        braindrops.updateProjectArtistName(_projectId, _projectArtistName);
    }

    function updateProjectDescription(uint256 _projectId, string memory _projectDescription) onlyArtist(_projectId) public {
        braindrops.updateProjectDescription(_projectId, _projectDescription);
    }

    function updateProjectWebsite(uint256 _projectId, string memory _projectWebsite) onlyArtist(_projectId) public {
        braindrops.updateProjectWebsite(_projectId, _projectWebsite);
    }

    function updateProjectLicense(uint256 _projectId, string memory _projectLicense) onlyArtist(_projectId) public {
        braindrops.updateProjectLicense(_projectId, _projectLicense);
    }

    function updateProjectBaseURI(uint256 _projectId, string memory _projectBaseURI) onlyArtist(_projectId) public {
        braindrops.updateProjectBaseURI(_projectId, _projectBaseURI);
    }

    function updateProjectPricePerTokenInWei(uint256 _projectId, uint256 _pricePerTokenInWei) onlyArtist(_projectId) public {
        braindrops.updateProjectPricePerTokenInWei(_projectId, _pricePerTokenInWei);
    }

    function toggleProjectIsPaused(uint256 _projectId) public onlyArtist(_projectId) {
        braindrops.toggleProjectIsPaused(_projectId);
    }

    function setProvenanceHash(uint256 _projectId, string memory provenanceHash) public onlyArtist(_projectId) {
        braindrops.setProvenanceHash(_projectId, provenanceHash);
    }

    function toggleProjectIsAddressMintLimited(uint256 _projectId) public onlyArtist(_projectId) {
        projectIdToProjectIsAddressMintLimited[_projectId] = !projectIdToProjectIsAddressMintLimited[_projectId];
    }

    function toggleProjectIsActive(uint256 _projectId) public onlyArtist(_projectId) {
        projectIdToProjectActivated[_projectId] = !projectIdToProjectActivated[_projectId];
    }

    function toggleProjectIsHolderActive(uint256 _projectId) public onlyArtist(_projectId) {
        projectIdToHolderActivated[_projectId] = !projectIdToHolderActivated[_projectId];
    }

    function toggleProjectIsGenesisDropActive(uint256 _projectId) public onlyArtist(_projectId) {
        projectIdToGenesisDropActivated[_projectId] = !projectIdToGenesisDropActivated[_projectId];
    }

    function toggleProjectIsMerkleTreeActive(uint256 _projectId) public onlyArtist(_projectId) {
        projectIdToIsMerkleTreeActivated[_projectId] = !projectIdToIsMerkleTreeActivated[_projectId];
    }

    function setProjectIdToOlderProjectId(uint256 _projectId, uint256 _olderProjectId) public onlyArtist(_projectId) {
        projectIdToOlderProjectId[_projectId] = _olderProjectId;
    }

  function mintForArtistsOnly(address recipient, uint _projectId)
        public
        payable
        onlyArtist(_projectId)
        returns (uint256)
      {
          return braindrops.mint{value: msg.value}(recipient, _projectId);
      }

   function reserve(address recipient, uint _projectId, uint amount)
        public
        payable
        onlyArtistOrOwner(_projectId)
      {

          uint b;
          for (b = 0; b < amount; b++) {
            braindrops.mint{value: (msg.value / amount)}(recipient, _projectId);
          }
      }

  function mintForMerkleRootAddresses(address recipient, uint _projectId, bytes32[] calldata merkleProof)
        public
        payable
        nonReentrant
        returns (uint256)
      {
        require(projectIdToIsMerkleTreeActivated[_projectId], "Merkle mint is not active");
        require(!projectIdToMerkleDropAddressMinted[_projectId][msg.sender], "Already minted with this proof");
        
        bytes32 leaf = keccak256(abi.encodePacked(msg.sender));
        require(MerkleProof.verify(merkleProof, projectIdToMerkleRoot[_projectId], leaf), "Invalid proof");

        projectIdToMerkleDropAddressMinted[_projectId][msg.sender] = true;

        return braindrops.mint{value: msg.value}(recipient, _projectId);
      }

  function mintForProjectSpecificHoldersOnly(address recipient, uint _projectId, uint _projectTokenId)
        public
        payable
        nonReentrant
        returns (uint256)
      {
          uint olderProjectId = projectIdToOlderProjectId[_projectId];
          require(olderProjectId > 0, "Project must be active for project-holder specific mints");

          uint _projectIdFromTokenId = (_projectTokenId - (_projectTokenId % 1000000)) / 1000000;
          require(_projectIdFromTokenId == olderProjectId, "must pass in a token id from the correct project");
          require(braindrops.ownerOf(_projectTokenId) == msg.sender, "sender must own token id passed in");

          require(projectIdToGenesisDropTokenMinted[_projectId][_projectTokenId] == false, "token already used to mint");

          projectIdToGenesisDropTokenMinted[_projectId][_projectTokenId] = true;

          return braindrops.mint{value: msg.value}(recipient, _projectId);
      }

  function mintForGenesisDropHoldersOnly(address recipient, uint _projectId, uint _project1TokenId, uint _project2TokenId, uint _project3TokenId, address _vault)
        public
        payable
        nonReentrant
        returns (uint256)
      {
          address requester = msg.sender;

          if (_vault != address(0)) {
            bool isDelegateValid = delegationRegistry.checkDelegateForContract(msg.sender, _vault, address(braindrops));
            require(isDelegateValid, "invalid delegate-vault pairing");
            requester = _vault;
          }

          require(projectIdToGenesisDropActivated[_projectId], "Project must be active for genesis set holders");

          uint _project1Id = (_project1TokenId - (_project1TokenId % 1000000)) / 1000000;
          require(_project1Id == 1, "must pass in a token id from project 1");
          require(projectIdToGenesisDropTokenMinted[_projectId][_project1TokenId] == false, "project 1 token already used to mint");

          uint _project2Id = (_project2TokenId - (_project2TokenId % 1000000)) / 1000000;
          require(_project2Id == 2, "must pass in a token id from project 2");
          require(projectIdToGenesisDropTokenMinted[_projectId][_project2TokenId] == false, "project 2 token already used to mint");

          uint _project3Id = (_project3TokenId - (_project3TokenId % 1000000)) / 1000000;
          require(_project3Id == 3, "must pass in a token id from project 3");
          require(projectIdToGenesisDropTokenMinted[_projectId][_project3TokenId] == false, "project 3 token already used to mint");

          require(braindrops.ownerOf(_project1TokenId) == requester, "must own the selected token from project 1");
          require(braindrops.ownerOf(_project2TokenId) == requester, "must own the selected token from project 2");
          require(braindrops.ownerOf(_project3TokenId) == requester, "must own the selected token from project 3");

          projectIdToGenesisDropTokenMinted[_projectId][_project1TokenId] = true;
          projectIdToGenesisDropTokenMinted[_projectId][_project2TokenId] = true;
          projectIdToGenesisDropTokenMinted[_projectId][_project3TokenId] = true;

          return braindrops.mint{value: msg.value}(recipient, _projectId);
      }

  function mintForHoldersOnly(address recipient, uint _projectId)
        public
        payable
        nonReentrant
        onlyHolders(_projectId)
        returns (uint256)
      {
          require(projectIdToHolderActivated[_projectId], "Project must be active for holders");

          return braindrops.mint{value: msg.value}(recipient, _projectId);
      }

  function mint(address recipient, uint _projectId)
        public
        payable
        nonReentrant
        returns (uint256)
      {
          require(tx.origin == msg.sender, "cannot be called from another contract");
          require(projectIdToProjectActivated[_projectId], "Project must be active");

          if (projectIdToProjectIsAddressMintLimited[_projectId]) {
            require(projectIdToProxyDropAddressMinted[_projectId][msg.sender] == false, "One mint per address");
            projectIdToProxyDropAddressMinted[_projectId][msg.sender] = true;
          }

          return braindrops.mint{value: msg.value}(recipient, _projectId);
      }

  function withdraw() public onlyOwner {
    uint balance = address(this).balance;
    payable(msg.sender).transfer(balance);
  }

}
Context.sol 23 lines
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}
Ownable.sol 71 lines
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../utils/Context.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _setOwner(_msgSender());
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _setOwner(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _setOwner(newOwner);
    }

    function _setOwner(address newOwner) private {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}
ReentrancyGuard.sol 62 lines
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and make it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;

        _;

        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}
MerkleProof.sol 43 lines
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev These functions deal with verification of Merkle Trees proofs.
 *
 * The proofs can be generated using the JavaScript library
 * https://github.com/miguelmota/merkletreejs[merkletreejs].
 * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled.
 *
 * See `test/utils/cryptography/MerkleProof.test.js` for some examples.
 */
library MerkleProof {
    /**
     * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
     * defined by `root`. For this, a `proof` must be provided, containing
     * sibling hashes on the branch from the leaf to the root of the tree. Each
     * pair of leaves and each pair of pre-images are assumed to be sorted.
     */
    function verify(
        bytes32[] memory proof,
        bytes32 root,
        bytes32 leaf
    ) internal pure returns (bool) {
        bytes32 computedHash = leaf;

        for (uint256 i = 0; i < proof.length; i++) {
            bytes32 proofElement = proof[i];

            if (computedHash <= proofElement) {
                // Hash(current computed hash + current element of the proof)
                computedHash = keccak256(abi.encodePacked(computedHash, proofElement));
            } else {
                // Hash(current element of the proof + current computed hash)
                computedHash = keccak256(abi.encodePacked(proofElement, computedHash));
            }
        }

        // Check if the computed hash (root) is equal to the provided root
        return computedHash == root;
    }
}

Read Contract

braindrops 0x82a41c12 → address
delegationRegistry 0x1fbdd72d → address
owner 0x8da5cb5b → address
projectIdToArtistAddress 0xa47d29cb → address
projectIdToGenesisDropActivated 0x28317801 → bool
projectIdToGenesisDropTokenMinted 0x2ecf4504 → bool
projectIdToHolderActivated 0x1cadd032 → bool
projectIdToIsMerkleTreeActivated 0xe57de1fd → bool
projectIdToMerkleDropAddressMinted 0xd4a10fe4 → bool
projectIdToMerkleRoot 0x96ffc66c → bytes32
projectIdToOlderProjectId 0xc8d7c041 → uint256
projectIdToProjectActivated 0xcbdcc724 → bool
projectIdToProjectIsAddressMintLimited 0x0ff9e2f3 → bool
projectIdToProjectSpecificHoldersTokenMinted 0xaee9dfd8 → bool
projectIdToProxyDropAddressMinted 0x20895a79 → bool

Write Contract 27 functions

These functions modify contract state and require a wallet transaction to execute.

mint 0x40c10f19
address recipient
uint256 _projectId
returns: uint256
mintForArtistsOnly 0x3e276fd5
address recipient
uint256 _projectId
returns: uint256
mintForGenesisDropHoldersOnly 0x200e8188
address recipient
uint256 _projectId
uint256 _project1TokenId
uint256 _project2TokenId
uint256 _project3TokenId
address _vault
returns: uint256
mintForHoldersOnly 0xa8284c30
address recipient
uint256 _projectId
returns: uint256
mintForMerkleRootAddresses 0xedd64adf
address recipient
uint256 _projectId
bytes32[] merkleProof
returns: uint256
mintForProjectSpecificHoldersOnly 0x0ea066e8
address recipient
uint256 _projectId
uint256 _projectTokenId
returns: uint256
renounceOwnership 0x715018a6
No parameters
reserve 0x9e29dd36
address recipient
uint256 _projectId
uint256 amount
setArtist 0xd76a386a
uint256 projectId
address artistAddress
setDelegationRegistry 0x73aa9e94
address _registryAddress
setProjectIdToOlderProjectId 0x3e30918c
uint256 _projectId
uint256 _olderProjectId
setProjectMerkleRoot 0x418cdce7
uint256 projectId
bytes32 merkleRoot
setProvenanceHash 0x01ea4794
uint256 _projectId
string provenanceHash
toggleProjectIsActive 0xd03c390c
uint256 _projectId
toggleProjectIsAddressMintLimited 0x0e0530c6
uint256 _projectId
toggleProjectIsGenesisDropActive 0xa6fadad9
uint256 _projectId
toggleProjectIsHolderActive 0x5d97d515
uint256 _projectId
toggleProjectIsMerkleTreeActive 0x081565d4
uint256 _projectId
toggleProjectIsPaused 0xa11ec70a
uint256 _projectId
transferOwnership 0xf2fde38b
address newOwner
updateProjectArtistName 0xb7b04fae
uint256 _projectId
string _projectArtistName
updateProjectBaseURI 0x3e48e848
uint256 _projectId
string _projectBaseURI
updateProjectDescription 0xa3b2cca6
uint256 _projectId
string _projectDescription
updateProjectLicense 0x25b75d68
uint256 _projectId
string _projectLicense
updateProjectPricePerTokenInWei 0x97dc86cf
uint256 _projectId
uint256 _pricePerTokenInWei
updateProjectWebsite 0x37859963
uint256 _projectId
string _projectWebsite
withdraw 0x3ccfd60b
No parameters

Recent Transactions

No transactions found for this address