github.com/klaytn/klaytn@v1.12.1/params/denomination.go (about)

     1  // Modifications Copyright 2018 The klaytn Authors
     2  // Copyright 2015 The go-ethereum Authors
     3  // This file is part of the go-ethereum library.
     4  //
     5  // The go-ethereum library is free software: you can redistribute it and/or modify
     6  // it under the terms of the GNU Lesser General Public License as published by
     7  // the Free Software Foundation, either version 3 of the License, or
     8  // (at your option) any later version.
     9  //
    10  // The go-ethereum library is distributed in the hope that it will be useful,
    11  // but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    13  // GNU Lesser General Public License for more details.
    14  //
    15  // You should have received a copy of the GNU Lesser General Public License
    16  // along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.
    17  //
    18  // This file is derived from params/denomination.go (2018/06/04).
    19  // Modified and improved for the klaytn development.
    20  
    21  package params
    22  
    23  // These are the multipliers for KLAY denominations.
    24  // Example: To get the peb value of an amount in 'ston', use
    25  //
    26  //    new(big.Int).Mul(value, big.NewInt(params.Ston))
    27  //
    28  const (
    29  	Peb      = 1    // official notation 'peb'
    30  	Kpeb     = 1e3  // official notation 'kpeb'
    31  	Mpeb     = 1e6  // same
    32  	Gpeb     = 1e9  // same
    33  	Ston     = 1e9  // official notation 'ston'
    34  	UKLAY    = 1e12 // official notation 'uKLAY'
    35  	MiliKLAY = 1e15 // official notation 'mKLAY'
    36  	KLAY     = 1e18 // same
    37  	KKLAY    = 1e21 // official notation 'kKLAY'
    38  	MKLAY    = 1e24 // same
    39  	GKLAY    = 1e27 // same
    40  )