diff --git a/src/contract/HandlerBasedContract.ts b/src/contract/HandlerBasedContract.ts index 8509eec..d5f46fb 100644 --- a/src/contract/HandlerBasedContract.ts +++ b/src/contract/HandlerBasedContract.ts @@ -240,7 +240,10 @@ export class HandlerBasedContract implements Contract { throw new Error(`Unable to bundle interaction: ${JSON.stringify(error)}`); }); - return response; + return { + bundlrResponse: response, + originalTxId: interactionTx.id + }; } private async createInteraction( diff --git a/tools/bundle.ts b/tools/bundle.ts index 41386aa..98e6a81 100644 --- a/tools/bundle.ts +++ b/tools/bundle.ts @@ -30,7 +30,7 @@ async function main() { const smartweave = SmartWeaveNodeFactory.memCachedBased(arweave) .setInteractionsLoader( - new RedstoneGatewayInteractionsLoader('http://localhost:5666', { notCorrupted: true }) + new RedstoneGatewayInteractionsLoader('https://gateway.redstone.finance', { notCorrupted: true }) ) .setDefinitionLoader( new RedstoneGatewayContractDefinitionLoader('https://gateway.redstone.finance', arweave, new MemCache()) @@ -42,7 +42,7 @@ async function main() { const token = smartweave .contract("OrO8n453N6bx921wtsEs-0OCImBLCItNU5oSbFKlFuU") .setEvaluationOptions({ - sequencerAddress: "http://localhost:5666/" + sequencerAddress: "https://gateway.redstone.finance/" }) // connecting wallet to a contract. It is required before performing any "writeInteraction" // calling "writeInteraction" without connecting to a wallet first will cause a runtime error. @@ -60,7 +60,7 @@ async function main() { }, }); - logger.info("Result from the sequencer", result.id); + logger.info("Result from the sequencer", result); // the new transaction is instantly available - ie. during the state read operation const result2 = await token.readState();