dojo
dojo copied to clipboard
[BUG] sozo typescript binding issues
Describe the bug
Some types and functions on pistols are not being ported to typescript correctly with sozo build --typescript
To Reproduce
- clone pistols
- uncomment binding generation on the migration script
- run
./migration - check files at
./bindings/typescript - (generated files are attached below)
Issues and Screenshots
contracts.gen.ts: enum Archetype not being exported
#[derive(Serde, Copy, Drop, PartialEq, Introspect)]
enum Archetype {
Undefined, // 0
Villainous, // 1
Trickster, // 2
Honourable, // 3
}
Block-scoped variable 'U256Definition' used before its declaration. Same onScoreDefinition,ShotDefinition,
- ByteArray type mapped to invalid
RecsType.StringDefinition, on origami's ERC20MetadataModel and ERC721MetaModel
Array<felt252>of actions-validate_commit_message argument mapped to invalidRecsType.BigIntArraytype
fn validate_commit_message(world: @IWorldDispatcher,
account: ContractAddress,
signature: Array<felt252>,
duelId: felt252,
roundNumber: felt252,
duelistId: felt252,
) -> bool;
balance_of()method, from origami's erc20_balance and erc721_balance has duplicated argument account. The same happens to other functions that include anaccountargument incontraxcts.gen.ts.
Additional context
Dojo 1.0.0-alpha.9
generated sources: pistols.gen.zip
hello @rsodre kindly assign me this issue
Hi, I am interested in debugging this issue @rsodre .
I'm not in charge of assignments on dojo
@rsodre Thanks for the update. Please who's attention should be draw concerning this task
@rsodre @Agbeleshe this is tackled in #2501 which should be significantly different.