Skip to Content

ERC20 API logo ERC20 API

API for ERC20 Contracts. Every ABI item below is callable as its own Spectrum JSON-RPC method. See the Marketplace overview for how the method names are built.

Tokens

Method names here carry no chain, so every call must pass chain and the contract address that implements this ABI.

Methods

Functions

Readnamespectrum_erc20_erc20api_call_name

Fetches the name for the token

curl -X POST https://your-endpoint.simplystaking.xyz/v1 \
  -H "Content-Type: application/json" \
{
  "jsonrpc": "2.0",
  "method": "spectrum_erc20_erc20api_call_name",
  "params": {
    "args": [],
    "chain": "ethereum",
    "address": "0x0000000000000000000000000000000000000001"
  },
  "id": 1
}
Outputs
NameType
output_0string
Try It
Demo endpoint: one request per second. Get your own endpoint for higher limits.
ReadtotalSupplyspectrum_erc20_erc20api_call_totalSupply

Fetches the total supply for the token

curl -X POST https://your-endpoint.simplystaking.xyz/v1 \
  -H "Content-Type: application/json" \
{
  "jsonrpc": "2.0",
  "method": "spectrum_erc20_erc20api_call_totalSupply",
  "params": {
    "args": [],
    "chain": "ethereum",
    "address": "0x0000000000000000000000000000000000000001"
  },
  "id": 1
}
Outputs
NameType
output_0uint256
Try It
Demo endpoint: one request per second. Get your own endpoint for higher limits.
Readsymbolspectrum_erc20_erc20api_call_symbol

Fetches the symbol for the token

curl -X POST https://your-endpoint.simplystaking.xyz/v1 \
  -H "Content-Type: application/json" \
{
  "jsonrpc": "2.0",
  "method": "spectrum_erc20_erc20api_call_symbol",
  "params": {
    "args": [],
    "chain": "ethereum",
    "address": "0x0000000000000000000000000000000000000001"
  },
  "id": 1
}
Outputs
NameType
output_0string
Try It
Demo endpoint: one request per second. Get your own endpoint for higher limits.
Readallowancespectrum_erc20_erc20api_call_allowance

Fetches the allowance of an address for a spender

curl -X POST https://your-endpoint.simplystaking.xyz/v1 \
  -H "Content-Type: application/json" \
{
  "jsonrpc": "2.0",
  "method": "spectrum_erc20_erc20api_call_allowance",
  "params": {
    "args": [
      "0x0000000000000000000000000000000000000001",
      "0x0000000000000000000000000000000000000001"
    ],
    "chain": "ethereum",
    "address": "0x0000000000000000000000000000000000000001"
  },
  "id": 1
}
Inputs
NameType
owneraddress
spenderaddress
Outputs
NameType
output_0uint256
Try It
Demo endpoint: one request per second. Get your own endpoint for higher limits.
ReadbalanceOfspectrum_erc20_erc20api_call_balanceOf

Fetches the balance of an address for the token

curl -X POST https://your-endpoint.simplystaking.xyz/v1 \
  -H "Content-Type: application/json" \
{
  "jsonrpc": "2.0",
  "method": "spectrum_erc20_erc20api_call_balanceOf",
  "params": {
    "args": [
      "0x0000000000000000000000000000000000000001"
    ],
    "chain": "ethereum",
    "address": "0x0000000000000000000000000000000000000001"
  },
  "id": 1
}
Inputs
NameType
accountaddress
Outputs
NameType
output_0uint256
Try It
Demo endpoint: one request per second. Get your own endpoint for higher limits.
Readdecimalsspectrum_erc20_erc20api_call_decimals

Fetches the decimals for the token

curl -X POST https://your-endpoint.simplystaking.xyz/v1 \
  -H "Content-Type: application/json" \
{
  "jsonrpc": "2.0",
  "method": "spectrum_erc20_erc20api_call_decimals",
  "params": {
    "args": [],
    "chain": "ethereum",
    "address": "0x0000000000000000000000000000000000000001"
  },
  "id": 1
}
Outputs
NameType
output_0uint8
Try It
Demo endpoint: one request per second. Get your own endpoint for higher limits.

Events

EventTransferspectrum_erc20_erc20api_getLogs_Transfer

Event emitted when a transfer is made

curl -X POST https://your-endpoint.simplystaking.xyz/v1 \
  -H "Content-Type: application/json" \
{
  "jsonrpc": "2.0",
  "method": "spectrum_erc20_erc20api_getLogs_Transfer",
  "params": {
    "args": [
      null,
      null,
      null
    ],
    "fromBlock": "latest",
    "toBlock": "latest",
    "chain": "ethereum",
    "address": "0x0000000000000000000000000000000000000001"
  },
  "id": 1
}
Event arguments
NameTypeIndexed
fromaddressyes
toaddressyes
valueuint256no
Try It
Demo endpoint: one request per second. Get your own endpoint for higher limits.
EventApprovalspectrum_erc20_erc20api_getLogs_Approval

Event emitted when an approval is made

curl -X POST https://your-endpoint.simplystaking.xyz/v1 \
  -H "Content-Type: application/json" \
{
  "jsonrpc": "2.0",
  "method": "spectrum_erc20_erc20api_getLogs_Approval",
  "params": {
    "args": [
      null,
      null,
      null
    ],
    "fromBlock": "latest",
    "toBlock": "latest",
    "chain": "ethereum",
    "address": "0x0000000000000000000000000000000000000001"
  },
  "id": 1
}
Event arguments
NameTypeIndexed
owneraddressyes
spenderaddressyes
valueuint256no
Try It
Demo endpoint: one request per second. Get your own endpoint for higher limits.