fix: card-game tutorial — match actual evo-sdk API#8
Open
thepastaclaw wants to merge 1 commit into
Open
Conversation
Combines all fixes from car-sales and basic-token tutorials: - contracts.publish() with DataContract + TokenConfiguration - documents.create/transfer: construct Document objects - documents.query: dataContractId/documentTypeName - documents.transfer: pass full Document + recipientId - tokens.mint/transfer: dataContractId+tokenPosition, identityKey+signer - doc.properties instead of doc.getData() - contract.id instead of contract.getId() - All token amounts as bigint TypeScript compiles clean against @dashevo/evo-sdk@3.1.0-dev.1. Resolves #5
dac6f02 to
b54a65f
Compare
Owner
Author
✅ Live Testnet Run — All Steps PassedRan the card game tutorial on testnet with identity Additional issues discovered during live testingAll issues from Car Sales (#6) and Basic Token (#7) apply here, plus:
|
This was referenced Apr 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a corrected version of the Card Game with Tokens tutorial that compiles against
@dashevo/evo-sdk@3.1.0-dev.1.This is the most complex tutorial, combining documents and tokens. All fixes from the car-sales and basic-token tutorials apply here.
Changes from original tutorial
contracts.publish()tokens: [config]DataContractwithTokenConfiguration+identityKey+IdentitySignerdocuments.create(){ contractId, documentType, document: {...} }{ document: new Document({...}), identityKey, signer }documents.query()contractId,documentTypedataContractId,documentTypeNamedocuments.transfer(){ contractId, documentId, recipientId, privateKeyWif }{ document: Document, recipientId: Identifier, identityKey, signer }tokens.mint(){ tokenId, amount, privateKeyWif }{ dataContractId, tokenPosition, amount: bigint, identityKey, signer }tokens.transfer(){ tokenId, identityId, privateKeyWif }{ dataContractId, tokenPosition, senderId, identityKey, signer }doc.getData()doc.propertiescontract.getId()contract.idnpx tsc --noEmitpasses with zero errors.Resolves #5