Skip to content

Commit

Permalink
Merge pull request #21 from fpco/add-execute-message-bytes
Browse files Browse the repository at this point in the history
Add an add_execute_message_bytes method
  • Loading branch information
snoyberg authored Jun 14, 2024
2 parents e599811 + d4771cb commit fcea65f
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions packages/cosmos/src/txbuilder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,22 @@ impl TxBuilder {
}))
}

/// Add an execute message on a contract, but using raw bytes for input.
pub fn add_execute_message_bytes(
&mut self,
contract: impl HasAddress,
wallet: impl HasAddress,
funds: Vec<Coin>,
msg: impl Into<Vec<u8>>,
) -> Result<&mut Self, serde_json::Error> {
Ok(self.add_message(MsgExecuteContract {
sender: wallet.get_address_string(),
contract: contract.get_address_string(),
msg: msg.into(),
funds,
}))
}

/// Add a contract migration message.
pub fn add_migrate_message(
&mut self,
Expand Down

0 comments on commit fcea65f

Please sign in to comment.