Skip to content

Commit

Permalink
add set before send hook binding
Browse files Browse the repository at this point in the history
  • Loading branch information
quasisamurai committed Sep 8, 2023
1 parent 51c5d33 commit 2c9e8e6
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions packages/neutron-sdk/src/bindings/msg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,11 @@ pub enum NeutronMsg {
burn_from_address: String,
},

/// TokenFactory message.
/// Contracts can create denoms, namespaced under the contract's address.
/// A contract may create any number of independent sub-denoms.
SetBeforeSendHook { denom: String, cosm_wasm_addr: String },

/// AddSchedule adds new schedule with a given `name`.
/// Until schedule is removed it will execute all `msgs` every `period` blocks.
/// First execution is at least on `current_block + period` block.
Expand Down Expand Up @@ -381,6 +386,15 @@ impl NeutronMsg {
}
}

// Basic helper to build create denom message passed to TokenFactory module:
// * **denom** is a name for denom for hook to be created.
pub fn submit_set_before_send_hoook(denom: impl Into<String>, cosm_wasm_addr: impl Into<String> ) -> Self {
NeutronMsg::SetBeforeSendHook {
denom: denom.into(),
cosm_wasm_addr: cosm_wasm_addr.into()
}
}

// Basic helper to define add schedule passed to Cron module:
// * **name** is a name of the schedule;
// * **period** is a period of schedule execution in blocks;
Expand Down

0 comments on commit 2c9e8e6

Please sign in to comment.