Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support struct type with generic type params used in fields #183

Open
SamuelQZQ opened this issue Aug 11, 2024 · 1 comment
Open

Support struct type with generic type params used in fields #183

SamuelQZQ opened this issue Aug 11, 2024 · 1 comment

Comments

@SamuelQZQ
Copy link
Member

For example, struct Element has generic type params T0 and T1, and T0 T1 is used for the type of the struct fields.

{
      name: "Element",
      is_native: false,
      abilities: ["copy", "drop", "store"],
      generic_type_params: [
        {
          constraints: [],
        },
        {
          constraints: [],
        },
      ],
      fields: [
        {
          name: "key",
          type: "T0",
        },
        {
          name: "value",
          type: "T1",
        },
      ],
    },

Currently Surf cannot inference those fields type correctly.

0x1::simple_map::SimpleMap<0x1::string::String, 0xc6bc659f1649553c1a3fa05d9727433dc03843baac29473c817d06d39e7621ba::farming::Reward>

@lumos42
Copy link

lumos42 commented Sep 5, 2024

I have the same request. Is there a way around it? Or any way to do this using aptos-sdk?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants