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

feat: Define and create new handler for new vm_noop message type #540

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

thinhnx-var
Copy link

@thinhnx-var thinhnx-var commented Jul 30, 2024

What type of PR is this?

  • feature

What this PR does:

In the view of sponsor feature, this PR aims to:

  • Add supporting for signing a sponsor message from sponsor service.
  • Skipping balances check when dapps/ users want to make a sponsor transaction.

We are now using our version of gno, tm2-js-client`, ... and will update to make this PR ready after these PRs are merged.

Read more about sponsor-service at:

@@ -1,5 +1,5 @@
import { Any, PubKeySecp256k1, Tx, TxFee, TxSignature } from '@gnolang/tm2-js-client';
import { MsgCall, MsgAddPackage, MsgSend, MsgEndpoint } from '@gnolang/gno-js-client';
import { MsgCall, MsgAddPackage, MsgSend, MsgEndpoint, MsgNoop } from '@gnolang/gno-js-client';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a link to see what MsgNoop looks like?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jinoosss we have PRs 2209 2630 are about MsgNoop. Hope this will give you a clearer view.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I can guess from the modifications in the gno chain.
But I wanted to check out decoding the proto in gno-js-client.
https://github.com/onbloc/adena-wallet/pull/540/files#diff-ebc97186e74851cee33a3481a356d0f5e231df2e90af1ccaf35ea14cc9fb461aR63-R64

Copy link
Author

@thinhnx-var thinhnx-var Jul 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry for this lately response, it was in pending state, I did not commited the comments

@jinoosss
I think this PR about our changes in gno-js-client may fit.
gnolang/gno-js-client#140
I will update later for further information.

Comment on lines 100 to 102
if (document?.msgs[0].type === '/vm.m_noop') {
return false;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to check for multi-messages.
Additionally, it would be nice to have a separate type-checking function for this.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we separate type-checking function and add condition to check for multi-messages.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the changes address at 764ad3e

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

Successfully merging this pull request may close these issues.

4 participants