Skip to content

Commit

Permalink
Merge pull request #1263 from casper-network/feat-1.5.0
Browse files Browse the repository at this point in the history
Updating Documentation with 1.5 Features
  • Loading branch information
ACStone-MTS authored Aug 29, 2023
2 parents 86ef606 + 73f7cd2 commit e1e5d51
Show file tree
Hide file tree
Showing 26 changed files with 2,249 additions and 94 deletions.
11 changes: 10 additions & 1 deletion config/sidebar.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ module.exports = {
"concepts/deploy-and-deploy-lifecycle",
"concepts/global-state",
"concepts/smart-contracts",
"concepts/list-auth-keys",
"concepts/callstack",
"concepts/dictionaries",
"concepts/serialization-standard",
Expand Down Expand Up @@ -164,6 +165,7 @@ module.exports = {
"developers/dapps/technology-stack",
"developers/dapps/template-frontend",
"developers/dapps/signing-a-deploy",
"developers/dapps/speculative-exec",
"developers/dapps/setup-nctl",
"developers/dapps/nctl-test",
//"developers/dapps/signer-integration",
Expand Down Expand Up @@ -197,6 +199,7 @@ module.exports = {
],
},
"developers/cli/delegate",
"developers/cli/redelegate",
"developers/cli/undelegate",
"developers/cli/sending-deploys",
"developers/cli/installing-contracts",
Expand Down Expand Up @@ -253,7 +256,12 @@ module.exports = {
type: "doc",
id: "operators/setup-network/index",
},
items: ["operators/setup-network/chain-spec", "operators/setup-network/create-private", "operators/setup-network/staging-files-for-new-network"],
items: [
"operators/setup-network/genesis",
"operators/setup-network/chain-spec",
"operators/setup-network/create-private",
"operators/setup-network/staging-files-for-new-network",
],
},
{
type: "category",
Expand Down Expand Up @@ -342,6 +350,7 @@ module.exports = {
],
},
"resources/advanced/return-values-tutorial",
"resources/advanced/list-auth-keys-tutorial",
"resources/advanced/transfer-token-to-contract",
"resources/advanced/storage-workflow",
"resources/advanced/cross-contract",
Expand Down
8 changes: 4 additions & 4 deletions source/docs/casper/concepts/callstack.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ When the session code within a Deploy interacts with one or more contracts, this

## The Caller

In every instance of a call stack, the originating caller is the session code within the account's context that began the interaction. Contract code cannot spontaneously act without session code to activate it. As such, the session code represents the *zeroth* entity in each call stack.
In every instance of a call stack, the originating caller is the session code within the account's context that began the interaction. Contract code cannot spontaneously act without session code to activate it. As such, the session code represents the *zeroth* entity in each call stack. The account that initiated the deploy can be retrieved with the [contract_api::runtime::get_caller](https://docs.rs/casper-contract/3.0.0/casper_contract/contract_api/runtime/fn.get_caller.html) function.

## The Immediate Caller
## The Call Stack

The [immediate caller](https://docs.rs/casper-types/1.5.0/casper_types/system/mint/trait.RuntimeProvider.html#tymethod.get_immediate_caller) is the caller that interacted directly with the contract in question.
Developers can access the call stack with the [contract_api::runtime::get_call_stack](https://docs.rs/casper-contract/3.0.0/casper_contract/contract_api/runtime/fn.get_call_stack.html) function.

If session code calls a contract, which in turn calls another contract, then the session code would represent the *zeroth* entity in the stack, the contract called by the initiating session code would be the *first* and the contract called by the first contract would be the *second*.

In this example, the first contract would be the `immediate caller` of the second contract. The session code would remain the `caller`.
In this example, the first contract would be the `immediate caller` of the second contract, meaning it interacted directly with it. The session code would remain the `caller`.

<img class="align-center" src={useBaseUrl("/image/callstack.png")} width="450" alt="Call Stack" />

Expand Down
2 changes: 1 addition & 1 deletion source/docs/casper/concepts/design/casper-design.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ A Wasm module is not natively able to create any effects outside of reading or w

![Casper Network Runtime](/image/design/casper-runtime.png)

All these features are accessible via functions in the [Casper External FFI](https://docs.rs/casper-contract/1.4.4/casper_contract/ext_ffi/index.html).
All these features are accessible via functions in the [Casper External FFI](https://docs.rs/casper-contract/latest/casper_contract/ext_ffi/index.html).

#### Generating `URef`s {#execution-semantics-urefs}

Expand Down
Loading

0 comments on commit e1e5d51

Please sign in to comment.