@@ -9,9 +9,6 @@ import io.github.hosseinkarami_dev.near.rpc.client.Utils.getResultOrNull
99import io.github.hosseinkarami_dev.near.rpc.models.BlockId
1010import io.github.hosseinkarami_dev.near.rpc.models.RpcBlockRequest
1111import io.github.hosseinkarami_dev.near.rpc.models.RpcBlockResponse
12- import io.github.hosseinkarami_dev.near.rpc.models.RpcTransactionStatusRequest
13- import io.github.hosseinkarami_dev.near.rpc.models.SignedTransaction
14- import io.github.hosseinkarami_dev.near.rpc.models.TxExecutionStatus
1512import io.ktor.client.HttpClient
1613import io.ktor.client.engine.cio.CIO
1714import io.ktor.client.plugins.contentnegotiation.ContentNegotiation
@@ -33,7 +30,6 @@ class MainActivity : ComponentActivity() {
3330 baseUrl = " https://rpc.mainnet.near.org" // or testnet: https://rpc.testnet.near.org
3431 )
3532
36- lifecycleScope.launch {
3733 lifecycleScope.launch {
3834 val response = nearClient.block(
3935 RpcBlockRequest .BlockId (BlockId .BlockHeight (167440515 .toULong()))
@@ -49,31 +45,7 @@ class MainActivity : ComponentActivity() {
4945 println (" Result: $result " )
5046
5147 }
52- }
5348 }
54-
55- //
56- // lifecycleScope.launch {
57- // val response = nearClient.tx(
58- // RpcTransactionStatusRequest.SignedTxBase64(
59- // signedTxBase64 = SignedTransaction("FtzDPgG7BnX3g6WV7w951TZ1UErFahfp6NwQKiTE9dMp"),
60- // waitUntil = TxExecutionStatus.Final
61- // ))
62- // // val response = nearClient.status()
63- // // val response = nearClient.gasPrice(RpcGasPriceRequest(blockId = null))
64- //
65- // when (response) {
66- // is RpcResponse.Failure -> {
67- // println("Error: ${response.error}")
68- // }
69- //
70- // is RpcResponse.Success -> {
71- // val result = response.result
72- // println("Result: $result")
73- //
74- // }
75- // }
76- // }
7749 }
7850 }
7951}
0 commit comments