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

Fix navigation and formatting in Build -> Smart Contracts (Move) -> Objects #680

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions apps/nextra/next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -1746,6 +1746,16 @@ export default withBundleAnalyzer(
destination: "/en/build/smart-contracts/book/move-2",
permanent: true,
},
{
source: "/en/build/smart-contracts/objects/:page",
destination: "/en/build/smart-contracts/aptos-objects/:page",
permanent: true,
},
{
source: "/en/build/smart-contracts/objects",
destination: "/en/build/smart-contracts/move-objects",
permanent: true,
},
],
}),
);
7 changes: 3 additions & 4 deletions apps/nextra/pages/en/build/smart-contracts/_meta.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ export default {
type: "separator",
title: "Aptos Standards",
},
objects: {
title: "Object",
"aptos-objects": {
title: "Objects",
Copy link
Collaborator Author

@igor-p igor-p Oct 25, 2024

Choose a reason for hiding this comment

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

I tried keeping this route as objects, but if you go to https://aptos.dev/en/build/smart-contracts/objects/creating-objects and hit refresh, it redirects to using-objects and I'm not sure why. Changing the name of the route to something other than objects fixes it though.

},
"digital-asset": {
title: "Digital Asset (DA)",
Expand All @@ -49,8 +49,7 @@ export default {
table: {
title: "Table",
},
"aptos-objects": {
href: "/en/build/smart-contracts/objects",
"move-objects": {
title: "Objects",
},
"resource-accounts": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
title: "Creating objects"
---
import { Callout } from 'nextra/components'

import { Callout } from 'nextra/components'

# Creating and Configuring Objects

Expand All @@ -16,7 +16,7 @@ Creating an Object involves two steps:
transaction you create it. Later on it is impossible to change those settings.
</Callout>

### Creating an Object
## Creating an Object

There are three types of Object you can create:

Expand Down Expand Up @@ -71,7 +71,7 @@ module my_addr::object_playground {
}
```

# Customizing Object Features
## Customizing Object Features

Once you create your object, you will receive a `ConstructorRef` you can use to generate additional `Ref`s. `Ref`s can be used in future to enable / disable / execute certain Object functions such as transferring resources, transferring the object itself, or deleting the Object.

Expand Down Expand Up @@ -363,7 +363,7 @@ module my_addr::object_playground {
}
```

## **Allowing Deletion of an Object (`DeleteRef`)**
## Allowing Deletion of an Object (`DeleteRef`)

For Objects created with the default method (allowing deletion) you can generate a `DeleteRef` which can be used later. This can help remove clutter as well as receive a storage refund.

Expand Down Expand Up @@ -432,7 +432,7 @@ module my_addr::object_playground {

An object can be made immutable by making the contract associated immutable, and removing any ability to extend or mutate the object. By default, contracts are not immutable, and objects can be extended with an `ExtendRef`, and resources can be mutated if the contract allows for it.

# Further Reading
## Further Reading

You can find documentation for all possible `Refs` by looking at the Move reference docs for `0x1::object` [here](https://aptos.dev/reference/move?branch=mainnet&page=aptos-framework/doc/object.md).

Expand Down
Loading