Minor Changes
-
#1293
638cd1cThanks @lorisleiva! - Walk the children of every node in the declaration order of the spec, in both the merge and the identity visitors, like the Rust visitors. Previously, a few nodes walked some children first, e.g. thepdasof aprogramNodebefore its accounts and instructions, or thecountof anarrayTypeNodebefore itsitem, and the identity visitor visited every single child of a node before its list children. Results are unchanged, but the order in which visitors, interceptors and node selectors see nodes changes, including which siblings are visited before an identity visitor drops a node whose required child returnsnull, and so do the output ofgetDebugStringVisitorand the order of validation items. A pda link now resolves to the pda of its program rather than to a pda of the same identifier inlined in apdaValueNode.visit(arrayTypeNode(publicKeyTypeNode(), prefixedCountNode(integerTypeNode('u64'))), getDebugStringVisitor()); // Before: arrayTypeNode(prefixedCountNode(integerTypeNode[u64]), publicKeyTypeNode) // After: arrayTypeNode(publicKeyTypeNode, prefixedCountNode(integerTypeNode[u64]))
Patch Changes
-
#1285
9146ad3Thanks @lorisleiva! - Carry the resolved signer and optionality of a default account along a chain of defaults ingetResolvedInstructionInputsVisitor. An account defaulting to an account that itself defaults to a non-signer, e.g.a→b→c, now resolves to an'either'signer rather than a required one, and likewise inherits the resolved optionality of its default account. -
#1286
9210c1fThanks @lorisleiva! - Check the transforms, counts, prefixes, sizes and zero values of types that may stop a recursion ingetHasFiniteValueVisitor. A constant of a type being visited hidden in, e.g., the transforms of a link or an option, or in a sentinel count, can never be created, sohasDefinedTypeFiniteValuenow reports that type as having no finite value instead of accepting it. -
#1289
f56fc28Thanks @lorisleiva! - Depend on a PDA value'sprogramIdwhen it is adataValueNodeingetResolvedInstructionInputsVisitor, so the data field resolves before the PDA value, and keep the instruction account in the path ofCANNOT_USE_OPTIONAL_ACCOUNT_AS_PDA_SEED_VALUEwhenever the PDA value is the account's own, including when resolving an injected seed within it rebuilt the value. -
Updated dependencies [
141998e]:- @codama/nodes@2.0.0-rc.1
- @codama/errors@2.0.0-rc.1
- @codama/fragments@2.0.0-rc.1