Memecoins

As the name suggests, Memecoin deployments a core part of Metal — the very reason Metal exists is so you can have TKTK. We'll look at how to query, create, update, and delete memecoins.

POST/template/memecoin

Create a memecoin

This endpoint allows you to deploy a new memecoin to your a network of your choice.

Required attributes

  • Name
    name
    Type
    string
    Description

    The name for the memecoin.

  • Name
    symbol
    Type
    string
    Description

    The ticker symbol for the memecoin.

  • Name
    totalSupply
    Type
    number
    Description

    The total number of units (gets multiplied by 1e18).

  • Name
    initialPrice
    Type
    number
    Description

    USD cost per token (ex: 1 cent).

  • Name
    network
    Type
    string
    Description

    The network to deploy the memecoin to.

  • Name
    marketplace
    Type
    boolean
    Description

    deploys the token to metal market

Optional attributes

  • Name
    recipient.address
    Type
    string
    Description

    Unique identifier for the conversation associated with the contact.

  • Name
    recipient.amount
    Type
    number
    Description

    The amount to send to the recipient.

Request

POST
/template/memecoin
curl https://api.metal.build/template/memecoin \
  -H "Authorization: Bearer {token}" \
  -d '{
    "name": "test",
    "symbol": "TEST",
    "totalSupply": 100,
    "initialPrice": 0.01,
    "network": "sepolia",
    "recipient": {
      "address": "0x1234...",
      "supply": 1
    },
    "marketplace": true
  }'

Response

{
  "id": "dc93a483-85dc-5893-b85d-b18dad0ebbda"
}

GET/template/memecoin/status/:id

Get status of Memecoin Deployment

This endpoint will return the status of your Memecoin deployment.

Required attributes

  • Name
    id
    Type
    integer
    Description

    ID of deployment.

Request

GET
/memecoin/status
curl -G https://api.metal.build/memecoin/status \
  -H "Authorization: Bearer {token}" \
  -d '{"id":"dc93a483-85dc-5893-b85d-b18dad0ebbda"}'

Pending Response

{
    "has_more": false,
    "data": {
      "id": "dc93a483-85dc-5893-b85d-b18dad0ebbda",
      "status": "pending",
      "tokenAddress": "0x707118575e5f7bc51d27bdf55de203278ad08f77",
      "transactionHash"?: "0xfb5617cdad7382ea799cdbbdc79e713c62dbe1af3e7764fe3ae6d8ef9091222c" // a transaction hash will eventually be included when the tx hits the chain
    }
}

Successful Response

{
  "has_more": false,
  "data": {
    "id": "dc93a483-85dc-5893-b85d-b18dad0ebbda",
    "status": "success",
    "tokenAddress": "0x707118575e5f7bc51d27bdf55de203278ad08f77",
    "transactionHash": "0xfb5617cdad7382ea799cdbbdc79e713c62dbe1af3e7764fe3ae6d8ef9091222c",
    "metalBuildUrl": "https://staging.metal.build/deployment/dc93a483-85dc-5893-b85d-b18dad0ebbda/overview", // ‼ NOTE ‼: The uniswap url will not work as expected on sepolia.
    "uniswapUrl": "https://app.uniswap.org/swap?chain=Sepolia&exactField=output&inputCurrency=eth&outputCurrency=0x707118575e5f7bc51d27bdf55de203278ad08f77" // this will work fine once you deploy to on base mainnet
  }
}

Was this page helpful?