erc20_mintsBurns
The Transfers API allows you to easily fetch historical mint and burn event for any erc20 contract address.
You can specify the contract address and account address, then you can obtain all the mint and burn records of that collection which the account address has. If you don't specify the account address, the API can return all the mint and burn records happening in that contract. If you don't specify the contract address, the API can return all the mint and burn records associated with that account.
Supported on Ethereum, BNB Chain, Optimism, and Arbitrum.

Parameters

Object - An object with the following fields (required):
  • contractAddress(hex string, optional) - the ERC20 contact address to filter for.
  • fromBlockNumber(integer number, optional) - the starting time range you want to fetch events over.
  • toBlockNumber(integer number, optional) - the ending time range you want to fetch events over.
  • category(string, optional, default all) - mint or burn or all.
  • pageSize(integer number, optional, default 100) - max number of results to return per call.
  • pageIndex(integer number, optional, default 1) - page index.

Returns

Object - An object with the following fields:
  • id(integer number) - json-rpc id.
  • jsonrpc(string) - json-rpc version.
  • result(object) - an object with the following fields:
    • nextPageIndex(integer number) - next page (if exists, else blank).
    • data(array of objects, defined below) - response datas, sorted in ascending order by block number.
  • Object schema:
    • blockNumber(integer number) - the block that the transaction was included in.
    • value(string) - transfer value.
    • contractAddress(hex string) - the contract address of the token.
    • txHash(hex string) - the hash code for the transaction.
    • blockHash(hex string) - the hash code for the block.
    • logIndex(integer number) - the index number for the index.
    • from(hex string) - from address.
    • to(hex string) - to address.
    • mint(boolean) - mint type.

Example

Request

curl https://api.blockvision.org/v1/<api key> \
-X POST \
-H "Content-Type: application/json" \
-d '{
"id": 1,
"jsonrpc": "2.0",
"method": "erc20_mintsBurns",
"params": {
"fromBlockNumber":"",
"toBlockNumber":"",
"category":"mint",
"contractAddress":"0xCC8Fa225D80b9c7D42F96e9570156c65D6cAAa25",
"pageSize":5,
"pageIndex":1
}
}'

Result

{
"id": 1,
"jsonrpc": "2.0",
"result": {
"data": [
{
"blockNumber": "0xcf3234",
"contractAddress": "0xCC8Fa225D80b9c7D42F96e9570156c65D6cAAa25",
"txHash": "0xdeb2f850194a5d3045b1701d6fc849b340999b5fe78ae88719e2506f5318e237",
"blockHash": "0x8f83424797588672b3185bbae01413509b65348619f4c8387541a79614c58cee",
"logIndex": 477,
"from": "0x0000000000000000000000000000000000000000",
"to": "0x1A2a1c938CE3eC39b6D47113c7955bAa9DD454F2",
"value": 397706,
"mint": true
},
{
"blockNumber": "0xcf300b",
"contractAddress": "0xCC8Fa225D80b9c7D42F96e9570156c65D6cAAa25",
"txHash": "0x160e43543738fc1ece9ea6ac0219b0e71c0e88921720af24b0f3639658d41846",
"blockHash": "0x4354428bec34252dee4ff1798ce83b564344c590ad64c5972f709f4bbec0df47",
"logIndex": 142,
"removed": false,
"from": "0x0000000000000000000000000000000000000000",
"to": "0x1A2a1c938CE3eC39b6D47113c7955bAa9DD454F2",
"value": 128673781,
"mint": true
},
{
"blockNumber": "0xcf2a0a",
"contractAddress": "0xCC8Fa225D80b9c7D42F96e9570156c65D6cAAa25",
"txHash": "0x5a3573bef287060796d05d763d9d0615482415f3653da1e2d2db4ca87ec7317b",
"blockHash": "0xd4af96a2895d8a7e31c6d8cbf1c460ac498c45794031b26d2185001c1f207054",
"logIndex": 300,
"removed": false,
"from": "0x0000000000000000000000000000000000000000",
"to": "0x1A2a1c938CE3eC39b6D47113c7955bAa9DD454F2",
"value": 39382,
"mint": true
},
{
"blockNumber": "0xcf2a02",
"contractAddress": "0xCC8Fa225D80b9c7D42F96e9570156c65D6cAAa25",
"txHash": "0x33a5cf9f5613ad0b421fa64bbcce73a3c5c7aa1c2d532c2980671a56d4aad528",
"blockHash": "0xd5ce300d73b8a848661ac00490228dfed820e83527781bd4da650d22940d2a25",
"logIndex": 557,
"removed": false,
"from": "0x0000000000000000000000000000000000000000",
"to": "0x1A2a1c938CE3eC39b6D47113c7955bAa9DD454F2",
"value": 6433,
"mint": true
},
{
"blockNumber": "0xcf2a02",
"contractAddress": "0xCC8Fa225D80b9c7D42F96e9570156c65D6cAAa25",
"txHash": "0xd69e1f9d5b9cf6ef50c022196b50b06669ecdd1bee1d7af34fdd6f7ee25fa50d",
"blockHash": "0xd5ce300d73b8a848661ac00490228dfed820e83527781bd4da650d22940d2a25",
"logIndex": 205,
"removed": false,
"from": "0x0000000000000000000000000000000000000000",
"to": "0x1A2a1c938CE3eC39b6D47113c7955bAa9DD454F2",
"value": 7027000,
"mint": true
}
],
"nextPageIndex": 2
}
}
Copy link
Outline
Parameters
Returns
Example
Request
Result