Skip to content

Have full objects in ChangedObject instead of ObjectIn/ObjectOut #314

@Thoralf-M

Description

@Thoralf-M

Can we change it like this?

pub struct ChangedObject {
    /// Id of the object
    pub object_id: ObjectId,
    /// State of the object in the store prior to this transaction.
    pub input_state: Option<crate::Object>,
    /// State of the object in the store after this transaction.
    pub output_state: Option<crate::Object>,
    /// Whether this object ID is created or deleted in this transaction.
    /// This information isn't required by the protocol but is useful for
    /// providing more detailed semantics on object changes.
    pub id_operation: IdOperation,
}

GraphQL definitely provides move information than is available from the current ObjectIn/ObjectOut types, see https://studio.apollographql.com/sandbox/explorer?endpoint=https%3A%2F%2Fgraphql.testnet.iota.cafe%2F&explorerURLState=N4IgJg9gxgrgtgUwHYBcQC4QEcYIE4CeABMADpJGVXU1Ep4CGSAzg1CgJYRIBCANtADWzABR8GzFOiIBGADREAZhz4p804II5Iw0gAoAlAPIBxAwEEAspfM8AMgFEA%2BgBUAGgF8AlCXK1--kgQYAjMvhQBkbRgHADmoSh%2BUcmUzMgheOEp2VQMYGB4ocxJOQEeJaW0CIqKCOxhZBGVUVAAFnWCAA4Q2ihZzTlpOMhQCABy8ABG%2BBUDUZyIkgxwnbNz1OVN6zRLKDDFW9tUkwziSKMAwq1M8cyNR1FBIXdrD-4QAO5I%2BPdvpXkFIqvP4bYEgyhQHpIFwEToIX7g5KFTp4MHgzaIgLLCAwVBoo4Y9H45qxCQOGp1FAvQ5-UnMADK8DgDEICMxkggjHiFwgkmJ6w5XIQBgQJzU-LmkJWMBQDE43B5fJpb0JINVfwgkwAVpSrjdQv1MUQnga2UbKBwwAARBB8BBqMASo6Wi6FOUIR3KzEAwrMA7mmjaToy%2BmytSGgO5ZiWCAANwQRm1lIjkaokNQyCpKdTVC1zG4Tr%2B6tTxfNpaNOJQwZQofd2dTEhj8cTOvY9ZzEO4alQDULAbzBa9HfLkZHAcbcYQejYggY8XbHbgwRgdt7Q47VBNa43pSQywQfbLh7Vx%2B2Y6J64Jp7K1-8CHjPYX2y3T6OYDlDFvUTSOm0sRjYArggr4PJ0M5zsBZrmj6QKXg855XnBAwIc0KGVPQTCsOwXC8AIUCCCB6yTFA-oXiqp5of4YHxAAkkgigQIRyTXMwYwIAAHig07xF%2BRDpBcMB4PmqJIf4lGUChHggB4QA

Needed for #278 (comment) and other things

ChangedObject is used in the TransactionEffectsV1, not sure if all information for crate::Object is available, maybe only ObjectData can be used?

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions