Collateral Free
Our current indexing solution is provided by The Graph. Feel free to experiment with our subgraph (renft-registy) in the Playground tab.
To query our subgraph, send an HTTP POST request to
https://api.studio.thegraph.com/query/3020/sylvester/1.0.3
whose body is a GraphQL query.Here are some example queries:
Get 5 lendings after skipping 5 where the NFT's address is:
0x0db8c099b426677f575d512874d45a767e9acc3c
sorted by dailyRentPrice
in descending order (if you are ever having issues with subgraph when you are using nft addresses, lower case the address).{
lendings(orderDirection: desc, orderBy: cursor, first: 5, skip: 5) {
id,
cursor,
lenderAddress,
maxRentDuration,
dailyRentPrice,
paymentToken,
lendAmount,
nftAddress,
tokenID,
is721,
lentAt
}
}
Get lending by id.
{
lending(id: "1") {
id,
lenderAddress,
maxRentDuration,
dailyRentPrice,
paymentToken,
lendAmount,
nftAddress,
tokenID,
is721,
lentAt
}
}
Get rentings for renter
0x4976fb03C32e5B8cfe2b6cCB31c09Ba78EBaBa41
ordered by rentDuration
in ascending order{
rentings(where: {renterAddress: "0x4976fb03C32e5B8cfe2b6cCB31c09Ba78EBaBa41", expired: false}, orderDirection: asc, orderBy: rentDuration) {
id,
renterAddress,
rentDuration,
rentedAt,
rentAmount,
lending {
id,
tokenID,
nftAddress,
dailyRentPrice,
paymentToken,
lenderAddress
},
}
}
Last modified 11d ago