Skip to content

Commit

Permalink
update usages from link checker
Browse files Browse the repository at this point in the history
  • Loading branch information
igor-p committed Oct 25, 2024
1 parent 2d5306f commit 197e84e
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion apps/nextra/next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -1760,7 +1760,7 @@ export default withBundleAnalyzer(
source: "/en/build/smart-contracts/object",
destination: "/en/build/smart-contracts/move-objects",
permanent: true,
}
},
],
}),
);
2 changes: 1 addition & 1 deletion 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",
},
"object": {
object: {
title: "Object",
},
"digital-asset": {
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
2 changes: 1 addition & 1 deletion apps/nextra/pages/en/build/smart-contracts/deployment.mdx
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
4 changes: 2 additions & 2 deletions apps/nextra/pages/en/build/smart-contracts/digital-asset.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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. |

Expand Down Expand Up @@ -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};
Expand Down
6 changes: 3 additions & 3 deletions apps/nextra/pages/en/build/smart-contracts/fungible-asset.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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).

Expand All @@ -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)
Expand All @@ -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.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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.
> We will be providing more functionality in the future, to allow for more complex code to be able to be safe against undergasing attacks.
4 changes: 2 additions & 2 deletions apps/nextra/pages/en/build/smart-contracts/tokens.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 197e84e

Please sign in to comment.