feat: caller as seaparte field in swglobal

This commit is contained in:
ppedziwiatr
2022-04-04 11:15:46 +02:00
committed by just_ppe
parent 096d66ec9f
commit e5e580007f
4 changed files with 15 additions and 3 deletions

View File

@@ -36,6 +36,7 @@ export class WasmContractHandlerApi<State> implements HandlerApi<State> {
const { interaction, interactionTx, currentTx } = interactionData;
this.swGlobal._activeTx = interactionTx;
this.swGlobal.caller = interaction.caller; // either contract tx id (for internal writes) or transaction.owner
// TODO: this should be rather set on the HandlerFactory level..
// but currently no access evaluationOptions there
this.swGlobal.gasLimit = executionContext.evaluationOptions.gasLimit;