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

[Reg 0.4x -> 0.50] MsgStoreCode with instantiate_permission set not working with Amino JSON since Cosmos SDK 0.50 (wasmd 0.50) #1863

Open
webmaster128 opened this issue Apr 22, 2024 · 2 comments
Assignees

Comments

@webmaster128
Copy link
Member

After a series of changes, we got Amino JSON bach to pre-Cosmos SDK 0.50 behavior for the majority of CosmWasm message types. However, there is one case left we currently know about.

MsgStoreCode works when instantiate_permission is unset. When it is set to the following value, it fails:

      const instantiatePermission: AccessConfig = {
        permission: AccessType.ACCESS_TYPE_EVERYBODY,
        address: "",
        addresses: [],
      };
      const { codeId, checksum, originalSize, compressedSize } = await client.upload(
        alice.address0,
        wasm,
        defaultUploadFee,
        "test memo",
        instantiatePermission,
      );

The reason might be the JSON serialization of the empty list. But this is just an unevaluated guess.

@webmaster128 webmaster128 changed the title MsgStoreCode with instantiate_permission set not working with Amino JSON since Cosmos SDK 0.50 (wasmd 0.50) [Reg 0.4x -> 0.50] MsgStoreCode with instantiate_permission set not working with Amino JSON since Cosmos SDK 0.50 (wasmd 0.50) Apr 22, 2024
@webmaster128
Copy link
Member Author

The same test with

      const instantiatePermission = AccessConfig.fromPartial({
        permission: AccessType.ACCESS_TYPE_ANY_OF_ADDRESSES,
        addresses: [makeRandomAddress()],
      });

is failing as well. So it might be a problem with the enum or anything else.

webmaster128 added a commit to cosmos/cosmjs that referenced this issue Apr 22, 2024
@pinosu pinosu self-assigned this Apr 24, 2024
@evilpeach
Copy link

Hello, Just checking in to see if there are any updates on this issue. Thank you!

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

4 participants
@webmaster128 @evilpeach @pinosu and others