Skip to content

Commit

Permalink
update IWarden abi (#1128)
Browse files Browse the repository at this point in the history
  • Loading branch information
mn13 authored Dec 5, 2024
1 parent d7f79f9 commit 6c7509a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ import { INewSignatureRequest } from '../types/warden/newSignatureRequest.js';
import { LRUCache } from 'lru-cache'
import { EvmClient } from './evm.js';
import {
BroadcastType,
IPageRequest,
ISignRequest,
SignRequestsAbi,
SignRequestStatus,
ISignRequestResponse as Response
ISignRequestResponse as Response,
OptionalBroadcastType
} from '../types/warden/functions.js';
import { Hex } from 'viem';

Expand Down Expand Up @@ -85,7 +85,7 @@ export class WardenClient {
reverse: false
};

const args: unknown[] = [pagination, BigInt(1), SignRequestStatus.SIGN_REQUEST_STATUS_FULFILLED, BroadcastType.AUTOMATIC];
const args: unknown[] = [pagination, BigInt(1), SignRequestStatus.SIGN_REQUEST_STATUS_FULFILLED, OptionalBroadcastType.AUTOMATIC];
const response = await this.evm.callView<Response>(
this.configuration.wardenPrecompileAddress,
SignRequestsAbi,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ export interface ISignRequest {
broadcastType: BroadcastType;
};

export enum OptionalBroadcastType {
UNSPECIFIED = 0,
DISABLED = 1,
AUTOMATIC = 2,
};

export enum BroadcastType {
DISABLED = 0,
AUTOMATIC = 1,
Expand Down Expand Up @@ -96,8 +102,8 @@ export const SignRequestsAbi: AbiFunction = {
type: "uint8"
},
{
internalType: "enum BroadcastType",
name: "broadcastType",
internalType: "enum OptionalBroadcastType",
name: "optionalBroadcastType",
type: "uint8"
}
],
Expand Down

0 comments on commit 6c7509a

Please sign in to comment.