mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-03 17:44:29 +00:00
11 lines
185 B
Go
11 lines
185 B
Go
|
package accounts
|
||
|
|
||
|
import (
|
||
|
"math/big"
|
||
|
)
|
||
|
|
||
|
func EtherAmount(amount float64) *big.Int {
|
||
|
ether, _ := (&big.Float{}).Mul(big.NewFloat(1e18), big.NewFloat(amount)).Int(nil)
|
||
|
return ether
|
||
|
}
|