Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Added reminder about adding dependencies
  • Loading branch information
syrettaman committed Aug 8, 2023
commit ccf27c4c1728068334c0a0eec517c3822c56b37b
9 changes: 9 additions & 0 deletions docs/smart_contract_sdk/tutorial/chapter_3.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,15 @@ deserialize the result and return an `Option`.
`set_bank_account()` stores the given key-value pair in the storage using
`pchain_sdk::storage::set()`.


We are using **BorshDeserialize** and **BorshSerialize** in the above code, so remember to update
the Cargo.toml by adding the **borsh** crate. We need the **base64** crate for encoding the account_id
too. Therefore, add the following two lines under the dependencies section in Cargo.toml:

- base64 = "0.13"
- borsh = "=0.10.2"


### bank_account.rs: accessing storage
```rust
pub fn get_bank_account(key: &[u8]) -> Option<BankAccount> {
Expand Down