mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 08:11:04 +00:00
Contracts Bump ApiVersion and add test (#3619)
ApiVersion should have been bumped with https://github.com/paritytech/polkadot-sdk/pull/3606 this does that and add a test so we don't forget to do that everytime
This commit is contained in:
@@ -222,10 +222,19 @@ pub struct Environment<T: Config> {
|
||||
pub struct ApiVersion(u16);
|
||||
impl Default for ApiVersion {
|
||||
fn default() -> Self {
|
||||
Self(1)
|
||||
Self(2)
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn api_version_is_up_to_date() {
|
||||
assert_eq!(
|
||||
109,
|
||||
crate::wasm::STABLE_API_COUNT,
|
||||
"Stable API count has changed. Bump the returned value of ApiVersion::default() and update the test."
|
||||
);
|
||||
}
|
||||
|
||||
#[frame_support::pallet]
|
||||
pub mod pallet {
|
||||
use super::*;
|
||||
|
||||
@@ -21,6 +21,9 @@
|
||||
mod prepare;
|
||||
mod runtime;
|
||||
|
||||
#[cfg(test)]
|
||||
pub use runtime::STABLE_API_COUNT;
|
||||
|
||||
#[cfg(doc)]
|
||||
pub use crate::wasm::runtime::api_doc;
|
||||
|
||||
|
||||
@@ -987,7 +987,6 @@ impl<'a, E: Ext + 'a> Runtime<'a, E> {
|
||||
// for every function.
|
||||
#[define_env(doc)]
|
||||
pub mod env {
|
||||
|
||||
/// Set the value at the given key in the contract storage.
|
||||
/// See [`pallet_contracts_uapi::HostFn::set_storage`]
|
||||
#[prefixed_alias]
|
||||
|
||||
Reference in New Issue
Block a user