-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
[Multisig V2][API] Fix the API error for Multisig V2 #12445
Conversation
#[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize, Union)] | ||
#[serde(tag = "type", rename_all = "snake_case")] | ||
#[oai(one_of, discriminator_name = "type", rename_all = "snake_case")] | ||
pub enum MultisigTransactionPayload { | ||
EntryFunctionPayload(EntryFunctionPayload), | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this affect the indexer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bowenyang007 , @larry-aptos , we are making this change for the correct (de)serialization of simulation API results. Do you think this would affect the indexer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't believe this affects indexer, we have our own layer to convert the API types into proto types and this doesn't leverage the JSON representation of the types from serde.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the clarification!
@@ -740,6 +740,8 @@ impl TryFrom<Script> for ScriptPayload { | |||
// We use an enum here for extensibility so we can add Script payload support | |||
// in the future for example. | |||
#[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize, Union)] | |||
#[serde(tag = "type", rename_all = "snake_case")] | |||
#[oai(one_of, discriminator_name = "type", rename_all = "snake_case")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@banool , does this line for oai look good to you?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah looks good.
@alnoki , this is the API error fix for the multisig payload simulation. I am currently investigating the remaining multisig simulation error. |
@junkil-park thank you for flagging. Yes this looks like a fix for multisig payload simulation! Tagging #8304 here, which captures other similar issues In particular this comment: #8304 (comment) |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
fc23c58
to
4294714
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
4294714
to
de35092
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
330f225
to
151d976
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
- For the correct (de)serialization, added the serde attribute (tag = "type") to the enum type `MultisigTransactionPayload`
151d976
to
aabd57c
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
✅ Forge suite
|
✅ Forge suite
|
Description
This is caused by the incorrect serialization of the
MultisigTransactionPayload
type.For the correct (de)serialization, this PR adds the serde attribute (tag = "type") to the enum type
MultisigTransactionPayload
This PR resolves #12469,
and partially for #8304.
Test Plan
tested on the localnet