0
votes

First of all, i am a beginner on this domain.

I would like to create a smart contract which can retrieve ether from addresses whom sent, via a button on a html using web3js.

1

1 Answers

0
votes

You have asked about different topics here. So basically what you need for this application is.

  1. Blockchain node(Ethereum)
  2. Solidity Smart Contract
  3. JS project with web3.js

For the simplest case what you can do is to have the function as payable in your smart contract.Whenever the transaction is being done from some account, the ether will be deducted according to your logic. Now, you are talking about the button to send the transaction. For this you have to associate the address of the ethereum account to your button and this ethereum account should be unlocked in your node. whenever you will press the button it will take the account address in your web3.js send method and your transaction will be done through this account address.

As you have asked about alot of things here. No one can give you a complete application or answer here so you have to search on internet there are plenty of resources are available.