web3j - imagair.imag.fr/images/8/8d/presentation_web3j.pdf · définition 3 une librairie légère,...
TRANSCRIPT
![Page 1: Web3j - imagair.imag.fr/images/8/8d/Presentation_Web3j.pdf · Définition 3 Une librairie légère, réactive, à typage sûr pour Android, Java, Kotlin et Scala pour connecter des](https://reader034.vdocuments.pub/reader034/viewer/2022042620/5f4b7e5c1361ba667d1c7981/html5/thumbnails/1.jpg)
Enzo MOLION
Web3j
1
![Page 2: Web3j - imagair.imag.fr/images/8/8d/Presentation_Web3j.pdf · Définition 3 Une librairie légère, réactive, à typage sûr pour Android, Java, Kotlin et Scala pour connecter des](https://reader034.vdocuments.pub/reader034/viewer/2022042620/5f4b7e5c1361ba667d1c7981/html5/thumbnails/2.jpg)
Présentation
2
Exposé de veille technologique RICM5
Web3j
![Page 3: Web3j - imagair.imag.fr/images/8/8d/Presentation_Web3j.pdf · Définition 3 Une librairie légère, réactive, à typage sûr pour Android, Java, Kotlin et Scala pour connecter des](https://reader034.vdocuments.pub/reader034/viewer/2022042620/5f4b7e5c1361ba667d1c7981/html5/thumbnails/3.jpg)
Définition
3
Une librairie légère, réactive, à typage sûr pour Android, Java, Kotlin et Scala pour connecter des applications JVM à la chaîne de blocs Ethereum.1
![Page 4: Web3j - imagair.imag.fr/images/8/8d/Presentation_Web3j.pdf · Définition 3 Une librairie légère, réactive, à typage sûr pour Android, Java, Kotlin et Scala pour connecter des](https://reader034.vdocuments.pub/reader034/viewer/2022042620/5f4b7e5c1361ba667d1c7981/html5/thumbnails/4.jpg)
Angle retenu
4
Chaine de blocs
Ethereum
Web3jDémonstration
(Java)
Présentation
![Page 5: Web3j - imagair.imag.fr/images/8/8d/Presentation_Web3j.pdf · Définition 3 Une librairie légère, réactive, à typage sûr pour Android, Java, Kotlin et Scala pour connecter des](https://reader034.vdocuments.pub/reader034/viewer/2022042620/5f4b7e5c1361ba667d1c7981/html5/thumbnails/5.jpg)
Qu’est-ce qu’une chaîne de blocs ?
Qu’est-ce que Ethereum ?
Comment utiliser Web3j ?
Plan
5
![Page 6: Web3j - imagair.imag.fr/images/8/8d/Presentation_Web3j.pdf · Définition 3 Une librairie légère, réactive, à typage sûr pour Android, Java, Kotlin et Scala pour connecter des](https://reader034.vdocuments.pub/reader034/viewer/2022042620/5f4b7e5c1361ba667d1c7981/html5/thumbnails/6.jpg)
Qu’est-ce qu’une chaîne de blocs ?
6
![Page 7: Web3j - imagair.imag.fr/images/8/8d/Presentation_Web3j.pdf · Définition 3 Une librairie légère, réactive, à typage sûr pour Android, Java, Kotlin et Scala pour connecter des](https://reader034.vdocuments.pub/reader034/viewer/2022042620/5f4b7e5c1361ba667d1c7981/html5/thumbnails/7.jpg)
Qu’est-ce qu’une chaîne de blocs ?
7
Technologie de stockage et de transmission d’informations, transparente, sécurisée, et
fonctionnant sans organe central de contrôle.2
DistribuéeImmuable
![Page 8: Web3j - imagair.imag.fr/images/8/8d/Presentation_Web3j.pdf · Définition 3 Une librairie légère, réactive, à typage sûr pour Android, Java, Kotlin et Scala pour connecter des](https://reader034.vdocuments.pub/reader034/viewer/2022042620/5f4b7e5c1361ba667d1c7981/html5/thumbnails/8.jpg)
Qu’est-ce qu’une chaîne de blocs ?
8
Bloc 68Transaction 42
Transaction 43
Transaction 44
Bloc 69Transaction 45
Transaction 46
Transaction 47
Bloc 70Transaction 48
Transaction 49
Transaction 50
Bloc 67Transaction 39
Transaction 40
Transaction 41
Bloc 71Transaction 51
Transaction 52
Transaction 53
![Page 9: Web3j - imagair.imag.fr/images/8/8d/Presentation_Web3j.pdf · Définition 3 Une librairie légère, réactive, à typage sûr pour Android, Java, Kotlin et Scala pour connecter des](https://reader034.vdocuments.pub/reader034/viewer/2022042620/5f4b7e5c1361ba667d1c7981/html5/thumbnails/9.jpg)
Qu’est-ce que Ethereum ?
9
![Page 10: Web3j - imagair.imag.fr/images/8/8d/Presentation_Web3j.pdf · Définition 3 Une librairie légère, réactive, à typage sûr pour Android, Java, Kotlin et Scala pour connecter des](https://reader034.vdocuments.pub/reader034/viewer/2022042620/5f4b7e5c1361ba667d1c7981/html5/thumbnails/10.jpg)
Un protocole de gestion de contrats intelligents
Stockés dans une chaîne de blocs
Utilisant une cryptomonnaie : l’éther
Qu’est-ce que Ethereum ?
10
![Page 11: Web3j - imagair.imag.fr/images/8/8d/Presentation_Web3j.pdf · Définition 3 Une librairie légère, réactive, à typage sûr pour Android, Java, Kotlin et Scala pour connecter des](https://reader034.vdocuments.pub/reader034/viewer/2022042620/5f4b7e5c1361ba667d1c7981/html5/thumbnails/11.jpg)
Un exemple : mécanisme de paiement de loyer décentralisé
Qu’est-ce que Ethereum ?
11
Bail Contrat intelligent
Agence immobilière Chaine de blocs
Frais d’agence Ether
Propriétaire / Locataire Utilisateur de Ethereum
![Page 12: Web3j - imagair.imag.fr/images/8/8d/Presentation_Web3j.pdf · Définition 3 Une librairie légère, réactive, à typage sûr pour Android, Java, Kotlin et Scala pour connecter des](https://reader034.vdocuments.pub/reader034/viewer/2022042620/5f4b7e5c1361ba667d1c7981/html5/thumbnails/12.jpg)
Pas d’indisponibilité
Virtuellement inviolable
Perte d’influence des GAFA
Transparence
Qu’est-ce que Ethereum ?
12
Contrats pas si intelligents
Fluctuation de l’ether
Manque de cadre légal
Transparence
Efficience énergétique
![Page 13: Web3j - imagair.imag.fr/images/8/8d/Presentation_Web3j.pdf · Définition 3 Une librairie légère, réactive, à typage sûr pour Android, Java, Kotlin et Scala pour connecter des](https://reader034.vdocuments.pub/reader034/viewer/2022042620/5f4b7e5c1361ba667d1c7981/html5/thumbnails/13.jpg)
Qu’est-ce que Ethereum ?
13
Vers une migration de la preuve de travail (PoW) à la preuve d’enjeu (PoS) ?
Résolution de problèmes mathématiques 24/24h
Preuve basée sur la contribution à la cryptomonnaie
Sûre à terme et “plus très éloignée”3
![Page 14: Web3j - imagair.imag.fr/images/8/8d/Presentation_Web3j.pdf · Définition 3 Une librairie légère, réactive, à typage sûr pour Android, Java, Kotlin et Scala pour connecter des](https://reader034.vdocuments.pub/reader034/viewer/2022042620/5f4b7e5c1361ba667d1c7981/html5/thumbnails/14.jpg)
Comment utiliser web3j ?
14
![Page 15: Web3j - imagair.imag.fr/images/8/8d/Presentation_Web3j.pdf · Définition 3 Une librairie légère, réactive, à typage sûr pour Android, Java, Kotlin et Scala pour connecter des](https://reader034.vdocuments.pub/reader034/viewer/2022042620/5f4b7e5c1361ba667d1c7981/html5/thumbnails/15.jpg)
Comment utiliser Web3j ?
15
![Page 16: Web3j - imagair.imag.fr/images/8/8d/Presentation_Web3j.pdf · Définition 3 Une librairie légère, réactive, à typage sûr pour Android, Java, Kotlin et Scala pour connecter des](https://reader034.vdocuments.pub/reader034/viewer/2022042620/5f4b7e5c1361ba667d1c7981/html5/thumbnails/16.jpg)
Comment utiliser Web3j ?
16
![Page 17: Web3j - imagair.imag.fr/images/8/8d/Presentation_Web3j.pdf · Définition 3 Une librairie légère, réactive, à typage sûr pour Android, Java, Kotlin et Scala pour connecter des](https://reader034.vdocuments.pub/reader034/viewer/2022042620/5f4b7e5c1361ba667d1c7981/html5/thumbnails/17.jpg)
Démonstration
17
![Page 18: Web3j - imagair.imag.fr/images/8/8d/Presentation_Web3j.pdf · Définition 3 Une librairie légère, réactive, à typage sûr pour Android, Java, Kotlin et Scala pour connecter des](https://reader034.vdocuments.pub/reader034/viewer/2022042620/5f4b7e5c1361ba667d1c7981/html5/thumbnails/18.jpg)
Démonstration
18
Créer un client Ethereum (ici il est déjà déployé par Infuria)
Creer un portefeuille Ethereum./web3j wallet create
![Page 19: Web3j - imagair.imag.fr/images/8/8d/Presentation_Web3j.pdf · Définition 3 Une librairie légère, réactive, à typage sûr pour Android, Java, Kotlin et Scala pour connecter des](https://reader034.vdocuments.pub/reader034/viewer/2022042620/5f4b7e5c1361ba667d1c7981/html5/thumbnails/19.jpg)
19
Création du compte Infuria
Création du portefeuille Ethereum
![Page 20: Web3j - imagair.imag.fr/images/8/8d/Presentation_Web3j.pdf · Définition 3 Une librairie légère, réactive, à typage sûr pour Android, Java, Kotlin et Scala pour connecter des](https://reader034.vdocuments.pub/reader034/viewer/2022042620/5f4b7e5c1361ba667d1c7981/html5/thumbnails/20.jpg)
Démonstration
20
Coder son application Java (ici récupérer et modifier le projet Sample Project Gradle) : git clone https://github.com/web3j/sample-project-gradle.gitcd sample-project-gradle
Compiler le code du contrat intelligent solc src/main/solidity/greeter/Greeter.sol --bin --abi --optimize -o build/ --overwriteGénérer les “wrappers” java pour Greeter./web3j solidity generate -b build/Greeter.bin -a build/Greeter.abi -p org.web3j.visudemo.generated -o src/main/java/
![Page 21: Web3j - imagair.imag.fr/images/8/8d/Presentation_Web3j.pdf · Définition 3 Une librairie légère, réactive, à typage sûr pour Android, Java, Kotlin et Scala pour connecter des](https://reader034.vdocuments.pub/reader034/viewer/2022042620/5f4b7e5c1361ba667d1c7981/html5/thumbnails/21.jpg)
Démonstration
21
Lancer l’application./gradlew && ./gradlew build
![Page 22: Web3j - imagair.imag.fr/images/8/8d/Presentation_Web3j.pdf · Définition 3 Une librairie légère, réactive, à typage sûr pour Android, Java, Kotlin et Scala pour connecter des](https://reader034.vdocuments.pub/reader034/viewer/2022042620/5f4b7e5c1361ba667d1c7981/html5/thumbnails/22.jpg)
22
Sources
1 : Web3j <https://goo.gl/5BqVau>2 : Blockchain France <goo.gl/avqMUX>
3 : Forbes <goo.gl/Grr6KD>
ethereum.org et web3j.io+ recherches diverses sur le fonctionnement de la
chaîne de blocs