Skip to content

Commit

Permalink
add delete contract function (#161)
Browse files Browse the repository at this point in the history
  • Loading branch information
shahnami committed Sep 7, 2022
1 parent 03183dc commit 1d7cae0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/admin/src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@ export class AdminClient extends BaseApiClient {
});
}

public async deleteContract(contractId: string): Promise<string> {
return this.apiCall(async (api) => {
return (await api.delete(`/contracts/${contractId}`)) as string;
});
}

public async listContracts(): Promise<Omit<Contract, 'abi'>[]> {
return this.apiCall(async (api) => {
return (await api.get('/contracts')) as Omit<Contract, 'abi'>[];
Expand Down

0 comments on commit 1d7cae0

Please sign in to comment.