GithubHelp home page GithubHelp logo

nico-vrn / ethereum_project Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 8 KB

Ce projet est un exemple d'application Web qui utilise la bibliothèque Web3.js pour envoyer de l'ETH à une adresse Ethereum spécifiée et obtenir le compte Ethereum de l'utilisateur.

License: MIT License

HTML 35.83% JavaScript 64.17%

ethereum_project's Introduction

Ethereum Web3.js Project

Ce projet est un exemple d'application Web qui utilise la bibliothèque Web3.js pour interagir avec la blockchain Ethereum via un navigateur Web.

Fonctionnalités

Le projet offre deux fonctionnalités principales :

  1. Sending Ethereum to an address : L'utilisateur peut envoyer de l'ETH à une adresse Ethereum spécifiée en cliquant sur le bouton "sendEthButton". Cette fonctionnalité utilise la méthode "eth_sendTransaction" de l'objet "ethereum" pour envoyer une transaction avec les paramètres suivants :
  • from: le compte Ethereum de l'utilisateur
  • to: l'adresse Ethereum du destinataire
  • value: la quantité d'ETH à envoyer, en Wei (1 ETH = 10^18 Wei)
  • gasPrice: le prix du gas pour la transaction, en Wei par unité de gas
  • gas: la quantité maximale de gas à utiliser pour la transaction
  1. Getting Ethereum account : L'utilisateur peut obtenir son compte Ethereum en cliquant sur le bouton "enableEthereumButton". Cette fonctionnalité utilise la méthode "eth_requestAccounts" de l'objet "ethereum" pour demander au navigateur l'autorisation d'accéder à un compte Ethereum. Si l'utilisateur accepte l'autorisation, la variable "accounts" est mise à jour avec le compte Ethereum de l'utilisateur.

Prérequis

Pour exécuter ce projet, vous devez disposer des éléments suivants :

  • Un navigateur Web prenant en charge la spécification Web3 (par exemple, Google Chrome avec l'extension Metamask installée)
  • Une adresse Ethereum avec des fonds pour effectuer des transactions

Installation

  1. Clonez ce dépôt de code sur votre machine locale :
git clone https://github.com/votre-utilisateur/ethereum-web3js-project.git
  1. Ouvrez le fichier index.html dans un navigateur Web.

Configuration

Aucune configuration n'est requise pour ce projet.

Utilisation

  1. Cliquez sur le bouton enableEthereumButton pour autoriser le navigateur à accéder à votre compte Ethereum.

  2. Cliquez sur le bouton sendEthButton pour envoyer de l'ETH à une adresse Ethereum spécifiée.

Ressources supplémentaires

Auteur

Ce projet a été créé par Lefranc Nicolas en 2021.

ethereum_project's People

Contributors

nico-vrn avatar

Watchers

Kostas Georgiou avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.