Open
Description
Describe the bug
The ByteArray
types should be converted to string
In the TypeScript bindings.
starknet.js Calldata can candle string
types, there's no need to pass as ByteArray
.
I tried passing a ByteArray
instead of string and it raises an error.
To Reproduce
Generate typescript bindings for a contract that contains a ByteArray
argument.
(example from pistols/dev branch)
const build_duel_token_createDuel_calldata = (duelType: CairoCustomEnum, duelistId: BigNumberish, challengedAddress: string, livesStaked: BigNumberish, expireHours: BigNumberish, premise: CairoCustomEnum, message: ByteArray): DojoCall => {
return {
contractName: "duel_token",
entrypoint: "create_duel",
calldata: [duelType, duelistId, challengedAddress, livesStaked, expireHours, premise, message],
};
};
Expected behavior
The converted type should at least work.
Even if it worked, it's not necessary to enforce this type conversion in the client.
Screenshots
Additional context