Skip to content

Commit

Permalink
Minor edits
Browse files Browse the repository at this point in the history
  • Loading branch information
ipopescu committed Oct 6, 2023
1 parent 7896879 commit 73c397a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
title: Contract Hash vs. Package Hash
---

# Calling Contracts by Contract Hash vs. Package Hash
# Using Contract Hash vs. Package Hash

This page describes the advantages and disadvantages of using `contract_hash` vs. `contract_package_hash` when calling a contract.

Expand All @@ -16,12 +16,12 @@ A given contract might:
- Need specific contract versions within the same package, and thus use both `contract_hash` and `contract_package_hash`

A given contract, i.e., CEP-18, which wants to allow or block or track calls from other contracts, should then decide:
- will I allow, block, or track contract callers loosely at the package level?
- will I allow, block, or track contract callers specifically at the contract level?
- Will the contract allow, block, or track contract callers loosely at the package level?
- Will the contract allow, block, or track contract callers specifically at the contract level?

Or a more fine-grained variation would be:
- will I allow or block at the package level but track by both package and contract hash?
- will I allow other combinations of these basic concepts?
- Will the contract allow or block at the package level but track by both package and contract hash?
- Will the contract allow other combinations of these basic concepts?

Such a contract is responsible for documenting its choices and what it requires of its callers. It is essential to keep in mind the difference between the behavior of the host, which in this case is the Casper network execution engine (the host), as exposed by the [Casper External FFI](https://docs.rs/casper-contract/latest/casper_contract/ext_ffi/), versus use cases and interactions between two or more ecosystem entities such as accounts and contracts.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ This section shows you how to write session code and smart contracts in Rust and
|[Smart Contracts and Session Code](./contract-vs-session.md) | Understand what session code is and when you would use it over contract code |
|[Writing Session Code](./writing-session-code.md) | An introduction to writing session code|
|[Unit Testing Session Code](./testing-session-code.md) | Steps to test session code using the unit testing framework|
|[Calling Contracts by Contract Hash vs. Package Hash](./contract-hash-vs-package-hash.md)| Advantages and disadvantages of using `contract_hash` vs. `contract_package_hash` when calling a contract|
|[Using Contract Hash vs. Package Hash](./contract-hash-vs-package-hash.md)| Advantages and disadvantages of using `contract_hash` vs. `contract_package_hash` when calling a contract|
|[Best Practices for Casper Smart Contract Authors](./best-practices.md)| An outline of best practices when developing smart contracts on a Casper network|

## Interacting with Contracts on the Blockchain
Expand Down

0 comments on commit 73c397a

Please sign in to comment.