Versions in this module Expand all Collapse all v1 v1.1.3 Jan 20, 2025 v1.1.2 Jan 20, 2025 Changes in this version + const HashPoseidonAllZeroes + const LeafTypeBalance + const LeafTypeCode + const LeafTypeNonce + const LeafTypeSCLength + const LeafTypeStorage + func H4ToString(h4 []uint64) string + func HashContractBytecode(code []byte) ([]uint64, error) + func KeyCodeLength(ethAddr common.Address) ([]byte, error) + func KeyContractCode(ethAddr common.Address) ([]byte, error) + func KeyContractStorage(ethAddr common.Address, storagePos []byte) ([]byte, error) + func KeyEthAddrBalance(ethAddr common.Address) ([]byte, error) + func KeyEthAddrNonce(ethAddr common.Address) ([]byte, error) + func NewMTDBServiceClient(ctx context.Context, c Config) (hashdb.HashDBServiceClient, *grpc.ClientConn, context.CancelFunc) + func ScalarToFilledByteSlice(s *big.Int) []byte + func StringToh4(str string) ([]uint64, error) + type Config struct + URI string + type Key [32]byte + type ProgramProof struct + Data []byte + type Proof struct + Key []uint64 + Root []uint64 + Value []uint64 + type ResultCode int64 + const DBError + const InternalError + const KeyNotFound + const Success + const Unspecified + type StateTree struct + func NewStateTree(client hashdb.HashDBServiceClient) *StateTree + func (tree *StateTree) FinishBlock(ctx context.Context, newRoot common.Hash, uuid string) error + func (tree *StateTree) Flush(ctx context.Context, newStateRoot common.Hash, uuid string) error + func (tree *StateTree) GetBalance(ctx context.Context, address common.Address, root []byte) (*big.Int, error) + func (tree *StateTree) GetCode(ctx context.Context, address common.Address, root []byte) ([]byte, error) + func (tree *StateTree) GetCodeHash(ctx context.Context, address common.Address, root []byte) ([]byte, error) + func (tree *StateTree) GetNonce(ctx context.Context, address common.Address, root []byte) (*big.Int, error) + func (tree *StateTree) GetStorageAt(ctx context.Context, address common.Address, position *big.Int, root []byte) (*big.Int, error) + func (tree *StateTree) SetBalance(ctx context.Context, address common.Address, balance *big.Int, root []byte, ...) (newRoot []byte, proof *UpdateProof, err error) + func (tree *StateTree) SetCode(ctx context.Context, address common.Address, code []byte, root []byte, ...) (newRoot []byte, proof *UpdateProof, err error) + func (tree *StateTree) SetNonce(ctx context.Context, address common.Address, nonce *big.Int, root []byte, ...) (newRoot []byte, proof *UpdateProof, err error) + func (tree *StateTree) SetStorageAt(ctx context.Context, address common.Address, position *big.Int, value *big.Int, ...) (newRoot []byte, proof *UpdateProof, err error) + func (tree *StateTree) StartBlock(ctx context.Context, oldRoot common.Hash, uuid string) error + type UpdateProof struct + Key []uint64 + NewRoot []uint64 + NewValue []uint64 + OldRoot []uint64