diff --git a/docs/build/sails/sails.mdx b/docs/build/sails/sails.mdx index a9e35dc..0cecc19 100644 --- a/docs/build/sails/sails.mdx +++ b/docs/build/sails/sails.mdx @@ -14,7 +14,7 @@ file for the application, which outlines data types, services, constructors, and This IDL file can then be used to automatically generate client code in Rust and TypeScript, facilitating seamless interaction with the application. :::important -🔥 Try out our new interactive [Sails tutorial](https://sails-tutorials.vara.network/hello-world/hello-world). +🔥 Try out the new interactive [Sails tutorial](https://sails-tutorials.vara.network/hello-world/hello-world). ::: ## Development Workflow diff --git a/docs/examples/Infra/proxy.md b/docs/examples/Infra/proxy.md index 7036bf4..9f906bc 100644 --- a/docs/examples/Infra/proxy.md +++ b/docs/examples/Infra/proxy.md @@ -1,5 +1,5 @@ --- -sidebar_label: Programs Update (Proxy) +sidebar_label: Upgrade Proxy sidebar_position: 7 --- @@ -11,9 +11,9 @@ A program uploaded to the blockchain from specific source code represents a uniq Programs often require updates to add new functionality or fix errors, making the ability to update a program’s business logic essential. Updating a program involves modifying the on-chain program in a way that avoids mandatory updates to other components or dependencies, such as the frontend, backend, external links, and more. -**Proxy programs** are a well-known design pattern in blockchain development that address upgrade challenges. This approach enables the delegation of function calls to a separate logic program. The pattern separates business logic from the program’s state and address, allowing upgrades or modifications to the logic without affecting the existing state or deployed address. +**Upgrade Proxy programs** are a well-known design pattern in blockchain development that address upgrade challenges. This approach enables the delegation of function calls to a separate logic program. The pattern separates business logic from the program’s state and address, allowing upgrades or modifications to the logic without affecting the existing state or deployed address. -This [example](https://github.com/gear-foundation/dapps/tree/master/contracts/proxy-example) demonstrates a practical implementation of a proxy program designed to forward user interactions to a logic program. The proxy handles two primary responsibilities: +This [example](https://github.com/gear-foundation/dapps/tree/master/contracts/upgrade-proxy) demonstrates a practical implementation of an upgrade proxy program designed to forward user interactions to a logic program. The upgrade proxy handles two primary responsibilities: 1. Forwarding state-modifying messages while preserving the original sender's address. 2. Handling state queries to retrieve data from the logic program. @@ -53,8 +53,8 @@ pub async fn read_state(&self, bytes: Vec) -> Vec { .expect("Error during getting the reply") } ``` -### Logic Program Upgrades -The proxy includes an `update_logic` function that allows the admin to change the logic program address. +### Program's Logic Upgrade +The upgrade proxy includes an `update_logic` function that allows the admin to change the logic program address. ```rust title="proxy-example/proxy/app/src/lib.rs" pub fn update_logic(&mut self, new_logic_address: ActorId, msg_source: Option) { self.check_if_proxy(); @@ -68,7 +68,7 @@ pub fn update_logic(&mut self, new_logic_address: ActorId, msg_source: Option