> For the complete documentation index, see [llms.txt](https://praxxas.gitbook.io/killswitch/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://praxxas.gitbook.io/killswitch/technicals/smart-contracts/kssubscription-abi.md).

# KSSubscription ABI

Below is the ABI for KSSubscription.sol

{% code overflow="wrap" %}

```json
[
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "recipient_",
          "type": "address"
        },
        {
          "internalType": "address",
          "name": "authorized_",
          "type": "address"
        },
        {
          "internalType": "uint256",
          "name": "referrerDefaultFee_",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "referrerPartnerDefaultFee_",
          "type": "uint256"
        }
      ],
      "stateMutability": "nonpayable",
      "type": "constructor"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "string",
          "name": "result",
          "type": "string"
        }
      ],
      "name": "EmitEvent",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "address",
          "name": "referrerAddress_",
          "type": "address"
        }
      ],
      "name": "NewReferrer",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "address",
          "name": "subscriber_",
          "type": "address"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "duration_",
          "type": "uint256"
        }
      ],
      "name": "NewSubscriber",
      "type": "event"
    },
    {
      "inputs": [
        {
          "internalType": "string",
          "name": "",
          "type": "string"
        },
        {
          "internalType": "address",
          "name": "",
          "type": "address"
        }
      ],
      "name": "_accruals",
      "outputs": [
        {
          "internalType": "address",
          "name": "tokenAddress",
          "type": "address"
        },
        {
          "internalType": "uint256",
          "name": "quantity",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "count",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        },
        {
          "internalType": "address",
          "name": "",
          "type": "address"
        }
      ],
      "name": "_quantitiesPerOptionPerWallet",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "_referrals",
      "outputs": [
        {
          "internalType": "bool",
          "name": "referralsStatus",
          "type": "bool"
        },
        {
          "internalType": "uint256",
          "name": "totalPartnerReferrers",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "totalReferrers",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "referrerDefaultFee",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "referrerPartnerDefaultFee",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "",
          "type": "address"
        }
      ],
      "name": "_referrerCodeByAddress",
      "outputs": [
        {
          "internalType": "string",
          "name": "",
          "type": "string"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "name": "_referrerCodes",
      "outputs": [
        {
          "internalType": "string",
          "name": "",
          "type": "string"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "string",
          "name": "",
          "type": "string"
        }
      ],
      "name": "_referrers",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "id",
          "type": "uint256"
        },
        {
          "internalType": "string",
          "name": "referrerCode",
          "type": "string"
        },
        {
          "internalType": "address",
          "name": "receiptAddress",
          "type": "address"
        },
        {
          "internalType": "uint256",
          "name": "fee",
          "type": "uint256"
        },
        {
          "internalType": "bool",
          "name": "isPartner",
          "type": "bool"
        },
        {
          "internalType": "uint256",
          "name": "buyDiscount",
          "type": "uint256"
        },
        {
          "internalType": "bool",
          "name": "premierPartner",
          "type": "bool"
        },
        {
          "internalType": "uint256",
          "name": "premierPartnerDiscount",
          "type": "uint256"
        },
        {
          "internalType": "bool",
          "name": "isActive",
          "type": "bool"
        },
        {
          "internalType": "bool",
          "name": "isBanned",
          "type": "bool"
        },
        {
          "internalType": "bool",
          "name": "exists",
          "type": "bool"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "_settings",
      "outputs": [
        {
          "internalType": "address",
          "name": "owner",
          "type": "address"
        },
        {
          "internalType": "address",
          "name": "recipient",
          "type": "address"
        },
        {
          "internalType": "address",
          "name": "authorized",
          "type": "address"
        },
        {
          "internalType": "bool",
          "name": "rewardsForce",
          "type": "bool"
        },
        {
          "internalType": "address",
          "name": "rewardsPool",
          "type": "address"
        },
        {
          "internalType": "uint256",
          "name": "rewardsPercentage",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "name": "_subscriptionAddresses",
      "outputs": [
        {
          "internalType": "address",
          "name": "",
          "type": "address"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "",
          "type": "address"
        }
      ],
      "name": "_subscriptionAutoRenew",
      "outputs": [
        {
          "internalType": "address",
          "name": "wallet",
          "type": "address"
        },
        {
          "internalType": "uint256",
          "name": "optionId",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "renewAtTime",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "lookupIndex",
          "type": "uint256"
        },
        {
          "internalType": "bool",
          "name": "isValid",
          "type": "bool"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "name": "_subscriptionAutoRenewAddresses",
      "outputs": [
        {
          "internalType": "address",
          "name": "",
          "type": "address"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "name": "_subscriptionOptionsIndividual",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "id",
          "type": "uint256"
        },
        {
          "internalType": "string",
          "name": "title",
          "type": "string"
        },
        {
          "internalType": "string",
          "name": "description",
          "type": "string"
        },
        {
          "internalType": "uint256",
          "name": "amount",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "duration",
          "type": "uint256"
        },
        {
          "internalType": "address",
          "name": "tokenPaymentAddress",
          "type": "address"
        },
        {
          "internalType": "uint256",
          "name": "limitedQuantity",
          "type": "uint256"
        },
        {
          "internalType": "bool",
          "name": "imposeLimitedQuantity",
          "type": "bool"
        },
        {
          "internalType": "uint256",
          "name": "limitedQuantityPerWallet",
          "type": "uint256"
        },
        {
          "internalType": "bool",
          "name": "imposeLimitedQuantityPerWallet",
          "type": "bool"
        },
        {
          "internalType": "bool",
          "name": "autoRenewAllowed",
          "type": "bool"
        },
        {
          "internalType": "uint256",
          "name": "expiration",
          "type": "uint256"
        },
        {
          "internalType": "bool",
          "name": "isValid",
          "type": "bool"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "_subscriptionOverall",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "totalSubscriptions",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "totalUniqueSubscriptions",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "",
          "type": "address"
        }
      ],
      "name": "_subscriptions",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "id",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "renewedTime",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "subscriptionStartTime",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "expirationTime",
          "type": "uint256"
        },
        {
          "internalType": "bool",
          "name": "isValid",
          "type": "bool"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "name": "_tokensUsedForPayments",
      "outputs": [
        {
          "internalType": "address",
          "name": "",
          "type": "address"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "_tokensUsedForPaymentsCounter",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "_totalSubscriptionOptions",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "amount_",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "duration_",
          "type": "uint256"
        },
        {
          "internalType": "string",
          "name": "title_",
          "type": "string"
        },
        {
          "internalType": "string",
          "name": "description_",
          "type": "string"
        },
        {
          "internalType": "address",
          "name": "tokenPaymentAddress_",
          "type": "address"
        },
        {
          "internalType": "uint256",
          "name": "limitedQuantity_",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "autoRenewAllowed_",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "expirationDuration_",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "limitedQuantityPerWallet_",
          "type": "uint256"
        }
      ],
      "name": "addSubscriptionOption",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address[]",
          "name": "subscriberAddress_",
          "type": "address[]"
        },
        {
          "internalType": "uint256[]",
          "name": "timeToAdd_",
          "type": "uint256[]"
        },
        {
          "internalType": "uint256[]",
          "name": "optionIfAny_",
          "type": "uint256[]"
        }
      ],
      "name": "addTime",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "referrerFee_",
          "type": "uint256"
        }
      ],
      "name": "adjustDefaultReferrerFee",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "referrerPartnerFee_",
          "type": "uint256"
        }
      ],
      "name": "adjustDefaultReferrerPartnerFee",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "string",
          "name": "referrerCode_",
          "type": "string"
        },
        {
          "internalType": "uint256",
          "name": "discountAmount_",
          "type": "uint256"
        }
      ],
      "name": "adjustPremierPartnerDiscount",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "referrerFee_",
          "type": "uint256"
        },
        {
          "internalType": "string",
          "name": "referrerCode_",
          "type": "string"
        }
      ],
      "name": "adjustReferrerFee",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "poolAddress_",
          "type": "address"
        }
      ],
      "name": "adjustRewardPoolAddress",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "percentage_",
          "type": "uint256"
        }
      ],
      "name": "adjustRewardPoolPercentage",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "walletFor_",
          "type": "address"
        }
      ],
      "name": "cancelSubscriptionAutoRenew",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "buyDiscount_",
          "type": "uint256"
        }
      ],
      "name": "changePartnerDiscount",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "toChange_",
          "type": "uint256"
        },
        {
          "internalType": "address",
          "name": "newAddress_",
          "type": "address"
        }
      ],
      "name": "changeSettingAddress",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "subscriber_",
          "type": "address"
        }
      ],
      "name": "isSubscriptionActive",
      "outputs": [
        {
          "internalType": "bool",
          "name": "status_",
          "type": "bool"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "subOptionID_",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "amount_",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "duration_",
          "type": "uint256"
        },
        {
          "internalType": "string",
          "name": "title_",
          "type": "string"
        },
        {
          "internalType": "string",
          "name": "description_",
          "type": "string"
        },
        {
          "internalType": "address",
          "name": "tokenPaymentAddress_",
          "type": "address"
        },
        {
          "internalType": "uint256",
          "name": "limitedQuantity_",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "expirationDuration_",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "limitedQuantityPerWallet_",
          "type": "uint256"
        }
      ],
      "name": "modifySubscriptionOption",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "optionId_",
          "type": "uint256"
        },
        {
          "internalType": "string",
          "name": "referrerCode_",
          "type": "string"
        }
      ],
      "name": "performSubscriptionAction",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "optionId_",
          "type": "uint256"
        },
        {
          "internalType": "address",
          "name": "walletFor_",
          "type": "address"
        },
        {
          "internalType": "string",
          "name": "referrerCode_",
          "type": "string"
        }
      ],
      "name": "performSubscriptionActionRenew",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "to_",
          "type": "address"
        }
      ],
      "name": "recoverCoin",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "token_",
          "type": "address"
        },
        {
          "internalType": "address",
          "name": "to_",
          "type": "address"
        }
      ],
      "name": "recoverToken",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "string",
          "name": "referrerCode_",
          "type": "string"
        }
      ],
      "name": "registerReferrer",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address[]",
          "name": "subscriberAddress_",
          "type": "address[]"
        },
        {
          "internalType": "uint256[]",
          "name": "timeToRemove_",
          "type": "uint256[]"
        }
      ],
      "name": "removeTime",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "optionId_",
          "type": "uint256"
        }
      ],
      "name": "toggleAutoRenewal",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "string",
          "name": "referrerCode_",
          "type": "string"
        }
      ],
      "name": "toggleBannedReferrer",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "string",
          "name": "referrerCode_",
          "type": "string"
        }
      ],
      "name": "togglePartnerReferrer",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "string",
          "name": "referrerCode_",
          "type": "string"
        }
      ],
      "name": "togglePremierPartner",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "toggleReferralsStatus",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "string",
          "name": "referrerCode_",
          "type": "string"
        }
      ],
      "name": "toggleReferrer",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "toggleRewardsForce",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "optionId_",
          "type": "uint256"
        }
      ],
      "name": "toggleSubscriptionOption",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    }
  ]
```

{% endcode %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://praxxas.gitbook.io/killswitch/technicals/smart-contracts/kssubscription-abi.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
