Add coverage report

This commit is contained in:
Aadi Desai 2023-02-21 16:00:42 +00:00
parent 84df96812b
commit e85e86c476
No known key found for this signature in database
GPG key ID: CFFFE425830EF4D9
28 changed files with 4312 additions and 0 deletions

BIN
coverage/amber.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 141 B

BIN
coverage/emerald.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 141 B

519
coverage/gcov.css Normal file
View file

@ -0,0 +1,519 @@
/* All views: initial background and text color */
body
{
color: #000000;
background-color: #FFFFFF;
}
/* All views: standard link format*/
a:link
{
color: #284FA8;
text-decoration: underline;
}
/* All views: standard link - visited format */
a:visited
{
color: #00CB40;
text-decoration: underline;
}
/* All views: standard link - activated format */
a:active
{
color: #FF0040;
text-decoration: underline;
}
/* All views: main title format */
td.title
{
text-align: center;
padding-bottom: 10px;
font-family: sans-serif;
font-size: 20pt;
font-style: italic;
font-weight: bold;
}
/* All views: header item format */
td.headerItem
{
text-align: right;
padding-right: 6px;
font-family: sans-serif;
font-weight: bold;
vertical-align: top;
white-space: nowrap;
}
/* All views: header item value format */
td.headerValue
{
text-align: left;
color: #284FA8;
font-family: sans-serif;
font-weight: bold;
white-space: nowrap;
}
/* All views: header item coverage table heading */
td.headerCovTableHead
{
text-align: center;
padding-right: 6px;
padding-left: 6px;
padding-bottom: 0px;
font-family: sans-serif;
font-size: 80%;
white-space: nowrap;
}
/* All views: header item coverage table entry */
td.headerCovTableEntry
{
text-align: right;
color: #284FA8;
font-family: sans-serif;
font-weight: bold;
white-space: nowrap;
padding-left: 12px;
padding-right: 4px;
background-color: #DAE7FE;
}
/* All views: header item coverage table entry for high coverage rate */
td.headerCovTableEntryHi
{
text-align: right;
color: #000000;
font-family: sans-serif;
font-weight: bold;
white-space: nowrap;
padding-left: 12px;
padding-right: 4px;
background-color: #A7FC9D;
}
/* All views: header item coverage table entry for medium coverage rate */
td.headerCovTableEntryMed
{
text-align: right;
color: #000000;
font-family: sans-serif;
font-weight: bold;
white-space: nowrap;
padding-left: 12px;
padding-right: 4px;
background-color: #FFEA20;
}
/* All views: header item coverage table entry for ow coverage rate */
td.headerCovTableEntryLo
{
text-align: right;
color: #000000;
font-family: sans-serif;
font-weight: bold;
white-space: nowrap;
padding-left: 12px;
padding-right: 4px;
background-color: #FF0000;
}
/* All views: header legend value for legend entry */
td.headerValueLeg
{
text-align: left;
color: #000000;
font-family: sans-serif;
font-size: 80%;
white-space: nowrap;
padding-top: 4px;
}
/* All views: color of horizontal ruler */
td.ruler
{
background-color: #6688D4;
}
/* All views: version string format */
td.versionInfo
{
text-align: center;
padding-top: 2px;
font-family: sans-serif;
font-style: italic;
}
/* Directory view/File view (all)/Test case descriptions:
table headline format */
td.tableHead
{
text-align: center;
color: #FFFFFF;
background-color: #6688D4;
font-family: sans-serif;
font-size: 120%;
font-weight: bold;
white-space: nowrap;
padding-left: 4px;
padding-right: 4px;
}
span.tableHeadSort
{
padding-right: 4px;
}
/* Directory view/File view (all): filename entry format */
td.coverFile
{
text-align: left;
padding-left: 10px;
padding-right: 20px;
color: #284FA8;
background-color: #DAE7FE;
font-family: monospace;
}
/* Directory view/File view (all): bar-graph entry format*/
td.coverBar
{
padding-left: 10px;
padding-right: 10px;
background-color: #DAE7FE;
}
/* Directory view/File view (all): bar-graph outline color */
td.coverBarOutline
{
background-color: #000000;
}
/* Directory view/File view (all): percentage entry for files with
high coverage rate */
td.coverPerHi
{
text-align: right;
padding-left: 10px;
padding-right: 10px;
background-color: #A7FC9D;
font-weight: bold;
font-family: sans-serif;
}
/* Directory view/File view (all): line count entry for files with
high coverage rate */
td.coverNumHi
{
text-align: right;
padding-left: 10px;
padding-right: 10px;
background-color: #A7FC9D;
white-space: nowrap;
font-family: sans-serif;
}
/* Directory view/File view (all): percentage entry for files with
medium coverage rate */
td.coverPerMed
{
text-align: right;
padding-left: 10px;
padding-right: 10px;
background-color: #FFEA20;
font-weight: bold;
font-family: sans-serif;
}
/* Directory view/File view (all): line count entry for files with
medium coverage rate */
td.coverNumMed
{
text-align: right;
padding-left: 10px;
padding-right: 10px;
background-color: #FFEA20;
white-space: nowrap;
font-family: sans-serif;
}
/* Directory view/File view (all): percentage entry for files with
low coverage rate */
td.coverPerLo
{
text-align: right;
padding-left: 10px;
padding-right: 10px;
background-color: #FF0000;
font-weight: bold;
font-family: sans-serif;
}
/* Directory view/File view (all): line count entry for files with
low coverage rate */
td.coverNumLo
{
text-align: right;
padding-left: 10px;
padding-right: 10px;
background-color: #FF0000;
white-space: nowrap;
font-family: sans-serif;
}
/* File view (all): "show/hide details" link format */
a.detail:link
{
color: #B8D0FF;
font-size:80%;
}
/* File view (all): "show/hide details" link - visited format */
a.detail:visited
{
color: #B8D0FF;
font-size:80%;
}
/* File view (all): "show/hide details" link - activated format */
a.detail:active
{
color: #FFFFFF;
font-size:80%;
}
/* File view (detail): test name entry */
td.testName
{
text-align: right;
padding-right: 10px;
background-color: #DAE7FE;
font-family: sans-serif;
}
/* File view (detail): test percentage entry */
td.testPer
{
text-align: right;
padding-left: 10px;
padding-right: 10px;
background-color: #DAE7FE;
font-family: sans-serif;
}
/* File view (detail): test lines count entry */
td.testNum
{
text-align: right;
padding-left: 10px;
padding-right: 10px;
background-color: #DAE7FE;
font-family: sans-serif;
}
/* Test case descriptions: test name format*/
dt
{
font-family: sans-serif;
font-weight: bold;
}
/* Test case descriptions: description table body */
td.testDescription
{
padding-top: 10px;
padding-left: 30px;
padding-bottom: 10px;
padding-right: 30px;
background-color: #DAE7FE;
}
/* Source code view: function entry */
td.coverFn
{
text-align: left;
padding-left: 10px;
padding-right: 20px;
color: #284FA8;
background-color: #DAE7FE;
font-family: monospace;
}
/* Source code view: function entry zero count*/
td.coverFnLo
{
text-align: right;
padding-left: 10px;
padding-right: 10px;
background-color: #FF0000;
font-weight: bold;
font-family: sans-serif;
}
/* Source code view: function entry nonzero count*/
td.coverFnHi
{
text-align: right;
padding-left: 10px;
padding-right: 10px;
background-color: #DAE7FE;
font-weight: bold;
font-family: sans-serif;
}
/* Source code view: source code format */
pre.source
{
font-family: monospace;
white-space: pre;
margin-top: 2px;
}
/* Source code view: line number format */
span.lineNum
{
background-color: #EFE383;
}
/* Source code view: format for lines which were executed */
td.lineCov,
span.lineCov
{
background-color: #CAD7FE;
}
/* Source code view: format for Cov legend */
span.coverLegendCov
{
padding-left: 10px;
padding-right: 10px;
padding-bottom: 2px;
background-color: #CAD7FE;
}
/* Source code view: format for lines which were not executed */
td.lineNoCov,
span.lineNoCov
{
background-color: #FF6230;
}
/* Source code view: format for NoCov legend */
span.coverLegendNoCov
{
padding-left: 10px;
padding-right: 10px;
padding-bottom: 2px;
background-color: #FF6230;
}
/* Source code view (function table): standard link - visited format */
td.lineNoCov > a:visited,
td.lineCov > a:visited
{
color: black;
text-decoration: underline;
}
/* Source code view: format for lines which were executed only in a
previous version */
span.lineDiffCov
{
background-color: #B5F7AF;
}
/* Source code view: format for branches which were executed
* and taken */
span.branchCov
{
background-color: #CAD7FE;
}
/* Source code view: format for branches which were executed
* but not taken */
span.branchNoCov
{
background-color: #FF6230;
}
/* Source code view: format for branches which were not executed */
span.branchNoExec
{
background-color: #FF6230;
}
/* Source code view: format for the source code heading line */
pre.sourceHeading
{
white-space: pre;
font-family: monospace;
font-weight: bold;
margin: 0px;
}
/* All views: header legend value for low rate */
td.headerValueLegL
{
font-family: sans-serif;
text-align: center;
white-space: nowrap;
padding-left: 4px;
padding-right: 2px;
background-color: #FF0000;
font-size: 80%;
}
/* All views: header legend value for med rate */
td.headerValueLegM
{
font-family: sans-serif;
text-align: center;
white-space: nowrap;
padding-left: 2px;
padding-right: 2px;
background-color: #FFEA20;
font-size: 80%;
}
/* All views: header legend value for hi rate */
td.headerValueLegH
{
font-family: sans-serif;
text-align: center;
white-space: nowrap;
padding-left: 2px;
padding-right: 4px;
background-color: #A7FC9D;
font-size: 80%;
}
/* All views except source code view: legend format for low coverage */
span.coverLegendCovLo
{
padding-left: 10px;
padding-right: 10px;
padding-top: 2px;
background-color: #FF0000;
}
/* All views except source code view: legend format for med coverage */
span.coverLegendCovMed
{
padding-left: 10px;
padding-right: 10px;
padding-top: 2px;
background-color: #FFEA20;
}
/* All views except source code view: legend format for hi coverage */
span.coverLegendCovHi
{
padding-left: 10px;
padding-right: 10px;
padding-top: 2px;
background-color: #A7FC9D;
}

BIN
coverage/glass.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 167 B

123
coverage/index-sort-b.html Normal file
View file

@ -0,0 +1,123 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>LCOV - TicketNFT Coverage</title>
<link rel="stylesheet" type="text/css" href="gcov.css">
</head>
<body>
<table width="100%" border=0 cellspacing=0 cellpadding=0>
<tr><td class="title">LCOV - code coverage report</td></tr>
<tr><td class="ruler"><img src="glass.png" width=3 height=3 alt=""></td></tr>
<tr>
<td width="100%">
<table cellpadding=1 border=0 width="100%">
<tr>
<td width="10%" class="headerItem">Current view:</td>
<td width="35%" class="headerValue">top level</td>
<td width="5%"></td>
<td width="15%"></td>
<td width="10%" class="headerCovTableHead">Hit</td>
<td width="10%" class="headerCovTableHead">Total</td>
<td width="15%" class="headerCovTableHead">Coverage</td>
</tr>
<tr>
<td class="headerItem">Test:</td>
<td class="headerValue">TicketNFT Coverage</td>
<td></td>
<td class="headerItem">Lines:</td>
<td class="headerCovTableEntry">113</td>
<td class="headerCovTableEntry">140</td>
<td class="headerCovTableEntryMed">80.7 %</td>
</tr>
<tr>
<td class="headerItem">Date:</td>
<td class="headerValue">2023-02-21 16:00:17</td>
<td></td>
<td class="headerItem">Functions:</td>
<td class="headerCovTableEntry">31</td>
<td class="headerCovTableEntry">38</td>
<td class="headerCovTableEntryMed">81.6 %</td>
</tr>
<tr>
<td class="headerItem">Legend:</td>
<td class="headerValueLeg"> Rating:
<span class="coverLegendCovLo" title="Coverage rates below 75 % are classified as low">low: &lt; 75 %</span>
<span class="coverLegendCovMed" title="Coverage rates between 75 % and 90 % are classified as medium">medium: &gt;= 75 %</span>
<span class="coverLegendCovHi" title="Coverage rates of 90 % and more are classified as high">high: &gt;= 90 %</span>
</td>
<td></td>
<td class="headerItem">Branches:</td>
<td class="headerCovTableEntry">64</td>
<td class="headerCovTableEntry">74</td>
<td class="headerCovTableEntryMed">86.5 %</td>
</tr>
<tr><td><img src="glass.png" width=3 height=3 alt=""></td></tr>
</table>
</td>
</tr>
<tr><td class="ruler"><img src="glass.png" width=3 height=3 alt=""></td></tr>
</table>
<center>
<table width="80%" cellpadding=1 cellspacing=1 border=0>
<tr>
<td width="44%"><br></td>
<td width="8%"></td>
<td width="8%"></td>
<td width="8%"></td>
<td width="8%"></td>
<td width="8%"></td>
<td width="8%"></td>
<td width="8%"></td>
</tr>
<tr>
<td class="tableHead">Directory <span class="tableHeadSort"><a href="index.html"><img src="updown.png" width=10 height=14 alt="Sort by name" title="Sort by name" border=0></a></span></td>
<td class="tableHead" colspan=3>Line Coverage <span class="tableHeadSort"><a href="index-sort-l.html"><img src="updown.png" width=10 height=14 alt="Sort by line coverage" title="Sort by line coverage" border=0></a></span></td>
<td class="tableHead" colspan=2>Functions <span class="tableHeadSort"><a href="index-sort-f.html"><img src="updown.png" width=10 height=14 alt="Sort by function coverage" title="Sort by function coverage" border=0></a></span></td>
<td class="tableHead" colspan=2>Branches <span class="tableHeadSort"><img src="glass.png" width=10 height=14 alt="Sort by branch coverage" title="Sort by branch coverage" border=0></span></td>
</tr>
<tr>
<td class="coverFile"><a href="src/contracts/index.html">src/contracts</a></td>
<td class="coverBar" align="center">
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="amber.png" width=87 height=10 alt="86.9%"><img src="snow.png" width=13 height=10 alt="86.9%"></td></tr></table>
</td>
<td class="coverPerMed">86.9&nbsp;%</td>
<td class="coverNumMed">113 / 130</td>
<td class="coverPerMed">88.6&nbsp;%</td>
<td class="coverNumMed">31 / 35</td>
<td class="coverPerMed">86.5&nbsp;%</td>
<td class="coverNumMed">64 / 74</td>
</tr>
<tr>
<td class="coverFile"><a href="test/index.html">test</a></td>
<td class="coverBar" align="center">
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="snow.png" width=100 height=10 alt="0.0%"></td></tr></table>
</td>
<td class="coverPerLo">0.0&nbsp;%</td>
<td class="coverNumLo">0 / 10</td>
<td class="coverPerLo">0.0&nbsp;%</td>
<td class="coverNumLo">0 / 3</td>
<td class="coverPerHi">-</td>
<td class="coverNumHi">0 / 0</td>
</tr>
</table>
</center>
<br>
<table width="100%" border=0 cellspacing=0 cellpadding=0>
<tr><td class="ruler"><img src="glass.png" width=3 height=3 alt=""></td></tr>
<tr><td class="versionInfo">Generated by: <a href="http://ltp.sourceforge.net/coverage/lcov.php">LCOV version 1.14</a></td></tr>
</table>
<br>
</body>
</html>

123
coverage/index-sort-f.html Normal file
View file

@ -0,0 +1,123 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>LCOV - TicketNFT Coverage</title>
<link rel="stylesheet" type="text/css" href="gcov.css">
</head>
<body>
<table width="100%" border=0 cellspacing=0 cellpadding=0>
<tr><td class="title">LCOV - code coverage report</td></tr>
<tr><td class="ruler"><img src="glass.png" width=3 height=3 alt=""></td></tr>
<tr>
<td width="100%">
<table cellpadding=1 border=0 width="100%">
<tr>
<td width="10%" class="headerItem">Current view:</td>
<td width="35%" class="headerValue">top level</td>
<td width="5%"></td>
<td width="15%"></td>
<td width="10%" class="headerCovTableHead">Hit</td>
<td width="10%" class="headerCovTableHead">Total</td>
<td width="15%" class="headerCovTableHead">Coverage</td>
</tr>
<tr>
<td class="headerItem">Test:</td>
<td class="headerValue">TicketNFT Coverage</td>
<td></td>
<td class="headerItem">Lines:</td>
<td class="headerCovTableEntry">113</td>
<td class="headerCovTableEntry">140</td>
<td class="headerCovTableEntryMed">80.7 %</td>
</tr>
<tr>
<td class="headerItem">Date:</td>
<td class="headerValue">2023-02-21 16:00:17</td>
<td></td>
<td class="headerItem">Functions:</td>
<td class="headerCovTableEntry">31</td>
<td class="headerCovTableEntry">38</td>
<td class="headerCovTableEntryMed">81.6 %</td>
</tr>
<tr>
<td class="headerItem">Legend:</td>
<td class="headerValueLeg"> Rating:
<span class="coverLegendCovLo" title="Coverage rates below 75 % are classified as low">low: &lt; 75 %</span>
<span class="coverLegendCovMed" title="Coverage rates between 75 % and 90 % are classified as medium">medium: &gt;= 75 %</span>
<span class="coverLegendCovHi" title="Coverage rates of 90 % and more are classified as high">high: &gt;= 90 %</span>
</td>
<td></td>
<td class="headerItem">Branches:</td>
<td class="headerCovTableEntry">64</td>
<td class="headerCovTableEntry">74</td>
<td class="headerCovTableEntryMed">86.5 %</td>
</tr>
<tr><td><img src="glass.png" width=3 height=3 alt=""></td></tr>
</table>
</td>
</tr>
<tr><td class="ruler"><img src="glass.png" width=3 height=3 alt=""></td></tr>
</table>
<center>
<table width="80%" cellpadding=1 cellspacing=1 border=0>
<tr>
<td width="44%"><br></td>
<td width="8%"></td>
<td width="8%"></td>
<td width="8%"></td>
<td width="8%"></td>
<td width="8%"></td>
<td width="8%"></td>
<td width="8%"></td>
</tr>
<tr>
<td class="tableHead">Directory <span class="tableHeadSort"><a href="index.html"><img src="updown.png" width=10 height=14 alt="Sort by name" title="Sort by name" border=0></a></span></td>
<td class="tableHead" colspan=3>Line Coverage <span class="tableHeadSort"><a href="index-sort-l.html"><img src="updown.png" width=10 height=14 alt="Sort by line coverage" title="Sort by line coverage" border=0></a></span></td>
<td class="tableHead" colspan=2>Functions <span class="tableHeadSort"><img src="glass.png" width=10 height=14 alt="Sort by function coverage" title="Sort by function coverage" border=0></span></td>
<td class="tableHead" colspan=2>Branches <span class="tableHeadSort"><a href="index-sort-b.html"><img src="updown.png" width=10 height=14 alt="Sort by branch coverage" title="Sort by branch coverage" border=0></a></span></td>
</tr>
<tr>
<td class="coverFile"><a href="test/index.html">test</a></td>
<td class="coverBar" align="center">
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="snow.png" width=100 height=10 alt="0.0%"></td></tr></table>
</td>
<td class="coverPerLo">0.0&nbsp;%</td>
<td class="coverNumLo">0 / 10</td>
<td class="coverPerLo">0.0&nbsp;%</td>
<td class="coverNumLo">0 / 3</td>
<td class="coverPerHi">-</td>
<td class="coverNumHi">0 / 0</td>
</tr>
<tr>
<td class="coverFile"><a href="src/contracts/index.html">src/contracts</a></td>
<td class="coverBar" align="center">
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="amber.png" width=87 height=10 alt="86.9%"><img src="snow.png" width=13 height=10 alt="86.9%"></td></tr></table>
</td>
<td class="coverPerMed">86.9&nbsp;%</td>
<td class="coverNumMed">113 / 130</td>
<td class="coverPerMed">88.6&nbsp;%</td>
<td class="coverNumMed">31 / 35</td>
<td class="coverPerMed">86.5&nbsp;%</td>
<td class="coverNumMed">64 / 74</td>
</tr>
</table>
</center>
<br>
<table width="100%" border=0 cellspacing=0 cellpadding=0>
<tr><td class="ruler"><img src="glass.png" width=3 height=3 alt=""></td></tr>
<tr><td class="versionInfo">Generated by: <a href="http://ltp.sourceforge.net/coverage/lcov.php">LCOV version 1.14</a></td></tr>
</table>
<br>
</body>
</html>

123
coverage/index-sort-l.html Normal file
View file

@ -0,0 +1,123 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>LCOV - TicketNFT Coverage</title>
<link rel="stylesheet" type="text/css" href="gcov.css">
</head>
<body>
<table width="100%" border=0 cellspacing=0 cellpadding=0>
<tr><td class="title">LCOV - code coverage report</td></tr>
<tr><td class="ruler"><img src="glass.png" width=3 height=3 alt=""></td></tr>
<tr>
<td width="100%">
<table cellpadding=1 border=0 width="100%">
<tr>
<td width="10%" class="headerItem">Current view:</td>
<td width="35%" class="headerValue">top level</td>
<td width="5%"></td>
<td width="15%"></td>
<td width="10%" class="headerCovTableHead">Hit</td>
<td width="10%" class="headerCovTableHead">Total</td>
<td width="15%" class="headerCovTableHead">Coverage</td>
</tr>
<tr>
<td class="headerItem">Test:</td>
<td class="headerValue">TicketNFT Coverage</td>
<td></td>
<td class="headerItem">Lines:</td>
<td class="headerCovTableEntry">113</td>
<td class="headerCovTableEntry">140</td>
<td class="headerCovTableEntryMed">80.7 %</td>
</tr>
<tr>
<td class="headerItem">Date:</td>
<td class="headerValue">2023-02-21 16:00:17</td>
<td></td>
<td class="headerItem">Functions:</td>
<td class="headerCovTableEntry">31</td>
<td class="headerCovTableEntry">38</td>
<td class="headerCovTableEntryMed">81.6 %</td>
</tr>
<tr>
<td class="headerItem">Legend:</td>
<td class="headerValueLeg"> Rating:
<span class="coverLegendCovLo" title="Coverage rates below 75 % are classified as low">low: &lt; 75 %</span>
<span class="coverLegendCovMed" title="Coverage rates between 75 % and 90 % are classified as medium">medium: &gt;= 75 %</span>
<span class="coverLegendCovHi" title="Coverage rates of 90 % and more are classified as high">high: &gt;= 90 %</span>
</td>
<td></td>
<td class="headerItem">Branches:</td>
<td class="headerCovTableEntry">64</td>
<td class="headerCovTableEntry">74</td>
<td class="headerCovTableEntryMed">86.5 %</td>
</tr>
<tr><td><img src="glass.png" width=3 height=3 alt=""></td></tr>
</table>
</td>
</tr>
<tr><td class="ruler"><img src="glass.png" width=3 height=3 alt=""></td></tr>
</table>
<center>
<table width="80%" cellpadding=1 cellspacing=1 border=0>
<tr>
<td width="44%"><br></td>
<td width="8%"></td>
<td width="8%"></td>
<td width="8%"></td>
<td width="8%"></td>
<td width="8%"></td>
<td width="8%"></td>
<td width="8%"></td>
</tr>
<tr>
<td class="tableHead">Directory <span class="tableHeadSort"><a href="index.html"><img src="updown.png" width=10 height=14 alt="Sort by name" title="Sort by name" border=0></a></span></td>
<td class="tableHead" colspan=3>Line Coverage <span class="tableHeadSort"><img src="glass.png" width=10 height=14 alt="Sort by line coverage" title="Sort by line coverage" border=0></span></td>
<td class="tableHead" colspan=2>Functions <span class="tableHeadSort"><a href="index-sort-f.html"><img src="updown.png" width=10 height=14 alt="Sort by function coverage" title="Sort by function coverage" border=0></a></span></td>
<td class="tableHead" colspan=2>Branches <span class="tableHeadSort"><a href="index-sort-b.html"><img src="updown.png" width=10 height=14 alt="Sort by branch coverage" title="Sort by branch coverage" border=0></a></span></td>
</tr>
<tr>
<td class="coverFile"><a href="test/index.html">test</a></td>
<td class="coverBar" align="center">
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="snow.png" width=100 height=10 alt="0.0%"></td></tr></table>
</td>
<td class="coverPerLo">0.0&nbsp;%</td>
<td class="coverNumLo">0 / 10</td>
<td class="coverPerLo">0.0&nbsp;%</td>
<td class="coverNumLo">0 / 3</td>
<td class="coverPerHi">-</td>
<td class="coverNumHi">0 / 0</td>
</tr>
<tr>
<td class="coverFile"><a href="src/contracts/index.html">src/contracts</a></td>
<td class="coverBar" align="center">
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="amber.png" width=87 height=10 alt="86.9%"><img src="snow.png" width=13 height=10 alt="86.9%"></td></tr></table>
</td>
<td class="coverPerMed">86.9&nbsp;%</td>
<td class="coverNumMed">113 / 130</td>
<td class="coverPerMed">88.6&nbsp;%</td>
<td class="coverNumMed">31 / 35</td>
<td class="coverPerMed">86.5&nbsp;%</td>
<td class="coverNumMed">64 / 74</td>
</tr>
</table>
</center>
<br>
<table width="100%" border=0 cellspacing=0 cellpadding=0>
<tr><td class="ruler"><img src="glass.png" width=3 height=3 alt=""></td></tr>
<tr><td class="versionInfo">Generated by: <a href="http://ltp.sourceforge.net/coverage/lcov.php">LCOV version 1.14</a></td></tr>
</table>
<br>
</body>
</html>

123
coverage/index.html Normal file
View file

@ -0,0 +1,123 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>LCOV - TicketNFT Coverage</title>
<link rel="stylesheet" type="text/css" href="gcov.css">
</head>
<body>
<table width="100%" border=0 cellspacing=0 cellpadding=0>
<tr><td class="title">LCOV - code coverage report</td></tr>
<tr><td class="ruler"><img src="glass.png" width=3 height=3 alt=""></td></tr>
<tr>
<td width="100%">
<table cellpadding=1 border=0 width="100%">
<tr>
<td width="10%" class="headerItem">Current view:</td>
<td width="35%" class="headerValue">top level</td>
<td width="5%"></td>
<td width="15%"></td>
<td width="10%" class="headerCovTableHead">Hit</td>
<td width="10%" class="headerCovTableHead">Total</td>
<td width="15%" class="headerCovTableHead">Coverage</td>
</tr>
<tr>
<td class="headerItem">Test:</td>
<td class="headerValue">TicketNFT Coverage</td>
<td></td>
<td class="headerItem">Lines:</td>
<td class="headerCovTableEntry">113</td>
<td class="headerCovTableEntry">140</td>
<td class="headerCovTableEntryMed">80.7 %</td>
</tr>
<tr>
<td class="headerItem">Date:</td>
<td class="headerValue">2023-02-21 16:00:17</td>
<td></td>
<td class="headerItem">Functions:</td>
<td class="headerCovTableEntry">31</td>
<td class="headerCovTableEntry">38</td>
<td class="headerCovTableEntryMed">81.6 %</td>
</tr>
<tr>
<td class="headerItem">Legend:</td>
<td class="headerValueLeg"> Rating:
<span class="coverLegendCovLo" title="Coverage rates below 75 % are classified as low">low: &lt; 75 %</span>
<span class="coverLegendCovMed" title="Coverage rates between 75 % and 90 % are classified as medium">medium: &gt;= 75 %</span>
<span class="coverLegendCovHi" title="Coverage rates of 90 % and more are classified as high">high: &gt;= 90 %</span>
</td>
<td></td>
<td class="headerItem">Branches:</td>
<td class="headerCovTableEntry">64</td>
<td class="headerCovTableEntry">74</td>
<td class="headerCovTableEntryMed">86.5 %</td>
</tr>
<tr><td><img src="glass.png" width=3 height=3 alt=""></td></tr>
</table>
</td>
</tr>
<tr><td class="ruler"><img src="glass.png" width=3 height=3 alt=""></td></tr>
</table>
<center>
<table width="80%" cellpadding=1 cellspacing=1 border=0>
<tr>
<td width="44%"><br></td>
<td width="8%"></td>
<td width="8%"></td>
<td width="8%"></td>
<td width="8%"></td>
<td width="8%"></td>
<td width="8%"></td>
<td width="8%"></td>
</tr>
<tr>
<td class="tableHead">Directory <span class="tableHeadSort"><img src="glass.png" width=10 height=14 alt="Sort by name" title="Sort by name" border=0></span></td>
<td class="tableHead" colspan=3>Line Coverage <span class="tableHeadSort"><a href="index-sort-l.html"><img src="updown.png" width=10 height=14 alt="Sort by line coverage" title="Sort by line coverage" border=0></a></span></td>
<td class="tableHead" colspan=2>Functions <span class="tableHeadSort"><a href="index-sort-f.html"><img src="updown.png" width=10 height=14 alt="Sort by function coverage" title="Sort by function coverage" border=0></a></span></td>
<td class="tableHead" colspan=2>Branches <span class="tableHeadSort"><a href="index-sort-b.html"><img src="updown.png" width=10 height=14 alt="Sort by branch coverage" title="Sort by branch coverage" border=0></a></span></td>
</tr>
<tr>
<td class="coverFile"><a href="src/contracts/index.html">src/contracts</a></td>
<td class="coverBar" align="center">
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="amber.png" width=87 height=10 alt="86.9%"><img src="snow.png" width=13 height=10 alt="86.9%"></td></tr></table>
</td>
<td class="coverPerMed">86.9&nbsp;%</td>
<td class="coverNumMed">113 / 130</td>
<td class="coverPerMed">88.6&nbsp;%</td>
<td class="coverNumMed">31 / 35</td>
<td class="coverPerMed">86.5&nbsp;%</td>
<td class="coverNumMed">64 / 74</td>
</tr>
<tr>
<td class="coverFile"><a href="test/index.html">test</a></td>
<td class="coverBar" align="center">
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="snow.png" width=100 height=10 alt="0.0%"></td></tr></table>
</td>
<td class="coverPerLo">0.0&nbsp;%</td>
<td class="coverNumLo">0 / 10</td>
<td class="coverPerLo">0.0&nbsp;%</td>
<td class="coverNumLo">0 / 3</td>
<td class="coverPerHi">-</td>
<td class="coverNumHi">0 / 0</td>
</tr>
</table>
</center>
<br>
<table width="100%" border=0 cellspacing=0 cellpadding=0>
<tr><td class="ruler"><img src="glass.png" width=3 height=3 alt=""></td></tr>
<tr><td class="versionInfo">Generated by: <a href="http://ltp.sourceforge.net/coverage/lcov.php">LCOV version 1.14</a></td></tr>
</table>
<br>
</body>
</html>

BIN
coverage/ruby.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 141 B

BIN
coverage/snow.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 141 B

View file

@ -0,0 +1,172 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>LCOV - TicketNFT Coverage - src/contracts/PurchaseToken.sol - functions</title>
<link rel="stylesheet" type="text/css" href="../../gcov.css">
</head>
<body>
<table width="100%" border=0 cellspacing=0 cellpadding=0>
<tr><td class="title">LCOV - code coverage report</td></tr>
<tr><td class="ruler"><img src="../../glass.png" width=3 height=3 alt=""></td></tr>
<tr>
<td width="100%">
<table cellpadding=1 border=0 width="100%">
<tr>
<td width="10%" class="headerItem">Current view:</td>
<td width="35%" class="headerValue"><a href="../../index.html">top level</a> - <a href="index.html">src/contracts</a> - PurchaseToken.sol<span style="font-size: 80%;"> (<a href="PurchaseToken.sol.gcov.html">source</a> / functions)</span></td>
<td width="5%"></td>
<td width="15%"></td>
<td width="10%" class="headerCovTableHead">Hit</td>
<td width="10%" class="headerCovTableHead">Total</td>
<td width="15%" class="headerCovTableHead">Coverage</td>
</tr>
<tr>
<td class="headerItem">Test:</td>
<td class="headerValue">TicketNFT Coverage</td>
<td></td>
<td class="headerItem">Lines:</td>
<td class="headerCovTableEntry">42</td>
<td class="headerCovTableEntry">59</td>
<td class="headerCovTableEntryLo">71.2 %</td>
</tr>
<tr>
<td class="headerItem">Date:</td>
<td class="headerValue">2023-02-21 16:00:17</td>
<td></td>
<td class="headerItem">Functions:</td>
<td class="headerCovTableEntry">17</td>
<td class="headerCovTableEntry">21</td>
<td class="headerCovTableEntryMed">81.0 %</td>
</tr>
<tr>
<td class="headerItem">Legend:</td>
<td class="headerValueLeg"> Lines:
<span class="coverLegendCov">hit</span>
<span class="coverLegendNoCov">not hit</span>
| Branches:
<span class="coverLegendCov">+</span> taken
<span class="coverLegendNoCov">-</span> not taken
<span class="coverLegendNoCov">#</span> not executed
</td>
<td></td>
<td class="headerItem">Branches:</td>
<td class="headerCovTableEntry">12</td>
<td class="headerCovTableEntry">22</td>
<td class="headerCovTableEntryLo">54.5 %</td>
</tr>
<tr><td><img src="../../glass.png" width=3 height=3 alt=""></td></tr>
</table>
</td>
</tr>
<tr><td class="ruler"><img src="../../glass.png" width=3 height=3 alt=""></td></tr>
</table>
<center>
<table width="60%" cellpadding=1 cellspacing=1 border=0>
<tr><td><br></td></tr>
<tr>
<td width="80%" class="tableHead">Function Name <span class="tableHeadSort"><a href="PurchaseToken.sol.func.html"><img src="../../updown.png" width=10 height=14 alt="Sort by function name" title="Sort by function name" border=0></a></span></td>
<td width="20%" class="tableHead">Hit count <span class="tableHeadSort"><img src="../../glass.png" width=10 height=14 alt="Sort by hit count" title="Sort by hit count" border=0></span></td>
</tr>
<tr>
<td class="coverFn"><a href="PurchaseToken.sol.gcov.html#20">Context._msgData</a></td>
<td class="coverFnLo">0</td>
</tr>
<tr>
<td class="coverFn"><a href="PurchaseToken.sol.gcov.html#342">PurchaseToken._burn</a></td>
<td class="coverFnLo">0</td>
</tr>
<tr>
<td class="coverFn"><a href="PurchaseToken.sol.gcov.html#248">PurchaseToken.decreaseAllowance</a></td>
<td class="coverFnLo">0</td>
</tr>
<tr>
<td class="coverFn"><a href="PurchaseToken.sol.gcov.html#224">PurchaseToken.increaseAllowance</a></td>
<td class="coverFnLo">0</td>
</tr>
<tr>
<td class="coverFn"><a href="PurchaseToken.sol.gcov.html#99">PurchaseToken.decimals</a></td>
<td class="coverFnHi">1</td>
</tr>
<tr>
<td class="coverFn"><a href="PurchaseToken.sol.gcov.html#77">PurchaseToken.name</a></td>
<td class="coverFnHi">1</td>
</tr>
<tr>
<td class="coverFn"><a href="PurchaseToken.sol.gcov.html#85">PurchaseToken.symbol</a></td>
<td class="coverFnHi">1</td>
</tr>
<tr>
<td class="coverFn"><a href="PurchaseToken.sol.gcov.html#140">PurchaseToken.transfer</a></td>
<td class="coverFnHi">2</td>
</tr>
<tr>
<td class="coverFn"><a href="PurchaseToken.sol.gcov.html#106">PurchaseToken.totalSupply</a></td>
<td class="coverFnHi">4</td>
</tr>
<tr>
<td class="coverFn"><a href="PurchaseToken.sol.gcov.html#113">PurchaseToken.balanceOf</a></td>
<td class="coverFnHi">12</td>
</tr>
<tr>
<td class="coverFn"><a href="PurchaseToken.sol.gcov.html#393">PurchaseToken._spendAllowance</a></td>
<td class="coverFnHi">43</td>
</tr>
<tr>
<td class="coverFn"><a href="PurchaseToken.sol.gcov.html#201">PurchaseToken.transferFrom</a></td>
<td class="coverFnHi">43</td>
</tr>
<tr>
<td class="coverFn"><a href="PurchaseToken.sol.gcov.html#280">PurchaseToken._transfer</a></td>
<td class="coverFnHi">44</td>
</tr>
<tr>
<td class="coverFn"><a href="PurchaseToken.sol.gcov.html#154">PurchaseToken.allowance</a></td>
<td class="coverFnHi">45</td>
</tr>
<tr>
<td class="coverFn"><a href="PurchaseToken.sol.gcov.html#174">PurchaseToken.approve</a></td>
<td class="coverFnHi">48</td>
</tr>
<tr>
<td class="coverFn"><a href="PurchaseToken.sol.gcov.html#316">PurchaseToken._mint</a></td>
<td class="coverFnHi">52</td>
</tr>
<tr>
<td class="coverFn"><a href="PurchaseToken.sol.gcov.html#127">PurchaseToken.mint</a></td>
<td class="coverFnHi">52</td>
</tr>
<tr>
<td class="coverFn"><a href="PurchaseToken.sol.gcov.html#373">PurchaseToken._approve</a></td>
<td class="coverFnHi">90</td>
</tr>
<tr>
<td class="coverFn"><a href="PurchaseToken.sol.gcov.html#444">PurchaseToken._afterTokenTransfer</a></td>
<td class="coverFnHi">92</td>
</tr>
<tr>
<td class="coverFn"><a href="PurchaseToken.sol.gcov.html#16">Context._msgSender</a></td>
<td class="coverFnHi">93</td>
</tr>
<tr>
<td class="coverFn"><a href="PurchaseToken.sol.gcov.html#424">PurchaseToken._beforeTokenTransfer</a></td>
<td class="coverFnHi">95</td>
</tr>
</table>
<br>
</center>
<table width="100%" border=0 cellspacing=0 cellpadding=0>
<tr><td class="ruler"><img src="../../glass.png" width=3 height=3 alt=""></td></tr>
<tr><td class="versionInfo">Generated by: <a href="http://ltp.sourceforge.net/coverage/lcov.php" target="_parent">LCOV version 1.14</a></td></tr>
</table>
<br>
</body>
</html>

View file

@ -0,0 +1,172 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>LCOV - TicketNFT Coverage - src/contracts/PurchaseToken.sol - functions</title>
<link rel="stylesheet" type="text/css" href="../../gcov.css">
</head>
<body>
<table width="100%" border=0 cellspacing=0 cellpadding=0>
<tr><td class="title">LCOV - code coverage report</td></tr>
<tr><td class="ruler"><img src="../../glass.png" width=3 height=3 alt=""></td></tr>
<tr>
<td width="100%">
<table cellpadding=1 border=0 width="100%">
<tr>
<td width="10%" class="headerItem">Current view:</td>
<td width="35%" class="headerValue"><a href="../../index.html">top level</a> - <a href="index.html">src/contracts</a> - PurchaseToken.sol<span style="font-size: 80%;"> (<a href="PurchaseToken.sol.gcov.html">source</a> / functions)</span></td>
<td width="5%"></td>
<td width="15%"></td>
<td width="10%" class="headerCovTableHead">Hit</td>
<td width="10%" class="headerCovTableHead">Total</td>
<td width="15%" class="headerCovTableHead">Coverage</td>
</tr>
<tr>
<td class="headerItem">Test:</td>
<td class="headerValue">TicketNFT Coverage</td>
<td></td>
<td class="headerItem">Lines:</td>
<td class="headerCovTableEntry">42</td>
<td class="headerCovTableEntry">59</td>
<td class="headerCovTableEntryLo">71.2 %</td>
</tr>
<tr>
<td class="headerItem">Date:</td>
<td class="headerValue">2023-02-21 16:00:17</td>
<td></td>
<td class="headerItem">Functions:</td>
<td class="headerCovTableEntry">17</td>
<td class="headerCovTableEntry">21</td>
<td class="headerCovTableEntryMed">81.0 %</td>
</tr>
<tr>
<td class="headerItem">Legend:</td>
<td class="headerValueLeg"> Lines:
<span class="coverLegendCov">hit</span>
<span class="coverLegendNoCov">not hit</span>
| Branches:
<span class="coverLegendCov">+</span> taken
<span class="coverLegendNoCov">-</span> not taken
<span class="coverLegendNoCov">#</span> not executed
</td>
<td></td>
<td class="headerItem">Branches:</td>
<td class="headerCovTableEntry">12</td>
<td class="headerCovTableEntry">22</td>
<td class="headerCovTableEntryLo">54.5 %</td>
</tr>
<tr><td><img src="../../glass.png" width=3 height=3 alt=""></td></tr>
</table>
</td>
</tr>
<tr><td class="ruler"><img src="../../glass.png" width=3 height=3 alt=""></td></tr>
</table>
<center>
<table width="60%" cellpadding=1 cellspacing=1 border=0>
<tr><td><br></td></tr>
<tr>
<td width="80%" class="tableHead">Function Name <span class="tableHeadSort"><img src="../../glass.png" width=10 height=14 alt="Sort by function name" title="Sort by function name" border=0></span></td>
<td width="20%" class="tableHead">Hit count <span class="tableHeadSort"><a href="PurchaseToken.sol.func-sort-c.html"><img src="../../updown.png" width=10 height=14 alt="Sort by hit count" title="Sort by hit count" border=0></a></span></td>
</tr>
<tr>
<td class="coverFn"><a href="PurchaseToken.sol.gcov.html#20">Context._msgData</a></td>
<td class="coverFnLo">0</td>
</tr>
<tr>
<td class="coverFn"><a href="PurchaseToken.sol.gcov.html#16">Context._msgSender</a></td>
<td class="coverFnHi">93</td>
</tr>
<tr>
<td class="coverFn"><a href="PurchaseToken.sol.gcov.html#444">PurchaseToken._afterTokenTransfer</a></td>
<td class="coverFnHi">92</td>
</tr>
<tr>
<td class="coverFn"><a href="PurchaseToken.sol.gcov.html#373">PurchaseToken._approve</a></td>
<td class="coverFnHi">90</td>
</tr>
<tr>
<td class="coverFn"><a href="PurchaseToken.sol.gcov.html#424">PurchaseToken._beforeTokenTransfer</a></td>
<td class="coverFnHi">95</td>
</tr>
<tr>
<td class="coverFn"><a href="PurchaseToken.sol.gcov.html#342">PurchaseToken._burn</a></td>
<td class="coverFnLo">0</td>
</tr>
<tr>
<td class="coverFn"><a href="PurchaseToken.sol.gcov.html#316">PurchaseToken._mint</a></td>
<td class="coverFnHi">52</td>
</tr>
<tr>
<td class="coverFn"><a href="PurchaseToken.sol.gcov.html#393">PurchaseToken._spendAllowance</a></td>
<td class="coverFnHi">43</td>
</tr>
<tr>
<td class="coverFn"><a href="PurchaseToken.sol.gcov.html#280">PurchaseToken._transfer</a></td>
<td class="coverFnHi">44</td>
</tr>
<tr>
<td class="coverFn"><a href="PurchaseToken.sol.gcov.html#154">PurchaseToken.allowance</a></td>
<td class="coverFnHi">45</td>
</tr>
<tr>
<td class="coverFn"><a href="PurchaseToken.sol.gcov.html#174">PurchaseToken.approve</a></td>
<td class="coverFnHi">48</td>
</tr>
<tr>
<td class="coverFn"><a href="PurchaseToken.sol.gcov.html#113">PurchaseToken.balanceOf</a></td>
<td class="coverFnHi">12</td>
</tr>
<tr>
<td class="coverFn"><a href="PurchaseToken.sol.gcov.html#99">PurchaseToken.decimals</a></td>
<td class="coverFnHi">1</td>
</tr>
<tr>
<td class="coverFn"><a href="PurchaseToken.sol.gcov.html#248">PurchaseToken.decreaseAllowance</a></td>
<td class="coverFnLo">0</td>
</tr>
<tr>
<td class="coverFn"><a href="PurchaseToken.sol.gcov.html#224">PurchaseToken.increaseAllowance</a></td>
<td class="coverFnLo">0</td>
</tr>
<tr>
<td class="coverFn"><a href="PurchaseToken.sol.gcov.html#127">PurchaseToken.mint</a></td>
<td class="coverFnHi">52</td>
</tr>
<tr>
<td class="coverFn"><a href="PurchaseToken.sol.gcov.html#77">PurchaseToken.name</a></td>
<td class="coverFnHi">1</td>
</tr>
<tr>
<td class="coverFn"><a href="PurchaseToken.sol.gcov.html#85">PurchaseToken.symbol</a></td>
<td class="coverFnHi">1</td>
</tr>
<tr>
<td class="coverFn"><a href="PurchaseToken.sol.gcov.html#106">PurchaseToken.totalSupply</a></td>
<td class="coverFnHi">4</td>
</tr>
<tr>
<td class="coverFn"><a href="PurchaseToken.sol.gcov.html#140">PurchaseToken.transfer</a></td>
<td class="coverFnHi">2</td>
</tr>
<tr>
<td class="coverFn"><a href="PurchaseToken.sol.gcov.html#201">PurchaseToken.transferFrom</a></td>
<td class="coverFnHi">43</td>
</tr>
</table>
<br>
</center>
<table width="100%" border=0 cellspacing=0 cellpadding=0>
<tr><td class="ruler"><img src="../../glass.png" width=3 height=3 alt=""></td></tr>
<tr><td class="versionInfo">Generated by: <a href="http://ltp.sourceforge.net/coverage/lcov.php" target="_parent">LCOV version 1.14</a></td></tr>
</table>
<br>
</body>
</html>

View file

