-
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
Showing
5 changed files
with
184 additions
and
22 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 @@ | ||
ef1d7992fbdd6a927a2c7c4b4eebe2dfe2cdd27a | ||
fd5e5e5bd6d061f19a566e71aaaeaabe59406069 |
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,76 @@ | ||
use neutron_std_derive::CosmwasmExt; | ||
#[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 period amount of time | ||
#[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, | ||
} | ||
#[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 { | ||
/// Contract is the address of the smart contract | ||
#[prost(string, tag = "1")] | ||
pub contract: ::prost::alloc::string::String, | ||
/// Msg is json encoded message to be passed to the contract | ||
#[prost(string, tag = "2")] | ||
pub msg: ::prost::alloc::string::String, | ||
} | ||
#[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 { | ||
/// Count is 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, | ||
} |
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