@@ -92,11 +92,11 @@ def get_transaction_info(self, txn_hash: str) -> dict:
9292 }
9393 ret = self .execute (operation )
9494 return ret
95-
96- def get_txpool_pending_txn (self , txn_hash : str ) -> dict :
95+
96+ def get_blocks_by_number (self , number : int , count : int ) -> dict :
9797 operation = {
98- "rpc_method" : "txpool.pending_txn " ,
99- "params" : [txn_hash ],
98+ "rpc_method" : "chain.get_blocks_by_number " ,
99+ "params" : [number , count ],
100100 }
101101 ret = self .execute (operation )
102102 return ret
@@ -198,6 +198,26 @@ def get_events_by_txn_hash(self, txn_hash: str):
198198 ret = self .execute (operation )
199199 return ret
200200
201+ def get_txpool_pending_txn (self , txn_hash : str ) -> dict :
202+ operation = {
203+ "rpc_method" : "txpool.pending_txn" ,
204+ "params" : [txn_hash ],
205+ }
206+ ret = self .execute (operation )
207+ return ret
208+
209+ def contract_call (self , function_id : str , type_args : list , args : list ):
210+ operation = {
211+ "rpc_method" : "contract.call_v2" ,
212+ "params" : [{
213+ "function_id" : function_id ,
214+ "type_args" : type_args ,
215+ "args" : args ,
216+ }],
217+ }
218+ ret = self .execute (operation )
219+ return ret
220+
201221
202222class RpcRequest ():
203223 def __init__ (self , url ):
0 commit comments