@@ -3,7 +3,8 @@ use std::str::FromStr;
33use cosmrs:: { tx:: Msg , AccountId , Coin , Denom } ;
44use cosmwasm_std:: { coins, Addr } ;
55// ANCHOR: full_counter_example
6- use cw_orch_daemon:: senders:: tx:: TxSender ;
6+ use cw_orch:: prelude:: Stargate ;
7+ use cw_orch:: prelude:: TxHandler ;
78use cw_orch_daemon:: DaemonBuilder ;
89use cw_orch_networks:: networks;
910
@@ -19,13 +20,11 @@ pub fn main() -> anyhow::Result<()> {
1920
2021 // We commit the tx (also resimulates the tx)
2122 // ANCHOR: send_tx
22- let wallet = daemon. sender ( ) ;
2323
24- let rt = daemon. rt_handle . clone ( ) ;
25- rt. block_on ( wallet. bank_send (
24+ daemon. bank_send (
2625 & Addr :: unchecked ( "<address-of-my-sister>" ) ,
27- coins ( 345 , "ujunox" ) ,
28- ) ) ?;
26+ & coins ( 345 , "ujunox" ) ,
27+ ) ?;
2928 // ANCHOR_END: send_tx
3029
3130 // ANCHOR: cosmrs_tx
@@ -45,22 +44,27 @@ pub fn main() -> anyhow::Result<()> {
4544 denom : Denom :: from_str ( "ujuno" ) . unwrap ( ) ,
4645 } ,
4746 } ;
48- rt. block_on ( wallet. commit_tx ( vec ! [ tx_msg. clone( ) ] , None ) ) ?;
47+ daemon
48+ . rt_handle
49+ . block_on ( daemon. sender ( ) . commit_tx ( vec ! [ tx_msg. clone( ) ] , None ) ) ?;
4950 // ANCHOR_END: cosmrs_tx
5051
5152 // ANCHOR: any_tx
52- rt . block_on ( wallet . commit_tx_any (
53- vec ! [ cosmrs :: Any {
53+ daemon . commit_any (
54+ vec ! [ prost_types :: Any {
5455 type_url: "/cosmos.staking.v1beta1.MsgBeginRedelegate" . to_string( ) ,
5556 value: tx_msg. to_any( ) . unwrap( ) . value,
5657 } ] ,
5758 None ,
58- ) ) ?;
59+ ) ?;
5960 // ANCHOR_END: any_tx
6061
6162 // ANCHOR: simulate_tx
62- let ( gas_needed, fee_needed) =
63- rt. block_on ( wallet. simulate ( vec ! [ tx_msg. to_any( ) . unwrap( ) ] , None ) ) ?;
63+ let ( gas_needed, fee_needed) = daemon. rt_handle . block_on (
64+ daemon
65+ . sender ( )
66+ . simulate ( vec ! [ tx_msg. to_any( ) . unwrap( ) ] , None ) ,
67+ ) ?;
6468
6569 log:: info!(
6670 "Submitting this transaction will necessitate:
0 commit comments