Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Can someone explain what this does?

Like, what should a user expect to see when visiting the application, and what a developer could expect to make developing this application further?

I see a "gas" and a "gasprice" used, but ctrl-f doesn't show anything in HN comments, nor in the readme outside of the code, indeed the code itself is commented with:

  // Someone help me understand this.


Just to add to echelon answer, gas represents the computational effort of a specific EVM (ethereum virtual machine) instruction. For example, deploying a contract cost a certain amount of gas, storing a variable another, etc...

However when you send an ethereum transaction (i.e you modify data in the blockchain) you need to pay the miner in ether. You cant pay in gas. So you have to specify how much ether you are willing to pay for each unit of gas, i.e the gasprice. The combination of both (gas x gasprice) will give you the maximum amount of ether you are willing to spend for this transaction.


Just to add to this, here's a website listing some real time stats for ether gas: https://ethgasstation.info/


Gas and gas price determine how much you're willing to pay for your smart contract to be executed. Gas price is the rate you're willing to pay, and gas is how much you're willing to spend for your program to complete. If you run out of gas, your program will not finish execution, and the state will be reset to the start state.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: