Skip to content

Commit

Permalink
fix navigation in build - smart contracts - objects pages
Browse files Browse the repository at this point in the history
  • Loading branch information
igor-p committed Oct 25, 2024
1 parent bdc4175 commit 3bea2e1
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 9 deletions.
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",
},
"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

0 comments on commit 3bea2e1

Please sign in to comment.