Gas Policies (Legacy)

Create a gas policy (legacy - use /v2/fee-sponsorship for new integrations).

Changed on
post/v1/policies

Request

  • Base URL: https://api.openfort.io
  • URL: https://api.openfort.io/v1/policies
  • Auth: one of:
    • HTTP bearer
    • HTTP bearer

Request body

namestring required

Specifies the name of the policy.

chainIdinteger required

The chain ID. Must be a supported chain.

paymasterstring

The ID of the paymaster.

forwarderContractstring

The ID of the forwarder contract.

Example request

{
  "name": "My Policy",
  "chainId": 80002,
  "strategy": {
    "tokenContract": "con_0cddb398-1dc6-4e6f-8726-9ec7cea85f35",
    "tokenContractAmount": "1000000000000000000"
  },
  "paymaster": "pay_6f6c9067-89fa-4fc8-ac72-c242a268c584",
  "forwarderContract": "cfo_f0f89cf2-c185-40f4-beef-2a250d7a472b"
}

Response

Successful response.

idstring required
object'policy' required
createdAtinteger required
namestring nullable required
deletedboolean required
enabledboolean required
chainIdinteger required

The chain ID.

Changes

    • info

      removed from the ////// response property anyOf list for the response status

    • info

      removed the zkSync enum value from the ////// response property for the response status

    • breaking

      the /////// response's property type changed from no type to object for status

    • info

      the security scope fee_sponsorship:write was added to the endpoint's security scheme sk

    • info

      added the optional property ////// to the response with the status

    • info

      added the optional property //////// to the response with the status

    • info

      added the optional property //////// to the response with the status

    • info

      added the required property //////// to the response with the status