From e9eeadedfdb1d560eeee5f2eaaba29d1d849a6be Mon Sep 17 00:00:00 2001 From: Alejandro Busse Date: Thu, 8 Feb 2024 12:13:28 -0300 Subject: [PATCH] docs(root): fix ADA broadcast script fixed ADA broadcast script WP-0000 --- ADA.md | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/ADA.md b/ADA.md index 7d8b7e14..0b5d4371 100644 --- a/ADA.md +++ b/ADA.md @@ -26,23 +26,22 @@ const axiosConfig = { headers: { 'Content-Type': 'application/cbor', }, - timeout: 10000, + timeout: 50000, }; // Mainnet = https://api.koios.rest/api/v1/submittx // Testnet = https://preprod.koios.rest/api/v1/submittx const url = 'https://preprod.koios.rest/api/v1/submittx'; -const serializedSignedTx = '84a...5f6'; +const serializedSignedTx = '84a..af6'; -const bytes = Uint8Array.from(Buffer.from(serializedSignedTx, 'hex')); - -try { +async function main() { + const bytes = Uint8Array.from(Buffer.from(serializedSignedTx, 'hex')); const res = await axios.post(url, bytes, axiosConfig); console.log(res.data); -} catch (err) { - console.log(err); } + +main().catch(console.error); ``` - Run the following command to execute the script: