SlideShare a Scribd company logo
1 of 78
Download to read offline
Available Recordings
- youtube.com/watch?v=K0Bkc0rsW8U
- crowdcast.io/e/hacktherainbow/13
- crowdcast.io/e/hacktherainbow/7
Workshop Preparation
Please complete the following steps before the workshop starts:
- [5 min] Install Node.js locally
- [2 min] Install NEAR CLI locally
- [3 min] Create a TestNet account on NEAR Protocol
If you have time, feel free to complete the following steps as well:
- Read about a few of the key concepts of the NEAR platform:
- Accounts
- Transactions
- Storage Staking
- Deploy the Fungible Token sample application (Gitpod or locally)
NEAR 102
An introductory workshop
for Ethereum developers
near.org
Why NEAR?
NEAR is cheaper, faster and easier to use
Development
- Contracts are written using AssemblyScript or Rust and compiled to Wasm
- 1 million JavaScript / TypeScript developers can learn AssemblyScript quickly and easily
- Rust toolchain and community support speeds development of complex contracts
- Unique account system makes reasoning about complex contract orchestration simple
Production
- Optimizations built into the protocol
- Gas fees (not just cost of gas) are 10x - 100x lower than those of Ethereum
- Contract accounts earn part of tx fees, reducing total cost of ownership for developers
- Automatic account redistribution among shards maximizes throughput
- 1 second block time and 3 second finality
Several examples and starters
near.dev
- several full stack examples in
Rust and AssemblyScript
- many have well commented
code to guide your exploration
- best effort at canonical use of
the platform frontend and
contract implementations
github.com / near / create-near-app
npx create-near-app banana
- generate a NEAR-compatible
frontend & contract in 1 command
- frontend: React, plain JS, others?
- contract: Rust, AssemblyScript
Ethereum ⇔ NEAR Cookbook
bit.ly / near-102-recipes
Get started in minutes
account - Ethereum supports two types of accounts with a single private key for EOAs
- NEAR supports one account type with an unlimited number of scoped keys
state - Ethereum state is replicated across all nodes of a single threaded machine
- NEAR state is isolated to one "home" shard per account in a "multithreaded" env
transaction - Ethereum supports transfer, contract deployment and function call transactions
- NEAR supports 8 composable Actions which determine transaction behavior
gas - Ethereum gas price is determined by network load and profit-motive
- NEAR gas price is algorithmically controlled to limit shard congestion at 50%
block - Ethereum blocks are produced using PoW consensus at a rate of one per 15s
- NEAR blocks are produced using PoS consensus at a rate of one per second
Same-same … but different primitives
Ethereum NEAR
standards ERC20 / ERC721 NEP141 / NEP171
transaction results Etherscan either view transaction in NEAR Explorer or use
near tx-status <tx_hash>
special data types address accounts are String type and
validation is available in Rust with
env::is_valid_account_id
mapping Collections ( Rust & AssemblyScript )
payable methods payable #[payable] ( Rust decorator )
event model Events polling EXPERIMENTAL_changes RPC method
running a node ganache nearup ( repo )
Same-same … but different features
NEAR
Deployment typically follows these steps:
1. Compile contract bytecode
2. Compose transaction using DeployContract
with attached bytecode (and optionally
CreateAccount, AddKey, Transfer as well)
3. Sign and send transaction to deploy contract
4. Receive transaction outcome
5. … redeploy to same account with FullAccess
private key or remove for trustless operation
step 2 can be decomposed into multiple Txs
Same-same … but different
Ethereum
Deployment typically follows these steps:
1. Compile contract bytecode
2. Compose transaction by attaching
bytecode (and initial value for contract)
3. Sign and send transaction to a special
address which creates new account and
deploys contract
4. Receive new contract address (or calculate
it yourself)
deployment
Same-same … but different
Ethereum Transactions NEAR Transactions
origin (signer, pk)
destination (receiver)
uniqueness (nonce)
handled elsewhere
recency (block_hash)
origin (v,r,s)
destination (recipient)
uniqueness (nonce)
cost control (gas price & limit)
transactions
attached NEAR tokens
Mapping concepts
NEAR Transactions
attached Ether
transactions
Ethereum Transactions
three categories of actions
- identity: CreateAccount, DeleteAccount
AddKey (2 types), DeleteKey
- money: Transfer, Stake
- code: DeployContract, FunctionCall
Mapping concepts
NEAR Transactions
selector (function signature)
arguments (encoded)
transactions
Ethereum Transactions
Mapping concepts
NEAR supports 8 composable primitive Actions
- CreateAccount to make a new account (for a person, contract, refrigerator, etc)
- DeleteAccount to delete an account (and transfer balance to a beneficiary account)
- AddKey to add a key to an account (either FullAccess or FunctionCall access)
- DeleteKey to delete an existing key from an account
- Transfer to move tokens from one account to another
- Stake to express interest in becoming a validator at the next available opportunity
- DeployContract to deploy a contract
- FunctionCall to invoke a method on a contract (including budget for compute and storage)
transactions
Mapping concepts
Ethereum
Custom Language → Custom VM
Pros
- Designed for blockchain
- May allow for formal verification
Cons
- Niche language
NEAR
AssemblyScript / Rust → Wasm VM
Pros
- Existing tooling and community
- General purpose
- Turing complete
Cons
- Not originally designed for blockchain
- No formal verification
runtime
Rust
Pros
- Mature, battle-hardened compiler
- Thriving ecosystem
- Real world use cases
- near-sdk-rs makes life easy
Cons
- Steeper learning curve
AssemblyScript
Pros
- Easier for prototyping
- Trivial for JS and TS devs to learn
- Smaller binaries in Wasm
- Binaries are easier to read / debug
Cons
- Current compiler is not stable
- Immature ecosystem
NEAR contract languages development
In some ways … different asynchronous calls
B A
C D
In some ways … different asynchronous calls
B A
C D
In some ways … same no surprise here
External “promise” calls which are used to invoke methods on multiple contracts using the
standard Promise interface
This example was taken from MDN (just assume the functions wrap near-api-js)
A
In some ways … same no surprise here
External “batch” calls are used to chain a series of Actions together to be executed on some
target account
B
In some ways … different asynchronous calls
Internal “batch” calls which are used to chain a series of Actions together to be executed on
some target account (including being applied to the current contract)
C
In some ways … different asynchronous calls
Internal “promise” calls which are used to invoke methods on other contracts (or recursively
on the current contract)
D
Rainbow Bridge
near.org / blog / eth-near-rainbow-bridge
Rainbow Bridge: NEAR Ethereum
Rainbow Bridge: NEAR Ethereum
Rainbow Bridge: NEAR Ethereum
Rainbow Bridge: NEAR Ethereum
Rainbow Bridge: NEAR Ethereum
Rainbow Bridge: NEAR Ethereum
Rainbow Bridge: NEAR Ethereum
Rainbow Bridge: NEAR Ethereum
Rainbow Bridge: NEAR Ethereum
- Decide to send 10 RAIN
- Authorize TokenLocker as escrow for ERC20
token on Ethereum (approve)
- Approve TokenLocker transaction which
locks the tokens on Ethereum (lockToken)
- Tokens are locked (emit Locked event)
- Wait 25 blocks for confirmation
- Attach small deposit to offset the cost of
storing newly minted nRAIN on NEAR
- Receive nRAIN tokens on NEAR
1
2
3
4
1
2
3
4
Rainbow Bridge: NEAR Ethereum
github.com / near-examples / erc20-to-nep21 github.com / aurora-is-near
Rainbow Bridge: NEAR Ethereum
github.com / near / rainbow-bridge-cli
How do I
get started?
create-near-app
To start building on NEAR run the following* in your terminal:
npx create-near-app --help
* you must have Node.js installed to run npx
create-near-app
Choose a frontend and a backend
Frontend (UX)
- Vanilla JS
- React
Backend (contracts)
- AssemblyScript
- Rust
create-near-app
step #1
npx create-near-app banana
create-near-app
step #2
yarn dev
( or use npm run dev )
step #3
create-near-app
Sign in to NEAR Wallet
( 1 ) create new account
( 2 ) authorize your app
step #4
create-near-app
Change the message
( 1 ) edit the greeting
( 2 ) click Save
( 3 ) observe a → b
a b
b
step #5 … n
- discover
- where do we setup a connection to NEAR?
hint: search the code for keyStore
- where do we login to the NEAR Wallet?
hint: search the code for requestSignIn
- which lines of code wire up the contract to our JS context?
hint: search the code for viewMethods or changeMethods
- control
- try to reverse the greeting string before writing on chain
hint 1: search for storage.set … AssemblyScript supports common Array and String functions
hint 2: message.split('').reverse().join('')
create-near-app
What just
happened?
NEAR exposes two development interfaces
dApp UX development
- Use near-api-js to connect to
NEAR, manage accounts, call
contract methods and more
- Use JSON-RPC API to
communicate with NEAR from
any context (other than JS / TS)
- Manage devops with NEAR Shell
dApp Contract Development
- Use near-sdk-as to build
contracts using AssemblyScript
- Use near-sdk-rs to build
contracts using Rust
- Compose deployed contracts
using cross-contract calls
NEAR exposes two development interfaces
dApp UX development
- Use near-api-js to connect to
NEAR, manage accounts, call
contract methods and more
- Use JSON-RPC API to
communicate with NEAR from
any context (other than JS / TS)
- Manage devops with NEAR Shell
dApp Contract Development
- Use near-sdk-as to build
contracts using AssemblyScript
- Use near-sdk-rs to build
contracts using Rust
- Compose deployed contracts
using cross-contract calls
NEAR exposes two development interfaces
dApp UX development
- Use near-api-js to connect to
NEAR, manage accounts, call
contract methods and more
- Use JSON-RPC API to
communicate with NEAR from
any context (other than JS / TS)
- Manage devops with NEAR Shell
dApp Contract Development
- Use near-sdk-as to build
contracts using AssemblyScript
- Use near-sdk-rs to build
contracts using Rust
- Compose deployed contracts
using cross-contract calls
NEAR exposes two development interfaces
dApp UX development
- Use near-api-js to connect to
NEAR, manage accounts, call
contract methods and more
- Use JSON-RPC API to
communicate with NEAR from
any context (other than JS / TS)
- Manage devops with NEAR Shell
dApp Contract Development
- Use near-sdk-as to build
contracts using AssemblyScript
- Use near-sdk-rs to build
contracts using Rust
- Compose deployed contracts
using cross-contract calls
Structure of the Sample Application
Runtime Layer
state storage
virtual
machine
code
load
apply
result
read write
Your dApp
send
receive
Blockchain Layer
RPC Interface
- P2P network
- Consensus
- Block Storage
near-api-js
contracts
near-sdk-as
near-sdk-rs
deploy
write
read`
Runtime Layer
state storage
virtual
machine
code
load
apply
result
Your dApp
send
receive
Blockchain Layer
RPC Interface
- P2P network
- Consensus
- Block Storage
near-api-js
contracts
near-sdk-as
near-sdk-rs
deploy
Structure of the Sample Application
Lifecycle of a transaction
Runtime Layer
state storage
virtual
machine
code
load
apply
result
read write
Your dApp
send
receive
Blockchain Layer
RPC Interface
- P2P network
- Consensus
- Block Storage
near-api-js
contracts
near-sdk-as
near-sdk-rs
1
2 3 4
5
6
7
deploy
Account ≈ Contract + State
Runtime Layer
state storage
virtual
machine
code
load
read write
Account ≈ Contract + State
Runtime Layer
virtual
machine
code
load
metadata
result
read write
data
apply
state storage
Runtime Layer
result
apply
Account ≈ Contract + State
virtual
machine
code
load
read write
key value
STATE your contract code
message “hello world”
counter 3
prefix::identifier value at collection key
prefix::len PersistentVector length
prefix::last PersistentDeque last item
state storage
Writing Contracts
Rust (contract data)
AssemblyScript (contract data)
AssemblyScript & Rust contract alignment
Rust (contract behavior)
AssemblyScript (contract behavior)
AssemblyScript & Rust contract alignment
“To enable WebAssembly to be read and edited by
humans, there is a textual representation of the wasm
binary format. This is an intermediate form designed to be
exposed in text editors, browser developer tools, etc.”
-- Understanding WebAssembly text format
Although we will not spend time on this topic, this format
has proven consistently readable (especially with
AssemblyScript) if only to sanity check that exported
contract functions are visible and near-sdk-as runtime
components are being called in the right places.
The output is always a .wasm file
Walking through
the Guest Book
Guest Book User Interface
- there are 2 main folders in the project:
- assembly contains the smart contract and tests
- src contains the application’s UX and tests
- there is another folder to be aware of:
- neardev contains contract account details
- this is for development only, your local credentials
will be in ~/.near-credentials
Guest Book Filesystem
Guest Book
Contract Data Model : assembly/model.ts
- PostedMessage is a serializable class with three
attributes:
- premium to flag messages with attached
NEAR tokens
- sender to track the signer of the guest
book message
- text to hold the guest book message
- messages is a collection of guest book messages
stored as a PersistentVector of
PostedMessage objects
note: @nearBindgen marks the class as serializable
Contract
Contract Behavior : assembly/main.ts
- MESSAGE_LIMIT is used to avoid unbounded calls
(ie. potentially expensive) to retrieve guest book
messages from storage
- two public functions are exposed on the contract:
- addMessage(text: string): void
- getMessages(): PostedMessage[]
Guest Book Contract
Guest Book
Network Connection : src/config.js
- data and endpoints required to connect to the
NEAR network
- connection information is included for MainNet,
TestNet and BetaNet as well as the default
LocalNet configuration
Frontend
Guest Book Frontend
Configuration : src/index.js
- configure connection to NEAR network
- configure contract interface by injecting
wallet connection and wiring up both
contract methods
- contract is a proxy object for JSON RPC
API calls with methods attached
- contract methods are attached to the
object as either view or change type and
return a Promise
Guest Book
Authentication : src/App.js
- NEAR Wallet is used for authentication
- near-api-js exposes two related methods
- wallet.requestSignIn()
- wallet.signOut()
note: useCallback() is a React Hook
Frontend
CRUD : src/App.js
- add a message and, once complete, get a list of
all messages (up to MESSAGE_LIMIT)
- contract.addMessage accepts parameters as
a JSON object and returns nothing
- two other parameters are optional
- gas (a “boatload”) to override client defaults
- attached value (in NEAR tokens)
Guest Book Frontend
Monitoring the application ...
http post https://rpc.testnet.near.org 
jsonrpc=2.0 id=dontcare
method=query params:='{
"request_type": "view_state",
"finality": "final",
"account_id": "test",
"prefix_base64": "U1RBVEU="
}’
And, using the watch command and some
JSON formatting with jq, automatically
refresh a convenient view while we use
the Guestbook example. Here’s how.
Also see here for our JSON RPC API docs
https://docs.near.org/docs/interaction/rpc
Guest Book Demo: Monitoring
Mapping
Concepts
-
Ethereum supports two types of accounts
1. Externally Owned Accounts (EOA)
a. identified by last 20 bytes of the keccak-256 hash of a public key
b. controlled by a private key of the same public-private key pair
c. can sign and send transactions to other EOAs or contract accounts
2. Contract Accounts
a. controlled by contract code, no keys involved
b. can only send transactions in response to being triggered
c. are of two subtypes
i. Simple
ii. Multisig
From Ethereum to NEAR accounts
-
From Ethereum to NEAR
NEAR supports one type of account
- human readable name (like having ENS baked into the protocol *)
- may represent a user, contract or both
- are controlled by an unlimited number of keys
- two types
- FullAccess: can do anything with the account, including send tokens and delete account
- FunctionCall: can only call contract functions which may be limited in scope and budget
* NEAR accounts follow a human friendly DNS naming pattern with similar scoping rules for
ownership and control. For example user.testnet controls app1.user.testnet and
app2.user.testnet.
accounts
-
Ethereum
- nonce
- balance
- storageRoot
- codeHash*
* codeHash may be either:
- hash of an empty string (EOAs)
- hash of the code of the contract
NEAR
- balance
- locked balance (for staking)
- code of the contract **
- storage (key-value store for contract data)
- access keys *** (FullAccess, FunctionCall)
- postponed ActionReceipts (ie. “todo”)
- received DataReceipts (ie. “done”)
** code_hash is similar to Ethereum
*** each access key tracks its own nonce
note that receipts are used to manage
cross-contract calls
From Ethereum to NEAR accounts
Exploring the
Platform
- managing NEAR primitives:
- key stores
- accounts
- contracts
- wallets
- connection providers (RPC)
- generating key pairs locally
- creating transactions locally
- signing transactions locally
- sending transactions to the network
near-api-js
Library designed to connect to the NEAR platform from any JavaScript
execution context (server-side or client-side JS)
Client-side Server-side
near-api-js
Server-side
UnencryptedFileSystemKeyStore
Client-side
BrowserLocalStorageKeyStore
near-api-js
near-api-js
Your dApp
Examples at
near.dev
NEAR Explorer
NEAR Wallet
NEAR CLI
send
receive
RPC Interface
Blockchain
Layer
near-api-js uses JSON RPC API
near-api-js
Your dApp
Examples at
near.dev
NEAR Explorer
NEAR Wallet
NEAR CLI
send
receive
RPC Interface
Blockchain
Layer
near-api-js uses JSON RPC API
Thank you!
share bit.ly / near-102
visit near.help
Touch base on Telegram
Discover us on Discord
Suggest topics on StackOverflow

More Related Content

What's hot

(NET301) New Capabilities for Amazon Virtual Private Cloud
(NET301) New Capabilities for Amazon Virtual Private Cloud(NET301) New Capabilities for Amazon Virtual Private Cloud
(NET301) New Capabilities for Amazon Virtual Private CloudAmazon Web Services
 
OWASP ZAP Workshop for QA Testers
OWASP ZAP Workshop for QA TestersOWASP ZAP Workshop for QA Testers
OWASP ZAP Workshop for QA TestersJavan Rasokat
 
Tatu: ssh as a service
Tatu: ssh as a serviceTatu: ssh as a service
Tatu: ssh as a servicePino deCandia
 
Trusts You Might Have Missed
Trusts You Might Have MissedTrusts You Might Have Missed
Trusts You Might Have MissedWill Schroeder
 
Installation Openstack Swift
Installation Openstack SwiftInstallation Openstack Swift
Installation Openstack Swiftymtech
 
KubeCon EU 2016: Creating an Advanced Load Balancing Solution for Kubernetes ...
KubeCon EU 2016: Creating an Advanced Load Balancing Solution for Kubernetes ...KubeCon EU 2016: Creating an Advanced Load Balancing Solution for Kubernetes ...
KubeCon EU 2016: Creating an Advanced Load Balancing Solution for Kubernetes ...KubeAcademy
 
Introduction To Windows Power Shell
Introduction To Windows Power ShellIntroduction To Windows Power Shell
Introduction To Windows Power ShellMicrosoft TechNet
 
Docker Security Paradigm
Docker Security ParadigmDocker Security Paradigm
Docker Security ParadigmAnis LARGUEM
 
2014-11-26 | Creating a BitTorrent Client with Scala and Akka, Part 1 (Vienna...
2014-11-26 | Creating a BitTorrent Client with Scala and Akka, Part 1 (Vienna...2014-11-26 | Creating a BitTorrent Client with Scala and Akka, Part 1 (Vienna...
2014-11-26 | Creating a BitTorrent Client with Scala and Akka, Part 1 (Vienna...Dominik Gruber
 
HashiCorp Vault Workshop:幫 Credentials 找個窩
HashiCorp Vault Workshop:幫 Credentials 找個窩HashiCorp Vault Workshop:幫 Credentials 找個窩
HashiCorp Vault Workshop:幫 Credentials 找個窩smalltown
 
PowerShell Inside Out: Applied .NET Hacking for Enhanced Visibility by Satosh...
PowerShell Inside Out: Applied .NET Hacking for Enhanced Visibility by Satosh...PowerShell Inside Out: Applied .NET Hacking for Enhanced Visibility by Satosh...
PowerShell Inside Out: Applied .NET Hacking for Enhanced Visibility by Satosh...CODE BLUE
 
Enhancing OpenShift Security for Business Critical Deployments
Enhancing OpenShift Security for Business Critical DeploymentsEnhancing OpenShift Security for Business Critical Deployments
Enhancing OpenShift Security for Business Critical DeploymentsDevOps.com
 
Docker Swarm for Beginner
Docker Swarm for BeginnerDocker Swarm for Beginner
Docker Swarm for BeginnerShahzad Masud
 
Advanced Container Security - AWS Summit Sydney 2018
Advanced Container Security - AWS Summit Sydney 2018Advanced Container Security - AWS Summit Sydney 2018
Advanced Container Security - AWS Summit Sydney 2018Amazon Web Services
 
Kafka security ssl
Kafka security sslKafka security ssl
Kafka security sslHeng-Xiu Xu
 
Apache httpd 2.4 Reverse Proxy
Apache httpd 2.4 Reverse ProxyApache httpd 2.4 Reverse Proxy
Apache httpd 2.4 Reverse ProxyJim Jagielski
 
Reusable, composable, battle-tested Terraform modules
Reusable, composable, battle-tested Terraform modulesReusable, composable, battle-tested Terraform modules
Reusable, composable, battle-tested Terraform modulesYevgeniy Brikman
 
Infrastructure as code: running microservices on AWS using Docker, Terraform,...
Infrastructure as code: running microservices on AWS using Docker, Terraform,...Infrastructure as code: running microservices on AWS using Docker, Terraform,...
Infrastructure as code: running microservices on AWS using Docker, Terraform,...Yevgeniy Brikman
 
IaC and Immutable Infrastructure with Terraform, Сергей Марченко
IaC and Immutable Infrastructure with Terraform, Сергей МарченкоIaC and Immutable Infrastructure with Terraform, Сергей Марченко
IaC and Immutable Infrastructure with Terraform, Сергей МарченкоSigma Software
 
Derbycon - The Unintended Risks of Trusting Active Directory
Derbycon - The Unintended Risks of Trusting Active DirectoryDerbycon - The Unintended Risks of Trusting Active Directory
Derbycon - The Unintended Risks of Trusting Active DirectoryWill Schroeder
 

What's hot (20)

(NET301) New Capabilities for Amazon Virtual Private Cloud
(NET301) New Capabilities for Amazon Virtual Private Cloud(NET301) New Capabilities for Amazon Virtual Private Cloud
(NET301) New Capabilities for Amazon Virtual Private Cloud
 
OWASP ZAP Workshop for QA Testers
OWASP ZAP Workshop for QA TestersOWASP ZAP Workshop for QA Testers
OWASP ZAP Workshop for QA Testers
 
Tatu: ssh as a service
Tatu: ssh as a serviceTatu: ssh as a service
Tatu: ssh as a service
 
Trusts You Might Have Missed
Trusts You Might Have MissedTrusts You Might Have Missed
Trusts You Might Have Missed
 
Installation Openstack Swift
Installation Openstack SwiftInstallation Openstack Swift
Installation Openstack Swift
 
KubeCon EU 2016: Creating an Advanced Load Balancing Solution for Kubernetes ...
KubeCon EU 2016: Creating an Advanced Load Balancing Solution for Kubernetes ...KubeCon EU 2016: Creating an Advanced Load Balancing Solution for Kubernetes ...
KubeCon EU 2016: Creating an Advanced Load Balancing Solution for Kubernetes ...
 
Introduction To Windows Power Shell
Introduction To Windows Power ShellIntroduction To Windows Power Shell
Introduction To Windows Power Shell
 
Docker Security Paradigm
Docker Security ParadigmDocker Security Paradigm
Docker Security Paradigm
 
2014-11-26 | Creating a BitTorrent Client with Scala and Akka, Part 1 (Vienna...
2014-11-26 | Creating a BitTorrent Client with Scala and Akka, Part 1 (Vienna...2014-11-26 | Creating a BitTorrent Client with Scala and Akka, Part 1 (Vienna...
2014-11-26 | Creating a BitTorrent Client with Scala and Akka, Part 1 (Vienna...
 
HashiCorp Vault Workshop:幫 Credentials 找個窩
HashiCorp Vault Workshop:幫 Credentials 找個窩HashiCorp Vault Workshop:幫 Credentials 找個窩
HashiCorp Vault Workshop:幫 Credentials 找個窩
 
PowerShell Inside Out: Applied .NET Hacking for Enhanced Visibility by Satosh...
PowerShell Inside Out: Applied .NET Hacking for Enhanced Visibility by Satosh...PowerShell Inside Out: Applied .NET Hacking for Enhanced Visibility by Satosh...
PowerShell Inside Out: Applied .NET Hacking for Enhanced Visibility by Satosh...
 
Enhancing OpenShift Security for Business Critical Deployments
Enhancing OpenShift Security for Business Critical DeploymentsEnhancing OpenShift Security for Business Critical Deployments
Enhancing OpenShift Security for Business Critical Deployments
 
Docker Swarm for Beginner
Docker Swarm for BeginnerDocker Swarm for Beginner
Docker Swarm for Beginner
 
Advanced Container Security - AWS Summit Sydney 2018
Advanced Container Security - AWS Summit Sydney 2018Advanced Container Security - AWS Summit Sydney 2018
Advanced Container Security - AWS Summit Sydney 2018
 
Kafka security ssl
Kafka security sslKafka security ssl
Kafka security ssl
 
Apache httpd 2.4 Reverse Proxy
Apache httpd 2.4 Reverse ProxyApache httpd 2.4 Reverse Proxy
Apache httpd 2.4 Reverse Proxy
 
Reusable, composable, battle-tested Terraform modules
Reusable, composable, battle-tested Terraform modulesReusable, composable, battle-tested Terraform modules
Reusable, composable, battle-tested Terraform modules
 
Infrastructure as code: running microservices on AWS using Docker, Terraform,...
Infrastructure as code: running microservices on AWS using Docker, Terraform,...Infrastructure as code: running microservices on AWS using Docker, Terraform,...
Infrastructure as code: running microservices on AWS using Docker, Terraform,...
 
IaC and Immutable Infrastructure with Terraform, Сергей Марченко
IaC and Immutable Infrastructure with Terraform, Сергей МарченкоIaC and Immutable Infrastructure with Terraform, Сергей Марченко
IaC and Immutable Infrastructure with Terraform, Сергей Марченко
 
Derbycon - The Unintended Risks of Trusting Active Directory
Derbycon - The Unintended Risks of Trusting Active DirectoryDerbycon - The Unintended Risks of Trusting Active Directory
Derbycon - The Unintended Risks of Trusting Active Directory
 

Similar to Encode x NEAR: Technical Overview of NEAR 1

Encode x NEAR: Technical Overview of NEAR 1
Encode x NEAR: Technical Overview of NEAR 1Encode x NEAR: Technical Overview of NEAR 1
Encode x NEAR: Technical Overview of NEAR 1KlaraOrban
 
leewayhertz.com-How to build a dApp on Avalanche blockchain
leewayhertz.com-How to build a dApp on Avalanche blockchainleewayhertz.com-How to build a dApp on Avalanche blockchain
leewayhertz.com-How to build a dApp on Avalanche blockchainMdSaifulIslam289
 
Ingredients for creating dapps
Ingredients for creating dappsIngredients for creating dapps
Ingredients for creating dappsStefaan Ponnet
 
Deploying Cloud Native Red Team Infrastructure with Kubernetes, Istio and Envoy
Deploying Cloud Native Red Team Infrastructure with Kubernetes, Istio and Envoy Deploying Cloud Native Red Team Infrastructure with Kubernetes, Istio and Envoy
Deploying Cloud Native Red Team Infrastructure with Kubernetes, Istio and Envoy Jeffrey Holden
 
Ethereum Smart Contract Tutorial
Ethereum Smart Contract TutorialEthereum Smart Contract Tutorial
Ethereum Smart Contract TutorialArnold Pham
 
Ethereummeetuppresentation01 170105172132
Ethereummeetuppresentation01 170105172132Ethereummeetuppresentation01 170105172132
Ethereummeetuppresentation01 170105172132Rihazudin Razik MBCS
 
Ethereum Solidity Fundamentals
Ethereum Solidity FundamentalsEthereum Solidity Fundamentals
Ethereum Solidity FundamentalsEno Bassey
 
Ethereum dapps20180120
Ethereum dapps20180120Ethereum dapps20180120
Ethereum dapps20180120Hu Kenneth
 
Blockchain Development
Blockchain DevelopmentBlockchain Development
Blockchain Developmentpreetikumara
 
EthereumBlockchainMarch3 (1).pptx
EthereumBlockchainMarch3 (1).pptxEthereumBlockchainMarch3 (1).pptx
EthereumBlockchainMarch3 (1).pptxWijdenBenothmen1
 
[Call for code] IBM 블록체인을 활용하여 투명하게 구호기금 관리하기 - Hyperledger Fabric v1.1 by 맹개발
[Call for code] IBM 블록체인을 활용하여 투명하게 구호기금 관리하기 - Hyperledger Fabric v1.1 by 맹개발 [Call for code] IBM 블록체인을 활용하여 투명하게 구호기금 관리하기 - Hyperledger Fabric v1.1 by 맹개발
[Call for code] IBM 블록체인을 활용하여 투명하게 구호기금 관리하기 - Hyperledger Fabric v1.1 by 맹개발 Yunho Maeng
 
BlockChain Online Course
BlockChain Online Course BlockChain Online Course
BlockChain Online Course Prasanthi K
 
Blockchain Workshop - Software Freedom Day 2017
Blockchain Workshop - Software Freedom Day 2017Blockchain Workshop - Software Freedom Day 2017
Blockchain Workshop - Software Freedom Day 2017Zied GUESMI
 
Ethereum Devcon1 Report (summary writing)
Ethereum Devcon1 Report (summary writing)Ethereum Devcon1 Report (summary writing)
Ethereum Devcon1 Report (summary writing)Tomoaki Sato
 
Building a blockchain on tendermint
Building a blockchain on tendermintBuilding a blockchain on tendermint
Building a blockchain on tendermintLviv Startup Club
 
Distribute Key Value Store
Distribute Key Value StoreDistribute Key Value Store
Distribute Key Value StoreSantal Li
 
Distribute key value_store
Distribute key value_storeDistribute key value_store
Distribute key value_storedrewz lin
 

Similar to Encode x NEAR: Technical Overview of NEAR 1 (20)

Encode x NEAR: Technical Overview of NEAR 1
Encode x NEAR: Technical Overview of NEAR 1Encode x NEAR: Technical Overview of NEAR 1
Encode x NEAR: Technical Overview of NEAR 1
 
leewayhertz.com-How to build a dApp on Avalanche blockchain
leewayhertz.com-How to build a dApp on Avalanche blockchainleewayhertz.com-How to build a dApp on Avalanche blockchain
leewayhertz.com-How to build a dApp on Avalanche blockchain
 
Ingredients for creating dapps
Ingredients for creating dappsIngredients for creating dapps
Ingredients for creating dapps
 
Deploying Cloud Native Red Team Infrastructure with Kubernetes, Istio and Envoy
Deploying Cloud Native Red Team Infrastructure with Kubernetes, Istio and Envoy Deploying Cloud Native Red Team Infrastructure with Kubernetes, Istio and Envoy
Deploying Cloud Native Red Team Infrastructure with Kubernetes, Istio and Envoy
 
Ethereum Smart Contract Tutorial
Ethereum Smart Contract TutorialEthereum Smart Contract Tutorial
Ethereum Smart Contract Tutorial
 
Ethereummeetuppresentation01 170105172132
Ethereummeetuppresentation01 170105172132Ethereummeetuppresentation01 170105172132
Ethereummeetuppresentation01 170105172132
 
Ethereum Solidity Fundamentals
Ethereum Solidity FundamentalsEthereum Solidity Fundamentals
Ethereum Solidity Fundamentals
 
Ethereum dapps20180120
Ethereum dapps20180120Ethereum dapps20180120
Ethereum dapps20180120
 
Blockchain
BlockchainBlockchain
Blockchain
 
Ethereum
EthereumEthereum
Ethereum
 
Blockchain Development
Blockchain DevelopmentBlockchain Development
Blockchain Development
 
EthereumBlockchainMarch3 (1).pptx
EthereumBlockchainMarch3 (1).pptxEthereumBlockchainMarch3 (1).pptx
EthereumBlockchainMarch3 (1).pptx
 
[Call for code] IBM 블록체인을 활용하여 투명하게 구호기금 관리하기 - Hyperledger Fabric v1.1 by 맹개발
[Call for code] IBM 블록체인을 활용하여 투명하게 구호기금 관리하기 - Hyperledger Fabric v1.1 by 맹개발 [Call for code] IBM 블록체인을 활용하여 투명하게 구호기금 관리하기 - Hyperledger Fabric v1.1 by 맹개발
[Call for code] IBM 블록체인을 활용하여 투명하게 구호기금 관리하기 - Hyperledger Fabric v1.1 by 맹개발
 
BlockChain Online Training
BlockChain Online Training BlockChain Online Training
BlockChain Online Training
 
BlockChain Online Course
BlockChain Online Course BlockChain Online Course
BlockChain Online Course
 
Blockchain Workshop - Software Freedom Day 2017
Blockchain Workshop - Software Freedom Day 2017Blockchain Workshop - Software Freedom Day 2017
Blockchain Workshop - Software Freedom Day 2017
 
Ethereum Devcon1 Report (summary writing)
Ethereum Devcon1 Report (summary writing)Ethereum Devcon1 Report (summary writing)
Ethereum Devcon1 Report (summary writing)
 
Building a blockchain on tendermint
Building a blockchain on tendermintBuilding a blockchain on tendermint
Building a blockchain on tendermint
 
Distribute Key Value Store
Distribute Key Value StoreDistribute Key Value Store
Distribute Key Value Store
 
Distribute key value_store
Distribute key value_storeDistribute key value_store
Distribute key value_store
 

More from KlaraOrban

Encode x Tezos Hack: Hands-on dApp Training
Encode x Tezos Hack: Hands-on dApp Training Encode x Tezos Hack: Hands-on dApp Training
Encode x Tezos Hack: Hands-on dApp Training KlaraOrban
 
Encode x Tezos: Building a dApp on Tezos
Encode x Tezos: Building a dApp on TezosEncode x Tezos: Building a dApp on Tezos
Encode x Tezos: Building a dApp on TezosKlaraOrban
 
Building Applications on Avalanche
Building Applications on AvalancheBuilding Applications on Avalanche
Building Applications on AvalancheKlaraOrban
 
Building on NEAR, Part 1
Building on NEAR, Part 1Building on NEAR, Part 1
Building on NEAR, Part 1KlaraOrban
 
Encode x The Graph: How to get involved with The Graph
Encode x The Graph: How to get involved with The GraphEncode x The Graph: How to get involved with The Graph
Encode x The Graph: How to get involved with The GraphKlaraOrban
 
Encode x NEAR: Intro to NEAR
Encode x NEAR: Intro to NEAREncode x NEAR: Intro to NEAR
Encode x NEAR: Intro to NEARKlaraOrban
 
Encode x The Graph: Curating and delegating on The Graph
Encode x The Graph: Curating and delegating on The GraphEncode x The Graph: Curating and delegating on The Graph
Encode x The Graph: Curating and delegating on The GraphKlaraOrban
 
Encode x NEAR: Intro to Blockchain
Encode x NEAR: Intro to BlockchainEncode x NEAR: Intro to Blockchain
Encode x NEAR: Intro to BlockchainKlaraOrban
 
bounties4bandits: Information event
bounties4bandits: Information eventbounties4bandits: Information event
bounties4bandits: Information eventKlaraOrban
 
Intro to avalanche
Intro to avalancheIntro to avalanche
Intro to avalancheKlaraOrban
 
Encode x Graph: The Data Economy
Encode x Graph: The Data EconomyEncode x Graph: The Data Economy
Encode x Graph: The Data EconomyKlaraOrban
 
Encode x BitDAO Intro Event
Encode x BitDAO Intro EventEncode x BitDAO Intro Event
Encode x BitDAO Intro EventKlaraOrban
 
Encode x The Graph - Introduction to the Graph
Encode x The Graph - Introduction to the GraphEncode x The Graph - Introduction to the Graph
Encode x The Graph - Introduction to the GraphKlaraOrban
 
Hack DeFi: DeFi with Wintermute
Hack DeFi: DeFi with WintermuteHack DeFi: DeFi with Wintermute
Hack DeFi: DeFi with WintermuteKlaraOrban
 
Hack DeFi Launch
Hack DeFi LaunchHack DeFi Launch
Hack DeFi LaunchKlaraOrban
 
Nft Hack Ideation Workshop
Nft Hack Ideation WorkshopNft Hack Ideation Workshop
Nft Hack Ideation WorkshopKlaraOrban
 
Best practices for canisters in rust
Best practices for canisters in rustBest practices for canisters in rust
Best practices for canisters in rustKlaraOrban
 
Decentralized possibilities with filecoin &amp; ipfs_encode filecoin club
Decentralized possibilities with filecoin &amp; ipfs_encode filecoin clubDecentralized possibilities with filecoin &amp; ipfs_encode filecoin club
Decentralized possibilities with filecoin &amp; ipfs_encode filecoin clubKlaraOrban
 
Encode x ICH: Intro to Building on the IC in Motoko
Encode x ICH: Intro to Building on the IC in MotokoEncode x ICH: Intro to Building on the IC in Motoko
Encode x ICH: Intro to Building on the IC in MotokoKlaraOrban
 
NFT Hack: Launch Event
NFT Hack: Launch Event NFT Hack: Launch Event
NFT Hack: Launch Event KlaraOrban
 

More from KlaraOrban (20)

Encode x Tezos Hack: Hands-on dApp Training
Encode x Tezos Hack: Hands-on dApp Training Encode x Tezos Hack: Hands-on dApp Training
Encode x Tezos Hack: Hands-on dApp Training
 
Encode x Tezos: Building a dApp on Tezos
Encode x Tezos: Building a dApp on TezosEncode x Tezos: Building a dApp on Tezos
Encode x Tezos: Building a dApp on Tezos
 
Building Applications on Avalanche
Building Applications on AvalancheBuilding Applications on Avalanche
Building Applications on Avalanche
 
Building on NEAR, Part 1
Building on NEAR, Part 1Building on NEAR, Part 1
Building on NEAR, Part 1
 
Encode x The Graph: How to get involved with The Graph
Encode x The Graph: How to get involved with The GraphEncode x The Graph: How to get involved with The Graph
Encode x The Graph: How to get involved with The Graph
 
Encode x NEAR: Intro to NEAR
Encode x NEAR: Intro to NEAREncode x NEAR: Intro to NEAR
Encode x NEAR: Intro to NEAR
 
Encode x The Graph: Curating and delegating on The Graph
Encode x The Graph: Curating and delegating on The GraphEncode x The Graph: Curating and delegating on The Graph
Encode x The Graph: Curating and delegating on The Graph
 
Encode x NEAR: Intro to Blockchain
Encode x NEAR: Intro to BlockchainEncode x NEAR: Intro to Blockchain
Encode x NEAR: Intro to Blockchain
 
bounties4bandits: Information event
bounties4bandits: Information eventbounties4bandits: Information event
bounties4bandits: Information event
 
Intro to avalanche
Intro to avalancheIntro to avalanche
Intro to avalanche
 
Encode x Graph: The Data Economy
Encode x Graph: The Data EconomyEncode x Graph: The Data Economy
Encode x Graph: The Data Economy
 
Encode x BitDAO Intro Event
Encode x BitDAO Intro EventEncode x BitDAO Intro Event
Encode x BitDAO Intro Event
 
Encode x The Graph - Introduction to the Graph
Encode x The Graph - Introduction to the GraphEncode x The Graph - Introduction to the Graph
Encode x The Graph - Introduction to the Graph
 
Hack DeFi: DeFi with Wintermute
Hack DeFi: DeFi with WintermuteHack DeFi: DeFi with Wintermute
Hack DeFi: DeFi with Wintermute
 
Hack DeFi Launch
Hack DeFi LaunchHack DeFi Launch
Hack DeFi Launch
 
Nft Hack Ideation Workshop
Nft Hack Ideation WorkshopNft Hack Ideation Workshop
Nft Hack Ideation Workshop
 
Best practices for canisters in rust
Best practices for canisters in rustBest practices for canisters in rust
Best practices for canisters in rust
 
Decentralized possibilities with filecoin &amp; ipfs_encode filecoin club
Decentralized possibilities with filecoin &amp; ipfs_encode filecoin clubDecentralized possibilities with filecoin &amp; ipfs_encode filecoin club
Decentralized possibilities with filecoin &amp; ipfs_encode filecoin club
 
Encode x ICH: Intro to Building on the IC in Motoko
Encode x ICH: Intro to Building on the IC in MotokoEncode x ICH: Intro to Building on the IC in Motoko
Encode x ICH: Intro to Building on the IC in Motoko
 
NFT Hack: Launch Event
NFT Hack: Launch Event NFT Hack: Launch Event
NFT Hack: Launch Event
 

Recently uploaded

Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsHyundai Motor Group
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfngoud9212
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 

Recently uploaded (20)

Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdf
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 

Encode x NEAR: Technical Overview of NEAR 1

  • 1. Available Recordings - youtube.com/watch?v=K0Bkc0rsW8U - crowdcast.io/e/hacktherainbow/13 - crowdcast.io/e/hacktherainbow/7 Workshop Preparation Please complete the following steps before the workshop starts: - [5 min] Install Node.js locally - [2 min] Install NEAR CLI locally - [3 min] Create a TestNet account on NEAR Protocol If you have time, feel free to complete the following steps as well: - Read about a few of the key concepts of the NEAR platform: - Accounts - Transactions - Storage Staking - Deploy the Fungible Token sample application (Gitpod or locally) NEAR 102 An introductory workshop for Ethereum developers near.org
  • 3. NEAR is cheaper, faster and easier to use Development - Contracts are written using AssemblyScript or Rust and compiled to Wasm - 1 million JavaScript / TypeScript developers can learn AssemblyScript quickly and easily - Rust toolchain and community support speeds development of complex contracts - Unique account system makes reasoning about complex contract orchestration simple Production - Optimizations built into the protocol - Gas fees (not just cost of gas) are 10x - 100x lower than those of Ethereum - Contract accounts earn part of tx fees, reducing total cost of ownership for developers - Automatic account redistribution among shards maximizes throughput - 1 second block time and 3 second finality
  • 4. Several examples and starters near.dev - several full stack examples in Rust and AssemblyScript - many have well commented code to guide your exploration - best effort at canonical use of the platform frontend and contract implementations
  • 5. github.com / near / create-near-app npx create-near-app banana - generate a NEAR-compatible frontend & contract in 1 command - frontend: React, plain JS, others? - contract: Rust, AssemblyScript Ethereum ⇔ NEAR Cookbook bit.ly / near-102-recipes Get started in minutes
  • 6. account - Ethereum supports two types of accounts with a single private key for EOAs - NEAR supports one account type with an unlimited number of scoped keys state - Ethereum state is replicated across all nodes of a single threaded machine - NEAR state is isolated to one "home" shard per account in a "multithreaded" env transaction - Ethereum supports transfer, contract deployment and function call transactions - NEAR supports 8 composable Actions which determine transaction behavior gas - Ethereum gas price is determined by network load and profit-motive - NEAR gas price is algorithmically controlled to limit shard congestion at 50% block - Ethereum blocks are produced using PoW consensus at a rate of one per 15s - NEAR blocks are produced using PoS consensus at a rate of one per second Same-same … but different primitives
  • 7. Ethereum NEAR standards ERC20 / ERC721 NEP141 / NEP171 transaction results Etherscan either view transaction in NEAR Explorer or use near tx-status <tx_hash> special data types address accounts are String type and validation is available in Rust with env::is_valid_account_id mapping Collections ( Rust & AssemblyScript ) payable methods payable #[payable] ( Rust decorator ) event model Events polling EXPERIMENTAL_changes RPC method running a node ganache nearup ( repo ) Same-same … but different features
  • 8. NEAR Deployment typically follows these steps: 1. Compile contract bytecode 2. Compose transaction using DeployContract with attached bytecode (and optionally CreateAccount, AddKey, Transfer as well) 3. Sign and send transaction to deploy contract 4. Receive transaction outcome 5. … redeploy to same account with FullAccess private key or remove for trustless operation step 2 can be decomposed into multiple Txs Same-same … but different Ethereum Deployment typically follows these steps: 1. Compile contract bytecode 2. Compose transaction by attaching bytecode (and initial value for contract) 3. Sign and send transaction to a special address which creates new account and deploys contract 4. Receive new contract address (or calculate it yourself) deployment
  • 9. Same-same … but different Ethereum Transactions NEAR Transactions origin (signer, pk) destination (receiver) uniqueness (nonce) handled elsewhere recency (block_hash) origin (v,r,s) destination (recipient) uniqueness (nonce) cost control (gas price & limit) transactions
  • 10. attached NEAR tokens Mapping concepts NEAR Transactions attached Ether transactions Ethereum Transactions
  • 11. three categories of actions - identity: CreateAccount, DeleteAccount AddKey (2 types), DeleteKey - money: Transfer, Stake - code: DeployContract, FunctionCall Mapping concepts NEAR Transactions selector (function signature) arguments (encoded) transactions Ethereum Transactions
  • 12. Mapping concepts NEAR supports 8 composable primitive Actions - CreateAccount to make a new account (for a person, contract, refrigerator, etc) - DeleteAccount to delete an account (and transfer balance to a beneficiary account) - AddKey to add a key to an account (either FullAccess or FunctionCall access) - DeleteKey to delete an existing key from an account - Transfer to move tokens from one account to another - Stake to express interest in becoming a validator at the next available opportunity - DeployContract to deploy a contract - FunctionCall to invoke a method on a contract (including budget for compute and storage) transactions
  • 13. Mapping concepts Ethereum Custom Language → Custom VM Pros - Designed for blockchain - May allow for formal verification Cons - Niche language NEAR AssemblyScript / Rust → Wasm VM Pros - Existing tooling and community - General purpose - Turing complete Cons - Not originally designed for blockchain - No formal verification runtime
  • 14. Rust Pros - Mature, battle-hardened compiler - Thriving ecosystem - Real world use cases - near-sdk-rs makes life easy Cons - Steeper learning curve AssemblyScript Pros - Easier for prototyping - Trivial for JS and TS devs to learn - Smaller binaries in Wasm - Binaries are easier to read / debug Cons - Current compiler is not stable - Immature ecosystem NEAR contract languages development
  • 15. In some ways … different asynchronous calls B A C D
  • 16. In some ways … different asynchronous calls B A C D
  • 17. In some ways … same no surprise here External “promise” calls which are used to invoke methods on multiple contracts using the standard Promise interface This example was taken from MDN (just assume the functions wrap near-api-js) A
  • 18. In some ways … same no surprise here External “batch” calls are used to chain a series of Actions together to be executed on some target account B
  • 19. In some ways … different asynchronous calls Internal “batch” calls which are used to chain a series of Actions together to be executed on some target account (including being applied to the current contract) C
  • 20. In some ways … different asynchronous calls Internal “promise” calls which are used to invoke methods on other contracts (or recursively on the current contract) D
  • 21. Rainbow Bridge near.org / blog / eth-near-rainbow-bridge
  • 30. Rainbow Bridge: NEAR Ethereum - Decide to send 10 RAIN - Authorize TokenLocker as escrow for ERC20 token on Ethereum (approve) - Approve TokenLocker transaction which locks the tokens on Ethereum (lockToken) - Tokens are locked (emit Locked event) - Wait 25 blocks for confirmation - Attach small deposit to offset the cost of storing newly minted nRAIN on NEAR - Receive nRAIN tokens on NEAR
  • 32. Rainbow Bridge: NEAR Ethereum github.com / near-examples / erc20-to-nep21 github.com / aurora-is-near
  • 33. Rainbow Bridge: NEAR Ethereum github.com / near / rainbow-bridge-cli
  • 34. How do I get started?
  • 35. create-near-app To start building on NEAR run the following* in your terminal: npx create-near-app --help * you must have Node.js installed to run npx
  • 36. create-near-app Choose a frontend and a backend Frontend (UX) - Vanilla JS - React Backend (contracts) - AssemblyScript - Rust
  • 38. create-near-app step #2 yarn dev ( or use npm run dev )
  • 39. step #3 create-near-app Sign in to NEAR Wallet ( 1 ) create new account ( 2 ) authorize your app
  • 40. step #4 create-near-app Change the message ( 1 ) edit the greeting ( 2 ) click Save ( 3 ) observe a → b a b b
  • 41. step #5 … n - discover - where do we setup a connection to NEAR? hint: search the code for keyStore - where do we login to the NEAR Wallet? hint: search the code for requestSignIn - which lines of code wire up the contract to our JS context? hint: search the code for viewMethods or changeMethods - control - try to reverse the greeting string before writing on chain hint 1: search for storage.set … AssemblyScript supports common Array and String functions hint 2: message.split('').reverse().join('') create-near-app
  • 43. NEAR exposes two development interfaces dApp UX development - Use near-api-js to connect to NEAR, manage accounts, call contract methods and more - Use JSON-RPC API to communicate with NEAR from any context (other than JS / TS) - Manage devops with NEAR Shell dApp Contract Development - Use near-sdk-as to build contracts using AssemblyScript - Use near-sdk-rs to build contracts using Rust - Compose deployed contracts using cross-contract calls
  • 44. NEAR exposes two development interfaces dApp UX development - Use near-api-js to connect to NEAR, manage accounts, call contract methods and more - Use JSON-RPC API to communicate with NEAR from any context (other than JS / TS) - Manage devops with NEAR Shell dApp Contract Development - Use near-sdk-as to build contracts using AssemblyScript - Use near-sdk-rs to build contracts using Rust - Compose deployed contracts using cross-contract calls
  • 45. NEAR exposes two development interfaces dApp UX development - Use near-api-js to connect to NEAR, manage accounts, call contract methods and more - Use JSON-RPC API to communicate with NEAR from any context (other than JS / TS) - Manage devops with NEAR Shell dApp Contract Development - Use near-sdk-as to build contracts using AssemblyScript - Use near-sdk-rs to build contracts using Rust - Compose deployed contracts using cross-contract calls
  • 46. NEAR exposes two development interfaces dApp UX development - Use near-api-js to connect to NEAR, manage accounts, call contract methods and more - Use JSON-RPC API to communicate with NEAR from any context (other than JS / TS) - Manage devops with NEAR Shell dApp Contract Development - Use near-sdk-as to build contracts using AssemblyScript - Use near-sdk-rs to build contracts using Rust - Compose deployed contracts using cross-contract calls
  • 47. Structure of the Sample Application Runtime Layer state storage virtual machine code load apply result read write Your dApp send receive Blockchain Layer RPC Interface - P2P network - Consensus - Block Storage near-api-js contracts near-sdk-as near-sdk-rs deploy
  • 48. write read` Runtime Layer state storage virtual machine code load apply result Your dApp send receive Blockchain Layer RPC Interface - P2P network - Consensus - Block Storage near-api-js contracts near-sdk-as near-sdk-rs deploy Structure of the Sample Application
  • 49. Lifecycle of a transaction Runtime Layer state storage virtual machine code load apply result read write Your dApp send receive Blockchain Layer RPC Interface - P2P network - Consensus - Block Storage near-api-js contracts near-sdk-as near-sdk-rs 1 2 3 4 5 6 7 deploy
  • 50. Account ≈ Contract + State Runtime Layer state storage virtual machine code load read write
  • 51. Account ≈ Contract + State Runtime Layer virtual machine code load metadata result read write data apply state storage
  • 52. Runtime Layer result apply Account ≈ Contract + State virtual machine code load read write key value STATE your contract code message “hello world” counter 3 prefix::identifier value at collection key prefix::len PersistentVector length prefix::last PersistentDeque last item state storage
  • 54. Rust (contract data) AssemblyScript (contract data) AssemblyScript & Rust contract alignment
  • 55. Rust (contract behavior) AssemblyScript (contract behavior) AssemblyScript & Rust contract alignment
  • 56. “To enable WebAssembly to be read and edited by humans, there is a textual representation of the wasm binary format. This is an intermediate form designed to be exposed in text editors, browser developer tools, etc.” -- Understanding WebAssembly text format Although we will not spend time on this topic, this format has proven consistently readable (especially with AssemblyScript) if only to sanity check that exported contract functions are visible and near-sdk-as runtime components are being called in the right places. The output is always a .wasm file
  • 58. Guest Book User Interface
  • 59. - there are 2 main folders in the project: - assembly contains the smart contract and tests - src contains the application’s UX and tests - there is another folder to be aware of: - neardev contains contract account details - this is for development only, your local credentials will be in ~/.near-credentials Guest Book Filesystem
  • 60. Guest Book Contract Data Model : assembly/model.ts - PostedMessage is a serializable class with three attributes: - premium to flag messages with attached NEAR tokens - sender to track the signer of the guest book message - text to hold the guest book message - messages is a collection of guest book messages stored as a PersistentVector of PostedMessage objects note: @nearBindgen marks the class as serializable Contract
  • 61. Contract Behavior : assembly/main.ts - MESSAGE_LIMIT is used to avoid unbounded calls (ie. potentially expensive) to retrieve guest book messages from storage - two public functions are exposed on the contract: - addMessage(text: string): void - getMessages(): PostedMessage[] Guest Book Contract
  • 62. Guest Book Network Connection : src/config.js - data and endpoints required to connect to the NEAR network - connection information is included for MainNet, TestNet and BetaNet as well as the default LocalNet configuration Frontend
  • 63. Guest Book Frontend Configuration : src/index.js - configure connection to NEAR network - configure contract interface by injecting wallet connection and wiring up both contract methods - contract is a proxy object for JSON RPC API calls with methods attached - contract methods are attached to the object as either view or change type and return a Promise
  • 64. Guest Book Authentication : src/App.js - NEAR Wallet is used for authentication - near-api-js exposes two related methods - wallet.requestSignIn() - wallet.signOut() note: useCallback() is a React Hook Frontend
  • 65. CRUD : src/App.js - add a message and, once complete, get a list of all messages (up to MESSAGE_LIMIT) - contract.addMessage accepts parameters as a JSON object and returns nothing - two other parameters are optional - gas (a “boatload”) to override client defaults - attached value (in NEAR tokens) Guest Book Frontend
  • 66. Monitoring the application ... http post https://rpc.testnet.near.org jsonrpc=2.0 id=dontcare method=query params:='{ "request_type": "view_state", "finality": "final", "account_id": "test", "prefix_base64": "U1RBVEU=" }’ And, using the watch command and some JSON formatting with jq, automatically refresh a convenient view while we use the Guestbook example. Here’s how. Also see here for our JSON RPC API docs https://docs.near.org/docs/interaction/rpc Guest Book Demo: Monitoring
  • 68. - Ethereum supports two types of accounts 1. Externally Owned Accounts (EOA) a. identified by last 20 bytes of the keccak-256 hash of a public key b. controlled by a private key of the same public-private key pair c. can sign and send transactions to other EOAs or contract accounts 2. Contract Accounts a. controlled by contract code, no keys involved b. can only send transactions in response to being triggered c. are of two subtypes i. Simple ii. Multisig From Ethereum to NEAR accounts
  • 69. - From Ethereum to NEAR NEAR supports one type of account - human readable name (like having ENS baked into the protocol *) - may represent a user, contract or both - are controlled by an unlimited number of keys - two types - FullAccess: can do anything with the account, including send tokens and delete account - FunctionCall: can only call contract functions which may be limited in scope and budget * NEAR accounts follow a human friendly DNS naming pattern with similar scoping rules for ownership and control. For example user.testnet controls app1.user.testnet and app2.user.testnet. accounts
  • 70. - Ethereum - nonce - balance - storageRoot - codeHash* * codeHash may be either: - hash of an empty string (EOAs) - hash of the code of the contract NEAR - balance - locked balance (for staking) - code of the contract ** - storage (key-value store for contract data) - access keys *** (FullAccess, FunctionCall) - postponed ActionReceipts (ie. “todo”) - received DataReceipts (ie. “done”) ** code_hash is similar to Ethereum *** each access key tracks its own nonce note that receipts are used to manage cross-contract calls From Ethereum to NEAR accounts
  • 72. - managing NEAR primitives: - key stores - accounts - contracts - wallets - connection providers (RPC) - generating key pairs locally - creating transactions locally - signing transactions locally - sending transactions to the network near-api-js Library designed to connect to the NEAR platform from any JavaScript execution context (server-side or client-side JS)
  • 75. near-api-js Your dApp Examples at near.dev NEAR Explorer NEAR Wallet NEAR CLI send receive RPC Interface Blockchain Layer near-api-js uses JSON RPC API
  • 76. near-api-js Your dApp Examples at near.dev NEAR Explorer NEAR Wallet NEAR CLI send receive RPC Interface Blockchain Layer near-api-js uses JSON RPC API
  • 78. visit near.help Touch base on Telegram Discover us on Discord Suggest topics on StackOverflow