forked from AstarNetwork/Astar
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add sentioTracer, sentioPrestateTracer and debug_storageRange api
disable storage range for now
- Loading branch information
Showing
19 changed files
with
2,328 additions
and
5 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// Copyright 2019-2022 PureStake Inc. | ||
// This file is part of Moonbeam. | ||
|
||
// Moonbeam is free software: you can redistribute it and/or modify | ||
// it under the terms of the GNU General Public License as published by | ||
// the Free Software Foundation, either version 3 of the License, or | ||
// (at your option) any later version. | ||
|
||
// Moonbeam is distributed in the hope that it will be useful, | ||
// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
// GNU General Public License for more details. | ||
|
||
// You should have received a copy of the GNU General Public License | ||
// along with Moonbeam. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
use crate::types::single::TransactionTrace; | ||
|
||
use crate::listeners::sentio_call_list::Listener; | ||
|
||
pub struct Formatter; | ||
|
||
impl super::ResponseFormatter for Formatter { | ||
type Listener = Listener; | ||
type Response = Vec<TransactionTrace>; | ||
|
||
fn format(listener: Listener) -> Option<Vec<TransactionTrace>> { | ||
if listener.results.is_empty() { | ||
None | ||
} else { | ||
Some(listener.results.into_iter().map(|call| TransactionTrace::SentioCallTrace(call)).collect()) | ||
} | ||
} | ||
} |
53 changes: 53 additions & 0 deletions
53
vendor/evm-tracing/src/formatters/sentio_prestate_tracer.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
// Copyright 2019-2022 PureStake Inc. | ||
// This file is part of Moonbeam. | ||
|
||
// Moonbeam is free software: you can redistribute it and/or modify | ||
// it under the terms of the GNU General Public License as published by | ||
// the Free Software Foundation, either version 3 of the License, or | ||
// (at your option) any later version. | ||
|
||
// Moonbeam is distributed in the hope that it will be useful, | ||
// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
// GNU General Public License for more details. | ||
|
||
// You should have received a copy of the GNU General Public License | ||
// along with Moonbeam. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
use std::marker::PhantomData; | ||
use fp_rpc::EthereumRuntimeRPCApi; | ||
use sp_api::ProvideRuntimeApi; | ||
use sp_runtime::traits::Block as BlockT; | ||
use sp_block_builder::BlockBuilder; | ||
use crate::types::single::TransactionTrace; | ||
|
||
use crate::listeners::sentio_prestate::Listener; | ||
|
||
pub struct Formatter<B, C> | ||
where | ||
B: BlockT, | ||
C:ProvideRuntimeApi<B>, | ||
C::Api: EthereumRuntimeRPCApi<B>, | ||
C::Api: BlockBuilder<B> { | ||
_b: PhantomData<B>, | ||
_c: PhantomData<C> | ||
} | ||
|
||
impl<B, C> super::ResponseFormatter for Formatter<B, C> | ||
where | ||
B: BlockT, | ||
C:ProvideRuntimeApi<B> + 'static, | ||
C::Api: EthereumRuntimeRPCApi<B>, | ||
C::Api: BlockBuilder<B> | ||
{ | ||
type Listener = Listener<B, C>; | ||
type Response = Vec<TransactionTrace>; | ||
|
||
fn format(listener: Listener<B, C>) -> Option<Vec<TransactionTrace>> { | ||
if listener.results.is_empty() { | ||
None | ||
} else { | ||
Some(listener.results.into_iter().map(|trace| TransactionTrace::SentioPrestateTrace(trace)).collect()) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.