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 all commits
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
4 changes: 2 additions & 2 deletions apps/nextra/components/landing/sections/MoveSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export function MoveSection() {
objects: {
label: t.objectsExampleLabel,
description: t.objectsExampleDescription,
href: `/${locale}/build/smart-contracts/objects`,
href: `/${locale}/build/smart-contracts/move-objects`,
codeSnippet: objectsCodeSnippet,
},
fungibleAssets: {
Expand Down Expand Up @@ -64,7 +64,7 @@ export function MoveSection() {
className="
flex flex-col lg:flex-row lg:gap-12 justify-between items-center
w-full max-w-[1200px] xl:max-w-[1280px] lg:px-12
border-t border-t-border-divider lg:border-none max-lg:pt-8
border-t border-t-border-divider lg:border-none max-lg:pt-8
"
>
<div className="flex flex-col gap-8 md:gap-12 max-md:mb-8 max-lg:mb-12 px-8 lg:px-0">
Expand Down
37 changes: 26 additions & 11 deletions apps/nextra/next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -274,22 +274,22 @@ export default withBundleAnalyzer(
},
{
source: "/move/move-on-aptos/objects",
destination: "/en/build/smart-contracts/objects",
destination: "/en/build/smart-contracts/move-objects",
permanent: true,
},
{
source: "/move/move-on-aptos/objects/creating-objects",
destination: "/en/build/smart-contracts/objects/creating-objects",
destination: "/en/build/smart-contracts/object/creating-objects",
permanent: true,
},
{
source: "/move/move-on-aptos/objects/configuring-objects",
destination: "/en/build/smart-contracts/objects/configuring-objects",
destination: "/en/build/smart-contracts/object/creating-objects",
permanent: true,
},
{
source: "/move/move-on-aptos/objects/using-objects",
destination: "/en/build/smart-contracts/objects/using-objects",
destination: "/en/build/smart-contracts/object/using-objects",
permanent: true,
},
{
Expand Down Expand Up @@ -349,7 +349,7 @@ export default withBundleAnalyzer(
},
{
source: "/standards/aptos-object",
destination: "/en/build/smart-contracts/aptos-standards/aptos-object",
destination: "/en/build/smart-contracts/move-objects",
permanent: true,
},
{
Expand Down Expand Up @@ -1051,29 +1051,29 @@ export default withBundleAnalyzer(
},
{
source: "/en/build/smart-contracts/aptos-standards/aptos-object",
destination: "/en/build/smart-contracts/objects",
destination: "/en/build/smart-contracts/move-objects",
permanent: true,
},
{
source: "/en/build/smart-contracts/aptos-standards/objects",
destination: "/en/build/smart-contracts/objects",
destination: "/en/build/smart-contracts/move-objects",
permanent: true,
},
{
source:
"/en/build/smart-contracts/aptos-standards/objects/creating-objects",
destination: "/en/build/smart-contracts/objects/creating-objects",
destination: "/en/build/smart-contracts/object/creating-objects",
permanent: true,
},
{
source:
"/en/build/smart-contracts/aptos-standards/objects/configuring-objects",
destination: "/en/build/smart-contracts/objects/creating-objects",
destination: "/en/build/smart-contracts/object/creating-objects",
permanent: true,
},
{
source: "/en/build/smart-contracts/objects/creating-objects",
destination: "/en/build/smart-contracts/objects/using-objects",
destination: "/en/build/smart-contracts/object/creating-objects",
permanent: true,
},
{
Expand Down Expand Up @@ -1479,7 +1479,7 @@ export default withBundleAnalyzer(
},
{
source: "/en/build/smart-contracts/objects/configuring-objects",
destination: "/en/build/smart-contracts/objects",
destination: "/en/build/smart-contracts/object/creating-objects",
permanent: true,
},
{
Expand Down Expand Up @@ -1746,6 +1746,21 @@ 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/object/:page",
permanent: true,
},
{
source: "/en/build/smart-contracts/objects",
destination: "/en/build/smart-contracts/move-objects",
permanent: true,
},
{
source: "/en/build/smart-contracts/object",
destination: "/en/build/smart-contracts/move-objects",
permanent: true,
},
],
}),
);
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ To learn more about the differences and similarities see [Aptos Learn](https://l
| **Smart Contracts** | Rust, SVM | Move, MoveVM |
| **Transaction Fees** | Low | Low |
| **Parallelization** | Pessimistic parallelism, need to declare all write accounts | Optimistic parallelism, chain infers write accounts for you |
| **Contract Account Support** | PDA Account | [Object](../smart-contracts/objects.mdx) or [resource account](../smart-contracts/resource-accounts.mdx)(encourage to use object instead) |
| **Contract Account Support** | PDA Account | [Object](../smart-contracts/move-objects.mdx) or [resource account](../smart-contracts/resource-accounts.mdx)(encourage to use object instead) |
| **Data Storage** | Data stored in account owned by programs | Data stored as resource under user account or object |
| **Storage Level** | Program level | Global when stored under object |
| **Storage Mindset** | User data stored distributedly under account | User data stored distributedly under object |
Expand All @@ -21,4 +21,4 @@ To learn more about the differences and similarities see [Aptos Learn](https://l
| **Dispatch Type** | Static dispatch | Static dispatch |
| **FT Standards** | Token program | [Coin](../smart-contracts/aptos-coin.mdx) (legacy) and [Fungible Asset Standard](../smart-contracts/fungible-asset.mdx) |
| **NFT Standards** | Token program | [Digital Asset Standard](../smart-contracts/digital-asset.mdx) |
| **Blockchain Interaction** | Solana web3.js library | [Aptos Typescript SDK](../sdks/ts-sdk.mdx) |
| **Blockchain Interaction** | Solana web3.js library | [Aptos Typescript SDK](../sdks/ts-sdk.mdx) |
2 changes: 1 addition & 1 deletion apps/nextra/pages/en/build/guides/your-first-nft.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ async def mint_token(

### Step 4.6: Reading token and collection metadata

Both the collection and token assets are [Objects](../smart-contracts/objects.mdx) on-chain with unique addresses. Their metadata is stored at the object address. The SDKs provide convenience wrappers around querying this data:
Both the collection and token assets are [Objects](../smart-contracts/move-objects.mdx) on-chain with unique addresses. Their metadata is stored at the object address. The SDKs provide convenience wrappers around querying this data:

<Tabs items={["TypeScript", "Python"]}>
<Tabs.Tab>
Expand Down
8 changes: 4 additions & 4 deletions apps/nextra/pages/en/build/smart-contracts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export async function getStaticProps() {

# Smart Contracts on Aptos

Aptos contracts are written using Move, a next generation language for secure, sandboxed, and formally verified programming which is used for multiple chains.
Aptos contracts are written using Move, a next generation language for secure, sandboxed, and formally verified programming which is used for multiple chains.
Move allows developers to write programs that flexibly manage and transfer assets while providing security and protections against attacks on those assets.

## 📖 Learn Move
Expand All @@ -31,7 +31,7 @@ Move allows developers to write programs that flexibly manage and transfer asset
<Card.Title>Create Package</Card.Title>
<Card.Description>Get started by learning how to create a Move package</Card.Description>
</Card>
<Card href="smart-contracts/objects">
<Card href="smart-contracts/move-objects">
<Card.Title>Objects</Card.Title>
<Card.Description>Learn how to use the Object standard on Aptos to create composable and flexible primitives on chain</Card.Description>
</Card>
Expand All @@ -56,8 +56,8 @@ Move allows developers to write programs that flexibly manage and transfer asset

Here is a `hello_blockchain` example of move

<RemoteCodeblock
permalink="https://github.com/aptos-labs/aptos-core/blob/77e1d222ebc5e7294e115e0d090c001da1d0e072/aptos-move/move-examples/hello_blockchain/sources/hello_blockchain.move#L1-L59"
<RemoteCodeblock
permalink="https://github.com/aptos-labs/aptos-core/blob/77e1d222ebc5e7294e115e0d090c001da1d0e072/aptos-move/move-examples/hello_blockchain/sources/hello_blockchain.move#L1-L59"
/>

## ⚒️ Developer Resources
Expand Down
5 changes: 2 additions & 3 deletions apps/nextra/pages/en/build/smart-contracts/_meta.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default {
type: "separator",
title: "Aptos Standards",
},
objects: {
object: {
title: "Object",
},
"digital-asset": {
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
Expand Up @@ -11,7 +11,7 @@ on Aptos provided by hippospace.

## Move Standards

### [Aptos Object](objects.mdx)
### [Aptos Object](move-objects.mdx)

The [Object model](https://github.com/aptos-labs/aptos-core/blob/main/aptos-move/framework/aptos-framework/sources/object.move)
allows Move to represent a complex type as a set of resources stored within a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: "Object Code Deployment"

# Object Code Deployment

This document goes through how you can deploy code to [Objects](objects.mdx). This is the recommended way to deploy code to the blockchain, as this reduces deployment complexity,
This document goes through how you can deploy code to [Objects](move-objects.mdx). This is the recommended way to deploy code to the blockchain, as this reduces deployment complexity,
and safely manages access control policies for the code owner. Note that in this context, code refers to [packages](book/packages.mdx).

Deploying code to objects will guarantee the following:
Expand Down
Loading
Loading