Gas Station

Sui Gas Station FAQ

Note: for billing questions see our Sui Billing FAQ.

FAQ

How do I create a fund?

You create funds on the "Funds" tab of the Sui Gas Station page in your dashboard. A fund is tied to one network (Testnet, Mainnet) and you can have up to 10 funds per network. Note that currently there is no option to delete or rename a fund. When you create a fund on Testnet we deposit some SUI in it so you can start testing right away. Sorry, we don't do that on Mainnet 🥲.


How do I generate and find the deposit address of a fund?

Once your fund has been created, you can make deposits in order to start sponsoring transactions. Visit the "Funds" tab of the Sui Gas Station page in your dashboard. To find your fund's address, click View in the table (or + Add Gas Credits above it). Below, we clicked Viewbecause it take you directly to the fund summary):

In the modal that pops up, you will be able to see fund details and deposit history. When you do this the first time, a deposit address is generated. So, you need to do this at least once. This is the address you will make deposits to. Your address will be different than the example shown, and will be different for each of your Gas Station funds. Click the copy button (highlighted) to copy the address.

Note: Gas Station fund deposits can only be used to sponsor transactions and cannot be withdrawn. That said, you don't need to deposit an amount that will last you for months. You can deposit a smaller amount and monitor your balance. When the balance gets low, you can add enough to last another week or two (or whatever works best for you).


How do I view a fund's deposit history?

On the "Funds" tab of the Sui Gas Station page in your dashboard, click "View" in the "Details" column next to the fund:

Then, click the "Deposit history" tab of the modal that comes up.


How do I use a fund for sponsorship?

When you set up an API access key with Gas Station rights for a network, you link it to a fund on that network. Then, whenever you make an API request to sponsor a transaction, we use the fund linked to the API key you use. See our Authentication and API Keys guide for an example of setting up a Gas Station API access key.


How do I check which fund an access key is tied to?

On the Access Keys page of your Shinami dashboard, click on the + next to the key in the "Access keys" table to expand the key editor tray. Once you click the + it becomes a - you can use to close the tray. If the key has Gas Station rights, we show the fund it's connected to.

First, click the `+` next to the key.

How do I get free Testnet funds for testing?

Here are some options.


How do I monitor my fund balance and recent spend?

Fund balance:

There are two main ways to do this:

  1. Manually in your Shinami Dashboard on the Sui Gas Station page, by looking at the "Funds" table in the "Funds" tab. The "Gas Credits Available" column is the total amount in a fund, and the "Gas Credits in Flight" column is the portion of that being held for active sponsorships. So, the amount you can use for new sponsorships is "Gas Credits Available" - "Gas Credits in Flight"
  2. Through the API with a gas_getFund request.

Recent spend

in your Shinami Dashboard on the Sui Gas Station page, choose the "Sponsorship Insights" tab. Make sure to choose the network and time range you prefer - for example "Sui Mainnet" + "Last 30 days". In the summary metrics at the top, you can see your "Total sponsorship cost", as well as the "Average sponsorship cost" over the time range. If you scroll down, the "Total sponsorship spend" graph, whose title is at the very bottom of the image, shows your spend over time by fund.



Where can I see individual transactions I've sponsored?

The Sui Gas Station page has the following two tabs:

  • In flight transactions: Any active but as-yet unused sponsorships will show up here. For example, if you sponsor a transaction but the user does not sign it, or you do not execute it for a few minutes or more. Note that sponsorships can sometimes take a minute or two to show up in this list and then to move out of it into the "completed transactions" list.
  • Completed transactions: See your sponsorships that have been used or that went unused (expired). You can search by sender, transaction digest, or fund name. The data is limited to the last 14 days and 10,000 transactions. For historical sponsorships (from the previous month and older) see how to download a CSV of your monthly Gas Station activity on Mainnet on the Billing page.

How do I view my API requests, errors, and latency?

On the Sui Gas Station page of your dashboard select the "API Insights" tab:

Here are some tips:

  1. Filter by network, access key, method, and/or time range. Changing these filters re-fetches all the insights on the page.
  2. Summary metrics for a quick look at your error rates. Of course, a low error rate over a long period could hide one day that had a high error-rate, so it's worth occasionally looking at the graphs below.
  3. If you hover over a section of a chart bar, you'll see details about what it represents.
  4. You can click items in the legend to hide or show them.
  5. There are more graphs below! Scroll down to view error and latency insights.

What each graph shows

  1. Request count by method: This shows the count of all requests, including all errors, broken down by method name (assuming you've selected "All methods" in the filter at the top of the page).
  2. Error count by JSON RPC error code: This shows the count of requests that got a HTTP 200 and a JSON-RPC error, broken down by error code. If you filter the page by an individual method, e.g. gas_sponsorTransactionBlock, you'll only see the JSON-RPC errors you received on that method. This pairs well with our Error Guide's section on Sui Gas Station.
  3. Error ratio by method: This shows the JSON-RPC error ratio for each method. For example, if you sent 100 gas_sponsorTransactionBlock requests in a time bucket (e.g. a day) and you got a JSON-RPC error on two of them, your error ratio would be 2% for that method in that time bucket. If you see a high error ratio it's useful to scroll up to the "Request count by method" graph to see how many of that method you sent in a time bucket: a 100% error ratio could happen if you send one request and it gets an error.
  4. Requests latency by method - P50: This shows the 50th percentile latency for each method across all of its requests, including errors. This is the latency within our system, so the latency you observe will be a little higher because of network travel time.
  5. Requests latency by method - P95: This shows the 95th percentile latency for each method across all of its requests, including errors. This is the latency within our system, so the latency you observe will be a little higher because of network travel time.
  6. Successful requests latency: This shows the 50th and 95th percentile latencies for all of your successful requests (no HTTP or JSON-RPC error). It does not group by method.
  7. Requests with non-rate-limit errors latency: This shows the 50th and 95th percentile latencies for all of your requests that got a JSON-RPC error (excluding rate-limit-errors since they have very low latency). It does not group by method.