Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
0x60806040 | 13495388 | 1127 days ago | IN | 0 ETH | 0.42622013 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
Royal1155LDA
Compiler Version
v0.8.4+commit.c7e474f2
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
//SPDX-License-Identifier: Unlicense pragma solidity ^0.8.0; import "@openzeppelin/contracts-upgradeable/token/ERC1155/extensions/IERC1155MetadataURIUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155Upgradeable.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "../utils/RoyalPausableUpgradeable.sol"; // THIS LOOKS LIKE WORST CASE SOUNDS // ╣╬╬╬╬╬╬╣╬╬╣╬╬╣╣╣╣╝╝╛╙╝╣╣╣╬╣╬╬╬╬╣╣╬╬╬╬╬╬╬╬╬╬╬╬╣╬╬╬╬╣╣╬╬╬╬╣╝╨╙╝╣╣╬╣╬╬╬╬╬╬╬╬╬╬╬╬╬▌Γ // ╣╣╣╣╣╣╣╣╣╝╩ΘM~~_________-~ºΘ╙╩╝╣╣╣╣╣╣╣╣╬╣╣╣╣╣╣╣╣╝╩δM≈~~________~~*╚å╝╝╣╣╣╣╣╣╣╣▌∩ // ╬╬╫╫╫▒▒▒╖─____________________~╖▒▒╫╫╫╬╬╬╬╬╬╣╫╢▒▒,,__________________,,▒▒╢╫╫╬╬╬▌≥ // ╬╬╣╣╣╣╣#╗╗m,,_____________,,╓╗╗╗╣╣╣╣╣╣╬╬╬╬╣╣╣╬▒╗╗╦,_______________,,╔╦╗φ▒╣▓╣╬╬▌░ // ╬╬╬╬╣╣╫╫╢╨╙╙╙╙"_________^"╙╙╙╙╚╢╫╫╣╬╣╬╬╬╬╣╫╫╫╫╢╠╠╙╙╙╙"`________`"╙╙╙╙╠╠╢╫╫╫╫╫╬▌Γ // ╬╬╬╣╫╢╩²~~____________________~²φ╝╢╫╬╬╬╬╬╬╬╣╬╠░ⁿ~~~________________~~~ⁿ╚╠╠╬╬╬╬▌≥ // ╬╬╬╬╬╣▓▓▓▒╗╗µ╓,__________╓µ╦╗@▒▓▓╣╣╬╬╬╬╬╬╬╣╣▓▓▒▒@#╗╗▄,__________,╓╗╗@@▒▒▒╣╣╣╬╬▌_ // ╬╬╬╬╬╬╬╬╙╙^`_______________``"╙╙╬╬╬╬╬╬╬╬╬╬╬╬╬╠╩╙╙╙¬________________¬╙╙╙╙╠╠╬╬╬╬▌_ // ╬╬╬╬╬╬╬╣▒▒▒"_______________"7▒▒╬╬╣╬╬╬╬╬╬╬╬╬╬╬╬╬╣▒▒`_______________.Γ▒▒╫╫╬╬╬╬╬╬▌_ // ╬╬╬╬╣╣╬▒╗╗▄╓,,____________,,╓▄╗╗╬╣╣╣╬╬╬╬╬╬╬╬╣╣╣▄▄╥╓,______________,╓╖▄▄╣╣╣╬╬╬╬▌_ // ╬╬╬╬╬╣╬╬╩╩╙╙╙└____________╙╙╙╙╠╩╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╢╩╙╙╙└____________└╙╙╙╠╢╢╬╬╬╬╬╬▌_ // ╬╬╬╬╬╬▒▒░____________________`,▒▒╠╬╬╬╬╬╬╬╬╬╬╠╠▒,,,__________________,,,▒╠╠╣╬╬╬▌_ // ╬╬╬╬╬╣╬╣╣▒▄▄╓,____________,╖▄▄φ╣╣╣╬╬╬╬╬╬╬╬╬╣╬╣╬╢▄▄▄╖╓,__________,╓╖▄▄▄╢╣╬╣╬╬╣╬▌_ // ╬╬╬╣╣╣╬╬╩╩╙╙╙╙╙`________"╙╙╙╙╙╩╩╬╣╣╣╬╬╬╬╬╬╬╣╝╩╩╩╩╩╩╙╙╙__________╙╙╙╩╩╩╩╩╩╝╣╬╬╬▌_ // ╬╬╬╬╣╩777_____________________-777╝╢╣╬╬╬╬╬▒╩▒δ---____________________---δ╚╩╬╬╬▌_ // ╬╣╣╢▒QQ^________________________^Q▒╢╢╣╬╬╬╬╠▒░,,________________________,,░▒╠╬╬▌_ // ╬╬╬╬╬╩╩²ⁿ⌐⌐¬¬_____________¬¬¬⌐⌐ⁿª╩╩╬╬╬╬╬╬╬╬╬╩╩╙ªªⁿ¬¬______________¬¬ⁿⁿª╙╩╩╬╬╬╬▌_ // ╬╣╣╣╬╬M7""^__________________^""7#╬╣╣╣╣╬╣╣╝╝╩╩>>.____________________.¬>╚╝╝╢╣╣▌_ // ╬╬╣▒▒▒▒▒``____________________`,Σ▒╢▒╫╬╬╬╬╫▓▒▒▒▒,,,__________________,,,░▒▒▒▓╫╫▌_ // ╬╬╬╬╬╬╬╩╩╨╙5"_____________""╙╙╨╩╩╬╬╬╣╣╬╬╬╬╬╬╝╝╩╨╙╙╙ⁿ¬____________¬ⁿ╙╙╙╨╨╝╝╢╬╬╬▌_ // ╬╬▒▒▒M"ⁿ________________________"7M▒▒╬╬╬╬╢▒▒▒7``______________________``77▒▒▒╬▌_ // ╣╣╬▒QL^__________________________^Q▒╠╫╣╬╣╢▒▄╓─__________________________┌╓╥▒╣╫▌_ // ╬╬╬╬╬╩╙░⌐¬____________________¬ⁿ╙╚╬╬╬╬╬╬╬╬╬╬╬▒░~~____________________~~░╠╬╬╬╬╬▌_ // ╬╬╬╬╩╩δ=¬______________________¬≈φ╩╩╬╬╬╬╬╬╬Åñ""``____________________``""ñÅ╬╬╬▌_ // ╣╣╬▒φQD(_______________________,Ç¿Q╠║╫╣╬╫╢#▒M?^^^____________________`^^?M╠#╢╫▌_ // ╣╫╢╢╨╜╨╜╚╚^^_______________^^╙╚╚╜╨╨╢╢╢╫╣╨╨╨╨╨╨╜╜^____________________^╙╜╨╨╨╨╨╨▌_ // ▒░~~~~~~________________________~~~~~~░╬▒α~~~~__________________________~~~~░▒╡_ // ╢╩╚"σ..._______________________...."╚╚║╬╩╩>»»..¬______________________¬..»»>╚╩╡_ // ▒░░░┬--------_____________--------┬░░░▒╣▒½┬----------____________---------┬┬░▒╡_ // ╣▒▒─~~────~_________________~~─~~~~~┴▒▒╣▒▒┬─────~_____________________─────┬╖▒▌_ // ╣╝φ=¬¬¬¬¬_____________________¬¬¬¬¬¬≈╚╝╬╩φ>>>¬¬¬¬¬__________________¬¬¬¬¬¬>>½╩╡_ // ╝╝╝∞---------_____________----------∞╝╝╣╝δ-----------.__________------------╚╝╡_ // ▒φ²²²--─~~____________________~~--²-²²╖╣▒╓--^``________________________``^--╓φ╡_ // ╬µεε.¬¬__________________________¬..εα╦╬Nεε...__________________________...ε≤A╡_ // ╬░---------._______________..--------░╚╬▒φ--------.._____________...---------▒╡_ // ╬▒φ≥---ⁿⁿ______________________ⁿⁿ---φ╠╠╬╠▒7---ⁿ~______________________`ⁿ---7φ╠▌┐ // ╬╩嬬¬¬¬¬______________________¬¬¬¬¬¬δ╩╬δ≡⌐¬¬¬¬¬______________________¬¬¬¬¬¬≡Å╡ε // ╬╩═---___________________________----═╬╬▒░═--`__________________________`--═░▒╡░ // ╩7---______________________________--77╬----_______________________________---╡O // ▒..._______________________________...J╬µε._______________________________,.:µ╡Γ // ▒----....______________________....---╓╬╕--...._______________________.....---╡" // ╬▒7^^-----____________________----^^77╩╬╩7º-----______________________-----^7╩╡_ // ╬╦εε=~~__________________________~=;ε≥╦╬≥≡ε==~__________________________~==ε≡φ▌_ // ▒^___________________________________^φ╬ΣJ^^^____________________________^^^2Σ╡_ // ╩».....__________________________.....º╬>»....__________________________....»»╡_ // ▒░,,_______________________________,,░φ╬µ;,,______________________________,,╓φ╡_ // ▒≡.._______________________________...≥╬≤.....__________________________.....:╡_ // ▒░εε.--_________________________---«ε░▒╬εε=-----______________________-----=τε╡_ // ▒ε┬─~~____________________________~~┬╖¥╣εⁿ~─~~─________________________───~─÷¥╡_ // ▒▒¿..______________________________..φφ╣φ≥-~~____________________________~~-φφ╡_ // ╩:..________________________________..≤╬ε..________________________________..≤╡_ // ▒╖----~__________________________----┬▒╣▒-------~____________________~~-----░▒▌_ // ╬Qµ,,,___________________________,,,,¿╠╬MDDµ,.....__________________......¿DD╠╡_ // ╬æprrrr...____________________...r¬rrµÅ╬Ñtrr¬...______________________...¬rrτÑ╡_ // ╬▒≥≈=----_____________________-----≈φφ╠╬▒φ7-----______________________-----7φ╠▌_ // ╬╬µç¬______________________________p╔╠╬╬╠▒L,,,,,______________________,,,,;L▒╠▌_ // ╬b>⌐¬¬¬¬________________________¬¬¬¬⌐ε5╬嬬¬¬¬¬________________________¬¬¬¬¬¬¿╡_ // ╬φ----._________________________.----╓╚╣φ-----,..____________________..,-----╠╡_ // ╬░ƒƒ;;;,________________________,;;;ƒƒ╙╬░░;;;,,________________________,,;;;░░╡_ // ╬▒░;;;,,________________________,~;;░░▒╬░;;,_____________________________.,;;░╡_ // ╬╩╩═-----______________________----=═╩╩╬╩7º----________________________----º7╩▌_ // ▒#╖╓------____________________------╓╖▒╣▒╤------______________________------╤#╡_ // ╣╬╬╣╬▒▒╖╓-___________________.,╔╥▒▒╣╣╣╣╬╣╣╣▒▒▒▄e,____________________,e╥▄╗▒╣╬╣▌_ // ╬╬╫╫╬╬╠╠╙╙`_________________`"╙╙╠╠╬╣╫╫╬╬╬╬╬╬╬▒╠╙╙"_________________`"╙╙╠╠╫╬╬╬╬▌_ // ╬╬╬╬╬╬╬╬╬╬╬▒╦,___________.«▒╫╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╣╣╬╣╬╦»____________»╦╣╣╣╣╣╬╬╬╬╬╬▌_ // ╬╬╬╬╬╝╝╧╛--_________________--:≈╝╝╣╬╬╬╬╬╬╬╬╬╣╩╧═=--________________--:=╧╝╢╬╬╬╬▌_ // ╬╬╬╬╣╣╬▒▒QL,________________,LE▒╬╣╬╣╬╬╬╬╬╬╬╬╣╣╣▒▄L,________________,╓▄▒╢╣╣╬╬╬╬▌_ // ╬╬╬╬╬╬╬╣╣╨╜╜~`___________``└╜╨╨╫╬╬╬╬╬╬╬╬╬╬╬╬╬╬╫╫╢╨┴~`____________`└╙╜╢╫╫╬╬╬╬╬╬▌_ // ╬╬╬╬╫╣╢╠▒,,,________________,,╓▒╠╫╫╫╬╬╬╬╬╬╬╬╬╬▒▒,,__________________,,╠╠╬╫╬╬╬╬▌_ // ╣╫╫╫╫╫╢╢╚╙`_________________^"╙╠╢╢╫╫╫╫╫╬╫╫╫╣╫╬╝╚╙^^________________`"╙╙╠╬╫╫╫╫╫▌_ // ╬╬╬╬╬╬╬╬╬╣▓▒▒⌐___________¬ⁿ▒▒╣╣╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╣▓▓▒╗ε~__________~«╗▒╣▓╬╬╬╬╬╬╬╬▌_ // ╬╬╬╬╬╩╙╙╙└`__________________└╙╙╙╙╠╬╫╬╬╬╬╬╬╩╠╚╙╙`_____________________╙╙╚╠╩╣╣╬▌Γ // ╬╬╬╬╣╬╬╬▄╓___________________,╓▄╬╬╣╬╬╬╬╬╬╬╬╬╬╬╦φε,__________________,rφ╦╬╬╬╬╬╬▌░ // ╬╬╬╬╬╬╬╬╬╬╫╢▒¬¬__________¬ñ╜╫╫╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╣▒▒`____________`▒╢╣╬╬╬╬╬╬╬╬╬▌▒ // ╣╣╬▒▒╙╙└________________________└╙╙╚╠╣╫╣╬▒╩╙╙└__________________________└╙╙╩╠╬▌∩ // ╬╬╬╠╦ε___________________________.≤╠╠╬╬╬╠╠╠Lε嬬______________________¬¬¬ε≤╠╠╠▌Γ // ╣▓▒▒▒▒▒░~~____________________~~φ▒▒▒▒▓╣╬╣▒▒▒▒½┬░______________________;╓╖▒▒▒▒╣▌┘ // ╣╬╢╢╬╦Q¬_______________________¬ƒQ╠╠╢╢╣╣╣╣╠▄▄╓,________________________,╓▄▒║╢╣▌_ // ╬╣╬╬φφ⌂∩^^____________________^,⌂φφ╬╬╣╣╬╬╬╬╩Mε.________________________.≤≥╩╠╬╬▌_ // ╣╫╫╫╫╫▒▒▒Mƒⁿ_______________;ⁿƒ@▒▒╢╫╫╫╫╫╬╬╬╬╬╫╢▒▒WSº^______________^º≥≥▒╢╢╢╫╬╬╬▌_ // ╬╬╩╚,...________________________..,╚╚╠╬╬╬╬▒╠░.__________________________.│╠╠╬╬▌_ // ╬╬╩▒░¬¬__________________________¬¬╙╩╩╬╬╣╠▒░⌐¬__________________________¬¬░▒║╫▌_ // ╬╣╬╢▒╠▒--_____________________.-░▒╠▒╫╫╣╬╬╣▒╩╩----____________________----╚╠╢╫╬▌_ // ╬╬╬╬╠MM∩¬_____________________¬"≤M╬╠╬╬╣╣╬╬╠MN≥ε¬______________________'ε≤NÆ╠╬╬▌_ // ╬╠╠▒┴─,_________________________,──╙╠╠╠╬╬╠▒░,,__________________________,,░╠╠╬▌_ // ╬╣╣╣╣#╗╗╤╓─__________________~╔╤╗#╝╣╣╣╬╬╬╬╣╬╢╗╤╤--__________________--═╗╗╢╢╣╬╬▌_ // ╬ßß5"^^^________________________^"^"ßß╙╬╙TT^?^^^^^^________________^^^^^^???T╙╡_ // ▒░░~~______________________________~░░▒╣▒░░~______________________________~~░▒▒_ // ╬ñε¬________________________________¬ε╠╬ε>....__________________________.....≡╡_ // ╬╩░░..___________________________,..µ╠╩╣▒░...,__________________________....└░╡_ // ╬╨Γ...____________________________..≥╙╢╣▒⌂._______________________________..≤▒▌_ // ╬╬Å&».._________________________...≤&╩╠╬╬▒Γ^...________________________...^7╚╠╡_ // ╬.....____________________________....!╬≤..________________________________..≤╡_ // ▒▒░░_______________________________~░░▒╢▒┴┬~~_____________________________~┬²▒╡_ // ▒bε¬________________________________¬rΣ╬Ür.________________________________.r≤╡_ // ╬▒φ░,,,,,______________________,,,,││φ╠╣▒φ,,,,._________________________,,,,φ║╡_ // ╣▒,.________________________________,7╢╣╩½>-______________________________-(╚╚▌_ // ╬▒░_________________________________,Γ╠╬▒L^^______________________________^^░╚▌_ // ╬╙⌐¬¬¬¬¬_______________________¬¬¬¬¬¬╙╜╬b5¬¬¬¬¬¬______________________¬¬¬¬¬"5@╡_ // ▒(^__________________________________(7╬^____________________________________^╡_ // ▒░░__________________________________░░╬░____________________________________░╡_ // ╬δ░└_______________________________^└δ╠╬δΓ^________________________________.Γδ╡_ // ╬ƒ⌐__________________________________ƒX╬D¬__________________________________,D╡_ // ╠░░--______________________________-░░╠╬░░-`_______________________________-░░╡_ // ╬░___________________________________,,╬╠,__________________________________,╠╡_ // ╩∩-__________________________________-ª╬ƒ¬__________________________________¬ƒ╡_ // ▒┘`````__________________________````└┴╢░````____________________________````░╡ε // ╬LL__________________________________IÑ╬≥____________________________________,▒░ // ╬.____________________________________░╬∩¬__________________________________¬ª╡╕ // ╬░``_______________________________^``░╬░`__________________________________`│╡░ // ╬▒▒7-______________________________-7░▒╬▒≥--______________________________--º≥▒Γ // ▒────~____________________________~───~╣░──~~~___________________________~~~─░╡╕ // ▒Γ````____________________________````Γ╬Γ.`````________________________`````.»╡_ // ╬▒░"^`____________________________`""░╠╬▒▒░""____________________________"""▒╠▌_ // ╬░^~_______________________________~~²░╣▒░░~~~~~_______________________~~~~░░▒▌_ // ╬ñl7..____________________________.^7l╠╬ÿ?^^^^^________________________^^^^^?7╡_ // ╠░,,________________________________,░░╬░░__________________________________'░╡_ // ▒--~─~____________________________───-╔╣½---~~__________________________~~---≈╡_ // ╬Σ^^^^`^________________________^^^^^^Σ╬ΣL^^^^__________________________^^^^L2╡_ // ╬"ƒ¬"``__________________________``¬¬ƒÿ╬▒"""``__________________________``"¬"ÿ▒_ // ▒--~~~~_________________________-~`~~-φ╬φ░~~`~__________________________~~~~░½▌_ // ╬ΣD..______________________________.└3Σ╬▒L^^______________________________^.│╠▒_ // ╣▒##αεε...____________________...--α##╣╬╣▒#αα...______________________...»»#▒╣▌_ // ╬▒▒▒╓,,,_______________________,,,,╓▒║╫╬╬╬▒½,,,.-____________________-.,,,½▒╠╣▌_ // ╬╬╫╢▒░^^^_____________________`^^?░║╢╣╬╬╬╫╢╠░L^_______________________``(░╠╢╢╬▌_ // ╬╣╢▒▒▒""```"_______________""```""▒▒▒╢╣╬╣╢▒▒▒""``""^_____________`^""``""å▒▒╢╣▌_ // ╬╬╬╬╬╠╓77```_______________```777╠╠╬╬╬╬╬╬╬╬╬╬▒77`-``______________``-`77╠╠╬╬╬╣▌_ // ╬╬╣╢╢╩░░¬¬¬_________________¬¬¬¬░╠╪╢╢╣╬╬╬╣╬╢╪╩░¬¬¬¬________________¬¬¬¬░╠╪╢╢╬╬▌_ // ╬╣╫▒▒▒▒∩"""^^^`^________^^^^^"""å▒▒▒╣╫╬╬╬╫▒▒▒▒▒"""^^^``________`^^^^"""▐▒▒▒║╫╬▌_ // ╬╬╬╬╬╬╠?..._________________....3╠╬╬╬╬╬╬╬╬╬╬╬╠▒^...________________...`3╠╬╬╬╬╬▌_ // ╬╬╬╢╝╝╝⌐¬¬¬_________________¬¬¬¬╙╝╝╢╢╬╬╬╬╬╢╝╝╝░¬¬¬__________________¬¬¬j╝╝╝╢╬╬▌_ // ╬╬╬▒▒▒ΣΓ"7^^^^___________`^^^^""╚▒▒▒╬╣╬╬╬╣▒▒▒▒Γ"7^^^^^__________^^^^^^"7▒▒▒▒╣╬▌_ // ╬╬╬╬╠╠╠µJ^^^^_____________`^^^^J╠╠╠╬╬╬╬╬╬╬╬╬╠╬GJ^^^`______________^^^^Jφ╬╠╠╬╬╬▌_ // ╬╬╬╣╝╝▒░░░~'________________~░░░╚▒╝╝╣╬╬╬╬╣╣╝╝╝░░░░~________________~░░░╙╚╝╝╣╣╬▌_ // ╣╣╣▒▒▒▒▄Nºººº÷─__________─ºººººSÉ▄╢╢╢╣╣╬╣╣╢╢▒▒▄SNNºº-~__________ⁿ-ººNNS▒▒╢╢╢╣╣▌_ // ╬╬╬╬╬╬╬╬╬╣╣▒▒░~__________:5▒╣╬╣╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╣╣▒▒φ,,________.,╓▒╢╣╣╬╬╬╬╬╬╬╬▌_ // ╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╣▄,___,╓╢╣╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╣▒╓.__.╓@╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬▌_ // ╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬▓▒╣╣╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬▒å╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬▌_ // by 3LAU /** @dev Implementation of Royal.io LDA using ERC-1155 See https://eips.ethereum.org/EIPS/eip-1155 The `ldaID`s used in this contract is a synthetic ID. The first 128 bits are the `tierID` and the last 128 bits are the `tokenID`. This effectively means that: `ldaID = (tierID << 128) + tokenID` */ contract Royal1155LDA is ERC1155Upgradeable, RoyalPausableUpgradeable { // TODO: Decide if this pattern is better, or if I should use event NewTier(uint128 indexed tierID); event TierExhausted(uint128 indexed tierID); uint256 constant UPPER_ISSUANCE_ID_MASK = uint256(type(uint128).max) << 128; uint256 constant LOWER_TOKEN_ID_MASK = uint256(type(uint128).max); string _contractMetadataURI; // (tierID) => max supply for this tier mapping(uint128 => uint256) private _tierMaxSupply; // (tierID) => current supply for this tier. NOTE: See also the comment below _ldasForTier. mapping(uint128 => uint256) private _tierCurrentSupply; // MAPPINGS FOR MAINTAINING ISSUANCE_ID => LIST OF ADDRESSES HOLDING TOKENS (with repeats) // NOTE: These structures allow to enumerate the ldaID[] corresponding to a tierID. The // addresses must then be looked up from _owners. // TODO: Move this into a library or struct for both code cleanliness & savings on deploy /// @notice (ldaID) => owner's address mapping(uint256 => address) private _owners; /** @notice (`tierID`) => mapping from `ldaIndexForThisTier` [0..n] (where `n` is the # of LDAs * associated with this `tierID`). to the `ldaID`. This effectively acts as a map to * a list of ldaIDs for a given tierID. * * NOTE: The `ldaIndexForThisTier` is the value stored in the _tierCurrentSupply map. */ mapping(uint128 => mapping(uint256 => uint256)) private _ldasForTier; // (ldaID) => ldaIndexForThisTier this is only required in order to support remove LDAs from _ldasForTier mapping(uint256 => uint256) _ldaIndexesForTier; // To prevent duplication of state, we will re-use `_tierCurrentSupply` to act as the index. This means // that if we burn any tokens, then we need to decrement this number. // 3lau.eth address address public constant signer = 0xD2aff66959ee0E6F92EE02D741071DDB5084Bebb; // keccak256 Hash of the Song .wav file bytes32 public constant songHash = 0x5acbdb71da23246df6fd982a85644e58b753f822dce6168547baa5e0edb74899; // 3lau.eth signature of the song hash bytes public constant signedSongHash = "0x1626eb2731116e22d9724c0ac48921bb59f7f740bfd93b46c8ca8874896f051c18517fc4c8f4dcd1a183274a897286bca8214c8ac3e18499b547100ad4f50a371c"; function verifySignature(bytes memory _signedSongHash) public pure returns (bool){ bytes32 messageHash = ECDSA.toEthSignedMessageHash(songHash); address messageSigner = ECDSA.recover(messageHash, _signedSongHash); return messageSigner == signer; } function initialize() public initializer { __RoyalPausableUpgradeable_init(); // Pointed to Contract Metadata V1.0 __ERC1155_init("https://royal-io.mypinata.cloud/ipfs/QmSvvcSApos8wZoQ5aZVL2NS8VqMRTr413kdracgMP1e7N/{id}.json"); // Pointed to Contract Metadata V3 _contractMetadataURI = "https://royal-io.mypinata.cloud/ipfs/QmQbyLYAdfxDM2CCg8ci1VrgHTAQDu9BpdpFh3TFUMsixA"; } function updateTokenURI(string calldata newURI) public onlyOwner { _setURI(newURI); } function contractURI() public view returns (string memory) { return _contractMetadataURI; } function updateContractMetadataURI(string memory newURI) public onlyOwner { _contractMetadataURI = newURI; } /// @dev Check if given tier is currently mintable function mintable(uint128 tierID) external view returns (bool) { return _tierCurrentSupply[tierID] < _tierMaxSupply[tierID] && this.tierExists(tierID); } /// @dev Has this tier been initialized? function tierExists(uint128 tierID) external view returns (bool) { // Check that the map has a set value return _tierMaxSupply[tierID] != 0; } /// @dev Has the given LDA been minted? function exists(uint256 ldaID) external view returns (bool) { return _owners[ldaID] != address(0); } /// @dev What address owns the given ldaID? function ownerOf(uint256 ldaID) external view returns (address) { require(_owners[ldaID] != address(0), "LDA DNE"); return _owners[ldaID]; } /** @dev Create an Tier of an LDA. In order for an LDA to be minted, it must belong to a valid Tier that has not yet reached it's max supply. */ function createTier(uint128 tierID, uint256 maxSupply) external onlyOwner { require(!this.tierExists(tierID), "Tier already exists"); require(tierID != 0 && maxSupply >= 1, "Invalid tier definition"); require(_tierCurrentSupply[tierID] == 0 && _tierMaxSupply[tierID] == 0, "Tier exists"); _tierMaxSupply[tierID] = maxSupply; emit NewTier(tierID); // NOTE: Default value of current supply is already set to be 0 } // TODO: (Maybe) implement a bulkMintLDAsToOwner as an optimization to bulk mint a shopping cart. // LDAs from different tiers can be minted together. function mintLDAToOwner(address owner, uint256 ldaID, bytes calldata data) public onlyOwner { require(_owners[ldaID] == address(0), "LDA already minted"); (uint128 tierID,) = _decomposeLDA_ID(ldaID); // NOTE: This check also implicitly checks that the tier exists as mintable() // is a stricter requirement than exists(). require(this.mintable(tierID), "Tier not mintable"); // NOTE: Should we include a semaphore // require(_tierCurrentSupply[tierID] < _tierMaxSupply[tierID], "Cannot mint anymore of this tier"); // Update current supply before minting to prevent reentrancy attacks _tierCurrentSupply[tierID] += 1; _mint(owner, ldaID, 1, data); // Emit the big events if (_tierCurrentSupply[tierID] == _tierMaxSupply[tierID]) { emit TierExhausted(tierID); } } /** @dev Decompose a raw ldaID into it's two composite parts */ function _decomposeLDA_ID( uint256 ldaID ) internal pure virtual returns (uint128 tierID, uint128 tokenID) { tierID = uint128(ldaID >> 128); tokenID = uint128(ldaID & LOWER_TOKEN_ID_MASK); // NOTE: Not sure if we want to enforce tokenIDs > 0 require(tierID != 0 || tokenID != 0, "Invalid ldaID"); } // HOOK OVERRIDES function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual override { super._beforeTokenTransfer(operator, from, to, ids, amounts, data); // Iterate over all LDAs being transferred for(uint a; a < ids.length; a++) { // Decompose out here as an optimization (uint128 tierID,) = _decomposeLDA_ID(ids[a]); if (from == address(0)) { // This is a mint operation // Add this LDA to the `to` address state _addTokenToTierTracking(to, ids[a], tierID); } else if (from != to) { // If this is a transfer to a different address. _owners[ids[a]] = to; } if (to == address(0)) { // Remove LDA from being associated with its // TODO: Move this to burn transaction state _removeLDAFromTierTracking(from, ids[a], tierID); } } } // ENUMERABLE helper functions // TODO: I don't think this function signature is quite correct. Needs improvement. function _addTokenToTierTracking(address to, uint256 ldaID, uint128 tierID) private { // TODO: Figure out if this is right because these numbers could be changing during a mint uint256 ldaIndexForThisTier = _tierCurrentSupply[tierID]; _ldasForTier[tierID][ldaIndexForThisTier] = ldaID; // Track where this ldaID is in the "list" _ldaIndexesForTier[ldaID] = ldaIndexForThisTier; _owners[ldaID] = to; } /** * @dev This is a sexy little trick I pulled from the OZ implementation of {ERC721Enumerable-_removeTokenFromOwnerEnumeration}. * See More: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/6f23efa97056e643cefceedf86fdf1206b6840fb/contracts/token/ERC721/extensions/ERC721Enumerable.sol#L118 */ function _removeLDAFromTierTracking(address from, uint256 ldaID, uint128 tierID) private { // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastLDAIndex = _tierCurrentSupply[tierID] - 1; uint256 tokenIndex = _ldaIndexesForTier[ldaID]; // When the token to delete is the last token, the swap operation is unnecessary if (tokenIndex != lastLDAIndex) { uint256 lastLDA_ID = _ldasForTier[tierID][lastLDAIndex]; _ldasForTier[tierID][tokenIndex] = lastLDA_ID; // Move the last LDA to the slot of the to-delete LDA _ldaIndexesForTier[lastLDA_ID] = tokenIndex; // Update the moved LDA's index } // This also deletes the contents at the last position of the array delete _ldaIndexesForTier[ldaID]; delete _ldasForTier[tierID][lastLDAIndex]; _owners[ldaID] = from; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../IERC1155Upgradeable.sol"; /** * @dev Interface of the optional ERC1155MetadataExtension interface, as defined * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP]. * * _Available since v3.1._ */ interface IERC1155MetadataURIUpgradeable is IERC1155Upgradeable { /** * @dev Returns the URI for token type `id`. * * If the `\{id\}` substring is present in the URI, it must be replaced by * clients with the actual token type ID. */ function uri(uint256 id) external view returns (string memory); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IERC1155Upgradeable.sol"; import "./IERC1155ReceiverUpgradeable.sol"; import "./extensions/IERC1155MetadataURIUpgradeable.sol"; import "../../utils/AddressUpgradeable.sol"; import "../../utils/ContextUpgradeable.sol"; import "../../utils/introspection/ERC165Upgradeable.sol"; import "../../proxy/utils/Initializable.sol"; /** * @dev Implementation of the basic standard multi-token. * See https://eips.ethereum.org/EIPS/eip-1155 * Originally based on code by Enjin: https://github.com/enjin/erc-1155 * * _Available since v3.1._ */ contract ERC1155Upgradeable is Initializable, ContextUpgradeable, ERC165Upgradeable, IERC1155Upgradeable, IERC1155MetadataURIUpgradeable { using AddressUpgradeable for address; // Mapping from token ID to account balances mapping(uint256 => mapping(address => uint256)) private _balances; // Mapping from account to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json string private _uri; /** * @dev See {_setURI}. */ function __ERC1155_init(string memory uri_) internal initializer { __Context_init_unchained(); __ERC165_init_unchained(); __ERC1155_init_unchained(uri_); } function __ERC1155_init_unchained(string memory uri_) internal initializer { _setURI(uri_); } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165Upgradeable, IERC165Upgradeable) returns (bool) { return interfaceId == type(IERC1155Upgradeable).interfaceId || interfaceId == type(IERC1155MetadataURIUpgradeable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC1155MetadataURI-uri}. * * This implementation returns the same URI for *all* token types. It relies * on the token type ID substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * Clients calling this function must replace the `\{id\}` substring with the * actual token type ID. */ function uri(uint256) public view virtual override returns (string memory) { return _uri; } /** * @dev See {IERC1155-balanceOf}. * * Requirements: * * - `account` cannot be the zero address. */ function balanceOf(address account, uint256 id) public view virtual override returns (uint256) { require(account != address(0), "ERC1155: balance query for the zero address"); return _balances[id][account]; } /** * @dev See {IERC1155-balanceOfBatch}. * * Requirements: * * - `accounts` and `ids` must have the same length. */ function balanceOfBatch(address[] memory accounts, uint256[] memory ids) public view virtual override returns (uint256[] memory) { require(accounts.length == ids.length, "ERC1155: accounts and ids length mismatch"); uint256[] memory batchBalances = new uint256[](accounts.length); for (uint256 i = 0; i < accounts.length; ++i) { batchBalances[i] = balanceOf(accounts[i], ids[i]); } return batchBalances; } /** * @dev See {IERC1155-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { require(_msgSender() != operator, "ERC1155: setting approval status for self"); _operatorApprovals[_msgSender()][operator] = approved; emit ApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC1155-isApprovedForAll}. */ function isApprovedForAll(address account, address operator) public view virtual override returns (bool) { return _operatorApprovals[account][operator]; } /** * @dev See {IERC1155-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes memory data ) public virtual override { require( from == _msgSender() || isApprovedForAll(from, _msgSender()), "ERC1155: caller is not owner nor approved" ); _safeTransferFrom(from, to, id, amount, data); } /** * @dev See {IERC1155-safeBatchTransferFrom}. */ function safeBatchTransferFrom( address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) public virtual override { require( from == _msgSender() || isApprovedForAll(from, _msgSender()), "ERC1155: transfer caller is not owner nor approved" ); _safeBatchTransferFrom(from, to, ids, amounts, data); } /** * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - `from` must have a balance of tokens of type `id` of at least `amount`. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes memory data ) internal virtual { require(to != address(0), "ERC1155: transfer to the zero address"); address operator = _msgSender(); _beforeTokenTransfer(operator, from, to, _asSingletonArray(id), _asSingletonArray(amount), data); uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: insufficient balance for transfer"); unchecked { _balances[id][from] = fromBalance - amount; } _balances[id][to] += amount; emit TransferSingle(operator, from, to, id, amount); _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}. * * Emits a {TransferBatch} event. * * Requirements: * * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function _safeBatchTransferFrom( address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual { require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); require(to != address(0), "ERC1155: transfer to the zero address"); address operator = _msgSender(); _beforeTokenTransfer(operator, from, to, ids, amounts, data); for (uint256 i = 0; i < ids.length; ++i) { uint256 id = ids[i]; uint256 amount = amounts[i]; uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: insufficient balance for transfer"); unchecked { _balances[id][from] = fromBalance - amount; } _balances[id][to] += amount; } emit TransferBatch(operator, from, to, ids, amounts); _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data); } /** * @dev Sets a new URI for all token types, by relying on the token type ID * substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * By this mechanism, any occurrence of the `\{id\}` substring in either the * URI or any of the amounts in the JSON file at said URI will be replaced by * clients with the token type ID. * * For example, the `https://token-cdn-domain/\{id\}.json` URI would be * interpreted by clients as * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json` * for token type ID 0x4cce0. * * See {uri}. * * Because these URIs cannot be meaningfully represented by the {URI} event, * this function emits no events. */ function _setURI(string memory newuri) internal virtual { _uri = newuri; } /** * @dev Creates `amount` tokens of token type `id`, and assigns them to `account`. * * Emits a {TransferSingle} event. * * Requirements: * * - `account` cannot be the zero address. * - If `account` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _mint( address account, uint256 id, uint256 amount, bytes memory data ) internal virtual { require(account != address(0), "ERC1155: mint to the zero address"); address operator = _msgSender(); _beforeTokenTransfer(operator, address(0), account, _asSingletonArray(id), _asSingletonArray(amount), data); _balances[id][account] += amount; emit TransferSingle(operator, address(0), account, id, amount); _doSafeTransferAcceptanceCheck(operator, address(0), account, id, amount, data); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}. * * Requirements: * * - `ids` and `amounts` must have the same length. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function _mintBatch( address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual { require(to != address(0), "ERC1155: mint to the zero address"); require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); address operator = _msgSender(); _beforeTokenTransfer(operator, address(0), to, ids, amounts, data); for (uint256 i = 0; i < ids.length; i++) { _balances[ids[i]][to] += amounts[i]; } emit TransferBatch(operator, address(0), to, ids, amounts); _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data); } /** * @dev Destroys `amount` tokens of token type `id` from `account` * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens of token type `id`. */ function _burn( address account, uint256 id, uint256 amount ) internal virtual { require(account != address(0), "ERC1155: burn from the zero address"); address operator = _msgSender(); _beforeTokenTransfer(operator, account, address(0), _asSingletonArray(id), _asSingletonArray(amount), ""); uint256 accountBalance = _balances[id][account]; require(accountBalance >= amount, "ERC1155: burn amount exceeds balance"); unchecked { _balances[id][account] = accountBalance - amount; } emit TransferSingle(operator, account, address(0), id, amount); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}. * * Requirements: * * - `ids` and `amounts` must have the same length. */ function _burnBatch( address account, uint256[] memory ids, uint256[] memory amounts ) internal virtual { require(account != address(0), "ERC1155: burn from the zero address"); require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); address operator = _msgSender(); _beforeTokenTransfer(operator, account, address(0), ids, amounts, ""); for (uint256 i = 0; i < ids.length; i++) { uint256 id = ids[i]; uint256 amount = amounts[i]; uint256 accountBalance = _balances[id][account]; require(accountBalance >= amount, "ERC1155: burn amount exceeds balance"); unchecked { _balances[id][account] = accountBalance - amount; } } emit TransferBatch(operator, account, address(0), ids, amounts); } /** * @dev Hook that is called before any token transfer. This includes minting * and burning, as well as batched variants. * * The same hook is called on both single and batched variants. For single * transfers, the length of the `id` and `amount` arrays will be 1. * * Calling conditions (for each `id` and `amount` pair): * * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens * of token type `id` will be transferred to `to`. * - When `from` is zero, `amount` tokens of token type `id` will be minted * for `to`. * - when `to` is zero, `amount` of ``from``'s tokens of token type `id` * will be burned. * - `from` and `to` are never both zero. * - `ids` and `amounts` have the same, non-zero length. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual {} function _doSafeTransferAcceptanceCheck( address operator, address from, address to, uint256 id, uint256 amount, bytes memory data ) private { if (to.isContract()) { try IERC1155ReceiverUpgradeable(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) { if (response != IERC1155ReceiverUpgradeable(to).onERC1155Received.selector) { revert("ERC1155: ERC1155Receiver rejected tokens"); } } catch Error(string memory reason) { revert(reason); } catch { revert("ERC1155: transfer to non ERC1155Receiver implementer"); } } } function _doSafeBatchTransferAcceptanceCheck( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) private { if (to.isContract()) { try IERC1155ReceiverUpgradeable(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns ( bytes4 response ) { if (response != IERC1155ReceiverUpgradeable(to).onERC1155BatchReceived.selector) { revert("ERC1155: ERC1155Receiver rejected tokens"); } } catch Error(string memory reason) { revert(reason); } catch { revert("ERC1155: transfer to non ERC1155Receiver implementer"); } } } function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) { uint256[] memory array = new uint256[](1); array[0] = element; return array; } uint256[47] private __gap; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library ECDSA { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS, InvalidSignatureV } function _throwError(RecoverError error) private pure { if (error == RecoverError.NoError) { return; // no error: do nothing } else if (error == RecoverError.InvalidSignature) { revert("ECDSA: invalid signature"); } else if (error == RecoverError.InvalidSignatureLength) { revert("ECDSA: invalid signature length"); } else if (error == RecoverError.InvalidSignatureS) { revert("ECDSA: invalid signature 's' value"); } else if (error == RecoverError.InvalidSignatureV) { revert("ECDSA: invalid signature 'v' value"); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature` or error string. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. * * Documentation for signature generation: * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] * * _Available since v4.3._ */ function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) { // Check the signature length // - case 65: r,s,v signature (standard) // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._ if (signature.length == 65) { bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } return tryRecover(hash, v, r, s); } else if (signature.length == 64) { bytes32 r; bytes32 vs; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) vs := mload(add(signature, 0x40)) } return tryRecover(hash, r, vs); } else { return (address(0), RecoverError.InvalidSignatureLength); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, signature); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. * * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures] * * _Available since v4.3._ */ function tryRecover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address, RecoverError) { bytes32 s; uint8 v; assembly { s := and(vs, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff) v := add(shr(255, vs), 27) } return tryRecover(hash, v, r, s); } /** * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately. * * _Available since v4.2._ */ function recover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, r, vs); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `v`, * `r` and `s` signature fields separately. * * _Available since v4.3._ */ function tryRecover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address, RecoverError) { // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { return (address(0), RecoverError.InvalidSignatureS); } if (v != 27 && v != 28) { return (address(0), RecoverError.InvalidSignatureV); } // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(hash, v, r, s); if (signer == address(0)) { return (address(0), RecoverError.InvalidSignature); } return (signer, RecoverError.NoError); } /** * @dev Overload of {ECDSA-recover} that receives the `v`, * `r` and `s` signature fields separately. */ function recover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, v, r, s); _throwError(error); return recovered; } /** * @dev Returns an Ethereum Signed Message, created from a `hash`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) { // 32 is the length in bytes of hash, // enforced by the type signature above return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)); } /** * @dev Returns an Ethereum Signed Typed Data, created from a * `domainSeparator` and a `structHash`. This produces hash corresponding * to the one signed with the * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] * JSON-RPC method as part of EIP-712. * * See {recover}. */ function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash)); } }
// SPDX-License-Identifier: Unlicensed pragma solidity ^0.8.4; import "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; contract RoyalPausableUpgradeable is PausableUpgradeable, OwnableUpgradeable { function __RoyalPausableUpgradeable_init() internal initializer { __RoyalPausableUpgradeable_init_unchained(); } function __RoyalPausableUpgradeable_init_unchained() internal initializer { __Pausable_init(); __Ownable_init(); } function pause() public virtual whenNotPaused onlyOwner { super._pause(); } function unpause() public virtual whenPaused onlyOwner { super._unpause(); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../../utils/introspection/IERC165Upgradeable.sol"; /** * @dev Required interface of an ERC1155 compliant contract, as defined in the * https://eips.ethereum.org/EIPS/eip-1155[EIP]. * * _Available since v3.1._ */ interface IERC1155Upgradeable is IERC165Upgradeable { /** * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`. */ event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value); /** * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all * transfers. */ event TransferBatch( address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] values ); /** * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to * `approved`. */ event ApprovalForAll(address indexed account, address indexed operator, bool approved); /** * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI. * * If an {URI} event was emitted for `id`, the standard * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value * returned by {IERC1155MetadataURI-uri}. */ event URI(string value, uint256 indexed id); /** * @dev Returns the amount of tokens of token type `id` owned by `account`. * * Requirements: * * - `account` cannot be the zero address. */ function balanceOf(address account, uint256 id) external view returns (uint256); /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}. * * Requirements: * * - `accounts` and `ids` must have the same length. */ function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids) external view returns (uint256[] memory); /** * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`, * * Emits an {ApprovalForAll} event. * * Requirements: * * - `operator` cannot be the caller. */ function setApprovalForAll(address operator, bool approved) external; /** * @dev Returns true if `operator` is approved to transfer ``account``'s tokens. * * See {setApprovalForAll}. */ function isApprovedForAll(address account, address operator) external view returns (bool); /** * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - If the caller is not `from`, it must be have been approved to spend ``from``'s tokens via {setApprovalForAll}. * - `from` must have a balance of tokens of type `id` of at least `amount`. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes calldata data ) external; /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}. * * Emits a {TransferBatch} event. * * Requirements: * * - `ids` and `amounts` must have the same length. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function safeBatchTransferFrom( address from, address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165Upgradeable { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../../utils/introspection/IERC165Upgradeable.sol"; /** * @dev _Available since v3.1._ */ interface IERC1155ReceiverUpgradeable is IERC165Upgradeable { /** @dev Handles the receipt of a single ERC1155 token type. This function is called at the end of a `safeTransferFrom` after the balance has been updated. To accept the transfer, this must return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` (i.e. 0xf23a6e61, or its own function selector). @param operator The address which initiated the transfer (i.e. msg.sender) @param from The address which previously owned the token @param id The ID of the token being transferred @param value The amount of tokens being transferred @param data Additional data with no specified format @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed */ function onERC1155Received( address operator, address from, uint256 id, uint256 value, bytes calldata data ) external returns (bytes4); /** @dev Handles the receipt of a multiple ERC1155 token types. This function is called at the end of a `safeBatchTransferFrom` after the balances have been updated. To accept the transfer(s), this must return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` (i.e. 0xbc197c81, or its own function selector). @param operator The address which initiated the batch transfer (i.e. msg.sender) @param from The address which previously owned the token @param ids An array containing ids of each token being transferred (order and length must match values array) @param values An array containing amounts of each token being transferred (order and length must match ids array) @param data Additional data with no specified format @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed */ function onERC1155BatchReceived( address operator, address from, uint256[] calldata ids, uint256[] calldata values, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Collection of functions related to the address type */ library AddressUpgradeable { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return _verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return _verifyCallResult(success, returndata, errorMessage); } function _verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) private pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../proxy/utils/Initializable.sol"; /* * @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 ContextUpgradeable is Initializable { function __Context_init() internal initializer { __Context_init_unchained(); } function __Context_init_unchained() internal initializer { } function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } uint256[50] private __gap; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IERC165Upgradeable.sol"; import "../../proxy/utils/Initializable.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165Upgradeable is Initializable, IERC165Upgradeable { function __ERC165_init() internal initializer { __ERC165_init_unchained(); } function __ERC165_init_unchained() internal initializer { } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165Upgradeable).interfaceId; } uint256[50] private __gap; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. */ bool private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Modifier to protect an initializer function from being invoked twice. */ modifier initializer() { require(_initializing || !_initialized, "Initializable: contract is already initialized"); bool isTopLevelCall = !_initializing; if (isTopLevelCall) { _initializing = true; _initialized = true; } _; if (isTopLevelCall) { _initializing = false; } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../utils/ContextUpgradeable.sol"; import "../proxy/utils/Initializable.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract PausableUpgradeable is Initializable, ContextUpgradeable { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ function __Pausable_init() internal initializer { __Context_init_unchained(); __Pausable_init_unchained(); } function __Pausable_init_unchained() internal initializer { _paused = false; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { require(!paused(), "Pausable: paused"); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { require(paused(), "Pausable: not paused"); _; } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } uint256[49] private __gap; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../utils/ContextUpgradeable.sol"; import "../proxy/utils/Initializable.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 OwnableUpgradeable is Initializable, ContextUpgradeable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ function __Ownable_init() internal initializer { __Context_init_unchained(); __Ownable_init_unchained(); } function __Ownable_init_unchained() internal initializer { _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); } uint256[49] private __gap; }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint128","name":"tierID","type":"uint128"}],"name":"NewTier","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint128","name":"tierID","type":"uint128"}],"name":"TierExhausted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"TransferBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"TransferSingle","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"value","type":"string"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"URI","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"balanceOfBatch","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint128","name":"tierID","type":"uint128"},{"internalType":"uint256","name":"maxSupply","type":"uint256"}],"name":"createTier","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"ldaID","type":"uint256"}],"name":"exists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"ldaID","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"mintLDAToOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint128","name":"tierID","type":"uint128"}],"name":"mintable","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"ldaID","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeBatchTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"signedSongHash","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"signer","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"songHash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint128","name":"tierID","type":"uint128"}],"name":"tierExists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newURI","type":"string"}],"name":"updateContractMetadataURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newURI","type":"string"}],"name":"updateTokenURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"_signedSongHash","type":"bytes"}],"name":"verifySignature","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b506131cb806100206000396000f3fe608060405234801561001057600080fd5b50600436106101c35760003560e01c8063715018a6116100f9578063cbe2803811610097578063e985e9c511610071578063e985e9c5146103e7578063f242432a14610423578063f2fde38b14610436578063f80af9841461044957600080fd5b8063cbe28038146103b9578063d6e83cda146103cc578063e8a3d485146103df57600080fd5b80638da5cb5b116100d35780638da5cb5b1461035b57806398cd61531461036c578063a22cb4651461037f578063b7b657f81461039257600080fd5b8063715018a6146103435780638129fc1c1461034b5780638456cb591461035357600080fd5b806343e90222116101665780634f558e79116101405780634f558e79146102f25780635c975abb1461031d57806360911fe3146103285780636352211e1461033057600080fd5b806343e90222146102945780634e1273f4146102a75780634e37992c146102c757600080fd5b80631f638264116101a25780631f63826414610231578063238ac933146102465780632eb2c2d6146102795780633f4ba83a1461028c57600080fd5b8062fdd58e146101c857806301ffc9a7146101ee5780630e89341c14610211575b600080fd5b6101db6101d636600461291d565b61045c565b6040519081526020015b60405180910390f35b6102016101fc366004612a83565b6104f5565b60405190151581526020016101e5565b61022461021f366004612bae565b610547565b6040516101e59190612d2f565b61024461023f366004612b93565b6105db565b005b61026173d2aff66959ee0e6f92ee02d741071ddb5084bebb81565b6040516001600160a01b0390911681526020016101e5565b6102446102873660046127e0565b6107df565b610244610876565b6102016102a2366004612b79565b6108f3565b6102ba6102b536600461299d565b610996565b6040516101e59190612cee565b6102016102d5366004612b79565b6001600160801b0316600090815260fc6020526040902054151590565b610201610300366004612bae565b600090815260fe60205260409020546001600160a01b0316151590565b60975460ff16610201565b610224610af7565b61026161033e366004612bae565b610b13565b610244610b7d565b610244610bb1565b610244610c74565b60c9546001600160a01b0316610261565b61024461037a366004612af5565b610cec565b61024461038d3660046128e7565b610d59565b6101db7f5acbdb71da23246df6fd982a85644e58b753f822dce6168547baa5e0edb7489981565b6102446103c7366004612946565b610e30565b6102446103da366004612b34565b611053565b610224611090565b6102016103f53660046127ae565b6001600160a01b03918216600090815260666020908152604080832093909416825291909152205460ff1690565b610244610431366004612885565b611122565b610244610444366004612794565b6111a9565b610201610457366004612abb565b611241565b60006001600160a01b0383166104cd5760405162461bcd60e51b815260206004820152602b60248201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60448201526a65726f206164647265737360a81b60648201526084015b60405180910390fd5b5060009081526065602090815260408083206001600160a01b03949094168352929052205490565b60006001600160e01b03198216636cdb3d1360e11b148061052657506001600160e01b031982166303a24d0760e21b145b8061054157506301ffc9a760e01b6001600160e01b03198316145b92915050565b60606067805461055690612eee565b80601f016020809104026020016040519081016040528092919081815260200182805461058290612eee565b80156105cf5780601f106105a4576101008083540402835291602001916105cf565b820191906000526020600020905b8154815290600101906020018083116105b257829003601f168201915b50505050509050919050565b60c9546001600160a01b031633146106055760405162461bcd60e51b81526004016104c490612e67565b60405163138de64b60e21b81526001600160801b03831660048201523090634e37992c9060240160206040518083038186803b15801561064457600080fd5b505afa158015610658573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061067c9190612a67565b156106bf5760405162461bcd60e51b81526020600482015260136024820152725469657220616c72656164792065786973747360681b60448201526064016104c4565b6001600160801b038216158015906106d8575060018110155b6107245760405162461bcd60e51b815260206004820152601760248201527f496e76616c6964207469657220646566696e6974696f6e00000000000000000060448201526064016104c4565b6001600160801b038216600090815260fd602052604090205415801561076057506001600160801b038216600090815260fc6020526040902054155b61079a5760405162461bcd60e51b815260206004820152600b60248201526a546965722065786973747360a81b60448201526064016104c4565b6001600160801b038216600081815260fc6020526040808220849055517fe8927b4ed32eff21d9c6202e2424b13b064e4d0b13954aae9cfe2ac1ce55fb7e9190a25050565b6001600160a01b0385163314806107fb57506107fb85336103f5565b6108625760405162461bcd60e51b815260206004820152603260248201527f455243313135353a207472616e736665722063616c6c6572206973206e6f74206044820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b60648201526084016104c4565b61086f85858585856112f0565b5050505050565b60975460ff166108bf5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016104c4565b60c9546001600160a01b031633146108e95760405162461bcd60e51b81526004016104c490612e67565b6108f16114fa565b565b6001600160801b038116600090815260fc602090815260408083205460fd909252822054108015610541575060405163138de64b60e21b81526001600160801b03831660048201523090634e37992c9060240160206040518083038186803b15801561095e57600080fd5b505afa158015610972573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105419190612a67565b606081518351146109fb5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b60648201526084016104c4565b600083516001600160401b03811115610a2457634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015610a4d578160200160208202803683370190505b50905060005b8451811015610aef57610ab4858281518110610a7f57634e487b7160e01b600052603260045260246000fd5b6020026020010151858381518110610aa757634e487b7160e01b600052603260045260246000fd5b602002602001015161045c565b828281518110610ad457634e487b7160e01b600052603260045260246000fd5b6020908102919091010152610ae881612f55565b9050610a53565b509392505050565b6040518060c00160405280608481526020016130626084913981565b600081815260fe60205260408120546001600160a01b0316610b615760405162461bcd60e51b81526020600482015260076024820152664c444120444e4560c81b60448201526064016104c4565b50600090815260fe60205260409020546001600160a01b031690565b60c9546001600160a01b03163314610ba75760405162461bcd60e51b81526004016104c490612e67565b6108f1600061158d565b600054610100900460ff1680610bca575060005460ff16155b610be65760405162461bcd60e51b81526004016104c490612dcf565b600054610100900460ff16158015610c08576000805461ffff19166101011790555b610c106115df565b610c316040518060800160405280605d8152602001613139605d9139611652565b6040518060800160405280605381526020016130e6605391398051610c5e9160fb91602090910190612592565b508015610c71576000805461ff00191690555b50565b60975460ff1615610cba5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016104c4565b60c9546001600160a01b03163314610ce45760405162461bcd60e51b81526004016104c490612e67565b6108f16116d7565b60c9546001600160a01b03163314610d165760405162461bcd60e51b81526004016104c490612e67565b610d5582828080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061175292505050565b5050565b336001600160a01b0383161415610dc45760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b60648201526084016104c4565b3360008181526066602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b60c9546001600160a01b03163314610e5a5760405162461bcd60e51b81526004016104c490612e67565b600083815260fe60205260409020546001600160a01b031615610eb45760405162461bcd60e51b815260206004820152601260248201527113111048185b1c9958591e481b5a5b9d195960721b60448201526064016104c4565b6000610ebf84611765565b506040516321f4811160e11b81526001600160801b038216600482015290915030906343e902229060240160206040518083038186803b158015610f0257600080fd5b505afa158015610f16573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f3a9190612a67565b610f7a5760405162461bcd60e51b815260206004820152601160248201527054696572206e6f74206d696e7461626c6560781b60448201526064016104c4565b6001600160801b038116600090815260fd60205260408120805460019290610fa3908490612ebf565b92505081905550610fed8585600186868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506117cb92505050565b6001600160801b038116600090815260fc602090815260408083205460fd90925290912054141561086f576040516001600160801b038216907fc3455c9935b88f8b4decb7635ed38b7301527c1f726a1ecfc9221b7fa9a7953790600090a25050505050565b60c9546001600160a01b0316331461107d5760405162461bcd60e51b81526004016104c490612e67565b8051610d559060fb906020840190612592565b606060fb805461109f90612eee565b80601f01602080910402602001604051908101604052809291908181526020018280546110cb90612eee565b80156111185780601f106110ed57610100808354040283529160200191611118565b820191906000526020600020905b8154815290600101906020018083116110fb57829003601f168201915b5050505050905090565b6001600160a01b03851633148061113e575061113e85336103f5565b61119c5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260448201526808185c1c1c9bdd995960ba1b60648201526084016104c4565b61086f85858585856118dd565b60c9546001600160a01b031633146111d35760405162461bcd60e51b81526004016104c490612e67565b6001600160a01b0381166112385760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016104c4565b610c718161158d565b6000806112bb7f5acbdb71da23246df6fd982a85644e58b753f822dce6168547baa5e0edb748996040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b905060006112c982856119fe565b6001600160a01b031673d2aff66959ee0e6f92ee02d741071ddb5084bebb14949350505050565b81518351146113525760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206044820152670dad2e6dac2e8c6d60c31b60648201526084016104c4565b6001600160a01b0384166113785760405162461bcd60e51b81526004016104c490612d8a565b33611387818787878787611a1a565b60005b845181101561148c5760008582815181106113b557634e487b7160e01b600052603260045260246000fd5b6020026020010151905060008583815181106113e157634e487b7160e01b600052603260045260246000fd5b60209081029190910181015160008481526065835260408082206001600160a01b038e1683529093529190912054909150818110156114325760405162461bcd60e51b81526004016104c490612e1d565b60008381526065602090815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290611471908490612ebf565b925050819055505050508061148590612f55565b905061138a565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb87876040516114dc929190612d01565b60405180910390a46114f2818787878787611bc9565b505050505050565b60975460ff166115435760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016104c4565b6097805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b60c980546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff16806115f8575060005460ff16155b6116145760405162461bcd60e51b81526004016104c490612dcf565b600054610100900460ff16158015611636576000805461ffff19166101011790555b61163e611d34565b8015610c71576000805461ff001916905550565b600054610100900460ff168061166b575060005460ff16155b6116875760405162461bcd60e51b81526004016104c490612dcf565b600054610100900460ff161580156116a9576000805461ffff19166101011790555b6116b1611d9b565b6116b9611d9b565b6116c282611e05565b8015610d55576000805461ff00191690555050565b60975460ff161561171d5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016104c4565b6097805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586115703390565b8051610d55906067906020840190612592565b608081901c6001600160801b0382168115158061178a57506001600160801b03811615155b6117c65760405162461bcd60e51b815260206004820152600d60248201526c125b9d985b1a59081b19185251609a1b60448201526064016104c4565b915091565b6001600160a01b03841661182b5760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b60648201526084016104c4565b3361184b8160008761183c88611e65565b61184588611e65565b87611a1a565b60008481526065602090815260408083206001600160a01b03891684529091528120805485929061187d908490612ebf565b909155505060408051858152602081018590526001600160a01b0380881692600092918516917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a461086f81600087878787611ebe565b6001600160a01b0384166119035760405162461bcd60e51b81526004016104c490612d8a565b3361191381878761183c88611e65565b60008481526065602090815260408083206001600160a01b038a168452909152902054838110156119565760405162461bcd60e51b81526004016104c490612e1d565b60008581526065602090815260408083206001600160a01b038b8116855292528083208785039055908816825281208054869290611995908490612ebf565b909155505060408051868152602081018690526001600160a01b03808916928a821692918616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46119f5828888888888611ebe565b50505050505050565b6000806000611a0d8585611f88565b91509150610aef81611ff8565b60005b83518110156119f5576000611a58858381518110611a4b57634e487b7160e01b600052603260045260246000fd5b6020026020010151611765565b5090506001600160a01b038716611afd57611af886868481518110611a8d57634e487b7160e01b600052603260045260246000fd5b6020026020010151836001600160801b0316600090815260fd602090815260408083205460ff8352818420818552835281842085905593835261010082528083209390935560fe90522080546001600160a01b039092166001600160a01b0319909216919091179055565b611b76565b856001600160a01b0316876001600160a01b031614611b76578560fe6000878581518110611b3b57634e487b7160e01b600052603260045260246000fd5b6020026020010151815260200190815260200160002060006101000a8154816001600160a01b0302191690836001600160a01b031602179055505b6001600160a01b038616611bb657611bb687868481518110611ba857634e487b7160e01b600052603260045260246000fd5b6020026020010151836121f9565b5080611bc181612f55565b915050611a1d565b6001600160a01b0384163b156114f25760405163bc197c8160e01b81526001600160a01b0385169063bc197c8190611c0d9089908990889088908890600401612c4b565b602060405180830381600087803b158015611c2757600080fd5b505af1925050508015611c57575060408051601f3d908101601f19168201909252611c5491810190612a9f565b60015b611d0457611c63612f9c565b806308c379a01415611c9d5750611c78612fb4565b80611c835750611c9f565b8060405162461bcd60e51b81526004016104c49190612d2f565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b60648201526084016104c4565b6001600160e01b0319811663bc197c8160e01b146119f55760405162461bcd60e51b81526004016104c490612d42565b600054610100900460ff1680611d4d575060005460ff16155b611d695760405162461bcd60e51b81526004016104c490612dcf565b600054610100900460ff16158015611d8b576000805461ffff19166101011790555b611d936122d3565b61163e61233a565b600054610100900460ff1680611db4575060005460ff16155b611dd05760405162461bcd60e51b81526004016104c490612dcf565b600054610100900460ff1615801561163e576000805461ffff19166101011790558015610c71576000805461ff001916905550565b600054610100900460ff1680611e1e575060005460ff16155b611e3a5760405162461bcd60e51b81526004016104c490612dcf565b600054610100900460ff16158015611e5c576000805461ffff19166101011790555b6116c282611752565b60408051600180825281830190925260609160009190602080830190803683370190505090508281600081518110611ead57634e487b7160e01b600052603260045260246000fd5b602090810291909101015292915050565b6001600160a01b0384163b156114f25760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e6190611f029089908990889088908890600401612ca9565b602060405180830381600087803b158015611f1c57600080fd5b505af1925050508015611f4c575060408051601f3d908101601f19168201909252611f4991810190612a9f565b60015b611f5857611c63612f9c565b6001600160e01b0319811663f23a6e6160e01b146119f55760405162461bcd60e51b81526004016104c490612d42565b600080825160411415611fbf5760208301516040840151606085015160001a611fb3878285856123a1565b94509450505050611ff1565b825160401415611fe95760208301516040840151611fde86838361248e565b935093505050611ff1565b506000905060025b9250929050565b600081600481111561201a57634e487b7160e01b600052602160045260246000fd5b14156120235750565b600181600481111561204557634e487b7160e01b600052602160045260246000fd5b14156120935760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016104c4565b60028160048111156120b557634e487b7160e01b600052602160045260246000fd5b14156121035760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016104c4565b600381600481111561212557634e487b7160e01b600052602160045260246000fd5b141561217e5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016104c4565b60048160048111156121a057634e487b7160e01b600052602160045260246000fd5b1415610c715760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b60648201526084016104c4565b6001600160801b038116600090815260fd602052604081205461221e90600190612ed7565b60008481526101006020526040902054909150808214612273576001600160801b038316600090815260ff60209081526040808320858452825280832054848452818420819055835261010090915290208190555b506000838152610100602090815260408083208390556001600160801b03909416825260ff815283822092825291825282812081905592835260fe9052902080546001600160a01b039092166001600160a01b0319909216919091179055565b600054610100900460ff16806122ec575060005460ff16155b6123085760405162461bcd60e51b81526004016104c490612dcf565b600054610100900460ff1615801561232a576000805461ffff19166101011790555b612332611d9b565b61163e6124bd565b600054610100900460ff1680612353575060005460ff16155b61236f5760405162461bcd60e51b81526004016104c490612dcf565b600054610100900460ff16158015612391576000805461ffff19166101011790555b612399611d9b565b61163e612532565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156123d85750600090506003612485565b8460ff16601b141580156123f057508460ff16601c14155b156124015750600090506004612485565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612455573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661247e57600060019250925050612485565b9150600090505b94509492505050565b6000806001600160ff1b03831660ff84901c601b016124af878288856123a1565b935093505050935093915050565b600054610100900460ff16806124d6575060005460ff16155b6124f25760405162461bcd60e51b81526004016104c490612dcf565b600054610100900460ff16158015612514576000805461ffff19166101011790555b6097805460ff191690558015610c71576000805461ff001916905550565b600054610100900460ff168061254b575060005460ff16155b6125675760405162461bcd60e51b81526004016104c490612dcf565b600054610100900460ff16158015612589576000805461ffff19166101011790555b61163e3361158d565b82805461259e90612eee565b90600052602060002090601f0160209004810192826125c05760008555612606565b82601f106125d957805160ff1916838001178555612606565b82800160010185558215612606579182015b828111156126065782518255916020019190600101906125eb565b50612612929150612616565b5090565b5b808211156126125760008155600101612617565b60006001600160401b0383111561264457612644612f86565b60405161265b601f8501601f191660200182612f29565b80915083815284848401111561267057600080fd5b83836020830137600060208583010152509392505050565b80356001600160a01b038116811461269f57600080fd5b919050565b600082601f8301126126b4578081fd5b813560206126c182612e9c565b6040516126ce8282612f29565b8381528281019150858301600585901b870184018810156126ed578586fd5b855b8581101561270b578135845292840192908401906001016126ef565b5090979650505050505050565b60008083601f840112612729578182fd5b5081356001600160401b0381111561273f578182fd5b602083019150836020828501011115611ff157600080fd5b600082601f830112612767578081fd5b6127768383356020850161262b565b9392505050565b80356001600160801b038116811461269f57600080fd5b6000602082840312156127a5578081fd5b61277682612688565b600080604083850312156127c0578081fd5b6127c983612688565b91506127d760208401612688565b90509250929050565b600080600080600060a086880312156127f7578081fd5b61280086612688565b945061280e60208701612688565b935060408601356001600160401b0380821115612829578283fd5b61283589838a016126a4565b9450606088013591508082111561284a578283fd5b61285689838a016126a4565b9350608088013591508082111561286b578283fd5b5061287888828901612757565b9150509295509295909350565b600080600080600060a0868803121561289c578081fd5b6128a586612688565b94506128b360208701612688565b9350604086013592506060860135915060808601356001600160401b038111156128db578182fd5b61287888828901612757565b600080604083850312156128f9578182fd5b61290283612688565b915060208301356129128161303d565b809150509250929050565b6000806040838503121561292f578182fd5b61293883612688565b946020939093013593505050565b6000806000806060858703121561295b578182fd5b61296485612688565b93506020850135925060408501356001600160401b03811115612985578283fd5b61299187828801612718565b95989497509550505050565b600080604083850312156129af578182fd5b82356001600160401b03808211156129c5578384fd5b818501915085601f8301126129d8578384fd5b813560206129e582612e9c565b6040516129f28282612f29565b8381528281019150858301600585901b870184018b1015612a11578889fd5b8896505b84871015612a3a57612a2681612688565b835260019690960195918301918301612a15565b5096505086013592505080821115612a50578283fd5b50612a5d858286016126a4565b9150509250929050565b600060208284031215612a78578081fd5b81516127768161303d565b600060208284031215612a94578081fd5b81356127768161304b565b600060208284031215612ab0578081fd5b81516127768161304b565b600060208284031215612acc578081fd5b81356001600160401b03811115612ae1578182fd5b612aed84828501612757565b949350505050565b60008060208385031215612b07578182fd5b82356001600160401b03811115612b1c578283fd5b612b2885828601612718565b90969095509350505050565b600060208284031215612b45578081fd5b81356001600160401b03811115612b5a578182fd5b8201601f81018413612b6a578182fd5b612aed8482356020840161262b565b600060208284031215612b8a578081fd5b6127768261277d565b60008060408385031215612ba5578182fd5b6129388361277d565b600060208284031215612bbf578081fd5b5035919050565b6000815180845260208085019450808401835b83811015612bf557815187529582019590820190600101612bd9565b509495945050505050565b60008151808452815b81811015612c2557602081850181015186830182015201612c09565b81811115612c365782602083870101525b50601f01601f19169290920160200192915050565b6001600160a01b0386811682528516602082015260a060408201819052600090612c7790830186612bc6565b8281036060840152612c898186612bc6565b90508281036080840152612c9d8185612c00565b98975050505050505050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a060808201819052600090612ce390830184612c00565b979650505050505050565b6020815260006127766020830184612bc6565b604081526000612d146040830185612bc6565b8281036020840152612d268185612bc6565b95945050505050565b6020815260006127766020830184612c00565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60006001600160401b03821115612eb557612eb5612f86565b5060051b60200190565b60008219821115612ed257612ed2612f70565b500190565b600082821015612ee957612ee9612f70565b500390565b600181811c90821680612f0257607f821691505b60208210811415612f2357634e487b7160e01b600052602260045260246000fd5b50919050565b601f8201601f191681016001600160401b0381118282101715612f4e57612f4e612f86565b6040525050565b6000600019821415612f6957612f69612f70565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b600060033d1115612fb157600481823e5160e01c5b90565b600060443d1015612fc25790565b6040516003193d81016004833e81513d6001600160401b038160248401118184111715612ff157505050505090565b82850191508151818111156130095750505050505090565b843d87010160208285010111156130235750505050505090565b61303260208286010187612f29565b509095945050505050565b8015158114610c7157600080fd5b6001600160e01b031981168114610c7157600080fdfe30783136323665623237333131313665323264393732346330616334383932316262353966376637343062666439336234366338636138383734383936663035316331383531376663346338663464636431613138333237346138393732383662636138323134633861633365313834393962353437313030616434663530613337316368747470733a2f2f726f79616c2d696f2e6d7970696e6174612e636c6f75642f697066732f516d5162794c5941646678444d324343673863693156726748544151447539427064704668335446554d7369784168747470733a2f2f726f79616c2d696f2e6d7970696e6174612e636c6f75642f697066732f516d537676635341706f7338775a6f5135615a564c324e533856714d5254723431336b64726163674d503165374e2f7b69647d2e6a736f6ea26469706673582212202246a8e9090ba2492a204a9a69c8f1d3705dceefc8d68543328a0cde9c558af464736f6c63430008040033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101c35760003560e01c8063715018a6116100f9578063cbe2803811610097578063e985e9c511610071578063e985e9c5146103e7578063f242432a14610423578063f2fde38b14610436578063f80af9841461044957600080fd5b8063cbe28038146103b9578063d6e83cda146103cc578063e8a3d485146103df57600080fd5b80638da5cb5b116100d35780638da5cb5b1461035b57806398cd61531461036c578063a22cb4651461037f578063b7b657f81461039257600080fd5b8063715018a6146103435780638129fc1c1461034b5780638456cb591461035357600080fd5b806343e90222116101665780634f558e79116101405780634f558e79146102f25780635c975abb1461031d57806360911fe3146103285780636352211e1461033057600080fd5b806343e90222146102945780634e1273f4146102a75780634e37992c146102c757600080fd5b80631f638264116101a25780631f63826414610231578063238ac933146102465780632eb2c2d6146102795780633f4ba83a1461028c57600080fd5b8062fdd58e146101c857806301ffc9a7146101ee5780630e89341c14610211575b600080fd5b6101db6101d636600461291d565b61045c565b6040519081526020015b60405180910390f35b6102016101fc366004612a83565b6104f5565b60405190151581526020016101e5565b61022461021f366004612bae565b610547565b6040516101e59190612d2f565b61024461023f366004612b93565b6105db565b005b61026173d2aff66959ee0e6f92ee02d741071ddb5084bebb81565b6040516001600160a01b0390911681526020016101e5565b6102446102873660046127e0565b6107df565b610244610876565b6102016102a2366004612b79565b6108f3565b6102ba6102b536600461299d565b610996565b6040516101e59190612cee565b6102016102d5366004612b79565b6001600160801b0316600090815260fc6020526040902054151590565b610201610300366004612bae565b600090815260fe60205260409020546001600160a01b0316151590565b60975460ff16610201565b610224610af7565b61026161033e366004612bae565b610b13565b610244610b7d565b610244610bb1565b610244610c74565b60c9546001600160a01b0316610261565b61024461037a366004612af5565b610cec565b61024461038d3660046128e7565b610d59565b6101db7f5acbdb71da23246df6fd982a85644e58b753f822dce6168547baa5e0edb7489981565b6102446103c7366004612946565b610e30565b6102446103da366004612b34565b611053565b610224611090565b6102016103f53660046127ae565b6001600160a01b03918216600090815260666020908152604080832093909416825291909152205460ff1690565b610244610431366004612885565b611122565b610244610444366004612794565b6111a9565b610201610457366004612abb565b611241565b60006001600160a01b0383166104cd5760405162461bcd60e51b815260206004820152602b60248201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60448201526a65726f206164647265737360a81b60648201526084015b60405180910390fd5b5060009081526065602090815260408083206001600160a01b03949094168352929052205490565b60006001600160e01b03198216636cdb3d1360e11b148061052657506001600160e01b031982166303a24d0760e21b145b8061054157506301ffc9a760e01b6001600160e01b03198316145b92915050565b60606067805461055690612eee565b80601f016020809104026020016040519081016040528092919081815260200182805461058290612eee565b80156105cf5780601f106105a4576101008083540402835291602001916105cf565b820191906000526020600020905b8154815290600101906020018083116105b257829003601f168201915b50505050509050919050565b60c9546001600160a01b031633146106055760405162461bcd60e51b81526004016104c490612e67565b60405163138de64b60e21b81526001600160801b03831660048201523090634e37992c9060240160206040518083038186803b15801561064457600080fd5b505afa158015610658573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061067c9190612a67565b156106bf5760405162461bcd60e51b81526020600482015260136024820152725469657220616c72656164792065786973747360681b60448201526064016104c4565b6001600160801b038216158015906106d8575060018110155b6107245760405162461bcd60e51b815260206004820152601760248201527f496e76616c6964207469657220646566696e6974696f6e00000000000000000060448201526064016104c4565b6001600160801b038216600090815260fd602052604090205415801561076057506001600160801b038216600090815260fc6020526040902054155b61079a5760405162461bcd60e51b815260206004820152600b60248201526a546965722065786973747360a81b60448201526064016104c4565b6001600160801b038216600081815260fc6020526040808220849055517fe8927b4ed32eff21d9c6202e2424b13b064e4d0b13954aae9cfe2ac1ce55fb7e9190a25050565b6001600160a01b0385163314806107fb57506107fb85336103f5565b6108625760405162461bcd60e51b815260206004820152603260248201527f455243313135353a207472616e736665722063616c6c6572206973206e6f74206044820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b60648201526084016104c4565b61086f85858585856112f0565b5050505050565b60975460ff166108bf5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016104c4565b60c9546001600160a01b031633146108e95760405162461bcd60e51b81526004016104c490612e67565b6108f16114fa565b565b6001600160801b038116600090815260fc602090815260408083205460fd909252822054108015610541575060405163138de64b60e21b81526001600160801b03831660048201523090634e37992c9060240160206040518083038186803b15801561095e57600080fd5b505afa158015610972573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105419190612a67565b606081518351146109fb5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b60648201526084016104c4565b600083516001600160401b03811115610a2457634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015610a4d578160200160208202803683370190505b50905060005b8451811015610aef57610ab4858281518110610a7f57634e487b7160e01b600052603260045260246000fd5b6020026020010151858381518110610aa757634e487b7160e01b600052603260045260246000fd5b602002602001015161045c565b828281518110610ad457634e487b7160e01b600052603260045260246000fd5b6020908102919091010152610ae881612f55565b9050610a53565b509392505050565b6040518060c00160405280608481526020016130626084913981565b600081815260fe60205260408120546001600160a01b0316610b615760405162461bcd60e51b81526020600482015260076024820152664c444120444e4560c81b60448201526064016104c4565b50600090815260fe60205260409020546001600160a01b031690565b60c9546001600160a01b03163314610ba75760405162461bcd60e51b81526004016104c490612e67565b6108f1600061158d565b600054610100900460ff1680610bca575060005460ff16155b610be65760405162461bcd60e51b81526004016104c490612dcf565b600054610100900460ff16158015610c08576000805461ffff19166101011790555b610c106115df565b610c316040518060800160405280605d8152602001613139605d9139611652565b6040518060800160405280605381526020016130e6605391398051610c5e9160fb91602090910190612592565b508015610c71576000805461ff00191690555b50565b60975460ff1615610cba5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016104c4565b60c9546001600160a01b03163314610ce45760405162461bcd60e51b81526004016104c490612e67565b6108f16116d7565b60c9546001600160a01b03163314610d165760405162461bcd60e51b81526004016104c490612e67565b610d5582828080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061175292505050565b5050565b336001600160a01b0383161415610dc45760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b60648201526084016104c4565b3360008181526066602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b60c9546001600160a01b03163314610e5a5760405162461bcd60e51b81526004016104c490612e67565b600083815260fe60205260409020546001600160a01b031615610eb45760405162461bcd60e51b815260206004820152601260248201527113111048185b1c9958591e481b5a5b9d195960721b60448201526064016104c4565b6000610ebf84611765565b506040516321f4811160e11b81526001600160801b038216600482015290915030906343e902229060240160206040518083038186803b158015610f0257600080fd5b505afa158015610f16573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f3a9190612a67565b610f7a5760405162461bcd60e51b815260206004820152601160248201527054696572206e6f74206d696e7461626c6560781b60448201526064016104c4565b6001600160801b038116600090815260fd60205260408120805460019290610fa3908490612ebf565b92505081905550610fed8585600186868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506117cb92505050565b6001600160801b038116600090815260fc602090815260408083205460fd90925290912054141561086f576040516001600160801b038216907fc3455c9935b88f8b4decb7635ed38b7301527c1f726a1ecfc9221b7fa9a7953790600090a25050505050565b60c9546001600160a01b0316331461107d5760405162461bcd60e51b81526004016104c490612e67565b8051610d559060fb906020840190612592565b606060fb805461109f90612eee565b80601f01602080910402602001604051908101604052809291908181526020018280546110cb90612eee565b80156111185780601f106110ed57610100808354040283529160200191611118565b820191906000526020600020905b8154815290600101906020018083116110fb57829003601f168201915b5050505050905090565b6001600160a01b03851633148061113e575061113e85336103f5565b61119c5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260448201526808185c1c1c9bdd995960ba1b60648201526084016104c4565b61086f85858585856118dd565b60c9546001600160a01b031633146111d35760405162461bcd60e51b81526004016104c490612e67565b6001600160a01b0381166112385760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016104c4565b610c718161158d565b6000806112bb7f5acbdb71da23246df6fd982a85644e58b753f822dce6168547baa5e0edb748996040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b905060006112c982856119fe565b6001600160a01b031673d2aff66959ee0e6f92ee02d741071ddb5084bebb14949350505050565b81518351146113525760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206044820152670dad2e6dac2e8c6d60c31b60648201526084016104c4565b6001600160a01b0384166113785760405162461bcd60e51b81526004016104c490612d8a565b33611387818787878787611a1a565b60005b845181101561148c5760008582815181106113b557634e487b7160e01b600052603260045260246000fd5b6020026020010151905060008583815181106113e157634e487b7160e01b600052603260045260246000fd5b60209081029190910181015160008481526065835260408082206001600160a01b038e1683529093529190912054909150818110156114325760405162461bcd60e51b81526004016104c490612e1d565b60008381526065602090815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290611471908490612ebf565b925050819055505050508061148590612f55565b905061138a565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb87876040516114dc929190612d01565b60405180910390a46114f2818787878787611bc9565b505050505050565b60975460ff166115435760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016104c4565b6097805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b60c980546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff16806115f8575060005460ff16155b6116145760405162461bcd60e51b81526004016104c490612dcf565b600054610100900460ff16158015611636576000805461ffff19166101011790555b61163e611d34565b8015610c71576000805461ff001916905550565b600054610100900460ff168061166b575060005460ff16155b6116875760405162461bcd60e51b81526004016104c490612dcf565b600054610100900460ff161580156116a9576000805461ffff19166101011790555b6116b1611d9b565b6116b9611d9b565b6116c282611e05565b8015610d55576000805461ff00191690555050565b60975460ff161561171d5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016104c4565b6097805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586115703390565b8051610d55906067906020840190612592565b608081901c6001600160801b0382168115158061178a57506001600160801b03811615155b6117c65760405162461bcd60e51b815260206004820152600d60248201526c125b9d985b1a59081b19185251609a1b60448201526064016104c4565b915091565b6001600160a01b03841661182b5760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b60648201526084016104c4565b3361184b8160008761183c88611e65565b61184588611e65565b87611a1a565b60008481526065602090815260408083206001600160a01b03891684529091528120805485929061187d908490612ebf565b909155505060408051858152602081018590526001600160a01b0380881692600092918516917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a461086f81600087878787611ebe565b6001600160a01b0384166119035760405162461bcd60e51b81526004016104c490612d8a565b3361191381878761183c88611e65565b60008481526065602090815260408083206001600160a01b038a168452909152902054838110156119565760405162461bcd60e51b81526004016104c490612e1d565b60008581526065602090815260408083206001600160a01b038b8116855292528083208785039055908816825281208054869290611995908490612ebf565b909155505060408051868152602081018690526001600160a01b03808916928a821692918616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46119f5828888888888611ebe565b50505050505050565b6000806000611a0d8585611f88565b91509150610aef81611ff8565b60005b83518110156119f5576000611a58858381518110611a4b57634e487b7160e01b600052603260045260246000fd5b6020026020010151611765565b5090506001600160a01b038716611afd57611af886868481518110611a8d57634e487b7160e01b600052603260045260246000fd5b6020026020010151836001600160801b0316600090815260fd602090815260408083205460ff8352818420818552835281842085905593835261010082528083209390935560fe90522080546001600160a01b039092166001600160a01b0319909216919091179055565b611b76565b856001600160a01b0316876001600160a01b031614611b76578560fe6000878581518110611b3b57634e487b7160e01b600052603260045260246000fd5b6020026020010151815260200190815260200160002060006101000a8154816001600160a01b0302191690836001600160a01b031602179055505b6001600160a01b038616611bb657611bb687868481518110611ba857634e487b7160e01b600052603260045260246000fd5b6020026020010151836121f9565b5080611bc181612f55565b915050611a1d565b6001600160a01b0384163b156114f25760405163bc197c8160e01b81526001600160a01b0385169063bc197c8190611c0d9089908990889088908890600401612c4b565b602060405180830381600087803b158015611c2757600080fd5b505af1925050508015611c57575060408051601f3d908101601f19168201909252611c5491810190612a9f565b60015b611d0457611c63612f9c565b806308c379a01415611c9d5750611c78612fb4565b80611c835750611c9f565b8060405162461bcd60e51b81526004016104c49190612d2f565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b60648201526084016104c4565b6001600160e01b0319811663bc197c8160e01b146119f55760405162461bcd60e51b81526004016104c490612d42565b600054610100900460ff1680611d4d575060005460ff16155b611d695760405162461bcd60e51b81526004016104c490612dcf565b600054610100900460ff16158015611d8b576000805461ffff19166101011790555b611d936122d3565b61163e61233a565b600054610100900460ff1680611db4575060005460ff16155b611dd05760405162461bcd60e51b81526004016104c490612dcf565b600054610100900460ff1615801561163e576000805461ffff19166101011790558015610c71576000805461ff001916905550565b600054610100900460ff1680611e1e575060005460ff16155b611e3a5760405162461bcd60e51b81526004016104c490612dcf565b600054610100900460ff16158015611e5c576000805461ffff19166101011790555b6116c282611752565b60408051600180825281830190925260609160009190602080830190803683370190505090508281600081518110611ead57634e487b7160e01b600052603260045260246000fd5b602090810291909101015292915050565b6001600160a01b0384163b156114f25760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e6190611f029089908990889088908890600401612ca9565b602060405180830381600087803b158015611f1c57600080fd5b505af1925050508015611f4c575060408051601f3d908101601f19168201909252611f4991810190612a9f565b60015b611f5857611c63612f9c565b6001600160e01b0319811663f23a6e6160e01b146119f55760405162461bcd60e51b81526004016104c490612d42565b600080825160411415611fbf5760208301516040840151606085015160001a611fb3878285856123a1565b94509450505050611ff1565b825160401415611fe95760208301516040840151611fde86838361248e565b935093505050611ff1565b506000905060025b9250929050565b600081600481111561201a57634e487b7160e01b600052602160045260246000fd5b14156120235750565b600181600481111561204557634e487b7160e01b600052602160045260246000fd5b14156120935760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016104c4565b60028160048111156120b557634e487b7160e01b600052602160045260246000fd5b14156121035760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016104c4565b600381600481111561212557634e487b7160e01b600052602160045260246000fd5b141561217e5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016104c4565b60048160048111156121a057634e487b7160e01b600052602160045260246000fd5b1415610c715760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b60648201526084016104c4565b6001600160801b038116600090815260fd602052604081205461221e90600190612ed7565b60008481526101006020526040902054909150808214612273576001600160801b038316600090815260ff60209081526040808320858452825280832054848452818420819055835261010090915290208190555b506000838152610100602090815260408083208390556001600160801b03909416825260ff815283822092825291825282812081905592835260fe9052902080546001600160a01b039092166001600160a01b0319909216919091179055565b600054610100900460ff16806122ec575060005460ff16155b6123085760405162461bcd60e51b81526004016104c490612dcf565b600054610100900460ff1615801561232a576000805461ffff19166101011790555b612332611d9b565b61163e6124bd565b600054610100900460ff1680612353575060005460ff16155b61236f5760405162461bcd60e51b81526004016104c490612dcf565b600054610100900460ff16158015612391576000805461ffff19166101011790555b612399611d9b565b61163e612532565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156123d85750600090506003612485565b8460ff16601b141580156123f057508460ff16601c14155b156124015750600090506004612485565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612455573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661247e57600060019250925050612485565b9150600090505b94509492505050565b6000806001600160ff1b03831660ff84901c601b016124af878288856123a1565b935093505050935093915050565b600054610100900460ff16806124d6575060005460ff16155b6124f25760405162461bcd60e51b81526004016104c490612dcf565b600054610100900460ff16158015612514576000805461ffff19166101011790555b6097805460ff191690558015610c71576000805461ff001916905550565b600054610100900460ff168061254b575060005460ff16155b6125675760405162461bcd60e51b81526004016104c490612dcf565b600054610100900460ff16158015612589576000805461ffff19166101011790555b61163e3361158d565b82805461259e90612eee565b90600052602060002090601f0160209004810192826125c05760008555612606565b82601f106125d957805160ff1916838001178555612606565b82800160010185558215612606579182015b828111156126065782518255916020019190600101906125eb565b50612612929150612616565b5090565b5b808211156126125760008155600101612617565b60006001600160401b0383111561264457612644612f86565b60405161265b601f8501601f191660200182612f29565b80915083815284848401111561267057600080fd5b83836020830137600060208583010152509392505050565b80356001600160a01b038116811461269f57600080fd5b919050565b600082601f8301126126b4578081fd5b813560206126c182612e9c565b6040516126ce8282612f29565b8381528281019150858301600585901b870184018810156126ed578586fd5b855b8581101561270b578135845292840192908401906001016126ef565b5090979650505050505050565b60008083601f840112612729578182fd5b5081356001600160401b0381111561273f578182fd5b602083019150836020828501011115611ff157600080fd5b600082601f830112612767578081fd5b6127768383356020850161262b565b9392505050565b80356001600160801b038116811461269f57600080fd5b6000602082840312156127a5578081fd5b61277682612688565b600080604083850312156127c0578081fd5b6127c983612688565b91506127d760208401612688565b90509250929050565b600080600080600060a086880312156127f7578081fd5b61280086612688565b945061280e60208701612688565b935060408601356001600160401b0380821115612829578283fd5b61283589838a016126a4565b9450606088013591508082111561284a578283fd5b61285689838a016126a4565b9350608088013591508082111561286b578283fd5b5061287888828901612757565b9150509295509295909350565b600080600080600060a0868803121561289c578081fd5b6128a586612688565b94506128b360208701612688565b9350604086013592506060860135915060808601356001600160401b038111156128db578182fd5b61287888828901612757565b600080604083850312156128f9578182fd5b61290283612688565b915060208301356129128161303d565b809150509250929050565b6000806040838503121561292f578182fd5b61293883612688565b946020939093013593505050565b6000806000806060858703121561295b578182fd5b61296485612688565b93506020850135925060408501356001600160401b03811115612985578283fd5b61299187828801612718565b95989497509550505050565b600080604083850312156129af578182fd5b82356001600160401b03808211156129c5578384fd5b818501915085601f8301126129d8578384fd5b813560206129e582612e9c565b6040516129f28282612f29565b8381528281019150858301600585901b870184018b1015612a11578889fd5b8896505b84871015612a3a57612a2681612688565b835260019690960195918301918301612a15565b5096505086013592505080821115612a50578283fd5b50612a5d858286016126a4565b9150509250929050565b600060208284031215612a78578081fd5b81516127768161303d565b600060208284031215612a94578081fd5b81356127768161304b565b600060208284031215612ab0578081fd5b81516127768161304b565b600060208284031215612acc578081fd5b81356001600160401b03811115612ae1578182fd5b612aed84828501612757565b949350505050565b60008060208385031215612b07578182fd5b82356001600160401b03811115612b1c578283fd5b612b2885828601612718565b90969095509350505050565b600060208284031215612b45578081fd5b81356001600160401b03811115612b5a578182fd5b8201601f81018413612b6a578182fd5b612aed8482356020840161262b565b600060208284031215612b8a578081fd5b6127768261277d565b60008060408385031215612ba5578182fd5b6129388361277d565b600060208284031215612bbf578081fd5b5035919050565b6000815180845260208085019450808401835b83811015612bf557815187529582019590820190600101612bd9565b509495945050505050565b60008151808452815b81811015612c2557602081850181015186830182015201612c09565b81811115612c365782602083870101525b50601f01601f19169290920160200192915050565b6001600160a01b0386811682528516602082015260a060408201819052600090612c7790830186612bc6565b8281036060840152612c898186612bc6565b90508281036080840152612c9d8185612c00565b98975050505050505050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a060808201819052600090612ce390830184612c00565b979650505050505050565b6020815260006127766020830184612bc6565b604081526000612d146040830185612bc6565b8281036020840152612d268185612bc6565b95945050505050565b6020815260006127766020830184612c00565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60006001600160401b03821115612eb557612eb5612f86565b5060051b60200190565b60008219821115612ed257612ed2612f70565b500190565b600082821015612ee957612ee9612f70565b500390565b600181811c90821680612f0257607f821691505b60208210811415612f2357634e487b7160e01b600052602260045260246000fd5b50919050565b601f8201601f191681016001600160401b0381118282101715612f4e57612f4e612f86565b6040525050565b6000600019821415612f6957612f69612f70565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b600060033d1115612fb157600481823e5160e01c5b90565b600060443d1015612fc25790565b6040516003193d81016004833e81513d6001600160401b038160248401118184111715612ff157505050505090565b82850191508151818111156130095750505050505090565b843d87010160208285010111156130235750505050505090565b61303260208286010187612f29565b509095945050505050565b8015158114610c7157600080fd5b6001600160e01b031981168114610c7157600080fdfe30783136323665623237333131313665323264393732346330616334383932316262353966376637343062666439336234366338636138383734383936663035316331383531376663346338663464636431613138333237346138393732383662636138323134633861633365313834393962353437313030616434663530613337316368747470733a2f2f726f79616c2d696f2e6d7970696e6174612e636c6f75642f697066732f516d5162794c5941646678444d324343673863693156726748544151447539427064704668335446554d7369784168747470733a2f2f726f79616c2d696f2e6d7970696e6174612e636c6f75642f697066732f516d537676635341706f7338775a6f5135615a564c324e533856714d5254723431336b64726163674d503165374e2f7b69647d2e6a736f6ea26469706673582212202246a8e9090ba2492a204a9a69c8f1d3705dceefc8d68543328a0cde9c558af464736f6c63430008040033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.