Skip to content

Commit

Permalink
add cross contract calls video / update misc video page
Browse files Browse the repository at this point in the history
  • Loading branch information
thisisjoshford committed Jan 7, 2021
1 parent 62015b9 commit 572681f
Showing 1 changed file with 28 additions and 17 deletions.
45 changes: 28 additions & 17 deletions docs/videos/collections-u128-etc.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,44 @@
---
id: collections-u128-etc
title: Miscellaneous video concepts
title: Miscellaneous video concept
sidebar_label: Misc
---

This page contains videos that explore miscellaneous concepts of smart contract development on NEAR.

## StackOverflow question on NEAR Collections, and dealing with large numbers

<iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/wC6CS7js-tc" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

### Content overview
## Cross-contract calls in Rust

We address this question on StackOverflow:
<iframe
width="560"
height="315"
src="https://www.youtube-nocookie.com/embed/971dTz6nM2g"
frameborder="0"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
allowfullscreen>
</iframe>

https://stackoverflow.com/questions/64378144/why-cant-i-read-this-hashmap-in-a-near-contract/64438703#64438703

Specifically, we talk about why you'll likely want to use NEAR Collections instead of `HashMap` when using Rust.

See a list of the available collections here:
## StackOverflow question on NEAR Collections, and dealing with large numbers

https://docs.rs/near-sdk/2.0.0/near_sdk/collections/index.html
<iframe
width="560"
height="315"
src="https://www.youtube-nocookie.com/embed/wC6CS7js-tc"
frameborder="0"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
allowfullscreen>
</iframe>

We discuss [`U128`](https://docs.rs/near-sdk/2.0.0/near_sdk/json_types/struct.U128.html) and the difference between the (lowercase) `u128`, and why JSON cannot handle very large numbers.
Here we address [this question](https://stackoverflow.com/questions/64378144/why-cant-i-read-this-hashmap-in-a-near-contract/64438703#64438703) on StackOverflow and specifically, we'll talk about why you'll likely want to use NEAR Collections instead of `HashMap` when using Rust. See a list of the available collections [here](https://docs.rs/near-sdk/2.0.0/near_sdk/collections/index.html). In this video we discuss:

This video also walks through how to interact with a Rust smart contract using NEAR CLI. We demonstrate logging, `view` and `call` methods, unit tests, the benefit of creating subaccounts, and more.
- [`U128`](https://docs.rs/near-sdk/2.0.0/near_sdk/json_types/struct.U128.html) and the difference between the (lowercase) `u128`
- why JSON cannot handle very large numbers
- how to interact with a Rust smart contract using NEAR CLI
- demonstrate logging, `view` and `call` methods, and unit tests
- benefits of creating subaccounts

Lastly, we walk through the process of writing, building, and deploying a Rust smart contract. Then we'll discover why NEAR subaccounts are useful when you may need to make breaking changes to state.
We will also walk through the process of writing, building, and deploying a Rust smart contract and then we'll discover why NEAR subaccounts are useful when you may need to make breaking changes to state.

>Got a question?
<a href="https://stackoverflow.com/questions/tagged/nearprotocol">
<h8>Ask it on StackOverflow!</h8></a>
<h8>Ask it on StackOverflow!</h8>
</a>

0 comments on commit 572681f

Please sign in to comment.