From 5cdbc84c61890b58b70295eb9bc7e4aa67b1d254 Mon Sep 17 00:00:00 2001 From: notV4l Date: Fri, 12 Jan 2024 14:47:55 +0100 Subject: [PATCH] use #[abi(embed_v0)] --- po/cn.po | 6 +++--- po/jp.po | 8 ++++---- po/ko.po | 8 ++++---- po/lt.po | 6 +++--- po/messages.pot | 4 ++-- po/vi.po | 8 ++++---- src/cairo/hello-dojo.md | 2 +- src/cairo/migration/0.3.0.md | 4 ++-- src/cairo/models.md | 2 +- src/cairo/overview.md | 2 +- src/cairo/systems.md | 4 ++-- src/tutorial/onchain-chess/1-action.md | 2 +- src/tutorial/onchain-chess/2-move.md | 2 +- 13 files changed, 29 insertions(+), 29 deletions(-) diff --git a/po/cn.po b/po/cn.po index 535d009c..dc01ec93 100644 --- a/po/cn.po +++ b/po/cn.po @@ -2346,8 +2346,8 @@ msgid "To implement the interface:" msgstr "执行接口:" #: src/cairo/migration/0.3.0.md:120 -msgid "Add `#[external(v0)]` before each method." -msgstr "在每个方法之前添加`#[external(v0)]`。" +msgid "Add `#[abi(embed_v0)]` before each method." +msgstr "在每个方法之前添加`#[abi(embed_v0)]`。" #: src/cairo/migration/0.3.0.md:121 msgid "" @@ -6343,7 +6343,7 @@ msgstr "" #: src/tutorial/onchain-chess/1-action.md:52 msgid "" "```shell\n" -" #[external(v0)]\n" +" #[abi(embed_v0)]\n" " impl PlayerActionsImpl of IActions {\n" " fn spawn_game(\n" " self: @ContractState, white_address: ContractAddress, black_address: ContractAddress\n" diff --git a/po/jp.po b/po/jp.po index 05905d05..243fca9a 100644 --- a/po/jp.po +++ b/po/jp.po @@ -2413,8 +2413,8 @@ msgid "To implement the interface:" msgstr "インターフェースを実装するには:" #: src/cairo/migration/0.3.0.md:120 -msgid "Add `#[external(v0)]` before each method." -msgstr "各メソッドの前に `#[external(v0)]` を追加してください。" +msgid "Add `#[abi(embed_v0)]` before each method." +msgstr "各メソッドの前に `#[abi(embed_v0)]` を追加してください。" #: src/cairo/migration/0.3.0.md:121 msgid "" @@ -6492,7 +6492,7 @@ msgstr "" #: src/tutorial/onchain-chess/1-action.md:52 msgid "" "```shell\n" -" #[external(v0)]\n" +" #[abi(embed_v0)]\n" " impl PlayerActionsImpl of IActions {\n" " fn spawn_game(\n" " self: @ContractState, white_address: ContractAddress, black_address: ContractAddress\n" @@ -6526,7 +6526,7 @@ msgid "" "```" msgstr "" "```shell\n" -" #[external(v0)]\n" +" #[abi(embed_v0)]\n" " impl PlayerActionsImpl of IActions {\n" " fn spawn_game(\n" " self: @ContractState, white_address: ContractAddress, black_address: ContractAddress\n" diff --git a/po/ko.po b/po/ko.po index 1f63b4b0..9e1f13cd 100644 --- a/po/ko.po +++ b/po/ko.po @@ -2511,8 +2511,8 @@ msgid "To implement the interface:" msgstr "인터페이스를 구현하려면:" #: src/cairo/migration/0.3.0.md:120 -msgid "Add `#[external(v0)]` before each method." -msgstr "각 메소드 앞에 `#[external(v0)]`을 추가하십시오." +msgid "Add `#[abi(embed_v0)]` before each method." +msgstr "각 메소드 앞에 `#[abi(embed_v0)]`을 추가하십시오." #: src/cairo/migration/0.3.0.md:121 msgid "" @@ -6645,7 +6645,7 @@ msgstr "" #: src/tutorial/onchain-chess/1-action.md:52 msgid "" "```shell\n" -" #[external(v0)]\n" +" #[abi(embed_v0)]\n" " impl PlayerActionsImpl of IActions {\n" " fn spawn_game(\n" " self: @ContractState, white_address: ContractAddress, black_address: ContractAddress\n" @@ -6679,7 +6679,7 @@ msgid "" "```" msgstr "" "```shell\n" -"#[external(v0)]\n" +"#[abi(embed_v0)]\n" "impl PlayerActionsImpl of IActions {\n" " fn spawn_game(\n" " self: @ContractState, white_address: ContractAddress, black_address: ContractAddress\n" diff --git a/po/lt.po b/po/lt.po index 4af572b4..25d734c7 100644 --- a/po/lt.po +++ b/po/lt.po @@ -2705,8 +2705,8 @@ msgid "To implement the interface:" msgstr "Ad implementandum interfaciem:" #: src/cairo/migration/0.3.0.md:120 -msgid "Add `#[external(v0)]` before each method." -msgstr "Adde `#[external(v0)]` ante quamque methodum." +msgid "Add `#[abi(embed_v0)]` before each method." +msgstr "Adde `#[abi(embed_v0)]` ante quamque methodum." #: src/cairo/migration/0.3.0.md:121 msgid "" @@ -7095,7 +7095,7 @@ msgstr "" #: src/tutorial/onchain-chess/1-action.md:52 msgid "" "```shell\n" -" #[external(v0)]\n" +" #[abi(embed_v0)]\n" " impl PlayerActionsImpl of IActions {\n" " fn spawn_game(\n" " self: @ContractState, white_address: ContractAddress, black_address: ContractAddress\n" diff --git a/po/messages.pot b/po/messages.pot index e1faa9af..fa73a39b 100644 --- a/po/messages.pot +++ b/po/messages.pot @@ -2139,7 +2139,7 @@ msgid "To implement the interface:" msgstr "" #: src/cairo/migration/0.3.0.md:120 -msgid "Add `#[external(v0)]` before each method." +msgid "Add `#[abi(embed_v0)]` before each method." msgstr "" #: src/cairo/migration/0.3.0.md:121 @@ -5698,7 +5698,7 @@ msgstr "" #: src/tutorial/onchain-chess/1-action.md:52 msgid "" "```shell\n" -" #[external(v0)]\n" +" #[abi(embed_v0)]\n" " impl PlayerActionsImpl of IActions {\n" " fn spawn_game(\n" " self: @ContractState, white_address: ContractAddress, " diff --git a/po/vi.po b/po/vi.po index ee29ac70..7d0ddde1 100644 --- a/po/vi.po +++ b/po/vi.po @@ -2743,8 +2743,8 @@ msgid "To implement the interface:" msgstr "Để thực hiện giao diện:" #: src/cairo/migration/0.3.0.md:120 -msgid "Add `#[external(v0)]` before each method." -msgstr "Thêm `#[external(v0)]` trước mỗi phương thức." +msgid "Add `#[abi(embed_v0)]` before each method." +msgstr "Thêm `#[abi(embed_v0)]` trước mỗi phương thức." #: src/cairo/migration/0.3.0.md:121 msgid "" @@ -7179,7 +7179,7 @@ msgstr "" #: src/tutorial/onchain-chess/1-action.md:52 msgid "" "```shell\n" -" #[external(v0)]\n" +" #[abi(embed_v0)]\n" " impl PlayerActionsImpl of IActions {\n" " fn spawn_game(\n" " self: @ContractState, white_address: ContractAddress, black_address: ContractAddress\n" @@ -7213,7 +7213,7 @@ msgid "" "```" msgstr "" "```shell\n" -"#[external(v0)]\n" +"#[abi(embed_v0)]\n" "impl PlayerActionsImpl of IActions {\n" " fn spawn_game(\n" " self: @ContractState, white_address: ContractAddress, black_address: ContractAddress\n" diff --git a/src/cairo/hello-dojo.md b/src/cairo/hello-dojo.md index 32a63b88..299c0bcd 100644 --- a/src/cairo/hello-dojo.md +++ b/src/cairo/hello-dojo.md @@ -118,7 +118,7 @@ mod actions { // impl: implement functions specified in trait - #[external(v0)] + #[abi(embed_v0)] impl ActionsImpl of IActions { // ContractState is defined by system decorator expansion fn spawn(self: @ContractState) { diff --git a/src/cairo/migration/0.3.0.md b/src/cairo/migration/0.3.0.md index 7a51863d..b9848407 100644 --- a/src/cairo/migration/0.3.0.md +++ b/src/cairo/migration/0.3.0.md @@ -117,11 +117,11 @@ Ensure the trait is typed with `TContractState`. To implement the interface: -1. Add `#[external(v0)]` before each method. +1. Add `#[abi(embed_v0)]` before each method. 2. Ensure to reference the created interface in the module with `use super::ICreateCard;`. ```rust,ignore -#[external(v0)] +#[abi(embed_v0)] impl CreateCardImpl of ICreateCard { fn create_card( self: @ContractState, diff --git a/src/cairo/models.md b/src/cairo/models.md index e1a22c93..d83ee886 100644 --- a/src/cairo/models.md +++ b/src/cairo/models.md @@ -230,7 +230,7 @@ mod spawnHuman { const COUNTER_ID: u32 = 9999999999999; // impl: implement functions specified in trait - #[external(v0)] + #[abi(embed_v0)] impl GoblinActionsImpl of IGoblinActions { fn goblin_actions(self: @ContractState, entity_id: u32) { let world = self.world_dispatcher.read(); diff --git a/src/cairo/overview.md b/src/cairo/overview.md index 8daeedfe..d56ae1db 100644 --- a/src/cairo/overview.md +++ b/src/cairo/overview.md @@ -54,7 +54,7 @@ mod player_actions { use super::{Position, Vec2}; use super::IPlayerActions; - #[external(v0)] + #[abi(embed_v0)] impl PlayerActionsImpl of IPlayerActions { // // This is how we interact with the world contract. diff --git a/src/cairo/systems.md b/src/cairo/systems.md index f8962296..817b0fcd 100644 --- a/src/cairo/systems.md +++ b/src/cairo/systems.md @@ -46,7 +46,7 @@ mod player_actions { struct Storage {} // implementation of the PlayerActions interface - #[external(v0)] + #[abi(embed_v0)] impl PlayerActionsImpl of IPlayerActions { fn spawn(self: @ContractState, world: IWorldDispatcher) { let player = get_caller_address(); @@ -103,7 +103,7 @@ mod player_actions { } // impl: implement functions specified in trait - #[external(v0)] + #[abi(embed_v0)] impl PlayerActionsImpl of IPlayerActions { // ContractState is defined by system decorator expansion fn spawn(self: @ContractState) { diff --git a/src/tutorial/onchain-chess/1-action.md b/src/tutorial/onchain-chess/1-action.md index 2b78107e..ec167446 100644 --- a/src/tutorial/onchain-chess/1-action.md +++ b/src/tutorial/onchain-chess/1-action.md @@ -48,7 +48,7 @@ Should be noted that `actions` is the contract name. 3. Write a `spawn` function that accepts the `white address`, and `black address` as input and set necessary states using `set!(...)`. Implement the `player` entity from player model. Implement the game entity, comprised of the `Game` model and `GameTurn` model we created in the `game.cairo` and implement the piece entities from a1 to h8 containing the correct `PieceType` in the `spawn` fn. ```rust,ignore - #[external(v0)] + #[abi(embed_v0)] impl IActionsImpl of IActions { fn spawn( self: @ContractState, white_address: ContractAddress, black_address: ContractAddress diff --git a/src/tutorial/onchain-chess/2-move.md b/src/tutorial/onchain-chess/2-move.md index 37f9716c..944c4b08 100644 --- a/src/tutorial/onchain-chess/2-move.md +++ b/src/tutorial/onchain-chess/2-move.md @@ -3,7 +3,7 @@ 1. Write a `move` function that accepts the `current position`, `next position`, `caller address`, and `game_id`. The `move` function should look like this: ```c - #[external(v0)] + #[abi(embed_v0)] impl PlayerActionsImpl of IActions { fn spawn( self: @ContractState, white_address: ContractAddress, black_address: ContractAddress