Using references
The Bulletin Board example uses a reference to the HighlightedPosts contract to delete highlights. In this section, we will take a look at three basic building blocks of cross-contract calls.
Exporting a reference
pub use highlighted_posts::HighlightedPostsRef;Initializing the reference
let highlighted_posts_board_ref = HighlightedPostsRef::new()
.code_hash(highlighted_posts_board_hash)
.salt_bytes([version.to_le_bytes().as_ref(), Self::env().caller().as_ref()].concat())
.endowment(0)
.instantiate();