Add True Eth2 Deposit Contract, Bytecode, ABI (#9637)

* solidity contract, abi, and deposit util

* gaz

* gaz

* drain contract remove

* build

* fix up deploy

* add readme

* fix e2e

* revert

* revert flag

* fix

* revert test flag

* fix broken test

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
This commit is contained in:
Raul Jordan
2021-09-22 12:27:13 -05:00
committed by GitHub
parent f52f737d2b
commit 191bce3655
45 changed files with 386 additions and 729 deletions

View File

@@ -23,7 +23,7 @@ go_test(
deps = [
":go_default_library",
"//config/params:go_default_library",
"//contracts/deposit-contract:go_default_library",
"//contracts/deposit:go_default_library",
"//crypto/hash:go_default_library",
"//proto/prysm/v1alpha1:go_default_library",
"//shared/bytesutil:go_default_library",

View File

@@ -28,6 +28,13 @@ func NewTrie(depth uint64) (*SparseMerkleTrie, error) {
return GenerateTrieFromItems(items, depth)
}
// NewTrieWithBranches returns a new merkle trie filled with branches to use.
func NewTrieWithBranches(branches [][][]byte, depth uint64) (*SparseMerkleTrie, error) {
var zeroBytes [32]byte
items := [][]byte{zeroBytes[:]}
return GenerateTrieFromItems(items, depth)
}
// CreateTrieFromProto creates a Sparse Merkle Trie from its corresponding merkle trie.
func CreateTrieFromProto(trieObj *protodb.SparseMerkleTrie) *SparseMerkleTrie {
trie := &SparseMerkleTrie{

View File

@@ -7,7 +7,7 @@ import (
"github.com/ethereum/go-ethereum/accounts/abi/bind"
"github.com/prysmaticlabs/prysm/config/params"
"github.com/prysmaticlabs/prysm/container/trie"
contracts "github.com/prysmaticlabs/prysm/contracts/deposit-contract"
contracts "github.com/prysmaticlabs/prysm/contracts/deposit"
"github.com/prysmaticlabs/prysm/crypto/hash"
ethpb "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1"
"github.com/prysmaticlabs/prysm/shared/bytesutil"