Skip to content

[BUG] Typescript bindings not namespacing models when used in arguments #3345

@rsodre

Description

@rsodre

Describe the bug

This is a funciton that takes another model as argument.
It should be models.Action, not only Action, causing a build error.

import { DojoProvider, DojoCall } from "@dojoengine/core";
import { Account, AccountInterface, BigNumberish, CairoOption, CairoCustomEnum } from "starknet";
import * as models from "./models.gen";

export function setupWorld(provider: DojoProvider) {

	const build_designer_createAction_calldata = (t: Array<Action>): DojoCall => {
		return {
			contractName: "designer",
			entrypoint: "create_action",
			calldata: [t],
		};
	};

from this Cairo function:

fn create_action(ref self: TContractState, t: Array<Action>);

To Reproduce
generated files should compile without errors

Expected behavior
no build errors

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions