You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently our contract has conversion methods in both directions for the attestations vs attestation DTOs. This is because the contract state holds the upstream attestation type as opposed to the DTO type. Because we want a high degree of control over the types we store in the contract, it's better to hold the DTO types here and only convert to the upstream type when we want to validate attestations.
This way, the contract only needs to convert from DTOs to the native type but never the other direction.
User Story
As a developer I don't want upstream changes to break our contract serialization format.
Acceptance Criteria
We store the DTO variant of the attestation instead of the upstream variant in the contract state.
The contract never converts from a native type to a DTO, only the other direction.
Resources & Additional Notes
Note: We may want to rename dtos_contract to just contract_types.
This was partially solved as part of #1663. Although we did not use the dto types, the types that we ended up storing in the contract are now our own types defined in the mpc-attestation crate. Therefore, the original aim of the issue was achieved
Activity
gilcu3 commentedon Mar 2, 2026
This was partially solved as part of #1663. Although we did not use the dto types, the types that we ended up storing in the contract are now our own types defined in the
mpc-attestationcrate. Therefore, the original aim of the issue was achieved