-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/tzip 16 #1014
Feature/tzip 16 #1014
Conversation
# Conflicts: # sql/conseil.sql
sql/conseil.sql
Outdated
address text NOT NULL, | ||
raw_metadata text NOT NULL, | ||
name text NOT NULL, | ||
desctiption text, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
import scala.concurrent.{ExecutionContext, Future} | ||
import scala.util.Try | ||
|
||
class MetadataProcessor( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A comment explaining the purpose of this class and how it works would be very useful here.
|
||
object Tzip16 { | ||
|
||
private def proceduralDecode(hex: String): String = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please leave a note about the function here.
fetch[(Tables.RegisteredTokensRow, Tables.BigMapContentsRow, String), Option[(String, Tzip16Metadata)], Future, List, Throwable] | ||
.run(addresses) | ||
|
||
def getHttpMetadataWithRegisteredTokensRow( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove.
val showHashes = hashes.mkString(", ") | ||
logger | ||
.error( | ||
s"I encountered problems while fetching baking rights from TZIP-16 for blocks $showHashes. The error says ${err.getMessage}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix please
case ((ipfs, http), acc) if acc._3.startsWith("ipfs") => (acc :: ipfs, http) | ||
case ((ipfs, http), acc) if acc._3.startsWith("http") => (ipfs, acc :: http) | ||
} | ||
println(metadata) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove please.
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Resolves #999
Implemented handling of the tzip-16 metadata fetching as described in the ticket.