1.0.1
Some checks failed
CI / build (push) Has been cancelled

This commit is contained in:
asiaziola
2022-06-14 17:07:41 +02:00
parent 40214c7f0d
commit e763b990c9
3 changed files with 8 additions and 22 deletions

View File

@@ -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",

View File

@@ -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);
}

View File

@@ -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;
};