-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: P-860 add logging support for dynamic contract (#2848)
* feat: P-860 add logging support for dynamic contract * fix: change vc_logs to optional in RequestVCResult, default log response in http precompile contract * remove default log response in http precompile contract * fix: update ts definition for dynamic assertion * fix clippy * fix: change type of return_log to bool, using Precompiles instead of thread_local variable DYNAMIC_ASSERTION_LOGS, only include vc_logs in rpc response * add the log to vc_logs in all json_utils precompile contracts, do not return vc_logs if stf is true when using CLI * return vc_logs if stf is true * add logs in dynamic contract A20 --------- Co-authored-by: higherordertech <higherordertech>
- Loading branch information
1 parent
fc1994c
commit f40d5f6
Showing
35 changed files
with
732 additions
and
195 deletions.
There are no files selected for viewing
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,32 @@ | ||
// Copyright 2020-2024 Trust Computing GmbH. | ||
// This file is part of Litentry. | ||
// | ||
// Litentry 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. | ||
// | ||
// Litentry 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 Litentry. If not, see <https://www.gnu.org/licenses/>. | ||
|
||
use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; | ||
use scale_info::TypeInfo; | ||
use sp_core::H160; | ||
use sp_runtime::{traits::ConstU32, BoundedVec}; | ||
|
||
pub type DynamicContractParams = BoundedVec<u8, ConstU32<1024>>; | ||
|
||
#[derive(Encode, Decode, Clone, Debug, PartialEq, Eq, MaxEncodedLen, TypeInfo)] | ||
pub struct DynamicParams { | ||
// smart contract code identifier | ||
pub smart_contract_id: H160, | ||
// abi encoded smart contract params | ||
pub smart_contract_params: Option<DynamicContractParams>, | ||
// true to return contract log | ||
pub return_log: bool, | ||
} |
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
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
Oops, something went wrong.