Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 160

Gas is a 'sub-currency' which enables the EVM and Ethereum's decentralised computer to run -- with each operation, an amount of gas (proportional to the computational effort required to perform the operation) is consumed.

5 votes
2 answers
153 views

Why not use mining power to execute contracts?

Ethereum developers certainly considered the idea of using mining power to do useful work - i.e., run contracts - rather than "waste" it with meaningless hashes. I'm interested in knowing what have be …
MaiaVictor's user avatar
  • 3,177
6 votes
2 answers
2k views

How do you compute the right amount of gas and tax to transfer certain amount of money?

You want to transfer all the money in an account and want to compute the right amount of gas and tax suc that you transfer all that is possible and leave the account with 0. … You want to transfer a specific amount of money and want to compute the right amount of gas and tax such that you transfer exactly the desired amount. How do you compute both values? …
MaiaVictor's user avatar
  • 3,177
7 votes
2 answers
198 views

Why setting fields of a memory object and then storing it all at once is more expensive than...

Mind the following code: // This is expensive obj.a = uint32(obja); obj.b = uint32(objb); obj.c = uint32(objc); objs[objName] = obj; // This is much cheaper objs[objName].a = uint32(obja); objs[objN …
MaiaVictor's user avatar
  • 3,177
4 votes

How do you implement PubSub without running out of gas (attack vector)?

Then, you just find the subscribing cost as total_messages * message_cost, where message_cost is the gas used to run a single iteration of the loop. …
MaiaVictor's user avatar
  • 3,177
5 votes
1 answer
693 views

Is it possible to make several calls in a single transaction?

Suppose your contract has a very simple function, F(), which takes about 1,000 gas to process. Suppose you want to call that function 100 times. … Since there is an overhead of about 21,000 gas per transaction, you'll be paying 2,200,000 gas. …
MaiaVictor's user avatar
  • 3,177