-
Notifications
You must be signed in to change notification settings - Fork 1
Update CTL, integrate with frontend #5
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
Conversation
The patch branch is based off the previous commit with Plutonomicon/cardano-transaction-lib@f5785cd applied The use of `/\` in an instance declaration was causing an invalid string literal in the output JS, something like "toMetadataArray/\"
Fix logLevel issue and add fd to nix develop (require for seabug build)
Contract to fetch single NFT
Minting contract and seabug metadata
transactionId = byteArrayToHex $ unwrap input.transactionId | ||
inputIndex = UInt.toInt input.index | ||
address = addressBech32 output.address | ||
-- TODO: What do we do if this fails? |
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.
Interesting issue - can only occur if the NftResult passed in is malformed, which is built from a real transaction.
We could return an error? but the only way this would break is if you intentionally broke it.
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.
We could return an empty string like we're doing with dataHash
. This could be acceptable if the only plans for using this field are to show it in the frontend.
I also don't see anywhere this is actually used in the frontend (besides a mock in a test), so we could just remove it, unless there are plans to use it in the future.
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.
Lets leave as is for now, get a ticket up, I'll check with Neil
src/Seabug/Contract/Util.purs
Outdated
marketplaceShareValidated <- natToShare nftCollection.daoShare | ||
setTxMetadata tx $ SeabugMetadata | ||
{ policyId | ||
, mintPolicy: mempty |
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.
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.
I guess we can just hardcode something like "V1"
for now? Not sure what the best solution is in the long term, maybe some kind of environment file and passing config from there, like we're doing with projectId
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.
I imagine eventually we'll need a mapping from the various versions to unapplied scripts, we can do V1 for now.
|
||
instance ToData SeabugMetadataDelta where | ||
toData (SeabugMetadataDelta meta) = unsafePartial $ toData $ AssocMap.Map | ||
[ unsafeMkKey "727" /\ AssocMap.Map |
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.
I believe the key for delta was supposed to be 727d? Unsure if this is permitted in the metadata standard, but it certainly shouldn't be the same as the full metadata, right?
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.
Afaict the closest we have to a standard is https://developers.cardano.org/docs/transaction-metadata/, and that won't allow it. Idk what we should change it to though, 728? 727D from base 16 to base 10? I was also hearing something about a new whitepaper for seabug, maybe we can follow that?
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.
That was over a week ago, lets ask directly
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.
Got no reply, we can leave as is for now since we're not using the delta.
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.
I guess it's permitted but using 727d
would save onchain space. Not sure if we're capable of parsing delta metadata now though so lets stick with it
@rynoV The changes required here will be your next task |
Also changes `SeabugMetadata.policyId` to type `CurrencySymbol`
Also removed the unneccessary |
MintPolicy V1 tested here: https://testnet.cardanoscan.io/transaction/f5688894c672a2931a11ba59c6641292888c20a880f1188df5343837d6877dd3 |
I love that you're able to get these transactions up so quickly, such a difference to when we used BPI |
Once CI passes, we'll merge :) |
No description provided.