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

orchestration: example with custom protobuf messages #10265

Open
0xpatrickdev opened this issue Oct 11, 2024 · 0 comments
Open

orchestration: example with custom protobuf messages #10265

0xpatrickdev opened this issue Oct 11, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@0xpatrickdev
Copy link
Member

0xpatrickdev commented Oct 11, 2024

What is the Problem Being Solved?

As a contract developer, I'd like to use custom protobuf messages in my orchestration contract/flows. I am interested in using something like /osmosis.gamm.v1beta1.MsgJoinPool, a message supported by the Osmosis' ICA implementation, but not yet part of the Orchestration API as osmoAccount.joinPool(..) via OsmosisAccountMethods.

I see a path for this via a test like this that uses executeEncodedTx:

const delegateMsg = Any.toJSON(
MsgDelegate.toProtoMsg({
delegatorAddress: 'cosmos1test',
validatorAddress: 'cosmosvaloper1test',
amount: { denom: 'uatom', amount: '10' },
}),
);
const delegateResp = await E(account).executeEncodedTx([delegateMsg]);

But it's less clear how I can go from a .proto file to MsgJoinPool.toProtoMsg() that I can use in an agoric contact. I also see that agoric-sdk has custom configurations for telescope, and I would like to be able to easily leverage these in my dapp-* repo.

Description of the Design

There seem to be two elements to this task:

  1. agoric-sdk should provide helpers (or docs?) so it's easy for a dapp developers to transpile proto messages into JS that is compliant with SwingSet / Endo.
  2. An example contract that uses executeEncodedTx with a custom proto message.

Security Considerations

Scaling Considerations

Test Plan

Upgrade Considerations

@0xpatrickdev 0xpatrickdev added the enhancement New feature or request label Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant