> For the complete documentation index, see [llms.txt](https://docs.altlayer.io/altlayer-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.altlayer.io/altlayer-documentation/rollup-launchpad/api-and-sdks/creating-flash-layer.md).

# Creating Flash Layer

**Request**

Create a new free trial flashlayer.

```javascript
POST /v1/flashlayer/create
```

**Request body**

{% tabs %}
{% tab title="Free Tier" %}

```json
{
  "flashlayer": {
    "settings": {
      "fcfs": true, // first in first serve mod
      "gasless": true, // gasless
      "blockTime": "0.5", // block time in sec
      "tokenSymbol": "ETH", // token symbol
      "blockGasLimit": "70000000", // block gas limit in wei
      "tokenDecimals": "18", // token decimals
      "genesisAccounts": [ // list of genesis accounts
        {
          "account": "0x55085B2Fd83323d98d30d6B3342cc39de6D527f8",
          "balance": "21000000000000000000000000"
        },
        {
          "account": "0x9434e7d062bF1257BF726a96A83fAE177703ccFD",
          "balance": "21000000000000000000000000"
        }
      ]
    },
    "name": "freetrial" // flashlayer name
  },
  "freeTrial": true
}
```

{% endtab %}

{% tab title="Eigenlayer Restaking Tier" %}

```json
{
  "restakingTrial": true,
  "walletSign": {
    "address": "<Your restaking address>",
    "sign": "<Payload signature>",
    "ts": "<timestamp>"
  },
  "flashlayer": {
    "name": "<flashlayer name>",
    "settings": {
      "tokenDecimals": "18",
      "genesisAccounts": [
        {
          "account": "0x55085B2Fd83323d98d30d6B3342cc39de6D527f8",
          "balance": "21000000000000000000000000"
        },
        {
          "account": "0x9434e7d062bF1257BF726a96A83fAE177703ccFD",
          "balance": "21000000000000000000000000"
        }
      ],
      "blockGasLimit": "70000000",
      "gasless": true,
      "fcfs": true,
      "tokenSymbol": "ETH",
      "blockTime": "1"
    }
  }
}
```

To generate `walletSign` section, you can use the following code snippet

````typescript
```
const { ethers } = require("ethers");

const provider = new ethers.providers.JsonRpcProvider();

const privateKey = `<your private key>`;
const wallet = new ethers.Wallet(privateKey, provider);

async function sign() {
  var ts = Math.round(+new Date() / 1000);
  const domain = {
    name: "Altlayer Launchpad",
  };
  const types = {
    WalletSign: [
      { name: "ts", type: "uint256" },
      { name: "address", type: "address" },
    ],
  };
  const value = {
    ts: ts,
    address: wallet.address,
  };
  const signature = await wallet._signTypedData(domain, types, value);
  console.log("ts:", ts.toString());
  console.log("address:", wallet.address);
  console.log("sign:", signature);
}

sign();
````

Please ensure that your address has restaked at the Eigenlayer testnet. For more information, you can refer to [Prerequisite - Restake with EigenLayer](/altlayer-documentation/rollup-launchpad/creating-rollup-restaking-tier/prerequisite-restake-with-eigenlayer.md).
{% endtab %}
{% endtabs %}

<table><thead><tr><th width="188.33333333333331">Property</th><th width="108">Type</th><th>Description</th></tr></thead><tbody><tr><td>fcfs</td><td>bool </td><td>Where transaction processing mode is first come first serve or priority gas auction</td></tr><tr><td>gasless</td><td>bool</td><td>whether network gas price is priced at 0 gas or not</td></tr><tr><td>blocktime</td><td>float</td><td>Between 0.5 to 60</td></tr><tr><td>tokenSymbol</td><td>string</td><td>Between 2 to 6 characters</td></tr><tr><td>blockGasLimit</td><td>uint</td><td>Between 30,000,000 to 60,000,000</td></tr><tr><td>tokenDecimals</td><td>uint</td><td>High recommended to keep it at 18 decimals</td></tr><tr><td>genesis</td><td>list</td><td>list of genesis account and balances</td></tr><tr><td>name</td><td>string</td><td>Name of the flash layer<br>Between 2 and 12 characters, lowercase and cannot begin with numbers.</td></tr><tr><td>freetrial</td><td>bool</td><td>set to true to use free trial tier</td></tr><tr><td>restakingTrial</td><td>bool</td><td>set to true to use restaking tier</td></tr></tbody></table>

**Response**&#x20;

```json
{
  "flashlayer": {
    "name": "freetrial",
    "status": "STATUS_INITIALIZING",
    "settings": {
      "blockTime": 0.5,
      "gasless": true,
      "fcfs": true,
      "genesisAccounts": [
        {
          "account": "0x55085B2Fd83323d98d30d6B3342cc39de6D527f8",
          "balance": "21000000000000000000000000"
        },
        {
          "account": "0x9434e7d062bF1257BF726a96A83fAE177703ccFD",
          "balance": "21000000000000000000000000"
        }
      ],
      "tokenDecimals": "18",
      "tokenSymbol": "ETH",
      "blockGasLimit": "70000000"
    },
    "resources": {
      "rpc": "https://flashlayer.alt.technology/freetrial",
      "explorer": "https://explorer.alt.technology?rpcUrl=https://flashlayer.alt.technology/freetrial",
      "faucet": "https://faucet.alt.technology?chainId=10000001",
      "chainId": "10000001",
      "rpcWs": "wss://flashlayer.alt.technology/freetrial"
    },
    "createdAt": "2023-08-03T10:13:27.491183Z",
    "id": "1",
    "tier": "FLASHLAYER_TIER_FREE_TRIAL",
  }
}
```

{% tabs %}
{% tab title="CURL" %}

```bash
## /v1/flashlayer/create
curl -X "POST" "https://dashboard-api.alt.technology/v1/flashlayer/create" \
     -H 'Content-Type: application/json' \
     -H 'Accept: application/json' \
     -H 'Authorization: Bearer {access_token}' \
     -d $'{
  "freeTrial": true,
  "flashlayer": {
    "name": "freetrial",
    "settings": {
      "tokenDecimals": "18",
      "genesisAccounts": [
        {
          "account": "0x55085B2Fd83323d98d30d6B3342cc39de6D527f8",
          "balance": "21000000000000000000000000"
        },
        {
          "account": "0x9434e7d062bF1257BF726a96A83fAE177703ccFD",
          "balance": "21000000000000000000000000"
        }
      ],
      "blockGasLimit": "70000000",
      "gasless": true,
      "fcfs": true,
      "tokenSymbol": "ETH",
      "blockTime": "0.5"
    }
  }
}'
```

{% endtab %}

{% tab title="Golang" %}

```go
package main

