public SweepStakeTests()
        {
            var block = new TestBlock
            {
                Coinbase = contractOwnerAddress,
                Number   = 2
            };

            var message = new TestMessage
            {
                ContractAddress = contractAddress,
                GasLimit        = (Gas)(ulong)10000,
                Sender          = punter1Address,
                Value           = 0
            };

            this.transactionExecutor = Substitute.For <IInternalTransactionExecutor>();

            this.smartContractState = new TestSmartContractState(
                block,
                message,
                new InMemoryState(),
                null,
                transactionExecutor,
                () => (ulong)0,
                new TestInternalHashHelper()
                );
        }
Ejemplo n.º 2
0
        public AuctionTests()
        {
            var block = new TestBlock
            {
                Coinbase = ContractOwnerAddress,
                Number   = 1
            };

            var message = new TestMessage
            {
                ContractAddress = ContractOwnerAddress,
                GasLimit        = (Gas)GasLimit,
                Sender          = ContractOwnerAddress,
                Value           = Value
            };

            this.transactionExecutor = Substitute.For <IInternalTransactionExecutor>();

            this.smartContractState = new TestSmartContractState(
                block,
                message,
                new InMemoryState(),
                null,
                transactionExecutor,
                () => Balance,
                new TestInternalHashHelper()
                );
        }