Skip to content

Commit

Permalink
Add faucet account
Browse files Browse the repository at this point in the history
Creates a faucet account.
  • Loading branch information
carterqw2 authored and karlb committed Dec 20, 2023
1 parent 613d9c3 commit de340ad
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions core/celo_genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ func CalcMapAddr(slot common.Hash, key common.Hash) common.Hash {
var DevPrivateKey, _ = crypto.HexToECDSA("2771aff413cac48d9f8c114fabddd9195a2129f3c2c436caa07e27bb7f58ead5")
var DevAddr = common.BytesToAddress(DevAddr32.Bytes())
var DevAddr32 = common.HexToHash("0x42cf1bbc38BaAA3c4898ce8790e21eD2738c6A4a")
var FaucetAddr = common.HexToAddress("0xfcf982bb4015852e706100b14e21f947a5bb718e")

func celoGenesisAccounts() map[common.Address]GenesisAccount {
// As defined in ERC-1967: Proxy Storage Slots (https://eips.ethereum.org/EIPS/eip-1967)
Expand Down Expand Up @@ -79,6 +80,10 @@ func celoGenesisAccounts() map[common.Address]GenesisAccount {
if !ok {
panic("Could not set devBalance!")
}
faucetBalance, ok := new(big.Int).SetString("500000000000000000000000000", 10) // 500M
if !ok {
panic("Couldn not set faucet balance!")
}
return map[common.Address]GenesisAccount{
contracts.RegistryAddress: { // Registry Proxy
Code: proxyBytecode,
Expand Down Expand Up @@ -135,5 +140,8 @@ func celoGenesisAccounts() map[common.Address]GenesisAccount {
DevAddr: {
Balance: devBalance,
},
FaucetAddr: {
Balance: faucetBalance,
},
}
}

0 comments on commit de340ad

Please sign in to comment.