fix: basic-token tutorial — match actual evo-sdk API#7
Open
thepastaclaw wants to merge 1 commit into
Open
Conversation
- contracts.publish(): construct DataContract with TokenConfiguration - TokenConfiguration requires full setup: conventions, ChangeControlRules, TokenDistributionRules, TokenKeepsHistoryRules, TokenMarketplaceRules - tokens.mint/transfer/burn: use dataContractId+tokenPosition, not tokenId - tokens.mint/transfer/burn: require identityKey+signer, not privateKeyWif - token amounts are bigint (10_000_00n), not number - tokens.transfer: senderId instead of identityId - Map<Identifier, bigint> iteration instead of .get(string) - contract.id instead of contract.getId() TypeScript compiles clean against @dashevo/evo-sdk@3.1.0-dev.1. Resolves #4
467eae5 to
5c51795
Compare
Owner
Author
✅ Live Testnet Run — All Steps PassedRan the basic token tutorial on testnet with identity Additional issues discovered during live testing
|
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 Basic Token tutorial that compiles against
@dashevo/evo-sdk@3.1.0-dev.1.Changes from original tutorial
contracts.publish(){ identityId, documentSchemas, tokens: [config] }{ dataContract: new DataContract({..., tokens: {0: tokenConfig}}), identityKey, signer }{ conventions, manualMinting: { rules: { type: "ownerOnly" } } }TokenConfigurationwithChangeControlRules,TokenDistributionRules,TokenKeepsHistoryRules,TokenMarketplaceRulestokens.mint(){ tokenId, amount: number, privateKeyWif }{ dataContractId, tokenPosition: 0, amount: bigint, identityKey, signer }tokens.transfer(){ tokenId, identityId, privateKeyWif }{ dataContractId, tokenPosition, senderId, identityKey, signer }tokens.burn(){ tokenId, identityId, privateKeyWif }{ dataContractId, tokenPosition, identityId, identityKey, signer }balances.get(tokenId)(string)Map<Identifier, bigint>entriescontract.getId()contract.id(property)npx tsc --noEmitpasses with zero errors.Resolves #4