|
|
@ -1,7 +1,9 @@ |
|
|
|
package contract |
|
|
|
package contract |
|
|
|
|
|
|
|
|
|
|
|
import ( |
|
|
|
import ( |
|
|
|
"github.com/ethereum/go-ethereum/common" |
|
|
|
"crypto/ecdsa" |
|
|
|
|
|
|
|
"strings" |
|
|
|
|
|
|
|
|
|
|
|
"github.com/ethereum/go-ethereum/crypto" |
|
|
|
"github.com/ethereum/go-ethereum/crypto" |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
@ -12,15 +14,22 @@ type DeployAccount struct { |
|
|
|
Public string |
|
|
|
Public string |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// GenesisBeaconAccount is the account which creates contract account.
|
|
|
|
// // GenesisBeaconAccount is the account which creates contract account.
|
|
|
|
var GenesisBeaconAccount = DeployAccount{ |
|
|
|
// var GenesisBeaconAccount = DeployAccount{
|
|
|
|
Address: "0x4e464afF0aB44780fC9A008AC890047BcbDf376f", |
|
|
|
// Address: "0x4e464afF0aB44780fC9A008AC890047BcbDf376f",
|
|
|
|
Private: "b167c74da42202fc2093f8e2ed8171b4ad67d095595ac655fc56df236cad9714", |
|
|
|
// Private: "b167c74da42202fc2093f8e2ed8171b4ad67d095595ac655fc56df236cad9714",
|
|
|
|
Public: "0x4e464afF0aB44780fC9A008AC890047BcbDf376f", |
|
|
|
// Public: "0x4e464afF0aB44780fC9A008AC890047BcbDf376f",
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func BeaconAccountPriKey() *ecdsa.PrivateKey { |
|
|
|
|
|
|
|
prikey, _ := ecdsa.GenerateKey(crypto.S256(), strings.NewReader("Deposit Smart Contract Key")) |
|
|
|
|
|
|
|
return prikey |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var GenesisBeaconAccountPriKey = BeaconAccountPriKey() |
|
|
|
|
|
|
|
|
|
|
|
// DeployedContractAddress is the deployed contract address of the staking smart contract in beacon chain.
|
|
|
|
// DeployedContractAddress is the deployed contract address of the staking smart contract in beacon chain.
|
|
|
|
var DeployedContractAddress = crypto.CreateAddress(common.HexToAddress(GenesisBeaconAccount.Address), uint64(0)) |
|
|
|
var DeployedContractAddress = crypto.CreateAddress(crypto.PubkeyToAddress(GenesisBeaconAccountPriKey.PublicKey), uint64(0)) |
|
|
|
|
|
|
|
|
|
|
|
// FakeAccounts is the accounts only used for development purpose.
|
|
|
|
// FakeAccounts is the accounts only used for development purpose.
|
|
|
|
var FakeAccounts = [...]DeployAccount{ |
|
|
|
var FakeAccounts = [...]DeployAccount{ |
|
|
|