Skip to content

Commit

Permalink
fix: lib FunctionAbiType and EventAbi shallow
Browse files Browse the repository at this point in the history
  • Loading branch information
tabaktoni committed Nov 11, 2022
1 parent 35c5a06 commit 7088dc6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 2 additions & 0 deletions src/provider/rpc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -481,4 +481,6 @@ export class RpcProvider implements ProviderInterface {
public async getEvents(eventFilter: RPC.EventFilter): Promise<RPC.GetEventsResponse> {
return this.fetchEndpoint('starknet_getEvents', { filter: eventFilter });
}

// TODO add starknet_protocolVersion
}
7 changes: 4 additions & 3 deletions src/types/lib.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,13 @@ export type FunctionAbi = {
name: string;
outputs: AbiEntry[];
stateMutability?: 'view';
type: FUNCTION_ABI_TYPE;
type: FunctionAbiType;
};

enum FUNCTION_ABI_TYPE {
enum FunctionAbiType {
'function',
'l1_handler',
'constructor',
}

export type StructAbi = {
Expand All @@ -111,7 +112,7 @@ export type StructAbi = {

export type Abi = Array<FunctionAbi | EventAbi | StructAbi>;

type EventAbi = any; // TODO: define
type EventAbi = any;

export type EntryPointsByType = object;
export type Program = Record<any, any>;
Expand Down

0 comments on commit 7088dc6

Please sign in to comment.