@@ -4,6 +4,7 @@ use std::{
44 time:: { Duration , Instant } ,
55} ;
66
7+ use borsh:: to_vec;
78use log:: * ;
89use magicblock_committor_service:: {
910 config:: ChainConfig ,
@@ -18,6 +19,7 @@ use magicblock_program::magic_scheduled_base_intent::{
1819 ScheduledBaseIntent , UndelegateType ,
1920} ;
2021use magicblock_rpc_client:: MagicblockRpcClient ;
22+ use program_flexi_counter:: state:: FlexiCounter ;
2123use solana_account:: { Account , ReadableAccount } ;
2224use solana_pubkey:: Pubkey ;
2325use solana_rpc_client:: nonblocking:: rpc_client:: RpcClient ;
@@ -114,8 +116,16 @@ async fn commit_single_account(
114116 let ( pubkey, mut account) =
115117 init_and_delegate_account_on_chain ( & counter_auth, bytes as u64 , None )
116118 . await ;
119+
120+ let counter = FlexiCounter {
121+ label : "Counter" . to_string ( ) ,
122+ updates : 0 ,
123+ count : 101 ,
124+ } ;
125+ let mut data = to_vec ( & counter) . unwrap ( ) ;
126+ data. resize ( bytes, 0 ) ;
127+ account. data = data;
117128 account. owner = program_flexi_counter:: id ( ) ;
118- account. data = vec ! [ 101_u8 ; bytes] ;
119129
120130 let account = CommittedAccount { pubkey, account } ;
121131 let base_intent = if undelegate {
0 commit comments