Closed Julian0701 closed 11 months ago
✅ Check list - API Document:
Before:
"transactionData": [
{
"id": "930071",
"chainId": "isun",
"createdTimestamp": 1607957394,
"type": "Crypto Currency",
"status": "SUCCESS"
}
//...
]
After:
"transactionData": [
{
"id": "930071",
"chainId": "isun",
"createdTimestamp": 1607957394,
"from": [
{ "type": "address", "address": "130294" }
// ...
// FIXME:address like 0x356f9537631A773Ab9069fEc25f74Cd884132776
],
"to": [
{ "type": "contract", "address": "310071" }
// ...
// FIXME:address like 0x356f9537631A773Ab9069fEc25f74Cd884132776
],
"type": "Crypto Currency",
"status": "SUCCESS"
},
{
"id": "930291",
"chainId": "isun",
"createdTimestamp": 1679978900,
"from": [
{ "type": "address", "address": "130682" }
// ...
// FIXME:address like 0x356f9537631A773Ab9069fEc25f74Cd884132776
],
"to": [
{ "type": "contract", "address": "310071" }
// ...
// FIXME:address like 0x356f9537631A773Ab9069fEc25f74Cd884132776
],
"type": "Evidence",
"status": "FAILED"
},
{
"id": "930032",
"chainId": "isun",
"createdTimestamp": 1680176231,
"from": [
{ "type": "address", "address": "130008" }
// ...
// FIXME:address like 0x356f9537631A773Ab9069fEc25f74Cd884132776
],
"to": [
{ "type": "contract", "address": "310029" }
// ...
// FIXME:address like 0x356f9537631A773Ab9069fEc25f74Cd884132776
],
"type": "NFT",
"status": "PENDING"
}
//...
]
Before:
"transactionHistoryData": [
{
"id": "930154",
"createdTimestamp": 1679978987,
"type": "Crypto Currency",
"status": "SUCCESS"
},
{
"id": "930785",
"createdTimestamp": 1687909392,
"type": "Evidence",
"status": "FAILED"
}
//...
]
After:
"transactionHistoryData": [
{
"id": "918402",
"chainId": "btc",
"createdTimestamp": 1679978987,
"from": [{ "type": "address", "address": "114007" }], // FIXME:address like 0x356f9537631A773Ab9069fEc25f74Cd884132776
"to": [{ "type": "contract", "address": "110132" }],
"type": "Crypto Currency",
"status": "SUCCESS"
},
{
"id": "912299",
"chainId": "btc",
"createdTimestamp": 1687909392,
"from": [{ "type": "address", "address": "110132" }], // FIXME:address like 0x356f9537631A773Ab9069fEc25f74Cd884132776
"to": [{ "type": "contract", "address": "310683" }],
"type": "Evidence",
"status": "FAILED"
}
//...
]
瀏覽器畫面對照:(資料來源 #364 )
005 - GET /app/chains/:chain_id 006 - GET /app/chains/:chain_id/blocks?start_date=${startTimestamp}&end_date=${endTimestamp} https://baifa-1dmwoz781-cafeca.vercel.app/en/app/chains/isun
011 - GET /app/chains/:chain_id/addresses/:address_id https://baifa-1dmwoz781-cafeca.vercel.app/en/app/chains/isun/address/130294
✅ Check list - Mock API codes:
Total api updated:
Check Postman Response:
Total api updated:
done.
took 5 hours.
Update steps:
1. 調整 transactionData / transactionHistoryData 格式
2. 調整 blockProducedData 格式
3. 007 - Get a block data from a chain 新增 uint
4. 012 - Reviews of an address 新增 chainIcon
5. 011 - Get an address data from a chain 關聯地址的格式須調整
relatedAddressIds
改成relatedAddresses