Navigate...
Update Draft
sdk.distributions.updateDraft(id, req)
Update metadata of a distribution in DRAFT status. Change the name, chain, token, or sender address. Only works while the distribution is in DRAFT — once prepared, metadata cannot be changed. To change recipients, use replaceRecipients() instead.
Only distributions in DRAFT status can be updated. Once you call prepare(), the distribution transitions to PREPARED and can no longer be edited.
Switching to native currency
Pass tokenAddress: 0x0000000000000000000000000000000000000000 to switch the draft to native currency (ETH, POL, BNB, …). No approval step is required on the subsequent prepare(). The server normalizes tokenSymbol to the chain’s nativeSymbol.
API key required to run methods
API Key *
Base URL
id
string
required
Distribution ID (must be in DRAFT status)
Distribution ID
request.chainId
number
optional
Updated chain ID
Chain ID
Select chain
request.name
string
optional
Updated distribution name
Name (optional)
request.notes
string
optional
Updated notes
Notes (optional)
request.tokenAddress
string
optional
Updated token address. Pass 0x0000000000000000000000000000000000000000 to target the native currency.
Token Address (optional)
For native currency (ETH, POL, BNB, MATIC…) use
request.tokenSymbol
string
optional
Updated token symbol
Token Symbol (optional)
request.account
string
optional
Updated sender wallet address
Account (optional)
request.isDeflationary
boolean
optional
Whether the token is deflationary
Is Deflationary (optional)
request.strategy
string
optional
Distribution execution strategy
Strategy (optional)
Returns
Distribution
Updated distribution object (still in DRAFT status)
id
string
Distribution identifier
projectId
string
Project that owns the distribution
name
string
Updated distribution name
status
string
DRAFT
chainId
number
Target chain ID
tokenAddress
string
Token contract address
tokenSymbol
string
Token symbol
totalRecipients
number | null
Number of recipients
totalAmount
string | null
Total token amount
updatedAt
string
ISO 8601 last update timestamp
Errors
Invalid distribution id
The request is not authorized
You do not have permission to access this resource
Distribution not found
Not in DRAFT status
See Also
createDraft()
Create the draft first
replaceRecipients()
Update recipients (cannot be done through updateDraft)
prepare()
Prepare calldata when editing is complete
Generated Code