@ -0,0 +1,543 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>LCOV - TicketNFT Coverage - src/contracts/PurchaseToken.sol</title>
<link rel="stylesheet" type="text/css" href="../../gcov.css">
</head>
<body>
<table width="100%" border=0 cellspacing=0 cellpadding=0>
<tr><td class="title">LCOV - code coverage report</td></tr>
<tr><td class="ruler"><img src="../../glass.png" width=3 height=3 alt=""></td></tr>
<tr>
<td width="100%">
<table cellpadding=1 border=0 width="100%">
<tr>
<td width="10%" class="headerItem">Current view:</td>
<td width="35%" class="headerValue"><a href="../../index.html">top level</a> - <a href="index.html">src/contracts</a> - PurchaseToken.sol<span style="font-size: 80%;"> (source / <a href="PurchaseToken.sol.func-sort-c.html">functions</a>)</span></td>
<td width="5%"></td>
<td width="15%"></td>
<td width="10%" class="headerCovTableHead">Hit</td>
<td width="10%" class="headerCovTableHead">Total</td>
<td width="15%" class="headerCovTableHead">Coverage</td>
</tr>
<tr>
<td class="headerItem">Test:</td>
<td class="headerValue">TicketNFT Coverage</td>
<td></td>
<td class="headerItem">Lines:</td>
<td class="headerCovTableEntry">42</td>
<td class="headerCovTableEntry">59</td>
<td class="headerCovTableEntryLo">71.2 %</td>
</tr>
<tr>
<td class="headerItem">Date:</td>
<td class="headerValue">2023-02-21 16:00:17</td>
<td></td>
<td class="headerItem">Functions:</td>
<td class="headerCovTableEntry">17</td>
<td class="headerCovTableEntry">21</td>
<td class="headerCovTableEntryMed">81.0 %</td>
</tr>
<tr>
<td class="headerItem">Legend:</td>
<td class="headerValueLeg"> Lines:
<span class="coverLegendCov">hit</span>
<span class="coverLegendNoCov">not hit</span>
| Branches:
<span class="coverLegendCov">+</span> taken
<span class="coverLegendNoCov">-</span> not taken
<span class="coverLegendNoCov">#</span> not executed
</td>
<td></td>
<td class="headerItem">Branches:</td>
<td class="headerCovTableEntry">12</td>
<td class="headerCovTableEntry">22</td>
<td class="headerCovTableEntryLo">54.5 %</td>
</tr>
<tr><td><img src="../../glass.png" width=3 height=3 alt=""></td></tr>
</table>
</td>
</tr>
<tr><td class="ruler"><img src="../../glass.png" width=3 height=3 alt=""></td></tr>
</table>
<table cellpadding=0 cellspacing=0 border=0>
<tr>
<td><br></td>
</tr>
<tr>
<td>
<pre class="sourceHeading"> Branch data Line data Source code</pre>
<pre class="source">
<a name="1"><span class="lineNum"> 1 </span> : : // SPDX-License-Identifier: MIT</a>
<a name="2"><span class="lineNum"> 2 </span> : : // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/ERC20.sol)</a>
<a name="3"><span class="lineNum"> 3 </span> : : pragma solidity ^0.8.10;</a>
<a name="4"><span class="lineNum"> 4 </span> : : </a>
<a name="5"><span class="lineNum"> 5 </span> : : import &quot;../interfaces/IERC20.sol&quot;;</a>
<a name="6"><span class="lineNum"> 6 </span> : : </a>
<a name="7"><span class="lineNum"> 7 </span> : : /**</a>
<a name="8"><span class="lineNum"> 8 </span> : : * @dev Provides information about the current execution context, including the</a>
<a name="9"><span class="lineNum"> 9 </span> : : * sender of the transaction and its data. While these are generally available</a>
<a name="10"><span class="lineNum"> 10 </span> : : * via msg.sender and msg.data, they should not be accessed in such a direct</a>
<a name="11"><span class="lineNum"> 11 </span> : : * manner, since when dealing with meta-transactions the account sending and</a>
<a name="12"><span class="lineNum"> 12 </span> : : * paying for execution may not be the actual sender (as far as an application</a>
<a name="13"><span class="lineNum"> 13 </span> : : * is concerned).</a>
<a name="14"><span class="lineNum"> 14 </span> : : *</a>
<a name="15"><span class="lineNum"> 15 </span> : : * This contract is only required for intermediate, library-like contracts.</a>
<a name="16"><span class="lineNum"> 16 </span> : : */</a>
<a name="17"><span class="lineNum"> 17 </span> : : abstract contract Context {</a>
<a name="18"><span class="lineNum"> 18 </span> : : function _msgSender() internal view virtual returns (address) {</a>
<a name="19"><span class="lineNum"> 19 </span> :<span class="lineCov"> 93 : return msg.sender;</span></a>
<a name="20"><span class="lineNum"> 20 </span> : : }</a>
<a name="21"><span class="lineNum"> 21 </span> : : </a>
<a name="22"><span class="lineNum"> 22 </span> : : function _msgData() internal view virtual returns (bytes calldata) {</a>
<a name="23"><span class="lineNum"> 23 </span> :<span class="lineNoCov"> 0 : return msg.data;</span></a>
<a name="24"><span class="lineNum"> 24 </span> : : }</a>
<a name="25"><span class="lineNum"> 25 </span> : : }</a>
<a name="26"><span class="lineNum"> 26 </span> : : </a>
<a name="27"><span class="lineNum"> 27 </span> : : /**</a>
<a name="28"><span class="lineNum"> 28 </span> : : * @dev Implementation of the {IERC20} interface.</a>
<a name="29"><span class="lineNum"> 29 </span> : : *</a>
<a name="30"><span class="lineNum"> 30 </span> : : * This implementation is agnostic to the way tokens are created. This means</a>
<a name="31"><span class="lineNum"> 31 </span> : : * that a supply mechanism has to be added in a derived contract using {_mint}.</a>
<a name="32"><span class="lineNum"> 32 </span> : : * For a generic mechanism see {ERC20PresetMinterPauser}.</a>
<a name="33"><span class="lineNum"> 33 </span> : : *</a>
<a name="34"><span class="lineNum"> 34 </span> : : * TIP: For a detailed writeup see our guide</a>
<a name="35"><span class="lineNum"> 35 </span> : : * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How</a>
<a name="36"><span class="lineNum"> 36 </span> : : * to implement supply mechanisms].</a>
<a name="37"><span class="lineNum"> 37 </span> : : *</a>
<a name="38"><span class="lineNum"> 38 </span> : : * The default value of {decimals} is 18. To change this, you should override</a>
<a name="39"><span class="lineNum"> 39 </span> : : * this function so it returns a different value.</a>
<a name="40"><span class="lineNum"> 40 </span> : : *</a>
<a name="41"><span class="lineNum"> 41 </span> : : * We have followed general OpenZeppelin Contracts guidelines: functions revert</a>
<a name="42"><span class="lineNum"> 42 </span> : : * instead returning `false` on failure. This behavior is nonetheless</a>
<a name="43"><span class="lineNum"> 43 </span> : : * conventional and does not conflict with the expectations of ERC20</a>
<a name="44"><span class="lineNum"> 44 </span> : : * applications.</a>
<a name="45"><span class="lineNum"> 45 </span> : : *</a>
<a name="46"><span class="lineNum"> 46 </span> : : * Additionally, an {Approval} event is emitted on calls to {transferFrom}.</a>
<a name="47"><span class="lineNum"> 47 </span> : : * This allows applications to reconstruct the allowance for all accounts just</a>
<a name="48"><span class="lineNum"> 48 </span> : : * by listening to said events. Other implementations of the EIP may not emit</a>
<a name="49"><span class="lineNum"> 49 </span> : : * these events, as it isn't required by the specification.</a>
<a name="50"><span class="lineNum"> 50 </span> : : *</a>
<a name="51"><span class="lineNum"> 51 </span> : : * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}</a>
<a name="52"><span class="lineNum"> 52 </span> : : * functions have been added to mitigate the well-known issues around setting</a>
<a name="53"><span class="lineNum"> 53 </span> : : * allowances. See {IERC20-approve}.</a>
<a name="54"><span class="lineNum"> 54 </span> : : */</a>
<a name="55"><span class="lineNum"> 55 </span> : : contract PurchaseToken is Context, IERC20, IERC20Metadata {</a>
<a name="56"><span class="lineNum"> 56 </span> : : mapping(address =&gt; uint256) private _balances;</a>
<a name="57"><span class="lineNum"> 57 </span> : : </a>
<a name="58"><span class="lineNum"> 58 </span> : : mapping(address =&gt; mapping(address =&gt; uint256)) private _allowances;</a>
<a name="59"><span class="lineNum"> 59 </span> : : </a>
<a name="60"><span class="lineNum"> 60 </span> : : uint256 private _totalSupply;</a>
<a name="61"><span class="lineNum"> 61 </span> : : </a>
<a name="62"><span class="lineNum"> 62 </span> : : string private _name;</a>
<a name="63"><span class="lineNum"> 63 </span> : : string private _symbol;</a>
<a name="64"><span class="lineNum"> 64 </span> : : </a>
<a name="65"><span class="lineNum"> 65 </span> : : /**</a>
<a name="66"><span class="lineNum"> 66 </span> : : * @dev Sets the values for {name} and {symbol}.</a>
<a name="67"><span class="lineNum"> 67 </span> : : *</a>
<a name="68"><span class="lineNum"> 68 </span> : : * All two of these values are immutable: they can only be set once during</a>
<a name="69"><span class="lineNum"> 69 </span> : : * construction.</a>
<a name="70"><span class="lineNum"> 70 </span> : : */</a>
<a name="71"><span class="lineNum"> 71 </span> : : constructor() {</a>
<a name="72"><span class="lineNum"> 72 </span> : : _name = &quot;PurchaseToken&quot;;</a>
<a name="73"><span class="lineNum"> 73 </span> : : _symbol = &quot;PT&quot;;</a>
<a name="74"><span class="lineNum"> 74 </span> : : }</a>
<a name="75"><span class="lineNum"> 75 </span> : : </a>
<a name="76"><span class="lineNum"> 76 </span> : : /**</a>
<a name="77"><span class="lineNum"> 77 </span> : : * @dev Returns the name of the token.</a>
<a name="78"><span class="lineNum"> 78 </span> : : */</a>
<a name="79"><span class="lineNum"> 79 </span> : : function name() public view virtual override returns (string memory) {</a>
<a name="80"><span class="lineNum"> 80 </span> :<span class="lineCov"> 1 : return _name;</span></a>
<a name="81"><span class="lineNum"> 81 </span> : : }</a>
<a name="82"><span class="lineNum"> 82 </span> : : </a>
<a name="83"><span class="lineNum"> 83 </span> : : /**</a>
<a name="84"><span class="lineNum"> 84 </span> : : * @dev Returns the symbol of the token, usually a shorter version of the</a>
<a name="85"><span class="lineNum"> 85 </span> : : * name.</a>
<a name="86"><span class="lineNum"> 86 </span> : : */</a>
<a name="87"><span class="lineNum"> 87 </span> : : function symbol() public view virtual override returns (string memory) {</a>
<a name="88"><span class="lineNum"> 88 </span> :<span class="lineCov"> 1 : return _symbol;</span></a>
<a name="89"><span class="lineNum"> 89 </span> : : }</a>
<a name="90"><span class="lineNum"> 90 </span> : : </a>
<a name="91"><span class="lineNum"> 91 </span> : : /**</a>
<a name="92"><span class="lineNum"> 92 </span> : : * @dev Returns the number of decimals used to get its user representation.</a>
<a name="93"><span class="lineNum"> 93 </span> : : * For example, if `decimals` equals `18`, a balance of `5e18` tokens should</a>
<a name="94"><span class="lineNum"> 94 </span> : : * be displayed to a user as `5.00` (`5e18 / 10 ** 18`).</a>
<a name="95"><span class="lineNum"> 95 </span> : : *</a>
<a name="96"><span class="lineNum"> 96 </span> : : * Tokens usually opt for a value of 18, imitating the relationship between</a>
<a name="97"><span class="lineNum"> 97 </span> : : * Ether and Wei. This is the default value returned by this function, unless</a>
<a name="98"><span class="lineNum"> 98 </span> : : * it's overridden.</a>
<a name="99"><span class="lineNum"> 99 </span> : : *</a>
<a name="100"><span class="lineNum"> 100 </span> : : */</a>
<a name="101"><span class="lineNum"> 101 </span> : : function decimals() public view virtual override returns (uint8) {</a>
<a name="102"><span class="lineNum"> 102 </span> :<span class="lineCov"> 1 : return 18;</span></a>
<a name="103"><span class="lineNum"> 103 </span> : : }</a>
<a name="104"><span class="lineNum"> 104 </span> : : </a>
<a name="105"><span class="lineNum"> 105 </span> : : /**</a>
<a name="106"><span class="lineNum"> 106 </span> : : * @dev See {IERC20-totalSupply}.</a>
<a name="107"><span class="lineNum"> 107 </span> : : */</a>
<a name="108"><span class="lineNum"> 108 </span> : : function totalSupply() public view virtual override returns (uint256) {</a>
<a name="109"><span class="lineNum"> 109 </span> :<span class="lineCov"> 4 : return _totalSupply;</span></a>
<a name="110"><span class="lineNum"> 110 </span> : : }</a>
<a name="111"><span class="lineNum"> 111 </span> : : </a>
<a name="112"><span class="lineNum"> 112 </span> : : /**</a>
<a name="113"><span class="lineNum"> 113 </span> : : * @dev See {IERC20-balanceOf}.</a>
<a name="114"><span class="lineNum"> 114 </span> : : */</a>
<a name="115"><span class="lineNum"> 115 </span> : : function balanceOf(address account)</a>
<a name="116"><span class="lineNum"> 116 </span> : : public</a>
<a name="117"><span class="lineNum"> 117 </span> : : view</a>
<a name="118"><span class="lineNum"> 118 </span> : : virtual</a>
<a name="119"><span class="lineNum"> 119 </span> : : override</a>
<a name="120"><span class="lineNum"> 120 </span> : : returns (uint256)</a>
<a name="121"><span class="lineNum"> 121 </span> : : {</a>
<a name="122"><span class="lineNum"> 122 </span> :<span class="lineCov"> 12 : return _balances[account];</span></a>
<a name="123"><span class="lineNum"> 123 </span> : : }</a>
<a name="124"><span class="lineNum"> 124 </span> : : </a>
<a name="125"><span class="lineNum"> 125 </span> : : /**</a>
<a name="126"><span class="lineNum"> 126 </span> : : * @dev This allows users to mint ERC20 tokens by sending ETH to this contract.</a>
<a name="127"><span class="lineNum"> 127 </span> : : * The amount of ERC20 tokens minted will be 100 times the amount of ETH sent.</a>
<a name="128"><span class="lineNum"> 128 </span> : : */</a>
<a name="129"><span class="lineNum"> 129 </span> : : function mint() external payable {</a>
<a name="130"><span class="lineNum"> 130 </span> :<span class="lineCov"> 52 : uint256 amountToMint = msg.value * 100;</span></a>
<a name="131"><span class="lineNum"> 131 </span> :<span class="lineCov"> 52 : _mint(msg.sender, amountToMint);</span></a>
<a name="132"><span class="lineNum"> 132 </span> : : }</a>
<a name="133"><span class="lineNum"> 133 </span> : : </a>
<a name="134"><span class="lineNum"> 134 </span> : : /**</a>
<a name="135"><span class="lineNum"> 135 </span> : : * @dev See {IERC20-transfer}.</a>
<a name="136"><span class="lineNum"> 136 </span> : : *</a>
<a name="137"><span class="lineNum"> 137 </span> : : * Requirements:</a>
<a name="138"><span class="lineNum"> 138 </span> : : *</a>
<a name="139"><span class="lineNum"> 139 </span> : : * - `to` cannot be the zero address.</a>
<a name="140"><span class="lineNum"> 140 </span> : : * - the caller must have a balance of at least `amount`.</a>
<a name="141"><span class="lineNum"> 141 </span> : : */</a>
<a name="142"><span class="lineNum"> 142 </span> : : function transfer(address to, uint256 amount)</a>
<a name="143"><span class="lineNum"> 143 </span> : : public</a>
<a name="144"><span class="lineNum"> 144 </span> : : virtual</a>
<a name="145"><span class="lineNum"> 145 </span> : : override</a>
<a name="146"><span class="lineNum"> 146 </span> : : returns (bool)</a>
<a name="147"><span class="lineNum"> 147 </span> : : {</a>
<a name="148"><span class="lineNum"> 148 </span> :<span class="lineCov"> 2 : address owner = _msgSender();</span></a>
<a name="149"><span class="lineNum"> 149 </span> :<span class="lineCov"> 2 : _transfer(owner, to, amount);</span></a>
<a name="150"><span class="lineNum"> 150 </span> :<span class="lineCov"> 1 : return true;</span></a>
<a name="151"><span class="lineNum"> 151 </span> : : }</a>
<a name="152"><span class="lineNum"> 152 </span> : : </a>
<a name="153"><span class="lineNum"> 153 </span> : : /**</a>
<a name="154"><span class="lineNum"> 154 </span> : : * @dev See {IERC20-allowance}.</a>
<a name="155"><span class="lineNum"> 155 </span> : : */</a>
<a name="156"><span class="lineNum"> 156 </span> : : function allowance(address owner, address spender)</a>
<a name="157"><span class="lineNum"> 157 </span> : : public</a>
<a name="158"><span class="lineNum"> 158 </span> : : view</a>
<a name="159"><span class="lineNum"> 159 </span> : : virtual</a>
<a name="160"><span class="lineNum"> 160 </span> : : override</a>
<a name="161"><span class="lineNum"> 161 </span> : : returns (uint256)</a>
<a name="162"><span class="lineNum"> 162 </span> : : {</a>
<a name="163"><span class="lineNum"> 163 </span> :<span class="lineCov"> 88 : return _allowances[owner][spender];</span></a>
<a name="164"><span class="lineNum"> 164 </span> : : }</a>
<a name="165"><span class="lineNum"> 165 </span> : : </a>
<a name="166"><span class="lineNum"> 166 </span> : : /**</a>
<a name="167"><span class="lineNum"> 167 </span> : : * @dev See {IERC20-approve}.</a>
<a name="168"><span class="lineNum"> 168 </span> : : *</a>
<a name="169"><span class="lineNum"> 169 </span> : : * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on</a>
<a name="170"><span class="lineNum"> 170 </span> : : * `transferFrom`. This is semantically equivalent to an infinite approval.</a>
<a name="171"><span class="lineNum"> 171 </span> : : *</a>
<a name="172"><span class="lineNum"> 172 </span> : : * Requirements:</a>
<a name="173"><span class="lineNum"> 173 </span> : : *</a>
<a name="174"><span class="lineNum"> 174 </span> : : * - `spender` cannot be the zero address.</a>
<a name="175"><span class="lineNum"> 175 </span> : : */</a>
<a name="176"><span class="lineNum"> 176 </span> : : function approve(address spender, uint256 amount)</a>
<a name="177"><span class="lineNum"> 177 </span> : : public</a>
<a name="178"><span class="lineNum"> 178 </span> : : virtual</a>
<a name="179"><span class="lineNum"> 179 </span> : : override</a>
<a name="180"><span class="lineNum"> 180 </span> : : returns (bool)</a>
<a name="181"><span class="lineNum"> 181 </span> : : {</a>
<a name="182"><span class="lineNum"> 182 </span> :<span class="lineCov"> 48 : address owner = _msgSender();</span></a>
<a name="183"><span class="lineNum"> 183 </span> :<span class="lineCov"> 48 : _approve(owner, spender, amount);</span></a>
<a name="184"><span class="lineNum"> 184 </span> :<span class="lineCov"> 48 : return true;</span></a>
<a name="185"><span class="lineNum"> 185 </span> : : }</a>
<a name="186"><span class="lineNum"> 186 </span> : : </a>
<a name="187"><span class="lineNum"> 187 </span> : : /**</a>
<a name="188"><span class="lineNum"> 188 </span> : : * @dev See {IERC20-transferFrom}.</a>
<a name="189"><span class="lineNum"> 189 </span> : : *</a>
<a name="190"><span class="lineNum"> 190 </span> : : * Emits an {Approval} event indicating the updated allowance. This is not</a>
<a name="191"><span class="lineNum"> 191 </span> : : * required by the EIP. See the note at the beginning of {ERC20}.</a>
<a name="192"><span class="lineNum"> 192 </span> : : *</a>
<a name="193"><span class="lineNum"> 193 </span> : : * NOTE: Does not update the allowance if the current allowance</a>
<a name="194"><span class="lineNum"> 194 </span> : : * is the maximum `uint256`.</a>
<a name="195"><span class="lineNum"> 195 </span> : : *</a>
<a name="196"><span class="lineNum"> 196 </span> : : * Requirements:</a>
<a name="197"><span class="lineNum"> 197 </span> : : *</a>
<a name="198"><span class="lineNum"> 198 </span> : : * - `from` and `to` cannot be the zero address.</a>
<a name="199"><span class="lineNum"> 199 </span> : : * - `from` must have a balance of at least `amount`.</a>
<a name="200"><span class="lineNum"> 200 </span> : : * - the caller must have allowance for ``from``'s tokens of at least</a>
<a name="201"><span class="lineNum"> 201 </span> : : * `amount`.</a>
<a name="202"><span class="lineNum"> 202 </span> : : */</a>
<a name="203"><span class="lineNum"> 203 </span> : : function transferFrom(</a>
<a name="204"><span class="lineNum"> 204 </span> : : address from,</a>
<a name="205"><span class="lineNum"> 205 </span> : : address to,</a>
<a name="206"><span class="lineNum"> 206 </span> : : uint256 amount</a>
<a name="207"><span class="lineNum"> 207 </span> : : ) public virtual override returns (bool) {</a>
<a name="208"><span class="lineNum"> 208 </span> :<span class="lineCov"> 43 : address spender = _msgSender();</span></a>
<a name="209"><span class="lineNum"> 209 </span> :<span class="lineCov"> 43 : _spendAllowance(from, spender, amount);</span></a>
<a name="210"><span class="lineNum"> 210 </span> :<span class="lineCov"> 42 : _transfer(from, to, amount);</span></a>
<a name="211"><span class="lineNum"> 211 </span> :<span class="lineCov"> 40 : return true;</span></a>
<a name="212"><span class="lineNum"> 212 </span> : : }</a>
<a name="213"><span class="lineNum"> 213 </span> : : </a>
<a name="214"><span class="lineNum"> 214 </span> : : /**</a>
<a name="215"><span class="lineNum"> 215 </span> : : * @dev Atomically increases the allowance granted to `spender` by the caller.</a>
<a name="216"><span class="lineNum"> 216 </span> : : *</a>
<a name="217"><span class="lineNum"> 217 </span> : : * This is an alternative to {approve} that can be used as a mitigation for</a>
<a name="218"><span class="lineNum"> 218 </span> : : * problems described in {IERC20-approve}.</a>
<a name="219"><span class="lineNum"> 219 </span> : : *</a>
<a name="220"><span class="lineNum"> 220 </span> : : * Emits an {Approval} event indicating the updated allowance.</a>
<a name="221"><span class="lineNum"> 221 </span> : : *</a>
<a name="222"><span class="lineNum"> 222 </span> : : * Requirements:</a>
<a name="223"><span class="lineNum"> 223 </span> : : *</a>
<a name="224"><span class="lineNum"> 224 </span> : : * - `spender` cannot be the zero address.</a>
<a name="225"><span class="lineNum"> 225 </span> : : */</a>
<a name="226"><span class="lineNum"> 226 </span> : : function increaseAllowance(address spender, uint256 addedValue)</a>
<a name="227"><span class="lineNum"> 227 </span> : : public</a>
<a name="228"><span class="lineNum"> 228 </span> : : virtual</a>
<a name="229"><span class="lineNum"> 229 </span> : : returns (bool)</a>
<a name="230"><span class="lineNum"> 230 </span> : : {</a>
<a name="231"><span class="lineNum"> 231 </span> :<span class="lineNoCov"> 0 : address owner = _msgSender();</span></a>
<a name="232"><span class="lineNum"> 232 </span> :<span class="lineNoCov"> 0 : _approve(owner, spender, allowance(owner, spender) + addedValue);</span></a>
<a name="233"><span class="lineNum"> 233 </span> :<span class="lineNoCov"> 0 : return true;</span></a>
<a name="234"><span class="lineNum"> 234 </span> : : }</a>
<a name="235"><span class="lineNum"> 235 </span> : : </a>
<a name="236"><span class="lineNum"> 236 </span> : : /**</a>
<a name="237"><span class="lineNum"> 237 </span> : : * @dev Atomically decreases the allowance granted to `spender` by the caller.</a>
<a name="238"><span class="lineNum"> 238 </span> : : *</a>
<a name="239"><span class="lineNum"> 239 </span> : : * This is an alternative to {approve} that can be used as a mitigation for</a>
<a name="240"><span class="lineNum"> 240 </span> : : * problems described in {IERC20-approve}.</a>
<a name="241"><span class="lineNum"> 241 </span> : : *</a>
<a name="242"><span class="lineNum"> 242 </span> : : * Emits an {Approval} event indicating the updated allowance.</a>
<a name="243"><span class="lineNum"> 243 </span> : : *</a>
<a name="244"><span class="lineNum"> 244 </span> : : * Requirements:</a>
<a name="245"><span class="lineNum"> 245 </span> : : *</a>
<a name="246"><span class="lineNum"> 246 </span> : : * - `spender` cannot be the zero address.</a>
<a name="247"><span class="lineNum"> 247 </span> : : * - `spender` must have allowance for the caller of at least</a>
<a name="248"><span class="lineNum"> 248 </span> : : * `subtractedValue`.</a>
<a name="249"><span class="lineNum"> 249 </span> : : */</a>
<a name="250"><span class="lineNum"> 250 </span> : : function decreaseAllowance(address spender, uint256 subtractedValue)</a>
<a name="251"><span class="lineNum"> 251 </span> : : public</a>
<a name="252"><span class="lineNum"> 252 </span> : : virtual</a>
<a name="253"><span class="lineNum"> 253 </span> : : returns (bool)</a>
<a name="254"><span class="lineNum"> 254 </span> : : {</a>
<a name="255"><span class="lineNum"> 255 </span> :<span class="lineNoCov"> 0 : address owner = _msgSender();</span></a>
<a name="256"><span class="lineNum"> 256 </span> :<span class="lineNoCov"> 0 : uint256 currentAllowance = allowance(owner, spender);</span></a>
<a name="257"><span class="lineNum"> 257 </span> [<span class="branchNoExec" title="Branch 0 was not executed"> # </span><span class="branchNoExec" title="Branch 1 was not executed"> # </span>]:<span class="lineNoCov"> 0 : require(</span></a>
<a name="258"><span class="lineNum"> 258 </span> : : currentAllowance &gt;= subtractedValue,</a>
<a name="259"><span class="lineNum"> 259 </span> : : &quot;ERC20: decreased allowance below zero&quot;</a>
<a name="260"><span class="lineNum"> 260 </span> : : );</a>
<a name="261"><span class="lineNum"> 261 </span> : : unchecked {</a>
<a name="262"><span class="lineNum"> 262 </span> :<span class="lineNoCov"> 0 : _approve(owner, spender, currentAllowance - subtractedValue);</span></a>
<a name="263"><span class="lineNum"> 263 </span> : : }</a>
<a name="264"><span class="lineNum"> 264 </span> : : </a>
<a name="265"><span class="lineNum"> 265 </span> :<span class="lineNoCov"> 0 : return true;</span></a>
<a name="266"><span class="lineNum"> 266 </span> : : }</a>
<a name="267"><span class="lineNum"> 267 </span> : : </a>
<a name="268"><span class="lineNum"> 268 </span> : : /**</a>
<a name="269"><span class="lineNum"> 269 </span> : : * @dev Moves `amount` of tokens from `from` to `to`.</a>
<a name="270"><span class="lineNum"> 270 </span> : : *</a>
<a name="271"><span class="lineNum"> 271 </span> : : * This internal function is equivalent to {transfer}, and can be used to</a>
<a name="272"><span class="lineNum"> 272 </span> : : * e.g. implement automatic token fees, slashing mechanisms, etc.</a>
<a name="273"><span class="lineNum"> 273 </span> : : *</a>
<a name="274"><span class="lineNum"> 274 </span> : : * Emits a {Transfer} event.</a>
<a name="275"><span class="lineNum"> 275 </span> : : *</a>
<a name="276"><span class="lineNum"> 276 </span> : : * Requirements:</a>
<a name="277"><span class="lineNum"> 277 </span> : : *</a>
<a name="278"><span class="lineNum"> 278 </span> : : * - `from` cannot be the zero address.</a>
<a name="279"><span class="lineNum"> 279 </span> : : * - `to` cannot be the zero address.</a>
<a name="280"><span class="lineNum"> 280 </span> : : * - `from` must have a balance of at least `amount`.</a>
<a name="281"><span class="lineNum"> 281 </span> : : */</a>
<a name="282"><span class="lineNum"> 282 </span> : : function _transfer(</a>
<a name="283"><span class="lineNum"> 283 </span> : : address from,</a>
<a name="284"><span class="lineNum"> 284 </span> : : address to,</a>
<a name="285"><span class="lineNum"> 285 </span> : : uint256 amount</a>
<a name="286"><span class="lineNum"> 286 </span> : : ) internal virtual {</a>
<a name="287"><span class="lineNum"> 287 </span> [<span class="branchNoExec" title="Branch 0 was not executed"> # </span><span class="branchCov" title="Branch 1 was taken 44 times"> + </span>]:<span class="lineCov"> 44 : require(from != address(0), &quot;ERC20: transfer from the zero address&quot;);</span></a>
<a name="288"><span class="lineNum"> 288 </span> [<span class="branchNoExec" title="Branch 0 was not executed"> # </span><span class="branchCov" title="Branch 1 was taken 44 times"> + </span>]:<span class="lineCov"> 44 : require(to != address(0), &quot;ERC20: transfer to the zero address&quot;);</span></a>
<a name="289"><span class="lineNum"> 289 </span> : : </a>
<a name="290"><span class="lineNum"> 290 </span> :<span class="lineCov"> 44 : _beforeTokenTransfer(from, to, amount);</span></a>
<a name="291"><span class="lineNum"> 291 </span> : : </a>
<a name="292"><span class="lineNum"> 292 </span> :<span class="lineCov"> 44 : uint256 fromBalance = _balances[from];</span></a>
<a name="293"><span class="lineNum"> 293 </span> [<span class="branchCov" title="Branch 0 was taken 3 times"> + </span><span class="branchCov" title="Branch 1 was taken 41 times"> + </span>]:<span class="lineCov"> 44 : require(</span></a>
<a name="294"><span class="lineNum"> 294 </span> : : fromBalance &gt;= amount,</a>
<a name="295"><span class="lineNum"> 295 </span> : : &quot;ERC20: transfer amount exceeds balance&quot;</a>
<a name="296"><span class="lineNum"> 296 </span> : : );</a>
<a name="297"><span class="lineNum"> 297 </span> : : unchecked {</a>
<a name="298"><span class="lineNum"> 298 </span> :<span class="lineCov"> 41 : _balances[from] = fromBalance - amount;</span></a>
<a name="299"><span class="lineNum"> 299 </span> : : // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by</a>
<a name="300"><span class="lineNum"> 300 </span> : : // decrementing then incrementing.</a>
<a name="301"><span class="lineNum"> 301 </span> :<span class="lineCov"> 41 : _balances[to] += amount;</span></a>
<a name="302"><span class="lineNum"> 302 </span> : : }</a>
<a name="303"><span class="lineNum"> 303 </span> : : </a>
<a name="304"><span class="lineNum"> 304 </span> :<span class="lineCov"> 41 : emit Transfer(from, to, amount);</span></a>
<a name="305"><span class="lineNum"> 305 </span> : : </a>
<a name="306"><span class="lineNum"> 306 </span> :<span class="lineCov"> 41 : _afterTokenTransfer(from, to, amount);</span></a>
<a name="307"><span class="lineNum"> 307 </span> : : }</a>
<a name="308"><span class="lineNum"> 308 </span> : : </a>
<a name="309"><span class="lineNum"> 309 </span> : : /** @dev Creates `amount` tokens and assigns them to `account`, increasing</a>
<a name="310"><span class="lineNum"> 310 </span> : : * the total supply.</a>
<a name="311"><span class="lineNum"> 311 </span> : : *</a>
<a name="312"><span class="lineNum"> 312 </span> : : * Emits a {Transfer} event with `from` set to the zero address.</a>
<a name="313"><span class="lineNum"> 313 </span> : : *</a>
<a name="314"><span class="lineNum"> 314 </span> : : * Requirements:</a>
<a name="315"><span class="lineNum"> 315 </span> : : *</a>
<a name="316"><span class="lineNum"> 316 </span> : : * - `account` cannot be the zero address.</a>
<a name="317"><span class="lineNum"> 317 </span> : : */</a>
<a name="318"><span class="lineNum"> 318 </span> : : function _mint(address account, uint256 amount) internal virtual {</a>
<a name="319"><span class="lineNum"> 319 </span> [<span class="branchCov" title="Branch 0 was taken 1 time"> + </span><span class="branchCov" title="Branch 1 was taken 51 times"> + </span>]:<span class="lineCov"> 52 : require(account != address(0), &quot;ERC20: mint to the zero address&quot;);</span></a>
<a name="320"><span class="lineNum"> 320 </span> : : </a>
<a name="321"><span class="lineNum"> 321 </span> :<span class="lineCov"> 51 : _beforeTokenTransfer(address(0), account, amount);</span></a>
<a name="322"><span class="lineNum"> 322 </span> : : </a>
<a name="323"><span class="lineNum"> 323 </span> :<span class="lineCov"> 51 : _totalSupply += amount;</span></a>
<a name="324"><span class="lineNum"> 324 </span> : : unchecked {</a>
<a name="325"><span class="lineNum"> 325 </span> : : // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.</a>
<a name="326"><span class="lineNum"> 326 </span> :<span class="lineCov"> 51 : _balances[account] += amount;</span></a>
<a name="327"><span class="lineNum"> 327 </span> : : }</a>
<a name="328"><span class="lineNum"> 328 </span> :<span class="lineCov"> 51 : emit Transfer(address(0), account, amount);</span></a>
<a name="329"><span class="lineNum"> 329 </span> : : </a>
<a name="330"><span class="lineNum"> 330 </span> :<span class="lineCov"> 51 : _afterTokenTransfer(address(0), account, amount);</span></a>
<a name="331"><span class="lineNum"> 331 </span> : : }</a>
<a name="332"><span class="lineNum"> 332 </span> : : </a>
<a name="333"><span class="lineNum"> 333 </span> : : /**</a>
<a name="334"><span class="lineNum"> 334 </span> : : * @dev Destroys `amount` tokens from `account`, reducing the</a>
<a name="335"><span class="lineNum"> 335 </span> : : * total supply.</a>
<a name="336"><span class="lineNum"> 336 </span> : : *</a>
<a name="337"><span class="lineNum"> 337 </span> : : * Emits a {Transfer} event with `to` set to the zero address.</a>
<a name="338"><span class="lineNum"> 338 </span> : : *</a>
<a name="339"><span class="lineNum"> 339 </span> : : * Requirements:</a>
<a name="340"><span class="lineNum"> 340 </span> : : *</a>
<a name="341"><span class="lineNum"> 341 </span> : : * - `account` cannot be the zero address.</a>
<a name="342"><span class="lineNum"> 342 </span> : : * - `account` must have at least `amount` tokens.</a>
<a name="343"><span class="lineNum"> 343 </span> : : */</a>
<a name="344"><span class="lineNum"> 344 </span> : : function _burn(address account, uint256 amount) internal virtual {</a>
<a name="345"><span class="lineNum"> 345 </span> [<span class="branchNoExec" title="Branch 0 was not executed"> # </span><span class="branchNoExec" title="Branch 1 was not executed"> # </span>]:<span class="lineNoCov"> 0 : require(account != address(0), &quot;ERC20: burn from the zero address&quot;);</span></a>
<a name="346"><span class="lineNum"> 346 </span> : : </a>
<a name="347"><span class="lineNum"> 347 </span> :<span class="lineNoCov"> 0 : _beforeTokenTransfer(account, address(0), amount);</span></a>
<a name="348"><span class="lineNum"> 348 </span> : : </a>
<a name="349"><span class="lineNum"> 349 </span> :<span class="lineNoCov"> 0 : uint256 accountBalance = _balances[account];</span></a>
<a name="350"><span class="lineNum"> 350 </span> [<span class="branchNoExec" title="Branch 0 was not executed"> # </span><span class="branchNoExec" title="Branch 1 was not executed"> # </span>]:<span class="lineNoCov"> 0 : require(accountBalance &gt;= amount, &quot;ERC20: burn amount exceeds balance&quot;);</span></a>
<a name="351"><span class="lineNum"> 351 </span> : : unchecked {</a>
<a name="352"><span class="lineNum"> 352 </span> :<span class="lineNoCov"> 0 : _balances[account] = accountBalance - amount;</span></a>
<a name="353"><span class="lineNum"> 353 </span> : : // Overflow not possible: amount &lt;= accountBalance &lt;= totalSupply.</a>
<a name="354"><span class="lineNum"> 354 </span> :<span class="lineNoCov"> 0 : _totalSupply -= amount;</span></a>
<a name="355"><span class="lineNum"> 355 </span> : : }</a>
<a name="356"><span class="lineNum"> 356 </span> : : </a>
<a name="357"><span class="lineNum"> 357 </span> :<span class="lineNoCov"> 0 : emit Transfer(account, address(0), amount);</span></a>
<a name="358"><span class="lineNum"> 358 </span> : : </a>
<a name="359"><span class="lineNum"> 359 </span> :<span class="lineNoCov"> 0 : _afterTokenTransfer(account, address(0), amount);</span></a>
<a name="360"><span class="lineNum"> 360 </span> : : }</a>
<a name="361"><span class="lineNum"> 361 </span> : : </a>
<a name="362"><span class="lineNum"> 362 </span> : : /**</a>
<a name="363"><span class="lineNum"> 363 </span> : : * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.</a>
<a name="364"><span class="lineNum"> 364 </span> : : *</a>
<a name="365"><span class="lineNum"> 365 </span> : : * This internal function is equivalent to `approve`, and can be used to</a>
<a name="366"><span class="lineNum"> 366 </span> : : * e.g. set automatic allowances for certain subsystems, etc.</a>
<a name="367"><span class="lineNum"> 367 </span> : : *</a>
<a name="368"><span class="lineNum"> 368 </span> : : * Emits an {Approval} event.</a>
<a name="369"><span class="lineNum"> 369 </span> : : *</a>
<a name="370"><span class="lineNum"> 370 </span> : : * Requirements:</a>
<a name="371"><span class="lineNum"> 371 </span> : : *</a>
<a name="372"><span class="lineNum"> 372 </span> : : * - `owner` cannot be the zero address.</a>
<a name="373"><span class="lineNum"> 373 </span> : : * - `spender` cannot be the zero address.</a>
<a name="374"><span class="lineNum"> 374 </span> : : */</a>
<a name="375"><span class="lineNum"> 375 </span> : : function _approve(</a>
<a name="376"><span class="lineNum"> 376 </span> : : address owner,</a>
<a name="377"><span class="lineNum"> 377 </span> : : address spender,</a>
<a name="378"><span class="lineNum"> 378 </span> : : uint256 amount</a>
<a name="379"><span class="lineNum"> 379 </span> : : ) internal virtual {</a>
<a name="380"><span class="lineNum"> 380 </span> [<span class="branchNoExec" title="Branch 0 was not executed"> # </span><span class="branchCov" title="Branch 1 was taken 90 times"> + </span>]:<span class="lineCov"> 90 : require(owner != address(0), &quot;ERC20: approve from the zero address&quot;);</span></a>
<a name="381"><span class="lineNum"> 381 </span> [<span class="branchNoExec" title="Branch 0 was not executed"> # </span><span class="branchCov" title="Branch 1 was taken 90 times"> + </span>]:<span class="lineCov"> 90 : require(spender != address(0), &quot;ERC20: approve to the zero address&quot;);</span></a>
<a name="382"><span class="lineNum"> 382 </span> : : </a>
<a name="383"><span class="lineNum"> 383 </span> :<span class="lineCov"> 90 : _allowances[owner][spender] = amount;</span></a>
<a name="384"><span class="lineNum"> 384 </span> :<span class="lineCov"> 90 : emit Approval(owner, spender, amount);</span></a>
<a name="385"><span class="lineNum"> 385 </span> : : }</a>
<a name="386"><span class="lineNum"> 386 </span> : : </a>
<a name="387"><span class="lineNum"> 387 </span> : : /**</a>
<a name="388"><span class="lineNum"> 388 </span> : : * @dev Updates `owner` s allowance for `spender` based on spent `amount`.</a>
<a name="389"><span class="lineNum"> 389 </span> : : *</a>
<a name="390"><span class="lineNum"> 390 </span> : : * Does not update the allowance amount in case of infinite allowance.</a>
<a name="391"><span class="lineNum"> 391 </span> : : * Revert if not enough allowance is available.</a>
<a name="392"><span class="lineNum"> 392 </span> : : *</a>
<a name="393"><span class="lineNum"> 393 </span> : : * Might emit an {Approval} event.</a>
<a name="394"><span class="lineNum"> 394 </span> : : */</a>
<a name="395"><span class="lineNum"> 395 </span> : : function _spendAllowance(</a>
<a name="396"><span class="lineNum"> 396 </span> : : address owner,</a>
<a name="397"><span class="lineNum"> 397 </span> : : address spender,</a>
<a name="398"><span class="lineNum"> 398 </span> : : uint256 amount</a>
<a name="399"><span class="lineNum"> 399 </span> : : ) internal virtual {</a>
<a name="400"><span class="lineNum"> 400 </span> :<span class="lineCov"> 43 : uint256 currentAllowance = allowance(owner, spender);</span></a>
<a name="401"><span class="lineNum"> 401 </span> [<span class="branchCov" title="Branch 0 was taken 1 time"> + </span><span class="branchCov" title="Branch 1 was taken 42 times"> + </span>]:<span class="lineCov"> 43 : if (currentAllowance != type(uint256).max) {</span></a>
<a name="402"><span class="lineNum"> 402 </span> [<span class="branchCov" title="Branch 0 was taken 1 time"> + </span><span class="branchCov" title="Branch 1 was taken 42 times"> + </span>]:<span class="lineCov"> 43 : require(</span></a>
<a name="403"><span class="lineNum"> 403 </span> : : currentAllowance &gt;= amount,</a>
<a name="404"><span class="lineNum"> 404 </span> : : &quot;ERC20: insufficient allowance&quot;</a>
<a name="405"><span class="lineNum"> 405 </span> : : );</a>
<a name="406"><span class="lineNum"> 406 </span> : : unchecked {</a>
<a name="407"><span class="lineNum"> 407 </span> :<span class="lineCov"> 42 : _approve(owner, spender, currentAllowance - amount);</span></a>
<a name="408"><span class="lineNum"> 408 </span> : : }</a>
<a name="409"><span class="lineNum"> 409 </span> : : }</a>
<a name="410"><span class="lineNum"> 410 </span> : : }</a>
<a name="411"><span class="lineNum"> 411 </span> : : </a>
<a name="412"><span class="lineNum"> 412 </span> : : /**</a>
<a name="413"><span class="lineNum"> 413 </span> : : * @dev Hook that is called before any transfer of tokens. This includes</a>
<a name="414"><span class="lineNum"> 414 </span> : : * minting and burning.</a>
<a name="415"><span class="lineNum"> 415 </span> : : *</a>
<a name="416"><span class="lineNum"> 416 </span> : : * Calling conditions:</a>
<a name="417"><span class="lineNum"> 417 </span> : : *</a>
<a name="418"><span class="lineNum"> 418 </span> : : * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens</a>
<a name="419"><span class="lineNum"> 419 </span> : : * will be transferred to `to`.</a>
<a name="420"><span class="lineNum"> 420 </span> : : * - when `from` is zero, `amount` tokens will be minted for `to`.</a>
<a name="421"><span class="lineNum"> 421 </span> : : * - when `to` is zero, `amount` of ``from``'s tokens will be burned.</a>
<a name="422"><span class="lineNum"> 422 </span> : : * - `from` and `to` are never both zero.</a>
<a name="423"><span class="lineNum"> 423 </span> : : *</a>
<a name="424"><span class="lineNum"> 424 </span> : : * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].</a>
<a name="425"><span class="lineNum"> 425 </span> : : */</a>
<a name="426"><span class="lineNum"> 426 </span> : : function _beforeTokenTransfer(</a>
<a name="427"><span class="lineNum"> 427 </span> : : address from,</a>
<a name="428"><span class="lineNum"> 428 </span> : : address to,</a>
<a name="429"><span class="lineNum"> 429 </span> : : uint256 amount</a>
<a name="430"><span class="lineNum"> 430 </span> : : ) internal virtual {}</a>
<a name="431"><span class="lineNum"> 431 </span> : : </a>
<a name="432"><span class="lineNum"> 432 </span> : : /**</a>
<a name="433"><span class="lineNum"> 433 </span> : : * @dev Hook that is called after any transfer of tokens. This includes</a>
<a name="434"><span class="lineNum"> 434 </span> : : * minting and burning.</a>
<a name="435"><span class="lineNum"> 435 </span> : : *</a>
<a name="436"><span class="lineNum"> 436 </span> : : * Calling conditions:</a>
<a name="437"><span class="lineNum"> 437 </span> : : *</a>
<a name="438"><span class="lineNum"> 438 </span> : : * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens</a>
<a name="439"><span class="lineNum"> 439 </span> : : * has been transferred to `to`.</a>
<a name="440"><span class="lineNum"> 440 </span> : : * - when `from` is zero, `amount` tokens have been minted for `to`.</a>
<a name="441"><span class="lineNum"> 441 </span> : : * - when `to` is zero, `amount` of ``from``'s tokens have been burned.</a>
<a name="442"><span class="lineNum"> 442 </span> : : * - `from` and `to` are never both zero.</a>
<a name="443"><span class="lineNum"> 443 </span> : : *</a>
<a name="444"><span class="lineNum"> 444 </span> : : * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].</a>
<a name="445"><span class="lineNum"> 445 </span> : : */</a>
<a name="446"><span class="lineNum"> 446 </span> : : function _afterTokenTransfer(</a>
<a name="447"><span class="lineNum"> 447 </span> : : address from,</a>
<a name="448"><span class="lineNum"> 448 </span> : : address to,</a>
<a name="449"><span class="lineNum"> 449 </span> : : uint256 amount</a>
<a name="450"><span class="lineNum"> 450 </span> : : ) internal virtual {}</a>
<a name="451"><span class="lineNum"> 451 </span> : : }</a>
</pre>
</td>
</tr>
</table>
<br>
<table width="100%" border=0 cellspacing=0 cellpadding=0>
<tr><td class="ruler"><img src="../../glass.png" width=3 height=3 alt=""></td></tr>
<tr><td class="versionInfo">Generated by: <a href="http://ltp.sourceforge.net/coverage/lcov.php" target="_parent">LCOV version 1.14</a></td></tr>
</table>
<br>
</body>
</html>

View file

@ -0,0 +1,144 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>LCOV - TicketNFT Coverage - src/contracts/TicketNFT.sol - functions</title>
<link rel="stylesheet" type="text/css" href="../../gcov.css">
</head>
<body>
<table width="100%" border=0 cellspacing=0 cellpadding=0>
<tr><td class="title">LCOV - code coverage report</td></tr>
<tr><td class="ruler"><img src="../../glass.png" width=3 height=3 alt=""></td></tr>
<tr>
<td width="100%">
<table cellpadding=1 border=0 width="100%">
<tr>
<td width="10%" class="headerItem">Current view:</td>
<td width="35%" class="headerValue"><a href="../../index.html">top level</a> - <a href="index.html">src/contracts</a> - TicketNFT.sol<span style="font-size: 80%;"> (<a href="TicketNFT.sol.gcov.html">source</a> / functions)</span></td>
<td width="5%"></td>
<td width="15%"></td>
<td width="10%" class="headerCovTableHead">Hit</td>
<td width="10%" class="headerCovTableHead">Total</td>
<td width="15%" class="headerCovTableHead">Coverage</td>
</tr>
<tr>
<td class="headerItem">Test:</td>
<td class="headerValue">TicketNFT Coverage</td>
<td></td>
<td class="headerItem">Lines:</td>
<td class="headerCovTableEntry">71</td>
<td class="headerCovTableEntry">71</td>
<td class="headerCovTableEntryHi">100.0 %</td>
</tr>
<tr>
<td class="headerItem">Date:</td>
<td class="headerValue">2023-02-21 16:00:17</td>
<td></td>
<td class="headerItem">Functions:</td>
<td class="headerCovTableEntry">14</td>
<td class="headerCovTableEntry">14</td>
<td class="headerCovTableEntryHi">100.0 %</td>
</tr>
<tr>
<td class="headerItem">Legend:</td>
<td class="headerValueLeg"> Lines:
<span class="coverLegendCov">hit</span>
<span class="coverLegendNoCov">not hit</span>
| Branches:
<span class="coverLegendCov">+</span> taken
<span class="coverLegendNoCov">-</span> not taken
<span class="coverLegendNoCov">#</span> not executed
</td>
<td></td>
<td class="headerItem">Branches:</td>
<td class="headerCovTableEntry">52</td>
<td class="headerCovTableEntry">52</td>
<td class="headerCovTableEntryHi">100.0 %</td>
</tr>
<tr><td><img src="../../glass.png" width=3 height=3 alt=""></td></tr>
</table>
</td>
</tr>
<tr><td class="ruler"><img src="../../glass.png" width=3 height=3 alt=""></td></tr>
</table>
<center>
<table width="60%" cellpadding=1 cellspacing=1 border=0>
<tr><td><br></td></tr>
<tr>
<td width="80%" class="tableHead">Function Name <span class="tableHeadSort"><a href="TicketNFT.sol.func.html"><img src="../../updown.png" width=10 height=14 alt="Sort by function name" title="Sort by function name" border=0></a></span></td>
<td width="20%" class="tableHead">Hit count <span class="tableHeadSort"><img src="../../glass.png" width=10 height=14 alt="Sort by hit count" title="Sort by hit count" border=0></span></td>
</tr>
<tr>
<td class="coverFn"><a href="TicketNFT.sol.gcov.html#137">TicketNFT.admin</a></td>
<td class="coverFnHi">1</td>
</tr>
<tr>
<td class="coverFn"><a href="TicketNFT.sol.gcov.html#200">TicketNFT.delistTicket</a></td>
<td class="coverFnHi">3</td>
</tr>
<tr>
<td class="coverFn"><a href="TicketNFT.sol.gcov.html#103">TicketNFT.updateHolderName</a></td>
<td class="coverFnHi">3</td>
</tr>
<tr>
<td class="coverFn"><a href="TicketNFT.sol.gcov.html#79">TicketNFT.approve</a></td>
<td class="coverFnHi">6</td>
</tr>
<tr>
<td class="coverFn"><a href="TicketNFT.sol.gcov.html#117">TicketNFT.setUsed</a></td>
<td class="coverFnHi">8</td>
</tr>
<tr>
<td class="coverFn"><a href="TicketNFT.sol.gcov.html#94">TicketNFT.holderNameOf</a></td>
<td class="coverFnHi">13</td>
</tr>
<tr>
<td class="coverFn"><a href="TicketNFT.sol.gcov.html#153">TicketNFT.listTicket</a></td>
<td class="coverFnHi">13</td>
</tr>
<tr>
<td class="coverFn"><a href="TicketNFT.sol.gcov.html#89">TicketNFT.getApproved</a></td>
<td class="coverFnHi">14</td>
</tr>
<tr>
<td class="coverFn"><a href="TicketNFT.sol.gcov.html#47">TicketNFT.holderOf</a></td>
<td class="coverFnHi">17</td>
</tr>
<tr>
<td class="coverFn"><a href="TicketNFT.sol.gcov.html#128">TicketNFT.isExpiredOrUsed</a></td>
<td class="coverFnHi">18</td>
</tr>
<tr>
<td class="coverFn"><a href="TicketNFT.sol.gcov.html#52">TicketNFT.transferFrom</a></td>
<td class="coverFnHi">22</td>
</tr>
<tr>
<td class="coverFn"><a href="TicketNFT.sol.gcov.html#28">TicketNFT.mint</a></td>
<td class="coverFnHi">39</td>
</tr>
<tr>
<td class="coverFn"><a href="TicketNFT.sol.gcov.html#170">TicketNFT.purchase</a></td>
<td class="coverFnHi">46</td>
</tr>
<tr>
<td class="coverFn"><a href="TicketNFT.sol.gcov.html#43">TicketNFT.balanceOf</a></td>
<td class="coverFnHi">48</td>
</tr>
</table>
<br>
</center>
<table width="100%" border=0 cellspacing=0 cellpadding=0>
<tr><td class="ruler"><img src="../../glass.png" width=3 height=3 alt=""></td></tr>
<tr><td class="versionInfo">Generated by: <a href="http://ltp.sourceforge.net/coverage/lcov.php" target="_parent">LCOV version 1.14</a></td></tr>
</table>
<br>
</body>
</html>

View file

@ -0,0 +1,144 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>LCOV - TicketNFT Coverage - src/contracts/TicketNFT.sol - functions</title>
<link rel="stylesheet" type="text/css" href="../../gcov.css">
</head>
<body>
<table width="100%" border=0 cellspacing=0 cellpadding=0>
<tr><td class="title">LCOV - code coverage report</td></tr>
<tr><td class="ruler"><img src="../../glass.png" width=3 height=3 alt=""></td></tr>
<tr>
<td width="100%">
<table cellpadding=1 border=0 width="100%">
<tr>
<td width="10%" class="headerItem">Current view:</td>
<td width="35%" class="headerValue"><a href="../../index.html">top level</a> - <a href="index.html">src/contracts</a> - TicketNFT.sol<span style="font-size: 80%;"> (<a href="TicketNFT.sol.gcov.html">source</a> / functions)</span></td>
<td width="5%"></td>
<td width="15%"></td>
<td width="10%" class="headerCovTableHead">Hit</td>
<td width="10%" class="headerCovTableHead">Total</td>
<td width="15%" class="headerCovTableHead">Coverage</td>
</tr>
<tr>
<td class="headerItem">Test:</td>
<td class="headerValue">TicketNFT Coverage</td>
<td></td>
<td class="headerItem">Lines:</td>
<td class="headerCovTableEntry">71</td>
<td class="headerCovTableEntry">71</td>
<td class="headerCovTableEntryHi">100.0 %</td>
</tr>
<tr>
<td class="headerItem">Date:</td>
<td class="headerValue">2023-02-21 16:00:17</td>
<td></td>
<td class="headerItem">Functions:</td>
<td class="headerCovTableEntry">14</td>
<td class="headerCovTableEntry">14</td>
<td class="headerCovTableEntryHi">100.0 %</td>
</tr>
<tr>
<td class="headerItem">Legend:</td>
<td class="headerValueLeg"> Lines:
<span class="coverLegendCov">hit</span>
<span class="coverLegendNoCov">not hit</span>
| Branches:
<span class="coverLegendCov">+</span> taken
<span class="coverLegendNoCov">-</span> not taken
<span class="coverLegendNoCov">#</span> not executed
</td>
<td></td>
<td class="headerItem">Branches:</td>
<td class="headerCovTableEntry">52</td>
<td class="headerCovTableEntry">52</td>
<td class="headerCovTableEntryHi">100.0 %</td>
</tr>
<tr><td><img src="../../glass.png" width=3 height=3 alt=""></td></tr>
</table>
</td>
</tr>
<tr><td class="ruler"><img src="../../glass.png" width=3 height=3 alt=""></td></tr>
</table>
<center>
<table width="60%" cellpadding=1 cellspacing=1 border=0>
<tr><td><br></td></tr>
<tr>
<td width="80%" class="tableHead">Function Name <span class="tableHeadSort"><img src="../../glass.png" width=10 height=14 alt="Sort by function name" title="Sort by function name" border=0></span></td>
<td width="20%" class="tableHead">Hit count <span class="tableHeadSort"><a href="TicketNFT.sol.func-sort-c.html"><img src="../../updown.png" width=10 height=14 alt="Sort by hit count" title="Sort by hit count" border=0></a></span></td>
</tr>
<tr>
<td class="coverFn"><a href="TicketNFT.sol.gcov.html#137">TicketNFT.admin</a></td>
<td class="coverFnHi">1</td>
</tr>
<tr>
<td class="coverFn"><a href="TicketNFT.sol.gcov.html#79">TicketNFT.approve</a></td>
<td class="coverFnHi">6</td>
</tr>
<tr>
<td class="coverFn"><a href="TicketNFT.sol.gcov.html#43">TicketNFT.balanceOf</a></td>
<td class="coverFnHi">48</td>
</tr>
<tr>
<td class="coverFn"><a href="TicketNFT.sol.gcov.html#200">TicketNFT.delistTicket</a></td>
<td class="coverFnHi">3</td>
</tr>
<tr>
<td class="coverFn"><a href="TicketNFT.sol.gcov.html#89">TicketNFT.getApproved</a></td>
<td class="coverFnHi">14</td>
</tr>
<tr>
<td class="coverFn"><a href="TicketNFT.sol.gcov.html#94">TicketNFT.holderNameOf</a></td>
<td class="coverFnHi">13</td>
</tr>
<tr>
<td class="coverFn"><a href="TicketNFT.sol.gcov.html#47">TicketNFT.holderOf</a></td>
<td class="coverFnHi">17</td>
</tr>
<tr>
<td class="coverFn"><a href="TicketNFT.sol.gcov.html#128">TicketNFT.isExpiredOrUsed</a></td>
<td class="coverFnHi">18</td>
</tr>
<tr>
<td class="coverFn"><a href="TicketNFT.sol.gcov.html#153">TicketNFT.listTicket</a></td>
<td class="coverFnHi">13</td>
</tr>
<tr>
<td class="coverFn"><a href="TicketNFT.sol.gcov.html#28">TicketNFT.mint</a></td>
<td class="coverFnHi">39</td>
</tr>
<tr>
<td class="coverFn"><a href="TicketNFT.sol.gcov.html#170">TicketNFT.purchase</a></td>
<td class="coverFnHi">46</td>
</tr>
<tr>
<td class="coverFn"><a href="TicketNFT.sol.gcov.html#117">TicketNFT.setUsed</a></td>
<td class="coverFnHi">8</td>
</tr>
<tr>
<td class="coverFn"><a href="TicketNFT.sol.gcov.html#52">TicketNFT.transferFrom</a></td>
<td class="coverFnHi">22</td>
</tr>
<tr>
<td class="coverFn"><a href="TicketNFT.sol.gcov.html#103">TicketNFT.updateHolderName</a></td>
<td class="coverFnHi">3</td>
</tr>
</table>
<br>
</center>
<table width="100%" border=0 cellspacing=0 cellpadding=0>
<tr><td class="ruler"><img src="../../glass.png" width=3 height=3 alt=""></td></tr>
<tr><td class="versionInfo">Generated by: <a href="http://ltp.sourceforge.net/coverage/lcov.php" target="_parent">LCOV version 1.14</a></td></tr>
</table>
<br>
</body>
</html>

View file

@ -0,0 +1,304 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>LCOV - TicketNFT Coverage - src/contracts/TicketNFT.sol</title>
<link rel="stylesheet" type="text/css" href="../../gcov.css">
</head>
<body>
<table width="100%" border=0 cellspacing=0 cellpadding=0>
<tr><td class="title">LCOV - code coverage report</td></tr>
<tr><td class="ruler"><img src="../../glass.png" width=3 height=3 alt=""></td></tr>
<tr>
<td width="100%">
<table cellpadding=1 border=0 width="100%">
<tr>
<td width="10%" class="headerItem">Current view:</td>
<td width="35%" class="headerValue"><a href="../../index.html">top level</a> - <a href="index.html">src/contracts</a> - TicketNFT.sol<span style="font-size: 80%;"> (source / <a href="TicketNFT.sol.func-sort-c.html">functions</a>)</span></td>
<td width="5%"></td>
<td width="15%"></td>
<td width="10%" class="headerCovTableHead">Hit</td>
<td width="10%" class="headerCovTableHead">Total</td>
<td width="15%" class="headerCovTableHead">Coverage</td>
</tr>
<tr>
<td class="headerItem">Test:</td>
<td class="headerValue">TicketNFT Coverage</td>
<td></td>
<td class="headerItem">Lines:</td>
<td class="headerCovTableEntry">71</td>
<td class="headerCovTableEntry">71</td>
<td class="headerCovTableEntryHi">100.0 %</td>
</tr>
<tr>
<td class="headerItem">Date:</td>
<td class="headerValue">2023-02-21 16:00:17</td>
<td></td>
<td class="headerItem">Functions:</td>
<td class="headerCovTableEntry">14</td>
<td class="headerCovTableEntry">14</td>
<td class="headerCovTableEntryHi">100.0 %</td>
</tr>
<tr>
<td class="headerItem">Legend:</td>
<td class="headerValueLeg"> Lines:
<span class="coverLegendCov">hit</span>
<span class="coverLegendNoCov">not hit</span>
| Branches:
<span class="coverLegendCov">+</span> taken
<span class="coverLegendNoCov">-</span> not taken
<span class="coverLegendNoCov">#</span> not executed
</td>
<td></td>
<td class="headerItem">Branches:</td>
<td class="headerCovTableEntry">52</td>
<td class="headerCovTableEntry">52</td>
<td class="headerCovTableEntryHi">100.0 %</td>
</tr>
<tr><td><img src="../../glass.png" width=3 height=3 alt=""></td></tr>
</table>
</td>
</tr>
<tr><td class="ruler"><img src="../../glass.png" width=3 height=3 alt=""></td></tr>
</table>
<table cellpadding=0 cellspacing=0 border=0>
<tr>
<td><br></td>
</tr>
<tr>
<td>
<pre class="sourceHeading"> Branch data Line data Source code</pre>
<pre class="source">
<a name="1"><span class="lineNum"> 1 </span> : : // SPDX-License-Identifier: UNLICENSED</a>
<a name="2"><span class="lineNum"> 2 </span> : : pragma solidity ^0.8.10;</a>
<a name="3"><span class="lineNum"> 3 </span> : : </a>
<a name="4"><span class="lineNum"> 4 </span> : : import &quot;../interfaces/IERC20.sol&quot;;</a>
<a name="5"><span class="lineNum"> 5 </span> : : import &quot;../interfaces/ITicketNFT.sol&quot;;</a>
<a name="6"><span class="lineNum"> 6 </span> : : import &quot;../interfaces/IPrimaryMarket.sol&quot;;</a>
<a name="7"><span class="lineNum"> 7 </span> : : import &quot;../interfaces/ISecondaryMarket.sol&quot;;</a>
<a name="8"><span class="lineNum"> 8 </span> : : </a>
<a name="9"><span class="lineNum"> 9 </span> : : contract TicketNFT is ITicketNFT, IPrimaryMarket, ISecondaryMarket {</a>
<a name="10"><span class="lineNum"> 10 </span> : : address _admin;</a>
<a name="11"><span class="lineNum"> 11 </span> : : uint256 _totalSupply;</a>
<a name="12"><span class="lineNum"> 12 </span> : : IERC20 public _purchaseToken;</a>
<a name="13"><span class="lineNum"> 13 </span> : : mapping(uint256 =&gt; address) _approvals;</a>
<a name="14"><span class="lineNum"> 14 </span> : : mapping(address =&gt; uint256) _balances;</a>
<a name="15"><span class="lineNum"> 15 </span> : : mapping(uint256 =&gt; uint256) public _expiryTimes;</a>
<a name="16"><span class="lineNum"> 16 </span> : : mapping(uint256 =&gt; string) _holderNames;</a>
<a name="17"><span class="lineNum"> 17 </span> : : mapping(uint256 =&gt; address) _holders;</a>
<a name="18"><span class="lineNum"> 18 </span> : : mapping(uint256 =&gt; address) _listers;</a>
<a name="19"><span class="lineNum"> 19 </span> : : mapping(uint256 =&gt; uint256) _prices;</a>
<a name="20"><span class="lineNum"> 20 </span> : : mapping(uint256 =&gt; bool) _ticketUsed;</a>
<a name="21"><span class="lineNum"> 21 </span> : : uint256 immutable _purchasePrice = 100e18;</a>
<a name="22"><span class="lineNum"> 22 </span> : : uint256 immutable _saleFee = 50;</a>
<a name="23"><span class="lineNum"> 23 </span> : : </a>
<a name="24"><span class="lineNum"> 24 </span> : : constructor(IERC20 purchaseToken) {</a>
<a name="25"><span class="lineNum"> 25 </span> : : _admin = msg.sender;</a>
<a name="26"><span class="lineNum"> 26 </span> : : _totalSupply = 0;</a>
<a name="27"><span class="lineNum"> 27 </span> : : _purchaseToken = purchaseToken;</a>
<a name="28"><span class="lineNum"> 28 </span> : : }</a>
<a name="29"><span class="lineNum"> 29 </span> : : </a>
<a name="30"><span class="lineNum"> 30 </span> : : function mint(address holder, string memory holderName) external {</a>
<a name="31"><span class="lineNum"> 31 </span> [<span class="branchCov" title="Branch 0 was taken 1 time"> + </span><span class="branchCov" title="Branch 1 was taken 38 times"> + </span>]:<span class="lineCov"> 39 : require(</span></a>
<a name="32"><span class="lineNum"> 32 </span> : : msg.sender == address(this),</a>
<a name="33"><span class="lineNum"> 33 </span> : : &quot;mint: can only be called by primary market&quot;</a>
<a name="34"><span class="lineNum"> 34 </span> : : ); // Limits to being called by this contract and only purchase function calls mint</a>
<a name="35"><span class="lineNum"> 35 </span> :<span class="lineCov"> 38 : uint256 ticketId = _totalSupply + 1;</span></a>
<a name="36"><span class="lineNum"> 36 </span> :<span class="lineCov"> 38 : _balances[holder] += 1;</span></a>
<a name="37"><span class="lineNum"> 37 </span> :<span class="lineCov"> 38 : _expiryTimes[ticketId] = block.timestamp + 10 days;</span></a>
<a name="38"><span class="lineNum"> 38 </span> :<span class="lineCov"> 38 : _holderNames[ticketId] = holderName;</span></a>
<a name="39"><span class="lineNum"> 39 </span> :<span class="lineCov"> 38 : _holders[ticketId] = holder;</span></a>
<a name="40"><span class="lineNum"> 40 </span> :<span class="lineCov"> 38 : _ticketUsed[ticketId] = false;</span></a>
<a name="41"><span class="lineNum"> 41 </span> :<span class="lineCov"> 38 : _totalSupply = ticketId;</span></a>
<a name="42"><span class="lineNum"> 42 </span> :<span class="lineCov"> 38 : emit Transfer(address(0), holder, ticketId);</span></a>
<a name="43"><span class="lineNum"> 43 </span> : : }</a>
<a name="44"><span class="lineNum"> 44 </span> : : </a>
<a name="45"><span class="lineNum"> 45 </span> : : function balanceOf(address holder) external view returns (uint256) {</a>
<a name="46"><span class="lineNum"> 46 </span> :<span class="lineCov"> 48 : return _balances[holder];</span></a>
<a name="47"><span class="lineNum"> 47 </span> : : }</a>
<a name="48"><span class="lineNum"> 48 </span> : : </a>
<a name="49"><span class="lineNum"> 49 </span> : : function holderOf(uint256 ticketID) external view returns (address) {</a>
<a name="50"><span class="lineNum"> 50 </span> [<span class="branchCov" title="Branch 0 was taken 1 time"> + </span><span class="branchCov" title="Branch 1 was taken 16 times"> + </span>]:<span class="lineCov"> 17 : require(ticketID &lt;= _totalSupply, &quot;holderOf: ticket doesn't exist&quot;);</span></a>
<a name="51"><span class="lineNum"> 51 </span> :<span class="lineCov"> 16 : return _holders[ticketID];</span></a>
<a name="52"><span class="lineNum"> 52 </span> : : }</a>
<a name="53"><span class="lineNum"> 53 </span> : : </a>
<a name="54"><span class="lineNum"> 54 </span> : : function transferFrom(</a>
<a name="55"><span class="lineNum"> 55 </span> : : address from,</a>
<a name="56"><span class="lineNum"> 56 </span> : : address to,</a>
<a name="57"><span class="lineNum"> 57 </span> : : uint256 ticketID</a>
<a name="58"><span class="lineNum"> 58 </span> : : ) external {</a>
<a name="59"><span class="lineNum"> 59 </span> [<span class="branchCov" title="Branch 0 was taken 2 times"> + </span><span class="branchCov" title="Branch 1 was taken 20 times"> + </span>]:<span class="lineCov"> 22 : require(from != address(0), &quot;transferFrom: from cannot be 0&quot;);</span></a>
<a name="60"><span class="lineNum"> 60 </span> [<span class="branchCov" title="Branch 0 was taken 2 times"> + </span><span class="branchCov" title="Branch 1 was taken 18 times"> + </span>]:<span class="lineCov"> 20 : require(to != address(0), &quot;transferFrom: to cannot be 0&quot;);</span></a>
<a name="61"><span class="lineNum"> 61 </span> [<span class="branchCov" title="Branch 0 was taken 2 times"> + </span><span class="branchCov" title="Branch 1 was taken 16 times"> + </span>]:<span class="lineCov"> 18 : require(</span></a>
<a name="62"><span class="lineNum"> 62 </span> : : msg.sender == _holders[ticketID] ||</a>
<a name="63"><span class="lineNum"> 63 </span> : : msg.sender == _approvals[ticketID] ||</a>
<a name="64"><span class="lineNum"> 64 </span> : : (msg.sender == address(this) &amp;&amp;</a>
<a name="65"><span class="lineNum"> 65 </span> : : (from == _holders[ticketID] ||</a>
<a name="66"><span class="lineNum"> 66 </span> : : from == _approvals[ticketID])),</a>
<a name="67"><span class="lineNum"> 67 </span> : : &quot;transferFrom: msg.sender must be current holder or approved sender&quot;</a>
<a name="68"><span class="lineNum"> 68 </span> : : );</a>
<a name="69"><span class="lineNum"> 69 </span> [<span class="branchCov" title="Branch 0 was taken 2 times"> + </span><span class="branchCov" title="Branch 1 was taken 14 times"> + </span>]:<span class="lineCov"> 16 : require(</span></a>
<a name="70"><span class="lineNum"> 70 </span> : : from == _holders[ticketID],</a>
<a name="71"><span class="lineNum"> 71 </span> : : &quot;transferFrom: ticket not owned by from&quot;</a>
<a name="72"><span class="lineNum"> 72 </span> : : );</a>
<a name="73"><span class="lineNum"> 73 </span> :<span class="lineCov"> 14 : _approvals[ticketID] = address(0);</span></a>
<a name="74"><span class="lineNum"> 74 </span> :<span class="lineCov"> 14 : _balances[from] -= 1;</span></a>
<a name="75"><span class="lineNum"> 75 </span> :<span class="lineCov"> 14 : _balances[to] += 1;</span></a>
<a name="76"><span class="lineNum"> 76 </span> :<span class="lineCov"> 14 : _holders[ticketID] = to;</span></a>
<a name="77"><span class="lineNum"> 77 </span> :<span class="lineCov"> 14 : emit Transfer(from, to, ticketID);</span></a>
<a name="78"><span class="lineNum"> 78 </span> :<span class="lineCov"> 14 : emit Approval(to, address(0), ticketID);</span></a>
<a name="79"><span class="lineNum"> 79 </span> : : }</a>
<a name="80"><span class="lineNum"> 80 </span> : : </a>
<a name="81"><span class="lineNum"> 81 </span> : : function approve(address to, uint256 ticketID) external {</a>
<a name="82"><span class="lineNum"> 82 </span> [<span class="branchCov" title="Branch 0 was taken 1 time"> + </span><span class="branchCov" title="Branch 1 was taken 5 times"> + </span>]:<span class="lineCov"> 6 : require(ticketID &lt;= _totalSupply, &quot;approve: ticket doesn't exist&quot;);</span></a>
<a name="83"><span class="lineNum"> 83 </span> [<span class="branchCov" title="Branch 0 was taken 1 time"> + </span><span class="branchCov" title="Branch 1 was taken 4 times"> + </span>]:<span class="lineCov"> 5 : require(</span></a>
<a name="84"><span class="lineNum"> 84 </span> : : msg.sender == _holders[ticketID],</a>
<a name="85"><span class="lineNum"> 85 </span> : : &quot;approve: msg.sender doesn't own ticket&quot;</a>
<a name="86"><span class="lineNum"> 86 </span> : : );</a>
<a name="87"><span class="lineNum"> 87 </span> :<span class="lineCov"> 4 : _approvals[ticketID] = to;</span></a>
<a name="88"><span class="lineNum"> 88 </span> :<span class="lineCov"> 4 : emit Approval(msg.sender, to, ticketID);</span></a>
<a name="89"><span class="lineNum"> 89 </span> : : }</a>
<a name="90"><span class="lineNum"> 90 </span> : : </a>
<a name="91"><span class="lineNum"> 91 </span> : : function getApproved(uint256 ticketID) external view returns (address) {</a>
<a name="92"><span class="lineNum"> 92 </span> [<span class="branchCov" title="Branch 0 was taken 1 time"> + </span><span class="branchCov" title="Branch 1 was taken 13 times"> + </span>]:<span class="lineCov"> 14 : require(ticketID &lt;= _totalSupply, &quot;getApproved: ticket doesn't exist&quot;);</span></a>
<a name="93"><span class="lineNum"> 93 </span> :<span class="lineCov"> 13 : return _approvals[ticketID];</span></a>
<a name="94"><span class="lineNum"> 94 </span> : : }</a>
<a name="95"><span class="lineNum"> 95 </span> : : </a>
<a name="96"><span class="lineNum"> 96 </span> : : function holderNameOf(uint256 ticketID)</a>
<a name="97"><span class="lineNum"> 97 </span> : : external</a>
<a name="98"><span class="lineNum"> 98 </span> : : view</a>
<a name="99"><span class="lineNum"> 99 </span> : : returns (string memory)</a>
<a name="100"><span class="lineNum"> 100 </span> : : {</a>
<a name="101"><span class="lineNum"> 101 </span> [<span class="branchCov" title="Branch 0 was taken 1 time"> + </span><span class="branchCov" title="Branch 1 was taken 12 times"> + </span>]:<span class="lineCov"> 13 : require(ticketID &lt;= _totalSupply, &quot;holderNameOf: ticket doesn't exist&quot;);</span></a>
<a name="102"><span class="lineNum"> 102 </span> :<span class="lineCov"> 12 : return _holderNames[ticketID];</span></a>
<a name="103"><span class="lineNum"> 103 </span> : : }</a>
<a name="104"><span class="lineNum"> 104 </span> : : </a>
<a name="105"><span class="lineNum"> 105 </span> : : function updateHolderName(uint256 ticketID, string calldata newName)</a>
<a name="106"><span class="lineNum"> 106 </span> : : external</a>
<a name="107"><span class="lineNum"> 107 </span> : : {</a>
<a name="108"><span class="lineNum"> 108 </span> [<span class="branchCov" title="Branch 0 was taken 1 time"> + </span><span class="branchCov" title="Branch 1 was taken 2 times"> + </span>]:<span class="lineCov"> 3 : require(</span></a>
<a name="109"><span class="lineNum"> 109 </span> : : ticketID &lt;= _totalSupply,</a>
<a name="110"><span class="lineNum"> 110 </span> : : &quot;updateHolderName: ticket doesn't exist&quot;</a>
<a name="111"><span class="lineNum"> 111 </span> : : );</a>
<a name="112"><span class="lineNum"> 112 </span> [<span class="branchCov" title="Branch 0 was taken 1 time"> + </span><span class="branchCov" title="Branch 1 was taken 1 time"> + </span>]:<span class="lineCov"> 2 : require(</span></a>
<a name="113"><span class="lineNum"> 113 </span> : : msg.sender == _holders[ticketID],</a>
<a name="114"><span class="lineNum"> 114 </span> : : &quot;updateHolderName: msg.sender doesn't own ticket&quot;</a>
<a name="115"><span class="lineNum"> 115 </span> : : );</a>
<a name="116"><span class="lineNum"> 116 </span> :<span class="lineCov"> 1 : _holderNames[ticketID] = newName;</span></a>
<a name="117"><span class="lineNum"> 117 </span> : : }</a>
<a name="118"><span class="lineNum"> 118 </span> : : </a>
<a name="119"><span class="lineNum"> 119 </span> : : function setUsed(uint256 ticketID) external {</a>
<a name="120"><span class="lineNum"> 120 </span> [<span class="branchCov" title="Branch 0 was taken 1 time"> + </span><span class="branchCov" title="Branch 1 was taken 7 times"> + </span>]:<span class="lineCov"> 8 : require(msg.sender == _admin, &quot;setUsed: only admin can setUsed&quot;);</span></a>
<a name="121"><span class="lineNum"> 121 </span> [<span class="branchCov" title="Branch 0 was taken 1 time"> + </span><span class="branchCov" title="Branch 1 was taken 6 times"> + </span>]:<span class="lineCov"> 7 : require(ticketID &lt;= _totalSupply, &quot;setUsed: ticket doesn't exist&quot;);</span></a>
<a name="122"><span class="lineNum"> 122 </span> [<span class="branchCov" title="Branch 0 was taken 1 time"> + </span><span class="branchCov" title="Branch 1 was taken 5 times"> + </span>]:<span class="lineCov"> 6 : require(_ticketUsed[ticketID] == false, &quot;setUsed: ticket already used&quot;);</span></a>
<a name="123"><span class="lineNum"> 123 </span> [<span class="branchCov" title="Branch 0 was taken 1 time"> + </span><span class="branchCov" title="Branch 1 was taken 4 times"> + </span>]:<span class="lineCov"> 5 : require(</span></a>
<a name="124"><span class="lineNum"> 124 </span> : : _expiryTimes[ticketID] &gt;= block.timestamp,</a>
<a name="125"><span class="lineNum"> 125 </span> : : &quot;setUsed: ticket expired&quot;</a>
<a name="126"><span class="lineNum"> 126 </span> : : );</a>
<a name="127"><span class="lineNum"> 127 </span> :<span class="lineCov"> 4 : _ticketUsed[ticketID] = true;</span></a>
<a name="128"><span class="lineNum"> 128 </span> : : }</a>
<a name="129"><span class="lineNum"> 129 </span> : : </a>
<a name="130"><span class="lineNum"> 130 </span> : : function isExpiredOrUsed(uint256 ticketID) external view returns (bool) {</a>
<a name="131"><span class="lineNum"> 131 </span> [<span class="branchCov" title="Branch 0 was taken 1 time"> + </span><span class="branchCov" title="Branch 1 was taken 17 times"> + </span>]:<span class="lineCov"> 18 : require(</span></a>
<a name="132"><span class="lineNum"> 132 </span> : : ticketID &lt;= _totalSupply,</a>
<a name="133"><span class="lineNum"> 133 </span> : : &quot;isExpiredOrUsed: ticket doesn't exist&quot;</a>
<a name="134"><span class="lineNum"> 134 </span> : : );</a>
<a name="135"><span class="lineNum"> 135 </span> :<span class="lineCov"> 17 : return (_ticketUsed[ticketID] ||</span></a>
<a name="136"><span class="lineNum"> 136 </span> : : _expiryTimes[ticketID] &lt; block.timestamp);</a>
<a name="137"><span class="lineNum"> 137 </span> : : }</a>
<a name="138"><span class="lineNum"> 138 </span> : : </a>
<a name="139"><span class="lineNum"> 139 </span> : : function admin() external view returns (address) {</a>
<a name="140"><span class="lineNum"> 140 </span> :<span class="lineCov"> 1 : return _admin;</span></a>
<a name="141"><span class="lineNum"> 141 </span> : : }</a>
<a name="142"><span class="lineNum"> 142 </span> : : </a>
<a name="143"><span class="lineNum"> 143 </span> : : function purchase(string memory holderName) external {</a>
<a name="144"><span class="lineNum"> 144 </span> [<span class="branchCov" title="Branch 0 was taken 1 time"> + </span><span class="branchCov" title="Branch 1 was taken 39 times"> + </span>]:<span class="lineCov"> 40 : require(_totalSupply &lt; 1000, &quot;purchase: maximum tickets reached&quot;);</span></a>
<a name="145"><span class="lineNum"> 145 </span> [<span class="branchCov" title="Branch 0 was taken 1 time"> + </span><span class="branchCov" title="Branch 1 was taken 38 times"> + </span>]:<span class="lineCov"> 39 : require(</span></a>
<a name="146"><span class="lineNum"> 146 </span> : : _purchaseToken.allowance(msg.sender, address(this)) &gt;=</a>
<a name="147"><span class="lineNum"> 147 </span> : : _purchasePrice,</a>
<a name="148"><span class="lineNum"> 148 </span> : : &quot;purchase: insufficient token allowance&quot;</a>
<a name="149"><span class="lineNum"> 149 </span> : : );</a>
<a name="150"><span class="lineNum"> 150 </span> :<span class="lineCov"> 38 : _purchaseToken.transferFrom(msg.sender, _admin, _purchasePrice);</span></a>
<a name="151"><span class="lineNum"> 151 </span> :<span class="lineCov"> 37 : this.mint(msg.sender, holderName);</span></a>
<a name="152"><span class="lineNum"> 152 </span> :<span class="lineCov"> 37 : emit Purchase(msg.sender, holderName);</span></a>
<a name="153"><span class="lineNum"> 153 </span> : : }</a>
<a name="154"><span class="lineNum"> 154 </span> : : </a>
<a name="155"><span class="lineNum"> 155 </span> : : function listTicket(uint256 ticketID, uint256 price) external {</a>
<a name="156"><span class="lineNum"> 156 </span> [<span class="branchCov" title="Branch 0 was taken 1 time"> + </span><span class="branchCov" title="Branch 1 was taken 12 times"> + </span>]:<span class="lineCov"> 13 : require(</span></a>
<a name="157"><span class="lineNum"> 157 </span> : : msg.sender == _holders[ticketID],</a>
<a name="158"><span class="lineNum"> 158 </span> : : &quot;listTicket: msg.sender doesn't own ticket&quot;</a>
<a name="159"><span class="lineNum"> 159 </span> : : );</a>
<a name="160"><span class="lineNum"> 160 </span> [<span class="branchCov" title="Branch 0 was taken 2 times"> + </span><span class="branchCov" title="Branch 1 was taken 10 times"> + </span>]:<span class="lineCov"> 12 : require(</span></a>
<a name="161"><span class="lineNum"> 161 </span> : : _ticketUsed[ticketID] == false &amp;&amp;</a>
<a name="162"><span class="lineNum"> 162 </span> : : _expiryTimes[ticketID] &gt;= block.timestamp,</a>
<a name="163"><span class="lineNum"> 163 </span> : : &quot;listTicket: ticket is expired/used&quot;</a>
<a name="164"><span class="lineNum"> 164 </span> : : );</a>
<a name="165"><span class="lineNum"> 165 </span> [<span class="branchCov" title="Branch 0 was taken 1 time"> + </span><span class="branchCov" title="Branch 1 was taken 9 times"> + </span>]:<span class="lineCov"> 10 : require(price &gt; 0, &quot;listTicket: price cannot be 0&quot;);</span></a>
<a name="166"><span class="lineNum"> 166 </span> :<span class="lineCov"> 9 : _listers[ticketID] = msg.sender;</span></a>
<a name="167"><span class="lineNum"> 167 </span> :<span class="lineCov"> 9 : _prices[ticketID] = price;</span></a>
<a name="168"><span class="lineNum"> 168 </span> :<span class="lineCov"> 9 : this.transferFrom(msg.sender, address(this), ticketID);</span></a>
<a name="169"><span class="lineNum"> 169 </span> :<span class="lineCov"> 9 : emit Listing(ticketID, msg.sender, price);</span></a>
<a name="170"><span class="lineNum"> 170 </span> : : }</a>
<a name="171"><span class="lineNum"> 171 </span> : : </a>
<a name="172"><span class="lineNum"> 172 </span> : : function purchase(uint256 ticketID, string calldata name) external {</a>
<a name="173"><span class="lineNum"> 173 </span> [<span class="branchCov" title="Branch 0 was taken 1 time"> + </span><span class="branchCov" title="Branch 1 was taken 5 times"> + </span>]:<span class="lineCov"> 6 : require(</span></a>
<a name="174"><span class="lineNum"> 174 </span> : : _listers[ticketID] != address(0) &amp;&amp; _prices[ticketID] != 0,</a>
<a name="175"><span class="lineNum"> 175 </span> : : &quot;purchase: ticket is not listed, missing lister address or price&quot;</a>
<a name="176"><span class="lineNum"> 176 </span> : : );</a>
<a name="177"><span class="lineNum"> 177 </span> :<span class="lineCov"> 5 : uint256 ticketPrice = _prices[ticketID];</span></a>
<a name="178"><span class="lineNum"> 178 </span> :<span class="lineCov"> 5 : uint256 ticketFee = _saleFee * (ticketPrice / 1000);</span></a>
<a name="179"><span class="lineNum"> 179 </span> :<span class="lineCov"> 5 : uint256 ticketRevenue = ticketPrice - ticketFee;</span></a>
<a name="180"><span class="lineNum"> 180 </span> [<span class="branchCov" title="Branch 0 was taken 2 times"> + </span><span class="branchCov" title="Branch 1 was taken 3 times"> + </span>]:<span class="lineCov"> 5 : require(</span></a>
<a name="181"><span class="lineNum"> 181 </span> : : _ticketUsed[ticketID] == false &amp;&amp;</a>
<a name="182"><span class="lineNum"> 182 </span> : : _expiryTimes[ticketID] &gt;= block.timestamp,</a>
<a name="183"><span class="lineNum"> 183 </span> : : &quot;purchase: ticket is expired/used&quot;</a>
<a name="184"><span class="lineNum"> 184 </span> : : );</a>
<a name="185"><span class="lineNum"> 185 </span> [<span class="branchCov" title="Branch 0 was taken 1 time"> + </span><span class="branchCov" title="Branch 1 was taken 2 times"> + </span>]:<span class="lineCov"> 3 : require(</span></a>
<a name="186"><span class="lineNum"> 186 </span> : : _purchaseToken.allowance(msg.sender, address(this)) &gt;= ticketPrice,</a>
<a name="187"><span class="lineNum"> 187 </span> : : &quot;purchase: insufficient token allowance&quot;</a>
<a name="188"><span class="lineNum"> 188 </span> : : );</a>
<a name="189"><span class="lineNum"> 189 </span> :<span class="lineCov"> 2 : _purchaseToken.transferFrom(</span></a>
<a name="190"><span class="lineNum"> 190 </span> : : msg.sender,</a>
<a name="191"><span class="lineNum"> 191 </span> : : _listers[ticketID],</a>
<a name="192"><span class="lineNum"> 192 </span> : : ticketRevenue</a>
<a name="193"><span class="lineNum"> 193 </span> : : );</a>
<a name="194"><span class="lineNum"> 194 </span> :<span class="lineCov"> 1 : _purchaseToken.transferFrom(msg.sender, _admin, ticketFee);</span></a>
<a name="195"><span class="lineNum"> 195 </span> :<span class="lineCov"> 1 : this.transferFrom(address(this), msg.sender, ticketID);</span></a>
<a name="196"><span class="lineNum"> 196 </span> :<span class="lineCov"> 1 : _listers[ticketID] = address(0);</span></a>
<a name="197"><span class="lineNum"> 197 </span> :<span class="lineCov"> 1 : _prices[ticketID] = 0;</span></a>
<a name="198"><span class="lineNum"> 198 </span> :<span class="lineCov"> 1 : _holderNames[ticketID] = name;</span></a>
<a name="199"><span class="lineNum"> 199 </span> :<span class="lineCov"> 1 : emit Purchase(msg.sender, ticketID, ticketPrice, name);</span></a>
<a name="200"><span class="lineNum"> 200 </span> : : }</a>
<a name="201"><span class="lineNum"> 201 </span> : : </a>
<a name="202"><span class="lineNum"> 202 </span> : : function delistTicket(uint256 ticketID) external {</a>
<a name="203"><span class="lineNum"> 203 </span> [<span class="branchCov" title="Branch 0 was taken 1 time"> + </span><span class="branchCov" title="Branch 1 was taken 2 times"> + </span>]:<span class="lineCov"> 3 : require(</span></a>
<a name="204"><span class="lineNum"> 204 </span> : : msg.sender == _listers[ticketID],</a>
<a name="205"><span class="lineNum"> 205 </span> : : &quot;delistTicket: msg.sender didn't list ticket&quot;</a>
<a name="206"><span class="lineNum"> 206 </span> : : );</a>
<a name="207"><span class="lineNum"> 207 </span> :<span class="lineCov"> 2 : _listers[ticketID] = address(0);</span></a>
<a name="208"><span class="lineNum"> 208 </span> :<span class="lineCov"> 2 : _prices[ticketID] = 0;</span></a>
<a name="209"><span class="lineNum"> 209 </span> :<span class="lineCov"> 2 : this.transferFrom(address(this), msg.sender, ticketID);</span></a>
<a name="210"><span class="lineNum"> 210 </span> :<span class="lineCov"> 2 : emit Delisting(ticketID);</span></a>
<a name="211"><span class="lineNum"> 211 </span> : : }</a>
<a name="212"><span class="lineNum"> 212 </span> : : }</a>
</pre>
</td>
</tr>
</table>
<br>
<table width="100%" border=0 cellspacing=0 cellpadding=0>
<tr><td class="ruler"><img src="../../glass.png" width=3 height=3 alt=""></td></tr>
<tr><td class="versionInfo">Generated by: <a href="http://ltp.sourceforge.net/coverage/lcov.php" target="_parent">LCOV version 1.14</a></td></tr>
</table>
<br>
</body>
</html>

View file

@ -0,0 +1,123 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>LCOV - TicketNFT Coverage - src/contracts</title>
<link rel="stylesheet" type="text/css" href="../../gcov.css">
</head>
<body>
<table width="100%" border=0 cellspacing=0 cellpadding=0>
<tr><td class="title">LCOV - code coverage report</td></tr>
<tr><td class="ruler"><img src="../../glass.png" width=3 height=3 alt=""></td></tr>
<tr>
<td width="100%">
<table cellpadding=1 border=0 width="100%">
<tr>
<td width="10%" class="headerItem">Current view:</td>
<td width="35%" class="headerValue"><a href="../../index.html">top level</a> - src/contracts</td>
<td width="5%"></td>
<td width="15%"></td>
<td width="10%" class="headerCovTableHead">Hit</td>
<td width="10%" class="headerCovTableHead">Total</td>
<td width="15%" class="headerCovTableHead">Coverage</td>
</tr>
<tr>
<td class="headerItem">Test:</td>
<td class="headerValue">TicketNFT Coverage</td>
<td></td>
<td class="headerItem">Lines:</td>
<td class="headerCovTableEntry">113</td>
<td class="headerCovTableEntry">130</td>
<td class="headerCovTableEntryMed">86.9 %</td>
</tr>
<tr>
<td class="headerItem">Date:</td>
<td class="headerValue">2023-02-21 16:00:17</td>
<td></td>
<td class="headerItem">Functions:</td>
<td class="headerCovTableEntry">31</td>
<td class="headerCovTableEntry">35</td>
<td class="headerCovTableEntryMed">88.6 %</td>
</tr>
<tr>
<td class="headerItem">Legend:</td>
<td class="headerValueLeg"> Rating:
<span class="coverLegendCovLo" title="Coverage rates below 75 % are classified as low">low: &lt; 75 %</span>
<span class="coverLegendCovMed" title="Coverage rates between 75 % and 90 % are classified as medium">medium: &gt;= 75 %</span>
<span class="coverLegendCovHi" title="Coverage rates of 90 % and more are classified as high">high: &gt;= 90 %</span>
</td>
<td></td>
<td class="headerItem">Branches:</td>
<td class="headerCovTableEntry">64</td>
<td class="headerCovTableEntry">74</td>
<td class="headerCovTableEntryMed">86.5 %</td>
</tr>
<tr><td><img src="../../glass.png" width=3 height=3 alt=""></td></tr>
</table>
</td>
</tr>
<tr><td class="ruler"><img src="../../glass.png" width=3 height=3 alt=""></td></tr>
</table>
<center>
<table width="80%" cellpadding=1 cellspacing=1 border=0>
<tr>
<td width="44%"><br></td>
<td width="8%"></td>
<td width="8%"></td>
<td width="8%"></td>
<td width="8%"></td>
<td width="8%"></td>
<td width="8%"></td>
<td width="8%"></td>
</tr>
<tr>
<td class="tableHead">Filename <span class="tableHeadSort"><a href="index.html"><img src="../../updown.png" width=10 height=14 alt="Sort by name" title="Sort by name" border=0></a></span></td>
<td class="tableHead" colspan=3>Line Coverage <span class="tableHeadSort"><a href="index-sort-l.html"><img src="../../updown.png" width=10 height=14 alt="Sort by line coverage" title="Sort by line coverage" border=0></a></span></td>
<td class="tableHead" colspan=2>Functions <span class="tableHeadSort"><a href="index-sort-f.html"><img src="../../updown.png" width=10 height=14 alt="Sort by function coverage" title="Sort by function coverage" border=0></a></span></td>
<td class="tableHead" colspan=2>Branches <span class="tableHeadSort"><img src="../../glass.png" width=10 height=14 alt="Sort by branch coverage" title="Sort by branch coverage" border=0></span></td>
</tr>
<tr>
<td class="coverFile"><a href="PurchaseToken.sol.gcov.html">PurchaseToken.sol</a></td>
<td class="coverBar" align="center">
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="../../ruby.png" width=71 height=10 alt="71.2%"><img src="../../snow.png" width=29 height=10 alt="71.2%"></td></tr></table>
</td>
<td class="coverPerLo">71.2&nbsp;%</td>
<td class="coverNumLo">42 / 59</td>
<td class="coverPerMed">81.0&nbsp;%</td>
<td class="coverNumMed">17 / 21</td>
<td class="coverPerLo">54.5&nbsp;%</td>
<td class="coverNumLo">12 / 22</td>
</tr>
<tr>
<td class="coverFile"><a href="TicketNFT.sol.gcov.html">TicketNFT.sol</a></td>
<td class="coverBar" align="center">
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="../../emerald.png" width=100 height=10 alt="100.0%"></td></tr></table>
</td>
<td class="coverPerHi">100.0&nbsp;%</td>
<td class="coverNumHi">71 / 71</td>
<td class="coverPerHi">100.0&nbsp;%</td>
<td class="coverNumHi">14 / 14</td>
<td class="coverPerHi">100.0&nbsp;%</td>
<td class="coverNumHi">52 / 52</td>
</tr>
</table>
</center>
<br>
<table width="100%" border=0 cellspacing=0 cellpadding=0>
<tr><td class="ruler"><img src="../../glass.png" width=3 height=3 alt=""></td></tr>
<tr><td class="versionInfo">Generated by: <a href="http://ltp.sourceforge.net/coverage/lcov.php">LCOV version 1.14</a></td></tr>
</table>
<br>
</body>
</html>

View file

@ -0,0 +1,123 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>LCOV - TicketNFT Coverage - src/contracts</title>
<link rel="stylesheet" type="text/css" href="../../gcov.css">
</head>
<body>
<table width="100%" border=0 cellspacing=0 cellpadding=0>
<tr><td class="title">LCOV - code coverage report</td></tr>
<tr><td class="ruler"><img src="../../glass.png" width=3 height=3 alt=""></td></tr>
<tr>
<td width="100%">
<table cellpadding=1 border=0 width="100%">
<tr>
<td width="10%" class="headerItem">Current view:</td>
<td width="35%" class="headerValue"><a href="../../index.html">top level</a> - src/contracts</td>
<td width="5%"></td>
<td width="15%"></td>
<td width="10%" class="headerCovTableHead">Hit</td>
<td width="10%" class="headerCovTableHead">Total</td>
<td width="15%" class="headerCovTableHead">Coverage</td>
</tr>
<tr>
<td class="headerItem">Test:</td>
<td class="headerValue">TicketNFT Coverage</td>
<td></td>
<td class="headerItem">Lines:</td>
<td class="headerCovTableEntry">113</td>
<td class="headerCovTableEntry">130</td>
<td class="headerCovTableEntryMed">86.9 %</td>
</tr>
<tr>
<td class="headerItem">Date:</td>
<td class="headerValue">2023-02-21 16:00:17</td>
<td></td>
<td class="headerItem">Functions:</td>
<td class="headerCovTableEntry">31</td>
<td class="headerCovTableEntry">35</td>
<td class="headerCovTableEntryMed">88.6 %</td>
</tr>
<tr>
<td class="headerItem">Legend:</td>
<td class="headerValueLeg"> Rating:
<span class="coverLegendCovLo" title="Coverage rates below 75 % are classified as low">low: &lt; 75 %</span>
<span class="coverLegendCovMed" title="Coverage rates between 75 % and 90 % are classified as medium">medium: &gt;= 75 %</span>
<span class="coverLegendCovHi" title="Coverage rates of 90 % and more are classified as high">high: &gt;= 90 %</span>
</td>
<td></td>
<td class="headerItem">Branches:</td>
<td class="headerCovTableEntry">64</td>
<td class="headerCovTableEntry">74</td>
<td class="headerCovTableEntryMed">86.5 %</td>
</tr>
<tr><td><img src="../../glass.png" width=3 height=3 alt=""></td></tr>
</table>
</td>
</tr>
<tr><td class="ruler"><img src="../../glass.png" width=3 height=3 alt=""></td></tr>
</table>
<center>
<table width="80%" cellpadding=1 cellspacing=1 border=0>
<tr>
<td width="44%"><br></td>
<td width="8%"></td>
<td width="8%"></td>
<td width="8%"></td>
<td width="8%"></td>
<td width="8%"></td>
<td width="8%"></td>
<td width="8%"></td>
</tr>
<tr>
<td class="tableHead">Filename <span class="tableHeadSort"><a href="index.html"><img src="../../updown.png" width=10 height=14 alt="Sort by name" title="Sort by name" border=0></a></span></td>
<td class="tableHead" colspan=3>Line Coverage <span class="tableHeadSort"><a href="index-sort-l.html"><img src="../../updown.png" width=10 height=14 alt="Sort by line coverage" title="Sort by line coverage" border=0></a></span></td>
<td class="tableHead" colspan=2>Functions <span class="tableHeadSort"><img src="../../glass.png" width=10 height=14 alt="Sort by function coverage" title="Sort by function coverage" border=0></span></td>
<td class="tableHead" colspan=2>Branches <span class="tableHeadSort"><a href="index-sort-b.html"><img src="../../updown.png" width=10 height=14 alt="Sort by branch coverage" title="Sort by branch coverage" border=0></a></span></td>
</tr>
<tr>
<td class="coverFile"><a href="PurchaseToken.sol.gcov.html">PurchaseToken.sol</a></td>
<td class="coverBar" align="center">
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="../../ruby.png" width=71 height=10 alt="71.2%"><img src="../../snow.png" width=29 height=10 alt="71.2%"></td></tr></table>
</td>
<td class="coverPerLo">71.2&nbsp;%</td>
<td class="coverNumLo">42 / 59</td>
<td class="coverPerMed">81.0&nbsp;%</td>
<td class="coverNumMed">17 / 21</td>
<td class="coverPerLo">54.5&nbsp;%</td>
<td class="coverNumLo">12 / 22</td>
</tr>
<tr>
<td class="coverFile"><a href="TicketNFT.sol.gcov.html">TicketNFT.sol</a></td>
<td class="coverBar" align="center">
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="../../emerald.png" width=100 height=10 alt="100.0%"></td></tr></table>
</td>
<td class="coverPerHi">100.0&nbsp;%</td>
<td class="coverNumHi">71 / 71</td>
<td class="coverPerHi">100.0&nbsp;%</td>
<td class="coverNumHi">14 / 14</td>
<td class="coverPerHi">100.0&nbsp;%</td>
<td class="coverNumHi">52 / 52</td>
</tr>
</table>
</center>
<br>
<table width="100%" border=0 cellspacing=0 cellpadding=0>
<tr><td class="ruler"><img src="../../glass.png" width=3 height=3 alt=""></td></tr>
<tr><td class="versionInfo">Generated by: <a href="http://ltp.sourceforge.net/coverage/lcov.php">LCOV version 1.14</a></td></tr>
</table>
<br>
</body>
</html>

View file

@ -0,0 +1,123 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>LCOV - TicketNFT Coverage - src/contracts</title>
<link rel="stylesheet" type="text/css" href="../../gcov.css">
</head>
<body>
<table width="100%" border=0 cellspacing=0 cellpadding=0>
<tr><td class="title">LCOV - code coverage report</td></tr>
<tr><td class="ruler"><img src="../../glass.png" width=3 height=3 alt=""></td></tr>
<tr>
<td width="100%">
<table cellpadding=1 border=0 width="100%">
<tr>
<td width="10%" class="headerItem">Current view:</td>
<td width="35%" class="headerValue"><a href="../../index.html">top level</a> - src/contracts</td>
<td width="5%"></td>
<td width="15%"></td>
<td width="10%" class="headerCovTableHead">Hit</td>
<td width="10%" class="headerCovTableHead">Total</td>
<td width="15%" class="headerCovTableHead">Coverage</td>
</tr>
<tr>
<td class="headerItem">Test:</td>
<td class="headerValue">TicketNFT Coverage</td>
<td></td>
<td class="headerItem">Lines:</td>
<td class="headerCovTableEntry">113</td>
<td class="headerCovTableEntry">130</td>
<td class="headerCovTableEntryMed">86.9 %</td>
</tr>
<tr>
<td class="headerItem">Date:</td>
<td class="headerValue">2023-02-21 16:00:17</td>
<td></td>
<td class="headerItem">Functions:</td>
<td class="headerCovTableEntry">31</td>
<td class="headerCovTableEntry">35</td>
<td class="headerCovTableEntryMed">88.6 %</td>
</tr>
<tr>
<td class="headerItem">Legend:</td>
<td class="headerValueLeg"> Rating:
<span class="coverLegendCovLo" title="Coverage rates below 75 % are classified as low">low: &lt; 75 %</span>
<span class="coverLegendCovMed" title="Coverage rates between 75 % and 90 % are classified as medium">medium: &gt;= 75 %</span>
<span class="coverLegendCovHi" title="Coverage rates of 90 % and more are classified as high">high: &gt;= 90 %</span>
</td>
<td></td>
<td class="headerItem">Branches:</td>
<td class="headerCovTableEntry">64</td>
<td class="headerCovTableEntry">74</td>
<td class="headerCovTableEntryMed">86.5 %</td>
</tr>
<tr><td><img src="../../glass.png" width=3 height=3 alt=""></td></tr>
</table>
</td>
</tr>
<tr><td class="ruler"><img src="../../glass.png" width=3 height=3 alt=""></td></tr>
</table>
<center>
<table width="80%" cellpadding=1 cellspacing=1 border=0>
<tr>
<td width="44%"><br></td>
<td width="8%"></td>
<td width="8%"></td>
<td width="8%"></td>
<td width="8%"></td>
<td width="8%"></td>
<td width="8%"></td>
<td width="8%"></td>
</tr>
<tr>
<td class="tableHead">Filename <span class="tableHeadSort"><a href="index.html"><img src="../../updown.png" width=10 height=14 alt="Sort by name" title="Sort by name" border=0></a></span></td>
<td class="tableHead" colspan=3>Line Coverage <span class="tableHeadSort"><img src="../../glass.png" width=10 height=14 alt="Sort by line coverage" title="Sort by line coverage" border=0></span></td>
<td class="tableHead" colspan=2>Functions <span class="tableHeadSort"><a href="index-sort-f.html"><img src="../../updown.png" width=10 height=14 alt="Sort by function coverage" title="Sort by function coverage" border=0></a></span></td>
<td class="tableHead" colspan=2>Branches <span class="tableHeadSort"><a href="index-sort-b.html"><img src="../../updown.png" width=10 height=14 alt="Sort by branch coverage" title="Sort by branch coverage" border=0></a></span></td>
</tr>
<tr>
<td class="coverFile"><a href="PurchaseToken.sol.gcov.html">PurchaseToken.sol</a></td>
<td class="coverBar" align="center">
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="../../ruby.png" width=71 height=10 alt="71.2%"><img src="../../snow.png" width=29 height=10 alt="71.2%"></td></tr></table>
</td>
<td class="coverPerLo">71.2&nbsp;%</td>
<td class="coverNumLo">42 / 59</td>
<td class="coverPerMed">81.0&nbsp;%</td>
<td class="coverNumMed">17 / 21</td>
<td class="coverPerLo">54.5&nbsp;%</td>
<td class="coverNumLo">12 / 22</td>
</tr>
<tr>
<td class="coverFile"><a href="TicketNFT.sol.gcov.html">TicketNFT.sol</a></td>
<td class="coverBar" align="center">
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="../../emerald.png" width=100 height=10 alt="100.0%"></td></tr></table>
</td>
<td class="coverPerHi">100.0&nbsp;%</td>
<td class="coverNumHi">71 / 71</td>
<td class="coverPerHi">100.0&nbsp;%</td>
<td class="coverNumHi">14 / 14</td>
<td class="coverPerHi">100.0&nbsp;%</td>
<td class="coverNumHi">52 / 52</td>
</tr>
</table>
</center>
<br>
<table width="100%" border=0 cellspacing=0 cellpadding=0>
<tr><td class="ruler"><img src="../../glass.png" width=3 height=3 alt=""></td></tr>
<tr><td class="versionInfo">Generated by: <a href="http://ltp.sourceforge.net/coverage/lcov.php">LCOV version 1.14</a></td></tr>
</table>
<br>
</body>
</html>

View file

@ -0,0 +1,123 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>LCOV - TicketNFT Coverage - src/contracts</title>
<link rel="stylesheet" type="text/css" href="../../gcov.css">
</head>
<body>
<table width="100%" border=0 cellspacing=0 cellpadding=0>
<tr><td class="title">LCOV - code coverage report</td></tr>
<tr><td class="ruler"><img src="../../glass.png" width=3 height=3 alt=""></td></tr>
<tr>
<td width="100%">
<table cellpadding=1 border=0 width="100%">
<tr>
<td width="10%" class="headerItem">Current view:</td>
<td width="35%" class="headerValue"><a href="../../index.html">top level</a> - src/contracts</td>
<td width="5%"></td>
<td width="15%"></td>
<td width="10%" class="headerCovTableHead">Hit</td>
<td width="10%" class="headerCovTableHead">Total</td>
<td width="15%" class="headerCovTableHead">Coverage</td>
</tr>
<tr>
<td class="headerItem">Test:</td>
<td class="headerValue">TicketNFT Coverage</td>
<td></td>
<td class="headerItem">Lines:</td>
<td class="headerCovTableEntry">113</td>
<td class="headerCovTableEntry">130</td>
<td class="headerCovTableEntryMed">86.9 %</td>
</tr>
<tr>
<td class="headerItem">Date:</td>
<td class="headerValue">2023-02-21 16:00:17</td>
<td></td>
<td class="headerItem">Functions:</td>
<td class="headerCovTableEntry">31</td>
<td class="headerCovTableEntry">35</td>
<td class="headerCovTableEntryMed">88.6 %</td>
</tr>
<tr>
<td class="headerItem">Legend:</td>
<td class="headerValueLeg"> Rating:
<span class="coverLegendCovLo" title="Coverage rates below 75 % are classified as low">low: &lt; 75 %</span>
<span class="coverLegendCovMed" title="Coverage rates between 75 % and 90 % are classified as medium">medium: &gt;= 75 %</span>
<span class="coverLegendCovHi" title="Coverage rates of 90 % and more are classified as high">high: &gt;= 90 %</span>
</td>
<td></td>
<td class="headerItem">Branches:</td>
<td class="headerCovTableEntry">64</td>
<td class="headerCovTableEntry">74</td>
<td class="headerCovTableEntryMed">86.5 %</td>
</tr>
<tr><td><img src="../../glass.png" width=3 height=3 alt=""></td></tr>
</table>
</td>
</tr>
<tr><td class="ruler"><img src="../../glass.png" width=3 height=3 alt=""></td></tr>
</table>
<center>
<table width="80%" cellpadding=1 cellspacing=1 border=0>
<tr>
<td width="44%"><br></td>
<td width="8%"></td>
<td width="8%"></td>
<td width="8%"></td>
<td width="8%"></td>
<td width="8%"></td>
<td width="8%"></td>
<td width="8%"></td>
</tr>
<tr>
<td class="tableHead">Filename <span class="tableHeadSort"><img src="../../glass.png" width=10 height=14 alt="Sort by name" title="Sort by name" border=0></span></td>
<td class="tableHead" colspan=3>Line Coverage <span class="tableHeadSort"><a href="index-sort-l.html"><img src="../../updown.png" width=10 height=14 alt="Sort by line coverage" title="Sort by line coverage" border=0></a></span></td>
<td class="tableHead" colspan=2>Functions <span class="tableHeadSort"><a href="index-sort-f.html"><img src="../../updown.png" width=10 height=14 alt="Sort by function coverage" title="Sort by function coverage" border=0></a></span></td>
<td class="tableHead" colspan=2>Branches <span class="tableHeadSort"><a href="index-sort-b.html"><img src="../../updown.png" width=10 height=14 alt="Sort by branch coverage" title="Sort by branch coverage" border=0></a></span></td>
</tr>
<tr>
<td class="coverFile"><a href="PurchaseToken.sol.gcov.html">PurchaseToken.sol</a></td>
<td class="coverBar" align="center">
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="../../ruby.png" width=71 height=10 alt="71.2%"><img src="../../snow.png" width=29 height=10 alt="71.2%"></td></tr></table>
</td>
<td class="coverPerLo">71.2&nbsp;%</td>
<td class="coverNumLo">42 / 59</td>
<td class="coverPerMed">81.0&nbsp;%</td>
<td class="coverNumMed">17 / 21</td>
<td class="coverPerLo">54.5&nbsp;%</td>
<td class="coverNumLo">12 / 22</td>
</tr>
<tr>
<td class="coverFile"><a href="TicketNFT.sol.gcov.html">TicketNFT.sol</a></td>
<td class="coverBar" align="center">
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="../../emerald.png" width=100 height=10 alt="100.0%"></td></tr></table>
</td>
<td class="coverPerHi">100.0&nbsp;%</td>
<td class="coverNumHi">71 / 71</td>
<td class="coverPerHi">100.0&nbsp;%</td>
<td class="coverNumHi">14 / 14</td>
<td class="coverPerHi">100.0&nbsp;%</td>
<td class="coverNumHi">52 / 52</td>
</tr>
</table>
</center>
<br>
<table width="100%" border=0 cellspacing=0 cellpadding=0>
<tr><td class="ruler"><img src="../../glass.png" width=3 height=3 alt=""></td></tr>
<tr><td class="versionInfo">Generated by: <a href="http://ltp.sourceforge.net/coverage/lcov.php">LCOV version 1.14</a></td></tr>
</table>
<br>
</body>
</html>

View file

@ -0,0 +1,100 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>LCOV - TicketNFT Coverage - test/TicketNFT.t.sol - functions</title>
<link rel="stylesheet" type="text/css" href="../gcov.css">
</head>
<body>
<table width="100%" border=0 cellspacing=0 cellpadding=0>
<tr><td class="title">LCOV - code coverage report</td></tr>
<tr><td class="ruler"><img src="../glass.png" width=3 height=3 alt=""></td></tr>
<tr>
<td width="100%">
<table cellpadding=1 border=0 width="100%">
<tr>
<td width="10%" class="headerItem">Current view:</td>
<td width="35%" class="headerValue"><a href="../index.html">top level</a> - <a href="index.html">test</a> - TicketNFT.t.sol<span style="font-size: 80%;"> (<a href="TicketNFT.t.sol.gcov.html">source</a> / functions)</span></td>
<td width="5%"></td>
<td width="15%"></td>
<td width="10%" class="headerCovTableHead">Hit</td>
<td width="10%" class="headerCovTableHead">Total</td>
<td width="15%" class="headerCovTableHead">Coverage</td>
</tr>
<tr>
<td class="headerItem">Test:</td>
<td class="headerValue">TicketNFT Coverage</td>
<td></td>
<td class="headerItem">Lines:</td>
<td class="headerCovTableEntry">0</td>
<td class="headerCovTableEntry">10</td>
<td class="headerCovTableEntryLo">0.0 %</td>
</tr>
<tr>
<td class="headerItem">Date:</td>
<td class="headerValue">2023-02-21 16:00:17</td>
<td></td>
<td class="headerItem">Functions:</td>
<td class="headerCovTableEntry">0</td>
<td class="headerCovTableEntry">3</td>
<td class="headerCovTableEntryLo">0.0 %</td>
</tr>
<tr>
<td class="headerItem">Legend:</td>
<td class="headerValueLeg"> Lines:
<span class="coverLegendCov">hit</span>
<span class="coverLegendNoCov">not hit</span>
| Branches:
<span class="coverLegendCov">+</span> taken
<span class="coverLegendNoCov">-</span> not taken
<span class="coverLegendNoCov">#</span> not executed
</td>
<td></td>
<td class="headerItem">Branches:</td>
<td class="headerCovTableEntry">0</td>
<td class="headerCovTableEntry">0</td>
<td class="headerCovTableEntryHi">-</td>
</tr>
<tr><td><img src="../glass.png" width=3 height=3 alt=""></td></tr>
</table>
</td>
</tr>
<tr><td class="ruler"><img src="../glass.png" width=3 height=3 alt=""></td></tr>
</table>
<center>
<table width="60%" cellpadding=1 cellspacing=1 border=0>
<tr><td><br></td></tr>
<tr>
<td width="80%" class="tableHead">Function Name <span class="tableHeadSort"><a href="TicketNFT.t.sol.func.html"><img src="../updown.png" width=10 height=14 alt="Sort by function name" title="Sort by function name" border=0></a></span></td>
<td width="20%" class="tableHead">Hit count <span class="tableHeadSort"><img src="../glass.png" width=10 height=14 alt="Sort by hit count" title="Sort by hit count" border=0></span></td>
</tr>
<tr>
<td class="coverFn"><a href="TicketNFT.t.sol.gcov.html#58">BaseTicketNFTTest._buyTicket</a></td>
<td class="coverFnLo">0</td>
</tr>
<tr>
<td class="coverFn"><a href="TicketNFT.t.sol.gcov.html#52">BaseTicketNFTTest._topUpTokens</a></td>
<td class="coverFnLo">0</td>
</tr>
<tr>
<td class="coverFn"><a href="TicketNFT.t.sol.gcov.html#46">BaseTicketNFTTest.setUp</a></td>
<td class="coverFnLo">0</td>
</tr>
</table>
<br>
</center>
<table width="100%" border=0 cellspacing=0 cellpadding=0>
<tr><td class="ruler"><img src="../glass.png" width=3 height=3 alt=""></td></tr>
<tr><td class="versionInfo">Generated by: <a href="http://ltp.sourceforge.net/coverage/lcov.php" target="_parent">LCOV version 1.14</a></td></tr>
</table>
<br>
</body>
</html>

View file

@ -0,0 +1,100 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>LCOV - TicketNFT Coverage - test/TicketNFT.t.sol - functions</title>
<link rel="stylesheet" type="text/css" href="../gcov.css">
</head>
<body>
<table width="100%" border=0 cellspacing=0 cellpadding=0>
<tr><td class="title">LCOV - code coverage report</td></tr>
<tr><td class="ruler"><img src="../glass.png" width=3 height=3 alt=""></td></tr>
<tr>
<td width="100%">
<table cellpadding=1 border=0 width="100%">
<tr>
<td width="10%" class="headerItem">Current view:</td>
<td width="35%" class="headerValue"><a href="../index.html">top level</a> - <a href="index.html">test</a> - TicketNFT.t.sol<span style="font-size: 80%;"> (<a href="TicketNFT.t.sol.gcov.html">source</a> / functions)</span></td>
<td width="5%"></td>
<td width="15%"></td>
<td width="10%" class="headerCovTableHead">Hit</td>
<td width="10%" class="headerCovTableHead">Total</td>
<td width="15%" class="headerCovTableHead">Coverage</td>
</tr>
<tr>
<td class="headerItem">Test:</td>
<td class="headerValue">TicketNFT Coverage</td>
<td></td>
<td class="headerItem">Lines:</td>
<td class="headerCovTableEntry">0</td>
<td class="headerCovTableEntry">10</td>
<td class="headerCovTableEntryLo">0.0 %</td>
</tr>
<tr>
<td class="headerItem">Date:</td>
<td class="headerValue">2023-02-21 16:00:17</td>
<td></td>
<td class="headerItem">Functions:</td>
<td class="headerCovTableEntry">0</td>
<td class="headerCovTableEntry">3</td>
<td class="headerCovTableEntryLo">0.0 %</td>
</tr>
<tr>
<td class="headerItem">Legend:</td>
<td class="headerValueLeg"> Lines:
<span class="coverLegendCov">hit</span>
<span class="coverLegendNoCov">not hit</span>
| Branches:
<span class="coverLegendCov">+</span> taken
<span class="coverLegendNoCov">-</span> not taken
<span class="coverLegendNoCov">#</span> not executed
</td>
<td></td>
<td class="headerItem">Branches:</td>
<td class="headerCovTableEntry">0</td>
<td class="headerCovTableEntry">0</td>
<td class="headerCovTableEntryHi">-</td>
</tr>
<tr><td><img src="../glass.png" width=3 height=3 alt=""></td></tr>
</table>
</td>
</tr>
<tr><td class="ruler"><img src="../glass.png" width=3 height=3 alt=""></td></tr>
</table>
<center>
<table width="60%" cellpadding=1 cellspacing=1 border=0>
<tr><td><br></td></tr>
<tr>
<td width="80%" class="tableHead">Function Name <span class="tableHeadSort"><img src="../glass.png" width=10 height=14 alt="Sort by function name" title="Sort by function name" border=0></span></td>
<td width="20%" class="tableHead">Hit count <span class="tableHeadSort"><a href="TicketNFT.t.sol.func-sort-c.html"><img src="../updown.png" width=10 height=14 alt="Sort by hit count" title="Sort by hit count" border=0></a></span></td>
</tr>
<tr>
<td class="coverFn"><a href="TicketNFT.t.sol.gcov.html#58">BaseTicketNFTTest._buyTicket</a></td>
<td class="coverFnLo">0</td>
</tr>
<tr>
<td class="coverFn"><a href="TicketNFT.t.sol.gcov.html#52">BaseTicketNFTTest._topUpTokens</a></td>
<td class="coverFnLo">0</td>
</tr>
<tr>
<td class="coverFn"><a href="TicketNFT.t.sol.gcov.html#46">BaseTicketNFTTest.setUp</a></td>
<td class="coverFnLo">0</td>
</tr>
</table>
<br>
</center>
<table width="100%" border=0 cellspacing=0 cellpadding=0>
<tr><td class="ruler"><img src="../glass.png" width=3 height=3 alt=""></td></tr>
<tr><td class="versionInfo">Generated by: <a href="http://ltp.sourceforge.net/coverage/lcov.php" target="_parent">LCOV version 1.14</a></td></tr>
</table>
<br>
</body>
</html>

View file

@ -0,0 +1,686 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>LCOV - TicketNFT Coverage - test/TicketNFT.t.sol</title>
<link rel="stylesheet" type="text/css" href="../gcov.css">
</head>
<body>
<table width="100%" border=0 cellspacing=0 cellpadding=0>
<tr><td class="title">LCOV - code coverage report</td></tr>
<tr><td class="ruler"><img src="../glass.png" width=3 height=3 alt=""></td></tr>
<tr>
<td width="100%">
<table cellpadding=1 border=0 width="100%">
<tr>
<td width="10%" class="headerItem">Current view:</td>
<td width="35%" class="headerValue"><a href="../index.html">top level</a> - <a href="index.html">test</a> - TicketNFT.t.sol<span style="font-size: 80%;"> (source / <a href="TicketNFT.t.sol.func-sort-c.html">functions</a>)</span></td>
<td width="5%"></td>
<td width="15%"></td>
<td width="10%" class="headerCovTableHead">Hit</td>
<td width="10%" class="headerCovTableHead">Total</td>
<td width="15%" class="headerCovTableHead">Coverage</td>
</tr>
<tr>
<td class="headerItem">Test:</td>
<td class="headerValue">TicketNFT Coverage</td>
<td></td>
<td class="headerItem">Lines:</td>
<td class="headerCovTableEntry">0</td>
<td class="headerCovTableEntry">10</td>
<td class="headerCovTableEntryLo">0.0 %</td>
</tr>
<tr>
<td class="headerItem">Date:</td>
<td class="headerValue">2023-02-21 16:00:17</td>
<td></td>
<td class="headerItem">Functions:</td>
<td class="headerCovTableEntry">0</td>
<td class="headerCovTableEntry">3</td>
<td class="headerCovTableEntryLo">0.0 %</td>
</tr>
<tr>
<td class="headerItem">Legend:</td>
<td class="headerValueLeg"> Lines:
<span class="coverLegendCov">hit</span>
<span class="coverLegendNoCov">not hit</span>
| Branches:
<span class="coverLegendCov">+</span> taken
<span class="coverLegendNoCov">-</span> not taken
<span class="coverLegendNoCov">#</span> not executed
</td>
<td></td>
<td class="headerItem">Branches:</td>
<td class="headerCovTableEntry">0</td>
<td class="headerCovTableEntry">0</td>
<td class="headerCovTableEntryHi">-</td>
</tr>
<tr><td><img src="../glass.png" width=3 height=3 alt=""></td></tr>
</table>
</td>
</tr>
<tr><td class="ruler"><img src="../glass.png" width=3 height=3 alt=""></td></tr>
</table>
<table cellpadding=0 cellspacing=0 border=0>
<tr>
<td><br></td>
</tr>
<tr>
<td>
<pre class="sourceHeading"> Branch data Line data Source code</pre>
<pre class="source">
<a name="1"><span class="lineNum"> 1 </span> : : // SPDX-License-Identifier: UNLICENSED</a>
<a name="2"><span class="lineNum"> 2 </span> : : pragma solidity ^0.8.10;</a>
<a name="3"><span class="lineNum"> 3 </span> : : </a>
<a name="4"><span class="lineNum"> 4 </span> : : import &quot;forge-std/Test.sol&quot;;</a>
<a name="5"><span class="lineNum"> 5 </span> : : import &quot;../src/contracts/PurchaseToken.sol&quot;;</a>
<a name="6"><span class="lineNum"> 6 </span> : : import &quot;../src/contracts/TicketNFT.sol&quot;;</a>
<a name="7"><span class="lineNum"> 7 </span> : : </a>
<a name="8"><span class="lineNum"> 8 </span> : : contract BaseTicketNFTTest is Test {</a>
<a name="9"><span class="lineNum"> 9 </span> : : // TicketNFT Events</a>
<a name="10"><span class="lineNum"> 10 </span> : : event Transfer(</a>
<a name="11"><span class="lineNum"> 11 </span> : : address indexed from,</a>
<a name="12"><span class="lineNum"> 12 </span> : : address indexed to,</a>
<a name="13"><span class="lineNum"> 13 </span> : : uint256 indexed ticketID</a>
<a name="14"><span class="lineNum"> 14 </span> : : );</a>
<a name="15"><span class="lineNum"> 15 </span> : : event Approval(</a>
<a name="16"><span class="lineNum"> 16 </span> : : address indexed holder,</a>
<a name="17"><span class="lineNum"> 17 </span> : : address indexed approved,</a>
<a name="18"><span class="lineNum"> 18 </span> : : uint256 indexed ticketID</a>
<a name="19"><span class="lineNum"> 19 </span> : : );</a>
<a name="20"><span class="lineNum"> 20 </span> : : </a>
<a name="21"><span class="lineNum"> 21 </span> : : // Primary Market Events</a>
<a name="22"><span class="lineNum"> 22 </span> : : event Purchase(address indexed holder, string indexed holderName);</a>
<a name="23"><span class="lineNum"> 23 </span> : : </a>
<a name="24"><span class="lineNum"> 24 </span> : : // Secondary Market Events</a>
<a name="25"><span class="lineNum"> 25 </span> : : event Listing(</a>
<a name="26"><span class="lineNum"> 26 </span> : : uint256 indexed ticketID,</a>
<a name="27"><span class="lineNum"> 27 </span> : : address indexed holder,</a>
<a name="28"><span class="lineNum"> 28 </span> : : uint256 price</a>
<a name="29"><span class="lineNum"> 29 </span> : : );</a>
<a name="30"><span class="lineNum"> 30 </span> : : event Purchase(</a>
<a name="31"><span class="lineNum"> 31 </span> : : address indexed purchaser,</a>
<a name="32"><span class="lineNum"> 32 </span> : : uint256 indexed ticketID,</a>
<a name="33"><span class="lineNum"> 33 </span> : : uint256 price,</a>
<a name="34"><span class="lineNum"> 34 </span> : : string newName</a>
<a name="35"><span class="lineNum"> 35 </span> : : );</a>
<a name="36"><span class="lineNum"> 36 </span> : : event Delisting(uint256 indexed ticketID);</a>
<a name="37"><span class="lineNum"> 37 </span> : : </a>
<a name="38"><span class="lineNum"> 38 </span> : : uint256 public ticketPriceEth = 1e18;</a>
<a name="39"><span class="lineNum"> 39 </span> : : uint256 public ticketPrice = 100e18;</a>
<a name="40"><span class="lineNum"> 40 </span> : : </a>
<a name="41"><span class="lineNum"> 41 </span> : : PurchaseToken public token;</a>
<a name="42"><span class="lineNum"> 42 </span> : : TicketNFT public nft;</a>
<a name="43"><span class="lineNum"> 43 </span> : : </a>
<a name="44"><span class="lineNum"> 44 </span> : : address public alice = makeAddr(&quot;alice&quot;);</a>
<a name="45"><span class="lineNum"> 45 </span> : : address public bob = makeAddr(&quot;bob&quot;);</a>
<a name="46"><span class="lineNum"> 46 </span> : : address public charlie = makeAddr(&quot;charlie&quot;);</a>
<a name="47"><span class="lineNum"> 47 </span> : : </a>
<a name="48"><span class="lineNum"> 48 </span> : : function setUp() public {</a>
<a name="49"><span class="lineNum"> 49 </span> :<span class="lineNoCov"> 0 : token = new PurchaseToken();</span></a>
<a name="50"><span class="lineNum"> 50 </span> :<span class="lineNoCov"> 0 : nft = new TicketNFT(token);</span></a>
<a name="51"><span class="lineNum"> 51 </span> : : }</a>
<a name="52"><span class="lineNum"> 52 </span> : : </a>
<a name="53"><span class="lineNum"> 53 </span> : : // Add Purchase Tokens to `recipient` to afford `amount` tickets</a>
<a name="54"><span class="lineNum"> 54 </span> : : function _topUpTokens(address recipient, uint256 amount) internal {</a>
<a name="55"><span class="lineNum"> 55 </span> :<span class="lineNoCov"> 0 : vm.deal(recipient, amount * ticketPriceEth);</span></a>
<a name="56"><span class="lineNum"> 56 </span> :<span class="lineNoCov"> 0 : vm.prank(recipient);</span></a>
<a name="57"><span class="lineNum"> 57 </span> :<span class="lineNoCov"> 0 : token.mint{value: amount * ticketPriceEth}();</span></a>
<a name="58"><span class="lineNum"> 58 </span> : : }</a>
<a name="59"><span class="lineNum"> 59 </span> : : </a>
<a name="60"><span class="lineNum"> 60 </span> : : function _buyTicket(address recipient, string memory recipientName)</a>
<a name="61"><span class="lineNum"> 61 </span> : : internal</a>
<a name="62"><span class="lineNum"> 62 </span> : : {</a>
<a name="63"><span class="lineNum"> 63 </span> :<span class="lineNoCov"> 0 : _topUpTokens(recipient, 1);</span></a>
<a name="64"><span class="lineNum"> 64 </span> :<span class="lineNoCov"> 0 : vm.prank(recipient);</span></a>
<a name="65"><span class="lineNum"> 65 </span> :<span class="lineNoCov"> 0 : token.approve(address(nft), ticketPrice);</span></a>
<a name="66"><span class="lineNum"> 66 </span> :<span class="lineNoCov"> 0 : vm.prank(recipient);</span></a>
<a name="67"><span class="lineNum"> 67 </span> :<span class="lineNoCov"> 0 : nft.purchase(recipientName);</span></a>
<a name="68"><span class="lineNum"> 68 </span> : : }</a>
<a name="69"><span class="lineNum"> 69 </span> : : }</a>
<a name="70"><span class="lineNum"> 70 </span> : : </a>
<a name="71"><span class="lineNum"> 71 </span> : : contract TicketNFTTest is BaseTicketNFTTest {</a>
<a name="72"><span class="lineNum"> 72 </span> : : function testMint() public {</a>
<a name="73"><span class="lineNum"> 73 </span> : : vm.prank(address(nft));</a>
<a name="74"><span class="lineNum"> 74 </span> : : vm.expectEmit(true, true, true, false);</a>
<a name="75"><span class="lineNum"> 75 </span> : : emit Transfer(address(0), alice, 1);</a>
<a name="76"><span class="lineNum"> 76 </span> : : nft.mint(alice, &quot;alice&quot;);</a>
<a name="77"><span class="lineNum"> 77 </span> : : assertEq(nft.balanceOf(alice), 1);</a>
<a name="78"><span class="lineNum"> 78 </span> : : assertEq(nft.holderOf(1), alice);</a>
<a name="79"><span class="lineNum"> 79 </span> : : assertEq(nft.getApproved(1), address(0));</a>
<a name="80"><span class="lineNum"> 80 </span> : : assertEq(nft.holderNameOf(1), &quot;alice&quot;);</a>
<a name="81"><span class="lineNum"> 81 </span> : : assertEq(nft.isExpiredOrUsed(1), false);</a>
<a name="82"><span class="lineNum"> 82 </span> : : }</a>
<a name="83"><span class="lineNum"> 83 </span> : : </a>
<a name="84"><span class="lineNum"> 84 </span> : : function testMintUnauthorized() public {</a>
<a name="85"><span class="lineNum"> 85 </span> : : _topUpTokens(alice, 1);</a>
<a name="86"><span class="lineNum"> 86 </span> : : vm.prank(alice);</a>
<a name="87"><span class="lineNum"> 87 </span> : : vm.expectRevert(&quot;mint: can only be called by primary market&quot;);</a>
<a name="88"><span class="lineNum"> 88 </span> : : nft.mint(alice, &quot;alice&quot;);</a>
<a name="89"><span class="lineNum"> 89 </span> : : assertEq(nft.balanceOf(alice), 0);</a>
<a name="90"><span class="lineNum"> 90 </span> : : }</a>
<a name="91"><span class="lineNum"> 91 </span> : : </a>
<a name="92"><span class="lineNum"> 92 </span> : : function testBalanceOf() public {</a>
<a name="93"><span class="lineNum"> 93 </span> : : assertEq(nft.balanceOf(alice), 0);</a>
<a name="94"><span class="lineNum"> 94 </span> : : _buyTicket(alice, &quot;alice&quot;);</a>
<a name="95"><span class="lineNum"> 95 </span> : : assertEq(nft.balanceOf(alice), 1);</a>
<a name="96"><span class="lineNum"> 96 </span> : : }</a>
<a name="97"><span class="lineNum"> 97 </span> : : </a>
<a name="98"><span class="lineNum"> 98 </span> : : function testHolderOf() public {</a>
<a name="99"><span class="lineNum"> 99 </span> : : _buyTicket(alice, &quot;alice&quot;);</a>
<a name="100"><span class="lineNum"> 100 </span> : : assertEq(nft.holderOf(1), alice);</a>
<a name="101"><span class="lineNum"> 101 </span> : : vm.expectRevert(&quot;holderOf: ticket doesn't exist&quot;);</a>
<a name="102"><span class="lineNum"> 102 </span> : : nft.holderOf(2);</a>
<a name="103"><span class="lineNum"> 103 </span> : : }</a>
<a name="104"><span class="lineNum"> 104 </span> : : </a>
<a name="105"><span class="lineNum"> 105 </span> : : function testHolderNameOf() public {</a>
<a name="106"><span class="lineNum"> 106 </span> : : _buyTicket(alice, &quot;alice&quot;);</a>
<a name="107"><span class="lineNum"> 107 </span> : : assertEq(nft.holderNameOf(1), &quot;alice&quot;);</a>
<a name="108"><span class="lineNum"> 108 </span> : : vm.expectRevert(&quot;holderNameOf: ticket doesn't exist&quot;);</a>
<a name="109"><span class="lineNum"> 109 </span> : : nft.holderNameOf(2);</a>
<a name="110"><span class="lineNum"> 110 </span> : : }</a>
<a name="111"><span class="lineNum"> 111 </span> : : </a>
<a name="112"><span class="lineNum"> 112 </span> : : function testUpdateHolderName() public {</a>
<a name="113"><span class="lineNum"> 113 </span> : : _buyTicket(alice, &quot;alice1&quot;);</a>
<a name="114"><span class="lineNum"> 114 </span> : : assertEq(nft.holderNameOf(1), &quot;alice1&quot;);</a>
<a name="115"><span class="lineNum"> 115 </span> : : vm.prank(alice);</a>
<a name="116"><span class="lineNum"> 116 </span> : : nft.updateHolderName(1, &quot;alice2&quot;);</a>
<a name="117"><span class="lineNum"> 117 </span> : : assertEq(nft.holderNameOf(1), &quot;alice2&quot;);</a>
<a name="118"><span class="lineNum"> 118 </span> : : }</a>
<a name="119"><span class="lineNum"> 119 </span> : : </a>
<a name="120"><span class="lineNum"> 120 </span> : : function testUpdateHolderNameInvalid() public {</a>
<a name="121"><span class="lineNum"> 121 </span> : : _buyTicket(alice, &quot;alice1&quot;);</a>
<a name="122"><span class="lineNum"> 122 </span> : : assertEq(nft.holderNameOf(1), &quot;alice1&quot;);</a>
<a name="123"><span class="lineNum"> 123 </span> : : vm.prank(alice);</a>
<a name="124"><span class="lineNum"> 124 </span> : : vm.expectRevert(&quot;updateHolderName: ticket doesn't exist&quot;);</a>
<a name="125"><span class="lineNum"> 125 </span> : : nft.updateHolderName(2, &quot;alice2&quot;);</a>
<a name="126"><span class="lineNum"> 126 </span> : : }</a>
<a name="127"><span class="lineNum"> 127 </span> : : </a>
<a name="128"><span class="lineNum"> 128 </span> : : function testUpdateHolderNameUnauthorized() public {</a>
<a name="129"><span class="lineNum"> 129 </span> : : _buyTicket(alice, &quot;alice&quot;);</a>
<a name="130"><span class="lineNum"> 130 </span> : : assertEq(nft.holderNameOf(1), &quot;alice&quot;);</a>
<a name="131"><span class="lineNum"> 131 </span> : : vm.prank(bob);</a>
<a name="132"><span class="lineNum"> 132 </span> : : vm.expectRevert(&quot;updateHolderName: msg.sender doesn't own ticket&quot;);</a>
<a name="133"><span class="lineNum"> 133 </span> : : nft.updateHolderName(1, &quot;bob&quot;);</a>
<a name="134"><span class="lineNum"> 134 </span> : : assertEq(nft.holderNameOf(1), &quot;alice&quot;);</a>
<a name="135"><span class="lineNum"> 135 </span> : : }</a>
<a name="136"><span class="lineNum"> 136 </span> : : </a>
<a name="137"><span class="lineNum"> 137 </span> : : function testTransfer() public {</a>
<a name="138"><span class="lineNum"> 138 </span> : : _buyTicket(alice, &quot;alice&quot;);</a>
<a name="139"><span class="lineNum"> 139 </span> : : vm.prank(alice);</a>
<a name="140"><span class="lineNum"> 140 </span> : : vm.expectEmit(true, true, true, false);</a>
<a name="141"><span class="lineNum"> 141 </span> : : emit Transfer(alice, bob, 1);</a>
<a name="142"><span class="lineNum"> 142 </span> : : vm.expectEmit(true, true, true, false);</a>
<a name="143"><span class="lineNum"> 143 </span> : : emit Approval(bob, address(0), 1);</a>
<a name="144"><span class="lineNum"> 144 </span> : : nft.transferFrom(alice, bob, 1);</a>
<a name="145"><span class="lineNum"> 145 </span> : : assertEq(nft.balanceOf(alice), 0);</a>
<a name="146"><span class="lineNum"> 146 </span> : : assertEq(nft.balanceOf(bob), 1);</a>
<a name="147"><span class="lineNum"> 147 </span> : : assertEq(nft.holderOf(1), bob);</a>
<a name="148"><span class="lineNum"> 148 </span> : : assertEq(nft.getApproved(1), address(0));</a>
<a name="149"><span class="lineNum"> 149 </span> : : assertEq(nft.holderNameOf(1), &quot;alice&quot;);</a>
<a name="150"><span class="lineNum"> 150 </span> : : assertEq(nft.isExpiredOrUsed(1), false);</a>
<a name="151"><span class="lineNum"> 151 </span> : : }</a>
<a name="152"><span class="lineNum"> 152 </span> : : </a>
<a name="153"><span class="lineNum"> 153 </span> : : function testTransferInvalid() public {</a>
<a name="154"><span class="lineNum"> 154 </span> : : _buyTicket(alice, &quot;alice&quot;);</a>
<a name="155"><span class="lineNum"> 155 </span> : : vm.prank(alice);</a>
<a name="156"><span class="lineNum"> 156 </span> : : vm.expectRevert(&quot;transferFrom: from cannot be 0&quot;);</a>
<a name="157"><span class="lineNum"> 157 </span> : : nft.transferFrom(address(0), bob, 2);</a>
<a name="158"><span class="lineNum"> 158 </span> : : vm.prank(alice);</a>
<a name="159"><span class="lineNum"> 159 </span> : : vm.expectRevert(&quot;transferFrom: to cannot be 0&quot;);</a>
<a name="160"><span class="lineNum"> 160 </span> : : nft.transferFrom(alice, address(0), 2);</a>
<a name="161"><span class="lineNum"> 161 </span> : : }</a>
<a name="162"><span class="lineNum"> 162 </span> : : </a>
<a name="163"><span class="lineNum"> 163 </span> : : function testTransferUnauthorized() public {</a>
<a name="164"><span class="lineNum"> 164 </span> : : _buyTicket(alice, &quot;alice&quot;);</a>
<a name="165"><span class="lineNum"> 165 </span> : : vm.prank(bob);</a>
<a name="166"><span class="lineNum"> 166 </span> : : vm.expectRevert(</a>
<a name="167"><span class="lineNum"> 167 </span> : : &quot;transferFrom: msg.sender must be current holder or approved sender&quot;</a>
<a name="168"><span class="lineNum"> 168 </span> : : );</a>
<a name="169"><span class="lineNum"> 169 </span> : : nft.transferFrom(alice, bob, 1);</a>
<a name="170"><span class="lineNum"> 170 </span> : : }</a>
<a name="171"><span class="lineNum"> 171 </span> : : </a>
<a name="172"><span class="lineNum"> 172 </span> : : function testApproval() public {</a>
<a name="173"><span class="lineNum"> 173 </span> : : _buyTicket(alice, &quot;alice&quot;);</a>
<a name="174"><span class="lineNum"> 174 </span> : : vm.prank(alice);</a>
<a name="175"><span class="lineNum"> 175 </span> : : vm.expectEmit(true, true, true, false);</a>
<a name="176"><span class="lineNum"> 176 </span> : : emit Approval(alice, bob, 1);</a>
<a name="177"><span class="lineNum"> 177 </span> : : nft.approve(bob, 1);</a>
<a name="178"><span class="lineNum"> 178 </span> : : assertEq(nft.getApproved(1), bob);</a>
<a name="179"><span class="lineNum"> 179 </span> : : }</a>
<a name="180"><span class="lineNum"> 180 </span> : : </a>
<a name="181"><span class="lineNum"> 181 </span> : : function testApprovalInvalid() public {</a>
<a name="182"><span class="lineNum"> 182 </span> : : _buyTicket(alice, &quot;alice&quot;);</a>
<a name="183"><span class="lineNum"> 183 </span> : : vm.prank(alice);</a>
<a name="184"><span class="lineNum"> 184 </span> : : vm.expectRevert(&quot;approve: ticket doesn't exist&quot;);</a>
<a name="185"><span class="lineNum"> 185 </span> : : nft.approve(bob, 2);</a>
<a name="186"><span class="lineNum"> 186 </span> : : }</a>
<a name="187"><span class="lineNum"> 187 </span> : : </a>
<a name="188"><span class="lineNum"> 188 </span> : : function testApprovalUnauthorized() public {</a>
<a name="189"><span class="lineNum"> 189 </span> : : _buyTicket(alice, &quot;alice&quot;);</a>
<a name="190"><span class="lineNum"> 190 </span> : : vm.prank(bob);</a>
<a name="191"><span class="lineNum"> 191 </span> : : vm.expectRevert(&quot;approve: msg.sender doesn't own ticket&quot;);</a>
<a name="192"><span class="lineNum"> 192 </span> : : nft.approve(bob, 1);</a>
<a name="193"><span class="lineNum"> 193 </span> : : assertEq(nft.getApproved(1), address(0));</a>
<a name="194"><span class="lineNum"> 194 </span> : : }</a>
<a name="195"><span class="lineNum"> 195 </span> : : </a>
<a name="196"><span class="lineNum"> 196 </span> : : function testGetApprovedInvalid() public {</a>
<a name="197"><span class="lineNum"> 197 </span> : : vm.expectRevert(&quot;getApproved: ticket doesn't exist&quot;);</a>
<a name="198"><span class="lineNum"> 198 </span> : : nft.getApproved(1);</a>
<a name="199"><span class="lineNum"> 199 </span> : : }</a>
<a name="200"><span class="lineNum"> 200 </span> : : </a>
<a name="201"><span class="lineNum"> 201 </span> : : function testTransferFrom() public {</a>
<a name="202"><span class="lineNum"> 202 </span> : : _buyTicket(alice, &quot;alice&quot;);</a>
<a name="203"><span class="lineNum"> 203 </span> : : vm.prank(alice);</a>
<a name="204"><span class="lineNum"> 204 </span> : : nft.approve(bob, 1);</a>
<a name="205"><span class="lineNum"> 205 </span> : : vm.prank(bob);</a>
<a name="206"><span class="lineNum"> 206 </span> : : vm.expectEmit(true, true, true, false);</a>
<a name="207"><span class="lineNum"> 207 </span> : : emit Transfer(alice, charlie, 1);</a>
<a name="208"><span class="lineNum"> 208 </span> : : vm.expectEmit(true, true, true, false);</a>
<a name="209"><span class="lineNum"> 209 </span> : : emit Approval(charlie, address(0), 1);</a>
<a name="210"><span class="lineNum"> 210 </span> : : nft.transferFrom(alice, charlie, 1);</a>
<a name="211"><span class="lineNum"> 211 </span> : : assertEq(nft.balanceOf(alice), 0);</a>
<a name="212"><span class="lineNum"> 212 </span> : : assertEq(nft.balanceOf(bob), 0);</a>
<a name="213"><span class="lineNum"> 213 </span> : : assertEq(nft.balanceOf(charlie), 1);</a>
<a name="214"><span class="lineNum"> 214 </span> : : assertEq(nft.holderOf(1), charlie);</a>
<a name="215"><span class="lineNum"> 215 </span> : : assertEq(nft.getApproved(1), address(0));</a>
<a name="216"><span class="lineNum"> 216 </span> : : }</a>
<a name="217"><span class="lineNum"> 217 </span> : : </a>
<a name="218"><span class="lineNum"> 218 </span> : : function testTransferFromInvalid() public {</a>
<a name="219"><span class="lineNum"> 219 </span> : : _buyTicket(alice, &quot;alice&quot;);</a>
<a name="220"><span class="lineNum"> 220 </span> : : vm.prank(alice);</a>
<a name="221"><span class="lineNum"> 221 </span> : : nft.approve(bob, 1);</a>
<a name="222"><span class="lineNum"> 222 </span> : : assertEq(nft.getApproved(1), bob);</a>
<a name="223"><span class="lineNum"> 223 </span> : : vm.prank(bob);</a>
<a name="224"><span class="lineNum"> 224 </span> : : vm.expectRevert(&quot;transferFrom: from cannot be 0&quot;);</a>
<a name="225"><span class="lineNum"> 225 </span> : : nft.transferFrom(address(0), charlie, 1);</a>
<a name="226"><span class="lineNum"> 226 </span> : : vm.prank(bob);</a>
<a name="227"><span class="lineNum"> 227 </span> : : vm.expectRevert(&quot;transferFrom: to cannot be 0&quot;);</a>
<a name="228"><span class="lineNum"> 228 </span> : : nft.transferFrom(alice, address(0), 1);</a>
<a name="229"><span class="lineNum"> 229 </span> : : vm.prank(bob);</a>
<a name="230"><span class="lineNum"> 230 </span> : : vm.expectRevert(&quot;transferFrom: ticket not owned by from&quot;);</a>
<a name="231"><span class="lineNum"> 231 </span> : : nft.transferFrom(bob, charlie, 1);</a>
<a name="232"><span class="lineNum"> 232 </span> : : vm.prank(bob);</a>
<a name="233"><span class="lineNum"> 233 </span> : : vm.expectRevert(&quot;transferFrom: ticket not owned by from&quot;);</a>
<a name="234"><span class="lineNum"> 234 </span> : : nft.transferFrom(charlie, bob, 1);</a>
<a name="235"><span class="lineNum"> 235 </span> : : assertEq(nft.balanceOf(alice), 1);</a>
<a name="236"><span class="lineNum"> 236 </span> : : assertEq(nft.balanceOf(bob), 0);</a>
<a name="237"><span class="lineNum"> 237 </span> : : assertEq(nft.balanceOf(charlie), 0);</a>
<a name="238"><span class="lineNum"> 238 </span> : : assertEq(nft.holderOf(1), alice);</a>
<a name="239"><span class="lineNum"> 239 </span> : : assertEq(nft.getApproved(1), bob);</a>
<a name="240"><span class="lineNum"> 240 </span> : : }</a>
<a name="241"><span class="lineNum"> 241 </span> : : </a>
<a name="242"><span class="lineNum"> 242 </span> : : function testTransferFromUnauthorized() public {</a>
<a name="243"><span class="lineNum"> 243 </span> : : _buyTicket(alice, &quot;alice&quot;);</a>
<a name="244"><span class="lineNum"> 244 </span> : : vm.prank(alice);</a>
<a name="245"><span class="lineNum"> 245 </span> : : nft.approve(bob, 1);</a>
<a name="246"><span class="lineNum"> 246 </span> : : assertEq(nft.getApproved(1), bob);</a>
<a name="247"><span class="lineNum"> 247 </span> : : vm.prank(charlie);</a>
<a name="248"><span class="lineNum"> 248 </span> : : vm.expectRevert(</a>
<a name="249"><span class="lineNum"> 249 </span> : : &quot;transferFrom: msg.sender must be current holder or approved sender&quot;</a>
<a name="250"><span class="lineNum"> 250 </span> : : );</a>
<a name="251"><span class="lineNum"> 251 </span> : : nft.transferFrom(alice, charlie, 1);</a>
<a name="252"><span class="lineNum"> 252 </span> : : assertEq(nft.balanceOf(alice), 1);</a>
<a name="253"><span class="lineNum"> 253 </span> : : assertEq(nft.balanceOf(bob), 0);</a>
<a name="254"><span class="lineNum"> 254 </span> : : assertEq(nft.balanceOf(charlie), 0);</a>
<a name="255"><span class="lineNum"> 255 </span> : : assertEq(nft.holderOf(1), alice);</a>
<a name="256"><span class="lineNum"> 256 </span> : : assertEq(nft.getApproved(1), bob);</a>
<a name="257"><span class="lineNum"> 257 </span> : : }</a>
<a name="258"><span class="lineNum"> 258 </span> : : </a>
<a name="259"><span class="lineNum"> 259 </span> : : function testIsExpiredOrUsedInvalid() public {</a>
<a name="260"><span class="lineNum"> 260 </span> : : vm.expectRevert(&quot;isExpiredOrUsed: ticket doesn't exist&quot;);</a>
<a name="261"><span class="lineNum"> 261 </span> : : nft.isExpiredOrUsed(1);</a>
<a name="262"><span class="lineNum"> 262 </span> : : }</a>
<a name="263"><span class="lineNum"> 263 </span> : : </a>
<a name="264"><span class="lineNum"> 264 </span> : : function testExpiry() public {</a>
<a name="265"><span class="lineNum"> 265 </span> : : _buyTicket(alice, &quot;alice&quot;);</a>
<a name="266"><span class="lineNum"> 266 </span> : : assertEq(nft.isExpiredOrUsed(1), false);</a>
<a name="267"><span class="lineNum"> 267 </span> : : vm.warp(block.timestamp + 10 days);</a>
<a name="268"><span class="lineNum"> 268 </span> : : assertEq(nft.isExpiredOrUsed(1), false);</a>
<a name="269"><span class="lineNum"> 269 </span> : : vm.warp(block.timestamp + 1);</a>
<a name="270"><span class="lineNum"> 270 </span> : : assertEq(nft.isExpiredOrUsed(1), true);</a>
<a name="271"><span class="lineNum"> 271 </span> : : }</a>
<a name="272"><span class="lineNum"> 272 </span> : : </a>
<a name="273"><span class="lineNum"> 273 </span> : : function testSetUsed() public {</a>
<a name="274"><span class="lineNum"> 274 </span> : : _buyTicket(alice, &quot;alice&quot;);</a>
<a name="275"><span class="lineNum"> 275 </span> : : assertEq(nft.isExpiredOrUsed(1), false);</a>
<a name="276"><span class="lineNum"> 276 </span> : : vm.prank(address(this));</a>
<a name="277"><span class="lineNum"> 277 </span> : : nft.setUsed(1);</a>
<a name="278"><span class="lineNum"> 278 </span> : : assertEq(nft.isExpiredOrUsed(1), true);</a>
<a name="279"><span class="lineNum"> 279 </span> : : }</a>
<a name="280"><span class="lineNum"> 280 </span> : : </a>
<a name="281"><span class="lineNum"> 281 </span> : : function testSetUsedNonExistent() public {</a>
<a name="282"><span class="lineNum"> 282 </span> : : vm.expectRevert(&quot;setUsed: ticket doesn't exist&quot;);</a>
<a name="283"><span class="lineNum"> 283 </span> : : nft.setUsed(1);</a>
<a name="284"><span class="lineNum"> 284 </span> : : }</a>
<a name="285"><span class="lineNum"> 285 </span> : : </a>
<a name="286"><span class="lineNum"> 286 </span> : : function testSetUsedAlreadyUsed() public {</a>
<a name="287"><span class="lineNum"> 287 </span> : : _buyTicket(alice, &quot;alice&quot;);</a>
<a name="288"><span class="lineNum"> 288 </span> : : assertEq(nft.isExpiredOrUsed(1), false);</a>
<a name="289"><span class="lineNum"> 289 </span> : : vm.prank(address(this));</a>
<a name="290"><span class="lineNum"> 290 </span> : : nft.setUsed(1);</a>
<a name="291"><span class="lineNum"> 291 </span> : : assertEq(nft.isExpiredOrUsed(1), true);</a>
<a name="292"><span class="lineNum"> 292 </span> : : vm.prank(address(this));</a>
<a name="293"><span class="lineNum"> 293 </span> : : vm.expectRevert(&quot;setUsed: ticket already used&quot;);</a>
<a name="294"><span class="lineNum"> 294 </span> : : nft.setUsed(1);</a>
<a name="295"><span class="lineNum"> 295 </span> : : }</a>
<a name="296"><span class="lineNum"> 296 </span> : : </a>
<a name="297"><span class="lineNum"> 297 </span> : : function testSetUsedExpired() public {</a>
<a name="298"><span class="lineNum"> 298 </span> : : _buyTicket(alice, &quot;alice&quot;);</a>
<a name="299"><span class="lineNum"> 299 </span> : : assertEq(nft.isExpiredOrUsed(1), false);</a>
<a name="300"><span class="lineNum"> 300 </span> : : vm.warp(block.timestamp + 10 days + 1);</a>
<a name="301"><span class="lineNum"> 301 </span> : : vm.prank(address(this));</a>
<a name="302"><span class="lineNum"> 302 </span> : : vm.expectRevert(&quot;setUsed: ticket expired&quot;);</a>
<a name="303"><span class="lineNum"> 303 </span> : : nft.setUsed(1);</a>
<a name="304"><span class="lineNum"> 304 </span> : : }</a>
<a name="305"><span class="lineNum"> 305 </span> : : </a>
<a name="306"><span class="lineNum"> 306 </span> : : function testSetUsedUnauthorized() public {</a>
<a name="307"><span class="lineNum"> 307 </span> : : _buyTicket(alice, &quot;alice&quot;);</a>
<a name="308"><span class="lineNum"> 308 </span> : : assertEq(nft.isExpiredOrUsed(1), false);</a>
<a name="309"><span class="lineNum"> 309 </span> : : vm.warp(block.timestamp + 10 days);</a>
<a name="310"><span class="lineNum"> 310 </span> : : vm.prank(bob);</a>
<a name="311"><span class="lineNum"> 311 </span> : : vm.expectRevert(&quot;setUsed: only admin can setUsed&quot;);</a>
<a name="312"><span class="lineNum"> 312 </span> : : nft.setUsed(1);</a>
<a name="313"><span class="lineNum"> 313 </span> : : }</a>
<a name="314"><span class="lineNum"> 314 </span> : : }</a>
<a name="315"><span class="lineNum"> 315 </span> : : </a>
<a name="316"><span class="lineNum"> 316 </span> : : contract PrimaryMarketTest is BaseTicketNFTTest {</a>
<a name="317"><span class="lineNum"> 317 </span> : : function testAdmin() public {</a>
<a name="318"><span class="lineNum"> 318 </span> : : assertEq(address(this), nft.admin());</a>
<a name="319"><span class="lineNum"> 319 </span> : : }</a>
<a name="320"><span class="lineNum"> 320 </span> : : </a>
<a name="321"><span class="lineNum"> 321 </span> : : function testPrimaryPurchase() public {</a>
<a name="322"><span class="lineNum"> 322 </span> : : _topUpTokens(alice, 1);</a>
<a name="323"><span class="lineNum"> 323 </span> : : vm.prank(alice);</a>
<a name="324"><span class="lineNum"> 324 </span> : : token.approve(address(nft), ticketPrice);</a>
<a name="325"><span class="lineNum"> 325 </span> : : vm.prank(alice);</a>
<a name="326"><span class="lineNum"> 326 </span> : : vm.expectEmit(true, true, true, false);</a>
<a name="327"><span class="lineNum"> 327 </span> : : emit Transfer(address(0), alice, 1);</a>
<a name="328"><span class="lineNum"> 328 </span> : : vm.expectEmit(true, true, false, false);</a>
<a name="329"><span class="lineNum"> 329 </span> : : emit Purchase(alice, &quot;alice&quot;);</a>
<a name="330"><span class="lineNum"> 330 </span> : : nft.purchase(&quot;alice&quot;);</a>
<a name="331"><span class="lineNum"> 331 </span> : : assertEq(nft.balanceOf(alice), 1);</a>
<a name="332"><span class="lineNum"> 332 </span> : : assertEq(nft.holderOf(1), alice);</a>
<a name="333"><span class="lineNum"> 333 </span> : : assertEq(nft.getApproved(1), address(0));</a>
<a name="334"><span class="lineNum"> 334 </span> : : assertEq(nft.holderNameOf(1), &quot;alice&quot;);</a>
<a name="335"><span class="lineNum"> 335 </span> : : assertEq(nft.isExpiredOrUsed(1), false);</a>
<a name="336"><span class="lineNum"> 336 </span> : : }</a>
<a name="337"><span class="lineNum"> 337 </span> : : </a>
<a name="338"><span class="lineNum"> 338 </span> : : function testPrimaryPurchaseInsufficientBalance() public {</a>
<a name="339"><span class="lineNum"> 339 </span> : : vm.deal(alice, ticketPriceEth);</a>
<a name="340"><span class="lineNum"> 340 </span> : : vm.prank(alice);</a>
<a name="341"><span class="lineNum"> 341 </span> : : token.mint{value: ticketPriceEth - 1}();</a>
<a name="342"><span class="lineNum"> 342 </span> : : vm.prank(alice);</a>
<a name="343"><span class="lineNum"> 343 </span> : : token.approve(address(nft), ticketPrice);</a>
<a name="344"><span class="lineNum"> 344 </span> : : vm.prank(alice);</a>
<a name="345"><span class="lineNum"> 345 </span> : : vm.expectRevert(&quot;ERC20: transfer amount exceeds balance&quot;);</a>
<a name="346"><span class="lineNum"> 346 </span> : : nft.purchase(&quot;alice&quot;);</a>
<a name="347"><span class="lineNum"> 347 </span> : : assertEq(nft.balanceOf(alice), 0);</a>
<a name="348"><span class="lineNum"> 348 </span> : : }</a>
<a name="349"><span class="lineNum"> 349 </span> : : </a>
<a name="350"><span class="lineNum"> 350 </span> : : function testPrimaryPurchaseInsufficientAllowance() public {</a>
<a name="351"><span class="lineNum"> 351 </span> : : vm.deal(alice, ticketPriceEth);</a>
<a name="352"><span class="lineNum"> 352 </span> : : vm.prank(alice);</a>
<a name="353"><span class="lineNum"> 353 </span> : : token.mint{value: ticketPriceEth}();</a>
<a name="354"><span class="lineNum"> 354 </span> : : vm.prank(alice);</a>
<a name="355"><span class="lineNum"> 355 </span> : : token.approve(address(nft), ticketPrice - 1);</a>
<a name="356"><span class="lineNum"> 356 </span> : : vm.prank(alice);</a>
<a name="357"><span class="lineNum"> 357 </span> : : vm.expectRevert(&quot;purchase: insufficient token allowance&quot;);</a>
<a name="358"><span class="lineNum"> 358 </span> : : nft.purchase(&quot;alice&quot;);</a>
<a name="359"><span class="lineNum"> 359 </span> : : assertEq(nft.balanceOf(alice), 0);</a>
<a name="360"><span class="lineNum"> 360 </span> : : }</a>
<a name="361"><span class="lineNum"> 361 </span> : : </a>
<a name="362"><span class="lineNum"> 362 </span> : : function testPrimaryPurchases() public {</a>
<a name="363"><span class="lineNum"> 363 </span> : : _topUpTokens(alice, 2);</a>
<a name="364"><span class="lineNum"> 364 </span> : : vm.prank(alice);</a>
<a name="365"><span class="lineNum"> 365 </span> : : token.approve(address(nft), ticketPrice * 2);</a>
<a name="366"><span class="lineNum"> 366 </span> : : vm.prank(alice);</a>
<a name="367"><span class="lineNum"> 367 </span> : : nft.purchase(&quot;alice&quot;);</a>
<a name="368"><span class="lineNum"> 368 </span> : : vm.prank(alice);</a>
<a name="369"><span class="lineNum"> 369 </span> : : vm.expectEmit(true, true, true, false);</a>
<a name="370"><span class="lineNum"> 370 </span> : : emit Transfer(address(0), alice, 2);</a>
<a name="371"><span class="lineNum"> 371 </span> : : vm.expectEmit(true, true, false, false);</a>
<a name="372"><span class="lineNum"> 372 </span> : : emit Purchase(alice, &quot;alice's plus one&quot;);</a>
<a name="373"><span class="lineNum"> 373 </span> : : nft.purchase(&quot;alice's plus one&quot;);</a>
<a name="374"><span class="lineNum"> 374 </span> : : assertEq(nft.balanceOf(alice), 2);</a>
<a name="375"><span class="lineNum"> 375 </span> : : assertEq(nft.holderOf(2), alice);</a>
<a name="376"><span class="lineNum"> 376 </span> : : assertEq(nft.getApproved(2), address(0));</a>
<a name="377"><span class="lineNum"> 377 </span> : : assertEq(nft.holderNameOf(2), &quot;alice's plus one&quot;);</a>
<a name="378"><span class="lineNum"> 378 </span> : : assertEq(nft.isExpiredOrUsed(2), false);</a>
<a name="379"><span class="lineNum"> 379 </span> : : }</a>
<a name="380"><span class="lineNum"> 380 </span> : : </a>
<a name="381"><span class="lineNum"> 381 </span> : : function testPurchaseLimit() public {</a>
<a name="382"><span class="lineNum"> 382 </span> : : // Set contract totalSupply to 999 using foundry cheats rather than minting repeatedly</a>
<a name="383"><span class="lineNum"> 383 </span> : : vm.store(address(nft), bytes32(uint256(1)), bytes32(uint256(999)));</a>
<a name="384"><span class="lineNum"> 384 </span> : : // for (uint256 i = 0; i &lt; 999; i++) {</a>
<a name="385"><span class="lineNum"> 385 </span> : : // _buyTicket(alice, &quot;alice&quot;);</a>
<a name="386"><span class="lineNum"> 386 </span> : : // }</a>
<a name="387"><span class="lineNum"> 387 </span> : : _buyTicket(alice, &quot;alice&quot;); // Buy 1000th ticket</a>
<a name="388"><span class="lineNum"> 388 </span> : : _topUpTokens(alice, 1);</a>
<a name="389"><span class="lineNum"> 389 </span> : : vm.prank(alice);</a>
<a name="390"><span class="lineNum"> 390 </span> : : token.approve(address(nft), ticketPrice);</a>
<a name="391"><span class="lineNum"> 391 </span> : : vm.prank(alice);</a>
<a name="392"><span class="lineNum"> 392 </span> : : vm.expectRevert(&quot;purchase: maximum tickets reached&quot;);</a>
<a name="393"><span class="lineNum"> 393 </span> : : nft.purchase(&quot;alice&quot;);</a>
<a name="394"><span class="lineNum"> 394 </span> : : }</a>
<a name="395"><span class="lineNum"> 395 </span> : : }</a>
<a name="396"><span class="lineNum"> 396 </span> : : </a>
<a name="397"><span class="lineNum"> 397 </span> : : contract SecondaryMarketTest is BaseTicketNFTTest {</a>
<a name="398"><span class="lineNum"> 398 </span> : : function testList() public {</a>
<a name="399"><span class="lineNum"> 399 </span> : : _buyTicket(alice, &quot;alice&quot;);</a>
<a name="400"><span class="lineNum"> 400 </span> : : vm.prank(alice);</a>
<a name="401"><span class="lineNum"> 401 </span> : : vm.expectEmit(true, true, true, false);</a>
<a name="402"><span class="lineNum"> 402 </span> : : emit Transfer(alice, address(nft), 1);</a>
<a name="403"><span class="lineNum"> 403 </span> : : vm.expectEmit(true, true, true, false);</a>
<a name="404"><span class="lineNum"> 404 </span> : : emit Approval(address(nft), address(0), 1);</a>
<a name="405"><span class="lineNum"> 405 </span> : : vm.expectEmit(true, true, false, false);</a>
<a name="406"><span class="lineNum"> 406 </span> : : emit Listing(1, alice, 200e18);</a>
<a name="407"><span class="lineNum"> 407 </span> : : nft.listTicket(1, 200e18); // Got a flipper here :)</a>
<a name="408"><span class="lineNum"> 408 </span> : : assertEq(nft.balanceOf(alice), 0);</a>
<a name="409"><span class="lineNum"> 409 </span> : : assertEq(nft.balanceOf(address(nft)), 1);</a>
<a name="410"><span class="lineNum"> 410 </span> : : assertEq(nft.holderOf(1), address(nft));</a>
<a name="411"><span class="lineNum"> 411 </span> : : assertEq(nft.getApproved(1), address(0));</a>
<a name="412"><span class="lineNum"> 412 </span> : : assertEq(nft.holderNameOf(1), &quot;alice&quot;);</a>
<a name="413"><span class="lineNum"> 413 </span> : : assertEq(nft.isExpiredOrUsed(1), false);</a>
<a name="414"><span class="lineNum"> 414 </span> : : }</a>
<a name="415"><span class="lineNum"> 415 </span> : : </a>
<a name="416"><span class="lineNum"> 416 </span> : : function testListFree() public {</a>
<a name="417"><span class="lineNum"> 417 </span> : : _buyTicket(alice, &quot;alice&quot;);</a>
<a name="418"><span class="lineNum"> 418 </span> : : vm.prank(alice);</a>
<a name="419"><span class="lineNum"> 419 </span> : : vm.expectRevert(&quot;listTicket: price cannot be 0&quot;);</a>
<a name="420"><span class="lineNum"> 420 </span> : : nft.listTicket(1, 0); // What's the opposite of a flipper?</a>
<a name="421"><span class="lineNum"> 421 </span> : : assertEq(nft.balanceOf(alice), 1);</a>
<a name="422"><span class="lineNum"> 422 </span> : : assertEq(nft.holderOf(1), alice);</a>
<a name="423"><span class="lineNum"> 423 </span> : : }</a>
<a name="424"><span class="lineNum"> 424 </span> : : </a>
<a name="425"><span class="lineNum"> 425 </span> : : function testListUsed() public {</a>
<a name="426"><span class="lineNum"> 426 </span> : : _buyTicket(alice, &quot;alice&quot;);</a>
<a name="427"><span class="lineNum"> 427 </span> : : vm.prank(address(this));</a>
<a name="428"><span class="lineNum"> 428 </span> : : nft.setUsed(1);</a>
<a name="429"><span class="lineNum"> 429 </span> : : vm.prank(alice);</a>
<a name="430"><span class="lineNum"> 430 </span> : : vm.expectRevert(&quot;listTicket: ticket is expired/used&quot;);</a>
<a name="431"><span class="lineNum"> 431 </span> : : nft.listTicket(1, 200e19);</a>
<a name="432"><span class="lineNum"> 432 </span> : : assertEq(nft.balanceOf(alice), 1);</a>
<a name="433"><span class="lineNum"> 433 </span> : : assertEq(nft.holderOf(1), alice);</a>
<a name="434"><span class="lineNum"> 434 </span> : : assertEq(nft.isExpiredOrUsed(1), true);</a>
<a name="435"><span class="lineNum"> 435 </span> : : }</a>
<a name="436"><span class="lineNum"> 436 </span> : : </a>
<a name="437"><span class="lineNum"> 437 </span> : : function testListExpired() public {</a>
<a name="438"><span class="lineNum"> 438 </span> : : _buyTicket(alice, &quot;alice&quot;);</a>
<a name="439"><span class="lineNum"> 439 </span> : : vm.warp(block.timestamp + 10 days + 1);</a>
<a name="440"><span class="lineNum"> 440 </span> : : vm.prank(alice);</a>
<a name="441"><span class="lineNum"> 441 </span> : : vm.expectRevert(&quot;listTicket: ticket is expired/used&quot;);</a>
<a name="442"><span class="lineNum"> 442 </span> : : nft.listTicket(1, 200e19);</a>
<a name="443"><span class="lineNum"> 443 </span> : : assertEq(nft.balanceOf(alice), 1);</a>
<a name="444"><span class="lineNum"> 444 </span> : : assertEq(nft.holderOf(1), alice);</a>
<a name="445"><span class="lineNum"> 445 </span> : : assertEq(nft.isExpiredOrUsed(1), true);</a>
<a name="446"><span class="lineNum"> 446 </span> : : }</a>
<a name="447"><span class="lineNum"> 447 </span> : : </a>
<a name="448"><span class="lineNum"> 448 </span> : : function testListUnauthorized() public {</a>
<a name="449"><span class="lineNum"> 449 </span> : : _buyTicket(alice, &quot;alice&quot;);</a>
<a name="450"><span class="lineNum"> 450 </span> : : vm.prank(bob);</a>
<a name="451"><span class="lineNum"> 451 </span> : : vm.expectRevert(&quot;listTicket: msg.sender doesn't own ticket&quot;);</a>
<a name="452"><span class="lineNum"> 452 </span> : : nft.listTicket(1, 200e19);</a>
<a name="453"><span class="lineNum"> 453 </span> : : assertEq(nft.balanceOf(alice), 1);</a>
<a name="454"><span class="lineNum"> 454 </span> : : assertEq(nft.holderOf(1), alice);</a>
<a name="455"><span class="lineNum"> 455 </span> : : }</a>
<a name="456"><span class="lineNum"> 456 </span> : : </a>
<a name="457"><span class="lineNum"> 457 </span> : : function testDelist() public {</a>
<a name="458"><span class="lineNum"> 458 </span> : : _buyTicket(alice, &quot;alice&quot;);</a>
<a name="459"><span class="lineNum"> 459 </span> : : vm.prank(alice);</a>
<a name="460"><span class="lineNum"> 460 </span> : : nft.listTicket(1, 200e18);</a>
<a name="461"><span class="lineNum"> 461 </span> : : vm.prank(alice);</a>
<a name="462"><span class="lineNum"> 462 </span> : : vm.expectEmit(true, true, true, false);</a>
<a name="463"><span class="lineNum"> 463 </span> : : emit Transfer(address(nft), alice, 1);</a>
<a name="464"><span class="lineNum"> 464 </span> : : vm.expectEmit(true, true, true, false);</a>
<a name="465"><span class="lineNum"> 465 </span> : : emit Approval(alice, address(0), 1);</a>
<a name="466"><span class="lineNum"> 466 </span> : : vm.expectEmit(true, false, false, false);</a>
<a name="467"><span class="lineNum"> 467 </span> : : emit Delisting(1);</a>
<a name="468"><span class="lineNum"> 468 </span> : : nft.delistTicket(1);</a>
<a name="469"><span class="lineNum"> 469 </span> : : assertEq(nft.balanceOf(alice), 1);</a>
<a name="470"><span class="lineNum"> 470 </span> : : assertEq(nft.balanceOf(address(nft)), 0);</a>
<a name="471"><span class="lineNum"> 471 </span> : : assertEq(nft.holderOf(1), alice);</a>
<a name="472"><span class="lineNum"> 472 </span> : : }</a>
<a name="473"><span class="lineNum"> 473 </span> : : </a>
<a name="474"><span class="lineNum"> 474 </span> : : function testDelistUnauthorized() public {</a>
<a name="475"><span class="lineNum"> 475 </span> : : _buyTicket(alice, &quot;alice&quot;);</a>
<a name="476"><span class="lineNum"> 476 </span> : : vm.prank(alice);</a>
<a name="477"><span class="lineNum"> 477 </span> : : nft.listTicket(1, 200e18);</a>
<a name="478"><span class="lineNum"> 478 </span> : : vm.prank(bob);</a>
<a name="479"><span class="lineNum"> 479 </span> : : vm.expectRevert(&quot;delistTicket: msg.sender didn't list ticket&quot;);</a>
<a name="480"><span class="lineNum"> 480 </span> : : nft.delistTicket(1);</a>
<a name="481"><span class="lineNum"> 481 </span> : : assertEq(nft.balanceOf(alice), 0);</a>
<a name="482"><span class="lineNum"> 482 </span> : : assertEq(nft.balanceOf(bob), 0);</a>
<a name="483"><span class="lineNum"> 483 </span> : : assertEq(nft.balanceOf(address(nft)), 1);</a>
<a name="484"><span class="lineNum"> 484 </span> : : assertEq(nft.holderOf(1), address(nft));</a>
<a name="485"><span class="lineNum"> 485 </span> : : }</a>
<a name="486"><span class="lineNum"> 486 </span> : : </a>
<a name="487"><span class="lineNum"> 487 </span> : : function testPurchase() public {</a>
<a name="488"><span class="lineNum"> 488 </span> : : uint256 ticketResalePrice = 200e18;</a>
<a name="489"><span class="lineNum"> 489 </span> : : uint256 ticketResaleFee = 50 * (ticketResalePrice / 1000);</a>
<a name="490"><span class="lineNum"> 490 </span> : : uint256 ticketResaleRevenue = ticketResalePrice - ticketResaleFee;</a>
<a name="491"><span class="lineNum"> 491 </span> : : _buyTicket(alice, &quot;alice&quot;);</a>
<a name="492"><span class="lineNum"> 492 </span> : : vm.prank(alice);</a>
<a name="493"><span class="lineNum"> 493 </span> : : nft.listTicket(1, ticketResalePrice);</a>
<a name="494"><span class="lineNum"> 494 </span> : : _topUpTokens(bob, ticketResalePrice / 100e18);</a>
<a name="495"><span class="lineNum"> 495 </span> : : vm.prank(bob);</a>
<a name="496"><span class="lineNum"> 496 </span> : : token.approve(address(nft), ticketResalePrice);</a>
<a name="497"><span class="lineNum"> 497 </span> : : vm.prank(bob);</a>
<a name="498"><span class="lineNum"> 498 </span> : : vm.expectEmit(true, true, false, true);</a>
<a name="499"><span class="lineNum"> 499 </span> : : emit Purchase(bob, 1, ticketResalePrice, &quot;bob&quot;);</a>
<a name="500"><span class="lineNum"> 500 </span> : : nft.purchase(1, &quot;bob&quot;);</a>
<a name="501"><span class="lineNum"> 501 </span> : : assertEq(token.balanceOf(alice), ticketResaleRevenue);</a>
<a name="502"><span class="lineNum"> 502 </span> : : assertEq(token.balanceOf(bob), 0);</a>
<a name="503"><span class="lineNum"> 503 </span> : : assertEq(token.balanceOf(address(this)), ticketPrice + ticketResaleFee);</a>
<a name="504"><span class="lineNum"> 504 </span> : : assertEq(nft.balanceOf(alice), 0);</a>
<a name="505"><span class="lineNum"> 505 </span> : : assertEq(nft.balanceOf(bob), 1);</a>
<a name="506"><span class="lineNum"> 506 </span> : : assertEq(nft.balanceOf(address(nft)), 0);</a>
<a name="507"><span class="lineNum"> 507 </span> : : assertEq(nft.holderOf(1), bob);</a>
<a name="508"><span class="lineNum"> 508 </span> : : assertEq(nft.getApproved(1), address(0));</a>
<a name="509"><span class="lineNum"> 509 </span> : : assertEq(nft.holderNameOf(1), &quot;bob&quot;);</a>
<a name="510"><span class="lineNum"> 510 </span> : : assertEq(nft.isExpiredOrUsed(1), false);</a>
<a name="511"><span class="lineNum"> 511 </span> : : }</a>
<a name="512"><span class="lineNum"> 512 </span> : : </a>
<a name="513"><span class="lineNum"> 513 </span> : : function testPurchaseUsed() public {</a>
<a name="514"><span class="lineNum"> 514 </span> : : _buyTicket(alice, &quot;alice&quot;);</a>
<a name="515"><span class="lineNum"> 515 </span> : : vm.prank(alice);</a>
<a name="516"><span class="lineNum"> 516 </span> : : nft.listTicket(1, 200e18);</a>
<a name="517"><span class="lineNum"> 517 </span> : : _topUpTokens(bob, 2);</a>
<a name="518"><span class="lineNum"> 518 </span> : : vm.prank(address(this));</a>
<a name="519"><span class="lineNum"> 519 </span> : : nft.setUsed(1);</a>
<a name="520"><span class="lineNum"> 520 </span> : : vm.prank(bob);</a>
<a name="521"><span class="lineNum"> 521 </span> : : token.approve(address(nft), 200e18);</a>
<a name="522"><span class="lineNum"> 522 </span> : : vm.prank(bob);</a>
<a name="523"><span class="lineNum"> 523 </span> : : vm.expectRevert(&quot;purchase: ticket is expired/used&quot;);</a>
<a name="524"><span class="lineNum"> 524 </span> : : nft.purchase(1, &quot;bob&quot;);</a>
<a name="525"><span class="lineNum"> 525 </span> : : assertEq(nft.balanceOf(alice), 0);</a>
<a name="526"><span class="lineNum"> 526 </span> : : assertEq(nft.balanceOf(bob), 0);</a>
<a name="527"><span class="lineNum"> 527 </span> : : assertEq(nft.balanceOf(address(nft)), 1);</a>
<a name="528"><span class="lineNum"> 528 </span> : : }</a>
<a name="529"><span class="lineNum"> 529 </span> : : </a>
<a name="530"><span class="lineNum"> 530 </span> : : function testPurchaseExpired() public {</a>
<a name="531"><span class="lineNum"> 531 </span> : : _buyTicket(alice, &quot;alice&quot;);</a>
<a name="532"><span class="lineNum"> 532 </span> : : vm.prank(alice);</a>
<a name="533"><span class="lineNum"> 533 </span> : : nft.listTicket(1, 200e18);</a>
<a name="534"><span class="lineNum"> 534 </span> : : _topUpTokens(bob, 2);</a>
<a name="535"><span class="lineNum"> 535 </span> : : vm.warp(block.timestamp + 10 days + 1);</a>
<a name="536"><span class="lineNum"> 536 </span> : : vm.prank(bob);</a>
<a name="537"><span class="lineNum"> 537 </span> : : token.approve(address(nft), 200e18);</a>
<a name="538"><span class="lineNum"> 538 </span> : : vm.prank(bob);</a>
<a name="539"><span class="lineNum"> 539 </span> : : vm.expectRevert(&quot;purchase: ticket is expired/used&quot;);</a>
<a name="540"><span class="lineNum"> 540 </span> : : nft.purchase(1, &quot;bob&quot;);</a>
<a name="541"><span class="lineNum"> 541 </span> : : assertEq(nft.balanceOf(alice), 0);</a>
<a name="542"><span class="lineNum"> 542 </span> : : assertEq(nft.balanceOf(bob), 0);</a>
<a name="543"><span class="lineNum"> 543 </span> : : assertEq(nft.balanceOf(address(nft)), 1);</a>
<a name="544"><span class="lineNum"> 544 </span> : : }</a>
<a name="545"><span class="lineNum"> 545 </span> : : </a>
<a name="546"><span class="lineNum"> 546 </span> : : function testPurchaseInsufficientBalance() public {</a>
<a name="547"><span class="lineNum"> 547 </span> : : _buyTicket(alice, &quot;alice&quot;);</a>
<a name="548"><span class="lineNum"> 548 </span> : : vm.prank(alice);</a>
<a name="549"><span class="lineNum"> 549 </span> : : nft.listTicket(1, 200e18);</a>
<a name="550"><span class="lineNum"> 550 </span> : : _topUpTokens(bob, 1);</a>
<a name="551"><span class="lineNum"> 551 </span> : : vm.prank(bob);</a>
<a name="552"><span class="lineNum"> 552 </span> : : token.approve(address(nft), 200e18);</a>
<a name="553"><span class="lineNum"> 553 </span> : : vm.prank(bob);</a>
<a name="554"><span class="lineNum"> 554 </span> : : vm.expectRevert(&quot;ERC20: transfer amount exceeds balance&quot;);</a>
<a name="555"><span class="lineNum"> 555 </span> : : nft.purchase(1, &quot;bob&quot;);</a>
<a name="556"><span class="lineNum"> 556 </span> : : assertEq(nft.balanceOf(alice), 0);</a>
<a name="557"><span class="lineNum"> 557 </span> : : assertEq(nft.balanceOf(bob), 0);</a>
<a name="558"><span class="lineNum"> 558 </span> : : assertEq(nft.balanceOf(address(nft)), 1);</a>
<a name="559"><span class="lineNum"> 559 </span> : : }</a>
<a name="560"><span class="lineNum"> 560 </span> : : </a>
<a name="561"><span class="lineNum"> 561 </span> : : function testPurchaseInsufficientAllowance() public {</a>
<a name="562"><span class="lineNum"> 562 </span> : : _buyTicket(alice, &quot;alice&quot;);</a>
<a name="563"><span class="lineNum"> 563 </span> : : vm.prank(alice);</a>
<a name="564"><span class="lineNum"> 564 </span> : : nft.listTicket(1, 200e18);</a>
<a name="565"><span class="lineNum"> 565 </span> : : _topUpTokens(bob, 2);</a>
<a name="566"><span class="lineNum"> 566 </span> : : vm.prank(bob);</a>
<a name="567"><span class="lineNum"> 567 </span> : : token.approve(address(nft), 100e18);</a>
<a name="568"><span class="lineNum"> 568 </span> : : vm.prank(bob);</a>
<a name="569"><span class="lineNum"> 569 </span> : : vm.expectRevert(&quot;purchase: insufficient token allowance&quot;);</a>
<a name="570"><span class="lineNum"> 570 </span> : : nft.purchase(1, &quot;bob&quot;);</a>
<a name="571"><span class="lineNum"> 571 </span> : : assertEq(nft.balanceOf(alice), 0);</a>
<a name="572"><span class="lineNum"> 572 </span> : : assertEq(nft.balanceOf(bob), 0);</a>
<a name="573"><span class="lineNum"> 573 </span> : : assertEq(nft.balanceOf(address(nft)), 1);</a>
<a name="574"><span class="lineNum"> 574 </span> : : }</a>
<a name="575"><span class="lineNum"> 575 </span> : : </a>
<a name="576"><span class="lineNum"> 576 </span> : : function testPurchaseUnlisted() public {</a>
<a name="577"><span class="lineNum"> 577 </span> : : _buyTicket(alice, &quot;alice&quot;);</a>
<a name="578"><span class="lineNum"> 578 </span> : : vm.prank(alice);</a>
<a name="579"><span class="lineNum"> 579 </span> : : nft.listTicket(1, 200e18);</a>
<a name="580"><span class="lineNum"> 580 </span> : : vm.prank(alice);</a>
<a name="581"><span class="lineNum"> 581 </span> : : nft.delistTicket(1);</a>
<a name="582"><span class="lineNum"> 582 </span> : : _topUpTokens(bob, 2);</a>
<a name="583"><span class="lineNum"> 583 </span> : : vm.prank(bob);</a>
<a name="584"><span class="lineNum"> 584 </span> : : token.approve(address(nft), 200e18);</a>
<a name="585"><span class="lineNum"> 585 </span> : : vm.prank(bob);</a>
<a name="586"><span class="lineNum"> 586 </span> : : vm.expectRevert(</a>
<a name="587"><span class="lineNum"> 587 </span> : : &quot;purchase: ticket is not listed, missing lister address or price&quot;</a>
<a name="588"><span class="lineNum"> 588 </span> : : );</a>
<a name="589"><span class="lineNum"> 589 </span> : : nft.purchase(1, &quot;bob&quot;);</a>
<a name="590"><span class="lineNum"> 590 </span> : : assertEq(nft.balanceOf(alice), 1);</a>
<a name="591"><span class="lineNum"> 591 </span> : : assertEq(nft.balanceOf(bob), 0);</a>
<a name="592"><span class="lineNum"> 592 </span> : : assertEq(nft.balanceOf(address(nft)), 0);</a>
<a name="593"><span class="lineNum"> 593 </span> : : }</a>
<a name="594"><span class="lineNum"> 594 </span> : : }</a>
</pre>
</td>
</tr>
</table>
<br>
<table width="100%" border=0 cellspacing=0 cellpadding=0>
<tr><td class="ruler"><img src="../glass.png" width=3 height=3 alt=""></td></tr>
<tr><td class="versionInfo">Generated by: <a href="http://ltp.sourceforge.net/coverage/lcov.php" target="_parent">LCOV version 1.14</a></td></tr>
</table>
<br>
</body>
</html>

View file

@ -0,0 +1,111 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>LCOV - TicketNFT Coverage - test</title>
<link rel="stylesheet" type="text/css" href="../gcov.css">
</head>
<body>
<table width="100%" border=0 cellspacing=0 cellpadding=0>
<tr><td class="title">LCOV - code coverage report</td></tr>
<tr><td class="ruler"><img src="../glass.png" width=3 height=3 alt=""></td></tr>
<tr>
<td width="100%">
<table cellpadding=1 border=0 width="100%">
<tr>
<td width="10%" class="headerItem">Current view:</td>
<td width="35%" class="headerValue"><a href="../index.html">top level</a> - test</td>
<td width="5%"></td>
<td width="15%"></td>
<td width="10%" class="headerCovTableHead">Hit</td>
<td width="10%" class="headerCovTableHead">Total</td>
<td width="15%" class="headerCovTableHead">Coverage</td>
</tr>
<tr>
<td class="headerItem">Test:</td>
<td class="headerValue">TicketNFT Coverage</td>
<td></td>
<td class="headerItem">Lines:</td>
<td class="headerCovTableEntry">0</td>
<td class="headerCovTableEntry">10</td>
<td class="headerCovTableEntryLo">0.0 %</td>
</tr>
<tr>
<td class="headerItem">Date:</td>
<td class="headerValue">2023-02-21 16:00:17</td>
<td></td>
<td class="headerItem">Functions:</td>
<td class="headerCovTableEntry">0</td>
<td class="headerCovTableEntry">3</td>
<td class="headerCovTableEntryLo">0.0 %</td>
</tr>
<tr>
<td class="headerItem">Legend:</td>
<td class="headerValueLeg"> Rating:
<span class="coverLegendCovLo" title="Coverage rates below 75 % are classified as low">low: &lt; 75 %</span>
<span class="coverLegendCovMed" title="Coverage rates between 75 % and 90 % are classified as medium">medium: &gt;= 75 %</span>
<span class="coverLegendCovHi" title="Coverage rates of 90 % and more are classified as high">high: &gt;= 90 %</span>
</td>
<td></td>
<td class="headerItem">Branches:</td>
<td class="headerCovTableEntry">0</td>
<td class="headerCovTableEntry">0</td>
<td class="headerCovTableEntryHi">-</td>
</tr>
<tr><td><img src="../glass.png" width=3 height=3 alt=""></td></tr>
</table>
</td>
</tr>
<tr><td class="ruler"><img src="../glass.png" width=3 height=3 alt=""></td></tr>
</table>
<center>
<table width="80%" cellpadding=1 cellspacing=1 border=0>
<tr>
<td width="44%"><br></td>
<td width="8%"></td>
<td width="8%"></td>
<td width="8%"></td>
<td width="8%"></td>
<td width="8%"></td>
<td width="8%"></td>
<td width="8%"></td>
</tr>
<tr>
<td class="tableHead">Filename <span class="tableHeadSort"><a href="index.html"><img src="../updown.png" width=10 height=14 alt="Sort by name" title="Sort by name" border=0></a></span></td>
<td class="tableHead" colspan=3>Line Coverage <span class="tableHeadSort"><a href="index-sort-l.html"><img src="../updown.png" width=10 height=14 alt="Sort by line coverage" title="Sort by line coverage" border=0></a></span></td>
<td class="tableHead" colspan=2>Functions <span class="tableHeadSort"><a href="index-sort-f.html"><img src="../updown.png" width=10 height=14 alt="Sort by function coverage" title="Sort by function coverage" border=0></a></span></td>
<td class="tableHead" colspan=2>Branches <span class="tableHeadSort"><img src="../glass.png" width=10 height=14 alt="Sort by branch coverage" title="Sort by branch coverage" border=0></span></td>
</tr>
<tr>
<td class="coverFile"><a href="TicketNFT.t.sol.gcov.html">TicketNFT.t.sol</a></td>
<td class="coverBar" align="center">
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="../snow.png" width=100 height=10 alt="0.0%"></td></tr></table>
</td>
<td class="coverPerLo">0.0&nbsp;%</td>
<td class="coverNumLo">0 / 10</td>
<td class="coverPerLo">0.0&nbsp;%</td>
<td class="coverNumLo">0 / 3</td>
<td class="coverPerHi">-</td>
<td class="coverNumHi">0 / 0</td>
</tr>
</table>
</center>
<br>
<table width="100%" border=0 cellspacing=0 cellpadding=0>
<tr><td class="ruler"><img src="../glass.png" width=3 height=3 alt=""></td></tr>
<tr><td class="versionInfo">Generated by: <a href="http://ltp.sourceforge.net/coverage/lcov.php">LCOV version 1.14</a></td></tr>
</table>
<br>
</body>
</html>

View file

@ -0,0 +1,111 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>LCOV - TicketNFT Coverage - test</title>
<link rel="stylesheet" type="text/css" href="../gcov.css">
</head>
<body>
<table width="100%" border=0 cellspacing=0 cellpadding=0>
<tr><td class="title">LCOV - code coverage report</td></tr>
<tr><td class="ruler"><img src="../glass.png" width=3 height=3 alt=""></td></tr>
<tr>
<td width="100%">
<table cellpadding=1 border=0 width="100%">
<tr>
<td width="10%" class="headerItem">Current view:</td>
<td width="35%" class="headerValue"><a href="../index.html">top level</a> - test</td>
<td width="5%"></td>
<td width="15%"></td>
<td width="10%" class="headerCovTableHead">Hit</td>
<td width="10%" class="headerCovTableHead">Total</td>
<td width="15%" class="headerCovTableHead">Coverage</td>
</tr>
<tr>
<td class="headerItem">Test:</td>
<td class="headerValue">TicketNFT Coverage</td>
<td></td>
<td class="headerItem">Lines:</td>
<td class="headerCovTableEntry">0</td>
<td class="headerCovTableEntry">10</td>
<td class="headerCovTableEntryLo">0.0 %</td>
</tr>
<tr>
<td class="headerItem">Date:</td>
<td class="headerValue">2023-02-21 16:00:17</td>
<td></td>
<td class="headerItem">Functions:</td>
<td class="headerCovTableEntry">0</td>
<td class="headerCovTableEntry">3</td>
<td class="headerCovTableEntryLo">0.0 %</td>
</tr>
<tr>
<td class="headerItem">Legend:</td>
<td class="headerValueLeg"> Rating:
<span class="coverLegendCovLo" title="Coverage rates below 75 % are classified as low">low: &lt; 75 %</span>
<span class="coverLegendCovMed" title="Coverage rates between 75 % and 90 % are classified as medium">medium: &gt;= 75 %</span>
<span class="coverLegendCovHi" title="Coverage rates of 90 % and more are classified as high">high: &gt;= 90 %</span>
</td>
<td></td>
<td class="headerItem">Branches:</td>
<td class="headerCovTableEntry">0</td>
<td class="headerCovTableEntry">0</td>
<td class="headerCovTableEntryHi">-</td>
</tr>
<tr><td><img src="../glass.png" width=3 height=3 alt=""></td></tr>
</table>
</td>
</tr>
<tr><td class="ruler"><img src="../glass.png" width=3 height=3 alt=""></td></tr>
</table>
<center>
<table width="80%" cellpadding=1 cellspacing=1 border=0>
<tr>
<td width="44%"><br></td>
<td width="8%"></td>
<td width="8%"></td>
<td width="8%"></td>
<td width="8%"></td>
<td width="8%"></td>
<td width="8%"></td>
<td width="8%"></td>
</tr>
<tr>
<td class="tableHead">Filename <span class="tableHeadSort"><a href="index.html"><img src="../updown.png" width=10 height=14 alt="Sort by name" title="Sort by name" border=0></a></span></td>
<td class="tableHead" colspan=3>Line Coverage <span class="tableHeadSort"><a href="index-sort-l.html"><img src="../updown.png" width=10 height=14 alt="Sort by line coverage" title="Sort by line coverage" border=0></a></span></td>
<td class="tableHead" colspan=2>Functions <span class="tableHeadSort"><img src="../glass.png" width=10 height=14 alt="Sort by function coverage" title="Sort by function coverage" border=0></span></td>
<td class="tableHead" colspan=2>Branches <span class="tableHeadSort"><a href="index-sort-b.html"><img src="../updown.png" width=10 height=14 alt="Sort by branch coverage" title="Sort by branch coverage" border=0></a></span></td>
</tr>
<tr>
<td class="coverFile"><a href="TicketNFT.t.sol.gcov.html">TicketNFT.t.sol</a></td>
<td class="coverBar" align="center">
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="../snow.png" width=100 height=10 alt="0.0%"></td></tr></table>
</td>
<td class="coverPerLo">0.0&nbsp;%</td>
<td class="coverNumLo">0 / 10</td>
<td class="coverPerLo">0.0&nbsp;%</td>
<td class="coverNumLo">0 / 3</td>
<td class="coverPerHi">-</td>
<td class="coverNumHi">0 / 0</td>
</tr>
</table>
</center>
<br>
<table width="100%" border=0 cellspacing=0 cellpadding=0>
<tr><td class="ruler"><img src="../glass.png" width=3 height=3 alt=""></td></tr>
<tr><td class="versionInfo">Generated by: <a href="http://ltp.sourceforge.net/coverage/lcov.php">LCOV version 1.14</a></td></tr>
</table>
<br>
</body>
</html>

View file

@ -0,0 +1,111 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>LCOV - TicketNFT Coverage - test</title>
<link rel="stylesheet" type="text/css" href="../gcov.css">
</head>
<body>
<table width="100%" border=0 cellspacing=0 cellpadding=0>
<tr><td class="title">LCOV - code coverage report</td></tr>
<tr><td class="ruler"><img src="../glass.png" width=3 height=3 alt=""></td></tr>
<tr>
<td width="100%">
<table cellpadding=1 border=0 width="100%">
<tr>
<td width="10%" class="headerItem">Current view:</td>
<td width="35%" class="headerValue"><a href="../index.html">top level</a> - test</td>
<td width="5%"></td>
<td width="15%"></td>
<td width="10%" class="headerCovTableHead">Hit</td>
<td width="10%" class="headerCovTableHead">Total</td>
<td width="15%" class="headerCovTableHead">Coverage</td>
</tr>
<tr>
<td class="headerItem">Test:</td>
<td class="headerValue">TicketNFT Coverage</td>
<td></td>
<td class="headerItem">Lines:</td>
<td class="headerCovTableEntry">0</td>
<td class="headerCovTableEntry">10</td>
<td class="headerCovTableEntryLo">0.0 %</td>
</tr>
<tr>
<td class="headerItem">Date:</td>
<td class="headerValue">2023-02-21 16:00:17</td>
<td></td>
<td class="headerItem">Functions:</td>
<td class="headerCovTableEntry">0</td>
<td class="headerCovTableEntry">3</td>
<td class="headerCovTableEntryLo">0.0 %</td>
</tr>
<tr>
<td class="headerItem">Legend:</td>
<td class="headerValueLeg"> Rating:
<span class="coverLegendCovLo" title="Coverage rates below 75 % are classified as low">low: &lt; 75 %</span>
<span class="coverLegendCovMed" title="Coverage rates between 75 % and 90 % are classified as medium">medium: &gt;= 75 %</span>
<span class="coverLegendCovHi" title="Coverage rates of 90 % and more are classified as high">high: &gt;= 90 %</span>
</td>
<td></td>
<td class="headerItem">Branches:</td>
<td class="headerCovTableEntry">0</td>
<td class="headerCovTableEntry">0</td>
<td class="headerCovTableEntryHi">-</td>
</tr>
<tr><td><img src="../glass.png" width=3 height=3 alt=""></td></tr>
</table>
</td>
</tr>
<tr><td class="ruler"><img src="../glass.png" width=3 height=3 alt=""></td></tr>
</table>
<center>
<table width="80%" cellpadding=1 cellspacing=1 border=0>
<tr>
<td width="44%"><br></td>
<td width="8%"></td>
<td width="8%"></td>
<td width="8%"></td>
<td width="8%"></td>
<td width="8%"></td>
<td width="8%"></td>
<td width="8%"></td>
</tr>
<tr>
<td class="tableHead">Filename <span class="tableHeadSort"><a href="index.html"><img src="../updown.png" width=10 height=14 alt="Sort by name" title="Sort by name" border=0></a></span></td>
<td class="tableHead" colspan=3>Line Coverage <span class="tableHeadSort"><img src="../glass.png" width=10 height=14 alt="Sort by line coverage" title="Sort by line coverage" border=0></span></td>
<td class="tableHead" colspan=2>Functions <span class="tableHeadSort"><a href="index-sort-f.html"><img src="../updown.png" width=10 height=14 alt="Sort by function coverage" title="Sort by function coverage" border=0></a></span></td>
<td class="tableHead" colspan=2>Branches <span class="tableHeadSort"><a href="index-sort-b.html"><img src="../updown.png" width=10 height=14 alt="Sort by branch coverage" title="Sort by branch coverage" border=0></a></span></td>
</tr>
<tr>
<td class="coverFile"><a href="TicketNFT.t.sol.gcov.html">TicketNFT.t.sol</a></td>
<td class="coverBar" align="center">
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="../snow.png" width=100 height=10 alt="0.0%"></td></tr></table>
</td>
<td class="coverPerLo">0.0&nbsp;%</td>
<td class="coverNumLo">0 / 10</td>
<td class="coverPerLo">0.0&nbsp;%</td>
<td class="coverNumLo">0 / 3</td>
<td class="coverPerHi">-</td>
<td class="coverNumHi">0 / 0</td>
</tr>
</table>
</center>
<br>
<table width="100%" border=0 cellspacing=0 cellpadding=0>
<tr><td class="ruler"><img src="../glass.png" width=3 height=3 alt=""></td></tr>
<tr><td class="versionInfo">Generated by: <a href="http://ltp.sourceforge.net/coverage/lcov.php">LCOV version 1.14</a></td></tr>
</table>
<br>
</body>
</html>

111
coverage/test/index.html Normal file
View file

@ -0,0 +1,111 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>LCOV - TicketNFT Coverage - test</title>
<link rel="stylesheet" type="text/css" href="../gcov.css">
</head>
<body>
<table width="100%" border=0 cellspacing=0 cellpadding=0>
<tr><td class="title">LCOV - code coverage report</td></tr>
<tr><td class="ruler"><img src="../glass.png" width=3 height=3 alt=""></td></tr>
<tr>
<td width="100%">
<table cellpadding=1 border=0 width="100%">
<tr>
<td width="10%" class="headerItem">Current view:</td>
<td width="35%" class="headerValue"><a href="../index.html">top level</a> - test</td>
<td width="5%"></td>
<td width="15%"></td>
<td width="10%" class="headerCovTableHead">Hit</td>
<td width="10%" class="headerCovTableHead">Total</td>
<td width="15%" class="headerCovTableHead">Coverage</td>
</tr>
<tr>
<td class="headerItem">Test:</td>
<td class="headerValue">TicketNFT Coverage</td>
<td></td>
<td class="headerItem">Lines:</td>
<td class="headerCovTableEntry">0</td>
<td class="headerCovTableEntry">10</td>
<td class="headerCovTableEntryLo">0.0 %</td>
</tr>
<tr>
<td class="headerItem">Date:</td>
<td class="headerValue">2023-02-21 16:00:17</td>
<td></td>
<td class="headerItem">Functions:</td>
<td class="headerCovTableEntry">0</td>
<td class="headerCovTableEntry">3</td>
<td class="headerCovTableEntryLo">0.0 %</td>
</tr>
<tr>
<td class="headerItem">Legend:</td>
<td class="headerValueLeg"> Rating:
<span class="coverLegendCovLo" title="Coverage rates below 75 % are classified as low">low: &lt; 75 %</span>
<span class="coverLegendCovMed" title="Coverage rates between 75 % and 90 % are classified as medium">medium: &gt;= 75 %</span>
<span class="coverLegendCovHi" title="Coverage rates of 90 % and more are classified as high">high: &gt;= 90 %</span>
</td>
<td></td>
<td class="headerItem">Branches:</td>
<td class="headerCovTableEntry">0</td>
<td class="headerCovTableEntry">0</td>
<td class="headerCovTableEntryHi">-</td>
</tr>
<tr><td><img src="../glass.png" width=3 height=3 alt=""></td></tr>
</table>
</td>
</tr>
<tr><td class="ruler"><img src="../glass.png" width=3 height=3 alt=""></td></tr>
</table>
<center>
<table width="80%" cellpadding=1 cellspacing=1 border=0>
<tr>
<td width="44%"><br></td>
<td width="8%"></td>
<td width="8%"></td>
<td width="8%"></td>
<td width="8%"></td>
<td width="8%"></td>
<td width="8%"></td>
<td width="8%"></td>
</tr>
<tr>
<td class="tableHead">Filename <span class="tableHeadSort"><img src="../glass.png" width=10 height=14 alt="Sort by name" title="Sort by name" border=0></span></td>
<td class="tableHead" colspan=3>Line Coverage <span class="tableHeadSort"><a href="index-sort-l.html"><img src="../updown.png" width=10 height=14 alt="Sort by line coverage" title="Sort by line coverage" border=0></a></span></td>
<td class="tableHead" colspan=2>Functions <span class="tableHeadSort"><a href="index-sort-f.html"><img src="../updown.png" width=10 height=14 alt="Sort by function coverage" title="Sort by function coverage" border=0></a></span></td>
<td class="tableHead" colspan=2>Branches <span class="tableHeadSort"><a href="index-sort-b.html"><img src="../updown.png" width=10 height=14 alt="Sort by branch coverage" title="Sort by branch coverage" border=0></a></span></td>
</tr>
<tr>
<td class="coverFile"><a href="TicketNFT.t.sol.gcov.html">TicketNFT.t.sol</a></td>
<td class="coverBar" align="center">
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="../snow.png" width=100 height=10 alt="0.0%"></td></tr></table>
</td>
<td class="coverPerLo">0.0&nbsp;%</td>
<td class="coverNumLo">0 / 10</td>
<td class="coverPerLo">0.0&nbsp;%</td>
<td class="coverNumLo">0 / 3</td>
<td class="coverPerHi">-</td>
<td class="coverNumHi">0 / 0</td>
</tr>
</table>
</center>
<br>
<table width="100%" border=0 cellspacing=0 cellpadding=0>
<tr><td class="ruler"><img src="../glass.png" width=3 height=3 alt=""></td></tr>
<tr><td class="versionInfo">Generated by: <a href="http://ltp.sourceforge.net/coverage/lcov.php">LCOV version 1.14</a></td></tr>
</table>
<br>
</body>
</html>

BIN
coverage/updown.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 117 B