-
Notifications
You must be signed in to change notification settings - Fork 32
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
1 parent
c96d2ef
commit 57e76c6
Showing
6 changed files
with
257 additions
and
15 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
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 |
---|---|---|
@@ -1 +1 @@ | ||
ba1b1d6dc91370d81e7125962e02aee01274eac | ||
93ca90d30a0c4f75af0d30f52cd9abdf8018a715 |
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,79 @@ | ||
use neutron_std_derive::CosmwasmExt; | ||
/// Defines the schedule for execution | ||
#[allow(clippy::derive_partial_eq_without_eq)] | ||
#[derive( | ||
Clone, | ||
PartialEq, | ||
Eq, | ||
::prost::Message, | ||
::serde::Serialize, | ||
::serde::Deserialize, | ||
::schemars::JsonSchema, | ||
CosmwasmExt, | ||
)] | ||
#[proto_message(type_url = "/neutron.cron.v1.Schedule")] | ||
pub struct Schedule { | ||
/// Name of schedule | ||
#[prost(string, tag = "1")] | ||
pub name: ::prost::alloc::string::String, | ||
/// Period in blocks | ||
#[prost(uint64, tag = "2")] | ||
#[serde( | ||
serialize_with = "crate::serde::as_str::serialize", | ||
deserialize_with = "crate::serde::as_str::deserialize" | ||
)] | ||
pub period: u64, | ||
/// Msgs that will be executed every certain number of blocks, specified in the `period` field | ||
#[prost(message, repeated, tag = "3")] | ||
pub msgs: ::prost::alloc::vec::Vec<MsgExecuteContract>, | ||
/// Last execution's block height | ||
#[prost(uint64, tag = "4")] | ||
#[serde( | ||
serialize_with = "crate::serde::as_str::serialize", | ||
deserialize_with = "crate::serde::as_str::deserialize" | ||
)] | ||
pub last_execute_height: u64, | ||
} | ||
/// Defines the contract and the message to pass | ||
#[allow(clippy::derive_partial_eq_without_eq)] | ||
#[derive( | ||
Clone, | ||
PartialEq, | ||
Eq, | ||
::prost::Message, | ||
::serde::Serialize, | ||
::serde::Deserialize, | ||
::schemars::JsonSchema, | ||
CosmwasmExt, | ||
)] | ||
#[proto_message(type_url = "/neutron.cron.v1.MsgExecuteContract")] | ||
pub struct MsgExecuteContract { | ||
/// The address of the smart contract | ||
#[prost(string, tag = "1")] | ||
pub contract: ::prost::alloc::string::String, | ||
/// JSON encoded message to be passed to the contract | ||
#[prost(string, tag = "2")] | ||
pub msg: ::prost::alloc::string::String, | ||
} | ||
/// Defines the number of current schedules | ||
#[allow(clippy::derive_partial_eq_without_eq)] | ||
#[derive( | ||
Clone, | ||
PartialEq, | ||
Eq, | ||
::prost::Message, | ||
::serde::Serialize, | ||
::serde::Deserialize, | ||
::schemars::JsonSchema, | ||
CosmwasmExt, | ||
)] | ||
#[proto_message(type_url = "/neutron.cron.v1.ScheduleCount")] | ||
pub struct ScheduleCount { | ||
/// The number of current schedules | ||
#[prost(int32, tag = "1")] | ||
#[serde( | ||
serialize_with = "crate::serde::as_str::serialize", | ||
deserialize_with = "crate::serde::as_str::deserialize" | ||
)] | ||
pub count: i32, | ||
} |
Oops, something went wrong.