-
Notifications
You must be signed in to change notification settings - Fork 289
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Custom genesis generation for [email protected]+.
- Loading branch information
Showing
3 changed files
with
51 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
//go:build 1.19 | ||
// +build 1.19 | ||
|
||
package genesis | ||
|
||
var ContractDeployerKey *ecdsa.PrivateKey | ||
|
||
func init() { | ||
var err error | ||
ContractDeployerKey, err = ecdsa.GenerateKey( | ||
crypto.S256(), | ||
strings.NewReader("Test contract key string stream that is fixed so that generated test key are deterministic every time"), | ||
) | ||
if err != nil { | ||
panic(err) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
//go:build go1.20 | ||
// +build go1.20 | ||
|
||
package genesis | ||
|
||
import ( | ||
"crypto/ecdsa" | ||
"math/big" | ||
|
||
"github.com/ethereum/go-ethereum/crypto" | ||
) | ||
|
||
var ContractDeployerKey *ecdsa.PrivateKey | ||
|
||
func init() { | ||
D := &big.Int{} | ||
D.SetString("65737420636f6e7472616374206b657920737472696e672073747265616d2074", 16) | ||
X := &big.Int{} | ||
X.SetString("3d4fc035410b035f72da12df457ce17e255cede9fc9e72796ac3868ceb2ed226", 16) | ||
Y := &big.Int{} | ||
Y.SetString("808248810e75eb32859e46cdd8e541ed9f323bde6076d2ca6fd75d6cf0ffd089", 16) | ||
|
||
ContractDeployerKey = &ecdsa.PrivateKey{ | ||
D: D, | ||
PublicKey: ecdsa.PublicKey{ | ||
Curve: crypto.S256(), | ||
X: X, | ||
Y: Y, | ||
}, | ||
} | ||
} |