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/guides/interfaces-and-dispatchers.mdx
+6-5Lines changed: 6 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,8 +8,8 @@ Interfaces can be found in the `openzeppelin_interfaces` package modules, such a
8
8
9
9
<Callout>
10
10
Starting from version `3.x.x`, OpenZeppelin Contracts for Cairo interfaces have been separated from their implementation modules into a dedicated package.
11
+
This architectural change brings several important benefits. Check the [Interfaces module](../interfaces) section for more information.
11
12
</Callout>
12
-
This architectural change brings several important benefits. Check the [Interfaces](interfaces) section for more information.
13
13
14
14
For example:
15
15
@@ -57,8 +57,9 @@ the ERC20 preset that includes functions from different standards such as `IERC2
57
57
58
58
<Callout>
59
59
The library offers an ABI trait for most components, providing all external function signatures
60
+
even when most of the time all of them don’t need to be implemented at the same time. This can be helpful when interacting with
61
+
a contract implementing the component, instead of defining a new dispatcher.
60
62
</Callout>
61
-
even when most of the time all of them don’t need to be implemented at the same time. This can be helpful when interacting with a contract implementing the component, instead of defining a new dispatcher.
62
63
63
64
```rust
64
65
#[starknet::interface]
@@ -100,16 +101,16 @@ Other types of dispatchers are also auto-generated from the annotated trait. See
100
101
101
102
<Callout>
102
103
In the example, the `IERC20Dispatcher` is the one used to interact with contracts, but the
103
-
</Callout>
104
104
`IERC20DispatcherTrait` needs to be in scope for the functions to be available.
105
+
</Callout>
105
106
106
107
## Dual interfaces
107
108
108
109
<Callouttype='warn'>
109
-
`camelCase` functions are deprecated and maintained only for Backwards Compatibility.
110
-
</Callout>
110
+
The `camelCase` functions are deprecated and maintained only for backwards compatibility.
111
111
It’s recommended to only use `snake_case` interfaces with contracts and components. The `camelCase` functions will be removed in
112
112
future versions.
113
+
</Callout>
113
114
114
115
Following the [Great Interface Migration](https://community.starknet.io/t/the-great-interface-migration/92107) plan, we added `snake_case` functions to all of our preexisting `camelCase` contracts with the goal of eventually dropping support for the latter.
0 commit comments