Submit
Submit signed transactions to the blockchain for Tournament operations for Forge Digital Ventures
Last updated
Was this helpful?
Was this helpful?
async function submitTransaction(signedTransaction) {
const apiUrl = 'https://preprod.api.ada-anvil.app/v2/services/tournaments/submit-tx';
const requestData = {
transaction: signedTransaction,
// Optional additional signatures
// signatures: ["signature1", "signature2"]
};
const response = await fetch(apiUrl, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify(requestData),
});
const data = await response.json();
console.log(`Transaction submitted successfully with hash: ${data.txHash}`);
return data.txHash;
}