You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/contracts-cairo/components.mdx
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -131,9 +131,9 @@ By adding the embed attribute, `is_initialized` becomes a contract entrypoint fo
131
131
132
132
133
133
Embeddable implementations, when available in this library’s components, are segregated from the internal component implementation which makes it easier to safely expose.
134
-
Components also separate granular implementations from [mixin](/components#mixins) implementations.
134
+
Components also separate granular implementations from [mixin](/contracts-cairo/components#mixins) implementations.
135
135
The API documentation design reflects these groupings.
136
-
See [ERC20Component](/api/erc20#ERC20Component) as an example which includes:
136
+
See [ERC20Component](/contracts-cairo/api/erc20#erc20component) as an example which includes:
137
137
138
138
***Embeddable Mixin Implementation**
139
139
***Embeddable Implementations**
@@ -238,7 +238,7 @@ Always read the API documentation for each integrated component.
238
238
Some components require some sort of setup upon construction.
239
239
Usually, this would be a job for a constructor; however, components themselves cannot implement constructors.
240
240
Components instead offer ``initializer``s within their `InternalImpl` to call from the contract’s constructor.
241
-
Let’s look at how a contract would integrate [OwnableComponent](/api/access#OwnableComponent):
241
+
Let’s look at how a contract would integrate [OwnableComponent](/contracts-cairo/api/access#ownablecomponent):
242
242
243
243
```rust
244
244
#[starknet::contract]
@@ -283,7 +283,7 @@ constants declared in the component, customizing its functionality.
283
283
The Immutable Component Config standard is defined in the SRC-107.
284
284
</Callout>
285
285
286
-
Here’s an example of how to use the Immutable Component Config pattern with the [ERC2981Component](/api/token_common#ERC2981Component):
286
+
Here’s an example of how to use the Immutable Component Config pattern with the [ERC2981Component](/contracts-cairo/api/token_common#erc2981component):
287
287
288
288
```rust
289
289
#[starknet::contract]
@@ -391,7 +391,7 @@ on how to use this function, refer to the [validate section of the SRC-107](http
391
391
392
392
Some components include dependencies of other components.
393
393
Contracts that integrate components with dependencies must also include the component dependency.
394
-
For instance, [AccessControlComponent](/api/access#AccessControlComponent) depends on [SRC5Component](/api/introspection#SRC5Component).
394
+
For instance, [AccessControlComponent](/contracts-cairo/api/access#accesscontrolcomponent) depends on [SRC5Component](/contracts-cairo/api/introspection#src5component).
395
395
Creating a contract with `AccessControlComponent` should look like this:
396
396
397
397
```rust
@@ -563,7 +563,7 @@ mod ERC20Pausable {
563
563
The first thing to notice is that the contract imports the interfaces of the implementations that will be customized.
564
564
These will be used in the next code example.
565
565
566
-
Next, the contract includes the [ERC20Component](/api/erc20#ERC20Component) implementations; however, `ERC20Impl` and `ERC20CamelOnlyImpl` are **not** embedded.
566
+
Next, the contract includes the [ERC20Component](/contracts-cairo/api/erc20#erc20component) implementations; however, `ERC20Impl` and `ERC20CamelOnlyImpl` are **not** embedded.
567
567
Instead, we want to expose our custom implementation of an interface.
568
568
The following example shows the pausable logic integrated into the ERC20 implementations:
0 commit comments