Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/Stratis.Features.Unity3dApi/LocalCallContract.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
8 changes: 6 additions & 2 deletions src/Stratis.Features.Unity3dApi/NFTTransferIndexer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand Down