-
Notifications
You must be signed in to change notification settings - Fork 43
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
helpers for nested create Any objects #281
Comments
It work!! Good job @pyramation 👏 For the members: [{
address: "bcna1abcdefgh",
weight: "10",
metadata: "First user"
}], // MemberRequest[], |
@atmoner I believe I fixed the amino (for ledger support) can you test sometime? checkout import { cosmos } from 'interchain46';
const {
MsgCreateGroupWithPolicy
} = cosmos.group.v1
import type { MsgCreateGroupWithPolicyEncoded } from 'interchain46/types/codegen/cosmos/group/v1/tx'
const policy: MsgCreateGroupWithPolicyEncoded = {
admin: 'address',
groupMetadata: 'https://some.ipfs.w3s.link/group_metadata.json',
groupPolicyAsAdmin: true,
groupPolicyMetadata: 'https://some.ipfs.w3s.link/group_metadata.json',
members: [
{
address: 'address',
weight: '10',
metadata: 'First user'
}
],
decisionPolicy: PercentageDecisionPolicy.toProtoMsg({
percentage: '0.5',
windows: {
votingPeriod: {
nanos: 0,
seconds: Long.fromValue(100)
},
minExecutionPeriod: {
nanos: 0,
seconds: Long.fromValue(100)
}
}
})
};
// try broadcasting the amino one here:
const msg = {
typeUrl: '/cosmos.group.v1.MsgCreateGroupWithPolicy',
value: policy
} @atmoner example if that works, I think we have a solution, just need to package this all up into a neat interface/api |
Hey there 👋 We're in the process of switching to telescope and are now running into this issue. Any updates? How can we help? |
hey @ryanchristo which modules are you using this for? And have you guys upgraded the cosmos sdk that uses the If so, you'll already be able to create things much more easily, and then this issue would be great to make it even easier. I think we can have @Zetazzz prioritize this soon. |
what would be great to help, if we can build this feature and @atmoner and @ryanchristo can test the result to ensure it works for your use cases. |
I ran into this issue with the group module and the same message as the example. We're using a fork of I'd be happy to test for our use case. Feel free to add me as a reviewer or tag me in the pull request. Thanks! |
https://gist.github.com/pyramation/13f47ab2d9e6e6a86d3fb5d45999dc7b here is an example of a test that has the buffer in view and here is an example of the repo we were testing |
hey @ryanchristo have you guys tried using the
we need somebody to help us test these helpers, would be amazing to get some feedback. The a nice to have IMO, to get |
Hi, so, just in short, configs are like these:
Other team also encountered this, and I've tested with the listed config and they work! Hope they also work for you! Thx!! |
Sorry for the delay. I started testing this yesterday and ran into some issues. I updated the configuration and made use of the
Receiving errors with other messages as well now so I believe this is an issue on my end but will test and followup today. |
The above error occurs when metadata fields are empty strings or when |
Another message we are hoping to provide amino support for is If you want to look at some code, here is the pull request: regen-network/groups-ui#69 |
@ryanchristo Can you provide the message that you use so I can help you with that ? |
@hoangdv2429 We're trying to add amino support to a user interface for multiple group messages. We've successfully made use of the encoded type of This may be outside the scope of the original issue, but it looks like zero-values for all group messages are resulting in the same Another challenge is adding amino support for |
Here's an example from regen-network/groups-ui#69:
|
Hey everyone, sorry to bubble up an old issue but im currently running into the proposal submit issue. What is the proposed solution for amino support on group MsgSubmitProposals. |
According to the chat history, this
Should work |
I was able to reproduce the
error using the following const signer = await getOfflineSignerAmino({
mnemonic: ADDR1_MNEMONIC,
chain: {
bech32_prefix: 'manifest',
slip44: 118
},
});
const accounts = await signer.getAccounts();
const client = await getSigningCosmosClient({
rpcEndpoint: RPC_ENDPOINT,
signer: signer,
});
const msg2 = cosmos.group.v1.MessageComposer.withTypeUrl.createGroupWithPolicy({
admin: ADDR1,
groupMetadata: '',
groupPolicyAsAdmin: true,
groupPolicyMetadata: '',
members: [
// // Uncommenting the following results in
// // Broadcasting transaction failed with code 2 (codespace: sdk). Log: errUnknownField "*group.MemberRequest": {TagNum: 4, WireType:"bytes"}: tx parse error
// // I suspect it's because the `addedAt` field is not part of the `MemberRequest` type
// {
// address: ADDR1,
// weight: '10',
// metadata: ' ',
// addedAt: new Date(1725471079),
// },
],
decisionPolicy: {
typeUrl: '/cosmos.group.v1.ThresholdDecisionPolicy',
threshold: '1',
windows: {
votingPeriod: {
seconds: 10n,
nanos: 0,
},
minExecutionPeriod: {
seconds: 1n,
nanos: 0,
}
}
},
});
const memo = 'group any test';
const fees = {
amount: [
{
denom: 'umfx',
amount: '10000',
},
],
gas: '200000',
};
const { accountNumber, sequence } = await client.getSequence(ADDR1);
const txRaw = await client.sign(ADDR1, [msg2], fees, memo, {
accountNumber: accountNumber,
sequence: sequence,
chainId: CHAIN_ID
});
const txBytes = cosmos.tx.v1beta1.TxRaw.encode(txRaw).finish();
const result = await client.broadcastTx(txBytes);
console.log(result) Note the error when the I am using Telescope 1.8.3 on a CosmosSDK 0.50.8 chain & CosmJS 0.32.4. |
https://github.com/cosmos/groups-ui/blob/master/src/shared-state/groups-store.ts#L363
decisionPolicy
fieldThe text was updated successfully, but these errors were encountered: