Support debug_traceCall API (#192)

* Implement debug_traceCall API

* Use API implementation from geth with custom backend

* Update refs in GitHub workflow
This commit was merged in pull request #192.
This commit is contained in:
prathamesh0
2022-09-21 17:15:03 +05:30
committed by GitHub
parent 4d99ecdee3
commit 2c03c8cbd0
10 changed files with 85 additions and 13 deletions
+7 -2
View File
@@ -258,6 +258,11 @@ func (b *Backend) GetTd(blockHash common.Hash) (*big.Int, error) {
return td, nil
}
// ChainConfig returns the active chain configuration.
func (b *Backend) ChainConfig() *params.ChainConfig {
return b.Config.ChainConfig
}
// CurrentBlock returns the current block
func (b *Backend) CurrentBlock() (*types.Block, error) {
block, err := b.BlockByNumber(context.Background(), rpc.LatestBlockNumber)
@@ -849,8 +854,8 @@ func (b *Backend) ValidateTrie(stateRoot common.Hash) error {
}
// RPCGasCap returns the configured gas cap for the rpc server
func (b *Backend) RPCGasCap() *big.Int {
return b.Config.RPCGasCap
func (b *Backend) RPCGasCap() uint64 {
return b.Config.RPCGasCap.Uint64()
}
func (b *Backend) SubscribeNewTxsEvent(chan<- core.NewTxsEvent) event.Subscription {