Call executes the given transaction on the state for the given block number. It doesn't make and changes in the state/blockchain and is useful to execute and retrieve values.
(ctx context.Context, args CallArgs, blockNr rpc.BlockNumber)
| 777 | // Call executes the given transaction on the state for the given block number. |
| 778 | // It doesn't make and changes in the state/blockchain and is useful to execute and retrieve values. |
| 779 | func (s *PublicBlockChainAPI) Call(ctx context.Context, args CallArgs, blockNr rpc.BlockNumber) (hexutil.Bytes, error) { |
| 780 | result, _, _, err := s.doCall(ctx, args, blockNr, vm.Config{}, 5*time.Second) |
| 781 | return (hexutil.Bytes)(result), err |
| 782 | } |
| 783 | |
| 784 | // EstimateGas returns an estimate of the amount of gas needed to execute the |
| 785 | // given transaction against the current pending block. |