@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "warp-contracts",
|
||||
"version": "1.0.0",
|
||||
"version": "1.0.1",
|
||||
"description": "An implementation of the SmartWeave smart contract protocol.",
|
||||
"main": "./lib/cjs/index.js",
|
||||
"module": "./lib/esm/index.js",
|
||||
|
||||
@@ -90,14 +90,8 @@ describe('Testing internal writes', () => {
|
||||
src: stakingContractSrc
|
||||
});
|
||||
|
||||
tokenContract = warp
|
||||
.contract(tokenContractTxId)
|
||||
.setEvaluationOptions({ internalWrites: true })
|
||||
.connect(wallet);
|
||||
stakingContract = warp
|
||||
.contract(stakingContractTxId)
|
||||
.setEvaluationOptions({ internalWrites: true })
|
||||
.connect(wallet);
|
||||
tokenContract = warp.contract(tokenContractTxId).setEvaluationOptions({ internalWrites: true }).connect(wallet);
|
||||
stakingContract = warp.contract(stakingContractTxId).setEvaluationOptions({ internalWrites: true }).connect(wallet);
|
||||
|
||||
await mineBlock(arweave);
|
||||
}
|
||||
|
||||
@@ -190,11 +190,7 @@ export class WasmContractHandlerApi<State> implements HandlerApi<State> {
|
||||
});
|
||||
|
||||
const { stateEvaluator } = executionContext.warp;
|
||||
const childContract = executionContext.warp.contract(
|
||||
contractTxId,
|
||||
executionContext.contract,
|
||||
interactionTx
|
||||
);
|
||||
const childContract = executionContext.warp.contract(contractTxId, executionContext.contract, interactionTx);
|
||||
|
||||
await stateEvaluator.onContractCall(interactionTx, executionContext, currentResult);
|
||||
|
||||
@@ -244,14 +240,10 @@ export class WasmContractHandlerApi<State> implements HandlerApi<State> {
|
||||
]);
|
||||
|
||||
this.logger.debug('Cache result?:', !this.swGlobal._activeTx.dry);
|
||||
await executionContext.warp.stateEvaluator.onInternalWriteStateUpdate(
|
||||
this.swGlobal._activeTx,
|
||||
contractTxId,
|
||||
{
|
||||
await executionContext.warp.stateEvaluator.onInternalWriteStateUpdate(this.swGlobal._activeTx, contractTxId, {
|
||||
state: result.state as State,
|
||||
validity: {}
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
return result;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user