Skip to content

Commit

Permalink
adjusting imports
Browse files Browse the repository at this point in the history
  • Loading branch information
ABD-AZE committed Oct 7, 2024
1 parent d89da80 commit 2dc60d3
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 26 deletions.
3 changes: 1 addition & 2 deletions execution/rpc/http_rpc.go → execution/http_rpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
"github.com/ethereum/go-ethereum/rpc"
"github.com/ethereum/go-ethereum/common/hexutil"
"github.com/holiman/uint256"
"github.com/BlocSoc-iitr/selene/execution"
"strconv"
)

Expand Down Expand Up @@ -51,7 +50,7 @@ func (h *HttpRpc) GetProof(address *common.Address, slots *[]common.Hash, block
return result.proof, nil
}

func (h *HttpRpc) CreateAccessList(opts *execution.CallOpts, block seleneCommon.BlockTag) (types.AccessList, error) {
func (h *HttpRpc) CreateAccessList(opts CallOpts, block seleneCommon.BlockTag) (types.AccessList, error) {
resultChan := make(chan struct {
accessList types.AccessList
err error
Expand Down
26 changes: 2 additions & 24 deletions execution/rpc/rpc.go → execution/rpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,37 +4,15 @@ import (
seleneCommon "github.com/BlocSoc-iitr/selene/common"
"github.com/ethereum/go-ethereum"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/hexutil"
"github.com/ethereum/go-ethereum/core/types"
"github.com/holiman/uint256"
"github.com/BlocSoc-iitr/selene/execution"
)
type FeeHistory struct {
BaseFeePerGas []hexutil.Big
GasUsedRatio []float64
OldestBlock *hexutil.Big
Reward [][]hexutil.Big
}
//defined storage proof and EIP1186ProofResponse structs
type StorageProof struct {
Key common.Hash
Proof []hexutil.Bytes
Value *uint256.Int
}
type EIP1186ProofResponse struct {
Address seleneCommon.Address
Balance *uint256.Int
CodeHash common.Hash
Nonce uint64
StorageHash common.Hash
AccountProof []hexutil.Bytes
StorageProof []StorageProof
}


type ExecutionRpc interface{
New (rpc *string) (*ExecutionRpc, error)
GetProof(address *seleneCommon.Address, slots *[]common.Hash,block uint64) (EIP1186ProofResponse, error)
CreateAccessList(opts *execution.CallOpts,block seleneCommon.BlockTag) (types.AccessList, error)
CreateAccessList(opts CallOpts,block seleneCommon.BlockTag) (types.AccessList, error)
GetCode(address *seleneCommon.Address, block uint64) ([]byte, error)
SendRawTransaction(bytes *[]byte) (common.Hash, error)
GetTransactionReceipt(tx_hash *common.Hash) (types.Receipt, error)
Expand Down
24 changes: 24 additions & 0 deletions execution/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,31 @@ import (
"github.com/ethereum/go-ethereum/common"
"math/big"
"github.com/BlocSoc-iitr/selene/utils"
"github.com/ethereum/go-ethereum/common/hexutil"
"github.com/holiman/uint256"
seleneCommon "github.com/BlocSoc-iitr/selene/common"
)
type FeeHistory struct {
BaseFeePerGas []hexutil.Big
GasUsedRatio []float64
OldestBlock *hexutil.Big
Reward [][]hexutil.Big
}
//defined storage proof and EIP1186ProofResponse structs
type StorageProof struct {
Key common.Hash
Proof []hexutil.Bytes
Value *uint256.Int
}
type EIP1186ProofResponse struct {
Address seleneCommon.Address
Balance *uint256.Int
CodeHash common.Hash
Nonce uint64
StorageHash common.Hash
AccountProof []hexutil.Bytes
StorageProof []StorageProof
}
type Account struct {
Balance *big.Int
Nonce uint64
Expand Down

0 comments on commit 2dc60d3

Please sign in to comment.