Skip to content

/epochs/latest/parameters missing cost_models_raw #157

@bouwerp

Description

@bouwerp

Real Blockfrost returns both cost_models (named-key dict) and cost_models_raw (flat int array). yaci-store 0.10.6 only returns cost_models. Breaks Blaze's getParameters(), which does Object.entries(response.cost_models_raw) directly - surfaces as TypeError: Cannot convert undefined or null to object at tx-build time.

Client-side workaround (Yaci already emits op names in canonical ledger order, so Object.values() reproduces the expected array):

const cost_models_raw: Record<string, number[]> = {};
for (const [v, ops] of Object.entries(response.cost_models)) {
  cost_models_raw[v] = Object.values(ops as Record<string, number>);
}

Happy to open a PR emitting cost_models_raw alongside cost_models.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions