From 197e84ed3833c956ec0e942086cddb63a128170b Mon Sep 17 00:00:00 2001 From: Igor Pokryshevskiy Date: Fri, 25 Oct 2024 15:25:02 -0400 Subject: [PATCH] update usages from link checker --- apps/nextra/next.config.mjs | 2 +- apps/nextra/pages/en/build/smart-contracts/_meta.tsx | 2 +- .../pages/en/build/smart-contracts/aptos-standards.mdx | 2 +- apps/nextra/pages/en/build/smart-contracts/deployment.mdx | 2 +- .../nextra/pages/en/build/smart-contracts/digital-asset.mdx | 4 ++-- .../pages/en/build/smart-contracts/fungible-asset.mdx | 6 +++--- apps/nextra/pages/en/build/smart-contracts/move-objects.mdx | 2 +- .../en/build/smart-contracts/move-security-guidelines.mdx | 6 +++--- apps/nextra/pages/en/build/smart-contracts/tokens.mdx | 4 ++-- 9 files changed, 15 insertions(+), 15 deletions(-) diff --git a/apps/nextra/next.config.mjs b/apps/nextra/next.config.mjs index d577d6642..0c91b17a9 100644 --- a/apps/nextra/next.config.mjs +++ b/apps/nextra/next.config.mjs @@ -1760,7 +1760,7 @@ export default withBundleAnalyzer( source: "/en/build/smart-contracts/object", destination: "/en/build/smart-contracts/move-objects", permanent: true, - } + }, ], }), ); diff --git a/apps/nextra/pages/en/build/smart-contracts/_meta.tsx b/apps/nextra/pages/en/build/smart-contracts/_meta.tsx index 0604bcd2e..47314fe19 100644 --- a/apps/nextra/pages/en/build/smart-contracts/_meta.tsx +++ b/apps/nextra/pages/en/build/smart-contracts/_meta.tsx @@ -23,7 +23,7 @@ export default { type: "separator", title: "Aptos Standards", }, - "object": { + object: { title: "Object", }, "digital-asset": { diff --git a/apps/nextra/pages/en/build/smart-contracts/aptos-standards.mdx b/apps/nextra/pages/en/build/smart-contracts/aptos-standards.mdx index cdceb9854..6b5da9ea3 100644 --- a/apps/nextra/pages/en/build/smart-contracts/aptos-standards.mdx +++ b/apps/nextra/pages/en/build/smart-contracts/aptos-standards.mdx @@ -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 diff --git a/apps/nextra/pages/en/build/smart-contracts/deployment.mdx b/apps/nextra/pages/en/build/smart-contracts/deployment.mdx index 0868998df..2f99b5629 100644 --- a/apps/nextra/pages/en/build/smart-contracts/deployment.mdx +++ b/apps/nextra/pages/en/build/smart-contracts/deployment.mdx @@ -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: diff --git a/apps/nextra/pages/en/build/smart-contracts/digital-asset.mdx b/apps/nextra/pages/en/build/smart-contracts/digital-asset.mdx index 55c2f290f..a623fad40 100644 --- a/apps/nextra/pages/en/build/smart-contracts/digital-asset.mdx +++ b/apps/nextra/pages/en/build/smart-contracts/digital-asset.mdx @@ -13,7 +13,7 @@ This standard replaces the legacy [Aptos Token Standard](aptos-token.mdx). The m | **Improvement** | **Description** | |-----------------|-----------------| -| **Token Extension** | Tokens can be easily extended since they are implemented using Move [Objects](objects.mdx). | +| **Token Extension** | Tokens can be easily extended since they are implemented using Move [Objects](move-objects.mdx). | | **Direct NFT Transfer** | You can now directly transfer NFTs without the recipient “opting-in” on-chain. | | **NFT Composability** | NFTs can own other NFTs for easy composability. | @@ -102,7 +102,7 @@ A `Collection`'s maximum supply cannot be changed after creation. ### Customizing a `Collection` -Since each `Collection` is a [Move Object](objects.mdx), you can customize it by generating permissions called `Ref`s. Each `Ref` allows you to modify an aspect of the Object later on. Beyond the normal [Object Refs](object/creating-objects.mdx), `Collection`s can also get a `MutatorRef` by calling `get_mutator_ref` like so: +Since each `Collection` is a [Move Object](move-objects.mdx), you can customize it by generating permissions called `Ref`s. Each `Ref` allows you to modify an aspect of the Object later on. Beyond the normal [Object Refs](object/creating-objects.mdx), `Collection`s can also get a `MutatorRef` by calling `get_mutator_ref` like so: ```move filename="example.move" use std::option::{Self, Option}; diff --git a/apps/nextra/pages/en/build/smart-contracts/fungible-asset.mdx b/apps/nextra/pages/en/build/smart-contracts/fungible-asset.mdx index 53c6faa92..3d9d82909 100644 --- a/apps/nextra/pages/en/build/smart-contracts/fungible-asset.mdx +++ b/apps/nextra/pages/en/build/smart-contracts/fungible-asset.mdx @@ -10,7 +10,7 @@ import { ThemedImage } from "@components/index"; The Aptos Fungible Asset Standard (also known as “Fungible Asset” or “FA”) provides a standard, type-safe way to define fungible assets in the Move ecosystem. It is a modern replacement for the `coin` module that allows for seamless minting, transfer, and customization of fungible assets for any use case. -This standard is important because it allows fungible assets on Aptos (such as Currencies and Real World Assets (RWAs)) to represent and transfer ownership in a consistent way dApps can recognize. This standard also allows for more extensive customization than the `coin` module did by leveraging [Move Objects](objects.mdx) to represent fungible asset data. +This standard is important because it allows fungible assets on Aptos (such as Currencies and Real World Assets (RWAs)) to represent and transfer ownership in a consistent way dApps can recognize. This standard also allows for more extensive customization than the `coin` module did by leveraging [Move Objects](move-objects.mdx) to represent fungible asset data. The FA standard provides all the functionality you need to create, mint, transfer, and burn fungible assets (as well as automatically allowing recipients of the fungible asset to store and manage any fungible assets they receive). @@ -29,7 +29,7 @@ sources={{ }} /> -[This implementation](https://github.com/aptos-labs/aptos-core/blob/main/aptos-move/framework/aptos-framework/sources/fungible_asset.move) is an improvement on the `coin` Standard because Move Objects are more customizable and extensible via smart contract. See the advanced guides on writing [Move Objects](objects.mdx) for more details. +[This implementation](https://github.com/aptos-labs/aptos-core/blob/main/aptos-move/framework/aptos-framework/sources/fungible_asset.move) is an improvement on the `coin` Standard because Move Objects are more customizable and extensible via smart contract. See the advanced guides on writing [Move Objects](move-objects.mdx) for more details. The FA standard also automatically handles tracking how much of a fungible asset an account owns, as opposed to requiring the recipient to register a `CoinStore` resource separate from the transfer. ## Creating a new Fungible Asset (FA) @@ -40,7 +40,7 @@ At a high level, this is done by: 2. Generating `Ref`s to enable any desired permissions. 3. Minting Fungible Assets and transferring them to any account you want to. -To start with, the Fungible Asset standard is implemented using Move Objects. Objects by default are transferable, can own multiple resources, and can be customized via smart contract. For full details on Objects and how they work, please read [this guide](objects.mdx). +To start with, the Fungible Asset standard is implemented using Move Objects. Objects by default are transferable, can own multiple resources, and can be customized via smart contract. For full details on Objects and how they work, please read [this guide](move-objects.mdx). To create an FA, first you need to create a **non-deletable Object** since destroying the metadata for a Fungible Asset while there are active balances would not make sense. You can do that by either calling `object::create_named_object(caller_address, NAME)` or `object::create_sticky_object(caller_address)` to create the Object on-chain. diff --git a/apps/nextra/pages/en/build/smart-contracts/move-objects.mdx b/apps/nextra/pages/en/build/smart-contracts/move-objects.mdx index 624fed7c1..b2e72574b 100644 --- a/apps/nextra/pages/en/build/smart-contracts/move-objects.mdx +++ b/apps/nextra/pages/en/build/smart-contracts/move-objects.mdx @@ -53,7 +53,7 @@ For example, you could use an Object to represent a soulbound NFT by making it o ## Learn how to - [Create and configure a new Object.](object/creating-objects.mdx) -- [Use Objects you created.](objects/using-objects.mdx) +- [Use Objects you created.](object/using-objects.mdx) ## Examples with Object contracts diff --git a/apps/nextra/pages/en/build/smart-contracts/move-security-guidelines.mdx b/apps/nextra/pages/en/build/smart-contracts/move-security-guidelines.mdx index 08b70b0e4..fa03ce22b 100644 --- a/apps/nextra/pages/en/build/smart-contracts/move-security-guidelines.mdx +++ b/apps/nextra/pages/en/build/smart-contracts/move-security-guidelines.mdx @@ -437,7 +437,7 @@ Bad operations could unexpectedly alter the correct execution of the smart contr ### ConstructorRef leak -When creating objects ensure to never expose the object’s `ConstructorRef` as it allows adding resources to an object. A `ConstructorRef` can also be used to generate other capabilities (or "Refs") that are used to alter or transfer the ownership the object. [Read more](objects/creating-objects.mdx) about Objects capabilities. +When creating objects ensure to never expose the object’s `ConstructorRef` as it allows adding resources to an object. A `ConstructorRef` can also be used to generate other capabilities (or "Refs") that are used to alter or transfer the ownership the object. [Read more](object/creating-objects.mdx) about Objects capabilities. #### Example Vulnerable code @@ -490,7 +490,7 @@ However, objects should be isolated to different account, otherwise modification For example, transferring one resource implies the transfer of all group members, since the transfer function operates on `ObjectCore`, which is essentially a general tag for all resources at the account. -[Read more](objects.mdx) about Aptos Objects. +[Read more](move-objects.mdx) about Aptos Objects. #### Example Insecure Code @@ -827,4 +827,4 @@ There are different ways to secure the code: 2. Allow only admin addresses to invoke the randomness API. 3. Ensure entry functions work regardless of random outcomes. This can be handled by committing the random result, then using the random result to provide the action in a different transaction. Avoid immediate actions based on randomness for consistent gas use. -> We will be providing more functionality in the future, to allow for more complex code to be able to be safe against undergasing attacks. \ No newline at end of file +> We will be providing more functionality in the future, to allow for more complex code to be able to be safe against undergasing attacks. diff --git a/apps/nextra/pages/en/build/smart-contracts/tokens.mdx b/apps/nextra/pages/en/build/smart-contracts/tokens.mdx index fbb8ed706..9a7ee281d 100644 --- a/apps/nextra/pages/en/build/smart-contracts/tokens.mdx +++ b/apps/nextra/pages/en/build/smart-contracts/tokens.mdx @@ -9,7 +9,7 @@ canonical Non-fungible Token on Aptos. Aptos leverages composability to extend the digital asset standard with features like fungibility via the [Fungible Asset standard](fungible-asset.mdx). The concept of composability comes from the underlying data model for these constructs: -the [Move object](objects.mdx) data model. +the [Move object](move-objects.mdx) data model. The rest of this document discusses how the Aptos token standards compare to the standards on Ethereum and Solana. @@ -52,7 +52,7 @@ and data. Unlike Ethereum, the associated data of a smart contract is distributed across the space of all accounts in [resources](../../network/blockchain/resources.mdx) within [accounts](../../network/blockchain/accounts.mdx) -or [objects](objects.mdx). For example, a collection and an +or [objects](move-objects.mdx). For example, a collection and an NFT within that collection are stored in distinct objects at different addresses with the smart contract defining them at another address. A smart contract developer could also store data associated with the NFT and collection at the