From ce505015e5f973c8f5d605aa468ad75fceeeb169 Mon Sep 17 00:00:00 2001 From: Determinant Date: Mon, 12 Aug 2019 13:04:52 -0400 Subject: ... --- examples/payments/main.go | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'examples') diff --git a/examples/payments/main.go b/examples/payments/main.go index 9a0298d..24ba962 100644 --- a/examples/payments/main.go +++ b/examples/payments/main.go @@ -5,14 +5,29 @@ import ( "encoding/hex" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/common/hexutil" + "github.com/ethereum/go-ethereum/core" + "github.com/Determinant/coreth/eth" "github.com/Determinant/coreth" "github.com/ethereum/go-ethereum/log" + "github.com/ethereum/go-ethereum/params" "time" ) func main() { log.Root().SetHandler(log.StdoutHandler) - chain := coreth.NewETHChain(nil, nil, nil) + config := eth.DefaultConfig + genAddr := common.Address{} + genBalance := big.NewInt(1000000000000000000) + config.Genesis = &core.Genesis{ + Config: params.MainnetChainConfig, + Nonce: 66, + ExtraData: hexutil.MustDecode("0x11bbe8db4e347b4e8c937c1c8370e4b5ed33adb3db69cbdb7a38e1e50b1b82fa"), + GasLimit: 5000, + Difficulty: big.NewInt(0), + Alloc: core.GenesisAlloc{genAddr: {Balance: genBalance }}, + } + chain := coreth.NewETHChain(&config, nil, nil) to := common.Address{} nouce := 0 amount := big.NewInt(0) -- cgit v1.2.3