11/* eslint-disable */
2- // sequence-relayer v0.4.1 5bcdf43e83baa9ee0d52792000bb969735fbf667
2+ // sequence-relayer v0.4.1 62fe2b49d57c4a0d3960ac1176d48ecfffc7af5a
33// --
44// Code generated by [email protected] with typescript generator. DO NOT EDIT. 55//
@@ -16,7 +16,7 @@ export const WebRPCVersion = 'v1'
1616export const WebRPCSchemaVersion = 'v0.4.1'
1717
1818// Schema hash generated from your RIDL schema
19- export const WebRPCSchemaHash = '5bcdf43e83baa9ee0d52792000bb969735fbf667 '
19+ export const WebRPCSchemaHash = '62fe2b49d57c4a0d3960ac1176d48ecfffc7af5a '
2020
2121type WebrpcGenVersions = {
2222 webrpcGenVersion : string
@@ -90,6 +90,15 @@ export enum TransferType {
9090 UNKNOWN = 'UNKNOWN'
9191}
9292
93+ export enum SimulateStatus {
94+ SKIPPED = 'SKIPPED' ,
95+ SUCCEEDED = 'SUCCEEDED' ,
96+ FAILED = 'FAILED' ,
97+ ABORTED = 'ABORTED' ,
98+ REVERTED = 'REVERTED' ,
99+ NOT_ENOUGH_GAS = 'NOT_ENOUGH_GAS'
100+ }
101+
93102export enum FeeTokenType {
94103 UNKNOWN = 'UNKNOWN' ,
95104 ERC20_TOKEN = 'ERC20_TOKEN' ,
@@ -293,6 +302,14 @@ export interface SimulateResult {
293302 gasLimit : number
294303}
295304
305+ export interface SimulateV3Result {
306+ status : SimulateStatus
307+ result ?: string
308+ error ?: string
309+ gasUsed : number
310+ gasLimit : number
311+ }
312+
296313export interface FeeOption {
297314 token : FeeToken
298315 to : string
@@ -353,6 +370,7 @@ export interface Relayer {
353370 */
354371 getMetaTxnReceipt ( args : GetMetaTxnReceiptArgs , headers ?: object , signal ?: AbortSignal ) : Promise < GetMetaTxnReceiptReturn >
355372 simulate ( args : SimulateArgs , headers ?: object , signal ?: AbortSignal ) : Promise < SimulateReturn >
373+ simulateV3 ( args : SimulateV3Args , headers ?: object , signal ?: AbortSignal ) : Promise < SimulateV3Return >
356374 /**
357375 * TODO: deprecated, to be removed by https://github.com/0xsequence/stack/pull/356 at a later date
358376 */
@@ -493,6 +511,14 @@ export interface SimulateArgs {
493511export interface SimulateReturn {
494512 results : Array < SimulateResult >
495513}
514+ export interface SimulateV3Args {
515+ wallet : string
516+ calls : string
517+ }
518+
519+ export interface SimulateV3Return {
520+ results : Array < SimulateV3Result >
521+ }
496522export interface UpdateMetaTxnGasLimitsArgs {
497523 walletAddress : string
498524 walletConfig : any
@@ -851,6 +877,21 @@ export class Relayer implements Relayer {
851877 )
852878 }
853879
880+ simulateV3 = ( args : SimulateV3Args , headers ?: object , signal ?: AbortSignal ) : Promise < SimulateV3Return > => {
881+ return this . fetch ( this . url ( 'SimulateV3' ) , createHTTPRequest ( args , headers , signal ) ) . then (
882+ res => {
883+ return buildResponse ( res ) . then ( _data => {
884+ return {
885+ results : < Array < SimulateV3Result > > _data . results
886+ }
887+ } )
888+ } ,
889+ error => {
890+ throw WebrpcRequestFailedError . new ( { cause : `fetch(): ${ error . message || '' } ` } )
891+ }
892+ )
893+ }
894+
854895 updateMetaTxnGasLimits = (
855896 args : UpdateMetaTxnGasLimitsArgs ,
856897 headers ?: object ,
0 commit comments