TezosTaqueria / taqueria

*BETA* Taqueria provides a seamless development workflow to easily build, test and deploy your Tezos applications.
https://taqueria.io
Apache License 2.0
64 stars 20 forks source link

๐Ÿ› Bug โžพ option contained inside storage structure is not converted to Some or null #1895

Closed zamrokk closed 1 year ago

zamrokk commented 1 year ago

๐Ÿšฅ Status (Internal Taqueria Team Use Only)

๐Ÿ†˜ What happened?

I have this Structure in ligo

type board = map<round, option<player> >;

export type t = {
    total_rounds : nat,
    players : list<player>,
    current_round : nat,
    rounds : rounds<bytes>,
    decoded_rounds : rounds<action>,
    board : board,
    result : result,
    asleep : timestamp,
    pool : tez     //bet pool in tez. 1 tez / round play movement
};

Look at the board type, it has a map of optional, then when I generate the types

taq generate types ./app/src

I get

export type Storage = {
  metadata: BigMap<string, bytes>;
  next_session: nat;
  sessions: MMap<
    nat,
    {
      asleep: timestamp;
      board: MMap<nat, address>;
      current_round: nat;
      decoded_rounds: MMap<

but I expect

export type Storage = {
  metadata: BigMap<string, bytes>;
  next_session: nat;
  sessions: MMap<
    nat,
    {
      asleep: timestamp;
      board: MMap<nat, { Some: address } | null>;
      current_round: nat;
      decoded_rounds: MMap<

I have taq v0.37.0

๐Ÿ†˜ Steps to Reproduce?

reproduce a similar structure and generate the types for typescript

๐Ÿชต Relevant log output

No response

๐Ÿ˜ How impactful is this bug?

None

โฑ๏ธ Prevalance

No response

๐Ÿ’ป Operating System

Windows -> WSL

๐Ÿ•ธ๏ธ System Architecture

x64

๐ŸŒฎ Taqueria Version

v0.37.0

๐ŸŒฟ Node.js Version

No response

โ˜Ž๏ธ Contact Details

No response

Code of Conduct

mweichert commented 1 year ago

@zamrokk when you get some time, do you mind uploading the michelson contract for this? Thanks!

zamrokk commented 1 year ago

@mweichert , sure

It is the mobile game training here => https://github.com/dvkam/training-dapp-shifumi/tree/main/solution

github-actions[bot] commented 1 year ago

Published Binaries & Packages

Published Version
Taq Binary (MacOS) 0.39.1
Taq Binary (Windows) 0.39.1
VSIX for VSCode Extension 0.39.1
@taqueria/plugin-archetype 0.39.1
@taqueria/plugin-contract-types 0.39.1
@taqueria/plugin-core 0.39.1
@taqueria/plugin-flextesa 0.39.1
@taqueria/plugin-ipfs-pinata 0.39.1
@taqueria/plugin-jest 0.39.1
@taqueria/plugin-ligo 0.39.1
@taqueria/plugin-metadata 0.39.1
@taqueria/plugin-smartpy-legacy 0.39.1
@taqueria/plugin-taquito 0.39.1
@taqueria/plugin-tezos-client 0.39.1
@taqueria/protocol 0.39.1
@taqueria/node-sdk 0.39.1
@taqueria/toolkit 0.39.1

Note: You can install the latest development version of a package with taq install @taqueria/[packageName]@dev.