---
# System prepended metadata

title: Untitled

---

**LooksRare RoyaltyPayment Fees Subgraph - Manual Testing**

### Important Links

**Hosted Service** - https://thegraph.com/hosted-service/subgraph/geewynn/looksrare-fee
**API**  - https://api.thegraph.com/subgraphs/name/geewynn/looksrare-fee
**Github** - https://github.com/geewynn/looksrare-fees

**Protocol Interaction Diagram**
![](https://i.imgur.com/z01kNiV.png)


### Test 1 

#### Transactions
- [x] **TakerBid transaction**

**Etherscan Link**
https://etherscan.io/tx/0xd0474a605b36eabda38c71b4de1d8d03851b6fa84bbb3061bd444e1232919323#eventlog

**Query**
```
{
  transactions(
    where: {id: "0xd0474a605b36eabda38c71b4de1d8d03851b6fa84bbb3061bd444e1232919323"}
  ) {
    orderHash
    orderNonce
    price
    tokenId
    currency
    id
    isTakerAsk
    amount
    collection {
      id
    }
    royaltyPayment {
      amount
      currency
      id
      tokenId
      royaltyRecipient {
        id
      }
    }
    maker {
      id
    }
    taker {
      id
    }
  }
}
```

**Result**
```
{
  "data": {
    "transactions": [
      {
        "orderHash": "0x5c5ed27e1a13080d08261c39476867de537452cb69c2adaa2a2410d20dc0e2a3",
        "orderNonce": "9",
        "price": "100000000000000",
        "tokenId": "1",
        "currency": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
        "id": "0xd0474a605b36eabda38c71b4de1d8d03851b6fa84bbb3061bd444e1232919323",
        "isTakerAsk": false,
        "amount": "1",
        "collection": {
          "id": "0xfd43130beaa19a497f32e09df77c7b1749f06297"
        },
        "royaltyPayment": {
          "amount": "500000000000",
          "currency": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
          "id": "0xd0474a605b36eabda38c71b4de1d8d03851b6fa84bbb3061bd444e1232919323-307",
          "tokenId": "1",
          "royaltyRecipient": {
            "id": "0xa03bb8d8099c994ed87361f5c9857e13fc7c5ccf"
          }
        },
        "maker": {
          "id": "0x37f65b7352e86624e74dbe1036b93be23edd2652"
        },
        "taker": {
          "id": "0xa03bb8d8099c994ed87361f5c9857e13fc7c5ccf"
        }
      }
    ]
  }
}
```

- [x] **TakerAsk transaction**

**Etherscan Link**
https://etherscan.io/tx/0x5f12ae77666bab12dcccd36038375a5341468bc05d4358c27647def72be0ad5d#eventlog

**Query**
```
{
  transactions(
    where: {id: "0x5f12ae77666bab12dcccd36038375a5341468bc05d4358c27647def72be0ad5d"}
  ) {
    orderHash
    orderNonce
    price
    tokenId
    currency
    id
    isTakerAsk
    amount
    collection {
      id
    }
    royaltyPayment {
      amount
      currency
      id
      tokenId
      royaltyRecipient {
        id
      }
    }
    maker {
      id
    }
    taker {
      id
    }
  }
}
```

**Result**
```
{
  "data": {
    "transactions": [
      {
        "orderHash": "0xeaab7c71cca012d965eadedb1b48a435f163ce342f6da3c14ce701b22762c4e6",
        "orderNonce": "3475418",
        "price": "52980000000000000",
        "tokenId": "3836",
        "currency": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
        "id": "0x5f12ae77666bab12dcccd36038375a5341468bc05d4358c27647def72be0ad5d",
        "isTakerAsk": true,
        "amount": "1",
        "collection": {
          "id": "0xabf66ca534f8a5081303e3873f0f4771c67b7b45"
        },
        "royaltyPayment": {
          "amount": "264900000000000",
          "currency": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
          "id": "0x5f12ae77666bab12dcccd36038375a5341468bc05d4358c27647def72be0ad5d-115",
          "tokenId": "3836",
          "royaltyRecipient": {
            "id": "0x6c54d92e15cdd55af5167ae7454a2409de1b05c7"
          }
        },
        "maker": {
          "id": "0x4bccc930ce07d1d6fdd55f19caef13477b23ada0"
        },
        "taker": {
          "id": "0xd48349d1d3dcd1733ec6d808d65adb98a8c46e90"
        }
      }
    ]
  }
}
```


### Test 2 
#### Royatlty Payments
- [x] **Transaction Royalty Payments**
Get the royalty payment for a particular transaction.

**Etherscan Link**
https://etherscan.io/tx/0x5f12ae77666bab12dcccd36038375a5341468bc05d4358c27647def72be0ad5d#eventlog

**Query**
```
{
  transactionRoyaltyPayment(
    id: "0x5f12ae77666bab12dcccd36038375a5341468bc05d4358c27647def72be0ad5d"
  ) {
    id
    royaltyPayment {
      amount
      currency
      id
      tokenId
      royaltyRecipient {
        id
      }
      collection {
        id
      }
    }
  }
}
```

**Result**
```
{
  "data": {
    "transactionRoyaltyPayment": {
      "id": "0x5f12ae77666bab12dcccd36038375a5341468bc05d4358c27647def72be0ad5d",
      "royaltyPayment": {
        "amount": "264900000000000",
        "currency": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
        "id": "0x5f12ae77666bab12dcccd36038375a5341468bc05d4358c27647def72be0ad5d-115",
        "tokenId": "3836",
        "royaltyRecipient": {
          "id": "0x6c54d92e15cdd55af5167ae7454a2409de1b05c7"
        },
        "collection": {
          "id": "0xabf66ca534f8a5081303e3873f0f4771c67b7b45"
        }
      }
    }
  }
}
```

- [x] **Receipients royalty payments**
Get the first 3 royalty payments for a user

**Etherscan Link**
* https://etherscan.io/tx/0x0576b8abf028e8f35815d4e2758253e630310fc32e6aecb49fc68e3ca9301e79#eventlog
* https://etherscan.io/tx/0x077513b1de3cb120da66062d25e6290c0a5d5826ac48e935da1991433cb0ba16#eventlog
* https://etherscan.io/tx/0x0b9ecdac9600f58beb36740b27d846796a826acebae78a5a1721fdecbdd330a1#eventlog

**Query**
```
{
  royaltyPayments(
    where: {royaltyRecipient: "0x6c54d92e15cdd55af5167ae7454a2409de1b05c7"}
    first: 3
  ) {
    amount
    currency
    id
    tokenId
  }
}
```

**Result**
```
{
  "data": {
    "royaltyPayments": [
      {
        "amount": "479000000000000",
        "currency": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
        "id": "0x0576b8abf028e8f35815d4e2758253e630310fc32e6aecb49fc68e3ca9301e79-11",
        "tokenId": "4427"
      },
      {
        "amount": "308850000000000",
        "currency": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
        "id": "0x077513b1de3cb120da66062d25e6290c0a5d5826ac48e935da1991433cb0ba16-39",
        "tokenId": "1502"
      },
      {
        "amount": "3250000000000000",
        "currency": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
        "id": "0x0b9ecdac9600f58beb36740b27d846796a826acebae78a5a1721fdecbdd330a1-171",
        "tokenId": "341"
      }
    ]
  }
}
```


- [x] **Items royalty payments**
get the royalty payments for a collection/item

**Etherscan Link**
* https://etherscan.io/tx/0x0576b8abf028e8f35815d4e2758253e630310fc32e6aecb49fc68e3ca9301e79#eventlog
* https://etherscan.io/tx/0x077513b1de3cb120da66062d25e6290c0a5d5826ac48e935da1991433cb0ba16#eventlog
* https://etherscan.io/tx/0x0b9ecdac9600f58beb36740b27d846796a826acebae78a5a1721fdecbdd330a1#eventlog

**Query**
```
{
  item(id: "0x000000059619cdddc056910672abc90887136a95") {
    collection {
      id
    }
    royaltyPayments {
      tokenId
      id
      currency
      amount
      royaltyRecipient {
        id
      }
    }
  }
}
```

**Result**
```
{
  "data": {
    "item": {
      "collection": {
        "id": "0x000000059619cdddc056910672abc90887136a95"
      },
      "royaltyPayments": [
        {
          "tokenId": "2286",
          "id": "0x07233f48ce9754cbf0313193cba09a8f5df85c4c8bb202a9dd66021f9a52f693-134",
          "currency": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
          "amount": "1000000000000000",
          "royaltyRecipient": {
            "id": "0x719d131dfd468bdba4c97529eeb39d9c95db5e59"
          }
        },
        {
          "tokenId": "2591",
          "id": "0x0b836ce646f7317acce2981d9e8922d6179375982bae783fe323061aa38ecbf7-289",
          "currency": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
          "amount": "1050000000000000",
          "royaltyRecipient": {
            "id": "0x719d131dfd468bdba4c97529eeb39d9c95db5e59"
          }
        },
        {
          "tokenId": "865",
          "id": "0x3419e05849db4bb8c3b1cb92444b04df077be778bc665155a9ed6c4ff72b0c17-449",
          "currency": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
          "amount": "4000000000000000",
          "royaltyRecipient": {
            "id": "0x705b9c9a01e27d528c9e8b4bf05b479262f2565b"
          }
        },
        {
          "tokenId": "1665",
          "id": "0x3b3dc4aa70ed043147ec156b3621b42e36578ad195b99c97978eb4aa4e1e60ef-437",
          "currency": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
          "amount": "1065000000000000",
          "royaltyRecipient": {
            "id": "0x719d131dfd468bdba4c97529eeb39d9c95db5e59"
          }
        },
        {
          "tokenId": "1272",
          "id": "0x976efb6eaf8b0105c8a0dc0969f1d41528135cc6bfadcffd8306d538f26a094f-296",
          "currency": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
          "amount": "2250000000000000",
          "royaltyRecipient": {
            "id": "0x719d131dfd468bdba4c97529eeb39d9c95db5e59"
          }
        },
        {
          "tokenId": "2468",
          "id": "0xb2818216def7fdc5ebc48924bd5a2aaeebef0879446d7945465402b0279e5fcf-347",
          "currency": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
          "amount": "1750000000000000",
          "royaltyRecipient": {
            "id": "0x719d131dfd468bdba4c97529eeb39d9c95db5e59"
          }
        },
        {
          "tokenId": "2469",
          "id": "0xb2818216def7fdc5ebc48924bd5a2aaeebef0879446d7945465402b0279e5fcf-357",
          "currency": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
          "amount": "1750000000000000",
          "royaltyRecipient": {
            "id": "0x719d131dfd468bdba4c97529eeb39d9c95db5e59"
          }
        },
        {
          "tokenId": "1900",
          "id": "0xc3571331490a1e17f1a27a066aa7d8d8a2d6ad274d727ef594562c55f97e3dc6-269",
          "currency": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
          "amount": "1250000000000000",
          "royaltyRecipient": {
            "id": "0x719d131dfd468bdba4c97529eeb39d9c95db5e59"
          }
        },
        {
          "tokenId": "2883",
          "id": "0xc3571331490a1e17f1a27a066aa7d8d8a2d6ad274d727ef594562c55f97e3dc6-279",
          "currency": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
          "amount": "1250000000000000",
          "royaltyRecipient": {
            "id": "0x719d131dfd468bdba4c97529eeb39d9c95db5e59"
          }
        },
        {
          "tokenId": "329",
          "id": "0xe394cebef2cd00fe7c580ee29e8b5b01c2d60aa91319deef3f9543fd0b149f71-76",
          "currency": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
          "amount": "1500000000000000",
          "royaltyRecipient": {
            "id": "0x705b9c9a01e27d528c9e8b4bf05b479262f2565b"
          }
        },
        {
          "tokenId": "1812",
          "id": "0xe394cebef2cd00fe7c580ee29e8b5b01c2d60aa91319deef3f9543fd0b149f71-86",
          "currency": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
          "amount": "1500000000000000",
          "royaltyRecipient": {
            "id": "0x705b9c9a01e27d528c9e8b4bf05b479262f2565b"
          }
        }
      ]
    }
  }
}

