alephium / explorer-backend

The explorer backend for Alephium protocol
https://explorer.alephium.org
GNU Lesser General Public License v3.0
7 stars 13 forks source link

Contracts should have the `main_chain` field #528

Open tdroxler opened 5 months ago

tdroxler commented 5 months ago

We have some duplicates in our sub-contracts endpoint: Examples: 1. https://backend-v113.mainnet.alephium.org/contracts/24BbzydVTNxi3LbgcNx1Z7p689MMoqtyP8MQYvKzFbg8X/sub-contracts?page=24&limit=100 subcontract:286FrUurMmyJgiGy4ve1SrusoyE8aYBFx2nDAmQQrnWtf 2. https://backend-v113.mainnet.alephium.org/contracts/24BbzydVTNxi3LbgcNx1Z7p689MMoqtyP8MQYvKzFbg8X/sub-contracts?page=24&limit=100 subcontract: xWin5eAirUowNHSAQn2RwsSxCmkPx4asytQcJ6NkcKBm 3. https://backend-v113.mainnet.alephium.org/contracts/24BbzydVTNxi3LbgcNx1Z7p689MMoqtyP8MQYvKzFbg8X/sub-contracts?page=30&limit=100 subcontract: 27BV4H1cXRVpY3YviJeZ6ko8pARKyZq1E6gKwirVQFpoR

Because orphan block are also storing the contracts.

We probably need to also set the main_chain field into the contracts table.