wrapscanby polywrap
DocsSupport

safe-relay-kit

Relay Kit Wrap

View more
type Module @imports(
  types: [
    "GelatoRelayer_Module",
    "GelatoRelayer_CallWithSyncFeeRequest",
    "GelatoRelayer_RelayRequestOptions",
    "GelatoRelayer_RelayResponse",
    "GelatoRelayer_SponsoredCallRequest",
    "GelatoRelayer_TransactionStatusResponse",
    "GelatoRelayer_TaskState"
  ]
) {
  getFeeCollector: String!

  getEstimateFee(
    chainId: Int!
    gasLimit: BigInt!
    gasToken: String
  ): BigInt!

  relayTransaction(
    transaction: RelayTransaction!
  ): RelayResponse! @env(required: false)
}

type Env {
  relayerApiKey: String!
}

type RelayTransaction {
  target: String!
  encodedTransaction: String!
  chainId: Int!
  options: MetaTransactionOptions!
}

type RelayResponse {
  taskId: String!
}

type MetaTransactionOptions {
  gasLimit: BigInt!
  gasToken: String
  isSponsored: Boolean
}

### Imported Modules START ###

type GelatoRelayer_Module @imported(
  uri: "wrapscan.io/polywrap/gelato-relay@0.1.1",
  namespace: "GelatoRelayer",
  nativeType: "Module"
) {
  """
    @param {CallWithSyncFeeRequest} request - CallWithSyncFee request to be relayed by Gelato Executors
@param {RelayRequestOptions} [options] - Optional Relay configuration
@returns {Promise<RelayResponse>} Response object with taskId parameter
  """
  callWithSyncFee(
    request: GelatoRelayer_CallWithSyncFeeRequest!
    options: GelatoRelayer_RelayRequestOptions
  ): GelatoRelayer_RelayResponse!

  """
    @param {SponsoredCallRequest} request SponsoredCallRequest to be relayed by the Gelato Executors.
@param {string} sponsorApiKey Sponsor API key to be used for the call
@param {RelayRequestOptions} [options] Optional Relay configuration
@returns {Promise<RelayResponse>} Response object with taskId parameter
  """
  sponsoredCall(
    request: GelatoRelayer_SponsoredCallRequest!
    sponsorApiKey: String!
    options: GelatoRelayer_RelayRequestOptions
  ): GelatoRelayer_RelayResponse!

  """
    @param {number} chainId - Chain Id
@param {string} paymentToken - Payment Token
@param {BigNumber} gasLimit - Gas Limit
@param {boolean} isHighPriority - Priority Level
@param {BigNumber} [gasLimitL1=BigNumber.from(0)] - Gas Limit for Layer 1
@returns {Promise<BigNumber>} Estimated Fee
  """
  getEstimatedFee(
    chainId: BigInt!
    paymentToken: String!
    gasLimit: BigInt!
    isHighPriority: Boolean!
    gasLimitL1: BigInt
  ): BigInt!

  """
    @param {string} taskId - Task Id
@returns {Promise<TransactionStatusResponse | undefined>} Transaction status of the task id
  """
  getTaskStatus(
    taskId: String!
  ): GelatoRelayer_TransactionStatusResponse
}

### Imported Modules END ###

### Imported Objects START ###

type GelatoRelayer_CallWithSyncFeeRequest @imported(
  uri: "wrapscan.io/polywrap/gelato-relay@0.1.1",
  namespace: "GelatoRelayer",
  nativeType: "CallWithSyncFeeRequest"
) {
  chainId: BigInt!
  target: String!
  data: String!
  feeToken: String!
  isRelayContext: Boolean
}

type GelatoRelayer_RelayRequestOptions @imported(
  uri: "wrapscan.io/polywrap/gelato-relay@0.1.1",
  namespace: "GelatoRelayer",
  nativeType: "RelayRequestOptions"
) {
  gasLimit: BigInt
  retries: Int
}

type GelatoRelayer_RelayResponse @imported(
  uri: "wrapscan.io/polywrap/gelato-relay@0.1.1",
  namespace: "GelatoRelayer",
  nativeType: "RelayResponse"
) {
  taskId: String!
}

type GelatoRelayer_SponsoredCallRequest @imported(
  uri: "wrapscan.io/polywrap/gelato-relay@0.1.1",
  namespace: "GelatoRelayer",
  nativeType: "SponsoredCallRequest"
) {
  chainId: BigInt!
  target: String!
  data: String!
}

type GelatoRelayer_TransactionStatusResponse @imported(
  uri: "wrapscan.io/polywrap/gelato-relay@0.1.1",
  namespace: "GelatoRelayer",
  nativeType: "TransactionStatusResponse"
) {
  chainId: BigInt!
  taskId: String!
  taskState: GelatoRelayer_TaskState!
  creationDate: String!
  lastCheckDate: String
  lastCheckMessage: String
  transactionHash: String
  blockNumber: BigInt
  executionDate: String
}

enum GelatoRelayer_TaskState @imported(
  uri: "wrapscan.io/polywrap/gelato-relay@0.1.1",
  namespace: "GelatoRelayer",
  nativeType: "TaskState"
) {
  CheckPending
  ExecPending
  ExecSuccess
  ExecReverted
  WaitingForConfirmation
  Blacklisted
  Cancelled
  NotFound
}

### Imported Objects END ###

### Imported Envs START ###

### Imported Envs END ###