Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/invoke #12

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions src/api/contract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export type ABI = Array<
FUNCTION | CONSTRUCTOR | L1_HANDLER | EVENT | STRUCT | ENUM | INTERFACE | IMPL
>;

type FUNCTION = {
export type FUNCTION = {
type: 'function';
name: string;
inputs: Array<{
Expand All @@ -24,7 +24,7 @@ type FUNCTION = {
state_mutability: 'view' | 'external';
};

type CONSTRUCTOR = {
export type CONSTRUCTOR = {
type: 'constructor';
name: 'constructor';
inputs: Array<{
Expand All @@ -33,7 +33,7 @@ type CONSTRUCTOR = {
}>;
};

type L1_HANDLER = {
export type L1_HANDLER = {
type: 'l1_handler';
name: string;
inputs: Array<{
Expand All @@ -46,22 +46,22 @@ type L1_HANDLER = {
state_mutability: 'view' | 'external';
};

type EVENT = {
export type EVENT = {
type: 'event';
name: string;
} & (ENUM_EVENT | STRUCT_EVENT);

type STRUCT_EVENT = {
export type STRUCT_EVENT = {
kind: 'struct';
members: Array<EVENT_FIELD>;
};

type ENUM_EVENT = {
export type ENUM_EVENT = {
kind: 'enum';
variants: Array<EVENT_FIELD>;
};

type STRUCT = {
export type STRUCT = {
type: 'struct';
name: string;
members: Array<{
Expand All @@ -70,7 +70,7 @@ type STRUCT = {
}>;
};

type ENUM = {
export type ENUM = {
type: 'enum';
name: string;
variants: Array<{
Expand All @@ -79,21 +79,21 @@ type ENUM = {
}>;
};

type INTERFACE = {
export type INTERFACE = {
type: 'interface';
name: string;
items: Array<FUNCTION>;
};

type IMPL = {
export type IMPL = {
type: 'impl';
name: string;
interface_name: string;
};

export type EVENT_KIND = 'struct' | 'enum';

type EVENT_FIELD = {
export type EVENT_FIELD = {
name: string;
type: string;
kind: 'key' | 'data' | 'nested';
Expand Down
2 changes: 1 addition & 1 deletion src/api/nonspec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ export const ETransactionType = {
DECLARE: 'DECLARE',
DEPLOY: 'DEPLOY',
DEPLOY_ACCOUNT: 'DEPLOY_ACCOUNT',
INVOKE: 'INVOKE_FUNCTION',
INVOKE: 'INVOKE',
L1_HANDLER: 'L1_HANDLER',
} as const;

Expand Down