Skip to content

Commit

Permalink
Update docs/build/smart-contract/basic-concepts/serializable.mdx
Browse files Browse the repository at this point in the history
Co-authored-by: Modship <[email protected]>
  • Loading branch information
peterjah and modship authored Oct 10, 2024
1 parent 84370d9 commit add0b4c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/build/smart-contract/basic-concepts/serializable.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export class User implements Serializable {
- The constructor initializes User instances with a name and an age. - Default values are provided to allow for easy instantiation.

2. serialize Method:
- This method uses Args to convert the name and age properties into a byte array. It returns a serialized representation of the User object, which can then be stored in the contract's storage.
- This method uses `Args` to convert the `name` and `age` properties into a byte array. It returns a serialized representation of the User object, which can then be stored in the contract's storage.

3. deserialize Method:
- The deserialize method takes in a byte array and an offset, reconstructing the User object by extracting the name and age values. This enables the User instance to be rehydrated from storage.
Expand Down

0 comments on commit add0b4c

Please sign in to comment.