mirror of
https://github.com/status-im/ethereumj-personal.git
synced 2025-01-13 21:34:13 +00:00
Change my mind on using constants instead of enums for Gas
This commit is contained in:
parent
7013e1ab1a
commit
5d4814a8eb
@ -1,33 +0,0 @@
|
||||
package org.ethereum.vm;
|
||||
|
||||
/**
|
||||
* The fundamental network cost unit. Paid for exclusively by Ether, which is converted
|
||||
* freely to and from Gas as required. Gas does not exist outside of the internal Ethereum
|
||||
* computation engine; its price is set by the Transaction and miners are free to
|
||||
* ignore Transactions whose Gas price is too low.
|
||||
*/
|
||||
public enum Gas {
|
||||
|
||||
G_STEP(1),
|
||||
G_STOP(0),
|
||||
G_SUICIDE(0),
|
||||
G_SLOAD(20),
|
||||
G_SHA3(20),
|
||||
G_SSTORE(100),
|
||||
G_BALANCE(20),
|
||||
G_CREATE(100),
|
||||
G_CALL(20),
|
||||
G_MEMORY(1),
|
||||
G_TXDATA(5),
|
||||
G_TRANSACTION(500);
|
||||
|
||||
private int cost;
|
||||
|
||||
private Gas(int value) {
|
||||
this.cost = value;
|
||||
}
|
||||
|
||||
public int cost() {
|
||||
return cost;
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user