Ejemplo n.º 1
0
        protected override long Handle(TransactionForRpc transactionCall, IWeb3EthApi api)
        {
            var deltaWithCid = api.GetLatestDeltaWithCid();

            var callOutputTracer = api.CallAndRestore(transactionCall, deltaWithCid);

            return(callOutputTracer.GasSpent);
        }
Ejemplo n.º 2
0
        protected override byte[] Handle(TransactionForRpc transactionCall, BlockParameter block, IWeb3EthApi api)
        {
            if (api.TryGetDeltaWithCid(block, out var deltaWithCid))
            {
                var callOutputTracer = api.CallAndRestore(transactionCall, deltaWithCid);

                return(callOutputTracer.ReturnValue);
            }

            throw new InvalidOperationException($"Delta not found: '{block}'");
        }