diff --git a/src/Stratis.Features.Unity3dApi/LocalCallContract.cs b/src/Stratis.Features.Unity3dApi/LocalCallContract.cs index e82a6d4a4..df073deea 100644 --- a/src/Stratis.Features.Unity3dApi/LocalCallContract.cs +++ b/src/Stratis.Features.Unity3dApi/LocalCallContract.cs @@ -29,12 +29,15 @@ public class LocalCallContract : ILocalCallContract private readonly IContractPrimitiveSerializer primitiveSerializer; private readonly IContractAssemblyCache contractAssemblyCache; - public LocalCallContract(Network network, ISmartContractTransactionService smartContractTransactionService, ChainIndexer chainIndexer, ILocalExecutor localExecutor) + public LocalCallContract(Network network, ISmartContractTransactionService smartContractTransactionService, ChainIndexer chainIndexer, ILocalExecutor localExecutor, + IContractPrimitiveSerializer contractPrimitiveSerializer, IContractAssemblyCache contractAssemblyCache) { this.network = network; this.chainIndexer = chainIndexer; this.smartContractTransactionService = smartContractTransactionService; this.localExecutor = localExecutor; + this.primitiveSerializer = contractPrimitiveSerializer; + this.contractAssemblyCache = contractAssemblyCache; } public LocalExecutionResponse LocalCallSmartContract(LocalCallContractRequest request) diff --git a/src/Stratis.Features.Unity3dApi/NFTTransferIndexer.cs b/src/Stratis.Features.Unity3dApi/NFTTransferIndexer.cs index 3646ddb8b..f29b339ca 100644 --- a/src/Stratis.Features.Unity3dApi/NFTTransferIndexer.cs +++ b/src/Stratis.Features.Unity3dApi/NFTTransferIndexer.cs @@ -15,6 +15,8 @@ using Stratis.Bitcoin.Features.SmartContracts.Wallet; using Stratis.Bitcoin.Utilities; using Stratis.SmartContracts.CLR; +using Stratis.SmartContracts.CLR.Caching; +using Stratis.SmartContracts.CLR.Serialization; using FileMode = LiteDB.FileMode; namespace Stratis.Features.Unity3dApi @@ -65,7 +67,9 @@ public class NFTTransferIndexer : INFTTransferIndexer private IAsyncLoop indexingLoop; public NFTTransferIndexer(DataFolder dataFolder, ILoggerFactory loggerFactory, IAsyncProvider asyncProvider, INodeLifetime nodeLifetime, - ChainIndexer chainIndexer, Network network, ILocalExecutor localExecutor, Unity3dApiSettings apiSettings, ISmartContractTransactionService smartContractTransactionService = null) + ChainIndexer chainIndexer, Network network, ILocalExecutor localExecutor, Unity3dApiSettings apiSettings, + ISmartContractTransactionService smartContractTransactionService = null, IContractPrimitiveSerializer contractPrimitiveSerializer = null, + IContractAssemblyCache contractAssemblyCache = null) { this.network = network; this.dataFolder = dataFolder; @@ -74,7 +78,7 @@ public NFTTransferIndexer(DataFolder dataFolder, ILoggerFactory loggerFactory, I this.nodeLifetime = nodeLifetime; this.chainIndexer = chainIndexer; - var localCallContract = new LocalCallContract(network, smartContractTransactionService, chainIndexer, localExecutor); + var localCallContract = new LocalCallContract(network, smartContractTransactionService, chainIndexer, localExecutor, contractPrimitiveSerializer, contractAssemblyCache); this.nftContractLocalClient = new NftContractLocalClient(localCallContract, apiSettings.LocalCallSenderAddress); this.smartContractTransactionService = smartContractTransactionService;