From 5a595cfe8b3e952543091b70fe0dc66574e1d7fd Mon Sep 17 00:00:00 2001 From: Andrei Marinica Date: Mon, 2 Oct 2023 11:30:04 +0300 Subject: [PATCH] contract calls - endpoint rename --- docs/developers/developer-reference/sc-contract-calls.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/developers/developer-reference/sc-contract-calls.md b/docs/developers/developer-reference/sc-contract-calls.md index dd01c36cf..3795805ac 100644 --- a/docs/developers/developer-reference/sc-contract-calls.md +++ b/docs/developers/developer-reference/sc-contract-calls.md @@ -88,7 +88,7 @@ If you use the [rust-analyser VSCode extension](https://marketplace.visualstudio Once you've imported the contract and any external modules it might use, you have to declare a proxy creator function in the contract: ```rust #[proxy] -fn callee_contract_proxy(&self, sc_address: ManagedAddress) -> contract_namespace::Proxy; +fn callee_contract_proxy(&self, callee_sc_address: ManagedAddress) -> contract_namespace::Proxy; ``` This function doesn't do much, it just tries to sort out the proxy trait imports, and neatly initializes the proxy for you. @@ -98,7 +98,7 @@ This function creates an object that contains all the endpoints of the callee co Let's say you have the following endpoint in the contract you wish to call: ```rust -#[endpoint(myEndpoint)] +#[endpoint(caleeEndpoint)] fn callee_endpoint(&self, arg: BigUint) -> BigUint { // implementation } @@ -138,7 +138,7 @@ mod callee_proxy { #[multiversx_sc::proxy] pub trait CalleeContract { #[payable("*")] - #[endpoint(myEndpoint)] + #[endpoint(myPayableEndpoint)] fn my_payable_endpoint(&self, arg: BigUint) -> BigUint; } } @@ -214,7 +214,7 @@ Let's assume we want to call a `#[payable]` endpoint, with this definition: ```rust #[payable("*")] -#[endpoint(myEndpoint)] +#[endpoint(myPayableEndpoint)] fn my_payable_endpoint(&self, arg: BigUint) -> BigUint { let payment = self.call_value().any_payment(); // ...