Skip to content

Commit

Permalink
ReadOnlyStateDB: Allow more calls (#160)
Browse files Browse the repository at this point in the history
  • Loading branch information
palango authored Jun 27, 2024
1 parent 99afa46 commit edab687
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions contracts/read_only_statedb.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ import (
// GetState(common.Address, common.Hash) common.Hash
// GetCodeHash(common.Address) common.Hash
// GetCode(common.Address) []byte
// GetBalance(common.Address) *uint256.Int
// Exists(common.Address) bool
// Empty(common.Address) bool
//
// Gas calculations based on ReadOnlyStateDB will be wrong because the accessed storage slots and addresses are not tracked.
type ReadOnlyStateDB struct {
Expand All @@ -37,10 +40,6 @@ func (r *ReadOnlyStateDB) AddBalance(_ common.Address, amount *uint256.Int) {
panic("not implemented")
}

func (r *ReadOnlyStateDB) GetBalance(common.Address) *uint256.Int {
panic("not implemented")
}

func (r *ReadOnlyStateDB) GetNonce(common.Address) uint64 {
panic("not implemented")
}
Expand Down Expand Up @@ -97,14 +96,6 @@ func (r *ReadOnlyStateDB) Selfdestruct6780(common.Address) {
panic("not implemented")
}

func (r *ReadOnlyStateDB) Exist(common.Address) bool {
panic("not implemented")
}

func (r *ReadOnlyStateDB) Empty(common.Address) bool {
panic("not implemented")
}

func (r *ReadOnlyStateDB) AddressInAccessList(addr common.Address) bool {
// We don't track access lists
return false
Expand Down

0 comments on commit edab687

Please sign in to comment.