github.com/sberex/go-sberex@v1.8.2-0.20181113200658-ed96ac38f7d7/params/gas_table.go (about)

     1  // This file is part of the go-sberex library. The go-sberex library is 
     2  // free software: you can redistribute it and/or modify it under the terms 
     3  // of the GNU Lesser General Public License as published by the Free 
     4  // Software Foundation, either version 3 of the License, or (at your option)
     5  // any later version.
     6  //
     7  // The go-sberex library is distributed in the hope that it will be useful, 
     8  // but WITHOUT ANY WARRANTY; without even the implied warranty of
     9  // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser 
    10  // General Public License <http://www.gnu.org/licenses/> for more details.
    11  
    12  package params
    13  
    14  type GasTable struct {
    15  	ExtcodeSize uint64
    16  	ExtcodeCopy uint64
    17  	Balance     uint64
    18  	SLoad       uint64
    19  	Calls       uint64
    20  	Suicide     uint64
    21  
    22  	ExpByte uint64
    23  
    24  	// CreateBySuicide occurs when the
    25  	// refunded account is one that does
    26  	// not exist. This logic is similar
    27  	// to call. May be left nil. Nil means
    28  	// not charged.
    29  	CreateBySuicide uint64
    30  }
    31  
    32  var (
    33  	// GasTableHomestead contain the gas prices for
    34  	// the homestead phase.
    35  	GasTableHomestead = GasTable{
    36  		ExtcodeSize: 20,
    37  		ExtcodeCopy: 20,
    38  		Balance:     20,
    39  		SLoad:       50,
    40  		Calls:       40,
    41  		Suicide:     0,
    42  		ExpByte:     10,
    43  	}
    44  
    45  	// GasTableHomestead contain the gas re-prices for
    46  	// the homestead phase.
    47  	GasTableEIP150 = GasTable{
    48  		ExtcodeSize: 700,
    49  		ExtcodeCopy: 700,
    50  		Balance:     400,
    51  		SLoad:       200,
    52  		Calls:       700,
    53  		Suicide:     5000,
    54  		ExpByte:     10,
    55  
    56  		CreateBySuicide: 25000,
    57  	}
    58  
    59  	GasTableEIP158 = GasTable{
    60  		ExtcodeSize: 700,
    61  		ExtcodeCopy: 700,
    62  		Balance:     400,
    63  		SLoad:       200,
    64  		Calls:       700,
    65  		Suicide:     5000,
    66  		ExpByte:     50,
    67  
    68  		CreateBySuicide: 25000,
    69  	}
    70  )