示例#1
0
 public MeteredContractLogger(IGasMeter gasMeter, IContractLogger logger, Network network, IContractPrimitiveSerializer serializer)
 {
     this.gasMeter   = gasMeter;
     this.logger     = logger;
     this.network    = network;
     this.serializer = serializer;
 }
        public SmartContract(ISmartContractState smartContractState)
        {
            CultureInfo.CurrentCulture = new CultureInfo("en-US");

            this.gasMeter       = smartContractState.GasMeter;
            this.Block          = smartContractState.Block;
            this.getBalance     = smartContractState.GetBalance;
            this.contractLogger = smartContractState.ContractLogger;
            this.internalTransactionExecutor = smartContractState.InternalTransactionExecutor;
            this.internalHashHelper          = smartContractState.InternalHashHelper;
            this.Message            = smartContractState.Message;
            this.PersistentState    = smartContractState.PersistentState;
            this.smartContractState = smartContractState;
        }
示例#3
0
 public SmartContractState(
     IBlock block,
     IMessage message,
     IPersistentState persistentState,
     ISerializer serializer,
     IContractLogger contractLogger,
     IInternalTransactionExecutor internalTransactionExecutor,
     IInternalHashHelper internalHashHelper,
     Func <ulong> getBalance)
 {
     this.Block                       = block;
     this.Message                     = message;
     this.PersistentState             = persistentState;
     this.Serializer                  = serializer;
     this.ContractLogger              = contractLogger;
     this.InternalTransactionExecutor = internalTransactionExecutor;
     this.InternalHashHelper          = internalHashHelper;
     this.GetBalance                  = getBalance;
 }
示例#4
0
 public TestSmartContractState(
     IBlock block,
     IMessage message,
     IPersistentState persistentState,
     IGasMeter gasMeter,
     IInternalTransactionExecutor transactionExecutor,
     Func <ulong> getBalance,
     IInternalHashHelper hashHelper,
     IContractLogger contractLogger)
 {
     this.Block                       = block;
     this.Message                     = message;
     this.PersistentState             = persistentState;
     this.GasMeter                    = gasMeter;
     this.InternalTransactionExecutor = transactionExecutor;
     this.GetBalance                  = getBalance;
     this.InternalHashHelper          = hashHelper;
     this.ContractLogger              = contractLogger;
 }
示例#5
0
 public MeteredContractLogger(RuntimeObserver.IGasMeter gasMeter, IContractLogger logger, IContractPrimitiveSerializer serializer)
 {
     this.gasMeter   = gasMeter;
     this.logger     = logger;
     this.serializer = serializer;
 }