ERC721 API
API for ERC721 (NFT) 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.
NFT
Method names here carry no chain, so every call must pass chain and the contract address that implements this ABI.
Methods
Functions
Readnamespectrum_erc721api_erc721_call_name
Fetches the name for the asset
curl -X POST https://your-endpoint.simplystaking.xyz/v1 \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "spectrum_erc721api_erc721_call_name",
"params": {
"args": [],
"chain": "ethereum",
"address": "0x0000000000000000000000000000000000000001"
},
"id": 1
}'spectrum.marketplace.call(
'spectrum_erc721api_erc721_call_name',
{
"args": [],
"chain": "ethereum",
"address": "0x0000000000000000000000000000000000000001"
},
){
"data": {
"chain": "ethereum",
"address": "0x0000000000000000000000000000000000000001",
"method": "spectrum_erc721api_erc721_call_name",
"abiName": "name",
"deploymentName": "erc721",
"operation": "call",
"abiType": "function",
"outputs": [
""
]
}
}Outputs
| Name | Type |
|---|---|
output_0 | string |
Readsymbolspectrum_erc721api_erc721_call_symbol
Fetches the symbol for the asset
curl -X POST https://your-endpoint.simplystaking.xyz/v1 \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "spectrum_erc721api_erc721_call_symbol",
"params": {
"args": [],
"chain": "ethereum",
"address": "0x0000000000000000000000000000000000000001"
},
"id": 1
}'spectrum.marketplace.call(
'spectrum_erc721api_erc721_call_symbol',
{
"args": [],
"chain": "ethereum",
"address": "0x0000000000000000000000000000000000000001"
},
){
"data": {
"chain": "ethereum",
"address": "0x0000000000000000000000000000000000000001",
"method": "spectrum_erc721api_erc721_call_symbol",
"abiName": "symbol",
"deploymentName": "erc721",
"operation": "call",
"abiType": "function",
"outputs": [
""
]
}
}Outputs
| Name | Type |
|---|---|
output_0 | string |
ReadtokenURIspectrum_erc721api_erc721_call_tokenURI
Fetches the URI pointing to the JSON metadata
curl -X POST https://your-endpoint.simplystaking.xyz/v1 \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "spectrum_erc721api_erc721_call_tokenURI",
"params": {
"args": [
"0"
],
"chain": "ethereum",
"address": "0x0000000000000000000000000000000000000001"
},
"id": 1
}'spectrum.marketplace.call(
'spectrum_erc721api_erc721_call_tokenURI',
{
"args": [
"0"
],
"chain": "ethereum",
"address": "0x0000000000000000000000000000000000000001"
},
){
"data": {
"chain": "ethereum",
"address": "0x0000000000000000000000000000000000000001",
"method": "spectrum_erc721api_erc721_call_tokenURI",
"abiName": "tokenURI",
"deploymentName": "erc721",
"operation": "call",
"abiType": "function",
"outputs": [
""
]
}
}Inputs
| Name | Type |
|---|---|
tokenId | uint256 |
Outputs
| Name | Type |
|---|---|
output_0 | string |
ReadbalanceOfspectrum_erc721api_erc721_call_balanceOf
Fetches the balance of an address for an asset
curl -X POST https://your-endpoint.simplystaking.xyz/v1 \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "spectrum_erc721api_erc721_call_balanceOf",
"params": {
"args": [
"0x0000000000000000000000000000000000000001"
],
"chain": "ethereum",
"address": "0x0000000000000000000000000000000000000001"
},
"id": 1
}'spectrum.marketplace.call(
'spectrum_erc721api_erc721_call_balanceOf',
{
"args": [
"0x0000000000000000000000000000000000000001"
],
"chain": "ethereum",
"address": "0x0000000000000000000000000000000000000001"
},
){
"data": {
"chain": "ethereum",
"address": "0x0000000000000000000000000000000000000001",
"method": "spectrum_erc721api_erc721_call_balanceOf",
"abiName": "balanceOf",
"deploymentName": "erc721",
"operation": "call",
"abiType": "function",
"outputs": [
"0"
]
}
}Inputs
| Name | Type |
|---|---|
owner | address |
Outputs
| Name | Type |
|---|---|
output_0 | uint256 |
ReadownerOfspectrum_erc721api_erc721_call_ownerOf
Fetches the owner of a tokenId
curl -X POST https://your-endpoint.simplystaking.xyz/v1 \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "spectrum_erc721api_erc721_call_ownerOf",
"params": {
"args": [
"0"
],
"chain": "ethereum",
"address": "0x0000000000000000000000000000000000000001"
},
"id": 1
}'spectrum.marketplace.call(
'spectrum_erc721api_erc721_call_ownerOf',
{
"args": [
"0"
],
"chain": "ethereum",
"address": "0x0000000000000000000000000000000000000001"
},
){
"data": {
"chain": "ethereum",
"address": "0x0000000000000000000000000000000000000001",
"method": "spectrum_erc721api_erc721_call_ownerOf",
"abiName": "ownerOf",
"deploymentName": "erc721",
"operation": "call",
"abiType": "function",
"outputs": [
"0x0000000000000000000000000000000000000001"
]
}
}Inputs
| Name | Type |
|---|---|
tokenId | uint256 |
Outputs
| Name | Type |
|---|---|
output_0 | address |
ReadgetApprovedspectrum_erc721api_erc721_call_getApproved
Fetches the single address approved to transfer the token
curl -X POST https://your-endpoint.simplystaking.xyz/v1 \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "spectrum_erc721api_erc721_call_getApproved",
"params": {
"args": [
"0"
],
"chain": "ethereum",
"address": "0x0000000000000000000000000000000000000001"
},
"id": 1
}'spectrum.marketplace.call(
'spectrum_erc721api_erc721_call_getApproved',
{
"args": [
"0"
],
"chain": "ethereum",
"address": "0x0000000000000000000000000000000000000001"
},
){
"data": {
"chain": "ethereum",
"address": "0x0000000000000000000000000000000000000001",
"method": "spectrum_erc721api_erc721_call_getApproved",
"abiName": "getApproved",
"deploymentName": "erc721",
"operation": "call",
"abiType": "function",
"outputs": [
"0x0000000000000000000000000000000000000001"
]
}
}Inputs
| Name | Type |
|---|---|
tokenId | uint256 |
Outputs
| Name | Type |
|---|---|
output_0 | address |
ReadisApprovedForAllspectrum_erc721api_erc721_call_isApprovedForAll
Fetches whether operator may transfer any and all tokens owner holds in this contract
curl -X POST https://your-endpoint.simplystaking.xyz/v1 \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "spectrum_erc721api_erc721_call_isApprovedForAll",
"params": {
"args": [
"0x0000000000000000000000000000000000000001",
"0x0000000000000000000000000000000000000001"
],
"chain": "ethereum",
"address": "0x0000000000000000000000000000000000000001"
},
"id": 1
}'spectrum.marketplace.call(
'spectrum_erc721api_erc721_call_isApprovedForAll',
{
"args": [
"0x0000000000000000000000000000000000000001",
"0x0000000000000000000000000000000000000001"
],
"chain": "ethereum",
"address": "0x0000000000000000000000000000000000000001"
},
){
"data": {
"chain": "ethereum",
"address": "0x0000000000000000000000000000000000000001",
"method": "spectrum_erc721api_erc721_call_isApprovedForAll",
"abiName": "isApprovedForAll",
"deploymentName": "erc721",
"operation": "call",
"abiType": "function",
"outputs": [
false
]
}
}Inputs
| Name | Type |
|---|---|
owner | address |
operator | address |
Outputs
| Name | Type |
|---|---|
output_0 | bool |
Events
EventApprovalForAllspectrum_erc721api_erc721_getLogs_ApprovalForAll
Event emitted when an approval for all is made
curl -X POST https://your-endpoint.simplystaking.xyz/v1 \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "spectrum_erc721api_erc721_getLogs_ApprovalForAll",
"params": {
"args": [
null,
null,
null
],
"fromBlock": "latest",
"toBlock": "latest",
"chain": "ethereum",
"address": "0x0000000000000000000000000000000000000001"
},
"id": 1
}'spectrum.marketplace.call(
'spectrum_erc721api_erc721_getLogs_ApprovalForAll',
{
"args": [
null,
null,
null
],
"fromBlock": "latest",
"toBlock": "latest",
"chain": "ethereum",
"address": "0x0000000000000000000000000000000000000001"
},
){
"data": {
"chain": "ethereum",
"address": "0x0000000000000000000000000000000000000001",
"method": "spectrum_erc721api_erc721_getLogs_ApprovalForAll",
"abiName": "ApprovalForAll",
"deploymentName": "erc721",
"operation": "getLogs",
"abiType": "event",
"count": 1,
"limit": 100,
"hasMore": false,
"cursor": null,
"logs": [
{
"address": "0x0000000000000000000000000000000000000001",
"blockNumber": 24510927,
"transactionHash": "0x867cbb7b...",
"logIndex": 1,
"args": [
"0x0000000000000000000000000000000000000001",
"0x0000000000000000000000000000000000000001",
false
]
}
]
}
}Event arguments
| Name | Type | Indexed |
|---|---|---|
owner | address | yes |
operator | address | yes |
approved | bool | no |
EventTransferspectrum_erc721api_erc721_getLogs_Transfer
Event emitted when a transfer is made
curl -X POST https://your-endpoint.simplystaking.xyz/v1 \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "spectrum_erc721api_erc721_getLogs_Transfer",
"params": {
"args": [
null,
null,
null
],
"fromBlock": "latest",
"toBlock": "latest",
"chain": "ethereum",
"address": "0x0000000000000000000000000000000000000001"
},
"id": 1
}'spectrum.marketplace.call(
'spectrum_erc721api_erc721_getLogs_Transfer',
{
"args": [
null,
null,
null
],
"fromBlock": "latest",
"toBlock": "latest",
"chain": "ethereum",
"address": "0x0000000000000000000000000000000000000001"
},
){
"data": {
"chain": "ethereum",
"address": "0x0000000000000000000000000000000000000001",
"method": "spectrum_erc721api_erc721_getLogs_Transfer",
"abiName": "Transfer",
"deploymentName": "erc721",
"operation": "getLogs",
"abiType": "event",
"count": 1,
"limit": 100,
"hasMore": false,
"cursor": null,
"logs": [
{
"address": "0x0000000000000000000000000000000000000001",
"blockNumber": 24510927,
"transactionHash": "0x867cbb7b...",
"logIndex": 1,
"args": [
"0x0000000000000000000000000000000000000001",
"0x0000000000000000000000000000000000000001",
"0"
]
}
]
}
}Event arguments
| Name | Type | Indexed |
|---|---|---|
from | address | yes |
to | address | yes |
tokenId | uint256 | yes |
EventApprovalspectrum_erc721api_erc721_getLogs_Approval
Event emitted when an approval is made
curl -X POST https://your-endpoint.simplystaking.xyz/v1 \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "spectrum_erc721api_erc721_getLogs_Approval",
"params": {
"args": [
null,
null,
null
],
"fromBlock": "latest",
"toBlock": "latest",
"chain": "ethereum",
"address": "0x0000000000000000000000000000000000000001"
},
"id": 1
}'spectrum.marketplace.call(
'spectrum_erc721api_erc721_getLogs_Approval',
{
"args": [
null,
null,
null
],
"fromBlock": "latest",
"toBlock": "latest",
"chain": "ethereum",
"address": "0x0000000000000000000000000000000000000001"
},
){
"data": {
"chain": "ethereum",
"address": "0x0000000000000000000000000000000000000001",
"method": "spectrum_erc721api_erc721_getLogs_Approval",
"abiName": "Approval",
"deploymentName": "erc721",
"operation": "getLogs",
"abiType": "event",
"count": 1,
"limit": 100,
"hasMore": false,
"cursor": null,
"logs": [
{
"address": "0x0000000000000000000000000000000000000001",
"blockNumber": 24510927,
"transactionHash": "0x867cbb7b...",
"logIndex": 1,
"args": [
"0x0000000000000000000000000000000000000001",
"0x0000000000000000000000000000000000000001",
"0"
]
}
]
}
}Event arguments
| Name | Type | Indexed |
|---|---|---|
owner | address | yes |
approved | address | yes |
tokenId | uint256 | yes |
