@@ -13,12 +13,13 @@ use near_jsonrpc_client::methods::broadcast_tx_commit::RpcTransactionError;
1313use near_jsonrpc_client:: { methods, JsonRpcClient } ;
1414use near_jsonrpc_primitives:: types:: query:: QueryResponseKind ;
1515use near_jsonrpc_primitives:: types:: transactions:: TransactionInfo ;
16+ use near_primitives:: gas:: Gas ;
1617use near_primitives:: hash:: CryptoHash ;
1718use near_primitives:: transaction:: {
1819 Action , AddKeyAction , CreateAccountAction , FunctionCallAction , Transaction , TransactionV0 ,
1920 TransferAction ,
2021} ;
21- use near_primitives:: types:: { AccountId , BlockReference } ;
22+ use near_primitives:: types:: { AccountId , Balance , BlockReference } ;
2223use near_primitives:: views:: { FinalExecutionStatus , TxExecutionStatus } ;
2324
2425use serde_json:: json;
@@ -151,7 +152,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
151152 public_key: new_key_pair. public_key( ) ,
152153 } ) ) ,
153154 Action :: Transfer ( TransferAction {
154- deposit: initial_deposit,
155+ deposit: Balance :: from_yoctonear ( initial_deposit) ,
155156 } ) ,
156157 ] ,
157158 } ,
@@ -180,8 +181,8 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
180181 } )
181182 . to_string( )
182183 . into_bytes( ) ,
183- gas: 300_000_000_000_000 ,
184- deposit: initial_deposit,
184+ gas: Gas :: from_teragas ( 300 ) ,
185+ deposit: Balance :: from_yoctonear ( initial_deposit) ,
185186 } ) ) ] ,
186187 } ,
187188 b"true" . to_vec ( ) ,
0 commit comments