import (
	"fmt"
	"io"
	"net/http"
	"bytes"
)

func sendV1FlashlayerCreate() {
	// /v1/flashlayer/create (POST https://dashboard-api.alt.technology/v1/flashlayer/create)

	json := []byte(`{"freeTrial": true,"flashlayer": {"name": "freetrial","settings": {"tokenDecimals": "18","genesisAccounts": [{"account": "0x55085B2Fd83323d98d30d6B3342cc39de6D527f8","balance": "21000000000000000000000000"},{"account": "0x9434e7d062bF1257BF726a96A83fAE177703ccFD","balance": "21000000000000000000000000"}],"blockGasLimit": "70000000","gasless": true,"fcfs": true,"tokenSymbol": "ETH","blockTime": "0.5"}}}`)
	body := bytes.NewBuffer(json)

	// Create client
	client := &http.Client{}

	// Create request
	req, err := http.NewRequest("POST", "https://dashboard-api.alt.technology/v1/flashlayer/create", body)

	// Headers
	req.Header.Add("Content-Type", "application/json")
	req.Header.Add("Accept", "application/json")
	req.Header.Add("Authorization", "Bearer {access_token}")
## /v1/flashlayer/create
curl -X "POST" "https://stg-dashboard-api.alt.technology/v1/flashlayer/create" \
     -H 'Content-Type: application/json' \
     -H 'Accept: application/json' \
     -H 'Authorization: Bearer {access_token}' \
     -d $'{
  "freeTrial": true,
  "flashlayer": {
    "name": "freetrial",
    "settings": {
      "tokenDecimals": "18",
      "genesisAccounts": [
        {
          "account": "0x55085B2Fd83323d98d30d6B3342cc39de6D527f8",
          "balance": "21000000000000000000000000"
        },
        {
          "account": "0x9434e7d062bF1257BF726a96A83fAE177703ccFD",
          "balance": "21000000000000000000000000"
        }
      ],
      "blockGasLimit": "70000000",
      "gasless": true,
      "fcfs": true,
      "tokenSymbol": "ETH",
      "blockTime": "0.5"
    }
  }
}'
	// Fetch Request
	resp, err := client.Do(req)
	
	if err != nil {
		fmt.Println("Failure : ", err)
	}

	// Read Response Body
	respBody, _ := io.ReadAll(resp.Body)

	// Display Results
	fmt.Println("response Status : ", resp.Status)
	fmt.Println("response Headers : ", resp.Header)
	fmt.Println("response Body : ", string(respBody))
}// Some code
```

{% endtab %}

{% tab title="Python" %}

```python
# Install the Python Requests library:
# `pip install requests
#!/usr/bin/python3
import requests
import json


def send_request():
    # /v1/flashlayer/create
    # POST https://dashboard-api.alt.technology/v1/flashlayer/create

    try:
        response = requests.post(
            url="https://dashboard-api.alt.technology/v1/flashlayer/create",
            headers={
                "Content-Type": "application/json",
                "Accept": "application/json",
                "Authorization": "Bearer {access_token}"
            },
            data=json.dumps({
                "freeTrial": True,
                "flashlayer": {
                    "name": "freetrial",
                    "settings": {
                        "tokenDecimals": "18",
                        "genesisAccounts": [
                            {
                                "account": "0x55085B2Fd83323d98d30d6B3342cc39de6D527f8",
                                "balance": "21000000000000000000000000"
                            },
                            {
                                "account": "0x9434e7d062bF1257BF726a96A83fAE177703ccFD",
                                "balance": "21000000000000000000000000"
                            }
                        ],
                        "blockGasLimit": "70000000",
                        "gasless": True,
                        "fcfs": True,
                        "tokenSymbol": "ETH",
                        "blockTime": "0.5"
                    }
                }
            })
        )
        print('Response HTTP Status Code: {status_code}'.format(
            status_code=response.status_code))
        print('Response HTTP Response Body: {content}'.format(
            content=response.content))
    except requests.exceptions.RequestException:
        print('HTTP Request failed')py
```

{% endtab %}
{% endtabs %}


---

# 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://docs.altlayer.io/altlayer-documentation/rollup-launchpad/api-and-sdks/creating-flash-layer.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.
