{"version":3,"sources":["components/App.js","serviceWorker.js","index.js"],"names":["ethers","require","connected","App","props","isUnlocked$","BehaviorSubject","handleChange","startDate","setState","gallery","state","timeline","loadBlockchainData","rd","getParameterByName","waitload","refdate","Date","curdate","mindate","includes","substring","length","web3","account","history","balance","HistoryAddress","histSupply","refFees","feeBal","tokens","dateRecords","unsortedDateRecords","ownedTokens","ownedDates","pending","addrDate","_maxDate","now","loaded","web3connect","web3name","console","log","a","this","isWalletUnlocked","dispatch","then","results","catch","error","web3Provider","providers","Web3Provider","window","ethereum","signer","getSigner","getAddress","address","next","err","fetch","r","json","data","NFT_json","finally","Object","entries","key","push","date","dateString","statementCount","toString","statements","owner","name","tokenIndex","tokenindex","unixTime","unixtime","Web3","eth","net","getId","netId","enable","getAccounts","accounts","getBalance","lookupAddress","Contract","History","abi","networks","methods","balanceOf","call","historyBalance","fees","k","tokenOfOwnerByIndex","ownedToken","ownedDate","getTime","getTimezoneOffset","days_fromownedDateHours","Math","floor","getHours","getFullYear","getMonth","slice","getDate","alert","WebsocketProvider","process","to","_tokenId","_ref","_statement","refAddress","utils","toChecksumAddress","e","message","fee","glimit","safeMintRefStatement","estimateGas","value","from","send","maxPriorityFeePerGas","maxFeePerGas","gasLimit","success","_statement_state","min","submitStatement","preventDefault","withdraw","url","location","href","replace","regex","RegExp","exec","decodeURIComponent","_tokenCheck","dateindex","indexOf","fullSCount","scount","statementList","map","statement","sindex","ownedDatesList","token","tsindex","indexsortedDateRecords","sort","b","dateRecordsList","className","mtDateStr","src","alt","sortedDateRecords","provider","dateTimelineList","iconStyle","background","color","icon","size","generatedAvatarType","contentArrowStyle","borderRight","_mintedToken","mtdays_fromdateHours","encodeURIComponent","initokenId","UTC","valueOf","tokenCheck","tokenIdString","minted","youown","rel","style","margin","onClick","display","role","genYYYYMMDD","showPopperArrow","dateFormat","selected","onChange","minDate","maxDate","placeholderText","target","Tabs","fill","id","Tab","eventKey","title","onSubmit","type","placeholder","ref","input","Number","required","dateGallery","dateTimeline","height","Component","Boolean","hostname","match","ReactDOM","render","document","getElementById","navigator","serviceWorker","ready","registration","unregister"],"mappings":"k1BAWQA,EAAWC,EAAQ,KAAnBD,OAEJE,EAAY,EAk6BDC,E,kDA3mBb,WAAYC,GAAQ,IAAD,uBACjB,cAAMA,IApSVC,YAAc,IAAIC,KAAgB,GAmSb,EA7BnBC,aAAe,SAACC,GACd,EAAKC,SAAS,CACZD,eA2Be,EAvBnBE,QAAU,WACJ,EAAKC,MAAMD,QACb,EAAKD,SAAS,CAAEC,QAAS,KAEzB,EAAKD,SAAS,CAAEC,QAAS,IACzB,EAAKD,SAAS,CAAEG,SAAU,MAkBX,EAdnBA,SAAW,WACL,EAAKD,MAAMC,SACb,EAAKH,SAAS,CAAEG,SAAU,KAE1B,EAAKH,SAAS,CAAEG,SAAU,IAC1B,EAAKH,SAAS,CAAEC,QAAS,MASV,EALnBR,UAAY,WACVA,EAAY,EACZ,EAAKW,sBAML,IAAIC,EAAK,EAAKC,mBAAmB,QAC7BC,EAAS,EAGXA,EADEF,EACO,EAEA,EAGX,IAAIG,EAAU,IAAIC,KACdC,EAAUF,EACVG,EAAU,IAAIF,KAAK,KAAK,EAAE,GAdb,OAebJ,KAEAG,EADEH,EAAGO,SAAS,KACJ,IAAIH,KAAKJ,EAAGQ,UAAU,EAAER,EAAGS,OAAO,GAAIT,EAAGQ,UAAUR,EAAGS,OAAO,EAAET,EAAGS,OAAO,GAAG,EAAGT,EAAGQ,UAAUR,EAAGS,OAAO,IAEtG,IAAIL,KAAKJ,EAAGQ,UAAU,EAAER,EAAGS,OAAO,GAAIT,EAAGQ,UAAUR,EAAGS,OAAO,EAAET,EAAGS,OAAO,GAAG,EAAGT,EAAGQ,UAAUR,EAAGS,OAAO,KAEpGJ,EACZF,EAAUE,EACDF,EAAUG,IACnBH,EAAUG,IAId,EAAKT,MAAQ,CACXa,KAAM,YACNC,QAAS,GACTC,QAAS,KACTC,QAAS,EACTC,eAAgB,KAChBC,WAAY,EACZC,QAA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,SAASC,eAAe,SD2H3C,kBAAmBC,WACrBA,UAAUC,cAAcC,MAAM3L,MAAK,SAAA4L,GACjCA,EAAaC,iB","file":"static/js/main.f328d164.chunk.js","sourcesContent":["import { Tabs, Tab } from 'react-bootstrap'\nimport React, { Component } from 'react';\nimport DatePicker from 'react-datepicker';\nimport './custom-react-datepicker.css';\nimport History from '../abis/History.json'\nimport ReverseRecord from '../abis/ReverseRecord.json'\nimport Web3 from 'web3';\nimport './App.css';\nimport { BehaviorSubject } from \"rxjs\";\nimport Davatar from '@davatar/react'\nimport { VerticalTimeline, VerticalTimelineElement } from 'react-vertical-timeline-component';\nconst { ethers } = require(\"ethers\");\n\nvar connected = 0\n\nclass App extends Component {\n\n async componentDidMount() {\n await this.isWalletUnlocked()\n await this.loadBlockchainData(this.props.dispatch)\n .then(results => {\n this.setState({ loaded: 1 })\n //do any results transformations\n return results;\n })\n .catch(error => {\n //handle any errors here\n });\n // .then(console.log(\"Unlocked?: \", this.isUnlocked$.value))\n // console.log(NFT_json[\"total\"])\n }\n\n\nisUnlocked$ = new BehaviorSubject(false);\n\n async isWalletUnlocked() {\n try {\n const web3Provider = new ethers.providers.Web3Provider(window.ethereum, 'any');\n // console.log(web3Provider)\n const signer = web3Provider.getSigner();\n // console.log(signer.getAddress())\n await signer.getAddress()\n .then((address: string) => {\n this.isUnlocked$.next(true);\n this.setState({ web3connect: 1 });\n })\n .catch((err) => this.isUnlocked$.next(false));\n } catch (e) {\n console.log('Error', e) \n }\n // console.log(\"Unlocked?: \", this.state.web3connect)\n\n var NFT_json\n\n fetch('./records/NFT_json.json')\n .then((r) => r.json())\n .then(data => {NFT_json=data})\n .finally(() => {\n const histSupply = NFT_json['total']\n // console.log(histSupply)\n this.setState({ histSupply: histSupply })\n\n const dateRecords = [];\n const unsortedDateRecords = [];\n const tokens = [];\n for (const [key, value] of Object.entries(NFT_json)) {\n if (NFT_json[key] && key!=\"total\") {\n // console.log(value);\n dateRecords.push({\n tokens: key, \n date: new Date(NFT_json[key].date.substring(0,NFT_json[key].date.length-6), NFT_json[key].date.substring(NFT_json[key].date.length-5,NFT_json[key].date.length-3)-1, NFT_json[key].date.substring(NFT_json[key].date.length-2) ) , \n dateString: NFT_json[key].date, \n statementCount: NFT_json[key].statementCount.toString(), \n statements: NFT_json[key].statements, \n owner: NFT_json[key].owner, \n name: NFT_json[key].name,\n tokenIndex: NFT_json[key].tokenindex,\n unixTime: NFT_json[key].unixtime\n });\n unsortedDateRecords.push({\n tokens: key, \n date: new Date(NFT_json[key].date.substring(0,NFT_json[key].date.length-6), NFT_json[key].date.substring(NFT_json[key].date.length-5,NFT_json[key].date.length-3)-1, NFT_json[key].date.substring(NFT_json[key].date.length-2) ) , \n dateString: NFT_json[key].date, \n statementCount: NFT_json[key].statementCount.toString(), \n statements: NFT_json[key].statements, \n owner: NFT_json[key].owner, \n name: NFT_json[key].name,\n tokenIndex: NFT_json[key].tokenindex,\n unixTime: NFT_json[key].unixtime\n });\n tokens.push(key)\n }\n }\n\n // console.log(dateRecords);\n\n this.setState({\n dateRecords: dateRecords,\n unsortedDateRecords: unsortedDateRecords,\n tokens: tokens\n })\n })\n\n }\n\n\n\n async loadBlockchainData(dispatch) {\n\n\n\n\n if (typeof window.ethereum!=='undefined' && (connected || this.state.web3connect)) {\n //assign to values to variables: web3, netId, accounts\n const web3 = new Web3(window.ethereum)\n const netId = await web3.eth.net.getId()\n // console.log(netId)\n await window.ethereum.enable()\n const accounts = await web3.eth.getAccounts()\n // console.log(\"Your Address: :\", accounts[0]) \n\n if (typeof accounts[0] !=='undefined') {\n //check if account is detected, then load balance&setStates, elsepush alert\n //in try block load contracts\n const balance = await web3.eth.getBalance(accounts[0])\n this.setState({ account: accounts[0], balance: balance, web3: web3})\n this.setState({ web3connect: 1 })\n const web3Provider = new ethers.providers.Web3Provider(window.ethereum, 'any');\n // console.log(\"Account: \", accounts[0])\n var name = await web3Provider.lookupAddress(accounts[0]);\n this.setState({ web3name: name });\n // console.log(name)\n\n //History\n try {\n\n // const namehash = require('eth-ens-namehash');\n // const ReverseRecords = new ethers.Contract('0x3671aE578E63FdF66ad4F3E12CC0c0d71Ac7510C', ReverseRecord.abi, web3Provider)\n\n const history = new web3.eth.Contract(History.abi, History.networks[netId].address)\n const HistoryAddress = await History.networks[netId].address\n // const contractBalance = await web3.eth.getBalance(HistoryAddress)\n // const contractOwner = await history.methods.owner().call()\n // const contractURI = await history.methods.contractURI().call()\n const historyBalance = await history.methods.balanceOf(this.state.account).call()\n const refFees = await history.methods.fees(this.state.account).call()\n const feeBal = await history.methods.feeBal().call()\n console.log(\"Contract Address: \", HistoryAddress) \n // console.log(\"Contract Balance: \", contractBalance/1e18) \n // console.log(\"Fee Balance: \", feeBal/1e18) \n this.setState({ feeBal: feeBal })\n\n this.setState({history: history, HistoryAddress: HistoryAddress})\n console.log(\"Your Referral Fees: \", refFees/1e18) \n this.setState({ refFees: refFees })\n\n\n for (var k = 0; k < historyBalance; k++) {\n var ownedToken = await history.methods.tokenOfOwnerByIndex(this.state.account, k).call()\n // console.log(\"You own TokenID: \", ownedToken) \n this.setState({\n ownedTokens: [...this.state.ownedTokens, ownedToken]\n })\n\n var ownedDate = new Date(((-1)**(ownedToken/43200) * ownedToken - ownedToken % 86400)*1000)\n\n // var ownedDate = new Date(ownedToken*1000)\n ownedDate = new Date(ownedDate.getTime() + ownedDate.getTimezoneOffset()*60*1000)\n\n var days_fromownedDateHours = Math.floor(ownedDate.getHours()/12)\n // console.log(\"Hours: \", Math.floor(ownedDate.getHours()/12)) \n \n //Hours of new date may be wrong, but days correct (which is all we care about)\n //This seems to address bug in datetime with timezone offset for early years...\n //Essentially this rounds up or down to nearest day based on hours\n ownedDate = new Date(ownedDate.getTime() + 0.5*days_fromownedDateHours*24*60*60*1000) \n ownedDate = ownedDate.getFullYear()+\".\"+('0'+(ownedDate.getMonth()+1)).slice(-2)+\".\"+('0'+ownedDate.getDate()).slice(-2)\n // console.log(\"You own Date: \", ownedDate) \n this.setState({\n ownedDates: [...this.state.ownedDates, ownedDate]\n })\n }\n } catch (e) {\n console.log('Error', e)\n window.alert('Contract not deployed to the current network')\n }\n }\n // } else {\n // //if MetaMask not exists push alert\n // window.alert('Please install MetaMask')\n } else {\n //assign to values to variables: web3, netId, accounts\n const web3 = new Web3(new Web3.providers.WebsocketProvider(process.env.REACT_APP_URL))\n const netId = 1\n this.setState({web3: web3})\n\n // const ethersprovider = new Web3.providers.WebsocketProvider(\"wss://eth-mainnet.alchemyapi.io/v2/zSEVe-p7sDiBWGVphBfyhR0xfjZWRufC\")\n // const web3Provider = new ethers.providers.Web3Provider(ethersprovider);\n\n //History\n try { \n // const namehash = require('eth-ens-namehash');\n // const ReverseRecords = new ethers.Contract('0x3671aE578E63FdF66ad4F3E12CC0c0d71Ac7510C', ReverseRecord.abi, web3Provider)\n\n const history = new web3.eth.Contract(History.abi, History.networks[netId].address)\n const HistoryAddress = await History.networks[netId].address\n const feeBal = await history.methods.feeBal().call()\n console.log(\"Contract Address: \", HistoryAddress) \n this.setState({ feeBal: feeBal })\n this.setState({history: history, HistoryAddress: HistoryAddress})\n\n } catch (e) {\n console.log('Error', e)\n window.alert('Contract not deployed to the current network')\n }\n }\n\n\n }\n\n\n\n async safeMintRefStatement(to, _tokenId, _ref, _statement) {\n console.log(to)\n console.log(_tokenId)\n console.log(_ref)\n console.log(_statement)\n\n let refAddress = \"0x0000000000000000000000000000000000000000\"\n\n if (_ref) {\n try {\n refAddress = Web3.utils.toChecksumAddress(_ref)\n } catch(e) { \n console.error('Referral address is not valid - ', e.message) \n }\n }\n\n let fee = 0.01\n fee = fee * 10**18\n if (this.state.history) {\n var glimit = 150000\n try{\n glimit = await this.state.history.methods.safeMintRefStatement(to, _tokenId, refAddress, _statement).estimateGas({value: fee, from: this.state.account}); \n console.log(\"Gas Limit: \", glimit)\n } catch (e) {\n console.log('Error, Gas Estimate: ', e)\n console.log('Assume Gas Limit = 150000')\n }\n try{\n // const success = await this.state.history.methods.safeMintRefStatement(to, _tokenId, refAddress, _statement).send({value: fee, from: this.state.account}); \n const success = await this.state.history.methods.safeMintRefStatement(to, _tokenId, refAddress, _statement).send({value: fee, from: this.state.account, maxPriorityFeePerGas: null, maxFeePerGas: null, gasLimit: glimit}); \n console.log(\"This is what success looks like: \", success)\n this.setState({ pending: 1 })\n // return success;\n } catch (e) {\n console.log('Error, mint: ', e)\n }\n } else {\n console.log(\"No Good\")\n }\n }\n\n async submitStatement(_tokenId, _statement_state) {\n console.log(_tokenId)\n console.log(_statement_state)\n let statementCount = await this.state.history.methods.statementCount(_tokenId).call()\n let fee = Math.min(0.01,statementCount*0.01) //This is 0 for first statement\n fee = fee * 10**18\n if (this.state.history) {\n try{\n await this.state.history.methods.submitStatement(_tokenId, _statement_state).send({value: fee, from: this.state.account})\n this.setState({ pending: 1 }) \n } catch (e) {\n console.log('Error, statement: ', e)\n }\n } else {\n console.log(\"No Good\")\n }\n }\n\n async withdraw(e) {\n e.preventDefault()\n console.log(e)\n if (this.state.history) {\n try{\n await this.state.history.methods.withdraw().send({from: this.state.account}) \n this.setState({ pending: 1 }) \n // this.setState({ refFees: 0 })\n } catch (e) {\n console.log('Error, withdraw: ', e)\n }\n } \n }\n\n handleChange = (startDate) => {\n this.setState({\n startDate,\n });\n };\n\n gallery = () => {\n if (this.state.gallery) {\n this.setState({ gallery: 0 }) \n } else {\n this.setState({ gallery: 1 }) \n this.setState({ timeline: 0 }) \n }\n }\n\n timeline = () => {\n if (this.state.timeline) {\n this.setState({ timeline: 0 }) \n } else {\n this.setState({ timeline: 1 })\n this.setState({ gallery: 0 }) \n }\n }\n\n connected = () => {\n connected = 1 \n this.loadBlockchainData()\n }\n\n constructor(props) {\n super(props)\n\n let rd = this.getParameterByName('date')\n let waitload=0\n\n if (rd) {\n waitload=0\n } else {\n waitload=1\n } \n\n let refdate = new Date()\n let curdate = refdate\n let mindate = new Date(1900,0,1)\n if (rd) {\n if (rd.includes(\".\")) {\n refdate = new Date(rd.substring(0,rd.length-6), rd.substring(rd.length-5,rd.length-3)-1, rd.substring(rd.length-2) ) \n } else {\n refdate = new Date(rd.substring(0,rd.length-4), rd.substring(rd.length-4,rd.length-2)-1, rd.substring(rd.length-2) ) \n }\n if (refdate > curdate) {\n refdate = curdate\n } else if (refdate < mindate) {\n refdate = mindate\n }\n }\n // console.log(refdate)\n this.state = {\n web3: 'undefined',\n account: '',\n history: null,\n balance: 0,\n HistoryAddress: null,\n histSupply: 0,\n refFees: 0,\n feeBal: 0,\n tokens: [],\n // dates: [],\n // statementCounts: [],\n // statements: [],\n dateRecords: [],\n unsortedDateRecords: [],\n // dateOwnNames: [],\n ownedTokens: [],\n ownedDates: [],\n pending: 0,\n addrDate: rd,\n startDate: refdate,\n _maxDate: new Date(Date.now()),\n gallery: 0,\n timeline: 0,\n loaded: waitload,\n web3connect: 0,\n web3name: null\n }\n\n console.log(this.loaded)\n }\n\n\n //?ref=YOUR_ADDRESS_HERE\n //?date=YOUR_DATE_IN_FORMAT_YYYYMMDD_OR_YYYY.MM.DD\n //?ref=YOUR_ADDRESS_HERE&date=YOUR_DATE_IN_FORMAT_YYYYMMDD_OR_YYYY.MM.DD\n getParameterByName(name, url = window.location.href) {\n name = name.replace(/[\\[\\]]/g, '\\\\$&');\n var regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)'),\n results = regex.exec(url);\n if (!results) return null;\n if (!results[2]) return '';\n return decodeURIComponent(results[2].replace(/\\+/g, ' '));\n }\n\n\n fullSCount(_tokenCheck) {\n var dateindex = this.state.tokens.indexOf(_tokenCheck.toString())\n var fullSCount = 0\n\n if (dateindex >= 0) {\n try {\n fullSCount = this.state.unsortedDateRecords[dateindex].statementCount\n }\n catch {\n }\n }\n return fullSCount;\n }\n\n statementList(_tokenCheck) {\n var dateindex = this.state.tokens.indexOf(_tokenCheck.toString())\n var scount = 0\n\n if (dateindex >= 0) {\n // console.log('Token to Index: ', _tokenCheck.toString())\n // console.log('Index: ', dateindex)\n\n // console.log(this.state.unsortedDateRecords)\n // console.log(this.state.unsortedDateRecords[dateindex])\n // console.log(this.state.unsortedDateRecords[dateindex].tokens)\n // console.log(this.state.unsortedDateRecords[dateindex].statementCount % 100)\n // console.log(this.state.unsortedDateRecords[dateindex].statements[0])\n\n try {\n scount = this.state.unsortedDateRecords[dateindex].statementCount % 100\n }\n catch {\n }\n \n\n if (scount > 0) {\n const statementList = this.state.unsortedDateRecords[dateindex].statements.map((statement, sindex) =>\n
\n {sindex+1}. {statement}\n
\n )\n\n return ([\n
Current list of statements:\n {statementList}\n
\n ])\n } else {\n return ([\n No statements have been added yet.\n ])\n }\n }\n }\n\n\n ownedDatesList() {\n if (this.state.ownedDates.length > 0) {\n // console.log(this.state.ownedDates)\n const ownedDatesList = this.state.ownedDates.map((token, tsindex) =>\n
\n {token}\n
\n )\n return ([\n
You currently own:\n {ownedDatesList}\n
\n ])\n } \n }\n\n dateGallery() {\n if (this.state.dateRecords.length > 0) {\n // console.log(this.state.dateRecords[0].tokens)\n var indexsortedDateRecords = this.state.dateRecords.sort(function(a, b){return b.tokenIndex - a.tokenIndex});\n const dateRecordsList = indexsortedDateRecords.map((tokens, tsindex) =>\n \n {\"Problem\n \n )\n return ([\n
\n {dateRecordsList}\n
\n ])\n } \n }\n\n\n\n\n\n dateTimeline() {\n if (this.state.dateRecords.length > 0) {\n // console.log(this.state.dateRecords[0].tokens)\n\n var sortedDateRecords = this.state.dateRecords.sort(function(a, b){return b.date - a.date});\n\n const provider = new Web3.providers.WebsocketProvider(\"wss://eth-mainnet.alchemyapi.io/v2/zSEVe-p7sDiBWGVphBfyhR0xfjZWRufC\")\n // console.log(provider)\n\n // this.getENSnames()\n\n const dateTimelineList = sortedDateRecords.map((tokens, tsindex) =>\n }\n contentArrowStyle={{ borderRight: '7px solid rgb(0, 0, 0)' }}\n >\n \n {\"Problem\n \n \n )\n return ([\n \n {dateTimelineList}\n \n ])\n } \n }\n\n\n mtDateStr(_mintedToken) {\n var mtDateStr = new Date(((-1)**(_mintedToken/43200) * _mintedToken - _mintedToken % 86400)*1000)\n mtDateStr = new Date(mtDateStr.getTime() + mtDateStr.getTimezoneOffset()*60*1000)\n var mtdays_fromdateHours = Math.floor(mtDateStr.getHours()/12)\n mtDateStr = new Date(mtDateStr.getTime() + 0.5*mtdays_fromdateHours*24*60*60*1000) \n mtDateStr = (mtDateStr.getFullYear()+\".\"+('0'+(mtDateStr.getMonth()+1)).slice(-2)+\".\"+('0'+mtDateStr.getDate()).slice(-2))\n\n return mtDateStr;\n }\n\n\n genYYYYMMDD(dateString) {\n const YYYYMMDD1 = ''\n const YYYYMMDD2 = '1. First owner'+\"'\"+'s statement goes here2. Statement from next owner3. And so on...4. 5. 6. 7. 8. 9. 10. After 10 statements, no more may be added'\n var YYYYMMDD_date = 'data:image/svg+xml;utf8,'+encodeURIComponent(YYYYMMDD1+dateString+YYYYMMDD2)\n return YYYYMMDD_date;\n }\n\n render() {\n const { addrDate } = this.state;\n const { startDate } = this.state;\n const { _maxDate } = this.state;\n const { tokens } = this.state;\n const { dateRecords } = this.state;\n const { refFees } = this.state;\n const { ownedTokens } = this.state;\n const { pending } = this.state;\n const { gallery } = this.state;\n const { timeline } = this.state;\n const { connected } = this.state;\n const { loaded } = this.state;\n const { account } = this.state;\n const { web3connect } = this.state;\n const { web3name } = this.state;\n // let { statementCounts } = this.state;\n\n\n // if ('date'==results) {\n // this.setState({ loaded: 1 }) \n // }\n\n\n let dateString = (startDate.getFullYear()+\".\"+('0'+(startDate.getMonth()+1)).slice(-2)+\".\"+('0'+startDate.getDate()).slice(-2))\n\n // console.log(tokens)\n let initokenId = Date.UTC(startDate.getFullYear(),startDate.getMonth(),startDate.getDate()).valueOf()/1000;\n\n function tokenCheck(initokenId) {\n if (initokenId < 0) {\n return (-1 * (initokenId + 43200))\n } else {\n return initokenId\n }\n }\n\n let tokenIdString = tokenCheck(initokenId).toString()\n let decade = (Math.floor(startDate.getFullYear()/10)*10).toString()\n // let tokenCheck = Date.UTC(startDate.getFullYear(),startDate.getMonth(),startDate.getDate()).valueOf()/1000;\n\n let minted = tokens.includes(tokenIdString);\n let youown = ownedTokens.includes(tokenIdString);\n let fullSCount = this.fullSCount(tokenCheck(initokenId));\n // console.log(\"TokenCheck Statement Count:\", fullSCount)\n\n // console.log('Is ',tokenCheck,'minted?', minted) \n\n // this.updNames() \n\n return (\n
\n \n \n
\n
\n
\n
\n

The Historical Record

\n - On-Chain - Immutable - Unstoppable -\n

\n

\n {loaded==1 &&\n minted && \n {\"Date\n }\n {loaded==1 &&\n !minted && \n {\"Date\n }\n

\n
\n \n
\n Token ID: {tokenIdString}\n

\n Share on Twitter\n

\n {this.ownedDatesList()}\n

\n \n \n
\n

\n Would you like to mint the Historical Record for {dateString}?\n

\n { minted &&\n !pending &&\n !youown &&\n [Sorry, already minted!,\n

,\n View this date on OpenSea]\n }\n { minted &&\n !pending &&\n youown &&\n [You own this!]\n }\n { !minted &&\n !pending &&\n
{\n e.preventDefault()\n let to = this.state.account\n let _tokenId = tokenCheck(initokenId)\n let _ref = this.getParameterByName('ref')\n let _statement = this._statement.value\n this.safeMintRefStatement(to, _tokenId, _ref, _statement)\n }}>\n
\n

\n { this._statement = input }}\n />\n
\n

\n \n
\n }\n {web3connect==0 &&\n !minted &&\n !pending &&\n Must be connected to mint!\n }\n\n {Number(pending)===1 &&\n [

,\n You just submitted a transaction... Please wait till completion and then refresh this page to update.]\n }\n
\n
\n\n \n
\n

\n Would you like to submit a statement for {dateString}?\n

\n {!minted && \n !pending &&\n [

,\n It's not yet minted. You can submit a statement as part of minting.]\n }\n\n {minted && \n !pending &&\n this.statementList(tokenCheck(initokenId))}\n {minted &&\n youown &&\n !pending &&\n fullSCount < 10 &&\n
{\n e.preventDefault()\n let _tokenId = tokenCheck(initokenId)\n let _statement_state = this._statement_state.value\n this.submitStatement(_tokenId, _statement_state)\n }}>\n
\n

\n { this._statement_state = input }}\n />\n
\n

\n \n
\n }\n {web3connect==0 &&\n minted &&\n youown &&\n !pending &&\n fullSCount < 10 &&\n Must be connected to add a statement!\n }\n\n {minted &&\n !youown &&\n !pending &&\n [

,\n Only the owner can submit a statement!,\n

,\n View this date on OpenSea]\n }\n\n {minted &&\n youown &&\n !pending &&\n fullSCount > 100 &&\n [

,\n You've already submitted a statement!]\n }\n\n {Number(pending)===1 &&\n [

,\n You just submitted a transaction... Please wait till completion and then refresh this page to update.]\n }\n
\n
\n \n
\n

\n {refFees>0 && \n !pending &&\n [
You are owed {refFees/1e18} ETH in referral fees.
,\n
Would you like to withdraw?
,\n

,\n \n ]}\n {web3connect==0 &&\n refFees>0 && \n !pending &&\n Must be connected to withdraw!\n } \n {Number(refFees)===0 && \n !pending &&\n [Sorry, you are not owed any referral fees.,\n

You can earn referral fees (equal to 50% of the referred's minting fees) by sharing a link to this site with \"?ref=YOUR_ETH_ADDRESS_HERE\" appended to the end of the link. To be eligible you must be a current owner of a Historical Record, and you may not be the minter nor the minting \"to\" address.

]} \n {Number(pending)===1 &&\n [

,\n You just submitted a transaction... Please wait till completion and then refresh this page to update.]\n } \n
\n
\n
\n
\n
\n

\n

\n General Details:\n

\n Anyone can mint a Historical Record and submit a record statement by paying a 0.01 ETH fee. There can only be one Historical Record for each date, and each Historical Record is restricted to 10 statements. The statements are stored permanently and immutable on the Ethereum blockchain.\n

\n You can use Etherscan to retrieve the statements. As an example, the Token ID for 2009.01.03 is 1230940800. To retrieve the first statement, read this contract on Etherscan, and under the function \"statement\" enter 1230940801 (i.e., the Token ID plus 1 for the first statment). The response from the Ethereum network will be \"Satoshi Nakamoto mined the Bitcoin Genesis Block.\"\n \n

\n The initial minter may submit a statement, and each subsequent owner may submit a statement, until the Historical Record is complete (i.e., 10 statements submitted). There is no fee to submit the first statement. A 0.01 ETH statement fee is required to submit each subsequent statement.\n

\n

\n Historical Records can only be minted for dates through the current block timestamp. In other words, dates that are in the future cannot be minted (until the future, becomes the present, becomes the past). The oldest date that can be minted is also limited. Initially, the limit is set to 1900.01.01; however, this limit can be adjusted in the future to allow the minting of earlier dates. \n

\n
\n

\n

\n By accessing this site and interacting with The Historical Record smart contract, you assume all associated risks and liabilities.\n
\n
\n
\n
\n
\n

Gallery

\n Here are the Historical Records that have already been minted.\n

\n

\n {this.dateGallery()}\n

\n
\n
\n
\n
\n
\n
\n

Historical Timeline

\n

Tip: Owners can set their avatar image using ENS or Davatar.xyz

\n

\n {this.dateTimeline()}\n

\n

\n

\n

\n

\n
\n
\n
\n

\n

\n

\n
\n
\n \n
\n
\n );\n }\n}\n\nexport default App;\n","// This optional code is used to register a service worker.\n// register() is not called by default.\n\n// This lets the app load faster on subsequent visits in production, and gives\n// it offline capabilities. However, it also means that developers (and users)\n// will only see deployed updates on subsequent visits to a page, after all the\n// existing tabs open on the page have been closed, since previously cached\n// resources are updated in the background.\n\n// To learn more about the benefits of this model and instructions on how to\n// opt-in, read https://bit.ly/CRA-PWA\n\nconst isLocalhost = Boolean(\n window.location.hostname === 'localhost' ||\n // [::1] is the IPv6 localhost address.\n window.location.hostname === '[::1]' ||\n // 127.0.0.1/8 is considered localhost for IPv4.\n window.location.hostname.match(\n /^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/\n )\n);\n\nexport function register(config) {\n if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\n // The URL constructor is available in all browsers that support SW.\n const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href);\n if (publicUrl.origin !== window.location.origin) {\n // Our service worker won't work if PUBLIC_URL is on a different origin\n // from what our page is served on. This might happen if a CDN is used to\n // serve assets; see https://github.com/facebook/create-react-app/issues/2374\n return;\n }\n\n window.addEventListener('load', () => {\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\n\n if (isLocalhost) {\n // This is running on localhost. Let's check if a service worker still exists or not.\n checkValidServiceWorker(swUrl, config);\n\n // Add some additional logging to localhost, pointing developers to the\n // service worker/PWA documentation.\n navigator.serviceWorker.ready.then(() => {\n console.log(\n 'This web app is being served cache-first by a service ' +\n 'worker. To learn more, visit https://bit.ly/CRA-PWA'\n );\n });\n } else {\n // Is not localhost. Just register service worker\n registerValidSW(swUrl, config);\n }\n });\n }\n}\n\nfunction registerValidSW(swUrl, config) {\n navigator.serviceWorker\n .register(swUrl)\n .then(registration => {\n registration.onupdatefound = () => {\n const installingWorker = registration.installing;\n if (installingWorker == null) {\n return;\n }\n installingWorker.onstatechange = () => {\n if (installingWorker.state === 'installed') {\n if (navigator.serviceWorker.controller) {\n // At this point, the updated precached content has been fetched,\n // but the previous service worker will still serve the older\n // content until all client tabs are closed.\n console.log(\n 'New content is available and will be used when all ' +\n 'tabs for this page are closed. See https://bit.ly/CRA-PWA.'\n );\n\n // Execute callback\n if (config && config.onUpdate) {\n config.onUpdate(registration);\n }\n } else {\n // At this point, everything has been precached.\n // It's the perfect time to display a\n // \"Content is cached for offline use.\" message.\n console.log('Content is cached for offline use.');\n\n // Execute callback\n if (config && config.onSuccess) {\n config.onSuccess(registration);\n }\n }\n }\n };\n };\n })\n .catch(error => {\n console.error('Error during service worker registration:', error);\n });\n}\n\nfunction checkValidServiceWorker(swUrl, config) {\n // Check if the service worker can be found. If it can't reload the page.\n fetch(swUrl)\n .then(response => {\n // Ensure service worker exists, and that we really are getting a JS file.\n const contentType = response.headers.get('content-type');\n if (\n response.status === 404 ||\n (contentType != null && contentType.indexOf('javascript') === -1)\n ) {\n // No service worker found. Probably a different app. Reload the page.\n navigator.serviceWorker.ready.then(registration => {\n registration.unregister().then(() => {\n window.location.reload();\n });\n });\n } else {\n // Service worker found. Proceed as normal.\n registerValidSW(swUrl, config);\n }\n })\n .catch(() => {\n console.log(\n 'No internet connection found. App is running in offline mode.'\n );\n });\n}\n\nexport function unregister() {\n if ('serviceWorker' in navigator) {\n navigator.serviceWorker.ready.then(registration => {\n registration.unregister();\n });\n }\n}\n","import React from 'react';\nimport ReactDOM from 'react-dom';\nimport 'bootstrap/dist/css/bootstrap.css'\nimport App from './components/App';\nimport * as serviceWorker from './serviceWorker';\n\nReactDOM.render(, document.getElementById('root'));\n\n// If you want your app to work offline and load faster, you can change\n// unregister() to register() below. Note this comes with some pitfalls.\n// Learn more about service workers: https://bit.ly/CRA-PWA\nserviceWorker.unregister();\n"],"sourceRoot":""}