File tree Expand file tree Collapse file tree 3 files changed +7
-5
lines changed
Expand file tree Collapse file tree 3 files changed +7
-5
lines changed Original file line number Diff line number Diff line change 1- import { StarknetChainId , ZERO } from '../constants' ;
1+ import { ZERO } from '../constants' ;
22import { ProviderInterface , ProviderOptions } from '../provider' ;
33import { Provider } from '../provider/default' ;
44import { Signer , SignerInterface } from '../signer' ;
@@ -32,10 +32,6 @@ export class Account extends Provider implements AccountInterface {
3232 'getPubKey' in keyPairOrSigner ? keyPairOrSigner : new Signer ( keyPairOrSigner as KeyPair ) ;
3333 }
3434
35- public async getChainId ( ) : Promise < StarknetChainId > {
36- return this . getChainId ( ) ;
37- }
38-
3935 public async getNonce ( ) : Promise < string > {
4036 const { result } = await this . callContract ( {
4137 contractAddress : this . address ,
Original file line number Diff line number Diff line change @@ -46,6 +46,10 @@ export class Provider implements ProviderInterface {
4646 return this . provider . chainId ;
4747 }
4848
49+ public async getChainId ( ) : Promise < StarknetChainId > {
50+ return this . provider . getChainId ( ) ;
51+ }
52+
4953 public async getBlock ( blockIdentifier : BlockIdentifier = 'pending' ) : Promise < GetBlockResponse > {
5054 return this . provider . getBlock ( blockIdentifier ) ;
5155 }
Original file line number Diff line number Diff line change @@ -22,6 +22,8 @@ import { BlockIdentifier } from './utils';
2222export abstract class ProviderInterface {
2323 public abstract chainId : StarknetChainId ;
2424
25+ public abstract getChainId ( ) : Promise < StarknetChainId > ;
26+
2527 /**
2628 * Calls a function on the StarkNet contract.
2729 *
You can’t perform that action at this time.
0 commit comments