Airdrop
As the name suggests, Airdrop 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/airdrop
Create a airdrop
This endpoint allows you to deploy a new airdrop to your a network of your choice.
Required attributes
- Name
name
- Type
- string
- Description
The name for the airdrop.
- Name
symbol
- Type
- string
- Description
The ticker symbol for the airdrop.
- 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 to.
- Name
airdrop.addresses
- Type
- array
- Description
Array of addresses to airdrop to.
- Name
airdrop.supply
- Type
- number
- Description
The amount to send to each recipient.
- 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/airdropcurl https://api.metal.build/template/airdrop \
-H "Authorization: Bearer {token}" \
-d '{
"name": "test",
"symbol": "TEST",
"totalSupply": 100,
"initialPrice": 0.01,
"network": "sepolia",
"airdrop": {
"addresses": ["0xabc...", "0x234..."],
"supply": 20
},
"recipient": {
"address": "0x1234...",
"supply": 1
},
"marketplace": true
}'
Response
{
"id": "dc93a483-85dc-5893-b85d-b18dad0ebbda"
}
GET/template/airdrop/status/:id
Get status of Airdrop Deployment
This endpoint will return the status of your airdrop deployment.
Required attributes
- Name
id
- Type
- integer
- Description
ID of deployment.
Request
GET
/airdrop/statuscurl -G https://api.metal.build/airdrop/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
}
}