-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
23 changed files
with
562 additions
and
27 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Binary file not shown.
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
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,40 @@ | ||
[package] | ||
name ="pallet-oracle" | ||
version ='0.2.0-rc.1' | ||
authors =['Entropy Cryptography <engineering@entropy.xyz>'] | ||
homepage ='https://entropy.xyz/' | ||
license ='AGPL-3.0-or-later' | ||
repository='https://github.com/entropyxyz/entropy-core' | ||
edition ='2021' | ||
publish =false | ||
|
||
[dependencies] | ||
codec ={ package="parity-scale-codec", version="3.6.3", default-features=false, features=["derive"] } | ||
scale-info={ version="2.11", default-features=false, features=["derive"] } | ||
|
||
frame-benchmarking={ version="29.0.0", default-features=false, optional=true } | ||
frame-support ={ version="29.0.0", default-features=false } | ||
frame-system ={ version="29.0.0", default-features=false } | ||
sp-runtime ={ version="32.0.0", default-features=false } | ||
sp-std ={ version="14.0.0", default-features=false } | ||
|
||
[dev-dependencies] | ||
sp-core={ version="29.0.0" } | ||
sp-io ={ version="31.0.0" } | ||
|
||
[features] | ||
default=["std"] | ||
runtime-benchmarks=[ | ||
'frame-benchmarking', | ||
'frame-support/runtime-benchmarks', | ||
'frame-system/runtime-benchmarks', | ||
] | ||
std=[ | ||
"frame-support/std", | ||
"frame-system/std", | ||
"scale-info/std", | ||
"sp-runtime/std", | ||
"sp-std/std", | ||
'frame-benchmarking/std', | ||
] | ||
try-runtime=["frame-support/try-runtime"] |
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,33 @@ | ||
// Copyright (C) 2023 Entropy Cryptography Inc. | ||
|
||
// This program is free software: you can redistribute it and/or modify | ||
// it under the terms of the GNU Affero General Public License as published by | ||
// the Free Software Foundation, either version 3 of the License, or | ||
// (at your option) any later version. | ||
|
||
// This program 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 Affero General Public License for more details. | ||
|
||
// You should have received a copy of the GNU Affero General Public License | ||
// along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
|
||
// //! Benchmarking setup for pallet-oracle | ||
|
||
use super::*; | ||
|
||
#[allow(unused)] | ||
use crate::Pallet as Oracle; | ||
use frame_benchmarking::benchmarks; | ||
|
||
benchmarks! { | ||
on_initialize { | ||
}: { | ||
Oracle::<T>::on_initialize(50u32.into()); | ||
} verify { | ||
assert_eq!(OracleData::<T>::get(BoundedVec::try_from("block_number_entropy".encode()).unwrap()).unwrap()[0], 50); | ||
} | ||
|
||
impl_benchmark_test_suite!(Oracle, crate::mock::new_test_ext(), crate::mock::Test); | ||
} |
Oops, something went wrong.