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: add /vm.m_run message handler #281

Merged
merged 4 commits into from
Oct 21, 2023
Merged

Conversation

luciorubeens
Copy link
Contributor

Add handlers for the new message type: gnolang/gno#1001

@@ -80,3 +86,16 @@ export const encodeVmAddPackage = (writer: protobuf.Writer, messageInfo: VmAddPa
}
return writer;
};

export const encodeVmRun = (writer: protobuf.Writer, messageInfo: VmAddPackage) => {
Copy link
Member

Choose a reason for hiding this comment

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

shouldn't it be messageInfo: VmRun ??

@luciorubeens
Copy link
Contributor Author

I tried to broadcast a transaction, but I got this error, can you help to investigate?

CleanShot 2023-10-19 at 17 12 51@2x

writer.uint32(18).string(messageInfo.send);
}
if (messageInfo.package !== undefined) {
encodePackage(writer.uint32(18).fork(), messageInfo.package).ldelim();
Copy link
Member

Choose a reason for hiding this comment

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

This simply seems to be the problem.
Change the size of the buffer in the 3rd argument.
18 -> 26

Copy link
Member

Choose a reason for hiding this comment

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

@luciorubeens seems like protobuf has certain buf size value for nth args.
https://www.tabnine.com/code/javascript/functions/protobufjs/Writer/string

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Perfect, thank you guys, now it works

CleanShot 2023-10-20 at 10 00 54@2x

Copy link
Member

@jinoosss jinoosss left a comment

Choose a reason for hiding this comment

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

@luciorubeens
Thank you for your work.

@jinoosss jinoosss changed the base branch from main to develop October 21, 2023 00:56
Copy link
Member

@r3v4s r3v4s left a comment

Choose a reason for hiding this comment

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

looking good

@r3v4s r3v4s merged commit e099363 into onbloc:develop Oct 21, 2023
2 checks passed
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.

3 participants