Update a Token
If a token is yet to be deployed, you can alter and update its details. To accomplish this, send a PATCH request to the Playfix API's /token
endpoint.
Update an existing token.
PATCH
https://api.playfix.io/token/<token_name>
Path Parameters
token_name*
String
An automatically generated token name
. This will start with a prefix of "tokens/" followed by a ULID.
Example: tokens/01gfrf15n9hqw3v08sqearsgh9
Headers
Authorization*
String
Bearer <your_access_token>
Request Body
project
String
The name
of the project that will contain the token.
title
String
The title of the token.
config
Object
Configuration options for the token.
config.symbol
String
A shorthand symbol to refer to the token. Choose a short, uppercase word between 3-5 characters that is unique within your project.
config.decimals
String
A non-negative integer that specifies the number of digits after the decimal point of a unit token. 18 is the standard and recommended decimal for ERC-20 tokens, but you can choose any number from 0 upwards.
config.initialSupply
String
A positive integer specifying the number of tokens that will be minted for a start.
config.totalSupply
String
A positive integer specifying the fixed total number of tokens that can ever exist. The value can either be greater than or equal to the initialSupply
.
config.mintable
boolean
Set to true
to allow minting of new tokens.
config.burnable
boolean
Set to true
to allow burning of tokens.
config.permit
boolean
Set to true
to allow gasless approval of tokens.
config.pausable
boolean
Set to true
to allow the pausing of token transfers.
config.votes
boolean
Set to true
to enable using token for voting.
config.flashMinting
boolean
Set to true
to allow flash minting.
config.snapshots
boolean
Set to true
to allow snapshots of token balances for easy querying in the future.
config.ownerAddress
String
Wallet address of the contract owner. which receives the initial token supply.
network
String
Name of the network where the token will be deployed. Accepted values include:
NETWORK_ETHEREUM
,
NETWORK_ETHEREUM_RINKERBY
,
NETWORK
_POLYGON
, or
NETWORK_POLYGON_MUMBAI
.
Example cURL API Call
Example Python API Call
Replace <your_
token_
name>
with the value of name
from the response of the token creation process.
Example: tokens/01gfrf15n9hqw3v08sqearsgh9
Response
You can only update a token details if it is yet to be deployed.
Last updated