Alloc file for dev chain (#3626)

* chore: alloc file for dev chain

* chore: fix lint issue

Co-authored-by: Moritz Hoffmann <moritz@btcx.com>
This commit is contained in:
mohoff 2022-02-26 11:27:22 +04:00 committed by GitHub
parent 58851feb9b
commit c5e03fd852
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 36 additions and 12 deletions

35
core/allocs/dev.json Normal file
View File

@ -0,0 +1,35 @@
{
"0x0000000000000000000000000000000000000001": {
"balance": "0x1"
},
"0x0000000000000000000000000000000000000002": {
"balance": "0x1"
},
"0x0000000000000000000000000000000000000003": {
"balance": "0x1"
},
"0x0000000000000000000000000000000000000004": {
"balance": "0x1"
},
"0x0000000000000000000000000000000000000005": {
"balance": "0x1"
},
"0x0000000000000000000000000000000000000006": {
"balance": "0x1"
},
"0x0000000000000000000000000000000000000007": {
"balance": "0x1"
},
"0x0000000000000000000000000000000000000008": {
"balance": "0x1"
},
"0x0000000000000000000000000000000000000009": {
"balance": "0x1"
},
"0x67b1d87101671b127f5f8714789C7192f7ad340e": {
"balance": "0x21e19e0c9bab2400000"
},
"0xa94f5374Fce5edBC8E2a8697C15331677e6EbF0B": {
"balance": "0x21e19e0c9bab2400000"
}
}

View File

@ -718,18 +718,7 @@ func DeveloperGenesisBlock(period uint64, faucet common.Address) *Genesis {
ExtraData: append(append(make([]byte, 32), faucet[:]...), make([]byte, crypto.SignatureLength)...),
GasLimit: 11500000,
Difficulty: big.NewInt(1),
Alloc: map[common.Address]GenesisAccount{
common.BytesToAddress([]byte{1}): {Balance: big.NewInt(1)}, // ECRecover
common.BytesToAddress([]byte{2}): {Balance: big.NewInt(1)}, // SHA256
common.BytesToAddress([]byte{3}): {Balance: big.NewInt(1)}, // RIPEMD
common.BytesToAddress([]byte{4}): {Balance: big.NewInt(1)}, // Identity
common.BytesToAddress([]byte{5}): {Balance: big.NewInt(1)}, // ModExp
common.BytesToAddress([]byte{6}): {Balance: big.NewInt(1)}, // ECAdd
common.BytesToAddress([]byte{7}): {Balance: big.NewInt(1)}, // ECScalarMul
common.BytesToAddress([]byte{8}): {Balance: big.NewInt(1)}, // ECPairing
common.BytesToAddress([]byte{9}): {Balance: big.NewInt(1)}, // BLAKE2b
faucet: {Balance: new(big.Int).Sub(new(big.Int).Lsh(big.NewInt(1), 256), big.NewInt(9))},
},
Alloc: readPrealloc("allocs/dev.json"),
}
}