Transfer ERC-20
Transfer ERC-20 tokens to users in your application. This endpoint (previously known as “Credit”) enables you to reward users with ERC-20 tokens for their actions or achievements. The endpoint returns an unsigned transaction that needs to be signed using your application’s private key (stored securely in server environment variables). After signing, you can broadcast the transaction using either:
- Execute Transaction endpoint for immediate submission
- Execute Transaction and Wait endpoint if you need to wait for transaction confirmation
Important Notes:
-
Default Behavior: By default, this endpoint transfers existing ERC-20 tokens from the transaction sender’s account to the receiver’s account through the Application contract specified in the
app_id
parameter. -
Required Setup: Before using this endpoint, you must create an allowance for the Application contract to transfer the required amount of tokens. This can be done using the approve endpoint.
-
Minting Option: If you want to mint new tokens instead of transferring existing ones, set the optional parameter
mint
totrue
.
Authorizations
Body
Response
Rewards Credit token
The response is of type object
.