Differences

This shows you the differences between two versions of the page.

Link to this comparison view

fob:laboratoare:02 [2022/10/20 16:47]
costin.carabas [Decentralized Applications (dApps)]
fob:laboratoare:02 [2023/01/23 12:01] (current)
costin.carabas [Prerequisites]
Line 1: Line 1:
-===== Practical Session 02. =====+===== dApps =====
  
-==== Prerequisites ==== 
  
 +==== Decentralized Applications (dApps) ====
  
-''​sudo apt-get update''​+In this first task, you will interact with a dApp.
  
-''​sudo apt install libncurses5 build-essential python3-pip nodejs npm python3.8-venv''​+{{:​fob:​laboratoare:​dapp-problem.png?500|}}
  
 +<note important>​This application is deployed on devnet, so you will need to Faucet tokens on devnet wallet</​note>​
  
-**Erdpy** - the Elrond command line tool, which is helpful for signing transactions,​ deploying smart contracts, managing wallets, accounts and validators: 
  
-''​wget -O erdpy-up.py https://​raw.githubusercontent.com/​ElrondNetwork/​elrond-sdk-erdpy/​master/​erdpy-up.py''​+You will connect with your wallet and play a Ping Pong gameFirst you will press Ping button, which will call a `ping` endpoint and send 1 xEGLD. After 15 minutes, you will press Pong button and will receive your 1 xEGLD back:
  
-''​python3 erdpy-up.py''​+  * Go to [[https://​10.41.217.234:​3001| Fob First dApp]] 
 +  * Connect to you wallet 
 +  * Press **Ping** 
 +  * Wait 10 minutes 
 +  * Press **Pong** to get your funds back 
 +  * Go to [[https://​devnet-explorer.elrond.com/​|explorer]] to inspect your transactions
  
  
-Restart the session ​to active **erdpy**:+The dApp you are seeing is connected ​to [[https://​devnet-explorer.elrond.com/​accounts/​erd1qqqqqqqqqqqqqpgqss6ch3dat9u9sm6487n9p7l9wna5zhj6jn2qh2nmjk|erd1qqqqqqqqqqqqqpgqss6ch3dat9u9sm6487n9p7l9wna5zhj6jn2qh2nmjk]] Smart Conctract.
  
-''​source ~/.profile''​+You can inspect the code [[https://​github.com/​ElrondNetwork/​ping-pong-smart-contract|here]].
  
 +{{:​fob:​laboratoare:​dapp-architecture.png?​500|}}
  
-More about **erdpy** installation at: https://​docs.elrond.com/​sdk-and-tools/​erdpy/​installing-erdpy/​ 
  
 +==== Prerequisites ====
  
-==== Command line wallet ==== 
  
-In this task you will create a new wallet using a command line:+''​sudo apt-get update''​
  
-Use ''​erdpy wallet [help]'' ​command to create a new wallet. ​+''​sudo apt install libncurses5 build-essential python3-pip nodejs npm python3.8-venv''​
  
-Create a **pem** file to login more easily.+<note important>​Erdpy is now called mxpy, after rebranding ​to MultiversX</​note>​
  
 +**Erdpy** - the Elrond command line tool, which is helpful for signing transactions,​ deploying smart contracts, managing wallets, accounts and validators:
  
-==== Decentralized Applications (dApps) ====+''​wget -O mxpy-up.py https://​raw.githubusercontent.com/​multiversx/​mx-sdk-py-cli/​main/​mxpy-up.py''​
  
-In this first task, you will interact with a dApp.+''​python3 erdpy-up.py''​
  
-{{:​fob:​laboratoare:​dapp-problem.png?​500|}} 
  
 +Restart the session to active **erdpy**:
  
-You will connect with your wallet and play a Ping Pong gameFirst you will press Ping button, which will call a `ping` endpoint and send 1 xEGLD. After 15 minutes, you will press Pong button and will receive your 1 xEGLD back:+''​source ~/.profile''​
  
-  * Go to [[https://​10.41.217.234:​3001| Fob First dApp]] 
-  * Connect to you wallet 
-  * Press **Ping** 
-  * Wait 10 minutes 
-  * Press **Pong** to get your funds back 
-  * Go to [[https://​devnet-explorer.elrond.com/​|explorer]] to inspect your transactions. ​ 
  
 +More about **erdpy** / **mxpy** installation at [[https://​docs.multiversx.com/​sdk-and-tools/​sdk-py/​installing-mxpy | link]]
  
-The dApp you are seeing is connected to [[https://​devnet-explorer.elrond.com/​accounts/​erd1qqqqqqqqqqqqqpgqss6ch3dat9u9sm6487n9p7l9wna5zhj6jn2qh2nmjk|erd1qqqqqqqqqqqqqpgqss6ch3dat9u9sm6487n9p7l9wna5zhj6jn2qh2nmjk]] Smart Conctract. 
  
-You can inspect the code [[https://​github.com/​ElrondNetwork/​ping-pong-smart-contract|here]].+==== Command line wallet ====
  
-{{:fob:​laboratoare:​dapp-architecture.png?500|}}+In this task you will create a new wallet using a command line: 
 + 
 +Use ''​erdpy wallet [help]''​ command to create a new wallet.  
 + 
 +Create a **pem** file to login more easily.
  
  
fob/laboratoare/02.1666273620.txt.gz · Last modified: 2022/10/20 16:47 by costin.carabas
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0