File tree Expand file tree Collapse file tree 2 files changed +11
-10
lines changed
Expand file tree Collapse file tree 2 files changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -130,12 +130,12 @@ export class RpcProvider implements ProviderInterface {
130130 public async getNonce (
131131 contractAddress : string ,
132132 blockIdentifier : BlockIdentifier = 'pending'
133- ) : Promise < BigNumberish > {
134- const blockIdentifierGetter = new Block ( blockIdentifier ) ;
135- return this . fetchEndpoint ( 'starknet_getNonce' , [
136- contractAddress ,
137- blockIdentifierGetter . identifier ( ) ,
138- ] ) ;
133+ ) : Promise < RPC . Nonce > {
134+ const block_id = new Block ( blockIdentifier ) . identifier ;
135+ return this . fetchEndpoint ( 'starknet_getNonce' , {
136+ contract_address : contractAddress ,
137+ block_id ,
138+ } ) ;
139139 }
140140
141141 public async getPendingTransactions ( ) : Promise < RPC . PendingTransactions > {
Original file line number Diff line number Diff line change @@ -95,9 +95,9 @@ type COMMON_TXN_PROPERTIES = {
9595 type ?: TXN_TYPE ;
9696} ;
9797type FUNCTION_CALL = {
98- contract_address : ADDRESS ;
99- entry_point_selector : FELT ;
100- calldata : Array < FELT > ;
98+ contract_address ? : ADDRESS ;
99+ entry_point_selector ? : FELT ;
100+ calldata ? : Array < FELT > ;
101101} ;
102102type INVOKE_TXN = COMMON_TXN_PROPERTIES & FUNCTION_CALL ;
103103type DECLARE_TXN = COMMON_TXN_PROPERTIES & {
@@ -364,8 +364,9 @@ export namespace OPENRPC {
364364 result : Events ;
365365 errors : Errors . PAGE_SIZE_TOO_BIG ;
366366 } ;
367+ // FROM RPC 0.2.0 Pathfinder exception
367368 starknet_getNonce : {
368- params : { contract_address : ADDRESS } ;
369+ params : { contract_address : ADDRESS ; block_id : BLOCK_ID } ;
369370 result : FELT ;
370371 errors : Errors . CONTRACT_NOT_FOUND ;
371372 } ;
You can’t perform that action at this time.
0 commit comments