Closed GregorWedlich closed 3 years ago
Hi!
Thank you for your message. I will look into it.
I think I was mistaken. im not sure.
We have incorrect types in metadata endpoints. :/
No problem!
@TheLegendaryRainbowWarrior Please send your code.
@TheLegendaryRainbowWarrior Please send your code.
import { BlockFrostAPI } from '@blockfrost/blockfrost-js';
const contract = '....';
const API = new BlockFrostAPI({
projectId: '...',
});
//const addressTXs = await API.metadataTxsLabels(contract);
const txLabels = await API.metadataTxsLabel(contract);
//console.log(addressTXs);
console.log(txLabels);
Output:
❯ node api.js
internal/process/esm_loader.js:74
internalBinding('errors').triggerUncaughtException(
^
{
status_code: 404,
error: 'Not Found',
message: 'The requested component has not been found.'
}
What is the contract
variable?
What is the
contract
variable?
contract = smart contract address
Sorry, that was my mistake, I wanted to query the Oracle metadata with the contract address, which is of course nonsense and must run via the label ID. Now everything works correctly and I get the data. I just wanted to test the API a little. Great stuff!
// Smart Contract address from PIGY Oracle
const contract = 'addr1w83xtd6pekdv93xkj4qz77a5edyuhcxeuvlwex3xm0afukgj73l65';
const API = new BlockFrostAPI({
projectId: '<MY_PROJECT_ID>',
});
const addressTXs = await API.metadataTxsLabels(contract);
const txLabels = await API.metadataTxsLabel('247428');
console.log(addressTXs);
console.log(txLabels);
We have incorrect types in metadata endpoints. :/
The types are still incorrect for Transaction metadata endpoint
Hello,
when I call the API, I don't get the correct data from "metadataTxsLabels" but I get the data from "metadataTxsLabel".
When I call "metadataTxsLabel", I get:
{ status_code: 404, error: 'not found', message: 'The requested component was not found'. }
I think there is something wrong.
Regards.