1
Configuring the points operator address for the contract
Any contracts that expect to accumulate Blast points or gold should call
configurePointsOperator
to be compatible with the points API.We recommend calling it on construction/proxy initialization.Contracts can earn points by holding ETH, WETH, or USDB, or by being designated
recipients in another contract’s interactions with the points API.operator
is now configured and we can move onto the offchain steps!
How do I change the operator at a later stage?
How do I change the operator at a later stage?
Once the points operator has been set once, only the existing points
operator can update it by calling The first parameter of
configurePointsOperatorOnBehalf
.configurePointsOperatorOnBehalf
is the contract you’d like to change the points operator for.The second parameter is the new points operator
. The msg.sender
must be the current points operator.This mechanism allows you to change your points operator at any point after your contract has been created.Interacting with the Points API
The points API is authenticated and requires thebearerToken
to be present in headers as Authorization: Bearer ${bearerToken}
.
We will get the bearerToken
from the authentication flow.
1
Obtaining a challenge
Requesting a challenge and message. Message to be signed by the
operator
private key following the
ERC-191 standard2
Obtaining a bearer token
Using the message signed by the
operator
private key we can now obtain a bearerToken
which then can be used to access authenticated routes on the Points API.3
Get contract's points balance
Get the contract’s points balance to see how many points can be distributed.The response will contain the points balances for both
Blast Points
(PHASE2_POINTS
) and Blast Gold
(PHASE2_GOLD
).4
Submitting a batch of point transfers
Submit a batch with details indicating which and how many points to transfer to a user.Operators cannot submit a batch to transfer
PHASE2_POINTS
and PHASE2_GOLD
points simultaneously.secondsToFinalize
should be greater than equal to 3600
for mainnet. If not provided the default is 86400
.Check Points API Parameters for the respective network for more information.If you need idempotency you can generate your own
batchId
s and use this API endpoint.5
Fetching a single batch
Fetching the submitted batch to check the status of the point transfers.
Alternatively, you can fetch all batches associated with your
contractAddress
using this API endpoint.How do I cancel one/some of the transfers in the batch?
How do I cancel one/some of the transfers in the batch?
You cannot cancel an individual transfer, you cancel the entire batch of
transfers using
this
API endpoint and submit a new batch.