erigon-pulse/cmd/devnet/accounts/util.go
Mark Holt 751f62615d
Devnet sync events (#7911)
This request implements an end to end Polygon state sync in the devnet.

It does this by deploying smart contracts ont the L2 & L2 chain which
follow the polygon fx portal model with security checks removed to
simplify the code. The sync events generated are routed through a local
mock heimdal - to avoid the consensus process for testing purposes.

The commit also includes support code to help the delivery of additional
contract based scenratios.
2023-07-20 23:10:18 +01:00

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
}